-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin-conference
1 lines (1 loc) · 33.2 KB
/
plugin-conference
1
(()=>{var e={648:(e,t,n)=>{var r=n(601),i=n(314)(r);i.push([e.id,"\n.plugin-conference-join {\n box-sizing: border-box;\n width: 100%;\n padding: 20px;\n font-size: 1.05em;\n line-height: 1.05em;\n text-align: center;\n background: var(--brand-midtone);\n}\n.plugin-conference-jointext {\n display: inline-block;\n margin-right: 10px;\n line-height: 2em;\n}\n.plugin-conference-joinbutton {\n margin-left: 8px;\n}\n",""]),e.exports=i},381:(e,t,n)=>{var r=n(601),i=n(314)(r);i.push([e.id,".p-conference-prompt{position:absolute;top:44px;right:10px;padding:10px;font-size:1.2em;font-weight:400;color:var(--brand-default-fg, #000);background-color:var(--brand-default-bg, #fff);border-radius:0 0 10px 10px}.p-conference-prompt a.u-button-warning{color:var(--brand-default-bg);background-color:var(--brand-error)}",""]),e.exports=i},117:(e,t,n)=>{var r=n(601),i=n(314)(r);i.push([e.id,".p-conference-jitsi{height:100%;overflow:hidden}.p-conference-overlay{position:absolute;top:0;left:0;z-index:10;padding:6px 6px 2px 6px;color:#fff;background-color:rgba(0,0,0,.2)}.p-conference-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:20px;background-color:rgba(0,0,0,.6)}.p-conference-loading>svg{width:min(max(20vb,80px),200px);height:min(max(20vb,80px),200px);fill:#fff}.p-conference-loading>i{font-size:100px}.p-conference-notsupported{display:inline-block;padding:25px;margin:25px auto;font-size:130%;font-weight:600;color:var(--brand-default-fg);background-color:var(--brand-error);border-radius:5px}",""]),e.exports=i},314:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var c=0;c<this.length;c++){var s=this[c][0];null!=s&&(a[s]=!0)}for(var u=0;u<e.length;u++){var l=[].concat(e[u]);r&&a[l[0]]||(void 0!==o&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=o),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),t.push(l))}},t}},601:e=>{"use strict";e.exports=function(e){return e[1]}},255:(e,t,n)=>{var r=n(648);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);(0,n(534).A)("ac135020",r,!1,{})},604:(e,t,n)=>{var r=n(381);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);(0,n(534).A)("d0298de0",r,!1,{})},516:(e,t,n)=>{var r=n(117);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);(0,n(534).A)("1f43c74a",r,!1,{})},534:(e,t,n)=>{"use strict";function r(e,t){for(var n=[],r={},i=0;i<t.length;i++){var o=t[i],a=o[0],c={id:e+":"+i,css:o[1],media:o[2],sourceMap:o[3]};r[a]?r[a].parts.push(c):n.push(r[a]={id:a,parts:[c]})}return n}n.d(t,{A:()=>d});var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o={},a=i&&(document.head||document.getElementsByTagName("head")[0]),c=null,s=0,u=!1,l=function(){},f=null,p="data-vue-ssr-id",h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function d(e,t,n,i){u=n,f=i||{};var a=r(e,t);return v(a),function(t){for(var n=[],i=0;i<a.length;i++){var c=a[i];(s=o[c.id]).refs--,n.push(s)}t?v(a=r(e,t)):a=[];for(i=0;i<n.length;i++){var s;if(0===(s=n[i]).refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete o[s.id]}}}}function v(e){for(var t=0;t<e.length;t++){var n=e[t],r=o[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(m(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i<n.parts.length;i++)a.push(m(n.parts[i]));o[n.id]={id:n.id,refs:1,parts:a}}}}function g(){var e=document.createElement("style");return e.type="text/css",a.appendChild(e),e}function m(e){var t,n,r=document.querySelector("style["+p+'~="'+e.id+'"]');if(r){if(u)return l;r.parentNode.removeChild(r)}if(h){var i=s++;r=c||(c=g()),t=b.bind(null,r,i,!1),n=b.bind(null,r,i,!0)}else r=g(),t=x.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var y,w=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function b(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function x(e,t){var n=t.css,r=t.media,i=t.sourceMap;if(r&&e.setAttribute("media",r),f.ssrId&&e.setAttribute(p,t.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,exports:{}};return e[r](o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";e=document.getElementsByTagName("script"),(t=e[e.length-1].src).substr(0,t.lastIndexOf("/")+1);var e,t,r="plugin-conference",i={tagID:1,secure:!1,server:"meet.jit.si",queries:!0,channels:!0,closeOnLeave:!0,buttonIcon:"fa-phone",viewHeight:"40%",enabledInChannels:[],disabledInChannels:[],groupInvitesTTL:3e4,maxParticipantsLength:60,inviteText:"{{ nick }} is inviting you to a private call.",joinText:"{{ nick }} has joined the conference.",showLink:!1,useLinkShortener:!1,linkShortenerURL:"https://x0.no/api/?{{ link }}",linkShortenerAPIToken:"",interfaceConfigOverwrite:{SHOW_JITSI_WATERMARK:!1,SHOW_WATERMARK_FOR_GUESTS:!1,TOOLBAR_BUTTONS:["camera","closedcaptions","desktop","etherpad","filmstrip","fullscreen","hangup","help","highlight","livestreaming","microphone","noisesuppression","raisehand","select-background","settings","shortcuts","stats","tileview","toggle-camera"]},configOverwrite:{startWithVideoMuted:!0,startWithAudioMuted:!0}};function o(){var e=kiwi.state.getSetting("settings.conference");e&&(console.warn('[DEPRECATION] Please update your conference config to use "plugin-conference" as its object key'),kiwi.setConfigDefaults(r,e)),kiwi.setConfigDefaults(r,i),kiwi.state.getSetting("settings.plugin-conference.enabledInChannels").includes("*")&&console.warn('[CONFIG] Warning "*" is no longer used in "enabledInChannels" please remove it.')}function a(e,t){return kiwi.state.setting([r,e].join("."),t)}function c(e){return kiwi.state.getSetting(["settings",r,e].join("."))}const s={"en-us":{notSupported:"This browser is not supported.\nPlease update your browser.",closeConference:"Close the current conference?",joinNow:"Join now!",inviteText:"{{ nick }} is inviting you to a private call.",joinText:"{{ nick }} has joined the conference.",participantsMore:"more..."},"fr-fr":{notSupported:"Ce navigateur n’est pas pris en charge.\nVeuillez mettre à jour votre navigateur.",closeConference:"Fermer la conférence en cours ?",joinNow:"Rejoignez maintenant !",inviteText:"{{ nick }} vous invite à un appel privé.",joinText:"{{ nick }} a rejoint la conférence.",participantsMore:"plus..."},"de-de":{notSupported:"Dein Browser wird nicht unterstützt.\nBitte aktualisiere deinen Browser.",closeConference:"Die aktuelle Konferenz schließen?",joinNow:"Jetzt beitreten!",inviteText:"{{ nick }} lädt dich zu einem privaten Anruf ein.",joinText:"{{ nick }} ist der Konferenz beigetreten.",participantsMore:"mehr..."},"it-it":{notSupported:"Questo browser non è supportato.\nAggiorna il tuo browser.",closeConference:"Chiudere la conferenza in corso?",joinNow:"Unisciti ora!",inviteText:"{{ nick }} ti sta invitando ad una conferenza privata.",joinText:"{{ nick }} si è unito alla conferenza.",participantsMore:"altri..."},"tr-tr":{notSupported:"Bu tarayıcı desteklenmiyor.\nLütfen tarayıcınızı güncelleyin.",closeConference:"Mevcut görüşmeyi kapatmak istediğinizden emin misiniz?",joinNow:"Şimdi Bağlan!",inviteText:"{{ nick }} sizi özel görüşmeye davet ediyor.",joinText:"{{ nick }} sesli ve görüntülü sohbete bağlandı.",participantsMore:"Daha fazla..."},"es-es":{notSupported:"Este navegador no es compatible.\nPor favor, actualiza tu navegador.",closeConference:"¿Cerrar la conferencia actual?",joinNow:"¡Únete ahora!",inviteText:"{{ nick }} te está invitando a una llamada privada.",joinText:"{{ nick }} se ha unido a la conferencia.",participantsMore:"más..."}};var u=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.showButton?n("div",{staticClass:"p-conference-button",class:{"kiwi-header-option--active":e.pluginState.isActive}},[e.closePrompt?n("div",{staticClass:"p-conference-prompt"},[n("div",[e._v(e._s(e.$t("plugin-conference:closeConference")))]),e._v(" "),n("input-confirm",{attrs:{"flip-connotation":!0},on:{ok:function(t){return e.closeConference()},submit:function(t){return e.hideToast()}}})],1):e._e(),e._v(" "),n("div",{on:{click:function(t){return e.openConference()}}},[n("a",[n("i",{staticClass:"fa",class:e.buttonIcon,attrs:{"aria-hidden":"true"}})])])]):e._e()};u._withStripped=!0;var l=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"p-conference-jitsi"},[e.isJoined?n("div",{staticClass:"p-conference-overlay"},[e._v(e._s(e.roomName)+" @ "+e._s(e.network.name))]):e._e(),e._v(" "),e.isLoading?n("div",{staticClass:"p-conference-loading"},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"}},[n("g",[n("circle",{attrs:{cx:"12",cy:"2.5",r:"1.5",opacity:"0.14"}}),e._v(" "),n("circle",{attrs:{cx:"16.75",cy:"3.77",r:"1.5",opacity:"0.29"}}),e._v(" "),n("circle",{attrs:{cx:"20.23",cy:"7.25",r:"1.5",opacity:"0.43"}}),e._v(" "),n("circle",{attrs:{cx:"21.5",cy:"12",r:"1.5",opacity:"0.57"}}),e._v(" "),n("circle",{attrs:{cx:"20.23",cy:"16.75",r:"1.5",opacity:"0.71"}}),e._v(" "),n("circle",{attrs:{cx:"16.75",cy:"20.23",r:"1.5",opacity:"0.86"}}),e._v(" "),n("circle",{attrs:{cx:"12",cy:"21.5",r:"1.5"}}),e._v(" "),n("animateTransform",{attrs:{attributeName:"transform",calcMode:"discrete",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180\n 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12;360 12 12"}})],1)])]):e.notSupported?n("div",{staticClass:"p-conference-notsupported"},[e._v("\n "+e._s(e.$t("plugin-conference:notSupported"))+"\n ")]):e._e()])};function f(e){return f="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},f(e)}function p(){p=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof w?t:w,a=Object.create(o.prototype),c=new P(r||[]);return i(a,"_invoke",{value:C(e,n,c)}),a}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var d="suspendedStart",v="suspendedYield",g="executing",m="completed",y={};function w(){}function b(){}function x(){}var k={};u(k,a,(function(){return this}));var _=Object.getPrototypeOf,L=_&&_(_(A([])));L&&L!==n&&r.call(L,a)&&(k=L);var S=x.prototype=w.prototype=Object.create(k);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(i,o,a,c){var s=h(e[i],e,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==f(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,c)}))}c(s.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=d;return function(o,a){if(i===g)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var c=r.delegate;if(c){var s=T(c,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var u=h(t,n,r);if("normal"===u.type){if(i=r.done?m:v,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=m,r.method="throw",r.arg=u.arg)}}}function T(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=h(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(f(t)+" is not iterable")}return b.prototype=x,i(S,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:b,configurable:!0}),b.displayName=u(x,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,u(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},j(E.prototype),u(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new E(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(S),u(S,s,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return c.type="throw",c.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;N(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function h(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,i)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){h(o,r,i,a,c,"next",e)}function c(e){h(o,r,i,a,c,"throw",e)}a(void 0)}))}}l._withStripped=!0;var v="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function g(e){for(var t="",n=[],r=0;r<e.length;r++)n.push(e[r]);for(;n.length>0;){for(var i=[],o=0,a=n.length-1;a>=0;a--){var c=n[a]+256*o,s=Math.floor(c/62);o=c%62,(i.length>0||s>0)&&i.unshift(s)}t+=v[o],n=i}return t}function m(e){return y.apply(this,arguments)}function y(){return(y=d(p().mark((function e(t){var n,r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(new TextEncoder).encode(t),e.next=3,crypto.subtle.digest("SHA-256",n);case 3:return r=e.sent,e.abrupt("return",new Uint8Array(r));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(){return(w=d(p().mark((function e(t){var n;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m(t);case 2:return n=e.sent,e.abrupt("return",g(n).slice(-16));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return b="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},b(e)}function x(){x=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),c=new P(r||[]);return i(a,"_invoke",{value:C(e,n,c)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",h="suspendedYield",d="executing",v="completed",g={};function m(){}function y(){}function w(){}var k={};u(k,a,(function(){return this}));var _=Object.getPrototypeOf,L=_&&_(_(A([])));L&&L!==n&&r.call(L,a)&&(k=L);var S=w.prototype=m.prototype=Object.create(k);function j(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(i,o,a,c){var s=f(e[i],e,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==b(l)&&r.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,c)}))}c(s.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function C(t,n,r){var i=p;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var c=r.delegate;if(c){var s=T(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var u=f(t,n,r);if("normal"===u.type){if(i=r.done?v:h,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=v,r.method="throw",r.arg=u.arg)}}}function T(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(b(t)+" is not iterable")}return y.prototype=w,i(S,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:y,configurable:!0}),y.displayName=u(w,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,u(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},j(E.prototype),u(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new E(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(S),u(S,s,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return c.type="throw",c.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;N(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function k(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,i)}function _(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){k(o,r,i,a,c,"next",e)}function c(e){k(o,r,i,a,c,"throw",e)}a(void 0)}))}}const L={props:["componentProps"],data:function(){return{api:null,link:"",token:"",encodedRoomName:"",isJoined:!1,isLoading:!1,loadingAnimation:null,notSupported:!1}},computed:{roomName:function(){if(this.buffer.isQuery()){var e=[this.network.nick,this.buffer.name];return e.sort(),e.join("+")}return this.buffer.name},buffer:function(){return this.componentProps.buffer},network:function(){return this.buffer.getNetwork()}},watch:{"buffer.joined":function(e){!e&&a("closeOnLeave")&&kiwi.emit("mediaviewer.hide")}},mounted:function(){var e=this;if(this.isLoading=!0,a("secure")){kiwi.on("irc.raw.EXTJWT",this.handleExtjwt);var t=this.buffer.isQuery()?"*":this.roomName;this.network.ircClient.raw("EXTJWT",t)}else this.scriptLoad();this.$nextTick((function(){e.$parent.setHeight(a("viewHeight"))}))},beforeDestroy:function(){this.componentProps.pluginState.isActive=!1;var e=this.$el.parentElement;e&&(e.style.height=""),this.api&&this.api.dispose()},methods:{handleExtjwt:function(e,t){"*"===t.params[2]?this.token=t.params[3]:(this.token+=t.params[2],this.scriptLoad(),kiwi.off("irc.raw.EXTJWT",this.handleExtjwt))},scriptLoad:function(){var e=this,t=function(e){return w.apply(this,arguments)}(this.network.connection.server+"/"+this.roomName),n=document.createElement("script");n.src="https://"+a("server")+"/external_api.js",n.onload=_(x().mark((function n(){var r;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t;case 2:r=n.sent,e.encodedRoomName=e.buffer.isQuery()?"q-"+r:r,e.scriptLoaded();case 5:case"end":return n.stop()}}),n)}))),n.defer=!0,this.$el.appendChild(n)},scriptLoaded:function(){var e=this,t=a("configOverwrite");Object.assign(t,{prejoinPageEnabled:!1,prejoinConfig:{enabled:!1},hideConferenceSubject:!0}),a("showLink")&&!this.link&&this.getLink();var n=this.network.currentUser(),r=a("server"),i={roomName:this.encodedRoomName,userInfo:{displayName:this.network.nick},parentNode:this.$el,configOverwrite:t,interfaceConfigOverwrite:a("interfaceConfigOverwrite"),onload:function(){e.api.executeCommand("toggleTileView"),e.api.once("videoConferenceJoined",(function(t){e.isLoading=!1,e.isJoined=!0,n.avatar&&(n.avatar.large||n.avatar.small)&&e.api.executeCommand("avatarUrl",n.avatar.large||n.avatar.small),a("showLink")&&!e.link||e.sendJoinMessage()})),e.api.once("videoConferenceLeft",(function(){kiwi.emit("mediaviewer.hide")})),e.api.once("browserSupport",(function(t){t.supported||(e.isLoading=!1,e.isJoined=!1,e.notSupported=!0)}))}};a("secure")&&(i.jwt=this.token),this.api=new window.JitsiMeetExternalAPI(r,i)},sendJoinMessage:function(){var e=this.buffer.isQuery()?a("inviteText"):a("joinText");e="* "+e.replace("{{ nick }}",this.network.nick),a("showLink")&&this.link&&(e+=" "+this.link);var t=new this.network.ircClient.Message("PRIVMSG",this.buffer.name,e);t.prefix=this.network.nick,t.tags["+kiwiirc.com/conference"]=c("tagID"),this.network.ircClient.raw(t)},getLink:function(){var e="https://"+a("server")+"/"+this.encodedRoomName;if(a("useLinkShortener")){var t=a("linkShortenerURL");t.indexOf("api-ssl.bitly.com")>-1?this.getBitlyLink(t,e):this.getShortLink(t,e)}else this.link=e},getShortLink:function(e,t){var n=this,r=e.replace("{{ link }}",t);fetch(r).then((function(e){return e.text()})).then((function(e){var t=kiwi.require("helpers/TextFormatting").urlRegex;new RegExp("^"+t.source+"$").test(e)&&(n.link=e),n.isJoined&&n.sendJoinMessage()}))},getBitlyLink:function(e,t){var n=this,r=a("linkShortenerAPIToken");fetch(e+"?access_token="+r+"&longUrl="+t).then((function(e){return e.json()})).then((function(e){n.link=e.url,n.isJoined&&n.sendJoinMessage()}))}}};n(516);function S(e,t,n,r,i,o,a,c){var s,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(s=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=s):i&&(s=c?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),s)if(u.functional){u._injectStyles=s;var l=u.render;u.render=function(e,t){return s.call(t),l(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,s):[s]}return{exports:e,options:u}}const j=S(L,l,[],!1,null,null,null).exports,E={props:["network","buffer","sidebarState","pluginState"],data:function(){return{closePrompt:!1}},computed:{showButton:function(){return function(e){if(e.isQuery())return!0;var t=!1,n=c("enabledInChannels");n.length?n.includes(e.name.toLowerCase())&&(t=!0):t=!0;var r=c("disabledInChannels");return r.length&&r.includes(e.name.toLowerCase())&&(t=!1),t}(this.buffer)},buttonIcon:function(){return a("buttonIcon")}},methods:{openConference:function(){if(!this.pluginState.isActive)return this.pluginState.isActive=!0,void kiwi.emit("mediaviewer.show",{component:j,componentProps:{pluginState:this.pluginState,buffer:this.buffer}});this.closePrompt=!0},closeConference:function(){kiwi.emit("mediaviewer.hide")},hideToast:function(){this.closePrompt=!1}}};n(604);const C=S(E,u,[],!1,null,null,null).exports;var T=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"plugin-conference-join"},[n("div",{staticClass:"plugin-conference-jointext"},[e._v("\n "+e._s(e.$t("plugin-conference:"+(e.buffer.isQuery()?"inviteText":"joinText"),{nick:e.nicks.join(", ")}))+"\n ")]),e._v(" "),e.shouldShowButtons?n("div",{staticClass:"u-button u-button-primary",on:{click:function(t){return e.openJitsi()}}},[n("i",{staticClass:"fa fa-phone",attrs:{"aria-hidden":"true"}}),e._v(" "),n("span",{staticClass:"plugin-conference-joinbutton"},[e._v(e._s(e.$t("plugin-conference:joinNow")))])]):e._e()])};T._withStripped=!0;var O=kiwi.require("helpers/TextFormatting");const N={props:["buffer","message","idx","ml","pluginState","inviteState"],computed:{nicks:function(){for(var e=a("maxParticipantsLength"),t=[],n=0,r=0;r<this.inviteState.members.length;r++){var i=this.inviteState.members[r];if((n+=i.length)>e){t.push(O.t("plugin-conference:participantsMore"));break}t.push(i)}return t},shouldShowButtons:function(){var e=this.buffer.getNetwork();return!this.pluginState.isActive&&(this.buffer.isQuery()&&"connected"===e.state||this.buffer.joined)}},methods:{openJitsi:function(){this.pluginState.isActive=!0,kiwi.emit("mediaviewer.show",{component:j,componentProps:{pluginState:this.pluginState,buffer:this.buffer}})}}};n(255);const P=S(N,T,[],!1,null,null,null).exports;kiwi.plugin("conference",(function(e){o(),e.addTranslations(r,s);var t=c("tagID").toString(),n={isActive:!1},i={};function u(e){return e&&e["+kiwiirc.com/conference"]===t}(c("channels")||c("queries"))&&(c("channels")&&e.addUi("header_channel",C,{props:{pluginState:n}}),c("queries")&&e.addUi("header_query",C,{props:{pluginState:n}})),e.on("plugin-conference.show",(function(t){!n.isActive&&t.buffer&&(n.isActive=!0,e.emit("mediaviewer.show",{component:j,componentProps:{pluginState:n,buffer:t.buffer}}))})),e.on("plugin-conference.hide",(function(){n.isActive&&e.emit("mediaviewer.hide")})),e.on("irc.message",(function(e,t,n){if(!e.from_server&&u(e.tags)){var r=e.target;e.target===t.nick&&(r=e.nick);var o=i[r.toUpperCase()];o&&o.timeout+a("groupInvitesTTL")>Date.now()&&(-1===o.members.indexOf(e.nick)&&o.members.push(e.nick),n.handled=!0)}})),e.on("message.new",(function(t){var r=t.message,o=t.buffer;if(u(r.tags)){var a=e.Vue.observable({members:[r.nick],timeout:Date.now()});i[o.name.toUpperCase()]=a,r.template=e.Vue.extend(P),r.templateProps={inviteState:a,pluginState:n}}}))}))})()})();