UNPKG

webcom

Version:

Webcom library

18 lines 77.6 kB
/*! * Webcom. Build realtime apps. Share and sync data instantly between your clients * * Module name: Webcom * Version: 3.8.0 * Created: 2025-06-26T13:37:14.021Z * * Copyright (C) <2015-2025> Orange * * This software is confidential and proprietary information of Orange. * You shall not disclose such Confidential Information and shall use it only in * accordance with the terms of the agreement you entered into. * Unauthorized copying of this file, via any medium is strictly prohibited. * * If you are Orange employee you shall use this software in accordance with * the Orange Source Charter (http://opensource.itn.ftgroup/index.php/Orange_Source_Charter) */ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(this,(()=>(()=>{var t={553:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(t,e,n){var r=l;return function(i,o){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return x()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var u=h(t,e,n);if("normal"===u.type){if(r=n.done?p:f,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l="suspendedStart",f="suspendedYield",d="executing",p="completed",v={};function y(){}function g(){}function _(){}var m={};u(m,o,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(R([])));w&&w!==n&&r.call(w,o)&&(m=w);var k=_.prototype=y.prototype=Object.create(m);function S(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function Z(t,e){function n(i,o,a,s){var u=h(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function A(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,A(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=h(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function R(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:x}}function x(){return{value:e,done:!0}}return g.prototype=_,u(k,"constructor",_),u(_,"constructor",g),g.displayName=u(_,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,s,"GeneratorFunction")),t.prototype=Object.create(k),t},t.awrap=function(t){return{__await:t}},S(Z.prototype),u(Z.prototype,a,(function(){return this})),t.AsyncIterator=Z,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new Z(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(k),u(k,s,"Generator"),u(k,o,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=R,O.prototype={constructor:O,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(E),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var 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 i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){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&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},757:(t,e,n)=>{t.exports=n(553)},722:(t,e,n)=>{"use strict";n.d(e,{Yk:()=>A,ab:()=>M,hu:()=>J,ZP:()=>W});var r=n(982),i=n(671),o=n(144),a=n(885),s=n(24),u=n(28),c=n(303),h="console",l=u.sZ.console,f=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];var o=function(t){return(0,c.Kn)(t)?JSON.stringify(t):(t||"undefined").toString()};if((0,c.HD)(t)){var a=0;return[t=t.replace(/%(.)/g,(function(t,e){switch(e){case"%":return"%";case"s":case"o":case"O":return o(n[a++]);case"d":case"i":case"f":return n[a++];default:return t}}))].concat((0,r.Z)(n.slice(a).map(o))).join(" ")}return[t].concat(n).map(o).join(" ")};function d(t,e,n,r,i){if(!n||!r||!i){var o=e,a=function(t){return function(e){return o("[".concat(t,"] ").concat(e))}};n=n||a("INFO"),r=r||a("WARN"),i=i||a("ERR!"),e=a("LOG ")}return{log:function(){return e.call(t,f.apply(void 0,arguments))},info:function(){return n.call(t,f.apply(void 0,arguments))},warn:function(){return r.call(t,f.apply(void 0,arguments))},error:function(){return i.call(t,f.apply(void 0,arguments))}}}if((0,c.mf)(l))l=d(s.Z,l);else if((0,c.Kn)(l)&&l){var p=l,v=p.log,y=p.info,g=p.warn,_=p.error;l=d(l,v,y,g,_)}else{l=d(s.Z.console,s.Z.console.log,s.Z.console.info,s.Z.console.warn,s.Z.console.error)}(0,u.x$)(h,(function(){return l}),(function(t){return l=t}));var m=n(857),b=n(455),w={};function k(t,e){var n=t.length;return n>=e?t.substring(0,e):t+A.substring(0,e-n)}function S(t){return t.map((function(t){return(0,c.mf)(t)?t():t}))}var Z=function(){function t(e,n,r,o){(0,i.Z)(this,t),this._fqdn=e,this._prefix=n;var a=e.join(".");this._count=void 0===w[a]?w[a]=0:++w[a],this.displayTimestamp=r,this.setPrefixWidth(o||8),this._log=this._emitLog.bind(this,l.log),this._info=this._emitLog.bind(this,l.info),this._warn=this._emitLog.bind(this,l.warn),this._error=this._emitLog.bind(this,l.error),this._enabled=!0}return(0,o.Z)(t,[{key:"fqdn",get:function(){return this._fqdn}},{key:"_emitLog",value:function(t,e){var n=this.displayTimestamp?[(new Date).toISOString()]:[];n.push(this._displayedPrefix);for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];(0,c.HD)(e)?(n.push(e),e=n.join(" "),t.apply(void 0,[e].concat((0,r.Z)(S(o))))):t.apply(void 0,n.concat((0,r.Z)(S([e].concat(o)))))}},{key:"setPrefixWidth",value:function(t){this._displayedPrefix="".concat(k(this._prefix,t)," #").concat(k(this._count.toString(),3))}},{key:"setLevel",value:function(t){this._enabled=t>=0,this.log=t>=W.LOG?this._log:b.ZT,this.info=t>=W.INFO?this._info:b.ZT,this.warn=t>=W.WARN?this._warn:b.ZT,this.error=t>=W.ERROR?this._error:b.ZT}},{key:"updateLevel",value:function(t){this._enabled&&this.setLevel(t)}}]),t}(),A=" ",T=!1,E=15,O=[],R={},x={},P={},j="_leaf_";function C(t){return t?t.split("."):[]}function L(t){return{disabledDepth:D(t,P),enabledDepth:D(t,x)}}function I(t,e,n,r){for(var i=0;i<t.length;){var o=t[i++];e.hasOwnProperty(o)||(e[o]={}),e=e[o]}r&&Object.keys(e).forEach((function(t){return delete e[t]})),e._leaf_=n}function N(t,e){for(var n=0;n<t.length;){var r=t[n++];if(!e.hasOwnProperty(r))return;e=e[r]}delete e._leaf_}function D(t,e){var n=-1,r=0;do{e.hasOwnProperty(j)&&(n=r)}while(r<t.length&&(e=e[t[r++]]));return n}function F(t,e){Object.entries(t||{}).forEach((function(t){var n=(0,a.Z)(t,2),r=n[0],i=n[1];r===j?e(i):F(i,e)}))}function H(t,e){for(var n=[],r=0;e&&r<t.length;)e=e[t[r++]];return F(e,(function(t){return n.push(t)})),n}function U(t){T=t,O.forEach((function(t){return t.displayTimestamp=T}))}var M="LogManager",W=function(){function t(){(0,i.Z)(this,t)}return(0,o.Z)(t,null,[{key:"enable",value:function(e){(0,m.T2)([M,".enable"],arguments,(0,m.jt)(m.Z_));var n=C(e),r=L(n),i=r.enabledDepth,o=r.disabledDepth;i<=o&&(o<0&&t.disable(),I(n,x,!0,!0),N(n,P),H(n,R).forEach((function(t){return t.setLevel(K)})))}},{key:"disable",value:function(t){(0,m.T2)([M,".disable"],arguments,(0,m.jt)(m.Z_));var e=C(t),n=L(e),r=n.enabledDepth,i=n.disabledDepth;i<=r&&(I(e,P,!0,!0),N(e,x),H(e,R).forEach((function(t){return t.setLevel(-1)})))}},{key:"showTimestamp",value:function(){(0,m.T2)([M,".showTimestamp"],arguments),U(!0)}},{key:"hideTimestamp",value:function(){(0,m.T2)([M,".hideTimestamp"],arguments),U(!1)}},{key:"setPrefixWidth",value:function(t){(0,m.T2)([M,".setPrefixWidth"],arguments,m.Dp),t<0?t=0:t>A.length&&(t=A.length),E=t,O.forEach((function(t){return t.setPrefixWidth(E)}))}},{key:"level",get:function(){return K},set:function(t){(0,m.T2)([M,".level"],arguments,m.Dp),t>-1&&t!==K&&(O.forEach((function(e){return e.updateLevel(t)})),K=t)}},{key:"LOG",get:function(){return 4}},{key:"INFO",get:function(){return 3}},{key:"WARN",get:function(){return 2}},{key:"ERROR",get:function(){return 1}},{key:"NONE",get:function(){return 0}},{key:"debugOnCallback",value:function(t){var e=t&&t.toUpperCase();return function(t,n){return l.log("********** UPDATE ".concat(e||t.ref().pathString()," **********"),t.toString(),n?"[<<".concat(n,"]"):"")}}},{key:"debugOnCompletionCallback",value:function(t,e){var n=t&&t.toUpperCase();return function(t){return t?l.log("********** REVOKED ".concat(n," **********"),t):l.log("********** COMPLETED ".concat(n," **********")),e}}},{key:"debugOnCallbackWithCancel",value:function(e){var n=e&&e.toUpperCase();return[t.debugOnCallback(e),function(t){return l.log.apply(l,["********** COMPLETE ".concat(n," **********")].concat((0,r.Z)(t?["FAILED:",t.code,t.message]:["cancelled"])))}]}}]),t}();function J(t,e){var n=C(t),r=new Z(n,e||n[n.length-1],T,E);return function(t){var e=t.fqdn;I(e,R,t),O.push(t);var n=L(e),r=n.disabledDepth,i=n.enabledDepth;t.setLevel(i>=r?K:-1)}(r),r}var K=W.INFO},406:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>h,t6:()=>d,uF:()=>f});var r=n(885),i=n(671),o=n(144),a=n(857),s=n(722),u=n(303),c="WebcomApp",h=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.Z)(this,t),(0,a.T2)(["new ",c],arguments,(0,a.wB)(/^[a-z0-9](?:[-a-z0-9]{0,38}[a-z0-9])?$/),(0,a.jt)((0,a.wE)(a.Ry,a.Z_))),this._logger=(0,s.hu)("api.WebcomApp",c),this._services={},this.appId=e,this.config={},(0,u.HD)(n)&&(n=Object.keys(d).reduce((function(t,e){return t[e]={baseUrl:n},t}),{})),this._fillConfig(n),this._logger.log("Initialized %s with options %s",e,JSON.stringify(this.config))}return(0,o.Z)(t,[{key:"dispose",value:function(){(0,a.T2)([c,"#dispose"],arguments),Object.values(this._services).forEach((function(t){return t._dispose()})),this._services={}}},{key:"_fillConfig",value:function(t){l.call(this,t,d)}},{key:"toString",value:function(){return"".concat(this.appId,"{").concat(Object.keys(this._services).join(","),"}")}}]),t}();function l(t,e){var n=this;!function t(e,i,o,s){var u=function(t){return"".concat(c,".Configuration.").concat(s.concat(t).join("."))};i=Object.assign({},i),Object.entries(o).forEach((function(o){var c=(0,r.Z)(o,2),h=c[0],l=c[1];if(l instanceof Object&&!(l instanceof Array))e[h]=e[h]||{},t(e[h],i[h]||{},l,s.concat(h));else{var f=i[h],d=l[1]||function(t){return t};try{e[h]=d(void 0===f?void 0===e[h]?l.length?l[0]:l:e[h]:f)}catch(t){var p=u(h);void 0===t.value?(0,a._y)(p,t.message):(n._logger.warn("%s: %s",p,t.message),e[h]=t.value)}}delete i[h]})),Object.keys(i).forEach((function(t){return n._logger.warn("%s: unknown config key",u(t))}))}(this.config,t,e,[])}function f(t,e,n){return"".concat(n.key,":").concat(e,":").concat(function(t,e){var n=e.baseUrl;return"/".concat(n.protocol.slice(0,-1),"/").concat(n.host,"/").concat(t.appId,"/")}(t,n))}var d={}},949:(t,e,n)=>{"use strict";n.d(e,{Zw:()=>U,pj:()=>L,ak:()=>j,P0:()=>w,$7:()=>m,Zr:()=>T,mh:()=>P,n5:()=>x,oX:()=>b,_f:()=>k,yE:()=>Z,iW:()=>O});var r=n(982);function i(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function o(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function s(t){i(a,r,o,s,u,"next",t)}function u(t){i(a,r,o,s,u,"throw",t)}s(void 0)}))}}var a=n(757),s=n.n(a),u=n(939),c=n(778),h=n(671),l=n(144),f=n(857),d=n(174),p=n(803),v="LongTermSubscription",y=function(){function t(e,n,r,i){(0,h.Z)(this,t),this.data=e,this.uid=n,this.startDate=r,(0,p.CZ)(this,"_db",i)}return(0,l.Z)(t,[{key:"id",get:function(){return this.data.id}},{key:"path",get:function(){return this.data.path}},{key:"kind",get:function(){return this.data.kind}},{key:"context",get:function(){return this.data.context}},{key:"destination",get:function(){return this.data.destination}},{key:"mode",get:function(){return this.data.mode}},{key:"childEventFilter",get:function(){return this.data.childEventFilter}},{key:"expirationDate",get:function(){return new Date(1e3*this.data.expirationTimestampSeconds)}},{key:"cancel",value:function(){var t=[v,"#cancel"];return(0,f.T2)(t,arguments),T.call(this._db,t,this)}},{key:"update",value:function(t){var e=[v,"#update"];return(0,f.T2)(e,arguments,(0,f.l4)(d.Z)),O.call(this._db,e,this,t)}}]),t}(),g=n(406),_="none",m={};function b(t,e){this._auth=t.authentication,this._ltsKey=(0,g.uF)(t,"subscriptions",e),this._datasyncRoute="".concat(e.baseUrl.href,"/datasync/v2/").concat(t.appId),n(265)._this_init4browsers.call(this)}function w(t){u.J.set(this._ltsKey,t)}function k(t,e,n,r){return S.apply(this,arguments)}function S(){return(S=o(s().mark((function t(e,n,r,i){var o;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=this._auth._getCurrentAuthenticationDetails(e),t.next=3,j.call(this,o,!0,H(n,r,i,m));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function Z(t,e,n,r){return A.apply(this,arguments)}function A(){return(A=o(s().mark((function t(e,n,r,i){var o,a;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=this._auth._getCurrentAuthenticationDetails(e),a=d.Z.ValueChange,i||a.excludeRevocations(),t.next=5,j.call(this,o,!1,H(n,a,r,m));case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function T(t,e){return E.apply(this,arguments)}function E(){return(E=o(s().mark((function t(e,n){var r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this._auth._getCurrentAuthenticationDetails(e),t.next=3,L.call(this,r,n.id);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function O(t,e,n){return R.apply(this,arguments)}function R(){return(R=o(s().mark((function t(e,n,r){var i;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this._auth._getCurrentAuthenticationDetails(e),t.next=3,N.call(this,i,n.data,n.startDate,r);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function x(t,e){var n=this,i=[].concat((0,r.Z)(t),["#getLongTermSubscriptions"]);(0,f.T2)(i,e);var o=this._auth._getCurrentAuthenticationDetails(i);return F.call(this).filter((function(t){return t.uid===o.uid})).map((function(t){return new y(t.data,t.uid,t.startDate,n)}))}function P(t,e){var n=[].concat((0,r.Z)(t),["#cleanLongTermSubscriptions"]);(0,f.T2)(n,e);var i=this._auth._getCurrentAuthenticationDetails(n),o=F.call(this).filter((function(t){return t.uid!==i.uid}));this._saveLts(o)}function j(t,e,n,r){return C.apply(this,arguments)}function C(){return(C=o(s().mark((function t(e,n,r,i){var o,a,u,h;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((o=F.call(this).find((function(t){return t.uid===e.uid&&t.data.path===r.path&&t.data.kind===r.kind&&t.data.context===r.context&&t.data.destination===r.destination})))&&n&&M(o.data,o.startDate,r))){t.next=3;break}return t.abrupt("return",new y(o.data,o.uid,o.startDate,this));case 3:return t.next=5,(0,c.v_)("".concat(this._datasyncRoute,"/subscriptions"),e.uid).addHeader((0,c.E9)(e.webcomAuthToken)).addQueryParameters(n?{allowsUpdate:!0}:{delete:!0}).addJson(r).send();case 5:return a=t.sent,u=F.call(this).filter((function(t){return t.data.id!==(o&&o.data.id)})),n&&(h=new y(a.body,e.uid,i||Math.floor(Date.now()/1e3),this),u.push(Object.assign({},h))),this._saveLts(u),t.abrupt("return",h);case 10:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function L(t,e,n){return I.apply(this,arguments)}function I(){return(I=o(s().mark((function t(e,n,r){var i;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,c.t)("".concat(this._datasyncRoute,"/subscriptions"),e.uid,n).addHeader((0,c.E9)(e.webcomAuthToken)).send();case 2:r||(i=F.call(this).filter((function(t){return t.data.id!==n})),this._saveLts(i));case 3:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function N(t,e,n,r){return D.apply(this,arguments)}function D(){return(D=o(s().mark((function t(e,n,r,i){var o,a,u;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,c.gz)("".concat(this._datasyncRoute,"/subscriptions"),e.uid,n.id).addHeader((0,c.E9)(e.webcomAuthToken)).addJson(U(n,i)).send();case 2:return o=t.sent,a=new y(o.body,e.uid,r,this),u=F.call(this).filter((function(t){return t.data.id!==o.body.id})),u.push(Object.assign({},a)),this._saveLts(u),t.abrupt("return",a);case 8:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function F(){return u.J.get(this._ltsKey)||[]}function H(t,e,n,r){var i={context:r&&r[n.kind]||n.context};return Object.assign({path:t.toString()},n,e,i)}function U(t,e){return Object.assign({},t,t.encryption?{encryption:{alg:t.encryption.alg}}:{},e)}function M(t,e,n){var r,i;if(t.receivesRevocations!==n.receivesRevocations||t.mode!==n.mode)return!1;if("childEvent"===t.mode){var o=t.childEventFilter,a=n.childEventFilter;if(o.added!==a.added||o.removed!==a.removed||o.changed!==a.changed)return!1}if(((null===(r=t.encryption)||void 0===r?void 0:r.alg)||_)!==((null===(i=n.encryption)||void 0===i?void 0:i.alg)||_))return!1;var s=t.expirationTimestampSeconds;return(Math.floor(Date.now()/1e3)-e)/(s-e)<.5}},174:(t,e,n)=>{"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{Z:()=>l});var i,o=n(671),a=n(144),s=n(857),u=n(803),c=n(109),h="EventDescriptor",l=function(){function t(e){var n;((0,o.Z)(this,t),this.mode=e,e===p)&&(this.childEventFilter=(r(n={},y,!1),r(n,g,!1),r(n,_,!1),n))}return(0,a.Z)(t,[{key:"isValueChange",get:function(){return this.mode!==p}},{key:"isValueChangeWithoutData",get:function(){return this.mode===v}},{key:"isChildEvent",get:function(){return this.mode===p}},{key:"isChildAddition",get:function(){return this.isChildEvent&&this.childEventFilter[y]}},{key:"isChildRemoval",get:function(){return this.isChildEvent&&this.childEventFilter[g]}},{key:"isChildChange",get:function(){return this.isChildEvent&&this.childEventFilter[_]}},{key:"excludeRevocations",value:function(){return(0,s.T2)([h,"#excludeRevocations"],arguments),this.receivesRevocations=!1,this}}],[{key:"ValueChange",get:function(){var e=new t(d);return(0,u.fE)(e,"WithoutData",(function(){return e.mode=v,e})),e}},{key:"Child",get:function(){var e=new t(p);return f(e,"Addition",y),f(e,"Removal",g),f(e,"Change",_),e}}]),t}();function f(t,e,n){(0,u.fE)(t,e,(function(){return t.childEventFilter[n]=!0,t}))}var d="value",p="childEvent",v="noData",y="added",g="removed",_="changed";r(i={},y,c.vs),r(i,_,c.W3),r(i,g,c.Y3)},265:(t,e,n)=>{"use strict";n.r(e),n.d(e,{_this_init4browsers:()=>u,_this_listenLts:()=>l,_this_setLtsContext:()=>d,_this_unlistenLts:()=>f});var r=n(982),i=n(885),o=n(939),a=n(857),s=n(949);function u(){var t=this;this._ltsListeners=[],this._saveLts=h,this._auth.subscribe((function(e,n){e||n.isRequired()||(t._ltsAuth&&t._ltsAuth.isAuthenticated()&&p.call(t,(function(e,n){return e.uid!==n.uid||!s.$7[e.data.kind]||(s.pj.call(t,n,e.data.id,!0).catch((function(n){return t._logger.error("Failed to cancel a long term subscription #%s: %s",e.data.id,n.message)})),!1)})),t._ltsAuth=n,v.call(t))}),!0)}function c(t){return t.filter((function(t){return t.data.encryption})).map((function(t){return[t.data.encryption,1e3*t.data.expirationTimestampSeconds]}))}function h(t){var e=c.call(this,t);this._ltsListeners.forEach((function(t){return t(e)})),e.forEach((function(t){var e=(0,i.Z)(t,1)[0];return Object.keys(e).filter((function(t){return"alg"!==t&&"kid"!==t})).forEach((function(t){return delete e[t]}))})),s.P0.call(this,t)}function l(t,e,n){(0,a.T2)([].concat((0,r.Z)(e),["#_listenLts"]),n,a.Yl),this._ltsListeners.push(t),t(c.call(this,o.J.get(this._ltsKey)))}function f(t,e,n){(0,a.T2)([].concat((0,r.Z)(e),["#_unlistenLts"]),n,a.Yl),this._ltsListeners=this._ltsListeners.filter((function(e){return e!==t}))}function d(t,e,n,i){(0,a.T2)([].concat((0,r.Z)(n),["#_setLtsContext"]),i,a.Z_,a.Z_),s.$7[t]=e,v.call(this)}function p(t){var e=o.J.get(this._ltsKey);if(e){var n,r=null===(n=this._ltsAuth)||void 0===n?void 0:n.details,i=[];e.forEach((function(e){Date.now()<1e3*e.data.expirationTimestampSeconds&&t(e,r)&&i.push(e)})),this._saveLts(i)}}function v(){var t=this;p.call(this,(function(e,n){if(n&&e.startDate&&e.uid===n.uid){var r=e.data,i=s.$7[r.kind];if(i&&i!==r.context)return t._logger.log("Refresh the context of the long term subscription #%s: %s --\x3e %s",r.id,r.context,i),s.pj.call(t,n,r.id,!0).then((function(){return delete r.id,s.ak.call(t,n,!0,(0,s.Zw)(r,{context:i}),e.startDate)})).catch((function(e){return t._logger.error("Failed to refresh the long term subscription #%s: %s",r.id,e.message)})),!1}return!0}))}},109:(t,e,n)=>{"use strict";n.d(e,{W3:()=>s,Y3:()=>a,bF:()=>u,bc:()=>h,o9:()=>c,vs:()=>o});var r=n(671),i=n(144),o="child_added",a="child_removed",s="child_changed",u="child_ack",c="value",h="value_ack";!function(){function t(e,n,i){var o=i.childName,a=i.prevChildName,s=i.acknowledged;(0,r.Z)(this,t),this.type=e,this.snapshotNode=n,this.childName=o,this.prevName=a,this.acknowledged=s}(0,i.Z)(t,null,[{key:"Value",value:function(e,n){return new t(n?h:c,e,{acknowledged:e.acknowledged()})}},{key:"ChildChanged",value:function(e,n,r,i){return new t(i?u:s,e,{childName:n,prevChildName:r,acknowledged:e.acknowledged()})}},{key:"ChildRemoved",value:function(e,n,r){return e.isEmpty()?new t(u,e,{childName:n,acknowledged:r}):new t(a,e,{childName:n,acknowledged:r})}},{key:"ChildAdded",value:function(e,n,r){return new t(o,e,{childName:n,prevChildName:r,acknowledged:e.acknowledged()})}}])}()},466:(t,e,n)=>{"use strict";n.d(e,{DV:()=>h,RY:()=>l});var r=n(24),i=n(28),o="browser",a="mobile/",s="".concat(a,"android"),u="".concat(a,"iOS"),c={browser:"b"};c[s]="a",c[u]="i",c.node="n";var h,l=!0,f="device",d=i.sZ.device;if(!d){var p=r.Z.window;p&&p.location?p.location.href.indexOf("webview.datasync.orange.com")<0?v(o):v(s):v(u)}function v(t){d=t,l=t===o,0===t.indexOf(a),h=(c[t]||"")+"3.8.0"}(0,i.x$)(f,(function(){return d}),(function(t){return v(t)}))},28:(t,e,n)=>{"use strict";n.d(e,{HO:()=>i,sZ:()=>r,x$:()=>o});var r=n(24).Z.WebcomDependencies||{},i={};function o(t,e,n){Object.defineProperty(i,t,{enumerable:!0,get:e,set:n})}},618:(t,e,n)=>{"use strict";n.d(e,{Zi:()=>h,cv:()=>f,iK:()=>a});var r=n(24),i=n(28),o="setTimeout",a=i.sZ.setTimeout;a||(a=r.Z.setTimeout),(0,i.x$)(o,(function(){return a}),(function(t){return a=t})),r.Z.setTimeout||(r.Z.setTimeout=a),r.Z.setImmediate||(r.Z.setImmediate=a);var s="clearTimeout",u=i.sZ.clearTimeout;u||(u=r.Z.clearTimeout),(0,i.x$)(s,(function(){return u}),(function(t){return u=t})),r.Z.clearTimeout||(r.Z.clearTimeout=u),r.Z.clearImmediate||(r.Z.clearImmediate=u);var c="setInterval",h=i.sZ.setInterval;h||(h=r.Z.setInterval),(0,i.x$)(c,(function(){return h}),(function(t){return h=t}));var l="clearInterval",f=i.sZ.clearInterval;f||(f=r.Z.clearInterval),(0,i.x$)(l,(function(){return f}),(function(t){return f=t}))},519:(t,e,n)=>{"use strict";function r(t){var e=t.code||"UNKNOWN_ERROR",n=t.message||JSON.stringify(t),r=new Error("".concat(e,"[").concat(n,"]"));return r.code=e,r}n.d(e,{W:()=>r})},778:(t,e,n)=>{"use strict";function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function o(t,e,n){return o=i()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var o=new(Function.bind.apply(t,i));return n&&r(o,n.prototype),o},o.apply(null,arguments)}n.d(e,{E9:()=>D,t:()=>N,U2:()=>j,r$:()=>I,v_:()=>L,gz:()=>C});var a=n(885),s=n(982),u=n(144),c=n(671),h=n(584),l=n(519),f=n(722),d=n(466),p=n(303),v=n(24),y=n(28),g=n(857);var _="XMLHttpRequest",m=y.sZ.XMLHttpRequest;m||(void 0===(m=v.Z.XMLHttpRequest)||function(){if(d.RY&&"Microsoft Internet Explorer"===window.navigator.appName){var t=window.navigator.userAgent.match(/MSIE (\d+[.\d]*)/);return t&&t.length>1&&parseFloat(t[1])<10}return!1}())&&(0,g._y)(g.O4,"XMLHttpRequest not found"),(0,y.x$)(_,(function(){return m}),(function(t){return m=t}));var b=(0,f.hu)("network.HttpRequest","HttpRequest"),w="application/x-www-form-urlencoded",k="application/json",S="Content-Type",Z="PUT",A="PATCH",T="POST",E="DELETE",O="GET",R=(0,u.Z)((function t(e,n){(0,c.Z)(this,t),this.name=e,this.value=n})),x="HttpRequest",P=function(){function t(e,n){(0,c.Z)(this,t);for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];this.url=(0,h.fl)([n].concat((0,s.Z)(i.filter((function(t){return t&&t.length})).map((function(t){return encodeURIComponent(t)})))).join("/"),{c:d.DV}),this.method=e.toUpperCase(),this.headers={Accept:"application/json, text/plain"}}return(0,u.Z)(t,[{key:"addQueryParameters",value:function(t){return this.url=(0,h.fl)(this.url,t),this}},{key:"addJson",value:function(t){return this.contentType=k,this.data=t,this}},{key:"addForm",value:function(t){return this.contentType=w,this.data=t,this}},{key:"addHeader",value:function(t){return(0,g.T2)([x,"#addHeader"],arguments,(0,g.jt)((0,g.l4)(R))),t&&(this.headers[t.name]=t.value),this}},{key:"readResponseHeaders",value:function(){return this.readHeaders=!0,this}},{key:"send",value:function(){var t=this;return new Promise((function(e,n){var r=null;void 0!==t.data&&[T,Z,A].indexOf(t.method)>=0&&((r=t.contentType===w?(0,h.nB)(t.data):t.contentType===k?JSON.stringify(t.data):t.data)?t.headers[S]=t.contentType:delete t.headers[S]),b.log("==> ".concat(t.method," ").concat(t.url)),Object.keys(t.headers).forEach((function(e){return b.log(" > HEADER ".concat(e,": ").concat(t.headers[e]))})),r&&b.log(" > DATA: ".concat(r)),t._open(r,e,(function(t){b.log("<== ERROR: ".concat(JSON.stringify(t))),n((0,l.W)(t))}))}))}},{key:"_open",value:function(t,e,n){var r=this,i=new m,o="RESPONSE_PAYLOAD_ERROR";i.onreadystatechange=function(){if(4===i.readyState){var t=i.responseText,a=i.status;if(a>=500)n({code:o,message:"HTTP status ".concat(a)});else try{var s=t.length?JSON.parse(t):{};if(a>=400)n(s.error||s);else if(a>=200&&a<300||304===a){var u={body:s},c=u.body.error||null;c?n((0,p.Kn)(c)?c:{code:u.body.status,message:c}):(r.readHeaders&&(u.headers=function(t){var e=t.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};return e.forEach((function(t){var e=t.indexOf(": "),r=t.substring(0,e).toLowerCase();n[r]=t.substring(e+2)})),n}(i)),b.log("<== ".concat(JSON.stringify(u))),e(u))}else n({code:o,message:"HTTP status ".concat(a)})}catch(t){n({code:o,message:"invalid response payload, not a Json content type"})}}},i.open(this.method,this.url,!0),Object.entries(this.headers).forEach((function(t){var e=(0,a.Z)(t,2),n=e[0],r=e[1];return i.setRequestHeader(n,r)})),i.send(t)}}]),t}();function j(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return o(P,[O,t].concat(n))}function C(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return o(P,[Z,t].concat(n))}function L(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return o(P,[T,t].concat(n))}function I(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return o(P,[A,t].concat(n))}function N(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return o(P,[E,t].concat(n))}function D(t){if(t)return new R("Authorization","Bearer ".concat(t))}},730:(t,e)=>{"use strict";var n,r={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(t){this.toString=function(){return"CORRUPT: "+this.message},this.message=t},invalid:function(t){this.toString=function(){return"INVALID: "+this.message},this.message=t},bug:function(t){this.toString=function(){return"BUG: "+this.message},this.message=t},notReady:function(t){this.toString=function(){return"NOT READY: "+this.message},this.message=t}}};r.bitArray={bitSlice:function(t,e,n){return t=r.bitArray._shiftRight(t.slice(e/32),32-(31&e)).slice(1),void 0===n?t:r.bitArray.clamp(t,n-e)},extract:function(t,e,n){var r=Math.floor(-e-n&31);return(-32&(e+n-1^e)?t[e/32|0]<<32-r^t[e/32+1|0]>>>r:t[e/32|0]>>>r)&(1<<n)-1},concat:function(t,e){if(0===t.length||0===e.length)return t.concat(e);var n=t[t.length-1],i=r.bitArray.getPartial(n);return 32===i?t.concat(e):r.bitArray._shiftRight(e,i,0|n,t.slice(0,t.length-1))},bitLength:function(t){var e,n=t.length;return 0===n?0:(e=t[n-1],32*(n-1)+r.bitArray.getPartial(e))},clamp:function(t,e){if(32*t.length<e)return t;var n=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=r.bitArray.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:function(t,e,n){return 32===t?e:(n?0|e:e<<32-t)+1099511627776*t},getPartial:function(t){return Math.round(t/1099511627776)||32},equal:function(t,e){if(r.bitArray.bitLength(t)!==r.bitArray.bitLength(e))return!1;var n,i=0;for(n=0;n<t.length;n++)i|=t[n]^e[n];return 0===i},_shiftRight:function(t,e,n,i){var o,a,s;for(void 0===i&&(i=[]);e>=32;e-=32)i.push(n),n=0;if(0===e)return i.concat(t);for(o=0;o<t.length;o++)i.push(n|t[o]>>>e),n=t[o]<<32-e;return a=t.length?t[t.length-1]:0,s=r.bitArray.getPartial(a),i.push(r.bitArray.partial(e+s&31,e+s>32?n:i.pop(),1)),i},_xor4:function(t,e){return[t[0]^e[0],t[1]^e[1],t[2]^e[2],t[3]^e[3]]},byteswapM:function(t){var e,n;for(e=0;e<t.length;++e)n=t[e],t[e]=n>>>24|n>>>8&65280|(65280&n)<<8|n<<24;return t}},r.codec.utf8String={fromBits:function(t){var e,n,i="",o=r.bitArray.bitLength(t);for(e=0;e<o/8;e++)0==(3&e)&&(n=t[e/4]),i+=String.fromCharCode(n>>>8>>>8>>>8),n<<=8;return decodeURIComponent(escape(i))},toBits:function(t){t=unescape(encodeURIComponent(t));var e,n=[],i=0;for(e=0;e<t.length;e++)i=i<<8|t.charCodeAt(e),3==(3&e)&&(n.push(i),i=0);return 3&e&&n.push(r.bitArray.partial(8*(3&e),i)),n}},r.codec.base64={_chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fromBits:function(t,e,n){var i,o="",a=0,s=r.codec.base64._chars,u=0,c=r.bitArray.bitLength(t);for(n&&(s=s.substr(0,62)+"-_"),i=0;6*o.length<c;)o+=s.charAt((u^t[i]>>>a)>>>26),a<6?(u=t[i]<<6-a,a+=26,i++):(u<<=6,a-=6);for(;3&o.length&&!e;)o+="=";return o},toBits:function(t,e){t=t.replace(/\s|=/g,"");var n,i,o=[],a=0,s=r.codec.base64._chars,u=0;for(e&&(s=s.substr(0,62)+"-_"),n=0;n<t.length;n++){if((i=s.indexOf(t.charAt(n)))<0)throw new r.exception.invalid("this isn't base64!");a>26?(a-=26,o.push(u^i>>>a),u=i<<32-a):u^=i<<32-(a+=6)}return 56&a&&o.push(r.bitArray.partial(56&a,u,1)),o}},r.codec.base64url={fromBits:function(t){return r.codec.base64.fromBits(t,1,1)},toBits:function(t){return r.codec.base64.toBits(t,1)}},r.hash.sha256=function(t){this._key[0]||this._precompute(),t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()},r.hash.sha256.hash=function(t){return(new r.hash.sha256).update(t).finalize()},r.hash.sha256.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(t){"string"==typeof t&&(t=r.codec.utf8String.toBits(t));var e,n=this._buffer=r.bitArray.concat(this._buffer,t),i=this._length,o=this._length=i+r.bitArray.bitLength(t);if(o>9007199254740991)throw new r.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var a=new Uint32Array(n),s=0;for(e=512+i-(512+i&511);e<=o;e+=512)this._block(a.subarray(16*s,16*(s+1))),s+=1;n.splice(0,16*s)}else for(e=512+i-(512+i&511);e<=o;e+=512)this._block(n.splice(0,16));return this},finalize:function(){var t,e=this._buffer,n=this._h;for(t=(e=r.bitArray.concat(e,[r.bitArray.partial(1,1)])).length+2;15&t;t++)e.push(0);for(e.push(Math.floor(this._length/4294967296)),e.push(0|this._length);e.length;)this._block(e.splice(0,16));return this.reset(),n},_init:[],_key:[],_precompute:function(){var t,e,n=0,r=2;function i(t){return 4294967296*(t-Math.floor(t))|0}for(;n<64;r++){for(e=!0,t=2;t*t<=r;t++)if(r%t==0){e=!1;break}e&&(n<8&&(this._init[n]=i(Math.pow(r,.5))),this._key[n]=i(Math.pow(r,1/3)),n++)}},_block:function(t){var e,n,r,i,o=this._h,a=this._key,s=o[0],u=o[1],c=o[2],h=o[3],l=o[4],f=o[5],d=o[6],p=o[7];for(e=0;e<64;e++)e<16?n=t[e]:(r=t[e+1&15],i=t[e+14&15],n=t[15&e]=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(i>>>17^i>>>19^i>>>10^i<<15^i<<13)+t[15&e]+t[e+9&15]|0),n=n+p+(l>>>6^l>>>11^l>>>25^l<<26^l<<21^l<<7)+(d^l&(f^d))+a[e],p=d,d=f,f=l,l=h+n|0,h=c,c=u,s=n+((u=s)&c^h&(u^c))+(u>>>2^u>>>13^u>>>22^u<<30^u<<19^u<<10)|0;o[0]=o[0]+s|0,o[1]=o[1]+u|0,o[2]=o[2]+c|0,o[3]=o[3]+h|0,o[4]=o[4]+l|0,o[5]=o[5]+f|0,o[6]=o[6]+d|0,o[7]=o[7]+p|0}},r.hash.sha1=function(t){t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()},r.hash.sha1.hash=function(t){return(new r.hash.sha1).update(t).finalize()},r.hash.sha1.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(t){"string"==typeof t&&(t=r.codec.utf8String.toBits(t));var e,n=this._buffer=r.bitArray.concat(this._buffer,t),i=this._length,o=this._length=i+r.bitArray.bitLength(t);if(o>9007199254740991)throw new r.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var a=new Uint32Array(n),s=0;for(e=this.blockSize+i-(this.blockSize+i&this.blockSize-1);e<=o;e+=this.blockSize)this._block(a.subarray(16*s,16*(s+1))),s+=1;n.splice(0,16*s)}else for(e=this.blockSize+i-(this.blockSize+i&this.blockSize-1);e<=o;e+=this.blockSize)this._block(n.splice(0,16));return this},finalize:function(){var t,e=this._buffer,n=this._h;for(t=(e=r.bitArray.concat(e,[r.bitArray.partial(1,1)])).length+2;15&t;t++)e.push(0);for(e.push(Math.floor(this._length/4294967296)),e.push(0|this._length);e.length;)this._block(e.splice(0,16));return this.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(t,e,n,r){return t<=19?e&n|~e&r:t<=39?e^n^r:t<=59?e&n|e&r|n&r:t<=79?e^n^r:void 0},_S:function(t,e){return e<<t|e>>>32-t},_block:function(t){var e,n,r,i,o,a,s,u,c=this._h;if("undefined"!=typeof Uint32Array){u=Array(80);for(var h=0;h<16;h++)u[h]=t[h]}else u=t;for(r=c[0],i=c[1],o=c[2],a=c[3],s=c[4],e=0;e<=79;e++)e>=16&&(u[e]=this._S(1,u[e-3]^u[e-8]^u[e-14]^u[e-16])),n=this._S(5,r)+this._f(e,i,o,a)+s+u[e]+this._key[Math.floor(e/20)]|0,s=a,a=o,o=this._S(30,i),i=r,r=n;c[0]=c[0]+r|0,c[1]=c[1]+i|0,c[2]=c[2]+o|0,c[3]=c[3]+a|0,c[4]=c[4]+s|0}},t.exports&&(t.exports=r),void 0===(n=function(){return r}.apply(e,[]))||(t.exports=n)},939:(t,e,n)=>{"use strict";n.d(e,{J:()=>v,y:()=>y});var r=n(144),i=n(671),o=n(28),a=n(24),s=function(){function t(){(0,i.Z)(this,t),this.cache_={}}return(0,r.Z)(t,[{key:"length",get:function(){return Object.keys(this.cache_).length}},{key:"key",value:function(t){var e=Object.keys(this.cache_);return 0<=t&&t<e.length?e[t]:null}},{key:"getItem",value:function(t){return this.cache_.hasOwnProperty(t)?this.cache_[t]:null}},{key:"setItem",value:function(t,e){this.cache_[t]=e}},{key:"removeItem",value:function(t){delete this.cache_[t]}},{key:"clear",value:function(){this.cache_={}}}]),t}(),u="localStorage",c=o.sZ.localStorage;c||(c=a.Z.localStorage||new s),(0,o.x$)(u,(function(){return c}),(function(t){return c=t}));var h="sessionStorage",l=o.sZ.sessionStorage;l||(l=a.Z.sessionStorage||null),(0,o.x$)(h,(function(){return l}),(function(t){return l=t}));var f=n(857);function d(t){return"webcom:"+t}var p=(0,r.Z)((function t(e,n){(0,i.Z)(this,t);var r=e();if(r){var o=d("sentinel");r.setItem(o,""),r.removeItem(o)}function a(){return e()||(0,f._y)("JSONStorage","the ".concat(n," implementation could not be found!"))}this.set=function(t,e){if(null===e)a().removeItem(d(t));else{var n=JSON.stringify(e);a().setItem(d(t),"string"==typeof n?n:"null")}},this.get=function(t){var e=a().getItem(d(t));return e&&JSON.parse(e)},this.remove=function(t){a().removeItem(d(t))}})),v=new p((function(){return c}),"localStorage"),y=new p((function(){return l}),"sessionStorage")},455:(t,e,n)=>{"use strict";n.d(e,{ZT:()=>r});n(618);var r=Function.prototype},24:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var r=function(){if("undefined"!=typeof globalThis)return globalThis;return"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:Function("return this")()}()},303:(t,e,n)=>{"use strict";n.d(e,{HD:()=>a,Kn:()=>c,hj:()=>s,jn:()=>o,lk:()=>h,mf:()=>u});var r=n(2),i=n(466);function o(t){return"boolean"==typeof t}function a(t){return"string"==typeof t}function s(t){return"number"==typeof t}function u(t){return"function"==typeof t}function c(t){return"object"===(0,r.Z)(t)}function h(){return i.RY&&(window.navigator.userAgent.match(/CriOS|Twitter for iPhone|FBAN\/FBIOS|Windows Phone/)||window.navigator.standalone)}},803:(t,e,n)=>{"use strict";function r(t,e,n,r){return o(t.prototype,e,n,r)}function i(t,e,n,r){return a(t.prototype,e,n,r)}function o(t,e,n,r){return s(t,e,{value:n},r)}function a(t,e,n,r){return s(t,e,{get:n},r)}function s(t,e,n,r){return Object.defineProperty(t,e,Object.assign(n,{enumerable:r,configurable:!0}))}n.d(e,{CZ:()=>o,Xt:()=>r,fE:()=>a,mi:()=>i})},584:(t,e,n)=>{"use strict";n.d(e,{BN:()=>h,JQ:()=>v,dS:()=>d,fl:()=>f,nB:()=>l,q4:()=>p,zO:()=>c});var r=n(885),i=n(857),o=n(730),a=n.n(o),s=n(303);function u(t){return decodeURIComponent(t.replace(/\+/g," "))}function c(){var t=2147483648;return Math.floor(Math.random()*t).toString(36)+Math.abs(Math.floor(Math.random()*t)^Date.now()).toString(36)}function h(t){var e={};return t.replace(/^[^?]*\?/,"").split("&").forEach((function(t){var n=t.indexOf("=");if(n<0)e[u(t)]=!0;else{var r=u(t.substring(0,n));e[r]=u(t.substring(n+1))}})),e}function l(t){if(!t)return"";var e=[];return Object.entries(t).forEach((function(t){var n=(0,r.Z)(t,2),i=n[0],o=n[1];null!=o&&((0,s.Kn)(o)&&(o=JSON.stringify(o)),e.push(encodeURIComponent(i)+"="+encodeURIComponent(o)))})),e.join("&")}function f(t,e){var n=t.indexOf("?"),r=e?(n<0?"?":"&")+l(e):"",i=t.indexOf("#");return i<0?t+r:t.substring(0,i)+r+t.substring(i)}function d(t){for(var e,n,r=[],o=0,a=0;a<t.length;a++)(e=t.charCodeAt(a))>=55296&&e<=56319&&(n=e-55296,a++,(0,i.hu)(a<t.length,"Surrogate pair missing trail surrogate."),e=65536+(n<<10)+(t.charCodeAt(a)-56320)),e<128?r[o++]=e:e<2048?(r[o++]=e>>6|192,r[o++]=63&e|128):e<65536?(r[o++]=e>>12|224,r[o++]=e>>6&63|128,r[o++]=63&e|128):(r[o++]=e>>18|240,r[o++]=e>>12&63|128,r[o++]=e>>6&63|128,r[o++]=63&e|128);return r}function p(t,e){return a().codec.base64.fromBits(a().hash.sha1.hash(t),!1,e)}function v(t,e){return a().codec.base64.fromBits(a().hash.sha256.hash(t),!1,e)}},857:(t,e,n)=>{"use strict";n.d(e,{Dp:()=>S,Hk:()=>T,O4:()=>a,O7:()=>k,Q3:()=>d,Ry:()=>Z,T2:()=>f,Yl:()=>w,Z_:()=>b,_T:()=>h,__:()=>y,_y:()=>l,hu:()=>s,jt:()=>p,l4:()=>g,sR:()=>m,vA:()=>v,wB:()=>O,wE:()=>A});var r=n(2),i=n(982),o=n(303),a="Webcom internal error";function s(t,e){t||l(a,e)}var u={values:[]};function c(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];Object.assign(u,{method:t,args:e||[],checkers:r})}function h(t,e,n){u.values.push({name:t,value:e,checker:n})}var l=function(t,e){var n;throw new Error("".concat((n="").concat.apply(n,(0,i.Z)(t)),": ").concat(e))};function f(t,e){if(!u.method){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];c.apply(void 0,[t,e].concat(r))}var o=u.method,a=u.args,s=u.checkers,h=u.values;Object.assign(u,{method:void 0,args:void 0,checkers:void 0,values:[]}),a.length>s.length&&l(o,"too many arguments, ".concat(a.length," instead of ").concat(s.length)),s.forEach((function(t,e){return d(t,a[e],o,(function(t){return"argument #".concat(e+1," ").concat(t)}))})),h.forEach((function(t){var e=t.name,n=t.value;return d(t.checker,n,o,(function(t){return"".concat(e," ").concat(t)}))}))}function d(t,e,n,r){var i=t(e);i&&l(n,r(i))}function p(t){return function(e){return _("undefined")(e)&&t&&t(e)}}function v(t){return function(e){return null===e?"must not be null":t&&t(e)}}var y=function(t){return void 0===t?"is missing":""};function g(t){return function(e){return!(e instanceof t)&&"must be an instance of ".concat(t.name)}}function _(t){return function(e){return(0,r.Z)(e)!==t&&"must be a ".concat(t)}}var m=_("undefined"),b=_("string"),w=_("function"),k=_("boolean"),S=E(Number.isFinite,"must be a finite number"),Z=_("object");function A(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return e.every((function(e){return e(t)}))&&"either ".concat(e.map((function(e){return e(t)})).join(" or "))}}function T(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){var n;return e.some((function(e){return n=e(t)}))&&n}}function E(t,e){return function(n){return!t(n)&&(e||"is not valid")}}E((function(t){return(0,o.hj)(t)&&Math.floor(t)===t}),"must be an integer");function O(t,e){return E((function(e){return t.test(e)}),e)}},907:(t,e,n)=>{"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,{Z:()=>r})},671:(t,e,n)=>{"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,{Z:()=>r})},144:(t,e,n)=>{"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}n.d(e,{Z:()=>i})},885:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(181);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||(0,r.Z)(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},982:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(907);var i=n(181);function o(t){return function(t){if(Array.isArray(t))return(0,r.Z)(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||(0,i.Z)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},2:(t,e,n)=>{"use strict";function r(t){return r="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},r(t)}n.d(e,{Z:()=>r})},181:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(907);function i(t,e){if(t){if("string"==typeof t)return(0,r.Z)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(t,e):void 0}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.d(r,{default:()=>f});var t=n(24),e=n(671),i=n(144),o=n(406),a=n(722),s=n(28),u=n(857),c="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",h=c.length;var l="Webcom",f=function(){function t(){(0,e.Z)(this,t),this._init.apply(this,arguments)}return(0,i.Z)(t,[{key:"_init",value:function(){(0,u._y)(["new ",l],"this static class cannot be instantiated")}}],[{key:"SDK_VERSION",get:function(){return"3.8.0"}},{key:"Log",get:function(){return a.ZP}},{key:"App",value:function(t,e){return new o.ZP(t,e)}},{key:"getUniqueKeyDate",value:function(t){return new Date(function(t){for(var e=t.substring(0,8),n=0,r=0;r<8;++r)n=n*h+c.indexOf(e[r]);return n}(t))}},{key:"dependencies",get:function(){return s.HO}}]),t}(),d=(0,a.hu)("api.Webcom",l),p=n(982),v=n(885),y=n(466);function g(t){"http:"===t.protocol&&y.RY&&"https:"===window.location.protocol&&this._logger.warn("Insecure access to a Webcom service from a secure page. Please setup your service with an https protocol.")}var _=new RegExp("^(?:([^:]+:)//)?(?:[^/@]+@)?([^/:]+(?::\\d+)?)(?:/.*)?$"),m="io.datasync.orange.com";function b(e){if(e&&(t.Z.URL&&e instanceof URL||e.href&&e.protocol&&e.host))return e;var n=e?_.exec(e):[m,void 0,m];if(n){var r=(0,v.Z)(n,3),i=r[0],o=r[1],a=r[2];return o||(i="".concat(o="https:","//").concat(i)),{href:i,protocol:o,host:a}}throw new Error("cannot parse base URL: ".concat(e))}function w(t,e){return function(n){var r=t(n);if(r)throw new Error(r);return e?e(n):n}}var k=n(803),S="some",Z="required",A="none",T=function(){function t(n,r){(0,e.Z)(this,t),(0,u.hu)(n===S||n===Z||n===A,"Wrong state value for a new State object: expecting 'some', 'required' or 'none'."),this.state