diff options
Diffstat (limited to 'js/admin/stun-server.js')
-rw-r--r-- | js/admin/stun-server.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/admin/stun-server.js b/js/admin/stun-server.js index d6cc1b981..c2d87e081 100644 --- a/js/admin/stun-server.js +++ b/js/admin/stun-server.js @@ -1,4 +1,4 @@ -!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/js/",n(n.s=80)}({0:function(t,e,n){"use strict";n.r(e),function(t,n){ +!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/js/",n(n.s=81)}({0:function(t,e,n){"use strict";n.r(e),function(t,n){ /*! * Vue.js v2.6.10 * (c) 2014-2019 Evan You @@ -834,7 +834,7 @@ e.default=o},function(t,e,n){"use strict";var i=n(46);n.n(i).a},function(t,e,n){ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * - */n.d(e,"ActionButton",function(){return a.default}),n.d(e,"ActionCheckbox",function(){return s.default}),n.d(e,"ActionInput",function(){return c.default}),n.d(e,"ActionLink",function(){return l.default}),n.d(e,"ActionRouter",function(){return u.default}),n.d(e,"ActionText",function(){return d.default}),n.d(e,"ActionTextEditable",function(){return p.default}),n.d(e,"Actions",function(){return f.default}),n.d(e,"AppContent",function(){return h.default}),n.d(e,"AppContentDetails",function(){return v.default}),n.d(e,"AppContentList",function(){return m.default}),n.d(e,"AppNavigation",function(){return A.default}),n.d(e,"AppNavigationCaption",function(){return g.default}),n.d(e,"AppNavigationCounter",function(){return b.default}),n.d(e,"AppNavigationItem",function(){return y.default}),n.d(e,"AppNavigationNew",function(){return x.default}),n.d(e,"AppNavigationSettings",function(){return _.default}),n.d(e,"AppNavigationSpacer",function(){return w.default}),n.d(e,"AppSidebar",function(){return C.default}),n.d(e,"AppSidebarTab",function(){return T.default}),n.d(e,"Avatar",function(){return k.default}),n.d(e,"Content",function(){return E.default}),n.d(e,"DatetimePicker",function(){return S.default}),n.d(e,"Modal",function(){return M.default}),n.d(e,"Multiselect",function(){return O.default}),n.d(e,"PopoverMenu",function(){return D.default}),n.d(e,"Tooltip",function(){return I.default}),n.d(e,"isFullscreen",function(){return B.default}),n.d(e,"isMobile",function(){return N.default}),"undefined"!=typeof window&&window.Vue&&P(window.Vue),e.default=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?L(n,!0).forEach(function(e){o()(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({install:P},i)}])})},44:function(t,e,n){var i=n(71);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,n(9).default)("bd13d4ea",i,!0,{})},45:function(t,e,n){var i=n(73);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,n(9).default)("b867ee72",i,!0,{})},5:function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var c,l=[],u=!1,d=-1;function p(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&f())}function f(){if(!u){var t=s(p);u=!0;for(var e=l.length;e;){for(c=l,l=[];++d<e;)c&&c[d].run();d=-1,e=l.length}c=null,u=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function v(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new h(t,e)),1!==l.length||u||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=v,r.addListener=v,r.once=v,r.off=v,r.removeListener=v,r.removeAllListeners=v,r.emit=v,r.prependListener=v,r.prependOnceListener=v,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},6:function(t,e,n){(function(t){var i=void 0!==t&&t||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(7),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(2))},7:function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var i,r,o,a,s,c=1,l={},u=!1,d=t.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(t);p=p&&p.setTimeout?p:t,"[object process]"==={}.toString.call(t.process)?i=function(t){e.nextTick(function(){h(t)})}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){h(t.data)},i=function(t){o.port2.postMessage(t)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,i=function(t){var e=d.createElement("script");e.onreadystatechange=function(){h(t),e.onreadystatechange=null,r.removeChild(e),e=null},r.appendChild(e)}):i=function(t){setTimeout(h,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&h(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),i=function(e){t.postMessage(a+e,"*")}),p.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var r={callback:t,args:e};return l[c]=r,i(c),c++},p.clearImmediate=f}function f(t){delete l[t]}function h(t){if(u)setTimeout(h,0,t);else{var e=l[t];if(e){u=!0;try{!function(t){var e=t.callback,i=t.args;switch(i.length){case 0:e();break;case 1:e(i[0]);break;case 2:e(i[0],i[1]);break;case 3:e(i[0],i[1],i[2]);break;default:e.apply(n,i)}}(e)}finally{f(t),u=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(2),n(5))},70:function(t,e,n){"use strict";var i=n(44);n.n(i).a},71:function(t,e,n){(t.exports=n(8)(!1)).push([t.i,".stun-server[data-v-5ef99339]{height:44px;display:flex;align-items:center}\n",""])},72:function(t,e,n){"use strict";var i=n(45);n.n(i).a},73:function(t,e,n){(t.exports=n(8)(!1)).push([t.i,".turn-server{height:44px;display:flex;align-items:center}.icon{display:inline-block;width:44px;height:44px;vertical-align:middle}\n",""])},8:function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var r=(a=i,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(c," */")),o=i.sources.map(function(t){return"/*# sourceURL=".concat(i.sourceRoot).concat(t," */")});return[n].concat(o).concat([r]).join("\n")}var a,s,c;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2],"{").concat(n,"}"):n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},r=0;r<this.length;r++){var o=this[r][0];null!=o&&(i[o]=!0)}for(var a=0;a<t.length;a++){var s=t[a];null!=s[0]&&i[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="(".concat(s[2],") and (").concat(n,")")),e.push(s))}},e}},80:function(e,i,r){"use strict";r.r(i);var o=r(0),a=r(4),s=r(10),c=r.n(s),l={name:"StunServer",directives:{tooltip:a.Tooltip},props:{server:{type:String,default:"",required:!0},index:{type:Number,default:-1,required:!0},loading:{type:Boolean,default:!1}},computed:{isValidServer:function(){var t=this.server;t.startsWith("https://")?t=t.substr(8):t.startsWith("http://")&&(t=t.substr(7));var e=t.split(":");return 2===e.length&&null!==e[1].match(/^([1-9]\d{0,4})$/)&&parseInt(e[1])<=Math.pow(2,16)}},methods:{removeServer:function(){this.$emit("removeServer",this.index)},update:function(t){this.$emit("update:server",t.target.value)}}},u=(r(70),r(3)),d=Object(u.a)(l,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"stun-server"},[n("input",{ref:"stun_server",attrs:{type:"text",name:"stun_server",placeholder:"stunserver:port",disabled:t.loading,"aria-label":t.t("spreed","STUN server URL")},domProps:{value:t.server},on:{input:t.update}}),t._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!t.isValidServer,expression:"!isValidServer"}],staticClass:"icon icon-error"}),t._v(" "),n("a",{directives:[{name:"show",rawName:"v-show",value:!t.loading,expression:"!loading"},{name:"tooltip",rawName:"v-tooltip.auto",value:t.t("spreed","Delete this server"),expression:"t('spreed', 'Delete this server')",modifiers:{auto:!0}}],staticClass:"icon icon-delete",on:{click:t.removeServer}})])},[],!1,null,"5ef99339",null).exports;function p(t,e,n,i,r,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(i,r)}var f,h,v={name:"StunServers",directives:{tooltip:a.Tooltip},components:{StunServer:d},data:function(){return{servers:[],loading:!1,saved:!1}},beforeMount:function(){this.servers=OCP.InitialState.loadState("talk","stun_servers")},methods:{removeServer:function(t){this.servers.splice(t,1),0===this.servers.length&&this.addDefaultServer(),this.debounceUpdateServers()},newServer:function(){this.servers.push("")},addDefaultServer:function(){this.servers.push("stun.nextcloud.com:443")},debounceUpdateServers:c()(function(){this.updateServers()},1e3),updateServers:(f=regeneratorRuntime.mark(function t(){var e,n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.loading=!0,e=[],this.servers.forEach(function(t){t.startsWith("https://")?t=t.substr(8):t.startsWith("http://")&&(t=t.substr(7)),e.push(t)}),this.servers=e,n=this,OCP.AppConfig.setValue("spreed","stun_servers",JSON.stringify(e),{success:function(){n.loading=!1,n.toggleSave()}});case 6:case"end":return t.stop()}},t,this)}),h=function(){var t=this,e=arguments;return new Promise(function(n,i){var r=f.apply(t,e);function o(t){p(r,n,i,o,a,"next",t)}function a(t){p(r,n,i,o,a,"throw",t)}o(void 0)})},function(){return h.apply(this,arguments)}),toggleSave:function(){var t=this;this.saved=!0,setTimeout(function(){t.saved=!1},3e3)}}},m=(r(72),Object(u.a)(v,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"videocalls section",attrs:{id:"stun_server"}},[n("h2",[t._v("\n\t\t"+t._s(t.t("spreed","STUN servers"))+"\n\t\t"),t.saved?n("span",{staticClass:"icon icon-checkmark-color",attrs:{title:t.t("spreed","Saved")}}):t.loading?n("span",{staticClass:"icon icon-loading-small"}):n("a",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.t("spreed","Add a new server"),expression:"t('spreed', 'Add a new server')",modifiers:{auto:!0}}],staticClass:"icon icon-add",on:{click:t.newServer}},[n("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("spreed","Add a new server")))])])]),t._v(" "),n("p",{staticClass:"settings-hint"},[t._v("\n\t\t"+t._s(t.t("spreed","A STUN server is used to determine the public IP address of participants behind a router."))+"\n\t")]),t._v(" "),n("ul",{staticClass:"stun-servers"},[n("transition-group",{attrs:{name:"fade",tag:"li"}},t._l(t.servers,function(e,i){return n("StunServer",{key:"server"+i,attrs:{server:t.servers[i],index:i,loading:t.loading},on:{"update:server":[function(e){return t.$set(t.servers,i,e)},t.debounceUpdateServers],removeServer:t.removeServer}})}),1)],1)])},[],!1,null,null,null).exports); + */n.d(e,"ActionButton",function(){return a.default}),n.d(e,"ActionCheckbox",function(){return s.default}),n.d(e,"ActionInput",function(){return c.default}),n.d(e,"ActionLink",function(){return l.default}),n.d(e,"ActionRouter",function(){return u.default}),n.d(e,"ActionText",function(){return d.default}),n.d(e,"ActionTextEditable",function(){return p.default}),n.d(e,"Actions",function(){return f.default}),n.d(e,"AppContent",function(){return h.default}),n.d(e,"AppContentDetails",function(){return v.default}),n.d(e,"AppContentList",function(){return m.default}),n.d(e,"AppNavigation",function(){return A.default}),n.d(e,"AppNavigationCaption",function(){return g.default}),n.d(e,"AppNavigationCounter",function(){return b.default}),n.d(e,"AppNavigationItem",function(){return y.default}),n.d(e,"AppNavigationNew",function(){return x.default}),n.d(e,"AppNavigationSettings",function(){return _.default}),n.d(e,"AppNavigationSpacer",function(){return w.default}),n.d(e,"AppSidebar",function(){return C.default}),n.d(e,"AppSidebarTab",function(){return T.default}),n.d(e,"Avatar",function(){return k.default}),n.d(e,"Content",function(){return E.default}),n.d(e,"DatetimePicker",function(){return S.default}),n.d(e,"Modal",function(){return M.default}),n.d(e,"Multiselect",function(){return O.default}),n.d(e,"PopoverMenu",function(){return D.default}),n.d(e,"Tooltip",function(){return I.default}),n.d(e,"isFullscreen",function(){return B.default}),n.d(e,"isMobile",function(){return N.default}),"undefined"!=typeof window&&window.Vue&&P(window.Vue),e.default=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?L(n,!0).forEach(function(e){o()(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({install:P},i)}])})},44:function(t,e,n){var i=n(71);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,n(9).default)("bd13d4ea",i,!0,{})},45:function(t,e,n){var i=n(73);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,n(9).default)("b867ee72",i,!0,{})},5:function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var c,l=[],u=!1,d=-1;function p(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&f())}function f(){if(!u){var t=s(p);u=!0;for(var e=l.length;e;){for(c=l,l=[];++d<e;)c&&c[d].run();d=-1,e=l.length}c=null,u=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function v(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new h(t,e)),1!==l.length||u||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=v,r.addListener=v,r.once=v,r.off=v,r.removeListener=v,r.removeAllListeners=v,r.emit=v,r.prependListener=v,r.prependOnceListener=v,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},6:function(t,e,n){(function(t){var i=void 0!==t&&t||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(7),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(2))},7:function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var i,r,o,a,s,c=1,l={},u=!1,d=t.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(t);p=p&&p.setTimeout?p:t,"[object process]"==={}.toString.call(t.process)?i=function(t){e.nextTick(function(){h(t)})}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){h(t.data)},i=function(t){o.port2.postMessage(t)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,i=function(t){var e=d.createElement("script");e.onreadystatechange=function(){h(t),e.onreadystatechange=null,r.removeChild(e),e=null},r.appendChild(e)}):i=function(t){setTimeout(h,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&h(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),i=function(e){t.postMessage(a+e,"*")}),p.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var r={callback:t,args:e};return l[c]=r,i(c),c++},p.clearImmediate=f}function f(t){delete l[t]}function h(t){if(u)setTimeout(h,0,t);else{var e=l[t];if(e){u=!0;try{!function(t){var e=t.callback,i=t.args;switch(i.length){case 0:e();break;case 1:e(i[0]);break;case 2:e(i[0],i[1]);break;case 3:e(i[0],i[1],i[2]);break;default:e.apply(n,i)}}(e)}finally{f(t),u=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(2),n(5))},70:function(t,e,n){"use strict";var i=n(44);n.n(i).a},71:function(t,e,n){(t.exports=n(8)(!1)).push([t.i,".stun-server[data-v-5ef99339]{height:44px;display:flex;align-items:center}\n",""])},72:function(t,e,n){"use strict";var i=n(45);n.n(i).a},73:function(t,e,n){(t.exports=n(8)(!1)).push([t.i,".turn-server{height:44px;display:flex;align-items:center}.icon{display:inline-block;width:44px;height:44px;vertical-align:middle}\n",""])},8:function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var r=(a=i,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(c," */")),o=i.sources.map(function(t){return"/*# sourceURL=".concat(i.sourceRoot).concat(t," */")});return[n].concat(o).concat([r]).join("\n")}var a,s,c;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2],"{").concat(n,"}"):n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},r=0;r<this.length;r++){var o=this[r][0];null!=o&&(i[o]=!0)}for(var a=0;a<t.length;a++){var s=t[a];null!=s[0]&&i[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="(".concat(s[2],") and (").concat(n,")")),e.push(s))}},e}},81:function(e,i,r){"use strict";r.r(i);var o=r(0),a=r(4),s=r(10),c=r.n(s),l={name:"StunServer",directives:{tooltip:a.Tooltip},props:{server:{type:String,default:"",required:!0},index:{type:Number,default:-1,required:!0},loading:{type:Boolean,default:!1}},computed:{isValidServer:function(){var t=this.server;t.startsWith("https://")?t=t.substr(8):t.startsWith("http://")&&(t=t.substr(7));var e=t.split(":");return 2===e.length&&null!==e[1].match(/^([1-9]\d{0,4})$/)&&parseInt(e[1])<=Math.pow(2,16)}},methods:{removeServer:function(){this.$emit("removeServer",this.index)},update:function(t){this.$emit("update:server",t.target.value)}}},u=(r(70),r(3)),d=Object(u.a)(l,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"stun-server"},[n("input",{ref:"stun_server",attrs:{type:"text",name:"stun_server",placeholder:"stunserver:port",disabled:t.loading,"aria-label":t.t("spreed","STUN server URL")},domProps:{value:t.server},on:{input:t.update}}),t._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:!t.isValidServer,expression:"!isValidServer"}],staticClass:"icon icon-error"}),t._v(" "),n("a",{directives:[{name:"show",rawName:"v-show",value:!t.loading,expression:"!loading"},{name:"tooltip",rawName:"v-tooltip.auto",value:t.t("spreed","Delete this server"),expression:"t('spreed', 'Delete this server')",modifiers:{auto:!0}}],staticClass:"icon icon-delete",on:{click:t.removeServer}})])},[],!1,null,"5ef99339",null).exports;function p(t,e,n,i,r,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(i,r)}var f,h,v={name:"StunServers",directives:{tooltip:a.Tooltip},components:{StunServer:d},data:function(){return{servers:[],loading:!1,saved:!1}},beforeMount:function(){this.servers=OCP.InitialState.loadState("talk","stun_servers")},methods:{removeServer:function(t){this.servers.splice(t,1),0===this.servers.length&&this.addDefaultServer(),this.debounceUpdateServers()},newServer:function(){this.servers.push("")},addDefaultServer:function(){this.servers.push("stun.nextcloud.com:443")},debounceUpdateServers:c()(function(){this.updateServers()},1e3),updateServers:(f=regeneratorRuntime.mark(function t(){var e,n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.loading=!0,e=[],this.servers.forEach(function(t){t.startsWith("https://")?t=t.substr(8):t.startsWith("http://")&&(t=t.substr(7)),e.push(t)}),this.servers=e,n=this,OCP.AppConfig.setValue("spreed","stun_servers",JSON.stringify(e),{success:function(){n.loading=!1,n.toggleSave()}});case 6:case"end":return t.stop()}},t,this)}),h=function(){var t=this,e=arguments;return new Promise(function(n,i){var r=f.apply(t,e);function o(t){p(r,n,i,o,a,"next",t)}function a(t){p(r,n,i,o,a,"throw",t)}o(void 0)})},function(){return h.apply(this,arguments)}),toggleSave:function(){var t=this;this.saved=!0,setTimeout(function(){t.saved=!1},3e3)}}},m=(r(72),Object(u.a)(v,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"videocalls section",attrs:{id:"stun_server"}},[n("h2",[t._v("\n\t\t"+t._s(t.t("spreed","STUN servers"))+"\n\t\t"),t.saved?n("span",{staticClass:"icon icon-checkmark-color",attrs:{title:t.t("spreed","Saved")}}):t.loading?n("span",{staticClass:"icon icon-loading-small"}):n("a",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.t("spreed","Add a new server"),expression:"t('spreed', 'Add a new server')",modifiers:{auto:!0}}],staticClass:"icon icon-add",on:{click:t.newServer}},[n("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("spreed","Add a new server")))])])]),t._v(" "),n("p",{staticClass:"settings-hint"},[t._v("\n\t\t"+t._s(t.t("spreed","A STUN server is used to determine the public IP address of participants behind a router."))+"\n\t")]),t._v(" "),n("ul",{staticClass:"stun-servers"},[n("transition-group",{attrs:{name:"fade",tag:"li"}},t._l(t.servers,function(e,i){return n("StunServer",{key:"server"+i,attrs:{server:t.servers[i],index:i,loading:t.loading},on:{"update:server":[function(e){return t.$set(t.servers,i,e)},t.debounceUpdateServers],removeServer:t.removeServer}})}),1)],1)])},[],!1,null,null,null).exports); /** * @copyright Copyright (c) 2018 Joas Schilling <coding@schilljs.com> * |