Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@osjs/gui

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@osjs/gui - npm Package Compare versions

Comparing version 4.0.4 to 4.0.5

dist/main.css.map

4

CHANGELOG.md
# Changelog for osjs-gui
## 4.0.5
* Updated sourcemap generation
## 4.0.3

@@ -4,0 +8,0 @@

2

dist/main.js

@@ -1,2 +0,2 @@

!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("osjsGui",[],n):"object"==typeof exports?exports.osjsGui=n():t.osjsGui=n()}(window,function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=7)}([function(t,n,e){var r=e(10),o=e(11),i=e(12);t.exports=function(t){return r(t)||o(t)||i()}},function(t,n){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(n){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=r=function(t){return e(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},r(n)}t.exports=r},function(t,n){t.exports=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}},function(t,n){function e(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}},function(t,n,e){t.exports=e(13)},function(t,n){t.exports=function(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}},function(t,n){function e(t,n,e,r,o,i,u){try{var c=t[i](u),a=c.value}catch(t){return void e(t)}c.done?n(a):Promise.resolve(a).then(r,o)}t.exports=function(t){return function(){var n=this,r=arguments;return new Promise(function(o,i){var u=t.apply(n,r);function c(t){e(u,o,i,c,a,"next",t)}function a(t){e(u,o,i,c,a,"throw",t)}c(void 0)})}}},function(t,n,e){t.exports=e(15)},function(t,n,e){},,function(t,n){t.exports=function(t){if(Array.isArray(t)){for(var n=0,e=new Array(t.length);n<t.length;n++)e[n]=t[n];return e}}},function(t,n){t.exports=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}},function(t,n){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,n,e){var r=function(){return this||"object"==typeof self&&self}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=e(14),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,n){!function(n){"use strict";var e,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag",s="object"==typeof t,l=n.regeneratorRuntime;if(l)s&&(t.exports=l);else{(l=n.regeneratorRuntime=s?t.exports:{}).wrap=x;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",h={},g={};g[u]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(N([])));m&&m!==r&&o.call(m,u)&&(g=m);var b=O.prototype=w.prototype=Object.create(g);k.prototype=b.constructor=O,O.constructor=k,O[a]=k.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===k||"GeneratorFunction"===(n.displayName||n.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(b),t},l.awrap=function(t){return{__await:t}},S(_.prototype),_.prototype[c]=function(){return this},l.AsyncIterator=_,l.async=function(t,n,e,r){var o=new _(x(t,n,e,r));return l.isGeneratorFunction(n)?o:o.next().then(function(t){return t.done?t.value:o.next()})},S(b),b[a]="Generator",b[u]=function(){return this},b.toString=function(){return"[object Generator]"},l.keys=function(t){var n=[];for(var e in t)n.push(e);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}},l.values=N,I.prototype={constructor:I,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(L),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i],c=u.completion;if("root"===u.tryLoc)return r("end");if(u.tryLoc<=this.prev){var a=o.call(u,"catchLoc"),s=o.call(u,"finallyLoc");if(a&&s){if(this.prev<u.catchLoc)return r(u.catchLoc,!0);if(this.prev<u.finallyLoc)return r(u.finallyLoc)}else if(a){if(this.prev<u.catchLoc)return r(u.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return r(u.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=n,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(u)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),h},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),L(e),h}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var o=r.arg;L(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}}}function x(t,n,e,r){var o=n&&n.prototype instanceof w?n:w,i=Object.create(o.prototype),u=new I(r||[]);return i._invoke=function(t,n,e){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===v){if("throw"===o)throw i;return P()}for(e.method=o,e.arg=i;;){var u=e.delegate;if(u){var c=E(u,e);if(c){if(c===h)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(r===f)throw r=v,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r=p;var a=j(t,n,e);if("normal"===a.type){if(r=e.done?v:d,a.arg===h)continue;return{value:a.arg,done:e.done}}"throw"===a.type&&(r=v,e.method="throw",e.arg=a.arg)}}}(t,e,u),i}function j(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}function w(){}function k(){}function O(){}function S(t){["next","throw","return"].forEach(function(n){t[n]=function(t){return this._invoke(n,t)}})}function _(t){var n;this._invoke=function(e,r){function i(){return new Promise(function(n,i){!function n(e,r,i,u){var c=j(t[e],t,r);if("throw"!==c.type){var a=c.arg,s=a.value;return s&&"object"==typeof s&&o.call(s,"__await")?Promise.resolve(s.__await).then(function(t){n("next",t,i,u)},function(t){n("throw",t,i,u)}):Promise.resolve(s).then(function(t){a.value=t,i(a)},function(t){return n("throw",t,i,u)})}u(c.arg)}(e,r,n,i)})}return n=n?n.then(i,i):i()}}function E(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=j(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,h;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function T(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function L(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function N(t){if(t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function n(){for(;++r<t.length;)if(o.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}return{next:P}}function P(){return{value:e,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())},function(t,n,e){"use strict";e.r(n);var r=e(0),o=e.n(r);function i(t,n){for(var e=[],r=[],o=arguments.length;o-- >2;)e.push(arguments[o]);for(;e.length;){var i=e.pop();if(i&&i.pop)for(o=i.length;o--;)e.push(i[o]);else null!=i&&!0!==i&&!1!==i&&r.push(i)}return"function"==typeof t?t(n||{},r):{nodeName:t,attributes:n||{},children:r,key:n&&n.key}}function u(t,n,e,r){var o,i=[].map,u=r&&r.children[0]||null,c=u&&function t(n){return{nodeName:n.nodeName.toLowerCase(),attributes:{},children:i.call(n.childNodes,function(n){return 3===n.nodeType?n.nodeValue:t(n)})}}(u),a=[],s=!0,l=h(t),f=function t(n,e,r){for(var o in r)"function"==typeof r[o]?function(t,o){r[t]=function(t){var i=o(t);return"function"==typeof i&&(i=i(y(n,l),r)),i&&i!==(e=y(n,l))&&!i.then&&v(l=g(n,h(e,i),l)),i}}(o,r[o]):t(n.concat(o),e[o]=h(e[o]),r[o]=h(r[o]));return r}([],l,h(n));return v(),f;function d(t){return"function"==typeof t?d(t(l,f)):null!=t?t:""}function p(){o=!o;var t=d(e);for(r&&!o&&(u=function t(n,e,r,o,i){if(o===r);else if(null==r||r.nodeName!==o.nodeName){var u=function t(n,e){var r="string"==typeof n||"number"==typeof n?document.createTextNode(n):(e=e||"svg"===n.nodeName)?document.createElementNS("http://www.w3.org/2000/svg",n.nodeName):document.createElement(n.nodeName);var o=n.attributes;if(o){o.oncreate&&a.push(function(){o.oncreate(r)});for(var i=0;i<n.children.length;i++)r.appendChild(t(n.children[i]=d(n.children[i]),e));for(var u in o)x(r,u,o[u],null,e)}return r}(o,i);n.insertBefore(u,e),null!=r&&j(n,e,r),e=u}else if(null==r.nodeName)e.nodeValue=o;else{!function(t,n,e,r){for(var o in h(n,e))e[o]!==("value"===o||"checked"===o?t[o]:n[o])&&x(t,o,e[o],n[o],r);var i=s?e.oncreate:e.onupdate;i&&a.push(function(){i(t,n)})}(e,r.attributes,o.attributes,i=i||"svg"===o.nodeName);for(var c={},l={},f=[],p=r.children,v=o.children,g=0;g<p.length;g++){f[g]=e.childNodes[g];var y=m(p[g]);null!=y&&(c[y]=[f[g],p[g]])}for(var g=0,b=0;b<v.length;){var y=m(p[g]),w=m(v[b]=d(v[b]));if(l[y])g++;else if(null==w||w!==m(p[g+1]))if(null==w||s)null==y&&(t(e,f[g],p[g],v[b],i),b++),g++;else{var k=c[w]||[];y===w?(t(e,k[0],k[1],v[b],i),g++):k[0]?t(e,e.insertBefore(k[0],f[g]),k[1],v[b],i):t(e,f[g],null,v[b],i),l[w]=v[b],b++}else null==y&&j(e,f[g],p[g]),g++}for(;g<p.length;)null==m(p[g])&&j(e,f[g],p[g]),g++;for(var g in c)l[g]||j(e,c[g][0],c[g][1])}return e}(r,u,c,c=t)),s=!1;a.length;)a.pop()()}function v(){o||(o=!0,setTimeout(p))}function h(t,n){var e={};for(var r in t)e[r]=t[r];for(var r in n)e[r]=n[r];return e}function g(t,n,e){var r={};return t.length?(r[t[0]]=t.length>1?g(t.slice(1),n,e[t[0]]):n,h(e,r)):n}function y(t,n){for(var e=0;e<t.length;)n=n[t[e++]];return n}function m(t){return t?t.key:null}function b(t){return t.currentTarget.events[t.type](t)}function x(t,n,e,r,o){if("key"===n);else if("style"===n)if("string"==typeof e)t.style.cssText=e;else for(var i in"string"==typeof r&&(r=t.style.cssText=""),h(r,e)){var u=null==e||null==e[i]?"":e[i];"-"===i[0]?t.style.setProperty(i,u):t.style[i]=u}else"o"===n[0]&&"n"===n[1]?(n=n.slice(2),t.events?r||(r=t.events[n]):t.events={},t.events[n]=e,e?r||t.addEventListener(n,b):t.removeEventListener(n,b)):n in t&&"list"!==n&&"type"!==n&&"draggable"!==n&&"spellcheck"!==n&&"translate"!==n&&!o?t[n]=null==e?"":e:null!=e&&!1!==e&&t.setAttribute(n,e),null!=e&&!1!==e||t.removeAttribute(n)}function j(t,n,e){function r(){t.removeChild(function t(n,e){var r=e.attributes;if(r){for(var o=0;o<e.children.length;o++)t(n.childNodes[o],e.children[o]);r.ondestroy&&r.ondestroy(n)}return n}(n,e))}var o=e.attributes&&e.attributes.onremove;o?o(n,r):r()}}var c=function(t,n){return"number"==typeof t?"".concat(t,"px"):!1===t?n:t},a={grow:function(t){return{flexGrow:t}},shrink:function(t){return{flexShrink:t}},basis:function(t){return{flexBasis:c(t,"auto")}},align:function(t){return{alignItems:t}},justify:function(t){return{justifyContent:t}},padding:function(t){return{margin:c(t,"0")}},margin:function(t){return{margin:c(t,"0")}}},s=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=t.class instanceof Array?t.class:[t.class],r=["osjs-gui"].concat(o()(e));t.orientation&&r.push("osjs-gui-"+t.orientation);var u="string"==typeof t.style?{}:Object.assign({},t.style||{}),c=Object.keys(t).reduce(function(n,e){var r=a[e]?a[e](t[e]):void 0;return Object.assign({},n,r)},u);return i("div",{oncreate:t.oncreate,ondestroy:t.ondestroy,class:r.filter(function(t){return!!t}).join(" "),style:c},n)},l=function(t,n){return i(s,Object.assign({orientation:"horizontal"},t,{class:["osjs-gui-box",t.class]}),n)},f=function(t,n){return i(s,Object.assign({},t,{class:["osjs-gui-box-container",t.class]}),n)},d=function(t,n){return i(s,Object.assign({},t,{class:["osjs-gui-box-styled",t.class]}),n)},p=e(1),v=e.n(p),h=function(t,n){return i("i",{"data-icon":"object"===v()(t)?t.name:void 0,class:"osjs-icon",style:{backgroundImage:"string"==typeof t?"url(".concat(t,")"):void 0}})},g=e(5),y=e.n(g),m=function(t,n){return Object.keys(t).filter(function(t){return-1===n.indexOf(t)}).reduce(function(n,e){return Object.assign(y()({},e,t[e]),n)},{})},b=function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,e=!1;return function(r,o){return t=clearTimeout(t),t=setTimeout(function(){return e=!1},n),e?(r.preventDefault(),o(r)):(e=!0,!1)}},x=function(t,n,e,r,u){var c=n.oninput||function(){},a=n.onchange||function(){},l=n.onkeydown||function(){},f=u||function(t){return[t.target.value]},d=Object.assign({oninput:function(t){return c.apply(void 0,[t].concat(o()(f(t))))},onchange:function(t){return a.apply(void 0,[t].concat(o()(f(t))))},onkeydown:function(t){13===t.keyCode&&n.onenter&&n.onenter.apply(n,[t].concat(o()(f(t)))),l(t)}},e,m(n,["choices","label","box","oninput","onchange"]));return i(s,Object.assign({},n.box||{},{class:"osjs-gui-field osjs-gui-"+t}),r(d))},j=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return x("button",t,{},function(e){var r=[];return t.icon&&r.push(i(h,t.icon)),"string"==typeof t.label&&r.push(i("span",{class:"osjs-label"},t.label)),i("button",e,r.concat(o()(n)))})},w=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e="number"==typeof t.value?Math.max(0,Math.abs(t.value))%100:0,r=i("div",{class:"osjs-gui-progressbar-wrapper"},[i("div",{className:"osjs-gui-progressbar-value",style:{width:String(e)+"%"}}),i("div",{className:"osjs-gui-progressbar-label"},[i("span",{},[String(e)+"%"])])]);return i(s,Object.assign({},t.box||{},{class:["osjs-gui-progressbar",t.class]}),[r].concat(o()(n)))},k=function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=function(n,e){var o=[i("span",{class:"separator"===e.type?"osjs-gui-menu-separator":"osjs-gui-menu-label "+(e.disabled?"osjs__disabled":"")},function(t){var n=[];return"checkbox"===t.type||"boolean"==typeof t.checked?n.push(i("span",{class:"osjs-gui-menu-checkbox "+(t.checked?"active":"")})):t.icon&&n.push(i(h,t.icon)),n.push(i("span",{},t.label)),n}(e))];return e.items&&o.push(t(n,e.items,r+1)),o};return i("ul",{class:""},e.map(function(t){return i("li",{class:"osjs-gui-menu-entry"},[i("div",{class:"osjs-gui-menu-container","data-has-image":!!t.icon||void 0,"data-has-children":!!t.items||void 0,onmouseover:t.items?n.onshow:void 0,ontouchend:t.items?n.onshow:void 0,onclick:function(e){t.items||(t.onclick&&t.onclick(t,e),n.onclick&&n.onclick(t,e))}},o(n,t))])}))},O=function(t){return i("div",{id:"osjs-context-menu",className:"osjs-gui osjs-gui-menu",oncreate:t.oncreate,onupdate:t.onupdate,style:{display:!1!==t.visible?"block":"none",top:t.position?String(t.position.top)+"px":0,left:t.position?String(t.position.left)+"px":0}},k(t,t.menu))},S=function(t,n){return i(s,Object.assign({orientation:"vertical"},t,{class:["osjs-gui-toolbar",t.class]}),n)},_=function(t,n){return i(s,Object.assign({},t.box||{},{class:["osjs-gui-statusbar",t.class]}),n)},E=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=t.onclick,r=t.data;return i("div",{onclick:function(t){if("function"==typeof e){var n=t.target.parentNode,o=Array.prototype.indexOf.call(n.children,t.target);e(t,r||{},o)}}},i("span",{},n))},T=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return i(s,Object.assign({},t,{class:["osjs-gui-menubar",t.class]}),o()((t.items||[]).map(function(n){return i(E,{data:n.data,onclick:n.onclick||t.onclick},n.label)})).concat(o()(n)))};function L(t,n,e,r){return n._$r=function(){return{}},function(o,c){return i(r||"x-",{key:o.key,id:o.id,class:o.class,oncreate:function(r){var i=u(t,n,function(t,n){var o=e(t,n);return"function"==typeof o&&(o=o(r._$p,r._$c)),o},r);r._$p=o,r._$c=c,r._$r=i._$r,r._$u=i.uninit,i.init&&i.init(o),o.oncreate&&o.oncreate(r)},onupdate:function(t){t._$p=o,t._$c=c,t._$r(),o.onupdate&&o.onupdate(t)},ondestroy:function(t){t._$u&&t._$u()}})}}var I=function(t,n,e,r){var o=Array(Math.ceil(e.length/2)).fill(null).map(function(){return i("div",{class:"osjs-gui-panes-spacer",onmousedown:function(t){return function(t,n,e){var r=t.target,o=t.clientX,i=t.clientY,u=r.previousSibling,c=u.offsetWidth,a=u.offsetHeight,s=Array.from(r.parentNode.children).indexOf(u),l=.8*u.parentNode.offsetWidth,f=.8*u.parentNode.offsetHeight;if(!(s<0)){var d=function(t){t.preventDefault();var r="vertical"===e?c:a;if("vertical"===e){var u=t.clientX-o;r=Math.min(l,r+u)}else{var d=t.clientY-i;r=Math.min(f,r+d)}n.setSize({index:s,size:r})};t.preventDefault(),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function t(n){n.preventDefault(),document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",t)})}}(t,n,r)}})});return e.map(function(n,e){var r=t.sizes[e]?String(t.sizes[e])+"px":void 0;return i("div",{class:"osjs-gui-panes-pane",style:{flex:r?"0 0 ".concat(r):r}},n)}).map(function(t,n){return[t,o[n]]}).reduce(function(t,n){return t.concat(n)}).filter(function(t){return void 0!==t})},N=L({sizes:[]},{init:function(t){return{sizes:t.sizes||[150]}},setSize:function(t){var n=t.index,e=t.size;return function(t){var r=[].concat(t.sizes);return r[n]=e,{sizes:r}}}},function(t,n){return function(e,r){var o=e.orientation||"vertical";return i(s,{orientation:o,class:"osjs-gui-panes-inner"},I(t,n,r,o))}},"div"),P=function(t,n){return i(N,{class:"osjs-gui-panes"},n)},$=b(),A=function(t){var n=function(n,e){return i("div",{class:"osjs-gui-list-view-pane"},[i("div",{class:"osjs-gui-list-view-header",style:{display:t.hideColumns?"none":void 0}},"object"===v()(e)?e.label:e),i("div",{class:"rows"},t.rows.map(function(n){return function(e,r){var o=e.columns[n]||{},u=t.selectedIndex===r,c=o.icon?i(h,o.icon):null,a=[i("span",{},["object"===v()(o)?o.label:o])];return c&&a.unshift(c),i("div",{"data-has-icon":!!o.icon||void 0,class:"osjs-gui-list-view-cell"+(u?" osjs__active":""),ontouchstart:function(n){return $(n,function(){return t.onactivate({data:e.data,index:r,ev:n})})},ondblclick:function(n){return t.onactivate({data:e.data,index:r,ev:n})},onclick:function(n){return t.onselect({data:e.data,index:r,ev:n})},oncontextmenu:function(n){return t.oncontextmenu({data:e.data,index:r,ev:n})},oncreate:function(n){return t.oncreate({data:e.data,index:r,el:n})}},a)}}(n)))])};return i("div",{class:"osjs-gui-list-view-wrapper",oncreate:function(n){return n.scrollTop=t.scrollTop},onupdate:function(n){t.selectedIndex<0&&(n.scrollTop=t.scrollTop)}},t.columns.map(function(t,e){return n(e,t)}))},R=function(t){return i(s,Object.assign({class:"osjs-gui-list-view"},t.box||{}),A(m(t,["box"])))},z={component:function(t,n){var e=Object.assign({columns:[],rows:[],onselect:function(t){var e=t.data,r=t.index,o=t.ev;n.select({data:e,index:r,ev:o}),n.setSelectedIndex(r)},onactivate:function(t){var e=t.data,r=t.index,o=t.ev;n.activate({data:e,index:r,ev:o}),n.setSelectedIndex(-1)},oncontextmenu:function(t){var e=t.data,r=t.index,o=t.ev;n.select({data:e,index:r,ev:o}),n.contextmenu({data:e,index:r,ev:o}),n.setSelectedIndex(r)},oncreate:function(t){n.created(t)}},t);return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return R(Object.assign(e,t))}},state:function(t){return Object.assign({selectedIndex:-1,scrollTop:0},t)},actions:function(t){return Object.assign({select:function(){return function(){return{}}},activate:function(){return function(){return{}}},contextmenu:function(){return function(){return{}}},created:function(){return function(){return{}}},setRows:function(t){return{rows:t}},setColumns:function(t){return{columns:t}},setScrollTop:function(t){return function(n){return{scrollTop:t}}},setSelectedIndex:function(t){return function(n){return{selectedIndex:t}}}},t||{})}},G=b(),C=function(t,n,e){return function(){var r=t.icon||{name:"application-x-executable"};return i("div",{class:"osjs-gui-icon-view-entry"+(e.selectedIndex===n?" osjs__active":""),ontouchstart:function(r){return G(r,function(){return e.onactivate({data:t.data,index:n,ev:r})})},ondblclick:function(r){return e.onactivate({data:t.data,index:n,ev:r})},onclick:function(r){return e.onselect({data:t.data,index:n,ev:r})},oncontextmenu:function(r){return e.oncontextmenu({data:t.data,index:n,ev:r})},oncreate:function(r){return e.oncreate({data:t.data,index:n,el:r})}},[i("div",{class:"osjs__container"},[i("div",{class:"osjs__image"},[i(h,r)]),i("div",{class:"osjs__label"},[i("span",{},t.label)])])])}},F=function(t){var n=i("div",{class:"osjs-gui-icon-view-wrapper",oncreate:function(n){return n.scrollTop=t.scrollTop},onupdate:function(n){t.selectedIndex<0&&(n.scrollTop=t.scrollTop)}},t.entries.map(function(n,e){return i(C(n,e,t))}));return i(s,Object.assign({class:"osjs-gui-icon-view"},t.box||{}),n)},M={component:function(t,n){var e=Object.assign({entries:[],onselect:function(t){var e=t.data,r=t.index,o=t.ev;n.select({data:e,index:r,ev:o}),n.setSelectedIndex(r)},onactivate:function(t){var e=t.data,r=t.index,o=t.ev;n.activate({data:e,index:r,ev:o}),n.setSelectedIndex(-1)},oncontextmenu:function(t){var e=t.data,r=t.index,o=t.ev;n.select({data:e,index:r,ev:o}),n.contextmenu({data:e,index:r,ev:o}),n.setSelectedIndex(r)},oncreate:function(t){n.created(t)}},t);return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return F(Object.assign(e,t))}},state:function(t){return Object.assign({selectedIndex:-1,scrollTop:0},t)},actions:function(t){return Object.assign({select:function(){return function(){return{}}},activate:function(){return function(){return{}}},contextmenu:function(){return function(){return{}}},created:function(){return function(){return{}}},setEntries:function(t){return function(){return{entries:t}}},setScrollTop:function(t){return function(n){return{scrollTop:t}}},setSelectedIndex:function(t){return function(n){return{selectedIndex:t}}}},t||{})}},B=function(t,n){return i("div",{class:"osjs-gui osjs-gui-image",style:{width:t.width?String(t.width)+"px":void 0,height:t.height?String(t.height)+"px":void 0}},[i("img",{src:t.src,width:t.width,height:t.height,onload:t.onload,oncreate:t.oncreate,onupdate:t.onupdate,ondestroy:t.ondestroy})])},H=function(t){return void 0===t||!0===t},V=function(t,n){return i("div",{class:"osjs-gui osjs-gui-video",style:{width:t.width?String(t.width)+"px":void 0,height:t.height?String(t.height)+"px":void 0}},[i("video",{src:t.src,width:t.width,height:t.height,poster:t.poster,loop:t.loop?"loop":void 0,muted:t.muted?"muted":void 0,controls:H(t.controls)?"controls":void 0,autoplay:H(t.autoplay)?"autoplay":void 0,onloadeddata:t.onload,oncreate:t.oncreate,onupdate:t.onupdate,ondestroy:t.ondestroy},function(t){return t.map(function(t){return i("source",t)})}(t.sources||[]))])},W=L({selectedIndex:0},{setSelectedIndex:function(t){return function(n){return{selectedIndex:t}}}},function(t,n){return function(e,r){return i("div",{class:"osjs-gui-tabs-wrapper"},[i("div",{class:"osjs-gui-tabs-header"},function(t,n,e){return(t||[]).map(function(t,r){return i("div",{class:n.selectedIndex===r?"osjs__active":"",onclick:function(t){return e.setSelectedIndex(r)}},i("span",{},t))})}(e.labels,t,n)),i("div",{class:"osjs-gui-tabs-panes"},function(t,n){return n.map(function(n,e){return i("div",{class:t.selectedIndex===e?"osjs__active":""},n)})}(t,r))])}},"div"),D=function(t,n){return i(W,Object.assign({class:"osjs-gui osjs-gui-tabs "+(t.class||"")},t),n)},Y=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return i(s,Object.assign({},t.box||{},{class:["osjs-gui-iframe",t.class]}),[i("iframe",Object.assign({frameborder:0},m(t,["box"])))].concat(o()(n)))},X=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};arguments.length>1&&void 0!==arguments[1]&&arguments[1];return x("text-field",t,{autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",type:"text"},function(t){return i("input",t)})},U=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return x("textarea-field",t,{rows:4},function(t){return i("textarea",t,n)})},q=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=Object.keys(t.choices||{}).reduce(function(n,e){return n.push(i("option",{value:e,selected:t.key===t.choices[e]},t.choices[e])),n},[]);return x("select-field",t,{selectedIndex:void 0},function(t){return i("div",{},i("select",t,o()(e).concat(o()(n))))},function(t){return[t.target.value,t.target.textContent]})},J=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return x("toggle-field",t,{type:"checkbox",checked:!1},function(e){return i("label",{},[i("input",e),i("span",{class:"osjs-toggle-input"}),i("span",{class:"osjs-toggle-label"},[t.label||""].concat(o()(n)))])},function(n){return["radio"===t.type?JSON.parse(n.target.value):!!n.target.checked]})},K=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};arguments.length>1&&void 0!==arguments[1]&&arguments[1];return x("range-field",t,{type:"range"},function(t){return i("input",t)})},Q=e(4),Z=e.n(Q),tt=e(6),nt=e.n(tt),et=e(2),rt=e.n(et),ot=e(3),it=e.n(ot),ut=function(){function t(n){rt()(this,t),this.core=n,this.callback=function(){},this.actions=null}return it()(t,[{key:"destroy",value:function(){this.callback=null,this.actions=null}},{key:"init",value:function(){var t,n=this;this.actions=u({visible:!1,menu:[],position:{top:0,left:0}},{clamp:function(e){return function(r){var o=n.core.$root;clearTimeout(t);var i=function(t,n,e){var r={},o=e.top+n.offsetHeight,i=e.left+n.offsetWidth,u=t.offsetHeight-e.top,c=t.offsetWidth-e.left,a=i>t.offsetWidth,s=o>t.offsetHeight;return s&&(r.top=t.offsetHeight-n.offsetHeight-u),a&&(r.left=t.offsetWidth-n.offsetHeight-c),s||a?r:null}(o,e,r.position);return i?{position:i}:{}}},onshow:function(e){return function(r){clearTimeout(t),t=setTimeout(function(){return function(t,n){var e=n.target.querySelector("ul");e&&(e.classList.contains("osjs-gui-menu-container")&&(e=e.parentNode.parentNode),e&&e.offsetParent&&(e.classList.remove("clamp-right"),e.getBoundingClientRect().right>t.offsetWidth&&e.classList.add("clamp-right")))}(n.core.$root,e)},1)}},show:function(t){return function(e){var r=t.menu,o=t.position;if(o instanceof Event)o={left:o.clientX,top:o.clientY};else if(o instanceof Element){var i=o.getBoundingClientRect();o={left:i.left,top:i.top+i.height}}return n.callback=function(){t.callback&&t.callback.apply(t,arguments),n.actions.hide()},{visible:!0,menu:r,position:o}}},hide:function(){return function(t){return n.callback=null,{visible:!1}}}},function(t){return function(n,e){return i(O,{position:n.position,visible:n.visible,menu:n.menu,onclick:t,onshow:e.onshow,onupdate:function(t){return e.clamp(t)},oncreate:function(t){return e.clamp(t)}})}}(function(){n.core.destroyed||n.callback&&n.callback.apply(n,arguments)}),this.core.$root)}},{key:"show",value:function(){var t;return this.actions?(t=this.actions).show.apply(t,arguments):null}},{key:"hide",value:function(){var t;return this.actions?(t=this.actions).hide.apply(t,arguments):null}}]),t}(),ct=function(t){var n=t.target,e="TEXTAREA"===n.tagName;return e||"INPUT"!==n.tagName||(e=-1!==["text","password","number","email"].indexOf(n.type)),e},at=function(){function t(n){rt()(this,t),this.core=n,this.contextmenu=new ut(n)}return it()(t,[{key:"destroy",value:function(){var t=document.getElementById("osjs-context-menu");t&&t.remove(),this.contextmenu.destroy()}},{key:"init",value:function(){var t=nt()(Z.a.mark(function t(){var n,e=this;return Z.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n={show:function(){var t;return(t=e.contextmenu).show.apply(t,arguments)},hide:function(){var t;return(t=e.contextmenu).hide.apply(t,arguments)}},this.core.instance("osjs/contextmenu",function(){return arguments.length?n.show.apply(n,arguments):n}),this.core.$root.addEventListener("contextmenu",function(t){ct(t)||(t.stopPropagation(),t.preventDefault())});case 3:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"start",value:function(){var t=this;this.core.$root.addEventListener("click",function(n){!document.getElementById("osjs-context-menu").contains(n.target)&&t.contextmenu&&t.contextmenu.hide()},!0),this.contextmenu.init()}}]),t}();e.d(n,"Element",function(){return s}),e.d(n,"Box",function(){return l}),e.d(n,"BoxContainer",function(){return f}),e.d(n,"BoxStyled",function(){return d}),e.d(n,"Button",function(){return j}),e.d(n,"Progressbar",function(){return w}),e.d(n,"Menu",function(){return O}),e.d(n,"Toolbar",function(){return S}),e.d(n,"Statusbar",function(){return _}),e.d(n,"MenubarItem",function(){return E}),e.d(n,"Menubar",function(){return T}),e.d(n,"Panes",function(){return P}),e.d(n,"ListView",function(){return R}),e.d(n,"listView",function(){return z}),e.d(n,"IconViewEntry",function(){return C}),e.d(n,"IconView",function(){return F}),e.d(n,"iconView",function(){return M}),e.d(n,"Image",function(){return B}),e.d(n,"Video",function(){return V}),e.d(n,"Tabs",function(){return D}),e.d(n,"Iframe",function(){return Y}),e.d(n,"TextField",function(){return X}),e.d(n,"TextareaField",function(){return U}),e.d(n,"SelectField",function(){return q}),e.d(n,"ToggleField",function(){return J}),e.d(n,"RangeField",function(){return K}),e.d(n,"Icon",function(){return h}),e.d(n,"GUIServiceProvider",function(){return at}),e(8)}])});
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("osjsGui",[],n):"object"==typeof exports?exports.osjsGui=n():t.osjsGui=n()}(window,function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=7)}([function(t,n,e){var r=e(10),o=e(11),i=e(12);t.exports=function(t){return r(t)||o(t)||i()}},function(t,n){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(n){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=r=function(t){return e(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},r(n)}t.exports=r},function(t,n){t.exports=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}},function(t,n){function e(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}},function(t,n,e){t.exports=e(13)},function(t,n){t.exports=function(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}},function(t,n){function e(t,n,e,r,o,i,u){try{var c=t[i](u),a=c.value}catch(t){return void e(t)}c.done?n(a):Promise.resolve(a).then(r,o)}t.exports=function(t){return function(){var n=this,r=arguments;return new Promise(function(o,i){var u=t.apply(n,r);function c(t){e(u,o,i,c,a,"next",t)}function a(t){e(u,o,i,c,a,"throw",t)}c(void 0)})}}},function(t,n,e){t.exports=e(15)},function(t,n,e){},,function(t,n){t.exports=function(t){if(Array.isArray(t)){for(var n=0,e=new Array(t.length);n<t.length;n++)e[n]=t[n];return e}}},function(t,n){t.exports=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}},function(t,n){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,n,e){var r=function(){return this||"object"==typeof self&&self}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=e(14),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,n){!function(n){"use strict";var e,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag",s="object"==typeof t,l=n.regeneratorRuntime;if(l)s&&(t.exports=l);else{(l=n.regeneratorRuntime=s?t.exports:{}).wrap=x;var f="suspendedStart",d="suspendedYield",p="executing",v="completed",h={},g={};g[u]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(N([])));m&&m!==r&&o.call(m,u)&&(g=m);var b=O.prototype=w.prototype=Object.create(g);k.prototype=b.constructor=O,O.constructor=k,O[a]=k.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===k||"GeneratorFunction"===(n.displayName||n.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(b),t},l.awrap=function(t){return{__await:t}},S(_.prototype),_.prototype[c]=function(){return this},l.AsyncIterator=_,l.async=function(t,n,e,r){var o=new _(x(t,n,e,r));return l.isGeneratorFunction(n)?o:o.next().then(function(t){return t.done?t.value:o.next()})},S(b),b[a]="Generator",b[u]=function(){return this},b.toString=function(){return"[object Generator]"},l.keys=function(t){var n=[];for(var e in t)n.push(e);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}},l.values=N,I.prototype={constructor:I,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(L),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i],c=u.completion;if("root"===u.tryLoc)return r("end");if(u.tryLoc<=this.prev){var a=o.call(u,"catchLoc"),s=o.call(u,"finallyLoc");if(a&&s){if(this.prev<u.catchLoc)return r(u.catchLoc,!0);if(this.prev<u.finallyLoc)return r(u.finallyLoc)}else if(a){if(this.prev<u.catchLoc)return r(u.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return r(u.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=n,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(u)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),h},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),L(e),h}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var o=r.arg;L(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}}}function x(t,n,e,r){var o=n&&n.prototype instanceof w?n:w,i=Object.create(o.prototype),u=new I(r||[]);return i._invoke=function(t,n,e){var r=f;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===v){if("throw"===o)throw i;return P()}for(e.method=o,e.arg=i;;){var u=e.delegate;if(u){var c=E(u,e);if(c){if(c===h)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(r===f)throw r=v,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r=p;var a=j(t,n,e);if("normal"===a.type){if(r=e.done?v:d,a.arg===h)continue;return{value:a.arg,done:e.done}}"throw"===a.type&&(r=v,e.method="throw",e.arg=a.arg)}}}(t,e,u),i}function j(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}function w(){}function k(){}function O(){}function S(t){["next","throw","return"].forEach(function(n){t[n]=function(t){return this._invoke(n,t)}})}function _(t){var n;this._invoke=function(e,r){function i(){return new Promise(function(n,i){!function n(e,r,i,u){var c=j(t[e],t,r);if("throw"!==c.type){var a=c.arg,s=a.value;return s&&"object"==typeof s&&o.call(s,"__await")?Promise.resolve(s.__await).then(function(t){n("next",t,i,u)},function(t){n("throw",t,i,u)}):Promise.resolve(s).then(function(t){a.value=t,i(a)},function(t){return n("throw",t,i,u)})}u(c.arg)}(e,r,n,i)})}return n=n?n.then(i,i):i()}}function E(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=j(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,h;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function T(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function L(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function N(t){if(t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function n(){for(;++r<t.length;)if(o.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}return{next:P}}function P(){return{value:e,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())},function(t,n,e){"use strict";e.r(n);e(8);var r=e(0),o=e.n(r);function i(t,n){for(var e=[],r=[],o=arguments.length;o-- >2;)e.push(arguments[o]);for(;e.length;){var i=e.pop();if(i&&i.pop)for(o=i.length;o--;)e.push(i[o]);else null!=i&&!0!==i&&!1!==i&&r.push(i)}return"function"==typeof t?t(n||{},r):{nodeName:t,attributes:n||{},children:r,key:n&&n.key}}function u(t,n,e,r){var o,i=[].map,u=r&&r.children[0]||null,c=u&&function t(n){return{nodeName:n.nodeName.toLowerCase(),attributes:{},children:i.call(n.childNodes,function(n){return 3===n.nodeType?n.nodeValue:t(n)})}}(u),a=[],s=!0,l=h(t),f=function t(n,e,r){for(var o in r)"function"==typeof r[o]?function(t,o){r[t]=function(t){var i=o(t);return"function"==typeof i&&(i=i(y(n,l),r)),i&&i!==(e=y(n,l))&&!i.then&&v(l=g(n,h(e,i),l)),i}}(o,r[o]):t(n.concat(o),e[o]=h(e[o]),r[o]=h(r[o]));return r}([],l,h(n));return v(),f;function d(t){return"function"==typeof t?d(t(l,f)):null!=t?t:""}function p(){o=!o;var t=d(e);for(r&&!o&&(u=function t(n,e,r,o,i){if(o===r);else if(null==r||r.nodeName!==o.nodeName){var u=function t(n,e){var r="string"==typeof n||"number"==typeof n?document.createTextNode(n):(e=e||"svg"===n.nodeName)?document.createElementNS("http://www.w3.org/2000/svg",n.nodeName):document.createElement(n.nodeName);var o=n.attributes;if(o){o.oncreate&&a.push(function(){o.oncreate(r)});for(var i=0;i<n.children.length;i++)r.appendChild(t(n.children[i]=d(n.children[i]),e));for(var u in o)x(r,u,o[u],null,e)}return r}(o,i);n.insertBefore(u,e),null!=r&&j(n,e,r),e=u}else if(null==r.nodeName)e.nodeValue=o;else{!function(t,n,e,r){for(var o in h(n,e))e[o]!==("value"===o||"checked"===o?t[o]:n[o])&&x(t,o,e[o],n[o],r);var i=s?e.oncreate:e.onupdate;i&&a.push(function(){i(t,n)})}(e,r.attributes,o.attributes,i=i||"svg"===o.nodeName);for(var c={},l={},f=[],p=r.children,v=o.children,g=0;g<p.length;g++){f[g]=e.childNodes[g];var y=m(p[g]);null!=y&&(c[y]=[f[g],p[g]])}for(var g=0,b=0;b<v.length;){var y=m(p[g]),w=m(v[b]=d(v[b]));if(l[y])g++;else if(null==w||w!==m(p[g+1]))if(null==w||s)null==y&&(t(e,f[g],p[g],v[b],i),b++),g++;else{var k=c[w]||[];y===w?(t(e,k[0],k[1],v[b],i),g++):k[0]?t(e,e.insertBefore(k[0],f[g]),k[1],v[b],i):t(e,f[g],null,v[b],i),l[w]=v[b],b++}else null==y&&j(e,f[g],p[g]),g++}for(;g<p.length;)null==m(p[g])&&j(e,f[g],p[g]),g++;for(var g in c)l[g]||j(e,c[g][0],c[g][1])}return e}(r,u,c,c=t)),s=!1;a.length;)a.pop()()}function v(){o||(o=!0,setTimeout(p))}function h(t,n){var e={};for(var r in t)e[r]=t[r];for(var r in n)e[r]=n[r];return e}function g(t,n,e){var r={};return t.length?(r[t[0]]=t.length>1?g(t.slice(1),n,e[t[0]]):n,h(e,r)):n}function y(t,n){for(var e=0;e<t.length;)n=n[t[e++]];return n}function m(t){return t?t.key:null}function b(t){return t.currentTarget.events[t.type](t)}function x(t,n,e,r,o){if("key"===n);else if("style"===n)if("string"==typeof e)t.style.cssText=e;else for(var i in"string"==typeof r&&(r=t.style.cssText=""),h(r,e)){var u=null==e||null==e[i]?"":e[i];"-"===i[0]?t.style.setProperty(i,u):t.style[i]=u}else"o"===n[0]&&"n"===n[1]?(n=n.slice(2),t.events?r||(r=t.events[n]):t.events={},t.events[n]=e,e?r||t.addEventListener(n,b):t.removeEventListener(n,b)):n in t&&"list"!==n&&"type"!==n&&"draggable"!==n&&"spellcheck"!==n&&"translate"!==n&&!o?t[n]=null==e?"":e:null!=e&&!1!==e&&t.setAttribute(n,e),null!=e&&!1!==e||t.removeAttribute(n)}function j(t,n,e){function r(){t.removeChild(function t(n,e){var r=e.attributes;if(r){for(var o=0;o<e.children.length;o++)t(n.childNodes[o],e.children[o]);r.ondestroy&&r.ondestroy(n)}return n}(n,e))}var o=e.attributes&&e.attributes.onremove;o?o(n,r):r()}}var c=function(t,n){return"number"==typeof t?"".concat(t,"px"):!1===t?n:t},a={grow:function(t){return{flexGrow:t}},shrink:function(t){return{flexShrink:t}},basis:function(t){return{flexBasis:c(t,"auto")}},align:function(t){return{alignItems:t}},justify:function(t){return{justifyContent:t}},padding:function(t){return{margin:c(t,"0")}},margin:function(t){return{margin:c(t,"0")}}},s=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=t.class instanceof Array?t.class:[t.class],r=["osjs-gui"].concat(o()(e));t.orientation&&r.push("osjs-gui-"+t.orientation);var u="string"==typeof t.style?{}:Object.assign({},t.style||{}),c=Object.keys(t).reduce(function(n,e){var r=a[e]?a[e](t[e]):void 0;return Object.assign({},n,r)},u);return i("div",{oncreate:t.oncreate,ondestroy:t.ondestroy,class:r.filter(function(t){return!!t}).join(" "),style:c},n)},l=function(t,n){return i(s,Object.assign({orientation:"horizontal"},t,{class:["osjs-gui-box",t.class]}),n)},f=function(t,n){return i(s,Object.assign({},t,{class:["osjs-gui-box-container",t.class]}),n)},d=function(t,n){return i(s,Object.assign({},t,{class:["osjs-gui-box-styled",t.class]}),n)},p=e(1),v=e.n(p),h=function(t,n){return i("i",{"data-icon":"object"===v()(t)?t.name:void 0,class:"osjs-icon",style:{backgroundImage:"string"==typeof t?"url(".concat(t,")"):void 0}})},g=e(5),y=e.n(g),m=function(t,n){return Object.keys(t).filter(function(t){return-1===n.indexOf(t)}).reduce(function(n,e){return Object.assign(y()({},e,t[e]),n)},{})},b=function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,e=!1;return function(r,o){return t=clearTimeout(t),t=setTimeout(function(){return e=!1},n),e?(r.preventDefault(),o(r)):(e=!0,!1)}},x=function(t,n,e,r,u){var c=n.oninput||function(){},a=n.onchange||function(){},l=n.onkeydown||function(){},f=u||function(t){return[t.target.value]},d=Object.assign({oninput:function(t){return c.apply(void 0,[t].concat(o()(f(t))))},onchange:function(t){return a.apply(void 0,[t].concat(o()(f(t))))},onkeydown:function(t){13===t.keyCode&&n.onenter&&n.onenter.apply(n,[t].concat(o()(f(t)))),l(t)}},e,m(n,["choices","label","box","oninput","onchange"]));return i(s,Object.assign({},n.box||{},{class:"osjs-gui-field osjs-gui-"+t}),r(d))},j=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return x("button",t,{},function(e){var r=[];return t.icon&&r.push(i(h,t.icon)),"string"==typeof t.label&&r.push(i("span",{class:"osjs-label"},t.label)),i("button",e,r.concat(o()(n)))})},w=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e="number"==typeof t.value?Math.max(0,Math.abs(t.value))%100:0,r=i("div",{class:"osjs-gui-progressbar-wrapper"},[i("div",{className:"osjs-gui-progressbar-value",style:{width:String(e)+"%"}}),i("div",{className:"osjs-gui-progressbar-label"},[i("span",{},[String(e)+"%"])])]);return i(s,Object.assign({},t.box||{},{class:["osjs-gui-progressbar",t.class]}),[r].concat(o()(n)))},k=function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=function(n,e){var o=[i("span",{class:"separator"===e.type?"osjs-gui-menu-separator":"osjs-gui-menu-label "+(e.disabled?"osjs__disabled":"")},function(t){var n=[];return"checkbox"===t.type||"boolean"==typeof t.checked?n.push(i("span",{class:"osjs-gui-menu-checkbox "+(t.checked?"active":"")})):t.icon&&n.push(i(h,t.icon)),n.push(i("span",{},t.label)),n}(e))];return e.items&&o.push(t(n,e.items,r+1)),o};return i("ul",{class:""},e.map(function(t){return i("li",{class:"osjs-gui-menu-entry"},[i("div",{class:"osjs-gui-menu-container","data-has-image":!!t.icon||void 0,"data-has-children":!!t.items||void 0,onmouseover:t.items?n.onshow:void 0,ontouchend:t.items?n.onshow:void 0,onclick:function(e){t.items||(t.onclick&&t.onclick(t,e),n.onclick&&n.onclick(t,e))}},o(n,t))])}))},O=function(t){return i("div",{id:"osjs-context-menu",className:"osjs-gui osjs-gui-menu",oncreate:t.oncreate,onupdate:t.onupdate,style:{display:!1!==t.visible?"block":"none",top:t.position?String(t.position.top)+"px":0,left:t.position?String(t.position.left)+"px":0}},k(t,t.menu))},S=function(t,n){return i(s,Object.assign({orientation:"vertical"},t,{class:["osjs-gui-toolbar",t.class]}),n)},_=function(t,n){return i(s,Object.assign({},t.box||{},{class:["osjs-gui-statusbar",t.class]}),n)},E=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=t.onclick,r=t.data;return i("div",{onclick:function(t){if("function"==typeof e){var n=t.target.parentNode,o=Array.prototype.indexOf.call(n.children,t.target);e(t,r||{},o)}}},i("span",{},n))},T=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return i(s,Object.assign({},t,{class:["osjs-gui-menubar",t.class]}),o()((t.items||[]).map(function(n){return i(E,{data:n.data,onclick:n.onclick||t.onclick},n.label)})).concat(o()(n)))};function L(t,n,e,r){return n._$r=function(){return{}},function(o,c){return i(r||"x-",{key:o.key,id:o.id,class:o.class,oncreate:function(r){var i=u(t,n,function(t,n){var o=e(t,n);return"function"==typeof o&&(o=o(r._$p,r._$c)),o},r);r._$p=o,r._$c=c,r._$r=i._$r,r._$u=i.uninit,i.init&&i.init(o),o.oncreate&&o.oncreate(r)},onupdate:function(t){t._$p=o,t._$c=c,t._$r(),o.onupdate&&o.onupdate(t)},ondestroy:function(t){t._$u&&t._$u()}})}}var I=function(t,n,e,r){var o=Array(Math.ceil(e.length/2)).fill(null).map(function(){return i("div",{class:"osjs-gui-panes-spacer",onmousedown:function(t){return function(t,n,e){var r=t.target,o=t.clientX,i=t.clientY,u=r.previousSibling,c=u.offsetWidth,a=u.offsetHeight,s=Array.from(r.parentNode.children).indexOf(u),l=.8*u.parentNode.offsetWidth,f=.8*u.parentNode.offsetHeight;if(!(s<0)){var d=function(t){t.preventDefault();var r="vertical"===e?c:a;if("vertical"===e){var u=t.clientX-o;r=Math.min(l,r+u)}else{var d=t.clientY-i;r=Math.min(f,r+d)}n.setSize({index:s,size:r})};t.preventDefault(),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function t(n){n.preventDefault(),document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",t)})}}(t,n,r)}})});return e.map(function(n,e){var r=t.sizes[e]?String(t.sizes[e])+"px":void 0;return i("div",{class:"osjs-gui-panes-pane",style:{flex:r?"0 0 ".concat(r):r}},n)}).map(function(t,n){return[t,o[n]]}).reduce(function(t,n){return t.concat(n)}).filter(function(t){return void 0!==t})},N=L({sizes:[]},{init:function(t){return{sizes:t.sizes||[150]}},setSize:function(t){var n=t.index,e=t.size;return function(t){var r=[].concat(t.sizes);return r[n]=e,{sizes:r}}}},function(t,n){return function(e,r){var o=e.orientation||"vertical";return i(s,{orientation:o,class:"osjs-gui-panes-inner"},I(t,n,r,o))}},"div"),P=function(t,n){return i(N,{class:"osjs-gui-panes"},n)},$=b(),A=function(t){var n=function(n,e){return i("div",{class:"osjs-gui-list-view-pane"},[i("div",{class:"osjs-gui-list-view-header",style:{display:t.hideColumns?"none":void 0}},"object"===v()(e)?e.label:e),i("div",{class:"rows"},t.rows.map(function(n){return function(e,r){var o=e.columns[n]||{},u=t.selectedIndex===r,c=o.icon?i(h,o.icon):null,a=[i("span",{},["object"===v()(o)?o.label:o])];return c&&a.unshift(c),i("div",{"data-has-icon":!!o.icon||void 0,class:"osjs-gui-list-view-cell"+(u?" osjs__active":""),ontouchstart:function(n){return $(n,function(){return t.onactivate({data:e.data,index:r,ev:n})})},ondblclick:function(n){return t.onactivate({data:e.data,index:r,ev:n})},onclick:function(n){return t.onselect({data:e.data,index:r,ev:n})},oncontextmenu:function(n){return t.oncontextmenu({data:e.data,index:r,ev:n})},oncreate:function(n){return t.oncreate({data:e.data,index:r,el:n})}},a)}}(n)))])};return i("div",{class:"osjs-gui-list-view-wrapper",oncreate:function(n){return n.scrollTop=t.scrollTop},onupdate:function(n){t.selectedIndex<0&&(n.scrollTop=t.scrollTop)}},t.columns.map(function(t,e){return n(e,t)}))},R=function(t){return i(s,Object.assign({class:"osjs-gui-list-view"},t.box||{}),A(m(t,["box"])))},z={component:function(t,n){var e=Object.assign({columns:[],rows:[],onselect:function(t){var e=t.data,r=t.index,o=t.ev;n.select({data:e,index:r,ev:o}),n.setSelectedIndex(r)},onactivate:function(t){var e=t.data,r=t.index,o=t.ev;n.activate({data:e,index:r,ev:o}),n.setSelectedIndex(-1)},oncontextmenu:function(t){var e=t.data,r=t.index,o=t.ev;n.select({data:e,index:r,ev:o}),n.contextmenu({data:e,index:r,ev:o}),n.setSelectedIndex(r)},oncreate:function(t){n.created(t)}},t);return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return R(Object.assign(e,t))}},state:function(t){return Object.assign({selectedIndex:-1,scrollTop:0},t)},actions:function(t){return Object.assign({select:function(){return function(){return{}}},activate:function(){return function(){return{}}},contextmenu:function(){return function(){return{}}},created:function(){return function(){return{}}},setRows:function(t){return{rows:t}},setColumns:function(t){return{columns:t}},setScrollTop:function(t){return function(n){return{scrollTop:t}}},setSelectedIndex:function(t){return function(n){return{selectedIndex:t}}}},t||{})}},G=b(),C=function(t,n,e){return function(){var r=t.icon||{name:"application-x-executable"};return i("div",{class:"osjs-gui-icon-view-entry"+(e.selectedIndex===n?" osjs__active":""),ontouchstart:function(r){return G(r,function(){return e.onactivate({data:t.data,index:n,ev:r})})},ondblclick:function(r){return e.onactivate({data:t.data,index:n,ev:r})},onclick:function(r){return e.onselect({data:t.data,index:n,ev:r})},oncontextmenu:function(r){return e.oncontextmenu({data:t.data,index:n,ev:r})},oncreate:function(r){return e.oncreate({data:t.data,index:n,el:r})}},[i("div",{class:"osjs__container"},[i("div",{class:"osjs__image"},[i(h,r)]),i("div",{class:"osjs__label"},[i("span",{},t.label)])])])}},F=function(t){var n=i("div",{class:"osjs-gui-icon-view-wrapper",oncreate:function(n){return n.scrollTop=t.scrollTop},onupdate:function(n){t.selectedIndex<0&&(n.scrollTop=t.scrollTop)}},t.entries.map(function(n,e){return i(C(n,e,t))}));return i(s,Object.assign({class:"osjs-gui-icon-view"},t.box||{}),n)},M={component:function(t,n){var e=Object.assign({entries:[],onselect:function(t){var e=t.data,r=t.index,o=t.ev;n.select({data:e,index:r,ev:o}),n.setSelectedIndex(r)},onactivate:function(t){var e=t.data,r=t.index,o=t.ev;n.activate({data:e,index:r,ev:o}),n.setSelectedIndex(-1)},oncontextmenu:function(t){var e=t.data,r=t.index,o=t.ev;n.select({data:e,index:r,ev:o}),n.contextmenu({data:e,index:r,ev:o}),n.setSelectedIndex(r)},oncreate:function(t){n.created(t)}},t);return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return F(Object.assign(e,t))}},state:function(t){return Object.assign({selectedIndex:-1,scrollTop:0},t)},actions:function(t){return Object.assign({select:function(){return function(){return{}}},activate:function(){return function(){return{}}},contextmenu:function(){return function(){return{}}},created:function(){return function(){return{}}},setEntries:function(t){return function(){return{entries:t}}},setScrollTop:function(t){return function(n){return{scrollTop:t}}},setSelectedIndex:function(t){return function(n){return{selectedIndex:t}}}},t||{})}},B=function(t,n){return i("div",{class:"osjs-gui osjs-gui-image",style:{width:t.width?String(t.width)+"px":void 0,height:t.height?String(t.height)+"px":void 0}},[i("img",{src:t.src,width:t.width,height:t.height,onload:t.onload,oncreate:t.oncreate,onupdate:t.onupdate,ondestroy:t.ondestroy})])},H=function(t){return void 0===t||!0===t},V=function(t,n){return i("div",{class:"osjs-gui osjs-gui-video",style:{width:t.width?String(t.width)+"px":void 0,height:t.height?String(t.height)+"px":void 0}},[i("video",{src:t.src,width:t.width,height:t.height,poster:t.poster,loop:t.loop?"loop":void 0,muted:t.muted?"muted":void 0,controls:H(t.controls)?"controls":void 0,autoplay:H(t.autoplay)?"autoplay":void 0,onloadeddata:t.onload,oncreate:t.oncreate,onupdate:t.onupdate,ondestroy:t.ondestroy},function(t){return t.map(function(t){return i("source",t)})}(t.sources||[]))])},W=L({selectedIndex:0},{setSelectedIndex:function(t){return function(n){return{selectedIndex:t}}}},function(t,n){return function(e,r){return i("div",{class:"osjs-gui-tabs-wrapper"},[i("div",{class:"osjs-gui-tabs-header"},function(t,n,e){return(t||[]).map(function(t,r){return i("div",{class:n.selectedIndex===r?"osjs__active":"",onclick:function(t){return e.setSelectedIndex(r)}},i("span",{},t))})}(e.labels,t,n)),i("div",{class:"osjs-gui-tabs-panes"},function(t,n){return n.map(function(n,e){return i("div",{class:t.selectedIndex===e?"osjs__active":""},n)})}(t,r))])}},"div"),D=function(t,n){return i(W,Object.assign({class:"osjs-gui osjs-gui-tabs "+(t.class||"")},t),n)},Y=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return i(s,Object.assign({},t.box||{},{class:["osjs-gui-iframe",t.class]}),[i("iframe",Object.assign({frameborder:0},m(t,["box"])))].concat(o()(n)))},X=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};arguments.length>1&&void 0!==arguments[1]&&arguments[1];return x("text-field",t,{autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",type:"text"},function(t){return i("input",t)})},U=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return x("textarea-field",t,{rows:4},function(t){return i("textarea",t,n)})},q=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=Object.keys(t.choices||{}).reduce(function(n,e){return n.push(i("option",{value:e,selected:t.key===t.choices[e]},t.choices[e])),n},[]);return x("select-field",t,{selectedIndex:void 0},function(t){return i("div",{},i("select",t,o()(e).concat(o()(n))))},function(t){return[t.target.value,t.target.textContent]})},J=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return x("toggle-field",t,{type:"checkbox",checked:!1},function(e){return i("label",{},[i("input",e),i("span",{class:"osjs-toggle-input"}),i("span",{class:"osjs-toggle-label"},[t.label||""].concat(o()(n)))])},function(n){return["radio"===t.type?JSON.parse(n.target.value):!!n.target.checked]})},K=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};arguments.length>1&&void 0!==arguments[1]&&arguments[1];return x("range-field",t,{type:"range"},function(t){return i("input",t)})},Q=e(4),Z=e.n(Q),tt=e(6),nt=e.n(tt),et=e(2),rt=e.n(et),ot=e(3),it=e.n(ot),ut=function(){function t(n){rt()(this,t),this.core=n,this.callback=function(){},this.actions=null}return it()(t,[{key:"destroy",value:function(){this.callback=null,this.actions=null}},{key:"init",value:function(){var t,n=this;this.actions=u({visible:!1,menu:[],position:{top:0,left:0}},{clamp:function(e){return function(r){var o=n.core.$root;clearTimeout(t);var i=function(t,n,e){var r={},o=e.top+n.offsetHeight,i=e.left+n.offsetWidth,u=t.offsetHeight-e.top,c=t.offsetWidth-e.left,a=i>t.offsetWidth,s=o>t.offsetHeight;return s&&(r.top=t.offsetHeight-n.offsetHeight-u),a&&(r.left=t.offsetWidth-n.offsetHeight-c),s||a?r:null}(o,e,r.position);return i?{position:i}:{}}},onshow:function(e){return function(r){clearTimeout(t),t=setTimeout(function(){return function(t,n){var e=n.target.querySelector("ul");e&&(e.classList.contains("osjs-gui-menu-container")&&(e=e.parentNode.parentNode),e&&e.offsetParent&&(e.classList.remove("clamp-right"),e.getBoundingClientRect().right>t.offsetWidth&&e.classList.add("clamp-right")))}(n.core.$root,e)},1)}},show:function(t){return function(e){var r=t.menu,o=t.position;if(o instanceof Event)o={left:o.clientX,top:o.clientY};else if(o instanceof Element){var i=o.getBoundingClientRect();o={left:i.left,top:i.top+i.height}}return n.callback=function(){t.callback&&t.callback.apply(t,arguments),n.actions.hide()},{visible:!0,menu:r,position:o}}},hide:function(){return function(t){return n.callback=null,{visible:!1}}}},function(t){return function(n,e){return i(O,{position:n.position,visible:n.visible,menu:n.menu,onclick:t,onshow:e.onshow,onupdate:function(t){return e.clamp(t)},oncreate:function(t){return e.clamp(t)}})}}(function(){n.core.destroyed||n.callback&&n.callback.apply(n,arguments)}),this.core.$root)}},{key:"show",value:function(){var t;return this.actions?(t=this.actions).show.apply(t,arguments):null}},{key:"hide",value:function(){var t;return this.actions?(t=this.actions).hide.apply(t,arguments):null}}]),t}(),ct=function(t){var n=t.target,e="TEXTAREA"===n.tagName;return e||"INPUT"!==n.tagName||(e=-1!==["text","password","number","email"].indexOf(n.type)),e},at=function(){function t(n){rt()(this,t),this.core=n,this.contextmenu=new ut(n)}return it()(t,[{key:"destroy",value:function(){var t=document.getElementById("osjs-context-menu");t&&t.remove(),this.contextmenu.destroy()}},{key:"init",value:function(){var t=nt()(Z.a.mark(function t(){var n,e=this;return Z.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n={show:function(){var t;return(t=e.contextmenu).show.apply(t,arguments)},hide:function(){var t;return(t=e.contextmenu).hide.apply(t,arguments)}},this.core.instance("osjs/contextmenu",function(){return arguments.length?n.show.apply(n,arguments):n}),this.core.$root.addEventListener("contextmenu",function(t){ct(t)||(t.stopPropagation(),t.preventDefault())});case 3:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"start",value:function(){var t=this;this.core.$root.addEventListener("click",function(n){!document.getElementById("osjs-context-menu").contains(n.target)&&t.contextmenu&&t.contextmenu.hide()},!0),this.contextmenu.init()}}]),t}();e.d(n,"Element",function(){return s}),e.d(n,"Box",function(){return l}),e.d(n,"BoxContainer",function(){return f}),e.d(n,"BoxStyled",function(){return d}),e.d(n,"Button",function(){return j}),e.d(n,"Progressbar",function(){return w}),e.d(n,"Menu",function(){return O}),e.d(n,"Toolbar",function(){return S}),e.d(n,"Statusbar",function(){return _}),e.d(n,"MenubarItem",function(){return E}),e.d(n,"Menubar",function(){return T}),e.d(n,"Panes",function(){return P}),e.d(n,"ListView",function(){return R}),e.d(n,"listView",function(){return z}),e.d(n,"IconViewEntry",function(){return C}),e.d(n,"IconView",function(){return F}),e.d(n,"iconView",function(){return M}),e.d(n,"Image",function(){return B}),e.d(n,"Video",function(){return V}),e.d(n,"Tabs",function(){return D}),e.d(n,"Iframe",function(){return Y}),e.d(n,"TextField",function(){return X}),e.d(n,"TextareaField",function(){return U}),e.d(n,"SelectField",function(){return q}),e.d(n,"ToggleField",function(){return J}),e.d(n,"RangeField",function(){return K}),e.d(n,"Icon",function(){return h}),e.d(n,"GUIServiceProvider",function(){return at})}])});
//# sourceMappingURL=main.js.map
{
"name": "@osjs/gui",
"version": "4.0.4",
"version": "4.0.5",
"description": "OS.js v3 GUI",
"sideEffects": false,
"module": "dist/esm.js",

@@ -7,0 +6,0 @@ "main": "dist/main.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc