diff --git a/lib/index.js b/lib/index.js index d2c3e2d95..e212e77c7 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,2 +1,2 @@ /*! For license information please see index.js.LICENSE.txt */ -!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],n):"object"==typeof exports?exports["react-chat-widget"]=n(require("react"),require("react-dom")):e["react-chat-widget"]=n(e.React,e.ReactDOM)}(this,((e,n)=>(()=>{var f={735:(e,n,f)=>{"use strict";f.r(n),f.d(n,{EmojiPart:()=>o.EmojiPart,Picker:()=>u.EmojiPicker,PostOptions:()=>s.PostOptions,Sender:()=>c.a,Widget:()=>t.a,addLinkSnippet:()=>a.addLinkSnippet,addResponseAudioMessage:()=>a.addResponseAudioMessage,addResponseImageMessage:()=>a.addResponseImageMessage,addResponseMessage:()=>a.addResponseMessage,addSystemResponseMessage:()=>a.addSystemResponseMessage,addUserAudioMessage:()=>a.addUserAudioMessage,addUserImageMessage:()=>a.addUserImageMessage,addUserMessage:()=>a.addUserMessage,clearChat:()=>a.clearChat,deleteMessages:()=>a.deleteMessages,dropMessages:()=>a.dropMessages,emojiBackwardConvert:()=>r.emojiBackwardConvert,emojiConvert:()=>r.emojiConvert,emojiTruncate:()=>o.jQ,getLastResponseMessage:()=>a.getLastResponseMessage,getMessages:()=>a.getMessages,getOldestMessage:()=>a.getOldestMessage,indexOfAll:()=>m,isEmojiPosition:()=>y,isWidgetMinimalized:()=>a.isWidgetMinimalized,isWidgetOpened:()=>a.isWidgetOpened,markAllAsRead:()=>a.markAllAsRead,markAsDelivered:()=>a.markAsDelivered,markAsRead:()=>a.markAsRead,minimalizeChat:()=>a.minimalizeChat,renderCustomComponent:()=>a.renderCustomComponent,setBadgeCount:()=>a.setBadgeCount,setQuickButtons:()=>a.setQuickButtons,strEmojiLen:()=>g,textWithEmojiTruncate:()=>l,toggleInputDisabled:()=>a.toggleInputDisabled,toggleMsgLoader:()=>a.toggleMsgLoader,toggleWidget:()=>a.toggleWidget});f(7557);var i=f(370),t=f.n(i),a=f(9064),r=f(307),o=f(6899),s=f(349),d=f(7832),c=f.n(d),u=f(348),l=o.jQ.textWithEmojiTruncate,g=o.jQ.strEmojiLen,y=o.jQ.isEmojiPosition,m=o.jQ.indexOfAll},2777:(e,n,f)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ReactAudioRecorder=void 0;var i=f(9787),t=f(5834);n.ReactAudioRecorder=(0,i.forwardRef)((function(e,n){var f=e.render,a=(0,t.useAudioRecorder)(),r=a.startRecording,o=a.stopRecording,s=a.pauseRecording,d=a.resumeRecording,c=a.status,u=a.audioResult,l=a.errorMessage,g=a.timer;return(0,i.useImperativeHandle)(n,(function(){return{stopRecording:o,getStatus:function(){return c}}})),f({startRecording:r,stopRecording:o,pauseRecording:s,resumeRecording:d,status:c,audioResult:u,errorMessage:l,timer:g})}))},8613:(e,n,f)=>{"use strict";function i(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var f=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=f){var i,t,a,r,o=[],s=!0,d=!1;try{if(a=(f=f.call(e)).next,0===n){if(Object(f)!==f)return;s=!1}else for(;!(s=(i=a.call(f)).done)&&(o.push(i.value),o.length!==n);s=!0);}catch(e){d=!0,t=e}finally{try{if(!s&&null!=f.return&&(r=f.return(),Object(r)!==r))return}finally{if(d)throw t}}return o}}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var f=Object.prototype.toString.call(e).slice(8,-1);"Object"===f&&e.constructor&&(f=e.constructor.name);if("Map"===f||"Set"===f)return Array.from(e);if("Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return t(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,n){(null==n||n>e.length)&&(n=e.length);for(var f=0,i=new Array(n);f{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RECORD_STATUS=void 0,function(e){e.IDLE="idle",e.RECORDING="recording",e.PAUSED="paused"}(n.RECORD_STATUS||(n.RECORD_STATUS={}))},5834:function(e,n,f){"use strict";function i(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var f=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=f){var i,t,a,r,o=[],s=!0,d=!1;try{if(a=(f=f.call(e)).next,0===n){if(Object(f)!==f)return;s=!1}else for(;!(s=(i=a.call(f)).done)&&(o.push(i.value),o.length!==n);s=!0);}catch(e){d=!0,t=e}finally{try{if(!s&&null!=f.return&&(r=f.return(),Object(r)!==r))return}finally{if(d)throw t}}return o}}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var f=Object.prototype.toString.call(e).slice(8,-1);"Object"===f&&e.constructor&&(f=e.constructor.name);if("Map"===f||"Set"===f)return Array.from(e);if("Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return t(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,n){(null==n||n>e.length)&&(n=e.length);for(var f=0,i=new Array(n);f{"use strict";function i(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var f=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=f){var i,t,a,r,o=[],s=!0,d=!1;try{if(a=(f=f.call(e)).next,0===n){if(Object(f)!==f)return;s=!1}else for(;!(s=(i=a.call(f)).done)&&(o.push(i.value),o.length!==n);s=!0);}catch(e){d=!0,t=e}finally{try{if(!s&&null!=f.return&&(r=f.return(),Object(r)!==r))return}finally{if(d)throw t}}return o}}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var f=Object.prototype.toString.call(e).slice(8,-1);"Object"===f&&e.constructor&&(f=e.constructor.name);if("Map"===f||"Set"===f)return Array.from(e);if("Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return t(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,n){(null==n||n>e.length)&&(n=e.length);for(var f=0,i=new Array(n);f=0;--t){var a=this.tryEntries[t],r=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var o=f.call(a,"catchLoc"),s=f.call(a,"finallyLoc");if(o&&s){if(this.prev=0;--i){var t=this.tryEntries[i];if(t.tryLoc<=this.prev&&f.call(t,"finallyLoc")&&this.prev=0;--n){var f=this.tryEntries[n];if(f.finallyLoc===e)return this.complete(f.completion,f.afterLoc),C(f),g}},catch:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var f=this.tryEntries[n];if(f.tryLoc===e){var i=f.completion;if("throw"===i.type){var t=i.arg;C(f)}return t}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,f){return this.delegate={iterator:E(e),resultName:n,nextLoc:f},"next"===this.method&&(this.arg=void 0),g}},e}function r(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,n){if(e){if("string"==typeof e)return s(e,n);var f=Object.prototype.toString.call(e).slice(8,-1);return"Object"===f&&e.constructor&&(f=e.constructor.name),"Map"===f||"Set"===f?Array.from(e):"Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?s(e,n):void 0}}function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var f=0,i=new Array(n);f{"use strict";function i(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var f=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=f){var i,t,a,r,o=[],s=!0,d=!1;try{if(a=(f=f.call(e)).next,0===n){if(Object(f)!==f)return;s=!1}else for(;!(s=(i=a.call(f)).done)&&(o.push(i.value),o.length!==n);s=!0);}catch(e){d=!0,t=e}finally{try{if(!s&&null!=f.return&&(r=f.return(),Object(r)!==r))return}finally{if(d)throw t}}return o}}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var f=Object.prototype.toString.call(e).slice(8,-1);"Object"===f&&e.constructor&&(f=e.constructor.name);if("Map"===f||"Set"===f)return Array.from(e);if("Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return t(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,n){(null==n||n>e.length)&&(n=e.length);for(var f=0,i=new Array(n);f{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=f(7557),t=f(1718);f(7244),n.default=function(e){var n=e.title,f=e.subtitle,a=e.toggleChat,r=e.showCloseButton,o=e.titleAvatar,s=e.showMinimalizeButton,d=e.minimalizeChat,c=e.isMinimalized,u=e.headerBeginElement;return(0,i.jsxs)("div",Object.assign({className:"rcw-header"},{children:[s&&(0,i.jsx)("button",Object.assign({className:"rcw-minimalize-button",onClick:function(){return null==d?void 0:d(!c)}},{children:c?(0,i.jsx)(t.Icons.Maximalize,{}):(0,i.jsx)(t.Icons.Minimalize,{})})),r&&(0,i.jsx)("button",Object.assign({className:"rcw-close-button",onClick:a},{children:(0,i.jsx)(t.Icons.Clear,{})})),u,(0,i.jsxs)("h4",Object.assign({className:"rcw-title"},{children:[o&&(0,i.jsx)("img",{src:o,className:"avatar",alt:"profile"}),n]})),(0,i.jsx)("span",{children:f})]}))}},6790:function(e,n,f){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var t=f(7557),a=i(f(4403));f(142),n.default=function(e){var n=e.typing;return(0,t.jsx)("div",Object.assign({className:(0,a.default)("loader",{active:n})},{children:(0,t.jsxs)("div",Object.assign({className:"loader-container"},{children:[(0,t.jsx)("span",{className:"loader-dots"}),(0,t.jsx)("span",{className:"loader-dots"}),(0,t.jsx)("span",{className:"loader-dots"})]}))}))}},7037:function(e,n,f){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var t=f(7557),a=i(f(6599)),r=i(f(6912)),o=i(f(1416)),s=i(f(7262)),d=i(f(5073)),c=i(f(6071)),u=i(f(4403)),l=f(1754),g=f(307);f(6997);var y=f(7749),m=f(6939),h=f(3521),v=function(e,n){return(0,t.jsx)("div",Object.assign({className:"post-wrapper"},{children:(0,t.jsxs)("a",Object.assign({href:e.link,target:"_blank"},{children:[e.title&&(0,t.jsx)("span",Object.assign({className:"post-wrapper-title"},{children:(0,t.jsx)("div",{children:e.title})})),e.text&&(0,t.jsx)("div",{className:(0,u.default)("post-text",e.imgLink&&"has-img"),dangerouslySetInnerHTML:{__html:(0,g.emojiConvert)(e.text,n)}}),e.imgLink&&(0,t.jsx)("img",{className:"post-img",src:e.imgLink,alt:""})]}))}))};n.default=function(e){var n=e.message,f=e.showTimeStamp,i=e.set,u=e.onImageClick,p=e.onRemoveMessage,b=(0,r.default)({break:!0}).use(d.default,{img:["rcw-message-img"]}).use(o.default).use(s.default).use(c.default,{attrs:{target:"_blank",rel:"noopener"}}).render(n.text),w=function(e){return e===l.MESSAGE_SENDER.CLIENT};return(0,t.jsxs)("div",Object.assign({className:"rcw-".concat(n.sender)},{children:[n.post&&v(n.post,i),n.imageLink&&(0,t.jsx)("div",Object.assign({className:"rcw-message-text"},{children:(0,t.jsx)("p",{children:(0,t.jsx)("img",{src:n.imageLink,alt:"",className:"rcw-message-img",onClick:function(){return null==u?void 0:u(String(n.imageLink))}})})})),w(n.sender)&&(0,t.jsx)("img",{src:h,onClick:function(){return null==p?void 0:p(n)},title:"Remove",className:"cursor-pointer rcw-message-remove"}),n.text&&(0,t.jsx)("div",{className:"rcw-message-text",dangerouslySetInnerHTML:{__html:(0,g.emojiConvert)(b,i)}}),n.audioLink&&(0,t.jsx)("audio",Object.assign({controls:!0},{children:(0,t.jsx)("source",{src:n.audioLink,type:"audio/wav"})})),f&&(0,t.jsx)("span",Object.assign({className:"rcw-timestamp"},{children:(0,a.default)(n.timestamp,"HH:mm")})),w(n.sender)&&(0,t.jsxs)("span",Object.assign({className:"rcw-checks",style:{textAlign:"right"}},{children:[n.delivered?(0,t.jsx)("img",{src:m,className:"rcw-message-delivered-icon",alt:"delivered",title:"delivered"}):(0,t.jsx)("img",{src:y,className:"rcw-message-delivered-icon",alt:"undelivered",title:"undelivered"}),n.unread?(0,t.jsx)("img",{style:{marginLeft:"3px"},src:y,className:"rcw-message-delivered-icon",alt:"unread",title:"unread"}):(0,t.jsx)("img",{style:{marginLeft:"3px"},src:m,className:"rcw-message-delivered-icon",alt:"read",title:"read"})]}))]}))}},2361:function(e,n,f){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var t=f(7557),a=i(f(6599));f(3723),n.default=function(e){var n=e.message,f=e.showTimeStamp;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",Object.assign({className:"rcw-snippet"},{children:[(0,t.jsx)("h5",Object.assign({className:"rcw-snippet-title"},{children:n.title})),(0,t.jsx)("div",Object.assign({className:"rcw-snippet-details"},{children:(0,t.jsx)("a",Object.assign({href:n.link,target:n.target,className:"rcw-link"},{children:n.link}))}))]})),f&&(0,t.jsx)("span",Object.assign({className:"rcw-timestamp"},{children:(0,a.default)(n.timestamp,"HH:mm")}))]})}},632:function(e,n,f){"use strict";function i(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var f=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=f){var i,t,a,r,o=[],s=!0,d=!1;try{if(a=(f=f.call(e)).next,0===n){if(Object(f)!==f)return;s=!1}else for(;!(s=(i=a.call(f)).done)&&(o.push(i.value),o.length!==n);s=!0);}catch(e){d=!0,t=e}finally{try{if(!s&&null!=f.return&&(r=f.return(),Object(r)!==r))return}finally{if(d)throw t}}return o}}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var f=Object.prototype.toString.call(e).slice(8,-1);"Object"===f&&e.constructor&&(f=e.constructor.name);if("Map"===f||"Set"===f)return Array.from(e);if("Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return t(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,n){(null==n||n>e.length)&&(n=e.length);for(var f=0,i=new Array(n);f0&&j(k[0]),F.current&&I(F.current.scrollHeight),N(k.length)}),[k,_,z,m]);var Y=function(e){var n=e.component;return"component"===e.type?(0,r.jsx)(n,Object.assign({},e.props,{set:v,onImageClick:p,onRemoveMessage:b})):(0,r.jsx)(n,{message:e,showTimeStamp:a,set:v,onImageClick:p,onRemoveMessage:b})},G=function(e){return e===u.MESSAGE_SENDER.CLIENT},R=function(){return k?m?k.filter((function(e){return e.chatId===m})):k:[]},P=i((0,o.useState)(null),2),H=P[0],U=P[1];return(0,o.useEffect)((function(){!0}),[R()]),(0,r.jsxs)("div",Object.assign({id:"messages-"+m,className:(0,g.default)("rcw-messages-container"),ref:F,onScroll:function(e){null!==H?0===e.target.scrollTop&&(L&&k[0]&&y(k[0],L)||(h(),Q(k[0])),U(R())):U([])}},{children:[R().map((function(e,n){var i;return(0,r.jsxs)("div",Object.assign({className:(0,g.default)("rcw-message","".concat(G(e.sender)?"rcw-message-client":""),e.isSystemMessage&&"rcw-message-system")},{children:[(f&&!G(e.sender)||t&&G(e.sender))&&e.showAvatar&&(i=G(e.sender)?t:f,void 0===i?null:"string"==typeof i?(0,r.jsx)("img",{src:i,className:"rcw-avatar ".concat(G(e.sender)?"rcw-avatar-client":""),alt:"profile"}):i),Y(e)]}),"".concat(n,"-").concat((0,d.default)(e.timestamp,"HH:mm")))})),(0,r.jsx)(l.default,{typing:A})]}))}))},1569:(e,n,f)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=f(7557);f(7450),n.default=function(e){var n=e.button,f=e.onQuickButtonClicked;return(0,i.jsx)("button",Object.assign({className:"quick-button",onClick:function(e){return f(e,n.value)}},{children:n.label}))}},5113:function(e,n,f){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var t=f(7557),a=f(1353),r=i(f(4403));f(5057),n.default=function(e){var n=e.onQuickButtonClicked,f=(0,a.useSelector)((function(e){return e.quickButtons.quickButtons})),i=function(e){var f=e.component;return(0,t.jsx)(f,{onQuickButtonClicked:n,button:e})};return f.length?(0,t.jsx)("div",Object.assign({className:(0,r.default)("quick-buttons-container")},{children:(0,t.jsx)("ul",Object.assign({className:"quick-buttons"},{children:f.map((function(e,n){return(0,t.jsx)("li",Object.assign({className:"quick-list-button"},{children:i(e)}),"".concat(e.label,"-").concat(n))}))}))})):null}},7832:function(e,n,f){"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function t(){t=function(){return e};var e={},n=Object.prototype,f=n.hasOwnProperty,a=Object.defineProperty||function(e,n,f){e[n]=f.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",d=r.toStringTag||"@@toStringTag";function c(e,n,f){return Object.defineProperty(e,n,{value:f,enumerable:!0,configurable:!0,writable:!0}),e[n]}try{c({},"")}catch(e){c=function(e,n,f){return e[n]=f}}function u(e,n,f,i){var t=n&&n.prototype instanceof y?n:y,r=Object.create(t.prototype),o=new I(i||[]);return a(r,"_invoke",{value:x(e,f,o)}),r}function l(e,n,f){try{return{type:"normal",arg:e.call(n,f)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var g={};function y(){}function m(){}function h(){}var v={};c(v,o,(function(){return this}));var p=Object.getPrototypeOf,b=p&&p(p(E([])));b&&b!==n&&f.call(b,o)&&(v=b);var w=h.prototype=y.prototype=Object.create(v);function k(e){["next","throw","return"].forEach((function(n){c(e,n,(function(e){return this._invoke(n,e)}))}))}function A(e,n){function t(a,r,o,s){var d=l(e[a],e,r);if("throw"!==d.type){var c=d.arg,u=c.value;return u&&"object"==i(u)&&f.call(u,"__await")?n.resolve(u.__await).then((function(e){t("next",e,o,s)}),(function(e){t("throw",e,o,s)})):n.resolve(u).then((function(e){c.value=e,o(c)}),(function(e){return t("throw",e,o,s)}))}s(d.arg)}var r;a(this,"_invoke",{value:function(e,f){function i(){return new n((function(n,i){t(e,f,n,i)}))}return r=r?r.then(i,i):i()}})}function x(e,n,f){var i="suspendedStart";return function(t,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===t)throw a;return D()}for(f.method=t,f.arg=a;;){var r=f.delegate;if(r){var o=_(r,f);if(o){if(o===g)continue;return o}}if("next"===f.method)f.sent=f._sent=f.arg;else if("throw"===f.method){if("suspendedStart"===i)throw i="completed",f.arg;f.dispatchException(f.arg)}else"return"===f.method&&f.abrupt("return",f.arg);i="executing";var s=l(e,n,f);if("normal"===s.type){if(i=f.done?"completed":"suspendedYield",s.arg===g)continue;return{value:s.arg,done:f.done}}"throw"===s.type&&(i="completed",f.method="throw",f.arg=s.arg)}}}function _(e,n){var f=n.method,i=e.iterator[f];if(void 0===i)return n.delegate=null,"throw"===f&&e.iterator.return&&(n.method="return",n.arg=void 0,_(e,n),"throw"===n.method)||"return"!==f&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+f+"' method")),g;var t=l(i,e.iterator,n.arg);if("throw"===t.type)return n.method="throw",n.arg=t.arg,n.delegate=null,g;var a=t.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function M(e){var n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),this.tryEntries.push(n)}function C(e){var n=e.completion||{};n.type="normal",delete n.arg,e.completion=n}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function E(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,t=function n(){for(;++i=0;--t){var a=this.tryEntries[t],r=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var o=f.call(a,"catchLoc"),s=f.call(a,"finallyLoc");if(o&&s){if(this.prev=0;--i){var t=this.tryEntries[i];if(t.tryLoc<=this.prev&&f.call(t,"finallyLoc")&&this.prev=0;--n){var f=this.tryEntries[n];if(f.finallyLoc===e)return this.complete(f.completion,f.afterLoc),C(f),g}},catch:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var f=this.tryEntries[n];if(f.tryLoc===e){var i=f.completion;if("throw"===i.type){var t=i.arg;C(f)}return t}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,f){return this.delegate={iterator:E(e),resultName:n,nextLoc:f},"next"===this.method&&(this.arg=void 0),g}},e}function a(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var f=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=f){var i,t,a,r,o=[],s=!0,d=!1;try{if(a=(f=f.call(e)).next,0===n){if(Object(f)!==f)return;s=!1}else for(;!(s=(i=a.call(f)).done)&&(o.push(i.value),o.length!==n);s=!0);}catch(e){d=!0,t=e}finally{try{if(!s&&null!=f.return&&(r=f.return(),Object(r)!==r))return}finally{if(d)throw t}}return o}}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return r(e,n);var f=Object.prototype.toString.call(e).slice(8,-1);"Object"===f&&e.constructor&&(f=e.constructor.name);if("Map"===f||"Set"===f)return Array.from(e);if("Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return r(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,n){(null==n||n>e.length)&&(n=e.length);for(var f=0,i=new Array(n);f/g;f(824),n.default=(0,c.forwardRef)((function(e,n){var f=this,i=e.sendMessage,r=e.uploadAudioUrl,s=e.uploadImageUrl,k=e.showChat,A=e.placeholder,x=e.disabledInput,_=e.autofocus,M=e.onTextInputChange,C=e.buttonAlt,I=e.onPressEmoji,E=e.onChangeSize,D=e.onEscapePressed,j=e.onFocus,B=e.set,S=e.disableSendSubmit,N=e.className,T=e.micAllowed,L=e.sendAudio,Q=e.sendImage,z=e.sendIcon,O=e.smileIcon,F=e.defaultValue,Y=e.isShowEmoji,G=e.isShowFileUploader,R=e.onKeyUp,P=e.rcwInputClassName,H=e.allowEmoji,U=void 0===H||H;if("undefined"==typeof window)return null;var q=(0,c.useRef)(null),J=(0,c.useRef)(null),W=(0,c.useRef)(null),Z=a((0,c.useState)(!1),2),K=Z[0],V=Z[1],X=a((0,c.useState)(!1),2),$=X[0],ee=X[1],ne=a((0,c.useState)(0),2),fe=ne[0],ie=ne[1],te=a((0,c.useState)(!1),2),ae=te[0],re=te[1];(0,c.useEffect)((function(){var e;k&&_&&(null===(e=q.current)||void 0===e||e.focus())}),[k]),(0,c.useEffect)((function(){ee((0,y.isFirefox)()),void 0!==F&&ge(F)}),[]);var oe=function(){var e;null===(e=q.current)||void 0===e||e.click(),null==j||j(),se(q.current)};(0,c.useImperativeHandle)(n,(function(){return{onSelectEmoji:ye,setHtml:me,getHtml:le,sendMessage:ue,focus:oe,getInputRef:function(){return q}}}));var se=function(e){if(e.focus(),void 0!==window.getSelection&&void 0!==document.createRange){var n=document.createRange();n.selectNodeContents(e),n.collapse(!1);var f=window.getSelection();f&&(f.removeAllRanges(),f.addRange(n))}else if(void 0!==document.body.createTextRange){var i=document.body.createTextRange();i.moveToElementText(e),i.collapse(!1),i.select()}},de=function(e){if(!r)throw new Error("uploadAudioUrl is not set");return fetch(r,{method:"POST",body:e}).then((function(e){if(e.ok)return e;throw Error("Server returned ".concat(e.status,": ").concat(e.statusText))})).then((function(e){return o(f,void 0,void 0,t().mark((function n(){var f;return t().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return re(!1),n.next=3,e.text();case 3:f=n.sent,null==L||L(f);case 5:case"end":return n.stop()}}),n)})))})).catch((function(e){re(!1),alert(e)}))},ce=function(e){if(!s)throw new Error("uploadImageUrl is not set");return fetch(s,{method:"POST",body:JSON.stringify({content:e})}).then((function(e){if(e.ok)return e;throw Error("Server returned ".concat(e.status,": ").concat(e.statusText))})).then((function(e){return o(f,void 0,void 0,t().mark((function n(){var f;return t().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.text();case 2:f=n.sent,null==Q||Q(f);case 4:case"end":return n.stop()}}),n)})))})).catch((function(e){alert(e)}))},ue=function(){var e,n,f,t;if(we){if("recording"===(null===(e=W.current)||void 0===e?void 0:e.getStatus())||"paused"===(null===(n=W.current)||void 0===n?void 0:n.getStatus()))return void(null===(f=W.current)||void 0===f||f.stopRecording().then((function(e){re(!0),de(e).then((function(){ke(!1)}))})));var a=null===(t=W.current)||void 0===t?void 0:t.getAudioResult();if(!a)return;return re(!0),void de(a).then((function(){ke(!1)}))}var r=q.current;r.innerHTML&&(i((0,g.emojiBackwardConvert)(r.innerHTML)),r.innerHTML="")},le=function(){return q.current.innerHTML},ge=function(e){q.current.innerHTML=(0,g.emojiConvert)(e,B)},ye=function(e){var n=q.current,f=(0,y.getCaretIndex)(n);if(n.innerHTML){var i=n.innerHTML.substring(0,f),t=n.innerHTML.substring(f),a=le().length,r=e.shortcodes;ge(i+r+t);var o=le().length-a;(0,y.updateCaret)(n,f,o)}else ge(e.shortcodes),(0,y.updateCaret)(n,1,0);return n.innerHTML},me=function(e){ge(e)},he=function(){var e=J.current;if(e&&fe!==e.clientHeight){var n=e.clientHeight;ie(n),E(n?n-1:0)}},ve=function(e){return"0&&void 0!==arguments[0]?arguments[0]:[];e.forEach((function(e){return ce(e.source)}))}}),T&&!we&&(0,d.jsx)("button",Object.assign({className:"rcw-mic",onClick:function(){return ke(!we)}},{children:(0,d.jsx)("img",{src:v,alt:"",className:"rcw-mic-icon"})})),!S&&(0,d.jsx)("button",Object.assign({type:"submit",className:"rcw-send",onClick:ue,disabled:ae},{children:z||(0,d.jsx)("img",{src:h,className:"rcw-send-icon",alt:C})}))]}))}))},7485:function(e,n,f){"use strict";function i(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var f=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=f){var i,t,a,r,o=[],s=!0,d=!1;try{if(a=(f=f.call(e)).next,0===n){if(Object(f)!==f)return;s=!1}else for(;!(s=(i=a.call(f)).done)&&(o.push(i.value),o.length!==n);s=!0);}catch(e){d=!0,t=e}finally{try{if(!s&&null!=f.return&&(r=f.return(),Object(r)!==r))return}finally{if(d)throw t}}return o}}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var f=Object.prototype.toString.call(e).slice(8,-1);"Object"===f&&e.constructor&&(f=e.constructor.name);if("Map"===f||"Set"===f)return Array.from(e);if("Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return t(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,n){(null==n||n>e.length)&&(n=e.length);for(var f=0,i=new Array(n);f{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=f(9787);n.default=function(){var e=(0,i.useRef)(null);return(0,i.useEffect)((function(){var n,f,i,t=document.querySelector("#rcw-image-preview"),a=t||(n="#rcw-image-preview",(f=document.createElement("div")).setAttribute("id",n),f);return t||(i=a,document.body.appendChild(i)),e.current&&a.appendChild(e.current),function(){e.current&&e.current.remove(),-1===a.childNodes.length&&a.remove()}}),[]),e.current||(e.current=document.createElement("div")),e.current}},3507:(e,n,f)=>{"use strict";function i(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var f=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=f){var i,t,a,r,o=[],s=!0,d=!1;try{if(a=(f=f.call(e)).next,0===n){if(Object(f)!==f)return;s=!1}else for(;!(s=(i=a.call(f)).done)&&(o.push(i.value),o.length!==n);s=!0);}catch(e){d=!0,t=e}finally{try{if(!s&&null!=f.return&&(r=f.return(),Object(r)!==r))return}finally{if(d)throw t}}return o}}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var f=Object.prototype.toString.call(e).slice(8,-1);"Object"===f&&e.constructor&&(f=e.constructor.name);if("Map"===f||"Set"===f)return Array.from(e);if("Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return t(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,n){(null==n||n>e.length)&&(n=e.length);for(var f=0,i=new Array(n);ff.height/3:l.layout.width>f.width/3)&&g({type:"zoomOut",layout:m(-e)})},onResizePageZoom:function(){l.zoom&&y(s.width,s.height)}}}},5276:(e,n,f)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=f(7557);f(1109),n.default=function(e){var n=e.badge;return n>0?(0,i.jsx)("span",Object.assign({className:"rcw-badge"},{children:n})):null}},13:function(e,n,f){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var t=f(7557),a=f(1353),r=i(f(4403)),o=i(f(5276)),s=f(7206);f(3298);var d=f(8290),c=f(4556);n.default=function(e){var n=e.toggle,f=e.chatId,i=e.openImg,u=e.closeImg,l=e.openLabel,g=e.closeLabel,y=e.showBadge,m=(0,a.useDispatch)(),h=(0,a.useSelector)((function(e){return{showChat:e.behavior.showChat,minimalizedChat:e.behavior.minimalizedChat,badgeCount:e.messages.badgeCount}})),v=h.showChat,p=h.badgeCount;return(0,t.jsxs)("button",Object.assign({type:"button",className:(0,r.default)("rcw-launcher",{"rcw-hide-sm":v}),onClick:function(){n(),v||m((0,s.setBadgeCount)(0))},"aria-controls":f},{children:[!v&&y&&(0,t.jsx)(o.default,{badge:p}),v?(0,t.jsx)("img",{src:u||c,className:"rcw-close-launcher",alt:l}):(0,t.jsx)("img",{src:i||d,className:"rcw-open-launcher",alt:g})]}))}},4458:function(e,n,f){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var t=f(7557),a=f(9787),r=f(1353),o=f(7206),s=f(9064),d=i(f(5037)),c=f(3427),u=f(307);n.default=function(e){var n=e.title,f=e.titleAvatar,i=e.subtitle,l=e.senderPlaceHolder,g=e.profileAvatar,y=e.profileClientAvatar,m=e.showCloseButton,h=e.showMinimalizeButton,v=e.fullScreenMode,p=e.autofocus,b=e.customLauncher,w=e.handleNewUserMessage,k=e.handleNewUserAudio,A=e.handleNewUserImage,x=e.handleQuickButtonClicked,_=e.handleTextInputChange,M=e.chatId,C=e.handleToggle,I=e.launcherOpenLabel,E=e.launcherCloseLabel,D=e.launcherCloseImg,j=e.launcherOpenImg,B=e.sendButtonAlt,S=e.showTimeStamp,N=e.imagePreview,T=e.zoomStep,L=e.handleSubmit,Q=e.handleSubmitAudio,z=e.showBadge,O=e.resizable,F=e.emojis,Y=e.emojiSet,G=e.maxOpenWidgets,R=e.handleScrollTop,P=e.onFocus,H=e.micAllowed,U=e.uploadAudioUrl,q=e.uploadImageUrl,J=e.headerBeginElement,W=e.smileIcon,Z=e.sendIcon,K=e.onImageClick,V=e.isShowFileUploader,X=void 0===V||V,$=e.isShowEmoji,ee=void 0!==$&&$,ne=e.allowEmoji,fe=e.onRemoveMessage,ie=(0,r.useDispatch)();return(0,a.useEffect)((function(){(0,s.setMaxOpenWidgets)(G)}),[G]),(0,t.jsx)(d.default,{allowEmoji:ne,onToggleConversation:function(){ie((0,o.toggleChat)(M)),C&&C((0,s.isWidgetOpened)(M))},onSendMessage:function(e){if(e.trim()){null==L||L(e);var n=(0,c.md5)(e+(new Date).getTime()),f=(0,u.emojiBackwardConvert)(e);ie((0,o.addUserMessage)(f,n,void 0,M)),w(f,n)}},onSendAudio:function(e){if(e){null==Q||Q(e);var n=(0,c.md5)(e+(new Date).getTime()),f=JSON.parse(e);ie((0,o.addUserAudioMessage)(f.url,n,void 0,M)),null==k||k(f,n)}},onSendImage:function(e){if(e){var n=(0,c.md5)(e+(new Date).getTime()),f=JSON.parse(e);ie((0,o.addUserImageMessage)(f.url,n,void 0,M)),null==A||A(f,n)}},onQuickButtonClicked:function(e,n){e.preventDefault(),null==x||x(n)},title:n,titleAvatar:f,subtitle:i,senderPlaceHolder:l,profileAvatar:g,profileClientAvatar:y,showCloseButton:m,showMinimalizeButton:h,fullScreenMode:v,autofocus:p,customLauncher:b,onTextInputChange:_,chatId:M,launcherOpenLabel:I,launcherCloseLabel:E,launcherCloseImg:D,launcherOpenImg:j,sendButtonAlt:B,showTimeStamp:S,imagePreview:N,zoomStep:T,showBadge:z,resizable:O,emojis:F,emojiSet:Y,onScrollTop:function(){null==R||R()},onFocus:P,micAllowed:H,uploadAudioUrl:U,uploadImageUrl:q,headerBeginElement:J,smileIcon:W,sendIcon:Z,isShowFileUploader:X,isShowEmoji:ee,onImageClick:K,onRemoveMessage:fe})}},5037:function(e,n,f){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var t=f(7557),a=f(9787),r=f(1353),o=i(f(4403)),s=f(7206),d=i(f(7485)),c=i(f(13)),u=i(f(5379));f(8021),n.default=function(e){var n=e.allowEmoji,f=e.title,i=e.titleAvatar,l=e.subtitle,g=e.onSendMessage,y=e.onSendAudio,m=e.onSendImage,h=e.onToggleConversation,v=e.senderPlaceHolder,p=e.onQuickButtonClicked,b=e.profileAvatar,w=e.profileClientAvatar,k=e.showCloseButton,A=e.showMinimalizeButton,x=e.fullScreenMode,_=e.autofocus,M=e.customLauncher,C=e.onTextInputChange,I=e.chatId,E=e.launcherOpenLabel,D=e.launcherCloseLabel,j=e.launcherCloseImg,B=e.launcherOpenImg,S=e.sendButtonAlt,N=e.showTimeStamp,T=e.imagePreview,L=e.zoomStep,Q=e.showBadge,z=e.resizable,O=e.emojis,F=e.emojiSet,Y=e.onScrollTop,G=e.onFocus,R=e.micAllowed,P=e.uploadAudioUrl,H=e.uploadImageUrl,U=e.headerBeginElement,q=e.smileIcon,J=e.sendIcon,W=e.isShowFileUploader,Z=e.isShowEmoji,K=e.onImageClick,V=e.onRemoveMessage,X=(0,r.useDispatch)(),$=(0,r.useSelector)((function(e){return{showChat:e.behavior.showChat,dissableInput:e.behavior.disabledInput,visible:e.preview.visible}})),ee=$.dissableInput,ne=$.showChat,fe=$.visible,ie=ne.includes(I),te=(0,a.useRef)(null);(0,a.useEffect)((function(){return ie&&(te.current=document.getElementById("messages-"+I)),function(){te.current=null}}),[ie]);var ae=function(e){if(e.target&&"rcw-message-img"===e.target.className){var n=e.target,f={src:n.src,alt:n.alt,width:n.naturalWidth,height:n.naturalHeight};X((0,s.openFullscreenPreview)(f))}};(0,a.useEffect)((function(){var e=null==te?void 0:te.current;return T&&ie&&(null==e||e.addEventListener("click",ae,!1)),function(){null==e||e.removeEventListener("click",ae)}}),[T,ie]),(0,a.useEffect)((function(){document.body.setAttribute("style","overflow: ".concat(fe||x?"hidden":"auto"))}),[x,fe]);var re=ie?ne.indexOf(I):void 0;return(0,t.jsxs)("div",Object.assign({className:(0,o.default)("rcw-widget-container",{"rcw-full-screen":x,"rcw-previewer":T,"rcw-close-widget-container ":!ie})},{children:[ie&&(0,t.jsx)(d.default,{allowEmoji:n,chatId:I,title:f,subtitle:l,sendMessage:g,sendAudio:y,sendImage:m,senderPlaceHolder:v,profileAvatar:b,profileClientAvatar:w,toggleChat:h,showCloseButton:k,showMinimalizeButton:A,disabledInput:ee,autofocus:_,titleAvatar:i,className:ie?"active open-chat-".concat(re):"hidden",onQuickButtonClicked:p,onTextInputChange:C,sendButtonAlt:S,showTimeStamp:N,resizable:z,emojis:O,emojiSet:F,onScrollTop:Y,onFocus:G,micAllowed:R,uploadAudioUrl:P,uploadImageUrl:H,headerBeginElement:U,smileIcon:q,sendIcon:J,isShowFileUploader:W,isShowEmoji:Z,onImageClick:K,onRemoveMessage:V}),null!==M&&(M?M(h):!x&&(0,t.jsx)(c.default,{toggle:h,chatId:I,openLabel:E,closeLabel:D,closeImg:j,openImg:B,showBadge:Q})),T&&(0,t.jsx)(u.default,{fullScreenMode:x,zoomStep:L})]}))}},1754:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MESSAGE_BOX_SCROLL_DURATION=n.MESSAGES_TYPES=n.MESSAGE_SENDER=void 0,n.MESSAGE_SENDER={CLIENT:"client",RESPONSE:"response"},n.MESSAGES_TYPES={TEXT:"text",SNIPPET:{LINK:"snippet"},CUSTOM_COMPONENT:"component"},n.MESSAGE_BOX_SCROLL_DURATION=400},1718:(e,n,f)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Icons=void 0;var i=f(7557);n.Icons={Clear:function(){return(0,i.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",x:"0px",y:"0px",width:"512px",height:"512px",viewBox:"0 0 357 357"},{children:(0,i.jsx)("g",{children:(0,i.jsx)("g",Object.assign({id:"clear"},{children:(0,i.jsx)("polygon",{points:"357,35.7 321.3,0 178.5,142.8 35.7,0 0,35.7 142.8,178.5 0,321.3 35.7,357 178.5,214.2 321.3,357 357,321.3 214.2,178.5 ",fill:"#FFFFFF"})}))})}))},Minimalize:function(){return(0,i.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},{children:(0,i.jsx)("path",{fill:"#FFFFFF",d:"M480 480H32c-17.7 0-32-14.3-32-32s14.3-32 32-32h448c17.7 0 32 14.3 32 32s-14.3 32-32 32z"})}))},Maximalize:function(){return(0,i.jsx)("svg",Object.assign({id:"a",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},{children:(0,i.jsx)("path",{fill:"#FFFFFF",d:"M22,2V11.82h-2.91V6.84L6.56,19.14h5.44v2.86H2V12.18h2.91v4.63L17.07,4.86h-5.07V2h10Z"})}))},Smile:function(){return(0,i.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},{children:(0,i.jsx)("path",{d:"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.507 13.941c-1.512 1.195-3.174 1.931-5.506 1.931-2.334 0-3.996-.736-5.508-1.931l-.493.493c1.127 1.72 3.2 3.566 6.001 3.566 2.8 0 4.872-1.846 5.999-3.566l-.493-.493zm-9.007-5.941c-.828 0-1.5.671-1.5 1.5s.672 1.5 1.5 1.5 1.5-.671 1.5-1.5-.672-1.5-1.5-1.5zm7 0c-.828 0-1.5.671-1.5 1.5s.672 1.5 1.5 1.5 1.5-.671 1.5-1.5-.672-1.5-1.5-1.5z"})}))}}},370:function(e,n,f){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var t=f(7557),a=f(1353),r=i(f(4458)),o=i(f(4534));function s(e){var n=e.title,f=e.titleAvatar,i=e.subtitle,s=e.senderPlaceHolder,d=e.showCloseButton,c=e.showMinimalizeButton,u=e.fullScreenMode,l=e.autofocus,g=e.profileAvatar,y=e.profileClientAvatar,m=e.launcher,h=e.handleNewUserMessage,v=e.handleNewUserAudio,p=e.handleNewUserImage,b=e.handleQuickButtonClicked,w=e.handleTextInputChange,k=e.chatId,A=e.handleToggle,x=e.launcherOpenLabel,_=e.launcherCloseLabel,M=e.launcherCloseImg,C=e.launcherOpenImg,I=e.sendButtonAlt,E=e.showTimeStamp,D=e.imagePreview,j=e.zoomStep,B=e.handleSubmit,S=e.showBadge,N=e.resizable,T=e.emojis,L=e.emojiSet,Q=e.maxOpenWidgets,z=e.handleScrollTop,O=e.handleOnFocus,F=e.micAllowed,Y=e.uploadAudioUrl,G=e.uploadImageUrl,R=e.headerBeginElement,P=e.sendIcon,H=e.smileIcon,U=e.onImageClick,q=e.onRemoveMessage,J=e.allowEmoji,W="undefined"==typeof window;return W?null:(0,t.jsx)(a.Provider,Object.assign({store:o.default},{children:(0,t.jsx)(t.Fragment,{children:!W&&(0,t.jsx)(r.default,{allowEmoji:J,title:n,titleAvatar:f,subtitle:i,handleNewUserMessage:h,handleNewUserAudio:v,handleNewUserImage:p,handleQuickButtonClicked:b,senderPlaceHolder:s,profileAvatar:g,profileClientAvatar:y,showCloseButton:d,showMinimalizeButton:c,fullScreenMode:u,autofocus:l,customLauncher:m,handleTextInputChange:w,chatId:k,handleToggle:A,launcherOpenLabel:x,launcherCloseLabel:_,launcherCloseImg:M,launcherOpenImg:C,sendButtonAlt:I,showTimeStamp:E,imagePreview:D,zoomStep:j,handleSubmit:B,showBadge:S,resizable:N,emojis:T,emojiSet:L,maxOpenWidgets:Q,handleScrollTop:z,onFocus:O,micAllowed:F,uploadAudioUrl:Y,uploadImageUrl:G,headerBeginElement:R,sendIcon:P,smileIcon:H,onImageClick:U,onRemoveMessage:q})})}))}s.defaultProps={title:"Welcome",subtitle:"This is your chat subtitle",senderPlaceHolder:"Type a message...",showCloseButton:!0,fullScreenMode:!1,autofocus:!0,chatId:"rcw-chat-container",launcherOpenLabel:"Open chat",launcherCloseLabel:"Close chat",launcherOpenImg:"",launcherCloseImg:"",sendButtonAlt:"Send",showTimeStamp:!0,imagePreview:!1,zoomStep:80,showBadge:!0},n.default=s},7206:function(e,n,f){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,n,f,i){void 0===i&&(i=f);var t=Object.getOwnPropertyDescriptor(n,f);t&&!("get"in t?!n.__esModule:t.writable||t.configurable)||(t={enumerable:!0,get:function(){return n[f]}}),Object.defineProperty(e,i,t)}:function(e,n,f,i){void 0===i&&(i=f),e[i]=n[f]}),t=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var f in e)"default"!==f&&Object.prototype.hasOwnProperty.call(e,f)&&i(n,e,f);return t(n,e),n};Object.defineProperty(n,"__esModule",{value:!0}),n.closeFullscreenPreview=n.openFullscreenPreview=n.markAsDelivered=n.markAsRead=n.markAllMessagesRead=n.setBadgeCount=n.clearChat=n.deleteMessages=n.setQuickButtons=n.hideAvatar=n.dropMessages=n.renderCustomComponent=n.addLinkSnippet=n.toggleMsgLoader=n.addResponseImageMessage=n.addResponseAudioMessage=n.addSystemResponseMessage=n.addResponseMessage=n.addUserImageMessage=n.addUserAudioMessage=n.addUserMessage=n.toggleInputDisabled=n.setMaxOpenChats=n.minimalizeChat=n.toggleChat=void 0;var r=a(f(7422));n.toggleChat=function(e){return{type:r.TOGGLE_CHAT,chatId:e}},n.minimalizeChat=function(e,n){return{type:r.MINIMALIZE_CHAT,chatId:n,value:e}},n.setMaxOpenChats=function(e){return{type:r.SET_MAX_OPEN_CHATS,maxOpenedChats:e}},n.toggleInputDisabled=function(){return{type:r.TOGGLE_INPUT_DISABLED}},n.addUserMessage=function(e,n,f,i,t,a){return{type:r.ADD_NEW_USER_MESSAGE,text:e,id:n,date:f,chatId:i,options:t,post:a}},n.addUserAudioMessage=function(e,n,f,i,t){return{type:r.ADD_NEW_USER_MESSAGE,text:"",id:n,date:f,chatId:i,audioLink:e,options:t}},n.addUserImageMessage=function(e,n,f,i,t){return{type:r.ADD_NEW_USER_MESSAGE,text:"",id:n,date:f,chatId:i,imageLink:e,options:t}},n.addResponseMessage=function(e,n,f,i,t,a){return{type:r.ADD_NEW_RESPONSE_MESSAGE,text:e,id:n,date:f,chatId:i,options:t,post:a}},n.addSystemResponseMessage=function(e,n,f,i,t,a){return{type:r.ADD_NEW_SYSTEM_RESPONSE_MESSAGE,text:e,id:n,date:f,chatId:i,options:t,post:a}},n.addResponseAudioMessage=function(e,n,f,i,t){return{type:r.ADD_NEW_RESPONSE_MESSAGE,text:"",audioLink:e,id:n,date:f,chatId:i,options:t}},n.addResponseImageMessage=function(e,n,f,i,t){return{type:r.ADD_NEW_RESPONSE_MESSAGE,text:"",imageLink:e,id:n,date:f,chatId:i,options:t}},n.toggleMsgLoader=function(){return{type:r.TOGGLE_MESSAGE_LOADER}},n.addLinkSnippet=function(e,n){return{type:r.ADD_NEW_LINK_SNIPPET,link:e,id:n}},n.renderCustomComponent=function(e,n,f,i){return{type:r.ADD_COMPONENT_MESSAGE,component:e,props:n,showAvatar:f,id:i}},n.dropMessages=function(e){return{type:r.DROP_MESSAGES,chatId:e}},n.hideAvatar=function(e){return{type:r.HIDE_AVATAR,index:e}},n.setQuickButtons=function(e){return{type:r.SET_QUICK_BUTTONS,buttons:e}},n.deleteMessages=function(e,n){return{type:r.DELETE_MESSAGES,count:e,id:n}},n.clearChat=function(e){return{type:r.CLEAR_CHAT,chatId:e}},n.setBadgeCount=function(e){return{type:r.SET_BADGE_COUNT,count:e}},n.markAllMessagesRead=function(e){return{type:r.MARK_ALL_READ,chatId:e}},n.markAsRead=function(e){return{type:r.MARK_READ,id:e}},n.markAsDelivered=function(e,n){return{type:r.MARK_DELIVERED,id:e,newId:n}},n.openFullscreenPreview=function(e){return{type:r.OPEN_FULLSCREEN_PREVIEW,payload:e}},n.closeFullscreenPreview=function(){return{type:r.CLOSE_FULLSCREEN_PREVIEW}}},7422:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CLOSE_FULLSCREEN_PREVIEW=n.OPEN_FULLSCREEN_PREVIEW=n.SET_QUICK_BUTTONS=n.MARK_READ=n.MARK_DELIVERED=n.MARK_ALL_READ=n.CLEAR_CHAT=n.DELETE_MESSAGES=n.HIDE_AVATAR=n.DROP_MESSAGES=n.ADD_COMPONENT_MESSAGE=n.ADD_NEW_LINK_SNIPPET=n.GET_LAST_RESPONSE_MESSAGE=n.ADD_NEW_SYSTEM_RESPONSE_MESSAGE=n.ADD_NEW_RESPONSE_MESSAGE=n.ADD_NEW_USER_MESSAGE=n.SET_BADGE_COUNT=n.TOGGLE_MESSAGE_LOADER=n.SET_MAX_OPEN_CHATS=n.TOGGLE_INPUT_DISABLED=n.MINIMALIZE_CHAT=n.TOGGLE_CHAT=void 0,n.TOGGLE_CHAT="BEHAVIOR/TOGGLE_CHAT",n.MINIMALIZE_CHAT="BEHAVIOR/MINIMALIZE_CHAT",n.TOGGLE_INPUT_DISABLED="BEHAVIOR/TOGGLE_INPUT_DISABLED",n.SET_MAX_OPEN_CHATS="BEHAVIOR/SET_MAX_OPEN_CHATS",n.TOGGLE_MESSAGE_LOADER="BEHAVIOR/TOGGLE_MSG_LOADER",n.SET_BADGE_COUNT="BEHAVIOR/SET_BADGE_COUNT",n.ADD_NEW_USER_MESSAGE="MESSAGES/ADD_NEW_USER_MESSAGE",n.ADD_NEW_RESPONSE_MESSAGE="MESSAGES/ADD_NEW_RESPONSE_MESSAGE",n.ADD_NEW_SYSTEM_RESPONSE_MESSAGE="MESSAGES/ADD_NEW_SYSTEM_RESPONSE_MESSAGE",n.GET_LAST_RESPONSE_MESSAGE="MESSAGES/GET_LAST_RESPONSE_MESSAGE",n.ADD_NEW_LINK_SNIPPET="MESSAGES/ADD_NEW_LINK_SNIPPET",n.ADD_COMPONENT_MESSAGE="MESSAGES/ADD_COMPONENT_MESSAGE",n.DROP_MESSAGES="MESSAGES/DROP_MESSAGES",n.HIDE_AVATAR="MESSAGES/HIDE_AVATAR",n.DELETE_MESSAGES="MESSAGES/DELETE_MESSAGES",n.CLEAR_CHAT="MESSAGES/CLEAR_CHAT",n.MARK_ALL_READ="MESSAGES/MARK_ALL_READ",n.MARK_DELIVERED="MESSAGES/MARK_DELIVERED",n.MARK_READ="MESSAGES/MARK_READ",n.SET_QUICK_BUTTONS="SET_QUICK_BUTTONS",n.OPEN_FULLSCREEN_PREVIEW="FULLSCREEN/OPEN_PREVIEW",n.CLOSE_FULLSCREEN_PREVIEW="FULLSCREEN/CLOSE_PREVIEW"},9064:function(e,n,f){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,n,f,i){void 0===i&&(i=f);var t=Object.getOwnPropertyDescriptor(n,f);t&&!("get"in t?!n.__esModule:t.writable||t.configurable)||(t={enumerable:!0,get:function(){return n[f]}}),Object.defineProperty(e,i,t)}:function(e,n,f,i){void 0===i&&(i=f),e[i]=n[f]}),t=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var f in e)"default"!==f&&Object.prototype.hasOwnProperty.call(e,f)&&i(n,e,f);return t(n,e),n},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.closeFullscreenPreview=n.openFullscreenPreview=n.setBadgeCount=n.markAsDelivered=n.markAsRead=n.markAllAsRead=n.clearChat=n.deleteMessages=n.setQuickButtons=n.getMessages=n.getOldestMessage=n.getLastResponseMessage=n.isWidgetMinimalized=n.isWidgetOpened=n.dropMessages=n.toggleInputDisabled=n.setMaxOpenWidgets=n.minimalizeChat=n.toggleWidget=n.renderCustomComponent=n.toggleMsgLoader=n.addLinkSnippet=n.addResponseImageMessage=n.addResponseAudioMessage=n.addSystemResponseMessage=n.addResponseMessage=n.addUserImageMessage=n.addUserAudioMessage=n.addUserMessage=void 0;var o=r(f(4534)),s=a(f(7206)),d=f(1754);n.addUserMessage=function(e,n,f,i,t,a){o.default.dispatch(s.addUserMessage(e,n,f,i,t,a))},n.addUserAudioMessage=function(e,n,f,i,t){o.default.dispatch(s.addUserAudioMessage(e,n,f,i,t))},n.addUserImageMessage=function(e,n,f,i,t){o.default.dispatch(s.addUserImageMessage(e,n,f,i,t))},n.addResponseMessage=function(e,n,f,i,t,a){o.default.dispatch(s.addResponseMessage(e,n,f,i,t,a))},n.addSystemResponseMessage=function(e,n,f,i,t,a){o.default.dispatch(s.addSystemResponseMessage(e,n,f,i,t,a))},n.addResponseAudioMessage=function(e,n,f,i,t){o.default.dispatch(s.addResponseAudioMessage(e,n,f,i,t))},n.addResponseImageMessage=function(e,n,f,i,t){o.default.dispatch(s.addResponseImageMessage(e,n,f,i,t))},n.addLinkSnippet=function(e,n){o.default.dispatch(s.addLinkSnippet(e,n))},n.toggleMsgLoader=function(){o.default.dispatch(s.toggleMsgLoader())},n.renderCustomComponent=function(e,n){var f=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;o.default.dispatch(s.renderCustomComponent(e,n,f,i))},n.toggleWidget=function(e){o.default.dispatch(s.toggleChat(e))},n.minimalizeChat=function(e,n){o.default.dispatch(s.minimalizeChat(e,n))},n.setMaxOpenWidgets=function(e){o.default.dispatch(s.setMaxOpenChats(e))},n.toggleInputDisabled=function(){o.default.dispatch(s.toggleInputDisabled())},n.dropMessages=function(e){o.default.dispatch(s.dropMessages(e))},n.isWidgetOpened=function(e){return o.default.getState().behavior.showChat.includes(null!=e?e:"default")},n.isWidgetMinimalized=function(e){return o.default.getState().behavior.minimalizedChat.includes(null!=e?e:"default")},n.getLastResponseMessage=function(e){var n=o.default.getState().messages.messages.filter((function(e){return!function(e){return e.sender===d.MESSAGE_SENDER.CLIENT}(e)}));return void 0!==e&&(n=n.filter((function(n){return n.chatId===e}))),0===n.length?null:n[n.length-1]},n.getOldestMessage=function(e){var n=o.default.getState().messages.messages;return void 0!==e&&(n=n.filter((function(n){return n.chatId===e}))),0===n.length?null:n[0]},n.getMessages=function(e){var n=o.default.getState().messages.messages;return void 0!==e&&(n=n.filter((function(n){return n.chatId===e}))),n},n.setQuickButtons=function(e){o.default.dispatch(s.setQuickButtons(e))},n.deleteMessages=function(e,n){o.default.dispatch(s.deleteMessages(e,n))},n.clearChat=function(e){o.default.dispatch(s.clearChat(e))},n.markAllAsRead=function(e){o.default.dispatch(s.markAllMessagesRead(e))},n.markAsRead=function(e){o.default.dispatch(s.markAsRead(e))},n.markAsDelivered=function(e,n){o.default.dispatch(s.markAsDelivered(e,n))},n.setBadgeCount=function(e){o.default.dispatch(s.setBadgeCount(e))},n.openFullscreenPreview=function(e){o.default.dispatch(s.openFullscreenPreview(e))},n.closeFullscreenPreview=function(){o.default.dispatch(s.closeFullscreenPreview())}},4534:function(e,n,f){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var t=f(118),a=i(f(3874)),r=i(f(4141)),o=i(f(1153)),s=i(f(5622)),d=("undefined"==typeof window||window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,t.compose),c=(0,t.combineReducers)({behavior:a.default,messages:r.default,quickButtons:o.default,preview:s.default});n.default=(0,t.createStore)(c,d())},3874:(e,n,f)=>{"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var t;function a(e,n,f){return(n=function(e){var n=function(e,n){if("object"!==i(e)||null===e)return e;var f=e[Symbol.toPrimitive];if(void 0!==f){var t=f.call(e,n||"default");if("object"!==i(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===i(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):e[n]=f,e}function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return o(e,n);var f=Object.prototype.toString.call(e).slice(8,-1);"Object"===f&&e.constructor&&(f=e.constructor.name);if("Map"===f||"Set"===f)return Array.from(e);if("Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return o(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var f=0,i=new Array(n);fe.maxOpenChats&&(e.showChat=e.showChat.slice(-1*e.maxOpenChats)),Object.assign(Object.assign({},e),{showChat:r(e.showChat),minimalizedChat:r(e.minimalizedChat.filter((function(n){return e.showChat.includes(n)})))})})),a(t,d.MINIMALIZE_CHAT,(function(e,n){var f=n.chatId,i=n.value,t=null!=f?f:"default";return i?e.minimalizedChat.push(t):e.minimalizedChat=e.minimalizedChat.filter((function(e){return e!==t})),Object.assign(Object.assign({},e),{minimalizedChat:r(e.minimalizedChat)})})),a(t,d.TOGGLE_INPUT_DISABLED,(function(e){return Object.assign(Object.assign({},e),{disabledInput:!e.disabledInput})})),a(t,d.TOGGLE_INPUT_DISABLED,(function(e){return Object.assign(Object.assign({},e),{disabledInput:!e.disabledInput})})),a(t,d.SET_MAX_OPEN_CHATS,(function(e,n){return Object.assign(Object.assign({},e),{maxOpenChats:n.maxOpenedChats})})),a(t,d.TOGGLE_MESSAGE_LOADER,(function(e){return Object.assign(Object.assign({},e),{messageLoader:!e.messageLoader})})),t);n.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,n=arguments.length>1?arguments[1]:void 0;return(0,s.createReducer)(u,e,n)}},5622:(e,n,f)=>{"use strict";var i;function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function a(e,n,f){return(n=function(e){var n=function(e,n){if("object"!==t(e)||null===e)return e;var f=e[Symbol.toPrimitive];if(void 0!==f){var i=f.call(e,n||"default");if("object"!==t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===t(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):e[n]=f,e}Object.defineProperty(n,"__esModule",{value:!0});var r=f(796),o=f(7422),s={src:"",alt:"",width:0,height:0,visible:!1},d=(a(i={},o.OPEN_FULLSCREEN_PREVIEW,(function(e,n){var f=n.payload,i=f.src,t=f.width,a=f.height;return Object.assign(Object.assign({},e),{src:i,width:t,height:a,visible:!0})})),a(i,o.CLOSE_FULLSCREEN_PREVIEW,(function(e){return Object.assign({},s)})),i);n.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,n=arguments.length>1?arguments[1]:void 0;return(0,r.createReducer)(d,e,n)}},4141:(e,n,f)=>{"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var t;function a(e,n,f){return(n=function(e){var n=function(e,n){if("object"!==i(e)||null===e)return e;var f=e[Symbol.toPrimitive];if(void 0!==f){var t=f.call(e,n||"default");if("object"!==i(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===i(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):e[n]=f,e}function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return o(e,n);var f=Object.prototype.toString.call(e).slice(8,-1);"Object"===f&&e.constructor&&(f=e.constructor.name);if("Map"===f||"Set"===f)return Array.from(e);if("Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return o(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var f=0,i=new Array(n);fa})):e.messages.slice(0,e.messages.length-f)})})),a(t,u.CLEAR_CHAT,(function(e,n){var f=n.chatId;return Object.assign(Object.assign({},e),{messages:e.messages.filter((function(e){return e.chatId!==f}))})})),a(t,u.SET_BADGE_COUNT,(function(e,n){var f=n.count;return Object.assign(Object.assign({},e),{badgeCount:f})})),a(t,u.MARK_ALL_READ,(function(e,n){var f=n.chatId;return f?Object.assign(Object.assign({},e),{messages:e.messages.map((function(e){return e.chatId===f?Object.assign(Object.assign({},e),{unread:!1}):e})),badgeCount:0}):Object.assign(Object.assign({},e),{messages:e.messages.map((function(e){return Object.assign(Object.assign({},e),{unread:!1})})),badgeCount:0})})),a(t,u.MARK_READ,(function(e,n){var f=n.id,i=e.messages.find((function(e){return e.customId===f}));if(i){i.unread=!1;var t=e.messages.indexOf(i);e.messages.slice(0,t).forEach((function(e){e.unread=!1}))}return Object.assign(Object.assign({},e),{messages:r(e.messages)})})),a(t,u.MARK_DELIVERED,(function(e,n){var f=n.id,i=n.newId,t=e.messages.find((function(e){return e.customId===f}));return t&&(t.delivered=!0,i&&(t.customId=i)),Object.assign(Object.assign({},e),{messages:r(e.messages)})})),t);n.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,n=arguments.length>1?arguments[1]:void 0;return(0,s.createReducer)(y,e,n)}},1153:(e,n,f)=>{"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function t(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return a(e,n);var f=Object.prototype.toString.call(e).slice(8,-1);"Object"===f&&e.constructor&&(f=e.constructor.name);if("Map"===f||"Set"===f)return Array.from(e);if("Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return a(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var f=0,i=new Array(n);f0&&void 0!==arguments[0]?arguments[0]:l,n=arguments.length>1?arguments[1]:void 0;return(0,d.createReducer)(g,e,n)}},8032:(e,n)=>{"use strict";function f(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return i(e,n);var f=Object.prototype.toString.call(e).slice(8,-1);"Object"===f&&e.constructor&&(f=e.constructor.name);if("Map"===f||"Set"===f)return Array.from(e);if("Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return i(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,n){(null==n||n>e.length)&&(n=e.length);for(var f=0,i=new Array(n);fn.timestamp?1:e.timestamp{"use strict"},8266:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.insertNodeAtCaret=n.calculatePos=n.updateCaret=n.isFirefox=n.getSelection=n.getCaretIndex=void 0;n.getCaretIndex=function(e){if("undefined"==typeof window)return 0;var n=window.getSelection();if(null===n||!n.anchorNode)return 0;var i=n.getRangeAt(0);return f(i,e)};n.getSelection=function(e){if("undefined"==typeof window)return{start:0,end:0};var n=window.getSelection().getRangeAt(0),f=n.cloneRange();f.selectNodeContents(e),f.setEnd(n.startContainer,n.startOffset);var i=f.toString().length;return{start:i,end:i+n.toString().length}};var f=function(e,n){var f=document.createTreeWalker(n,NodeFilter.SHOW_ALL,(function(n){var f=document.createRange();return f.selectNodeContents(n),f.compareBoundaryPoints(Range.END_TO_END,e)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT})),i=0,t=0;3==e.startContainer.nodeType&&(i+=e.startOffset);for(;f.nextNode();)i+=t,t=0,e.startContainer!=f.currentNode&&(f.currentNode instanceof Text?t+=f.currentNode.length:(f.currentNode instanceof HTMLBRElement||f.currentNode instanceof HTMLImageElement||f.currentNode instanceof HTMLDivElement)&&(t+=f.currentNode.outerHTML.length));return i+t};n.isFirefox=function(){return navigator.userAgent.search("Firefox")>0};n.updateCaret=function(e,f,i){if("undefined"!=typeof window){var t=document.createRange(),a=window.getSelection(),r=(0,n.calculatePos)(e.childNodes,f+i),o=r[0],s=r[1];o===e.childNodes.length&&e.appendChild(document.createTextNode("")),t.setStart(e.childNodes[o],s),t.collapse(!0),a.removeAllRanges(),a.addRange(t),e.focus()}};n.calculatePos=function(e,n){for(var f=0,i=0;i=n)return[i,n-f];f+=e[i].textContent.length}else f+=e[i].outerHTML.length}return[e.length,0]};n.insertNodeAtCaret=function(e){var f,i=(0,n.getCaretIndex)(e),t="\n\n",a="";if(i>0){f=e.innerHTML.charAt(i-1),a=e.innerHTML.charAt(i);var r=e.innerHTML.match(/\n/g);(f===a||"\n"===f&&""===a||(0,n.isFirefox)()&&(null==r?void 0:r.length)>0)&&(t="\n")}if("undefined"!=typeof window){var o=window.getSelection(),s=document.createTextNode(t),d=o.getRangeAt(0);d.collapse(!1),d.insertNode(s);var c=d.cloneRange();c.selectNodeContents(s),c.collapse(!1),o.removeAllRanges(),o.addRange(c),e.innerHTML=e.innerHTML.replace(/
/g,""),(0,n.updateCaret)(e,i,1)}}},796:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createReducer=void 0;n.createReducer=function(e,n,f){return e[f.type]?e[f.type](n,f):n}},8374:(e,n)=>{"use strict";function f(e,n){var f="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!f){if(Array.isArray(e)||(f=function(e,n){if(!e)return;if("string"==typeof e)return i(e,n);var f=Object.prototype.toString.call(e).slice(8,-1);"Object"===f&&e.constructor&&(f=e.constructor.name);if("Map"===f||"Set"===f)return Array.from(e);if("Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return i(e,n)}(e))||n&&e&&"number"==typeof e.length){f&&(e=f);var t=0,a=function(){};return{s:a,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){f=f.call(e)},n:function(){var e=f.next();return o=e.done,e},e:function(e){s=!0,r=e},f:function(){try{o||null==f.return||f.return()}finally{if(s)throw r}}}}function i(e,n){(null==n||n>e.length)&&(n=e.length);for(var f=0,i=new Array(n);f"+r+"":i+=r}}catch(e){a.e(e)}finally{a.f()}return i}}},307:function(e,n,f){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.replaceSpanEmojiByImgEmoji=n.emojiBackwardConvert=n.convertOneColonEmoji=n.replaceAllRegex=n.replaceAll=n.emojiConvert=void 0;var t=i(f(2454)),a=f(8374),r=new t.default;n.emojiConvert=function(e,f){var i=e.replace(/\n$/,""),t=null!=f?f:"google";r.img_sets.google.sheet="/emoji-data/sheet_"+t+"_64.png",r.use_sheet=!1,r.replace_mode="img",r.img_set=t,r.include_title=!0;var o=r.replace_colons((0,n.convertOneColonEmoji)(i));return a.emojiUtils.wrapEmojiByFont((0,n.replaceSpanEmojiByImgEmoji)(o))};n.replaceAll=function(e,n,f){return e.replace(new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),f)};n.replaceAllRegex=function(e,n,f){return e.replace(n,f)};n.convertOneColonEmoji=function(e){return e=(0,n.replaceAll)(e,":-)",":slightly_smiling_face:"),e=(0,n.replaceAll)(e,":)",":slightly_smiling_face:"),e=(0,n.replaceAll)(e,":-D",":grinning:"),e=(0,n.replaceAll)(e,":D",":grinning:"),e=(0,n.replaceAll)(e,":-*",":kissing_heart:"),e=(0,n.replaceAll)(e,":-(",":unamused:"),e=(0,n.replaceAll)(e,":-/",":face_with_rolling_eyes:")};n.emojiBackwardConvert=function(e){var n=e.split("data-codepoints").length-1;if(n>0){for(var f=0;f")+1,a=e.substring(i,t),r=a.indexOf('title="')+7,o=a.indexOf('"',r),s=a.substring(r,o);e=e.replace(a,":".concat(s,":"))}return e}return e};n.replaceSpanEmojiByImgEmoji=function(e){var n=e.split("data-codepoints").length-1;if(n>0)for(var f=0;f")+8,a=e.substring(i,t),r=e.indexOf('style="background-image:url(/')+28,o=e.indexOf(')"'),s=e.indexOf('data-codepoints="',i)+17,d=e.indexOf('"',s),c=e.substring(s,d),u=e.indexOf('title="',i)+7,l=e.indexOf('"',u),g=e.substring(u,l),y='';e=e.replace(a,y)}return e}},3427:(e,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.md5=void 0;function f(e,n,f,i,t,a){return o(function(e,n){return e<>>32-n}(o(o(n,e),o(i,a)),t),f)}function i(e,n,i,t,a,r,o){return f(n&i|~n&t,e,n,a,r,o)}function t(e,n,i,t,a,r,o){return f(n&t|i&~t,e,n,a,r,o)}function a(e,n,i,t,a,r,o){return f(n^i^t,e,n,a,r,o)}function r(e,n,i,t,a,r,o){return f(i^(n|~t),e,n,a,r,o)}function o(e,n){var f=(65535&e)+(65535&n);return(e>>16)+(n>>16)+(f>>16)<<16|65535&f}n.md5=function(e){return function(e){for(var n,f="0123456789ABCDEF",i="",t=0;t>>4&15)+f.charAt(15&n);return i}(function(e){for(var n="",f=0;f<32*e.length;f+=8)n+=String.fromCharCode(e[f>>5]>>>f%32&255);return n}(function(e,n){e[n>>5]|=128<>>9<<4)]=n;for(var f=1732584193,s=-271733879,d=-1732584194,c=271733878,u=0;u>2),f=0;f>5]|=(255&e.charCodeAt(f/8))<8&&void 0!==arguments[8]&&arguments[8],l=arguments.length>9?arguments[9]:void 0,g=void 0!==(null==r?void 0:r.read)&&r.read,y=void 0===(null==r?void 0:r.delivered)?n===o.MESSAGE_SENDER.RESPONSE:r.delivered;return{type:o.MESSAGES_TYPES.TEXT,component:t.default,text:(0,s.stripHtmlTags)(e),sender:n,timestamp:i||new Date,showAvatar:!u,customId:f,unread:!g,chatId:a,delivered:y,post:d,audioLink:c,imageLink:l,isSystemMessage:u}},n.createLinkSnippet=function(e,n){return{type:o.MESSAGES_TYPES.SNIPPET.LINK,component:a.default,title:e.title,link:e.link,target:e.target||"_blank",sender:o.MESSAGE_SENDER.RESPONSE,timestamp:new Date,showAvatar:!0,customId:n,unread:!0,delivered:!1}},n.createComponentMessage=function(e,n,f,i){return{type:o.MESSAGES_TYPES.CUSTOM_COMPONENT,component:e,props:n,sender:o.MESSAGE_SENDER.RESPONSE,timestamp:new Date,showAvatar:f,customId:i,unread:!0,delivered:!1}},n.createQuickButton=function(e){return{component:r.default,label:e.label,value:e.value}},n.scrollToBottom=function(e){if(e){var n=e.clientHeight,f=e.scrollTop,i=e.scrollHeight-(f+n);i&&d(e,f,i),c(e,f,i)}},n.scrollBottomTo=c},1765:(e,n,f)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.stripHtmlTags=void 0;var i=f(307);n.stripHtmlTags=function(e){var n=(0,i.replaceAll)(e,"
","

");n.startsWith("
")?n=n.substring(5):n.startsWith("

")&&(n="
"+n.substring(10)),n=(0,i.replaceAll)(n,"
","\n"),n=(0,i.replaceAll)(n,"
","\n"),n=(0,i.replaceAll)(n,"
","\n"),n=(0,i.replaceAll)(n,"
","\n");return(0,i.replaceAllRegex)(n,/<[^>]*>?/gm,"")}},6899:(e,n)=>{"use strict";n.jQ=n.pJ=n.e8=n.jS=n.cK=void 0;n.cK=function(e,n){for(var f=[],i=e.indexOf(n,0);i>=0;)f.push(i),i=e.indexOf(n,i+1);return f};var f=function(e){var f=new RegExp(/:[^\s]*:/g),i=e.match(f);if(!i)return[];var t=[];return i.filter((function(e,n,f){return f.indexOf(e)===n})).forEach((function(f){(0,n.cK)(e,f).forEach((function(e){t.push({emoji:f,startPos:e,endPos:e+f.length,length:f.length})}))})),t};n.jS=function(e,n){return f(e).some((function(e){return n>e.startPos&&n<=e.endPos}))};var i=function(e,n){return f(e).filter((function(e){return e.startPosr?"".concat(a.slice(0,r),"..."):a;if((0,n.e8)(o)<=t)return o;for(var s=0,d="",c=t;c<=o.length;c+=1)if(d=o.substring(0,c),(0,n.e8)(d)>t)return s=c,(0,n.jS)(o,s)?"".concat(d.substring(0,i(o,s)),"..."):"".concat(d,"...");return d},n.jQ={textWithEmojiTruncate:n.pJ,strEmojiLen:n.e8,isEmojiPosition:n.jS,indexOfAll:n.cK}},4019:(e,n,f)=>{"use strict";f.r(n)},3791:(e,n,f)=>{"use strict";f.r(n)},7244:(e,n,f)=>{"use strict";f.r(n)},142:(e,n,f)=>{"use strict";f.r(n)},6997:(e,n,f)=>{"use strict";f.r(n)},3723:(e,n,f)=>{"use strict";f.r(n)},4915:(e,n,f)=>{"use strict";f.r(n)},7450:(e,n,f)=>{"use strict";f.r(n)},5057:(e,n,f)=>{"use strict";f.r(n)},824:(e,n,f)=>{"use strict";f.r(n)},7894:(e,n,f)=>{"use strict";f.r(n)},6244:(e,n,f)=>{"use strict";f.r(n)},1109:(e,n,f)=>{"use strict";f.r(n)},3298:(e,n,f)=>{"use strict";f.r(n)},8021:(e,n,f)=>{"use strict";f.r(n)},8578:(e,n,f)=>{"use strict";f(6087);var i,t=(i=f(3851))&&i.__esModule?i:{default:i};t.default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),t.default._babelPolyfill=!0},6087:(e,n,f)=>{"use strict";f(8896),f(239),f(4645),f(164),f(4113),f(8812),f(1775),f(4440),f(2107),f(5584),f(1689),f(12),f(2100),f(2390)},7658:(e,n,f)=>{"use strict";f.r(n),f.d(n,{default:()=>on});var i=f(9787),t=f.n(i);function a(e){return e&&e.__esModule?e.default:e}function r(e,n,f){return n in e?Object.defineProperty(e,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):e[n]=f,e}var o,s,d,c,u,l,g={},y=[],m=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(e,n){for(var f in n)e[f]=n[f];return e}function v(e){var n=e.parentNode;n&&n.removeChild(e)}function p(e,n,f){var i,t,a,r={};for(a in n)"key"==a?i=n[a]:"ref"==a?t=n[a]:r[a]=n[a];if(arguments.length>2&&(r.children=arguments.length>3?o.call(arguments,2):f),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===r[a]&&(r[a]=e.defaultProps[a]);return b(e,r,i,t,null)}function b(e,n,f,i,t){var a={type:e,props:n,key:f,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==t?++d:t};return null==t&&null!=s.vnode&&s.vnode(a),a}function w(e){return e.children}function k(e,n){this.props=e,this.context=n}function A(e,n){if(null==n)return e.__?A(e.__,e.__.__k.indexOf(e)+1):null;for(var f;n0?b(m.type,m.props,m.key,null,m.__v):m)){if(m.__=f,m.__b=f.__b+1,null===(l=k[c])||l&&m.key==l.key&&m.type===l.type)k[c]=void 0;else for(u=0;u{let e=null;try{navigator.userAgent.includes("jsdom")||(e=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}))}catch{}if(!e)return()=>!1;const n=20,f=Math.floor(12.5);return e.font=f+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=40,e.canvas.height=25,f=>{e.clearRect(0,0,40,25),e.fillStyle="#FF0000",e.fillText(f,0,22),e.fillStyle="#0000FF",e.fillText(f,n,22);const i=e.getImageData(0,0,n,25).data,t=i.length;let a=0;for(;a=t)return!1;const r=n+a/4%n,o=Math.floor(a/4/n),s=e.getImageData(r,o,1,1).data;return i[a]===s[0]&&i[a+2]===s[2]&&!(e.measureText(f).width>=n)}})();var J={latestVersion:function(){for(const{v:e,emoji:n}of H)if(U(n))return e},noCountryFlags:function(){return!U("🇨🇦")}};const W=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let Z=null;var K,V={add:function(e){Z||(Z=R.get("frequently")||{});const n=e.id||e;n&&(Z[n]||(Z[n]=0),Z[n]+=1,R.set("last",n),R.set("frequently",Z))},get:function({maxFrequentRows:e,perLine:n}){if(!e)return[];Z||(Z=R.get("frequently"));let f=[];if(!Z){Z={};for(let e in W.slice(0,n)){const i=W[e];Z[i]=n-e,f.push(i)}return f}const i=e*n,t=R.get("last");for(let e in Z)f.push(e);if(f.sort(((e,n)=>{const f=Z[n],i=Z[e];return f==i?e.localeCompare(n):f-i})),f.length>i){const e=f.slice(i);f=f.slice(0,i);for(let n of e)n!=t&&delete Z[n];t&&-1==f.indexOf(t)&&(delete Z[f[f.length-1]],f.splice(-1,1,t)),R.set("frequently",Z)}return f},DEFAULTS:W};K=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var X={autoFocus:{value:!1},dynamicWidth:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:14,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14]},exceptEmojis:{value:[]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","be","cs","de","es","fa","fi","fr","hi","it","ja","kr","nl","pl","pt","ru","sa","tr","uk","vi","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};let $=null,ee=null;const ne={};async function fe(e){if(ne[e])return ne[e];const n=await fetch(e),f=await n.json();return ne[e]=f,f}let ie=null,te=null,ae=!1;function re(e,{caller:n}={}){return ie||(ie=new Promise((e=>{te=e}))),e?async function(e){ae=!0;let{emojiVersion:n,set:f,locale:i}=e;if(n||(n=X.emojiVersion.value),f||(f=X.set.value),i||(i=X.locale.value),ee)ee.categories=ee.categories.filter((e=>!!!e.name));else{ee=("function"==typeof e.data?await e.data():e.data)||await fe(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${n}/${f}.json`),ee.emoticons={},ee.natives={},ee.categories.unshift({id:"frequent",emojis:[]});for(const e in ee.aliases){const n=ee.aliases[e],f=ee.emojis[n];f&&(f.aliases||(f.aliases=[]),f.aliases.push(e))}ee.originalCategories=ee.categories}if($=("function"==typeof e.i18n?await e.i18n():e.i18n)||("en"==i?a(K):await fe(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${i}.json`)),e.custom)for(let n in e.custom){n=parseInt(n);const f=e.custom[n],i=e.custom[n-1];if(f.emojis&&f.emojis.length){f.id||(f.id=`custom_${n+1}`),f.name||(f.name=$.categories.custom),i&&!f.icon&&(f.target=i.target||i),ee.categories.push(f);for(const e of f.emojis)ee.emojis[e.id]=e}}e.categories&&(ee.categories=ee.originalCategories.filter((n=>-1!=e.categories.indexOf(n.id))).sort(((n,f)=>e.categories.indexOf(n.id)-e.categories.indexOf(f.id))));let t=null,r=null;"native"==f&&(t=J.latestVersion(),r=e.noCountryFlags||J.noCountryFlags());let o=ee.categories.length,s=!1;for(;o--;){const n=ee.categories[o];if("frequent"==n.id){let{maxFrequentRows:f,perLine:i}=e;f=f>=0?f:X.maxFrequentRows.value,i||(i=X.perLine.value),n.emojis=V.get({maxFrequentRows:f,perLine:i})}if(!n.emojis||!n.emojis.length){ee.categories.splice(o,1);continue}const{categoryIcons:f}=e;if(f){const e=f[n.id];e&&!n.icon&&(n.icon=e)}let i=n.emojis.length;for(;i--;){const f=n.emojis[i],a=f.id?f:ee.emojis[f],o=()=>{n.emojis.splice(i,1)};if(!a||e.exceptEmojis&&e.exceptEmojis.includes(a.id))o();else if(t&&a.version>t)o();else if(!r||"flags"!=n.id||ue.includes(a.id)){if(!a.search){if(s=!0,a.search=","+[[a.id,!1],[a.name,!0],[a.keywords,!1],[a.emoticons,!1]].map((([e,n])=>{if(e)return(Array.isArray(e)?e:[e]).map((e=>(n?e.split(/[-|_|\s]+/):[e]).map((e=>e.toLowerCase())))).flat()})).flat().filter((e=>e&&e.trim())).join(","),a.emoticons)for(const e of a.emoticons)ee.emoticons[e]||(ee.emoticons[e]=a.id);let e=0;for(const n of a.skins){if(!n)continue;e++;const{native:f}=n;f&&(ee.natives[f]=a.id,a.search+=`,${f}`);const i=1==e?"":`:skin-tone-${e}:`;n.shortcodes=`:${a.id}:${i}`}}}else o()}}s&&ce.reset();te()}(e):n&&!ae&&console.warn(`\`${n}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),ie}function oe(e,n,f){e||(e={});const i={};for(let t in n)i[t]=se(t,e,n,f);return i}function se(e,n,f,i){const t=f[e];let a=i&&i.getAttribute(e)||(null!=n[e]&&null!=n[e]?n[e]:null);return t?(null!=a&&t.value&&typeof t.value!=typeof a&&(a="boolean"==typeof t.value?"false"!=a:t.value.constructor(a)),t.transform&&a&&(a=t.transform(a)),(null==a||t.choices&&-1==t.choices.indexOf(a))&&(a=t.value),a):a}let de=null;var ce={search:async function(e,{maxResults:n,caller:f}={}){if(!e||!e.trim().length)return null;n||(n=90),await re(null,{caller:f||"SearchIndex.search"});const i=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter(((e,n,f)=>e.trim()&&f.indexOf(e)==n));if(!i.length)return;let t,a,r=de||(de=Object.values(ee.emojis));for(const e of i){if(!r.length)break;t=[],a={};for(const n of r){if(!n.search)continue;const f=n.search.indexOf(`,${e}`);-1!=f&&(t.push(n),a[n.id]||(a[n.id]=0),a[n.id]+=n.id==e?0:f+1)}r=t}return t.length<2||(t.sort(((e,n)=>{const f=a[e.id],i=a[n.id];return f==i?e.id.localeCompare(n.id):f-i})),t.length>n&&(t=t.slice(0,n))),t},get:function(e){return e.id?e:ee.emojis[e]||ee.emojis[ee.aliases[e]]||ee.emojis[ee.natives[e]]},reset:function(){de=null},SHORTCODES_REGEX:/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/};const ue=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];async function le(e=1){for(let n in[...Array(e).keys()])await new Promise(requestAnimationFrame)}function ge(e,{skinIndex:n=0}={}){const f=e.skins[n]||(n=0,e.skins[n]),i={id:e.id,name:e.name,native:f.native,unified:f.unified,keywords:e.keywords,shortcodes:f.shortcodes||e.shortcodes};return e.skins.length>1&&(i.skin=n+1),f.src&&(i.src=f.src),e.aliases&&e.aliases.length&&(i.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(i.emoticons=e.emoticons),i}var ye={categories:{activity:{outline:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:G("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:G("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:G("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:G("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:G("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:G("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:G("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[G("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),G("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:G("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[G("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),G("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:G("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[G("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),G("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:G("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[G("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),G("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:G("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[G("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),G("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:G("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:G("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:G("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},search:{loupe:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:G("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:G("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})}};function me(e){let{id:n,skin:f,emoji:i}=e;if(e.shortcodes){const i=e.shortcodes.match(ce.SHORTCODES_REGEX);i&&(n=i[1],i[2]&&(f=i[2]))}if(i||(i=ce.get(n||e.native)),!i)return e.fallback;const t=i.skins[f-1]||i.skins[0],a=t.src||("native"==e.set||e.spritesheet?void 0:"function"==typeof e.getImageURL?e.getImageURL(e.set,t.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@14.0.0/img/${e.set}/64/${t.unified}.png`),r="function"==typeof e.getSpritesheetURL?e.getSpritesheetURL(e.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@14.0.0/img/${e.set}/sheets-256/64.png`;return G("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:a?G("img",{style:{maxWidth:e.size||"1em",maxHeight:e.size||"1em",display:"inline-block"},alt:t.native||t.shortcodes,src:a}):"native"==e.set?G("span",{style:{fontSize:e.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:t.native}):G("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${r})`,backgroundSize:`${100*ee.sheet.cols}% ${100*ee.sheet.rows}%`,backgroundPosition:`${100/(ee.sheet.cols-1)*t.x}% ${100/(ee.sheet.rows-1)*t.y}%`}})})}const he="undefined"!=typeof window&&window.HTMLElement?window.HTMLElement:Object;class ve extends he{static get observedAttributes(){return Object.keys(this.Props)}update(e={}){for(let n in e)this.attributeChangedCallback(n,null,e[n])}attributeChangedCallback(e,n,f){if(!this.component)return;const i=se(e,{[e]:f},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[e]:i}):(this.component.props[e]=i,this.component.forceUpdate())}disconnectedCallback(){this.disconnected=!0,this.component&&this.component.unregister&&this.component.unregister()}constructor(e={}){if(super(),this.props=e,e.parent||e.ref){let n=null;const f=e.parent||(n=e.ref&&e.ref.current);n&&(n.innerHTML=""),f&&f.appendChild(this)}}}class pe extends ve{setShadow(){this.attachShadow({mode:"open"})}injectStyles(e){if(!e)return;const n=document.createElement("style");n.textContent=e,this.shadowRoot.insertBefore(n,this.shadowRoot.firstChild)}constructor(e,{styles:n}={}){super(e),this.setShadow(),this.injectStyles(n)}}var be={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:X.set,skin:X.skin};class we extends ve{async connectedCallback(){const e=oe(this.props,be,this);e.element=this,e.ref=e=>{this.component=e},await re(),this.disconnected||F(G(me,{...e}),this)}constructor(e){super(e)}}r(we,"Props",be),"undefined"==typeof customElements||customElements.get("em-emoji")||customElements.define("em-emoji",we);var ke,Ae,xe=[],_e=s.__b,Me=s.__r,Ce=s.diffed,Ie=s.__c,Ee=s.unmount;function De(){var e;for(xe.sort((function(e,n){return e.__v.__b-n.__v.__b}));e=xe.pop();)if(e.__P)try{e.__H.__h.forEach(Be),e.__H.__h.forEach(Se),e.__H.__h=[]}catch(n){e.__H.__h=[],s.__e(n,e.__v)}}s.__b=function(e){ke=null,_e&&_e(e)},s.__r=function(e){Me&&Me(e),0;var n=(ke=e.__c).__H;n&&(n.__h.forEach(Be),n.__h.forEach(Se),n.__h=[])},s.diffed=function(e){Ce&&Ce(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(1!==xe.push(n)&&Ae===s.requestAnimationFrame||((Ae=s.requestAnimationFrame)||function(e){var n,f=function(){clearTimeout(i),je&&cancelAnimationFrame(n),setTimeout(e)},i=setTimeout(f,100);je&&(n=requestAnimationFrame(f))})(De)),ke=null},s.__c=function(e,n){n.some((function(e){try{e.__h.forEach(Be),e.__h=e.__h.filter((function(e){return!e.__||Se(e)}))}catch(f){n.some((function(e){e.__h&&(e.__h=[])})),n=[],s.__e(f,e.__v)}})),Ie&&Ie(e,n)},s.unmount=function(e){Ee&&Ee(e);var n,f=e.__c;f&&f.__H&&(f.__H.__.forEach((function(e){try{Be(e)}catch(e){n=e}})),n&&s.__e(n,f.__v))};var je="function"==typeof requestAnimationFrame;function Be(e){var n=ke,f=e.__c;"function"==typeof f&&(e.__c=void 0,f()),ke=n}function Se(e){var n=ke;e.__c=e.__(),ke=n}function Ne(e,n){for(var f in n)e[f]=n[f];return e}function Te(e,n){for(var f in e)if("__source"!==f&&!(f in n))return!0;for(var i in n)if("__source"!==i&&e[i]!==n[i])return!0;return!1}function Le(e){this.props=e}(Le.prototype=new k).isPureReactComponent=!0,Le.prototype.shouldComponentUpdate=function(e,n){return Te(this.props,e)||Te(this.state,n)};var Qe=s.__b;s.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Qe&&Qe(e)};"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref");var ze=s.__e;s.__e=function(e,n,f){if(e.then)for(var i,t=n;t=t.__;)if((i=t.__c)&&i.__c)return null==n.__e&&(n.__e=f.__e,n.__k=f.__k),i.__c(e,n);ze(e,n,f)};var Oe=s.unmount;function Fe(){this.__u=0,this.t=null,this.__b=null}function Ye(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function Ge(){this.u=null,this.o=null}s.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&!0===e.__h&&(e.type=null),Oe&&Oe(e)},(Fe.prototype=new k).__c=function(e,n){var f=n.__c,i=this;null==i.t&&(i.t=[]),i.t.push(f);var t=Ye(i.__v),a=!1,r=function(){a||(a=!0,f.__R=null,t?t(o):o())};f.__R=r;var o=function(){if(!--i.__u){if(i.state.__e){var e=i.state.__e;i.__v.__k[0]=function e(n,f,i){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map((function(n){return e(n,f,i)})),n.__c&&n.__c.__P===f&&(n.__e&&i.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=i)),n}(e,e.__c.__P,e.__c.__O)}var n;for(i.setState({__e:i.__b=null});n=i.t.pop();)n.forceUpdate()}},s=!0===n.__h;i.__u++||s||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(r,r)},Fe.prototype.componentWillUnmount=function(){this.t=[]},Fe.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var f=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=function e(n,f,i){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),n.__c.__H=null),null!=(n=Ne({},n)).__c&&(n.__c.__P===i&&(n.__c.__P=f),n.__c=null),n.__k=n.__k&&n.__k.map((function(n){return e(n,f,i)}))),n}(this.__b,f,i.__O=i.__P)}this.__b=null}var t=n.__e&&p(w,null,e.fallback);return t&&(t.__h=null),[p(w,null,n.__e?null:e.children),t]};var Re=function(e,n,f){if(++f[1]===f[0]&&e.o.delete(n),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(f=e.u;f;){for(;f.length>3;)f.pop()();if(f[1]{const i=n.name||$.categories[n.id],t=!this.props.unfocused&&n.id==this.state.categoryId;return t&&(e=f),G("button",{"aria-label":i,"aria-selected":t||void 0,title:i,type:"button",class:"flex flex-grow flex-center",onMouseDown:e=>e.preventDefault(),onClick:()=>{this.props.onClick({category:n,i:f})},children:this.renderIcon(n)})})),G("div",{class:"bar",style:{width:100/this.categories.length+"%",opacity:null==e?0:1,transform:"rtl"===this.props.dir?`scaleX(-1) translateX(${100*e}%)`:`translateX(${100*e}%)`}})]})})}constructor(){super(),this.categories=ee.categories.filter((e=>!e.target)),this.state={categoryId:this.categories[0].id}}}class nn extends Le{shouldComponentUpdate(e){for(let n in e)if("children"!=n&&e[n]!=this.props[n])return!0;return!1}render(){return this.props.children}}const fn=10;class tn extends k{getInitialState(e=this.props){return{skin:R.get("skin")||e.skin,theme:this.initTheme(e.theme)}}componentWillMount(){this.dir=$.rtl?"rtl":"ltr",this.refs={menu:{current:null},navigation:{current:null},scroll:{current:null},search:{current:null},searchInput:{current:null},skinToneButton:{current:null},skinToneRadio:{current:null}},this.initGrid(),0==this.props.stickySearch&&"sticky"==this.props.searchPosition&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:e}=this.refs;e.current&&e.current.focus()}}componentWillReceiveProps(e){this.nextState||(this.nextState={});for(const n in e)this.nextState[n]=e[n];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout((()=>{let e=!1;for(const n in this.nextState)this.props[n]=this.nextState[n],"custom"!==n&&"categories"!==n||(e=!0);delete this.nextState;const n=this.getInitialState();if(e)return this.reset(n);this.setState(n)}))}componentWillUnmount(){this.unregister()}async reset(e={}){await re(this.props),this.initGrid(),this.unobserve(),this.setState(e,(()=>{this.observeCategories(),this.observeRows()}))}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){document.removeEventListener("click",this.handleClickOutside),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve({except:e=[]}={}){Array.isArray(e)||(e=[e]);for(const n of this.observers)e.includes(n)||n.disconnect();this.observers=[].concat(e)}initGrid(){const{categories:e}=ee;this.refs.categories=new Map;const n=ee.categories.map((e=>e.id)).join(",");this.navKey&&this.navKey!=n&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=n,this.grid=[],this.grid.setsize=0;const f=(e,n)=>{const f=[];f.__categoryId=n.id,f.__index=e.length,this.grid.push(f);const i=this.grid.length-1,t=i%fn?{}:{current:null};return t.index=i,t.posinset=this.grid.setsize+1,e.push(t),f};for(let n of e){const e=[];let i=f(e,n);for(let t of n.emojis)i.length==this.getPerLine()&&(i=f(e,n)),this.grid.setsize+=1,i.push(t);this.refs.categories.set(n.id,{root:{current:null},rows:e})}}initTheme(e){if("auto"!=e)return e;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addListener((()=>{"auto"==this.props.theme&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}))}return this.darkMedia.matches?"dark":"light"}initDynamicPerLine(e=this.props){if(!e.dynamicWidth)return;const{element:n,emojiButtonSize:f}=e,i=()=>{const{width:e}=n.getBoundingClientRect();return Math.floor(e/f)},t=new ResizeObserver((()=>{this.unobserve({except:t}),this.setState({perLine:i()},(()=>{this.initGrid(),this.forceUpdate((()=>{this.observeCategories(),this.observeRows()}))}))}));return t.observe(n),this.observers.push(t),i()}getPerLine(){return this.state.perLine||this.props.perLine}getEmojiByPos([e,n]){const f=this.state.searchResults||this.grid,i=f[e]&&f[e][n];if(i)return ce.get(i)}observeCategories(){const e=this.refs.navigation.current;if(!e)return;const n=new Map,f={root:this.refs.scroll.current,threshold:[0,1]},i=new IntersectionObserver((f=>{for(const e of f){const f=e.target.dataset.id;n.set(f,e.intersectionRatio)}const i=[...n];for(const[n,f]of i)if(f){(t=n)!=e.state.categoryId&&e.setState({categoryId:t});break}var t}),f);for(const{root:e}of this.refs.categories.values())i.observe(e.current);this.observers.push(i)}observeRows(){const e={...this.state.visibleRows},n=new IntersectionObserver((n=>{for(const f of n){const n=parseInt(f.target.dataset.index);f.isIntersecting?e[n]=!0:delete e[n]}this.setState({visibleRows:e})}),{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(fn+5)}px 0px ${this.props.emojiButtonSize*fn}px`});for(const{rows:e}of this.refs.categories.values())for(const f of e)f.current&&n.observe(f.current);this.observers.push(n)}preventDefault(e){e.preventDefault()}unfocusSearch(){const e=this.refs.searchInput.current;e&&e.blur()}navigate({e,input:n,left:f,right:i,up:t,down:a}){const r=this.state.searchResults||this.grid;if(!r.length)return;let[o,s]=this.state.pos;const d=(()=>{if(0==o&&0==s&&!e.repeat&&(f||t))return null;if(-1==o)return e.repeat||!i&&!a||n.selectionStart!=n.value.length?null:[0,0];if(f||i){let e=r[o];const n=f?-1:1;if(s+=n,!e[s]){if(o+=n,e=r[o],!e)return o=f?0:r.length-1,s=f?0:r[o].length-1,[o,s];s=f?e.length-1:0}return[o,s]}if(t||a){o+=t?-1:1;const e=r[o];return e?(e[s]||(s=e.length-1),[o,s]):(o=t?0:r.length-1,s=t?0:r[o].length-1,[o,s])}})();d?(e.preventDefault(),this.setState({pos:d,keyboard:!0},(()=>{this.scrollTo({row:d[0]})}))):this.state.pos[0]>-1&&this.setState({pos:[-1,-1]})}scrollTo({categoryId:e,row:n}){const f=this.state.searchResults||this.grid;if(!f.length)return;const i=this.refs.scroll.current,t=i.getBoundingClientRect();let a=0;if(n>=0&&(e=f[n].__categoryId),e){a=(this.refs[e]||this.refs.categories.get(e).root).current.getBoundingClientRect().top-(t.top-i.scrollTop)+1}if(n>=0)if(n){const e=a+f[n].__index*this.props.emojiButtonSize,r=e+this.props.emojiButtonSize+.88*this.props.emojiButtonSize;if(ei.scrollTop+t.height))return;a=r-t.height}}else a=0;this.ignoreMouse(),i.scrollTop=a}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout((()=>{delete this.mouseIsIgnored}),100)}handleEmojiOver(e){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:e||[-1,-1],keyboard:!1})}handleEmojiClick({e,emoji:n,pos:f}){if(this.props.onEmojiSelect&&(!n&&f&&(n=this.getEmojiByPos(f)),n)){const f=ge(n,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&V.add(f,this.props),this.props.onEmojiSelect(f,e)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(e){this.setState({tempSkin:e})}handleSkinClick(e){this.ignoreMouse(),this.closeSkins(),this.setState({skin:e,tempSkin:null}),R.set("skin",e)}renderNav(){return G(en,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,dir:this.dir,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const e=this.getEmojiByPos(this.state.pos),n=this.state.searchResults&&!this.state.searchResults.length;return G("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[G("div",{class:"flex flex-middle flex-grow",children:[G("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:G(me,{emoji:e,id:n?this.props.noResultsEmoji||"cry":this.props.previewEmoji||("top"==this.props.previewPosition?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),G("div",{class:`margin-${this.dir[0]}`,children:G("div",e||n?{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[G("div",{class:"preview-title ellipsis",children:e?e.name:$.search_no_results_1}),G("div",{class:"preview-subtitle ellipsis color-c",children:e?e.skins[0].shortcodes:$.search_no_results_2})]}:{class:"preview-placeholder color-c",children:$.pick})})]}),!e&&"preview"==this.props.skinTonePosition&&this.renderSkinToneButton()]})}renderEmojiButton(e,{pos:n,posinset:f,grid:i}){const t=this.props.emojiButtonSize,a=this.state.tempSkin||this.state.skin,r=(e.skins[a-1]||e.skins[0]).native,o=(s=this.state.pos,d=n,Array.isArray(s)&&Array.isArray(d)&&s.length===d.length&&s.every(((e,n)=>e==d[n])));var s,d;const c=n.concat(e.id).join("");return G(nn,{selected:o,skin:a,size:t,children:G("button",{"aria-label":r,"aria-selected":o||void 0,"aria-posinset":f,"aria-setsize":i.setsize,"data-keyboard":this.state.keyboard,title:"none"==this.props.previewPosition?e.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:n=>this.handleEmojiClick({e:n,emoji:e}),onMouseEnter:()=>this.handleEmojiOver(n),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[G("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(f-1)%this.props.emojiButtonColors.length]:void 0}}),G(me,{emoji:e,set:this.props.set,size:this.props.emojiSize,skin:a,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},c)}renderSearch(){const e="none"==this.props.previewPosition||"search"==this.props.skinTonePosition;return G("div",{children:[G("div",{class:"spacer"}),G("div",{class:"flex flex-middle",children:[G("div",{class:"search relative flex-grow",children:[G("input",{type:"search",ref:this.refs.searchInput,placeholder:$.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),G("span",{class:"icon loupe flex",children:ye.search.loupe}),this.state.searchResults&&G("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:ye.search.delete})]}),e&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:e}=this.state;return e?G("div",{class:"category",ref:this.refs.search,children:[G("div",{class:`sticky padding-small align-${this.dir[0]}`,children:$.categories.search}),G("div",{children:e.length?e.map(((n,f)=>G("div",{class:"flex",children:n.map(((n,i)=>this.renderEmojiButton(n,{pos:[f,i],posinset:f*this.props.perLine+i+1,grid:e})))}))):G("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&G("a",{onClick:this.props.onAddCustomEmoji,children:$.add_custom})})})]}):null}renderCategories(){const{categories:e}=ee,n=!!this.state.searchResults,f=this.getPerLine();return G("div",{style:{visibility:n?"hidden":void 0,display:n?"none":void 0,height:"100%"},children:e.map((e=>{const{root:n,rows:i}=this.refs.categories.get(e.id);return G("div",{"data-id":e.target?e.target.id:e.id,class:"category",ref:n,children:[G("div",{class:`sticky padding-small align-${this.dir[0]}`,children:e.name||$.categories[e.id]}),G("div",{class:"relative",style:{height:i.length*this.props.emojiButtonSize},children:i.map(((n,i)=>{const t=n.index-n.index%fn,a=this.state.visibleRows[t],r="current"in n?n:void 0;if(!a&&!r)return null;const o=i*f,s=o+f,d=e.emojis.slice(o,s);return d.length{if(!e)return G("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});const i=ce.get(e);return this.renderEmojiButton(i,{pos:[n.index,f],posinset:n.posinset+f,grid:this.grid})}))},n.index)}))})]})}))})}renderSkinToneButton(){return"none"==this.props.skinTonePosition?null:G("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:G("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":$.skins.choose,title:$.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:G("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const e=this.getEmojiByPos(this.state.pos);return G("div",{"aria-live":"polite",class:"sr-only",children:e?e.name:""})}renderSkins(){const e=this.refs.skinToneButton.current.getBoundingClientRect(),n=this.base.getBoundingClientRect(),f={};return"ltr"==this.dir?f.right=n.right-e.right-3:f.left=e.left-n.left-3,"bottom"==this.props.previewPosition&&"preview"==this.props.skinTonePosition?f.bottom=n.bottom-e.top+6:(f.top=e.bottom-n.top+3,f.bottom="auto"),G("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":$.skins.choose,class:"menu hidden","data-position":f.top?"top":"bottom",style:f,children:[...Array(6).keys()].map((e=>{const n=e+1,f=this.state.skin==n;return G("div",{children:[G("input",{type:"radio",name:"skin-tone",value:n,"aria-label":$.skins[n],ref:f?this.refs.skinToneRadio:null,defaultChecked:f,onChange:()=>this.handleSkinMouseOver(n),onKeyDown:e=>{"Enter"!=e.code&&"Space"!=e.code&&"Tab"!=e.code||(e.preventDefault(),this.handleSkinClick(n))}}),G("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(n),onMouseEnter:()=>this.handleSkinMouseOver(n),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[G("span",{class:`skin-tone skin-tone-${n}`}),G("span",{class:"margin-small-lr",children:$.skins[n]})]})]})}))})}render(){const e=this.props.perLine*this.props.emojiButtonSize;return G("section",{id:"root",class:"flex flex-column",dir:this.dir,style:{width:this.props.dynamicWidth?"100%":`calc(${e}px + (var(--padding) + var(--sidebar-width)))`},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:["top"==this.props.previewPosition&&this.renderPreview(),"top"==this.props.navPosition&&this.renderNav(),"sticky"==this.props.searchPosition&&G("div",{class:"padding-lr",children:this.renderSearch()}),G("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:G("div",{style:{width:this.props.dynamicWidth?"100%":e,height:"100%"},children:["static"==this.props.searchPosition&&this.renderSearch(),this.renderSearchResults(),this.renderCategories()]})}),"bottom"==this.props.navPosition&&this.renderNav(),"bottom"==this.props.previewPosition&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(e){super(),r(this,"handleClickOutside",(e=>{const{element:n}=this.props;e.target!=n&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(e))})),r(this,"handleBaseClick",(e=>{this.state.showSkins&&(e.target.closest(".menu")||(e.preventDefault(),e.stopImmediatePropagation(),this.closeSkins()))})),r(this,"handleBaseKeydown",(e=>{this.state.showSkins&&"Escape"==e.key&&(e.preventDefault(),e.stopImmediatePropagation(),this.closeSkins())})),r(this,"handleSearchClick",(()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})})),r(this,"handleSearchInput",(async()=>{const e=this.refs.searchInput.current;if(!e)return;const{value:n}=e,f=await ce.search(n),i=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!f)return this.setState({searchResults:f,pos:[-1,-1]},i);const t=e.selectionStart==e.value.length?[0,0]:[-1,-1],a=[];a.setsize=f.length;let r=null;for(let e of f)a.length&&r.length!=this.getPerLine()||(r=[],r.__categoryId="search",r.__index=a.length,a.push(r)),r.push(e);this.ignoreMouse(),this.setState({searchResults:a,pos:t},i)})),r(this,"handleSearchKeyDown",(e=>{const n=e.currentTarget;switch(e.stopImmediatePropagation(),e.key){case"ArrowLeft":this.navigate({e,input:n,left:!0});break;case"ArrowRight":this.navigate({e,input:n,right:!0});break;case"ArrowUp":this.navigate({e,input:n,up:!0});break;case"ArrowDown":this.navigate({e,input:n,down:!0});break;case"Enter":e.preventDefault(),this.handleEmojiClick({e,pos:this.state.pos});break;case"Escape":e.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch()}})),r(this,"clearSearch",(()=>{const e=this.refs.searchInput.current;e&&(e.value="",e.focus(),this.handleSearchInput())})),r(this,"handleCategoryClick",(({category:e,i:n})=>{this.scrollTo(0==n?{row:-1}:{categoryId:e.id})})),r(this,"openSkins",(e=>{const{currentTarget:n}=e,f=n.getBoundingClientRect();this.setState({showSkins:f},(async()=>{await le(2);const e=this.refs.menu.current;e&&(e.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))}))})),this.observers=[],this.state={pos:[-1,-1],perLine:this.initDynamicPerLine(e),visibleRows:{0:!0},...this.getInitialState(e)}}}class an extends pe{async connectedCallback(){const e=oe(this.props,X,this);e.element=this,e.ref=e=>{this.component=e},await re(e),this.disconnected||F(G(tn,{...e}),this.shadowRoot)}constructor(e){super(e,{styles:a(rn)})}}r(an,"Props",X),"undefined"==typeof customElements||customElements.get("em-emoji-picker")||customElements.define("em-emoji-picker",an);var rn={};function on(e){const n=(0,i.useRef)(null),f=(0,i.useRef)(null);return f.current&&f.current.update(e),(0,i.useEffect)((()=>(f.current=new an({...e,ref:n}),()=>{f.current=null})),[]),t().createElement("div",{ref:n})}rn=':host {\n width: min-content;\n height: 435px;\n min-height: 230px;\n border-radius: var(--border-radius);\n box-shadow: var(--shadow);\n --border-radius: 10px;\n --category-icon-size: 18px;\n --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;\n --font-size: 15px;\n --preview-placeholder-size: 21px;\n --preview-title-size: 1.1em;\n --preview-subtitle-size: .9em;\n --shadow-color: 0deg 0% 0%;\n --shadow: .3px .5px 2.7px hsl(var(--shadow-color) / .14), .4px .8px 1px -3.2px hsl(var(--shadow-color) / .14), 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / .14);\n display: flex;\n}\n\n[data-theme="light"] {\n --em-rgb-color: var(--rgb-color, 34, 36, 39);\n --em-rgb-accent: var(--rgb-accent, 34, 102, 237);\n --em-rgb-background: var(--rgb-background, 255, 255, 255);\n --em-rgb-input: var(--rgb-input, 255, 255, 255);\n --em-color-border: var(--color-border, rgba(0, 0, 0, .05));\n --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1));\n}\n\n[data-theme="dark"] {\n --em-rgb-color: var(--rgb-color, 222, 222, 221);\n --em-rgb-accent: var(--rgb-accent, 58, 130, 247);\n --em-rgb-background: var(--rgb-background, 21, 22, 23);\n --em-rgb-input: var(--rgb-input, 0, 0, 0);\n --em-color-border: var(--color-border, rgba(255, 255, 255, .1));\n --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2));\n}\n\n#root {\n --color-a: rgb(var(--em-rgb-color));\n --color-b: rgba(var(--em-rgb-color), .65);\n --color-c: rgba(var(--em-rgb-color), .45);\n --padding: 12px;\n --padding-small: calc(var(--padding) / 2);\n --sidebar-width: 16px;\n --duration: 225ms;\n --duration-fast: 125ms;\n --duration-instant: 50ms;\n --easing: cubic-bezier(.4, 0, .2, 1);\n width: 100%;\n text-align: left;\n border-radius: var(--border-radius);\n background-color: rgb(var(--em-rgb-background));\n position: relative;\n}\n\n@media (prefers-reduced-motion) {\n #root {\n --duration: 0;\n --duration-fast: 0;\n --duration-instant: 0;\n }\n}\n\n#root[data-menu] button {\n cursor: auto;\n}\n\n#root[data-menu] .menu button {\n cursor: pointer;\n}\n\n:host, #root, input, button {\n color: rgb(var(--em-rgb-color));\n font-family: var(--font-family);\n font-size: var(--font-size);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n line-height: normal;\n}\n\n*, :before, :after {\n box-sizing: border-box;\n min-width: 0;\n margin: 0;\n padding: 0;\n}\n\n.relative {\n position: relative;\n}\n\n.flex {\n display: flex;\n}\n\n.flex-auto {\n flex: none;\n}\n\n.flex-center {\n justify-content: center;\n}\n\n.flex-column {\n flex-direction: column;\n}\n\n.flex-grow {\n flex: auto;\n}\n\n.flex-middle {\n align-items: center;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.padding {\n padding: var(--padding);\n}\n\n.padding-t {\n padding-top: var(--padding);\n}\n\n.padding-lr {\n padding-left: var(--padding);\n padding-right: var(--padding);\n}\n\n.padding-r {\n padding-right: var(--padding);\n}\n\n.padding-small {\n padding: var(--padding-small);\n}\n\n.padding-small-b {\n padding-bottom: var(--padding-small);\n}\n\n.padding-small-lr {\n padding-left: var(--padding-small);\n padding-right: var(--padding-small);\n}\n\n.margin {\n margin: var(--padding);\n}\n\n.margin-r {\n margin-right: var(--padding);\n}\n\n.margin-l {\n margin-left: var(--padding);\n}\n\n.margin-small-l {\n margin-left: var(--padding-small);\n}\n\n.margin-small-lr {\n margin-left: var(--padding-small);\n margin-right: var(--padding-small);\n}\n\n.align-l {\n text-align: left;\n}\n\n.align-r {\n text-align: right;\n}\n\n.color-a {\n color: var(--color-a);\n}\n\n.color-b {\n color: var(--color-b);\n}\n\n.color-c {\n color: var(--color-c);\n}\n\n.ellipsis {\n white-space: nowrap;\n max-width: 100%;\n width: auto;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.sr-only {\n width: 1px;\n height: 1px;\n position: absolute;\n top: auto;\n left: -10000px;\n overflow: hidden;\n}\n\na {\n cursor: pointer;\n color: rgb(var(--em-rgb-accent));\n}\n\na:hover {\n text-decoration: underline;\n}\n\n.spacer {\n height: 10px;\n}\n\n[dir="rtl"] .scroll {\n padding-left: 0;\n padding-right: var(--padding);\n}\n\n.scroll {\n padding-right: 0;\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n.scroll::-webkit-scrollbar {\n width: var(--sidebar-width);\n height: var(--sidebar-width);\n}\n\n.scroll::-webkit-scrollbar-track {\n border: 0;\n}\n\n.scroll::-webkit-scrollbar-button {\n width: 0;\n height: 0;\n display: none;\n}\n\n.scroll::-webkit-scrollbar-corner {\n background-color: rgba(0, 0, 0, 0);\n}\n\n.scroll::-webkit-scrollbar-thumb {\n min-height: 20%;\n min-height: 65px;\n border: 4px solid rgb(var(--em-rgb-background));\n border-radius: 8px;\n}\n\n.scroll::-webkit-scrollbar-thumb:hover {\n background-color: var(--em-color-border-over) !important;\n}\n\n.scroll:hover::-webkit-scrollbar-thumb {\n background-color: var(--em-color-border);\n}\n\n.sticky {\n z-index: 1;\n background-color: rgba(var(--em-rgb-background), .9);\n -webkit-backdrop-filter: blur(4px);\n backdrop-filter: blur(4px);\n font-weight: 500;\n position: sticky;\n top: -1px;\n}\n\n[dir="rtl"] .search input[type="search"] {\n padding: 10px 2.2em 10px 2em;\n}\n\n[dir="rtl"] .search .loupe {\n left: auto;\n right: .7em;\n}\n\n[dir="rtl"] .search .delete {\n left: .7em;\n right: auto;\n}\n\n.search {\n z-index: 2;\n position: relative;\n}\n\n.search input, .search button {\n font-size: calc(var(--font-size) - 1px);\n}\n\n.search input[type="search"] {\n width: 100%;\n background-color: var(--em-color-border);\n transition-duration: var(--duration);\n transition-property: background-color, box-shadow;\n transition-timing-function: var(--easing);\n border: 0;\n border-radius: 10px;\n outline: 0;\n padding: 10px 2em 10px 2.2em;\n display: block;\n}\n\n.search input[type="search"]::-ms-input-placeholder {\n color: inherit;\n opacity: .6;\n}\n\n.search input[type="search"]::placeholder {\n color: inherit;\n opacity: .6;\n}\n\n.search input[type="search"], .search input[type="search"]::-webkit-search-decoration, .search input[type="search"]::-webkit-search-cancel-button, .search input[type="search"]::-webkit-search-results-button, .search input[type="search"]::-webkit-search-results-decoration {\n -webkit-appearance: none;\n -ms-appearance: none;\n appearance: none;\n}\n\n.search input[type="search"]:focus {\n background-color: rgb(var(--em-rgb-input));\n box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, .2);\n}\n\n.search .icon {\n z-index: 1;\n color: rgba(var(--em-rgb-color), .7);\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.search .loupe {\n pointer-events: none;\n left: .7em;\n}\n\n.search .delete {\n right: .7em;\n}\n\nsvg {\n fill: currentColor;\n width: 1em;\n height: 1em;\n}\n\nbutton {\n -webkit-appearance: none;\n -ms-appearance: none;\n appearance: none;\n cursor: pointer;\n color: currentColor;\n background-color: rgba(0, 0, 0, 0);\n border: 0;\n}\n\n#nav {\n z-index: 2;\n padding-top: 12px;\n padding-bottom: 12px;\n padding-right: var(--sidebar-width);\n position: relative;\n}\n\n#nav button {\n color: var(--color-b);\n transition: color var(--duration) var(--easing);\n}\n\n#nav button:hover {\n color: var(--color-a);\n}\n\n#nav svg, #nav img {\n width: var(--category-icon-size);\n height: var(--category-icon-size);\n}\n\n#nav[dir="rtl"] .bar {\n left: auto;\n right: 0;\n}\n\n#nav .bar {\n width: 100%;\n height: 3px;\n background-color: rgb(var(--em-rgb-accent));\n transition: transform var(--duration) var(--easing);\n border-radius: 3px 3px 0 0;\n position: absolute;\n bottom: -12px;\n left: 0;\n}\n\n#nav button[aria-selected] {\n color: rgb(var(--em-rgb-accent));\n}\n\n#preview {\n z-index: 2;\n padding: calc(var(--padding) + 4px) var(--padding);\n padding-right: var(--sidebar-width);\n position: relative;\n}\n\n#preview .preview-placeholder {\n font-size: var(--preview-placeholder-size);\n}\n\n#preview .preview-title {\n font-size: var(--preview-title-size);\n}\n\n#preview .preview-subtitle {\n font-size: var(--preview-subtitle-size);\n}\n\n#nav:before, #preview:before {\n content: "";\n height: 2px;\n position: absolute;\n left: 0;\n right: 0;\n}\n\n#nav[data-position="top"]:before, #preview[data-position="top"]:before {\n background: linear-gradient(to bottom, var(--em-color-border), transparent);\n top: 100%;\n}\n\n#nav[data-position="bottom"]:before, #preview[data-position="bottom"]:before {\n background: linear-gradient(to top, var(--em-color-border), transparent);\n bottom: 100%;\n}\n\n.category:last-child {\n min-height: calc(100% + 1px);\n}\n\n.category button {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif;\n position: relative;\n}\n\n.category button > * {\n position: relative;\n}\n\n.category button .background {\n opacity: 0;\n background-color: var(--em-color-border);\n transition: opacity var(--duration-fast) var(--easing) var(--duration-instant);\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n\n.category button:hover .background {\n transition-duration: var(--duration-instant);\n transition-delay: 0s;\n}\n\n.category button[aria-selected] .background {\n opacity: 1;\n}\n\n.category button[data-keyboard] .background {\n transition: none;\n}\n\n.row {\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.skin-tone-button {\n border: 1px solid rgba(0, 0, 0, 0);\n border-radius: 100%;\n}\n\n.skin-tone-button:hover {\n border-color: var(--em-color-border);\n}\n\n.skin-tone-button:active .skin-tone {\n transform: scale(.85) !important;\n}\n\n.skin-tone-button .skin-tone {\n transition: transform var(--duration) var(--easing);\n}\n\n.skin-tone-button[aria-selected] {\n background-color: var(--em-color-border);\n border-top-color: rgba(0, 0, 0, .05);\n border-bottom-color: rgba(0, 0, 0, 0);\n border-left-width: 0;\n border-right-width: 0;\n}\n\n.skin-tone-button[aria-selected] .skin-tone {\n transform: scale(.9);\n}\n\n.menu {\n z-index: 2;\n white-space: nowrap;\n border: 1px solid var(--em-color-border);\n background-color: rgba(var(--em-rgb-background), .9);\n -webkit-backdrop-filter: blur(4px);\n backdrop-filter: blur(4px);\n transition-property: opacity, transform;\n transition-duration: var(--duration);\n transition-timing-function: var(--easing);\n border-radius: 10px;\n padding: 4px;\n position: absolute;\n box-shadow: 1px 1px 5px rgba(0, 0, 0, .05);\n}\n\n.menu.hidden {\n opacity: 0;\n}\n\n.menu[data-position="bottom"] {\n transform-origin: 100% 100%;\n}\n\n.menu[data-position="bottom"].hidden {\n transform: scale(.9)rotate(-3deg)translateY(5%);\n}\n\n.menu[data-position="top"] {\n transform-origin: 100% 0;\n}\n\n.menu[data-position="top"].hidden {\n transform: scale(.9)rotate(3deg)translateY(-5%);\n}\n\n.menu input[type="radio"] {\n clip: rect(0 0 0 0);\n width: 1px;\n height: 1px;\n border: 0;\n margin: 0;\n padding: 0;\n position: absolute;\n overflow: hidden;\n}\n\n.menu input[type="radio"]:checked + .option {\n box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent));\n}\n\n.option {\n width: 100%;\n border-radius: 6px;\n padding: 4px 6px;\n}\n\n.option:hover {\n color: #fff;\n background-color: rgb(var(--em-rgb-accent));\n}\n\n.skin-tone {\n width: 16px;\n height: 16px;\n border-radius: 100%;\n display: inline-block;\n position: relative;\n overflow: hidden;\n}\n\n.skin-tone:after {\n content: "";\n mix-blend-mode: overlay;\n background: linear-gradient(rgba(255, 255, 255, .2), rgba(0, 0, 0, 0));\n border: 1px solid rgba(0, 0, 0, .8);\n border-radius: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff;\n}\n\n.skin-tone-1 {\n background-color: #ffc93a;\n}\n\n.skin-tone-2 {\n background-color: #ffdab7;\n}\n\n.skin-tone-3 {\n background-color: #e7b98f;\n}\n\n.skin-tone-4 {\n background-color: #c88c61;\n}\n\n.skin-tone-5 {\n background-color: #a46134;\n}\n\n.skin-tone-6 {\n background-color: #5d4437;\n}\n\n[data-index] {\n justify-content: space-between;\n}\n\n[data-emoji-set="twitter"] .skin-tone:after {\n box-shadow: none;\n border-color: rgba(0, 0, 0, .5);\n}\n\n[data-emoji-set="twitter"] .skin-tone-1 {\n background-color: #fade72;\n}\n\n[data-emoji-set="twitter"] .skin-tone-2 {\n background-color: #f3dfd0;\n}\n\n[data-emoji-set="twitter"] .skin-tone-3 {\n background-color: #eed3a8;\n}\n\n[data-emoji-set="twitter"] .skin-tone-4 {\n background-color: #cfad8d;\n}\n\n[data-emoji-set="twitter"] .skin-tone-5 {\n background-color: #a8805d;\n}\n\n[data-emoji-set="twitter"] .skin-tone-6 {\n background-color: #765542;\n}\n\n[data-emoji-set="google"] .skin-tone:after {\n box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, .4);\n}\n\n[data-emoji-set="google"] .skin-tone-1 {\n background-color: #f5c748;\n}\n\n[data-emoji-set="google"] .skin-tone-2 {\n background-color: #f1d5aa;\n}\n\n[data-emoji-set="google"] .skin-tone-3 {\n background-color: #d4b48d;\n}\n\n[data-emoji-set="google"] .skin-tone-4 {\n background-color: #aa876b;\n}\n\n[data-emoji-set="google"] .skin-tone-5 {\n background-color: #916544;\n}\n\n[data-emoji-set="google"] .skin-tone-6 {\n background-color: #61493f;\n}\n\n[data-emoji-set="facebook"] .skin-tone:after {\n border-color: rgba(0, 0, 0, .4);\n box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff;\n}\n\n[data-emoji-set="facebook"] .skin-tone-1 {\n background-color: #f5c748;\n}\n\n[data-emoji-set="facebook"] .skin-tone-2 {\n background-color: #f1d5aa;\n}\n\n[data-emoji-set="facebook"] .skin-tone-3 {\n background-color: #d4b48d;\n}\n\n[data-emoji-set="facebook"] .skin-tone-4 {\n background-color: #aa876b;\n}\n\n[data-emoji-set="facebook"] .skin-tone-5 {\n background-color: #916544;\n}\n\n[data-emoji-set="facebook"] .skin-tone-6 {\n background-color: #61493f;\n}\n\n'},5073:e=>{"use strict";let n={};function f(e){e.forEach((e=>{if(/(_open$|image)/.test(e.type)&&n[e.tag]){const f=(t=e.attrGet("class"))?t.split(" "):[],a=(i=n[e.tag],Array.isArray(i)?i:[i]);e.attrSet("class",[...f,...a].join(" "))}var i,t;e.children&&f(e.children)}))}function i(e){f(e.tokens)}e.exports=function(e,f){n=f||{},e.core.ruler.push("markdownit-tag-to-class",i)}},4403:(e,n)=>{var f;!function(){"use strict";var i={}.hasOwnProperty;function t(){for(var e=[],n=0;n{f(2154),f(9778),f(9981),f(8966),f(3564),f(5474),f(5550),f(2701),f(4673),f(3328),f(1078),f(91),f(1792),f(3992),f(3890),f(6260),f(9342),f(3478),f(311),f(8720),f(986),f(8866),f(3054),f(4772),f(8150),f(2268),f(344),f(651),f(9613),f(3329),f(751),f(8960),f(253),f(7330),f(7343),f(7944),f(1968),f(4290),f(7082),f(7454),f(4787),f(2033),f(2400),f(4523),f(3199),f(7704),f(5660),f(8600),f(4144),f(7272),f(5838),f(6362),f(4347),f(7794),f(7221),f(8541),f(4078),f(4152),f(3401),f(2041),f(3523),f(7973),f(255),f(5072),f(8760),f(6729),f(4408),f(3211),f(7715),f(181),f(9907),f(8092),f(6769),f(2901),f(5264),f(1598),f(3414),f(6114),f(4075),f(1878),f(5642),f(1672),f(1681),f(844),f(9237),f(110),f(2119),f(9088),f(3758),f(3545),f(3895),f(7659),f(857),f(9114),f(3037),f(663),f(6507),f(6088),f(5183),f(1197),f(2822),f(4231),f(3850),f(6726),f(1274),f(8406),f(2983),f(9311),f(9965),f(8562),f(3663),f(2579),f(3972),f(76),f(3655),f(25),f(6757),f(2173),f(2126),f(6335),f(3757),f(1676),f(6338),f(9632),f(532),f(7495),f(3813),f(1930),f(8676),f(8701),f(5124),f(1621),f(7755),f(5197),f(2),f(8172),f(7301),f(2800),e.exports=f(9547)},4645:(e,n,f)=>{f(2328),e.exports=f(9547).Array.flatMap},239:(e,n,f)=>{f(2323),e.exports=f(9547).Array.includes},1689:(e,n,f)=>{f(1746),e.exports=f(9547).Object.entries},2107:(e,n,f)=>{f(5075),e.exports=f(9547).Object.getOwnPropertyDescriptors},5584:(e,n,f)=>{f(3119),e.exports=f(9547).Object.values},12:(e,n,f)=>{"use strict";f(9965),f(4219),e.exports=f(9547).Promise.finally},4113:(e,n,f)=>{f(1513),e.exports=f(9547).String.padEnd},164:(e,n,f)=>{f(8448),e.exports=f(9547).String.padStart},1775:(e,n,f)=>{f(5270),e.exports=f(9547).String.trimRight},8812:(e,n,f)=>{f(9274),e.exports=f(9547).String.trimLeft},4440:(e,n,f)=>{f(6692),e.exports=f(4692).f("asyncIterator")},3851:(e,n,f)=>{f(8378),e.exports=f(2057).global},2508:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},403:(e,n,f)=>{var i=f(2730);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},2057:e=>{var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},5669:(e,n,f)=>{var i=f(2508);e.exports=function(e,n,f){if(i(e),void 0===n)return e;switch(f){case 1:return function(f){return e.call(n,f)};case 2:return function(f,i){return e.call(n,f,i)};case 3:return function(f,i,t){return e.call(n,f,i,t)}}return function(){return e.apply(n,arguments)}}},3660:(e,n,f)=>{e.exports=!f(1103)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},213:(e,n,f)=>{var i=f(2730),t=f(9314).document,a=i(t)&&i(t.createElement);e.exports=function(e){return a?t.createElement(e):{}}},788:(e,n,f)=>{var i=f(9314),t=f(2057),a=f(5669),r=f(6925),o=f(1911),s=function(e,n,f){var d,c,u,l=e&s.F,g=e&s.G,y=e&s.S,m=e&s.P,h=e&s.B,v=e&s.W,p=g?t:t[n]||(t[n]={}),b=p.prototype,w=g?i:y?i[n]:(i[n]||{}).prototype;for(d in g&&(f=n),f)(c=!l&&w&&void 0!==w[d])&&o(p,d)||(u=c?w[d]:f[d],p[d]=g&&"function"!=typeof w[d]?f[d]:h&&c?a(u,i):v&&w[d]==u?function(e){var n=function(n,f,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,f)}return new e(n,f,i)}return e.apply(this,arguments)};return n.prototype=e.prototype,n}(u):m&&"function"==typeof u?a(Function.call,u):u,m&&((p.virtual||(p.virtual={}))[d]=u,e&s.R&&b&&!b[d]&&r(b,d,u)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},1103:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},9314:e=>{var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},1911:e=>{var n={}.hasOwnProperty;e.exports=function(e,f){return n.call(e,f)}},6925:(e,n,f)=>{var i=f(3273),t=f(209);e.exports=f(3660)?function(e,n,f){return i.f(e,n,t(1,f))}:function(e,n,f){return e[n]=f,e}},6971:(e,n,f)=>{e.exports=!f(3660)&&!f(1103)((function(){return 7!=Object.defineProperty(f(213)("div"),"a",{get:function(){return 7}}).a}))},2730:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},3273:(e,n,f)=>{var i=f(403),t=f(6971),a=f(6783),r=Object.defineProperty;n.f=f(3660)?Object.defineProperty:function(e,n,f){if(i(e),n=a(n,!0),i(f),t)try{return r(e,n,f)}catch(e){}if("get"in f||"set"in f)throw TypeError("Accessors not supported!");return"value"in f&&(e[n]=f.value),e}},209:e=>{e.exports=function(e,n){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:n}}},6783:(e,n,f)=>{var i=f(2730);e.exports=function(e,n){if(!i(e))return e;var f,t;if(n&&"function"==typeof(f=e.toString)&&!i(t=f.call(e)))return t;if("function"==typeof(f=e.valueOf)&&!i(t=f.call(e)))return t;if(!n&&"function"==typeof(f=e.toString)&&!i(t=f.call(e)))return t;throw TypeError("Can't convert object to primitive value")}},8378:(e,n,f)=>{var i=f(788);i(i.G,{global:f(9314)})},1376:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},5894:(e,n,f)=>{var i=f(9805);e.exports=function(e,n){if("number"!=typeof e&&"Number"!=i(e))throw TypeError(n);return+e}},1343:(e,n,f)=>{var i=f(2274)("unscopables"),t=Array.prototype;null==t[i]&&f(1874)(t,i,{}),e.exports=function(e){t[i][e]=!0}},8083:(e,n,f)=>{"use strict";var i=f(8918)(!0);e.exports=function(e,n,f){return n+(f?i(e,n).length:1)}},9646:e=>{e.exports=function(e,n,f,i){if(!(e instanceof n)||void 0!==i&&i in e)throw TypeError(f+": incorrect invocation!");return e}},9944:(e,n,f)=>{var i=f(7375);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},879:(e,n,f)=>{"use strict";var i=f(9366),t=f(7212),a=f(1995);e.exports=[].copyWithin||function(e,n){var f=i(this),r=a(f.length),o=t(e,r),s=t(n,r),d=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===d?r:t(d,r))-s,r-o),u=1;for(s0;)s in f?f[o]=f[s]:delete f[o],o+=u,s+=u;return f}},1499:(e,n,f)=>{"use strict";var i=f(9366),t=f(7212),a=f(1995);e.exports=function(e){for(var n=i(this),f=a(n.length),r=arguments.length,o=t(r>1?arguments[1]:void 0,f),s=r>2?arguments[2]:void 0,d=void 0===s?f:t(s,f);d>o;)n[o++]=e;return n}},6408:(e,n,f)=>{var i=f(8653),t=f(1995),a=f(7212);e.exports=function(e){return function(n,f,r){var o,s=i(n),d=t(s.length),c=a(r,d);if(e&&f!=f){for(;d>c;)if((o=s[c++])!=o)return!0}else for(;d>c;c++)if((e||c in s)&&s[c]===f)return e||c||0;return!e&&-1}}},8098:(e,n,f)=>{var i=f(8267),t=f(6060),a=f(9366),r=f(1995),o=f(412);e.exports=function(e,n){var f=1==e,s=2==e,d=3==e,c=4==e,u=6==e,l=5==e||u,g=n||o;return function(n,o,y){for(var m,h,v=a(n),p=t(v),b=i(o,y,3),w=r(p.length),k=0,A=f?g(n,w):s?g(n,0):void 0;w>k;k++)if((l||k in p)&&(h=b(m=p[k],k,v),e))if(f)A[k]=h;else if(h)switch(e){case 3:return!0;case 5:return m;case 6:return k;case 2:A.push(m)}else if(c)return!1;return u?-1:d||c?c:A}}},9083:(e,n,f)=>{var i=f(1376),t=f(9366),a=f(6060),r=f(1995);e.exports=function(e,n,f,o,s){i(n);var d=t(e),c=a(d),u=r(d.length),l=s?u-1:0,g=s?-1:1;if(f<2)for(;;){if(l in c){o=c[l],l+=g;break}if(l+=g,s?l<0:u<=l)throw TypeError("Reduce of empty array with no initial value")}for(;s?l>=0:u>l;l+=g)l in c&&(o=n(o,c[l],l,d));return o}},4135:(e,n,f)=>{var i=f(7375),t=f(8846),a=f(2274)("species");e.exports=function(e){var n;return t(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!t(n.prototype)||(n=void 0),i(n)&&null===(n=n[a])&&(n=void 0)),void 0===n?Array:n}},412:(e,n,f)=>{var i=f(4135);e.exports=function(e,n){return new(i(e))(n)}},4132:(e,n,f)=>{"use strict";var i=f(1376),t=f(7375),a=f(2849),r=[].slice,o={},s=function(e,n,f){if(!(n in o)){for(var i=[],t=0;t{var i=f(9805),t=f(2274)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=function(e){var n,f,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(f=function(e,n){try{return e[n]}catch(e){}}(n=Object(e),t))?f:a?i(n):"Object"==(r=i(n))&&"function"==typeof n.callee?"Arguments":r}},9805:e=>{var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},2480:(e,n,f)=>{"use strict";var i=f(9048).f,t=f(3171),a=f(8076),r=f(8267),o=f(9646),s=f(7463),d=f(748),c=f(1623),u=f(1699),l=f(1391),g=f(4371).fastKey,y=f(3348),m=l?"_s":"size",h=function(e,n){var f,i=g(n);if("F"!==i)return e._i[i];for(f=e._f;f;f=f.n)if(f.k==n)return f};e.exports={getConstructor:function(e,n,f,d){var c=e((function(e,i){o(e,c,n,"_i"),e._t=n,e._i=t(null),e._f=void 0,e._l=void 0,e[m]=0,null!=i&&s(i,f,e[d],e)}));return a(c.prototype,{clear:function(){for(var e=y(this,n),f=e._i,i=e._f;i;i=i.n)i.r=!0,i.p&&(i.p=i.p.n=void 0),delete f[i.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var f=y(this,n),i=h(f,e);if(i){var t=i.n,a=i.p;delete f._i[i.i],i.r=!0,a&&(a.n=t),t&&(t.p=a),f._f==i&&(f._f=t),f._l==i&&(f._l=a),f[m]--}return!!i},forEach:function(e){y(this,n);for(var f,i=r(e,arguments.length>1?arguments[1]:void 0,3);f=f?f.n:this._f;)for(i(f.v,f.k,this);f&&f.r;)f=f.p},has:function(e){return!!h(y(this,n),e)}}),l&&i(c.prototype,"size",{get:function(){return y(this,n)[m]}}),c},def:function(e,n,f){var i,t,a=h(e,n);return a?a.v=f:(e._l=a={i:t=g(n,!0),k:n,v:f,p:i=e._l,n:void 0,r:!1},e._f||(e._f=a),i&&(i.n=a),e[m]++,"F"!==t&&(e._i[t]=a)),e},getEntry:h,setStrong:function(e,n,f){d(e,n,(function(e,f){this._t=y(e,n),this._k=f,this._l=void 0}),(function(){for(var e=this,n=e._k,f=e._l;f&&f.r;)f=f.p;return e._t&&(e._l=f=f?f.n:e._t._f)?c(0,"keys"==n?f.k:"values"==n?f.v:[f.k,f.v]):(e._t=void 0,c(1))}),f?"entries":"values",!f,!0),u(n)}}},2238:(e,n,f)=>{"use strict";var i=f(8076),t=f(4371).getWeak,a=f(9944),r=f(7375),o=f(9646),s=f(7463),d=f(8098),c=f(3821),u=f(3348),l=d(5),g=d(6),y=0,m=function(e){return e._l||(e._l=new h)},h=function(){this.a=[]},v=function(e,n){return l(e.a,(function(e){return e[0]===n}))};h.prototype={get:function(e){var n=v(this,e);if(n)return n[1]},has:function(e){return!!v(this,e)},set:function(e,n){var f=v(this,e);f?f[1]=n:this.a.push([e,n])},delete:function(e){var n=g(this.a,(function(n){return n[0]===e}));return~n&&this.a.splice(n,1),!!~n}},e.exports={getConstructor:function(e,n,f,a){var d=e((function(e,i){o(e,d,n,"_i"),e._t=n,e._i=y++,e._l=void 0,null!=i&&s(i,f,e[a],e)}));return i(d.prototype,{delete:function(e){if(!r(e))return!1;var f=t(e);return!0===f?m(u(this,n)).delete(e):f&&c(f,this._i)&&delete f[this._i]},has:function(e){if(!r(e))return!1;var f=t(e);return!0===f?m(u(this,n)).has(e):f&&c(f,this._i)}}),d},def:function(e,n,f){var i=t(a(n),!0);return!0===i?m(e).set(n,f):i[e._i]=f,e},ufstore:m}},5787:(e,n,f)=>{"use strict";var i=f(5457),t=f(9005),a=f(9344),r=f(8076),o=f(4371),s=f(7463),d=f(9646),c=f(7375),u=f(8052),l=f(5399),g=f(6103),y=f(3809);e.exports=function(e,n,f,m,h,v){var p=i[e],b=p,w=h?"set":"add",k=b&&b.prototype,A={},x=function(e){var n=k[e];a(k,e,"delete"==e||"has"==e?function(e){return!(v&&!c(e))&&n.call(this,0===e?0:e)}:"get"==e?function(e){return v&&!c(e)?void 0:n.call(this,0===e?0:e)}:"add"==e?function(e){return n.call(this,0===e?0:e),this}:function(e,f){return n.call(this,0===e?0:e,f),this})};if("function"==typeof b&&(v||k.forEach&&!u((function(){(new b).entries().next()})))){var _=new b,M=_[w](v?{}:-0,1)!=_,C=u((function(){_.has(1)})),I=l((function(e){new b(e)})),E=!v&&u((function(){for(var e=new b,n=5;n--;)e[w](n,n);return!e.has(-0)}));I||((b=n((function(n,f){d(n,b,e);var i=y(new p,n,b);return null!=f&&s(f,h,i[w],i),i}))).prototype=k,k.constructor=b),(C||E)&&(x("delete"),x("has"),h&&x("get")),(E||M)&&x(w),v&&k.clear&&delete k.clear}else b=m.getConstructor(n,e,h,w),r(b.prototype,f),o.NEED=!0;return g(b,e),A[e]=b,t(t.G+t.W+t.F*(b!=p),A),v||m.setStrong(b,e,h),b}},9547:e=>{var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},7862:(e,n,f)=>{"use strict";var i=f(9048),t=f(487);e.exports=function(e,n,f){n in e?i.f(e,n,t(0,f)):e[n]=f}},8267:(e,n,f)=>{var i=f(1376);e.exports=function(e,n,f){if(i(e),void 0===n)return e;switch(f){case 1:return function(f){return e.call(n,f)};case 2:return function(f,i){return e.call(n,f,i)};case 3:return function(f,i,t){return e.call(n,f,i,t)}}return function(){return e.apply(n,arguments)}}},8521:(e,n,f)=>{"use strict";var i=f(8052),t=Date.prototype.getTime,a=Date.prototype.toISOString,r=function(e){return e>9?e:"0"+e};e.exports=i((function(){return"0385-07-25T07:06:39.999Z"!=a.call(new Date(-50000000000001))}))||!i((function(){a.call(new Date(NaN))}))?function(){if(!isFinite(t.call(this)))throw RangeError("Invalid time value");var e=this,n=e.getUTCFullYear(),f=e.getUTCMilliseconds(),i=n<0?"-":n>9999?"+":"";return i+("00000"+Math.abs(n)).slice(i?-6:-4)+"-"+r(e.getUTCMonth()+1)+"-"+r(e.getUTCDate())+"T"+r(e.getUTCHours())+":"+r(e.getUTCMinutes())+":"+r(e.getUTCSeconds())+"."+(f>99?f:"0"+r(f))+"Z"}:a},1723:(e,n,f)=>{"use strict";var i=f(9944),t=f(7408),a="number";e.exports=function(e){if("string"!==e&&e!==a&&"default"!==e)throw TypeError("Incorrect hint");return t(i(this),e!=a)}},1559:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},1391:(e,n,f)=>{e.exports=!f(8052)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},6406:(e,n,f)=>{var i=f(7375),t=f(5457).document,a=i(t)&&i(t.createElement);e.exports=function(e){return a?t.createElement(e):{}}},2892:e=>{e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},7874:(e,n,f)=>{var i=f(7106),t=f(1587),a=f(4648);e.exports=function(e){var n=i(e),f=t.f;if(f)for(var r,o=f(e),s=a.f,d=0;o.length>d;)s.call(e,r=o[d++])&&n.push(r);return n}},9005:(e,n,f)=>{var i=f(5457),t=f(9547),a=f(1874),r=f(9344),o=f(8267),s=function(e,n,f){var d,c,u,l,g=e&s.F,y=e&s.G,m=e&s.S,h=e&s.P,v=e&s.B,p=y?i:m?i[n]||(i[n]={}):(i[n]||{}).prototype,b=y?t:t[n]||(t[n]={}),w=b.prototype||(b.prototype={});for(d in y&&(f=n),f)u=((c=!g&&p&&void 0!==p[d])?p:f)[d],l=v&&c?o(u,i):h&&"function"==typeof u?o(Function.call,u):u,p&&r(p,d,u,e&s.U),b[d]!=u&&a(b,d,l),h&&w[d]!=u&&(w[d]=u)};i.core=t,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},4088:(e,n,f)=>{var i=f(2274)("match");e.exports=function(e){var n=/./;try{"/./"[e](n)}catch(f){try{return n[i]=!1,!"/./"[e](n)}catch(e){}}return!0}},8052:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},5712:(e,n,f)=>{"use strict";f(4231);var i=f(9344),t=f(1874),a=f(8052),r=f(1559),o=f(2274),s=f(115),d=o("species"),c=!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),u=function(){var e=/(?:)/,n=e.exec;e.exec=function(){return n.apply(this,arguments)};var f="ab".split(e);return 2===f.length&&"a"===f[0]&&"b"===f[1]}();e.exports=function(e,n,f){var l=o(e),g=!a((function(){var n={};return n[l]=function(){return 7},7!=""[e](n)})),y=g?!a((function(){var n=!1,f=/a/;return f.exec=function(){return n=!0,null},"split"===e&&(f.constructor={},f.constructor[d]=function(){return f}),f[l](""),!n})):void 0;if(!g||!y||"replace"===e&&!c||"split"===e&&!u){var m=/./[l],h=f(r,l,""[e],(function(e,n,f,i,t){return n.exec===s?g&&!t?{done:!0,value:m.call(n,f,i)}:{done:!0,value:e.call(f,n,i)}:{done:!1}})),v=h[0],p=h[1];i(String.prototype,e,v),t(RegExp.prototype,l,2==n?function(e,n){return p.call(e,this,n)}:function(e){return p.call(e,this)})}}},1576:(e,n,f)=>{"use strict";var i=f(9944);e.exports=function(){var e=i(this),n="";return e.global&&(n+="g"),e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),e.sticky&&(n+="y"),n}},7597:(e,n,f)=>{"use strict";var i=f(8846),t=f(7375),a=f(1995),r=f(8267),o=f(2274)("isConcatSpreadable");e.exports=function e(n,f,s,d,c,u,l,g){for(var y,m,h=c,v=0,p=!!l&&r(l,g,3);v0)h=e(n,f,y,a(y.length),h,u-1)-1;else{if(h>=9007199254740991)throw TypeError();n[h]=y}h++}v++}return h}},7463:(e,n,f)=>{var i=f(8267),t=f(2456),a=f(2325),r=f(9944),o=f(1995),s=f(6649),d={},c={},u=e.exports=function(e,n,f,u,l){var g,y,m,h,v=l?function(){return e}:s(e),p=i(f,u,n?2:1),b=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(a(v)){for(g=o(e.length);g>b;b++)if((h=n?p(r(y=e[b])[0],y[1]):p(e[b]))===d||h===c)return h}else for(m=v.call(e);!(y=m.next()).done;)if((h=t(m,p,y.value,n))===d||h===c)return h};u.BREAK=d,u.RETURN=c},8088:(e,n,f)=>{e.exports=f(1629)("native-function-to-string",Function.toString)},5457:e=>{var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},3821:e=>{var n={}.hasOwnProperty;e.exports=function(e,f){return n.call(e,f)}},1874:(e,n,f)=>{var i=f(9048),t=f(487);e.exports=f(1391)?function(e,n,f){return i.f(e,n,t(1,f))}:function(e,n,f){return e[n]=f,e}},5414:(e,n,f)=>{var i=f(5457).document;e.exports=i&&i.documentElement},6553:(e,n,f)=>{e.exports=!f(1391)&&!f(8052)((function(){return 7!=Object.defineProperty(f(6406)("div"),"a",{get:function(){return 7}}).a}))},3809:(e,n,f)=>{var i=f(7375),t=f(2549).set;e.exports=function(e,n,f){var a,r=n.constructor;return r!==f&&"function"==typeof r&&(a=r.prototype)!==f.prototype&&i(a)&&t&&t(e,a),e}},2849:e=>{e.exports=function(e,n,f){var i=void 0===f;switch(n.length){case 0:return i?e():e.call(f);case 1:return i?e(n[0]):e.call(f,n[0]);case 2:return i?e(n[0],n[1]):e.call(f,n[0],n[1]);case 3:return i?e(n[0],n[1],n[2]):e.call(f,n[0],n[1],n[2]);case 4:return i?e(n[0],n[1],n[2],n[3]):e.call(f,n[0],n[1],n[2],n[3])}return e.apply(f,n)}},6060:(e,n,f)=>{var i=f(9805);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},2325:(e,n,f)=>{var i=f(5616),t=f(2274)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[t]===e)}},8846:(e,n,f)=>{var i=f(9805);e.exports=Array.isArray||function(e){return"Array"==i(e)}},8177:(e,n,f)=>{var i=f(7375),t=Math.floor;e.exports=function(e){return!i(e)&&isFinite(e)&&t(e)===e}},7375:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},786:(e,n,f)=>{var i=f(7375),t=f(9805),a=f(2274)("match");e.exports=function(e){var n;return i(e)&&(void 0!==(n=e[a])?!!n:"RegExp"==t(e))}},2456:(e,n,f)=>{var i=f(9944);e.exports=function(e,n,f,t){try{return t?n(i(f)[0],f[1]):n(f)}catch(n){var a=e.return;throw void 0!==a&&i(a.call(e)),n}}},5242:(e,n,f)=>{"use strict";var i=f(3171),t=f(487),a=f(6103),r={};f(1874)(r,f(2274)("iterator"),(function(){return this})),e.exports=function(e,n,f){e.prototype=i(r,{next:t(1,f)}),a(e,n+" Iterator")}},748:(e,n,f)=>{"use strict";var i=f(409),t=f(9005),a=f(9344),r=f(1874),o=f(5616),s=f(5242),d=f(6103),c=f(662),u=f(2274)("iterator"),l=!([].keys&&"next"in[].keys()),g="keys",y="values",m=function(){return this};e.exports=function(e,n,f,h,v,p,b){s(f,n,h);var w,k,A,x=function(e){if(!l&&e in I)return I[e];switch(e){case g:case y:return function(){return new f(this,e)}}return function(){return new f(this,e)}},_=n+" Iterator",M=v==y,C=!1,I=e.prototype,E=I[u]||I["@@iterator"]||v&&I[v],D=E||x(v),j=v?M?x("entries"):D:void 0,B="Array"==n&&I.entries||E;if(B&&(A=c(B.call(new e)))!==Object.prototype&&A.next&&(d(A,_,!0),i||"function"==typeof A[u]||r(A,u,m)),M&&E&&E.name!==y&&(C=!0,D=function(){return E.call(this)}),i&&!b||!l&&!C&&I[u]||r(I,u,D),o[n]=D,o[_]=m,v)if(w={values:M?D:x(y),keys:p?D:x(g),entries:j},b)for(k in w)k in I||a(I,k,w[k]);else t(t.P+t.F*(l||C),n,w);return w}},5399:(e,n,f)=>{var i=f(2274)("iterator"),t=!1;try{var a=[7][i]();a.return=function(){t=!0},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,n){if(!n&&!t)return!1;var f=!1;try{var a=[7],r=a[i]();r.next=function(){return{done:f=!0}},a[i]=function(){return r},e(a)}catch(e){}return f}},1623:e=>{e.exports=function(e,n){return{value:n,done:!!e}}},5616:e=>{e.exports={}},409:e=>{e.exports=!1},1028:e=>{var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},3081:(e,n,f)=>{var i=f(492),t=Math.pow,a=t(2,-52),r=t(2,-23),o=t(2,127)*(2-r),s=t(2,-126);e.exports=Math.fround||function(e){var n,f,t=Math.abs(e),d=i(e);return to||f!=f?d*(1/0):d*f}},6557:e=>{e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},492:e=>{e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},4371:(e,n,f)=>{var i=f(4197)("meta"),t=f(7375),a=f(3821),r=f(9048).f,o=0,s=Object.isExtensible||function(){return!0},d=!f(8052)((function(){return s(Object.preventExtensions({}))})),c=function(e){r(e,i,{value:{i:"O"+ ++o,w:{}}})},u=e.exports={KEY:i,NEED:!1,fastKey:function(e,n){if(!t(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,i)){if(!s(e))return"F";if(!n)return"E";c(e)}return e[i].i},getWeak:function(e,n){if(!a(e,i)){if(!s(e))return!0;if(!n)return!1;c(e)}return e[i].w},onFreeze:function(e){return d&&u.NEED&&s(e)&&!a(e,i)&&c(e),e}}},9392:(e,n,f)=>{var i=f(5457),t=f(4756).set,a=i.MutationObserver||i.WebKitMutationObserver,r=i.process,o=i.Promise,s="process"==f(9805)(r);e.exports=function(){var e,n,f,d=function(){var i,t;for(s&&(i=r.domain)&&i.exit();e;){t=e.fn,e=e.next;try{t()}catch(i){throw e?f():n=void 0,i}}n=void 0,i&&i.enter()};if(s)f=function(){r.nextTick(d)};else if(!a||i.navigator&&i.navigator.standalone)if(o&&o.resolve){var c=o.resolve(void 0);f=function(){c.then(d)}}else f=function(){t.call(i,d)};else{var u=!0,l=document.createTextNode("");new a(d).observe(l,{characterData:!0}),f=function(){l.data=u=!u}}return function(i){var t={fn:i,next:void 0};n&&(n.next=t),e||(e=t,f()),n=t}}},4621:(e,n,f)=>{"use strict";var i=f(1376);function t(e){var n,f;this.promise=new e((function(e,i){if(void 0!==n||void 0!==f)throw TypeError("Bad Promise constructor");n=e,f=i})),this.resolve=i(n),this.reject=i(f)}e.exports.f=function(e){return new t(e)}},7103:(e,n,f)=>{"use strict";var i=f(1391),t=f(7106),a=f(1587),r=f(4648),o=f(9366),s=f(6060),d=Object.assign;e.exports=!d||f(8052)((function(){var e={},n={},f=Symbol(),i="abcdefghijklmnopqrst";return e[f]=7,i.split("").forEach((function(e){n[e]=e})),7!=d({},e)[f]||Object.keys(d({},n)).join("")!=i}))?function(e,n){for(var f=o(e),d=arguments.length,c=1,u=a.f,l=r.f;d>c;)for(var g,y=s(arguments[c++]),m=u?t(y).concat(u(y)):t(y),h=m.length,v=0;h>v;)g=m[v++],i&&!l.call(y,g)||(f[g]=y[g]);return f}:d},3171:(e,n,f)=>{var i=f(9944),t=f(5046),a=f(2892),r=f(8261)("IE_PROTO"),o=function(){},s=function(){var e,n=f(6406)("iframe"),i=a.length;for(n.style.display="none",f(5414).appendChild(n),n.src="javascript:",(e=n.contentWindow.document).open(),e.write("