@govflanders/vl-widget-client
Advanced tools
Comparing version 1.2.2 to 1.3.0
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var vlWidgetEvent=require("@govflanders/vl-widget-event"),vlWidgetUtility=require("@govflanders/vl-widget-utility"),eventEmitter=new vlWidgetEvent.DefaultEventEmitter;function emit(e){return eventEmitter.emit(e)}function on(e,t){return eventEmitter.on(e,t)}function off(e,t){return eventEmitter.off(e,t)}function once(e,t){return eventEmitter.once(e,t)}function addEventListener(e,t){return eventEmitter.addEventListener(e,t)}function removeEventListener(e,t){return eventEmitter.removeEventListener(e,t)}function addEventBroadcast(e){return eventEmitter.addEventBroadcast(e)}function removeEventBroadcast(e){return eventEmitter.removeEventBroadcast(e)}function getEventBroadcast(){return eventEmitter.getEventBroadcast()}var eventEmitter$1=Object.freeze({emit:emit,on:on,off:off,once:once,addEventListener:addEventListener,removeEventListener:removeEventListener,addEventBroadcast:addEventBroadcast,removeEventBroadcast:removeEventBroadcast,getEventBroadcast:getEventBroadcast});function getVersion(){return"1.2.2"}var widgetCaptureQueue=[];function wireWidgetRuntime(t){t.addEventBroadcast(eventEmitter$1),addEventBroadcast(t),widgetCaptureQueue.forEach(function(e){t.capture(e.callback,e.filter)})}function resolveWidgetRuntimeInstances(){return vlWidgetUtility.Environment.isBrowser()?vlWidgetUtility.Utility.get(window,"vl.widget.runtime.instances",[]):[]}vlWidgetUtility.Environment.isBrowser()&&(resolveWidgetRuntimeInstances().forEach(wireWidgetRuntime),window.addEventListener("vl.widget.runtime",function(e){wireWidgetRuntime(e.detail)}));var DefaultWidgetManagerFacade=function(){function e(){}return e.prototype.list=function(t){var n=[];return resolveWidgetRuntimeInstances().forEach(function(e){n=n.concat(e.getWidgetManager().list(t))}),n},e.prototype.each=function(r){return new Promise(function(e,t){var n=[];resolveWidgetRuntimeInstances().forEach(function(e){n.push(e.getWidgetManager().each(r))}),Promise.all(n).then(function(e){return[].concat.apply([],e)}).then(e).catch(t)})},e.prototype.has=function(e){return null!==this.get(e)},e.prototype.get=function(e){for(var t=null,n=resolveWidgetRuntimeInstances(),r=0;r<n.length&&null===t;r+=1)t=n[r].getWidgetManager().get(e);return t},e.prototype.mount=function(t){return this.each(function(e){return!t||t(e)?e.mount():Promise.resolve(e)})},e.prototype.unmount=function(t){return this.each(function(e){return!t||t(e)?e.unmount():Promise.resolve(e)})},e.prototype.remount=function(t){return this.each(function(e){return!t||t(e)?e.remount():Promise.resolve(e)})},e}(),widgetManager=new DefaultWidgetManagerFacade;function getWidgetManager(){return widgetManager}function capture(t,n){widgetCaptureQueue.push({callback:t,filter:n}),resolveWidgetRuntimeInstances().forEach(function(e){e.capture(t,n)})}exports.DefaultWidgetManagerFacade=DefaultWidgetManagerFacade,exports.addEventBroadcast=addEventBroadcast,exports.addEventListener=addEventListener,exports.capture=capture,exports.emit=emit,exports.getEventBroadcast=getEventBroadcast,exports.getVersion=getVersion,exports.getWidgetManager=getWidgetManager,exports.off=off,exports.on=on,exports.once=once,exports.removeEventBroadcast=removeEventBroadcast,exports.removeEventListener=removeEventListener; | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t=t||self).vl=t.vl||{},t.vl.widget=t.vl.widget||{},t.vl.widget.client={}))}(this,function(t){"use strict";function o(i,a,s,u){return new(s||(s=Promise))(function(t,e){function r(t){try{o(u.next(t))}catch(t){e(t)}}function n(t){try{o(u.throw(t))}catch(t){e(t)}}function o(e){e.done?t(e.value):new s(function(t){t(e.value)}).then(r,n)}o((u=u.apply(i,a||[])).next())})}function i(r,n){var o,i,a,t,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,i&&(a=i[2&e[0]?"return":e[0]?"throw":"next"])&&!(a=a.call(i,e[1])).done)return a;switch(i=0,a&&(e=[0,a.value]),e[0]){case 0:case 1:a=e;break;case 4:return s.label++,{value:e[1],done:!1};case 5:s.label++,i=e[1],e=[0];continue;case 7:e=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){s=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3])){s.label=e[1];break}if(6===e[0]&&s.label<a[1]){s.label=a[1],a=e;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(e);break}a[2]&&s.ops.pop(),s.trys.pop();continue}e=n.call(r,s)}catch(t){e=[6,t],i=0}finally{o=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};function e(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var a,r=(e(s,a=Error),s);function s(t,e){void 0===e&&(e=null);var r=a.call(this,t)||this;return Object.setPrototypeOf(r,s.prototype),r.innerError=e,r}var u,c=(e(f,u=r),f);function f(t,e){void 0===e&&(e=null);var r=u.call(this,t,e)||this;return Object.setPrototypeOf(r,f.prototype),r}var v;e(l,v=c);function l(t,e){void 0===e&&(e=null);var r=v.call(this,t,e)||this;return Object.setPrototypeOf(r,l.prototype),r}var h;e(p,h=r);function p(t,e){void 0===e&&(e=null);var r=h.call(this,t,e)||this;return Object.setPrototypeOf(r,p.prototype),r}var d=Object.freeze({isBrowser:function(){return"undefined"!=typeof window&&"undefined"!=typeof document},isServer:function(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)},isWebWorker:function(){return"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope}});function y(t){return(y="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)}var b=Object.freeze({nextTick:function(t){"undefined"!=typeof process?process.nextTick(t):setTimeout(t,0)},get:function(t,e,r){return("string"==typeof e?e.split("."):e).reduce(function(t,e){return t&&t[e]?t[e]:r},t)},set:function(t,e,o){var r="string"==typeof e?e.split("."):e,i=r.length-1;r.reduce(function(t,e,r){switch(r){case i:return t[e]=o;default:var n=t[e];return null==n&&(n=t[e]={}),n}},t)},merge:function n(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var o={};return t.forEach(function(r){Object.keys(r).forEach(function(t){var e=r[t];"object"===y(o[t])&&"object"===y(e)?o[t]=n(o[t],e):o[t]=e})}),o},deepMerge:function n(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var o={};return t.forEach(function(r){Object.keys(r).forEach(function(t){var e=r[t];"object"===y(o[t])&&"object"===y(e)?o[t]=n(o[t],e):"object"===y(e)?o[t]=n({},e):o[t]=e})}),o}});"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var g,m,w,E,x,B=(function(t){t.exports=function(){var n=function(t,e,r,n,o,i){for(var a=function(t,e){var r=t.toString(16);return r.length<2&&(r="0"+r),e&&(r=r.toUpperCase()),r},s=e;s<=r;s++)o[i++]=a(t[s],n);return o},o=function(t,e,r,n,o){for(var i=e;i<=r;i+=2)n[o++]=parseInt(t.substr(i,2),16)},s="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#".split(""),u=[0,68,0,84,83,82,72,0,75,76,70,65,0,63,62,69,0,1,2,3,4,5,6,7,8,9,64,0,73,66,74,71,81,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,0,78,67,0,0,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,79,0,80,0,0],l=function(t,e){var r={ibits:8,obits:8,obigendian:!0};for(var n in e)void 0!==r[n]&&(r[n]=e[n]);for(var o,i,a,s=[],u=0,c=0,f=0,v=t.length;0===c&&(i=t.charCodeAt(u++)),o=i>>r.ibits-(c+8)&255,c=(c+8)%r.ibits,r.obigendian?0===f?a=o<<r.obits-8:a|=o<<r.obits-8-f:0===f?a=o:a|=o<<f,!(0===(f=(f+8)%r.obits)&&(s.push(a),v<=u)););return s},h=function(t,e){var r={ibits:32,ibigendian:!0};for(var n in e)void 0!==r[n]&&(r[n]=e[n]);var o="",i=4294967295;r.ibits<32&&(i=(1<<r.ibits)-1);for(var a=t.length,s=0;s<a;s++)for(var u=t[s]&i,c=0;c<r.ibits;c+=8)r.ibigendian?o+=String.fromCharCode(u>>r.ibits-8-c&255):o+=String.fromCharCode(u>>c&255);return o},a=8,c=8,p=256,d=function(t,e,r,n,o,i,a,s){return[s,a,i,o,n,r,e,t]},f=function(){return d(0,0,0,0,0,0,0,0)},i=function(t){return t.slice(0)},y=function(t){for(var e=f(),r=0;r<8;r++)e[r]=Math.floor(t%p),t/=p;return e},v=function(t){for(var e=0,r=7;0<=r;r--)e*=p,e+=t[r];return Math.floor(e)},b=function(t,e){for(var r=0,n=0;n<8;n++)r+=t[n]+e[n],t[n]=Math.floor(r%p),r=Math.floor(r/p);return r},g=function(t,e){for(var r=0;r<8;r++)t[r]&=e[r];return t},m=function(t,e){var r=f();if(e%8!=0)throw new Error("ui64_rorn: only bit rotations supported with a multiple of digit bits");for(var n=Math.floor(e/8),o=0;o<n;o++){for(var i=6;0<=i;i--)r[i+1]=r[i];for(r[0]=t[0],i=0;i<7;i++)t[i]=t[i+1];t[i]=0}return v(r)},w=function(t,e){if(64<e)throw new Error("ui64_ror: invalid number of bits to shift");var r,n=new Array(16);for(r=0;r<8;r++)n[r+8]=t[r],n[r]=0;var o=Math.floor(e/8),i=e%8;for(r=o;r<15;r++)n[r-o]=255&(n[r]>>>i|n[r+1]<<8-i);for(n[15-o]=n[15]>>>i&255,r=15-o+1;r<16;r++)n[r]=0;for(r=0;r<8;r++)t[r]=n[r+8];return n.slice(0,8)},E=function(t,e){for(var r=0;r<8;r++)t[r]^=e[r]},x=function(t,e){var r=(65535&t)+(65535&e),n=(t>>16)+(e>>16)+(r>>16);return n<<16|65535&r},B=function(t,e){return t<<e&4294967295|t>>>32-e&4294967295},L=function(t,e){function r(t,e,r,n){return t<20?e&r|~e&n:t<40?e^r^n:t<60?e&r|e&n|r&n:e^r^n}t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var n,o=Array(80),i=1732584193,a=-271733879,s=-1732584194,u=271733878,c=-1009589776,f=0;f<t.length;f+=16){for(var v=i,l=a,h=s,p=u,d=c,y=0;y<80;y++){o[y]=y<16?t[f+y]:B(o[y-3]^o[y-8]^o[y-14]^o[y-16],1);var b=x(x(B(i,5),r(y,a,s,u)),x(x(c,o[y]),(n=y)<20?1518500249:n<40?1859775393:n<60?-1894007588:-899497514));c=u,u=s,s=B(a,30),a=i,i=b}i=x(i,v),a=x(a,l),s=x(s,h),u=x(u,p),c=x(c,d)}return[i,a,s,u,c]},k=function(t,e){function s(t,e,r,n,o,i){return x(B(x(x(e,t),x(n,i)),o),r)}function r(t,e,r,n,o,i,a){return s(e&r|~e&n,t,e,o,i,a)}function n(t,e,r,n,o,i,a){return s(e&n|r&~n,t,e,o,i,a)}function o(t,e,r,n,o,i,a){return s(e^r^n,t,e,o,i,a)}function i(t,e,r,n,o,i,a){return s(r^(e|~n),t,e,o,i,a)}t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var a=1732584193,u=-271733879,c=-1732584194,f=271733878,v=0;v<t.length;v+=16){var l=a,h=u,p=c,d=f;a=r(a,u,c,f,t[v+0],7,-680876936),f=r(f,a,u,c,t[v+1],12,-389564586),c=r(c,f,a,u,t[v+2],17,606105819),u=r(u,c,f,a,t[v+3],22,-1044525330),a=r(a,u,c,f,t[v+4],7,-176418897),f=r(f,a,u,c,t[v+5],12,1200080426),c=r(c,f,a,u,t[v+6],17,-1473231341),u=r(u,c,f,a,t[v+7],22,-45705983),a=r(a,u,c,f,t[v+8],7,1770035416),f=r(f,a,u,c,t[v+9],12,-1958414417),c=r(c,f,a,u,t[v+10],17,-42063),u=r(u,c,f,a,t[v+11],22,-1990404162),a=r(a,u,c,f,t[v+12],7,1804603682),f=r(f,a,u,c,t[v+13],12,-40341101),c=r(c,f,a,u,t[v+14],17,-1502002290),u=r(u,c,f,a,t[v+15],22,1236535329),a=n(a,u,c,f,t[v+1],5,-165796510),f=n(f,a,u,c,t[v+6],9,-1069501632),c=n(c,f,a,u,t[v+11],14,643717713),u=n(u,c,f,a,t[v+0],20,-373897302),a=n(a,u,c,f,t[v+5],5,-701558691),f=n(f,a,u,c,t[v+10],9,38016083),c=n(c,f,a,u,t[v+15],14,-660478335),u=n(u,c,f,a,t[v+4],20,-405537848),a=n(a,u,c,f,t[v+9],5,568446438),f=n(f,a,u,c,t[v+14],9,-1019803690),c=n(c,f,a,u,t[v+3],14,-187363961),u=n(u,c,f,a,t[v+8],20,1163531501),a=n(a,u,c,f,t[v+13],5,-1444681467),f=n(f,a,u,c,t[v+2],9,-51403784),c=n(c,f,a,u,t[v+7],14,1735328473),u=n(u,c,f,a,t[v+12],20,-1926607734),a=o(a,u,c,f,t[v+5],4,-378558),f=o(f,a,u,c,t[v+8],11,-2022574463),c=o(c,f,a,u,t[v+11],16,1839030562),u=o(u,c,f,a,t[v+14],23,-35309556),a=o(a,u,c,f,t[v+1],4,-1530992060),f=o(f,a,u,c,t[v+4],11,1272893353),c=o(c,f,a,u,t[v+7],16,-155497632),u=o(u,c,f,a,t[v+10],23,-1094730640),a=o(a,u,c,f,t[v+13],4,681279174),f=o(f,a,u,c,t[v+0],11,-358537222),c=o(c,f,a,u,t[v+3],16,-722521979),u=o(u,c,f,a,t[v+6],23,76029189),a=o(a,u,c,f,t[v+9],4,-640364487),f=o(f,a,u,c,t[v+12],11,-421815835),c=o(c,f,a,u,t[v+15],16,530742520),u=o(u,c,f,a,t[v+2],23,-995338651),a=i(a,u,c,f,t[v+0],6,-198630844),f=i(f,a,u,c,t[v+7],10,1126891415),c=i(c,f,a,u,t[v+14],15,-1416354905),u=i(u,c,f,a,t[v+5],21,-57434055),a=i(a,u,c,f,t[v+12],6,1700485571),f=i(f,a,u,c,t[v+3],10,-1894986606),c=i(c,f,a,u,t[v+10],15,-1051523),u=i(u,c,f,a,t[v+1],21,-2054922799),a=i(a,u,c,f,t[v+8],6,1873313359),f=i(f,a,u,c,t[v+15],10,-30611744),c=i(c,f,a,u,t[v+6],15,-1560198380),u=i(u,c,f,a,t[v+13],21,1309151649),a=i(a,u,c,f,t[v+4],6,-145523070),f=i(f,a,u,c,t[v+11],10,-1120210379),c=i(c,f,a,u,t[v+2],15,718787259),u=i(u,c,f,a,t[v+9],21,-343485551),a=x(a,l),u=x(u,h),c=x(c,p),f=x(f,d)}return[a,u,c,f]},t=function(t){this.mul=d(88,81,244,45,76,149,127,45),this.inc=d(20,5,123,126,247,103,129,79),this.mask=d(0,0,0,0,255,255,255,255),this.state=i(this.inc),this.next(),g(this.state,this.mask),t=y(void 0!==t?t>>>0:4294967295*Math.random()>>>0),function(t,e){for(var r=0;r<a;r++)t[r]|=e[r]}(this.state,t),this.next()};t.prototype.next=function(){var t=i(this.state);!function(t,e){var r,n,o=new Array(a+a),i;for(r=0;r<a+a;r++)o[r]=0;for(r=0;r<a;r++){i=0;for(n=0;n<a;n++){i+=t[r]*e[n]+o[r+n];o[r+n]=i%p;i/=p}for(;n<a+a-r;n++){i+=o[r+n];o[r+n]=i%p;i/=p}}for(r=0;r<a;r++)t[r]=o[r];o.slice(a,a)}(this.state,this.mul),b(this.state,this.inc);var e=i(t);w(e,18),E(e,t),w(e,27);var r=i(t);w(r,59),g(e,this.mask);var n=v(r),o=i(e);return function(t,e){if(e>a*c)throw new Error("ui64_rol: invalid number of bits to shift");var r=new Array(a+a),n;for(n=0;n<a;n++){r[n+a]=0;r[n]=t[n]}var o=Math.floor(e/c),i=e%c;for(n=a-1-o;n>0;n--){r[n+o]=(r[n]<<i|r[n-1]>>>c-i)&(1<<c)-1}for(r[0+o]=r[0]<<i&255,n=0+o-1;n>=0;n--)r[n]=0;for(n=0;n<a;n++)t[n]=r[n];r.slice(a,a)}(o,32-n),w(e,n),E(e,o),v(e)};var U=new t,A=function(t,e){for(var r=[],n=0;n<t;n++)r[n]=U.next()%e;return r},O=0,S=0,j=function(){if(1===arguments.length&&"string"==typeof arguments[0])this.parse.apply(this,arguments);else if(1<=arguments.length&&"number"==typeof arguments[0])this.make.apply(this,arguments);else{if(1<=arguments.length)throw new Error("UUID: constructor: invalid arguments");for(var t=0;t<16;t++)this[t]=0}};return((j.prototype="undefined"!=typeof Uint8Array?new Uint8Array(16):Buffer?new Buffer(16):new Array(16)).constructor=j).prototype.make=function(t){var e,r=this;if(1===t){var n=(new Date).getTime();n!==O?S=0:S++;var o,i=y(O=n);!function(t,e){for(var r=0,n=0;n<8;n++)r+=t[n]*e,t[n]=Math.floor(r%p),r=Math.floor(r/p)}(i,1e4),b(i,d(1,178,29,210,19,129,64,0)),0<S&&b(i,y(S)),o=m(i,8),r[3]=255&o,o=m(i,8),r[2]=255&o,o=m(i,8),r[1]=255&o,o=m(i,8),r[0]=255&o,o=m(i,8),r[5]=255&o,o=m(i,8),r[4]=255&o,o=m(i,8),r[7]=255&o,o=m(i,8),r[6]=15&o;var a=A(2,255);r[8]=a[0],r[9]=a[1];var s=A(6,255);for(s[0]|=1,s[0]|=2,e=0;e<6;e++)r[10+e]=s[e]}else if(4===t){var u=A(16,255);for(e=0;e<16;e++)this[e]=u[e]}else{if(3!==t&&5!==t)throw new Error("UUID: make: invalid version");var c="",f="object"==typeof arguments[1]&&arguments[1]instanceof j?arguments[1]:(new j).parse(arguments[1]);for(e=0;e<16;e++)c+=String.fromCharCode(f[e]);c+=arguments[2];var v=3===t?function(t){return h(k(l(t,{ibits:8,obits:32,obigendian:!1}),8*t.length),{ibits:32,ibigendian:!1})}(c):function(t){return h(L(l(t,{ibits:8,obits:32,obigendian:!0}),8*t.length),{ibits:32,ibigendian:!0})}(c);for(e=0;e<16;e++)r[e]=v.charCodeAt(e)}return r[6]&=15,r[6]|=t<<4,r[8]&=63,r[8]|=128,r},j.prototype.format=function(t){var e,r;return"z85"===t?e=function(t,e){if(e%4!=0)throw new Error("z85_encode: invalid input length (multiple of 4 expected)");for(var r="",n=0,o=0;n<e;)if(o=256*o+t[n++],n%4==0){for(var i=52200625;1<=i;){var a=Math.floor(o/i)%85;r+=s[a],i/=85}o=0}return r}(this,16):"b16"===t?(r=Array(32),n(this,0,15,!0,r,0),e=r.join("")):void 0!==t&&"std"!==t||(r=new Array(36),n(this,0,3,!1,r,0),r[8]="-",n(this,4,5,!1,r,9),r[13]="-",n(this,6,7,!1,r,14),r[18]="-",n(this,8,9,!1,r,19),r[23]="-",n(this,10,15,!1,r,24),e=r.join("")),e},j.prototype.toString=function(t){return this.format(t)},j.prototype.parse=function(t,e){if("string"!=typeof t)throw new Error("UUID: parse: invalid argument (type string expected)");if("z85"===e)!function(t,e){var r=t.length;if(r%5!=0)throw new Error("z85_decode: invalid input length (multiple of 5 expected)");void 0===e&&(e=new Array(4*r/5));for(var n=0,o=0,i=0;n<r;){var a=t.charCodeAt(n++)-32;if(a<0||u.length<=a)break;if(i=85*i+u[a],n%5==0){for(var s=16777216;1<=s;)e[o++]=Math.trunc(i/s%256),s/=256;i=0}}}(t,this);else if("b16"===e)o(t,0,35,this,0);else if(void 0===e||"std"===e){var r={nil:"00000000-0000-0000-0000-000000000000","ns:DNS":"6ba7b810-9dad-11d1-80b4-00c04fd430c8","ns:URL":"6ba7b811-9dad-11d1-80b4-00c04fd430c8","ns:OID":"6ba7b812-9dad-11d1-80b4-00c04fd430c8","ns:X500":"6ba7b814-9dad-11d1-80b4-00c04fd430c8"};if(void 0!==r[t])t=r[t];else if(!t.match(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/))throw new Error('UUID: parse: invalid string representation (expected "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")');o(t,0,7,this,0),o(t,9,12,this,4),o(t,14,17,this,6),o(t,19,22,this,8),o(t,24,35,this,10)}return this},j.prototype.export=function(){for(var t=Array(16),e=0;e<16;e++)t[e]=this[e];return t},j.prototype.import=function(t){if(!("object"==typeof t&&t instanceof Array))throw new Error("UUID: import: invalid argument (type Array expected)");if(16!==t.length)throw new Error("UUID: import: invalid argument (Array of length 16 expected)");for(var e=0;e<16;e++){if("number"!=typeof t[e])throw new Error("UUID: import: invalid array element #"+e+" (type Number expected)");if(!isFinite(t[e])||Math.floor(t[e])!==t[e])throw new Error("UUID: import: invalid array element #"+e+" (Number with integer value expected)");if(!(0<=t[e]&&t[e]<=255))throw new Error("UUID: import: invalid array element #"+e+" (Number with integer value in range 0...255 expected)");this[e]=t[e]}return this},j.prototype.compare=function(t){if("object"!=typeof t)throw new Error("UUID: compare: invalid argument (type UUID expected)");if(!(t instanceof j))throw new Error("UUID: compare: invalid argument (type UUID expected)");for(var e=0;e<16;e++){if(this[e]<t[e])return-1;if(this[e]>t[e])return 1}return 0},j.prototype.fold=function(t){if(void 0===t)throw new Error("UUID: fold: invalid argument (number of fold operations expected)");if(t<1||4<t)throw new Error("UUID: fold: invalid argument (1-4 fold operations expected)");for(var e=16/Math.pow(2,t),r=new Array(e),n=0;n<e;n++){for(var o=0,i=0;n+i<16;i+=e)o^=this[n+i];r[n]=o}return r},j.PCG=t,j}(),t.exports.default=t.exports}(g={exports:{}},g.exports),g.exports);function L(t,e,r){return e&&r?new B(t,e,r):new B(t)}(w=m||(m={}))[w.V1=1]="V1",w[w.V3=3]="V3",w[w.V4=4]="V4",w[w.V5=5]="V5",(x=E||(E={})).Standard="std",x.Base16="b16",x.ZeroMQBase85="z85";var k=Object.freeze({get Version(){return m},get Format(){return E},namespace:function(t,e,r,n){return void 0===r&&(r=m.V5),void 0===n&&(n=E.Standard),L(r,t,e).format(n)},generate:function(t,e){return void 0===t&&(t=m.V4),void 0===e&&(e=E.Standard),L(t).format(e)}}),U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};function A(t,e){function r(){this.constructor=t}U(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function O(i,a,s,u){return new(s||(s=Promise))(function(t,e){function r(t){try{o(u.next(t))}catch(t){e(t)}}function n(t){try{o(u.throw(t))}catch(t){e(t)}}function o(e){e.done?t(e.value):new s(function(t){t(e.value)}).then(r,n)}o((u=u.apply(i,a||[])).next())})}function S(r,n){var o,i,a,t,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,i&&(a=i[2&e[0]?"return":e[0]?"throw":"next"])&&!(a=a.call(i,e[1])).done)return a;switch(i=0,a&&(e=[0,a.value]),e[0]){case 0:case 1:a=e;break;case 4:return s.label++,{value:e[1],done:!1};case 5:s.label++,i=e[1],e=[0];continue;case 7:e=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){s=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3])){s.label=e[1];break}if(6===e[0]&&s.label<a[1]){s.label=a[1],a=e;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(e);break}a[2]&&s.ops.pop(),s.trys.pop();continue}e=n.call(r,s)}catch(t){e=[6,t],i=0}finally{o=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var j,M,I=(D.prototype.add=function(t,e){this.eventListeners[t]?-1===this.eventListeners[t].indexOf(e)&&this.eventListeners[t].push(e):this.eventListeners[t]=[e]},D.prototype.remove=function(t,e){var r=(this.eventListeners[t]||[]).indexOf(e);-1<r&&(this.eventListeners[t].splice(r,1),0===this.eventListeners[t].length&&delete this.eventListeners[t])},D.prototype.emit=function(a){return O(this,void 0,void 0,function(){var e,r,n,o,i;return S(this,function(t){switch(t.label){case 0:if(!(e=this.eventListeners[a.getEventName()]||[]))return[3,2];for(r=[],n=0,o=e;n<o.length;n++)i=o[n],r.push(i(a));return[4,Promise.all(r)];case 1:t.sent(),t.label=2;case 2:return[2]}})})},D);function D(){this.eventListeners={}}(M=j||(j={})).Self="self",M.Broadcast="broadcast";var _=(P.prototype.hasEventLock=function(t){return!!this.eventLocks[t.getEventId()]},P.prototype.acquireEventLock=function(t){return this.eventLocks[t.getEventId()]=!0,this},P.prototype.releaseEventLock=function(t){return delete this.eventLocks[t.getEventId()],this},P.prototype.resolveEventBroadcast=function(t){var e=null;return"function"==typeof t.getEventBroadcast?e=t.getEventBroadcast():"function"==typeof t&&(e=t),e},P.prototype.createEventBroadcast=function(){var e=this;return function(t){return e.emit(t)}},P.prototype.getEventBroadcast=function(){return void 0===this.eventBroadcast&&(this.eventBroadcast=this.createEventBroadcast()),this.eventBroadcast},P.prototype.on=function(t,e){return this.addEventListener(t,e)},P.prototype.off=function(t,e){return this.removeEventListener(t,e)},P.prototype.once=function(t,o){for(var i=this,e=Array.isArray(t)?t:[t],r=function(n){a.addEventListener(n,function e(r){return O(i,void 0,void 0,function(){return S(this,function(t){switch(t.label){case 0:return this.removeEventListener(n,e),[4,o(r)];case 1:return t.sent(),[2]}})})})},a=this,n=0,s=e;n<s.length;n++)r(s[n]);return this},P.prototype.addEventListener=function(t,e){for(var r=0,n=Array.isArray(t)?t:[t];r<n.length;r++){var o=n[r];this.eventListenerManager.add(o,e)}return this},P.prototype.removeEventListener=function(t,e){for(var r=0,n=Array.isArray(t)?t:[t];r<n.length;r++){var o=n[r];this.eventListenerManager.remove(o,e)}return this},P.prototype.addEventBroadcast=function(t){var e=this.resolveEventBroadcast(t);return null!==e&&-1===this.subscribedEventBroadcasts.indexOf(e)&&this.subscribedEventBroadcasts.push(e),this},P.prototype.removeEventBroadcast=function(t){var e=this.resolveEventBroadcast(t);if(null!==e){var r=this.subscribedEventBroadcasts.indexOf(e);-1<r&&this.subscribedEventBroadcasts.slice(r,1)}return this},P.prototype.emit=function(n){return O(this,void 0,void 0,function(){var e,r;return S(this,function(t){switch(t.label){case 0:if(this.hasEventLock(n))return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),this.acquireEventLock(n),e=[this.eventListenerManager.emit(n)],n.getEventScope()===j.Broadcast&&this.subscribedEventBroadcasts.forEach(function(t){e.push(t(n))}),[4,Promise.all(e)];case 2:return t.sent(),this.releaseEventLock(n),[3,4];case 3:throw r=t.sent(),this.releaseEventLock(n),r;case 4:return[2]}})})},P);function P(){this.eventListenerManager=new I,this.eventLocks={},this.subscribedEventBroadcasts=[]}var N,V=(A(C,N=_),C);function C(){return null!==N&&N.apply(this,arguments)||this}var z=(W.prototype.getEventId=function(){return this.eventId},W.prototype.getEventScope=function(){return this.eventScope},W.prototype.getEventName=function(){return this.eventName},W.prototype.getSender=function(){return this.sender},W.prototype.rename=function(t){var e=Object.create(this);return e.eventName=t,e},W.prototype.prefix=function(t){var e=this.getEventName();return 0<t.length&&(e=t+"."+e),this.rename(e)},W.prototype.suffix=function(t){var e=this.getEventName();return 0<t.length&&(e=e+"."+t),this.rename(e)},W.prototype.toString=function(){return this.getEventName()},W);function W(t,e,r){void 0===r&&(r=j.Broadcast),this.eventId=k.generate(),this.eventName=t,this.sender=e,this.eventScope=r}var F;A(T,F=z),T.prototype.getEventData=function(){return this.eventData};function T(t,e,r,n){void 0===n&&(n=j.Broadcast);var o=F.call(this,t,e,n)||this;return o.eventData=r,o}var G=new V;function q(e){return o(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return[4,G.emit(e)];case 1:return t.sent(),[2]}})})}function Q(t,e){return G.on(t,e)}function R(t,e){return G.off(t,e)}function X(t,e){return G.once(t,e)}function Z(t,e){return G.addEventListener(t,e)}function $(t,e){return G.removeEventListener(t,e)}function H(t){return G.addEventBroadcast(t)}function J(t){return G.removeEventBroadcast(t)}function K(){return G.getEventBroadcast()}var Y=Object.freeze({emit:q,on:Q,off:R,once:X,addEventListener:Z,removeEventListener:$,addEventBroadcast:H,removeEventBroadcast:J,getEventBroadcast:K});var tt=[];function et(e){e.addEventBroadcast(Y),H(e),tt.forEach(function(t){e.capture(t.callback,t.filter)})}function rt(){return d.isBrowser()?b.get(window,"vl.widget.runtime.instances",[]):[]}d.isBrowser()&&(rt().forEach(et),window.addEventListener("vl.widget.runtime",function(t){et(t.detail)}));var nt=(ot.prototype.list=function(e){var r=[];return rt().forEach(function(t){r=r.concat(t.getWidgetManager().list(e))}),r},ot.prototype.each=function(n){return new Promise(function(t,e){var r=[];rt().forEach(function(t){r.push(t.getWidgetManager().each(n))}),Promise.all(r).then(function(t){return[].concat.apply([],t)}).then(t).catch(e)})},ot.prototype.has=function(t){return null!==this.get(t)},ot.prototype.get=function(t){for(var e=null,r=rt(),n=0;n<r.length&&null===e;n+=1)e=r[n].getWidgetManager().get(t);return e},ot.prototype.mount=function(n){return o(this,void 0,void 0,function(){var r=this;return i(this,function(t){return[2,this.each(function(e){return o(r,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return n&&!n(e)?[3,2]:[4,e.mount()];case 1:t.sent(),t.label=2;case 2:return[2,e]}})})})]})})},ot.prototype.unmount=function(n){return o(this,void 0,void 0,function(){var r=this;return i(this,function(t){return[2,this.each(function(e){return o(r,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return n&&!n(e)?[3,2]:[4,e.unmount()];case 1:t.sent(),t.label=2;case 2:return[2,e]}})})})]})})},ot.prototype.remount=function(n){return o(this,void 0,void 0,function(){var r=this;return i(this,function(t){return[2,this.each(function(e){return o(r,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:return n&&!n(e)?[3,2]:[4,e.remount()];case 1:t.sent(),t.label=2;case 2:return[2,e]}})})})]})})},ot);function ot(){}var it=new nt;t.DefaultWidgetManagerFacade=nt,t.addEventBroadcast=H,t.addEventListener=Z,t.capture=function(e,r){tt.push({callback:e,filter:r}),rt().forEach(function(t){t.capture(e,r)})},t.emit=q,t.getEventBroadcast=K,t.getVersion=function(){return"1.3.0"},t.getWidgetManager=function(){return it},t.off=R,t.on=Q,t.once=X,t.removeEventBroadcast=J,t.removeEventListener=$,Object.defineProperty(t,"__esModule",{value:!0})}); |
{ | ||
"name": "@govflanders/vl-widget-client", | ||
"version": "1.2.2", | ||
"version": "1.3.0", | ||
"license": "MIT", | ||
@@ -27,10 +27,10 @@ "contributors": [ | ||
"@govflanders/vl-common-types": "^0.0.3", | ||
"@govflanders/vl-widget-common-types": "^1.2.2", | ||
"@govflanders/vl-widget-core": "^1.2.2", | ||
"@govflanders/vl-widget-event": "^1.2.2", | ||
"@govflanders/vl-widget-module": "^1.2.2", | ||
"@govflanders/vl-widget-plugin": "^1.2.2", | ||
"@govflanders/vl-widget-runtime": "^1.2.2", | ||
"@govflanders/vl-widget-utility": "^1.2.2" | ||
"@govflanders/vl-widget-common-types": "^1.3.0", | ||
"@govflanders/vl-widget-core": "^1.3.0", | ||
"@govflanders/vl-widget-event": "^1.3.0", | ||
"@govflanders/vl-widget-module": "^1.3.0", | ||
"@govflanders/vl-widget-plugin": "^1.3.0", | ||
"@govflanders/vl-widget-runtime": "^1.3.0", | ||
"@govflanders/vl-widget-utility": "^1.3.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
31367
277
1