(function(b){"object"===typeof exports&&"undefined"!==typeof module?module.exports=b():"function"===typeof define&&define.amd?define([],b):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).OmniFaces=b()})(function(){return function(){function b(k,a,f){function h(c,e){if(!a[c]){if(!k[c]){var g="function"==typeof require&&require;if(!e&&g)return g(c,!0);if(p)return p(c,!0);e=Error("Cannot find module '"+c+"'");throw e.code="MODULE_NOT_FOUND", e;}e=a[c]={exports:{}};k[c][0].call(e.exports,function(d){return h(k[c][1][d]||d)},e,e.exports,b,k,a,f)}return a[c].exports}for(var p="function"==typeof require&&require,m=0;ma||a>=m.length)){var c=m[a];f.Util.loadScript(c.url,c.crossorigin,c.integrity,c.begin,c.success,c.error,function(){b(a+1)})}}var m=[],c=function(){return function(a, c,d,l,n,b){this.url=a;this.crossorigin=c;this.integrity=d;this.begin=l;this.success=n;this.error=b}}();a.add=function(a,g,d,l,n,r){m.push(new c(a,g,d,l,n,r));1==m.length&&f.Util.addOnloadListener(function(){b(0)})}})(a.DeferredScript||(a.DeferredScript={}))},{"./Util":11}],2:[function(b,k,a){Object.defineProperty(a,"__esModule",{value:!0});a.Form=void 0;var f=b("./OmniFaces"),h=b("./OmniFaces"),p=b("./Util");(function(a){p.Util.addOnloadListener(function(){var a=window.faces||window.jsf;if(a){var e= a.ajax.request;a.ajax.request=function(c,d,l){var n=a.getViewState;a.getViewState=function(a){var d=n(a);if("true"!=a.dataset.partialsubmit)return d;a=l?l.execute:null;if(!a||-1!=a.indexOf("@form")||-1!=a.indexOf("@all"))return d;var e=[],b=[];-1==a.indexOf("@none")&&(e=a.replace("@this",c.id).split(" "),b=e.map(encodeURIComponent));b.push(f.VIEW_STATE_PARAM);b.push(h.CLIENT_WINDOW_PARAM);var g=[];d.replace(/([^=&]+)=([^&]*)/g,function(a,d,l){if(!(a=-1e)return c=g.name,e=void 0,window.mojarra&&(e=b.form.enctype,b.form.enctype="application/x-www-form-urlencoded"), b.type="text",b.type="file",c={fileName:c},c[f.EVENT]="validationFailed",(window.faces||window.jsf).ajax.request(b.id,a,c),e&&(b.form.enctype=e),!1}return!0}})(a.InputFile||(a.InputFile={}))},{"./OmniFaces":6}],6:[function(b,k,a){Object.defineProperty(a,"__esModule",{value:!0});a.GraphicImage=a.ServiceWorker=a.ScriptParam=a.HashParam=a.Form=a.InputFile=a.Push=a.Unload=a.DeferredScript=a.Util=a.CLIENT_WINDOW_PARAM=a.VIEW_STATE_PARAM=a.EVENT=void 0;a.EVENT="omnifaces.event";a.VIEW_STATE_PARAM="jakarta.faces.ViewState"; a.CLIENT_WINDOW_PARAM="jakarta.faces.ClientWindow";var f=b("./Util");Object.defineProperty(a,"Util",{enumerable:!0,get:function(){return f.Util}});var h=b("./DeferredScript");Object.defineProperty(a,"DeferredScript",{enumerable:!0,get:function(){return h.DeferredScript}});var p=b("./Unload");Object.defineProperty(a,"Unload",{enumerable:!0,get:function(){return p.Unload}});var m=b("./Push");Object.defineProperty(a,"Push",{enumerable:!0,get:function(){return m.Push}});var c=b("./InputFile");Object.defineProperty(a, "InputFile",{enumerable:!0,get:function(){return c.InputFile}});var e=b("./Form");Object.defineProperty(a,"Form",{enumerable:!0,get:function(){return e.Form}});var g=b("./HashParam");Object.defineProperty(a,"HashParam",{enumerable:!0,get:function(){return g.HashParam}});var d=b("./ScriptParam");Object.defineProperty(a,"ScriptParam",{enumerable:!0,get:function(){return d.ScriptParam}});var l=b("./ServiceWorker");Object.defineProperty(a,"ServiceWorker",{enumerable:!0,get:function(){return l.ServiceWorker}}); var n=b("./GraphicImage");Object.defineProperty(a,"GraphicImage",{enumerable:!0,get:function(){return n.GraphicImage}})},{"./DeferredScript":1,"./Form":2,"./GraphicImage":3,"./HashParam":4,"./InputFile":5,"./Push":7,"./ScriptParam":8,"./ServiceWorker":9,"./Unload":10,"./Util":11}],7:[function(b,k,a){Object.defineProperty(a,"__esModule",{value:!0});a.Push=void 0;var f=b("./Util");(function(a){function b(a){h(a).open()}function h(a){var d=e[a];if(d)return d;throw Error("Unknown channel: "+a);}var c= window.location.protocol.replace("http","ws")+"//",e={},g=function(){function a(a,d,b,c,e,g,h){this.url=a;this.channel=d;this.onopen=b;this.onmessage=c;this.onerror=e;this.onclose=g;this.behaviors=h}a.prototype.open=function(){var a=this;this.socket&&1==this.socket.readyState||(this.socket=new WebSocket(this.url),this.socket.onopen=function(){if(null==a.reconnectAttempts)a.onopen(a.channel);a.reconnectAttempts=0},this.socket.onmessage=function(d){var b=JSON.parse(d.data);a.onmessage(b,a.channel,d); if((d=a.behaviors[b])&&d.length)for(b=0;b