opengate-js 12.9.3 → 12.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,8 +20,8 @@ if(null===(e=Lt(xi,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this.
20
20
  ordinal:function(e){var t=e%10;return e+(1===W(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=w("moment.lang is deprecated. Use moment.locale instead.",rt),r.langData=w("moment.langData is deprecated. Use moment.localeData instead.",ot);var Go=Math.abs,qo=Vn("ms"),Vo=Vn("s"),Ho=Vn("m"),Wo=Vn("h"),Yo=Vn("d"),$o=Vn("w"),Ko=Vn("M"),Jo=Vn("Q"),Qo=Vn("y"),Xo=Yn("milliseconds"),Zo=Yn("seconds"),ea=Yn("minutes"),ta=Yn("hours"),ra=Yn("days"),na=Yn("months"),ia=Yn("years"),oa=Math.round,aa={ss:44,s:45,m:45,h:22,d:26,w:null,M:11},ua=Math.abs,sa=Mt.prototype;return sa.isValid=xt,sa.abs=Bn,sa.add=Rn,sa.subtract=In,sa.as=Gn,sa.asMilliseconds=qo,sa.asSeconds=Vo,sa.asMinutes=Ho,sa.asHours=Wo,sa.asDays=Yo,sa.asWeeks=$o,sa.asMonths=Ko,sa.asQuarters=Jo,sa.asYears=Qo,sa.valueOf=qn,sa._bubble=Un,sa.clone=Hn,sa.get=Wn,sa.milliseconds=Xo,sa.seconds=Zo,sa.minutes=ea,sa.hours=ta,sa.days=ra,sa.weeks=$n,sa.months=na,sa.years=ia,sa.humanize=Zn,sa.toISOString=ti,sa.toString=ti,sa.toJSON=ti,sa.locale=Tr,sa.localeData=Fr,sa.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ti),sa.lang=To,k("X",0,0,"unix"),k("x",0,0,"valueOf"),X("x",Fi),X("X",Bi),re("X",function(e,t,r){r._d=new Date(1e3*parseFloat(e))}),re("x",function(e,t,r){r._d=new Date(W(e))}),r.version="2.29.4",function(e){ri=e}(Ct),r.fn=Lo,r.min=Tt,r.max=Ft,r.now=Ao,r.utc=d,r.unix=An,r.months=kn,r.isDate=c,r.locale=rt,r.invalid=m,r.duration=er,r.isMoment=g,r.weekdays=Fn,r.parseZone=On,r.localeData=ot,r.isDuration=Rt,r.monthsShort=Tn,r.weekdaysMin=xn,r.defineLocale=nt,r.updateLocale=it,r.locales=at,r.weekdaysShort=jn,r.normalizeUnits=L,r.relativeTimeRounding=Qn,r.relativeTimeThreshold=Xn,r.calendarFormat=fr,r.prototype=Lo,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r})},{}],114:[function(e,t,r){(function(e){function t(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e){"string"!=typeof e&&(e+="");var t,r=0,n=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){r=t+1;break}}else-1===n&&(i=!1,n=t+1);return-1===n?"":e.slice(r,n)}function i(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}r.resolve=function(){for(var r="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var a=o>=0?arguments[o]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(r=a+"/"+r,n="/"===a.charAt(0))}return r=t(i(r.split("/"),function(e){return!!e}),!n).join("/"),(n?"/":"")+r||"."},r.normalize=function(e){var n=r.isAbsolute(e),a="/"===o(e,-1);return e=t(i(e.split("/"),function(e){return!!e}),!n).join("/"),e||n||(e="."),e&&a&&(e+="/"),(n?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(i(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var i=n(e.split("/")),o=n(t.split("/")),a=Math.min(i.length,o.length),u=a,s=0;s<a;s++)if(i[s]!==o[s]){u=s;break}for(var c=[],s=u;s<i.length;s++)c.push("..");return c=c.concat(o.slice(u)),c.join("/")},r.sep="/",r.delimiter=":",r.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,i=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){n=o;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":e.slice(0,n)},r.basename=function(e,t){var r=n(e);return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},r.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,r=0,n=-1,i=!0,o=0,a=e.length-1;a>=0;--a){var u=e.charCodeAt(a);if(47!==u)-1===n&&(i=!1,n=a+1),46===u?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){r=a+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===r+1?"":e.slice(t,n)};var o="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,e("FWaASH"))},{FWaASH:50}],115:[function(e,t,r){function n(e,t){for(var r,n=[],i=0,o=0,a="",u=t&&t.delimiter||"/";null!=(r=_.exec(e));){var l=r[0],f=r[1],d=r.index;if(a+=e.slice(o,d),o=d+l.length,f)a+=f[1];else{var h=e[o],p=r[2],y=r[3],m=r[4],v=r[5],g=r[6],b=r[7];a&&(n.push(a),a="");var w=null!=p&&null!=h&&h!==p,E="+"===g||"*"===g,A="?"===g||"*"===g,O=r[2]||u,S=m||v;n.push({name:y||i++,prefix:p||"",delimiter:O,optional:A,repeat:E,partial:w,asterisk:!!b,pattern:S?c(S):b?".*":"[^"+s(O)+"]+?"})}}return o<e.length&&(a+=e.substr(o)),a&&n.push(a),n}function i(e,t){return u(n(e,t))}function o(e){return encodeURI(e).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function a(e){return encodeURI(e).replace(/[?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function u(e){for(var t=new Array(e.length),r=0;r<e.length;r++)"object"==typeof e[r]&&(t[r]=new RegExp("^(?:"+e[r].pattern+")$"));return function(r,n){for(var i="",u=r||{},s=n||{},c=s.pretty?o:encodeURIComponent,l=0;l<e.length;l++){var f=e[l];if("string"!=typeof f){var d,h=u[f.name];if(null==h){if(f.optional){f.partial&&(i+=f.prefix);continue}throw new TypeError('Expected "'+f.name+'" to be defined')}if(v(h)){if(!f.repeat)throw new TypeError('Expected "'+f.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(f.optional)continue;throw new TypeError('Expected "'+f.name+'" to not be empty')}for(var p=0;p<h.length;p++){if(d=c(h[p]),!t[l].test(d))throw new TypeError('Expected all "'+f.name+'" to match "'+f.pattern+'", but received `'+JSON.stringify(d)+"`");i+=(0===p?f.prefix:f.delimiter)+d}}else{if(d=f.asterisk?a(h):c(h),!t[l].test(d))throw new TypeError('Expected "'+f.name+'" to match "'+f.pattern+'", but received "'+d+'"');i+=f.prefix+d}}else i+=f}return i}}function s(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function l(e,t){return e.keys=t,e}function f(e){return e.sensitive?"":"i"}function d(e,t){var r=e.source.match(/\((?!\?)/g);if(r)for(var n=0;n<r.length;n++)t.push({name:n,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(e,t)}function h(e,t,r){for(var n=[],i=0;i<e.length;i++)n.push(m(e[i],t,r).source);return l(new RegExp("(?:"+n.join("|")+")",f(r)),t)}function p(e,t,r){return y(n(e,r),t,r)}function y(e,t,r){v(t)||(r=t||r,t=[]),r=r||{};for(var n=r.strict,i=!1!==r.end,o="",a=0;a<e.length;a++){var u=e[a];if("string"==typeof u)o+=s(u);else{var c=s(u.prefix),d="(?:"+u.pattern+")";t.push(u),u.repeat&&(d+="(?:"+c+d+")*"),d=u.optional?u.partial?c+"("+d+")?":"(?:"+c+"("+d+"))?":c+"("+d+")",o+=d}}var h=s(r.delimiter||"/"),p=o.slice(-h.length)===h;return n||(o=(p?o.slice(0,-h.length):o)+"(?:"+h+"(?=$))?"),o+=i?"$":n&&p?"":"(?="+h+"|$)",l(new RegExp("^"+o,f(r)),t)}function m(e,t,r){return v(t)||(r=t||r,t=[]),r=r||{},e instanceof RegExp?d(e,t):v(e)?h(e,t,r):p(e,t,r)}var v=e("isarray");t.exports=m,t.exports.parse=n,t.exports.compile=i,t.exports.tokensToFunction=u,t.exports.tokensToRegExp=y;var _=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g")},{isarray:100}],116:[function(e,t,r){var n=t.exports={};n.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var r=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),r.length>0)){r.shift()()}},!0),function(e){r.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")}},{}],117:[function(e,t,r){(function(e){!function(e){"use strict";if("function"==typeof bootstrap)bootstrap("promise",e);else if("object"==typeof r&&"object"==typeof t)t.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeQ=e}else{if("undefined"==typeof window&&"undefined"==typeof self)throw new Error("This environment was not anticipated by Q. Please file a bug.");var n="undefined"!=typeof window?window:self,i=n.Q;n.Q=e(),n.Q.noConflict=function(){return n.Q=i,this}}}(function(){"use strict";function t(e){return function(){return Y.apply(e,arguments)}}function r(e){return e===Object(e)}function n(e){return"[object StopIteration]"===re(e)||e instanceof q}function i(e,t){if(z&&t.stack&&"object"==typeof e&&null!==e&&e.stack){for(var r=[],n=t;n;n=n.source)n.stack&&(!e.__minimumStackCounter__||e.__minimumStackCounter__>n.stackCounter)&&(Z(e,"__minimumStackCounter__",{value:n.stackCounter,configurable:!0}),r.unshift(n.stack));r.unshift(e.stack);var i=r.join("\n"+ne+"\n"),a=o(i);Z(e,"stack",{value:a,configurable:!0})}}function o(e){for(var t=e.split("\n"),r=[],n=0;n<t.length;++n){var i=t[n];s(i)||a(i)||!i||r.push(i)}return r.join("\n")}function a(e){return-1!==e.indexOf("(module.js:")||-1!==e.indexOf("(node.js:")}function u(e){var t=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(e);if(t)return[t[1],Number(t[2])];var r=/at ([^ ]+):(\d+):(?:\d+)$/.exec(e);if(r)return[r[1],Number(r[2])];var n=/.*@(.+):(\d+)$/.exec(e);return n?[n[1],Number(n[2])]:void 0}function s(e){var t=u(e);if(!t)return!1;var r=t[0],n=t[1];return r===G&&n>=V&&n<=ce}function c(){if(z)try{throw new Error}catch(n){var e=n.stack.split("\n"),t=e[0].indexOf("@")>0?e[1]:e[2],r=u(t);if(!r)return;return G=r[0],r[1]}}function l(e){return e instanceof p?e:_(e)?D(e):P(e)}function f(){function e(e){t=e,l.longStackSupport&&z&&(o.source=e),K(r,function(t,r){l.nextTick(function(){e.promiseDispatch.apply(e,r)})},void 0),r=void 0,n=void 0}var t,r=[],n=[],i=X(f.prototype),o=X(p.prototype);if(o.promiseDispatch=function(e,i,o){var a=$(arguments);r?(r.push(a),"when"===i&&o[1]&&n.push(o[1])):l.nextTick(function(){t.promiseDispatch.apply(t,a)})},o.valueOf=function(){if(r)return o;var e=m(t);return v(e)&&(t=e),e},o.inspect=function(){return t?t.inspect():{state:"pending"}},l.longStackSupport&&z)try{throw new Error}catch(e){o.stack=e.stack.substring(e.stack.indexOf("\n")+1),o.stackCounter=ie++}return i.promise=o,i.resolve=function(r){t||e(l(r))},i.fulfill=function(r){t||e(P(r))},i.reject=function(r){t||e(S(r))},i.notify=function(e){t||K(n,function(t,r){l.nextTick(function(){r(e)})},void 0)},i}function d(e){if("function"!=typeof e)throw new TypeError("resolver must be a function.");var t=f();try{e(t.resolve,t.reject,t.notify)}catch(e){t.reject(e)}return t.promise}function h(e){return d(function(t,r){for(var n=0,i=e.length;n<i;n++)l(e[n]).then(t,r)})}function p(e,t,r){void 0===t&&(t=function(e){return S(new Error("Promise does not support operation: "+e))}),void 0===r&&(r=function(){return{state:"unknown"}});var n=X(p.prototype);if(n.promiseDispatch=function(r,i,o){var a;try{a=e[i]?e[i].apply(n,o):t.call(n,i,o)}catch(e){a=S(e)}r&&r(a)},n.inspect=r,r){var i=r();"rejected"===i.state&&(n.exception=i.reason),n.valueOf=function(){var e=r();return"pending"===e.state||"rejected"===e.state?n:e.value}}return n}function y(e,t,r,n){return l(e).then(t,r,n)}function m(e){if(v(e)){var t=e.inspect();if("fulfilled"===t.state)return t.value}return e}function v(e){return e instanceof p}function _(e){return r(e)&&"function"==typeof e.then}function g(e){return v(e)&&"pending"===e.inspect().state}function b(e){return!v(e)||"fulfilled"===e.inspect().state}function w(e){return v(e)&&"rejected"===e.inspect().state}function E(){oe.length=0,ae.length=0,se||(se=!0)}function A(t,r){se&&("object"==typeof e&&"function"==typeof e.emit&&l.nextTick.runAfter(function(){-1!==J(ae,t)&&(e.emit("unhandledRejection",r,t),ue.push(t))}),ae.push(t),r&&void 0!==r.stack?oe.push(r.stack):oe.push("(no stack) "+r))}function O(t){if(se){var r=J(ae,t);-1!==r&&("object"==typeof e&&"function"==typeof e.emit&&l.nextTick.runAfter(function(){var n=J(ue,t);-1!==n&&(e.emit("rejectionHandled",oe[r],t),ue.splice(n,1))}),ae.splice(r,1),oe.splice(r,1))}}function S(e){var t=p({when:function(t){return t&&O(this),t?t(e):this}},function(){return this},function(){return{state:"rejected",reason:e}});return A(t,e),t}function P(e){return p({when:function(){return e},get:function(t){return e[t]},set:function(t,r){e[t]=r},delete:function(t){delete e[t]},post:function(t,r){return null===t||void 0===t?e.apply(void 0,r):e[t].apply(e,r)},apply:function(t,r){return e.apply(t,r)},keys:function(){return te(e)}},void 0,function(){return{state:"fulfilled",value:e}})}function D(e){var t=f();return l.nextTick(function(){try{e.then(t.resolve,t.reject,t.notify)}catch(e){t.reject(e)}}),t.promise}function C(e){return p({isDef:function(){}},function(t,r){return B(e,t,r)},function(){return l(e).inspect()})}function k(e,t,r){return l(e).spread(t,r)}function T(e){return function(){function t(e,t){var a;if("undefined"==typeof StopIteration){try{a=r[e](t)}catch(e){return S(e)}return a.done?l(a.value):y(a.value,i,o)}try{a=r[e](t)}catch(e){return n(e)?l(e.value):S(e)}return y(a,i,o)}var r=e.apply(this,arguments),i=t.bind(t,"next"),o=t.bind(t,"throw");return i()}}function F(e){l.done(l.async(e)())}function j(e){throw new q(e)}function x(e){return function(){return k([this,M(arguments)],function(t,r){return e.apply(t,r)})}}function B(e,t,r){return l(e).dispatch(t,r)}function M(e){return y(e,function(e){var t=0,r=f();return K(e,function(n,i,o){var a;v(i)&&"fulfilled"===(a=i.inspect()).state?e[o]=a.value:(++t,y(i,function(n){e[o]=n,0==--t&&r.resolve(e)},r.reject,function(e){r.notify({index:o,value:e})}))},void 0),0===t&&r.resolve(e),r.promise})}function R(e){if(0===e.length)return l.resolve();var t=l.defer(),r=0;return K(e,function(n,i,o){function a(e){t.resolve(e)}function u(e){if(0===--r){var n=e||new Error(""+e);n.message="Q can't get fulfillment value from any promise, all promises were rejected. Last error message: "+n.message,t.reject(n)}}function s(e){t.notify({index:o,value:e})}var c=e[o];r++,y(c,a,u,s)},void 0),t.promise}function I(e){return y(e,function(e){return e=Q(e,l),y(M(Q(e,function(e){return y(e,H,H)})),function(){return e})})}function N(e){return l(e).allSettled()}function U(e,t){return l(e).then(void 0,void 0,t)}function L(e,t){return l(e).nodeify(t)}var z=!1;try{throw new Error}catch(e){z=!!e.stack}var G,q,V=c(),H=function(){},W=function(){function t(){for(var e,t;n.next;)n=n.next,e=n.task,n.task=void 0,t=n.domain,t&&(n.domain=void 0,t.enter()),r(e,t);for(;s.length;)e=s.pop(),r(e);o=!1}function r(e,r){try{e()}catch(e){if(u)throw r&&r.exit(),setTimeout(t,0),r&&r.enter(),e;setTimeout(function(){throw e},0)}r&&r.exit()}var n={task:void 0,next:null},i=n,o=!1,a=void 0,u=!1,s=[];if(W=function(t){i=i.next={task:t,domain:u&&e.domain,next:null},o||(o=!0,a())},"object"==typeof e&&"[object process]"===e.toString()&&e.nextTick)u=!0,a=function(){e.nextTick(t)};else if("function"==typeof setImmediate)a="undefined"!=typeof window?setImmediate.bind(window,t):function(){setImmediate(t)};else if("undefined"!=typeof MessageChannel){var c=new MessageChannel;c.port1.onmessage=function(){a=l,c.port1.onmessage=t,t()};var l=function(){c.port2.postMessage(0)};a=function(){setTimeout(t,0),l()}}else a=function(){setTimeout(t,0)};return W.runAfter=function(e){s.push(e),o||(o=!0,a())},W}(),Y=Function.call,$=t(Array.prototype.slice),K=t(Array.prototype.reduce||function(e,t){var r=0,n=this.length;if(1===arguments.length)for(;;){if(r in this){t=this[r++];break}if(++r>=n)throw new TypeError}for(;r<n;r++)r in this&&(t=e(t,this[r],r));return t}),J=t(Array.prototype.indexOf||function(e){for(var t=0;t<this.length;t++)if(this[t]===e)return t;return-1}),Q=t(Array.prototype.map||function(e,t){var r=this,n=[];return K(r,function(i,o,a){n.push(e.call(t,o,a,r))},void 0),n}),X=Object.create||function(e){function t(){}return t.prototype=e,new t},Z=Object.defineProperty||function(e,t,r){return e[t]=r.value,e},ee=t(Object.prototype.hasOwnProperty),te=Object.keys||function(e){var t=[];for(var r in e)ee(e,r)&&t.push(r);return t},re=t(Object.prototype.toString);q="undefined"!=typeof ReturnValue?ReturnValue:function(e){this.value=e};var ne="From previous event:";l.resolve=l,l.nextTick=W,l.longStackSupport=!1;var ie=1;"object"==typeof e&&e&&e.env&&e.env.Q_DEBUG&&(l.longStackSupport=!0),l.defer=f,f.prototype.makeNodeResolver=function(){var e=this;return function(t,r){t?e.reject(t):arguments.length>2?e.resolve($(arguments,1)):e.resolve(r)}},l.Promise=d,l.promise=d,d.race=h,d.all=M,d.reject=S,d.resolve=l,l.passByCopy=function(e){return e},p.prototype.passByCopy=function(){return this},l.join=function(e,t){return l(e).join(t)},p.prototype.join=function(e){return l([this,e]).spread(function(e,t){if(e===t)return e;throw new Error("Q can't join: not the same: "+e+" "+t)})},l.race=h,p.prototype.race=function(){return this.then(l.race)},l.makePromise=p,p.prototype.toString=function(){return"[object Promise]"},p.prototype.then=function(e,t,r){function n(t){try{return"function"==typeof e?e(t):t}catch(e){return S(e)}}function o(e){if("function"==typeof t){i(e,u);try{return t(e)}catch(e){return S(e)}}return S(e)}function a(e){return"function"==typeof r?r(e):e}var u=this,s=f(),c=!1;return l.nextTick(function(){u.promiseDispatch(function(e){c||(c=!0,s.resolve(n(e)))},"when",[function(e){c||(c=!0,s.resolve(o(e)))}])}),u.promiseDispatch(void 0,"when",[void 0,function(e){var t,r=!1;try{t=a(e)}catch(e){if(r=!0,!l.onerror)throw e;l.onerror(e)}r||s.notify(t)}]),s.promise},l.tap=function(e,t){return l(e).tap(t)},p.prototype.tap=function(e){return e=l(e),this.then(function(t){return e.fcall(t).thenResolve(t)})},l.when=y,p.prototype.thenResolve=function(e){return this.then(function(){return e})},l.thenResolve=function(e,t){return l(e).thenResolve(t)},p.prototype.thenReject=function(e){return this.then(function(){throw e})},l.thenReject=function(e,t){return l(e).thenReject(t)},l.nearer=m,l.isPromise=v,l.isPromiseAlike=_,l.isPending=g,p.prototype.isPending=function(){return"pending"===this.inspect().state},l.isFulfilled=b,p.prototype.isFulfilled=function(){return"fulfilled"===this.inspect().state},l.isRejected=w,p.prototype.isRejected=function(){return"rejected"===this.inspect().state};var oe=[],ae=[],ue=[],se=!0;l.resetUnhandledRejections=E,l.getUnhandledReasons=function(){return oe.slice()},l.stopUnhandledRejectionTracking=function(){E(),se=!1},E(),l.reject=S,l.fulfill=P,l.master=C,l.spread=k,p.prototype.spread=function(e,t){return this.all().then(function(t){return e.apply(void 0,t)},t)},l.async=T,l.spawn=F,l.return=j,l.promised=x,l.dispatch=B,p.prototype.dispatch=function(e,t){var r=this,n=f();return l.nextTick(function(){r.promiseDispatch(n.resolve,e,t)}),n.promise},l.get=function(e,t){return l(e).dispatch("get",[t])},p.prototype.get=function(e){return this.dispatch("get",[e])},l.set=function(e,t,r){return l(e).dispatch("set",[t,r])},p.prototype.set=function(e,t){return this.dispatch("set",[e,t])},l.del=l.delete=function(e,t){return l(e).dispatch("delete",[t])},p.prototype.del=p.prototype.delete=function(e){return this.dispatch("delete",[e])},l.mapply=l.post=function(e,t,r){return l(e).dispatch("post",[t,r])},p.prototype.mapply=p.prototype.post=function(e,t){return this.dispatch("post",[e,t])},l.send=l.mcall=l.invoke=function(e,t){return l(e).dispatch("post",[t,$(arguments,2)])},p.prototype.send=p.prototype.mcall=p.prototype.invoke=function(e){return this.dispatch("post",[e,$(arguments,1)])},l.fapply=function(e,t){return l(e).dispatch("apply",[void 0,t])},p.prototype.fapply=function(e){return this.dispatch("apply",[void 0,e])},l.try=l.fcall=function(e){return l(e).dispatch("apply",[void 0,$(arguments,1)])},p.prototype.fcall=function(){return this.dispatch("apply",[void 0,$(arguments)])},l.fbind=function(e){var t=l(e),r=$(arguments,1);return function(){return t.dispatch("apply",[this,r.concat($(arguments))])}},p.prototype.fbind=function(){var e=this,t=$(arguments);return function(){return e.dispatch("apply",[this,t.concat($(arguments))])}},l.keys=function(e){return l(e).dispatch("keys",[])},p.prototype.keys=function(){return this.dispatch("keys",[])},l.all=M,p.prototype.all=function(){return M(this)},l.any=R,p.prototype.any=function(){return R(this)},l.allResolved=function(e,t,r){return function(){return"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(t+" is deprecated, use "+r+" instead.",new Error("").stack),e.apply(e,arguments)}}(I,"allResolved","allSettled"),p.prototype.allResolved=function(){return I(this)},l.allSettled=N,p.prototype.allSettled=function(){return this.then(function(e){return M(Q(e,function(e){function t(){return e.inspect()}return e=l(e),e.then(t,t)}))})},l.fail=l.catch=function(e,t){return l(e).then(void 0,t)},p.prototype.fail=p.prototype.catch=function(e){return this.then(void 0,e)},l.progress=U,p.prototype.progress=function(e){return this.then(void 0,void 0,e)},l.fin=l.finally=function(e,t){return l(e).finally(t)},p.prototype.fin=p.prototype.finally=function(e){if(!e||"function"!=typeof e.apply)throw new Error("Q can't apply finally callback");return e=l(e),this.then(function(t){return e.fcall().then(function(){return t})},function(t){return e.fcall().then(function(){throw t})})},l.done=function(e,t,r,n){return l(e).done(t,r,n)},p.prototype.done=function(t,r,n){var o=function(e){l.nextTick(function(){if(i(e,a),!l.onerror)throw e;l.onerror(e)})},a=t||r||n?this.then(t,r,n):this;"object"==typeof e&&e&&e.domain&&(o=e.domain.bind(o)),a.then(void 0,o)},l.timeout=function(e,t,r){return l(e).timeout(t,r)},p.prototype.timeout=function(e,t){var r=f(),n=setTimeout(function(){t&&"string"!=typeof t||(t=new Error(t||"Timed out after "+e+" ms"),t.code="ETIMEDOUT"),r.reject(t)},e);return this.then(function(e){clearTimeout(n),r.resolve(e)},function(e){clearTimeout(n),r.reject(e)},r.notify),r.promise},l.delay=function(e,t){return void 0===t&&(t=e,e=void 0),l(e).delay(t)},p.prototype.delay=function(e){return this.then(function(t){var r=f();return setTimeout(function(){r.resolve(t)},e),r.promise})},l.nfapply=function(e,t){return l(e).nfapply(t)},p.prototype.nfapply=function(e){var t=f(),r=$(e);return r.push(t.makeNodeResolver()),this.fapply(r).fail(t.reject),t.promise},l.nfcall=function(e){var t=$(arguments,1);return l(e).nfapply(t)},p.prototype.nfcall=function(){var e=$(arguments),t=f();return e.push(t.makeNodeResolver()),this.fapply(e).fail(t.reject),t.promise},l.nfbind=l.denodeify=function(e){if(void 0===e)throw new Error("Q can't wrap an undefined function");var t=$(arguments,1);return function(){var r=t.concat($(arguments)),n=f();return r.push(n.makeNodeResolver()),l(e).fapply(r).fail(n.reject),n.promise}},p.prototype.nfbind=p.prototype.denodeify=function(){var e=$(arguments);return e.unshift(this),l.denodeify.apply(void 0,e)},l.nbind=function(e,t){var r=$(arguments,2);return function(){function n(){return e.apply(t,arguments)}var i=r.concat($(arguments)),o=f();return i.push(o.makeNodeResolver()),l(n).fapply(i).fail(o.reject),o.promise}},p.prototype.nbind=function(){var e=$(arguments,0);return e.unshift(this),l.nbind.apply(void 0,e)},l.nmapply=l.npost=function(e,t,r){return l(e).npost(t,r)},p.prototype.nmapply=p.prototype.npost=function(e,t){var r=$(t||[]),n=f();return r.push(n.makeNodeResolver()),this.dispatch("post",[e,r]).fail(n.reject),n.promise},l.nsend=l.nmcall=l.ninvoke=function(e,t){var r=$(arguments,2),n=f();return r.push(n.makeNodeResolver()),l(e).dispatch("post",[t,r]).fail(n.reject),n.promise},p.prototype.nsend=p.prototype.nmcall=p.prototype.ninvoke=function(e){var t=$(arguments,1),r=f();return t.push(r.makeNodeResolver()),this.dispatch("post",[e,t]).fail(r.reject),r.promise},l.nodeify=L,p.prototype.nodeify=function(e){if(!e)return this;this.then(function(t){l.nextTick(function(){e(null,t)})},function(t){l.nextTick(function(){e(t)})})},l.noConflict=function(){throw new Error("Q.noConflict only works when Q is used as a global")};var ce=c();return l})}).call(this,e("FWaASH"))},{FWaASH:50}],118:[function(e,t,r){(function(r){"use strict";var n,i=e("buffer"),o=i.Buffer,a={};for(n in i)i.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(a[n]=i[n]);var u=a.Buffer={};for(n in o)o.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(u[n]=o[n]);if(a.Buffer.prototype=o.prototype,u.from&&u.from!==Uint8Array.from||(u.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return o(e,t,r)}),u.alloc||(u.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=o(e);return t&&0!==t.length?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!a.kStringMaxLength)try{a.kStringMaxLength=r.binding("buffer").kStringMaxLength}catch(e){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),t.exports=a}).call(this,e("FWaASH"))},{FWaASH:50,buffer:52}],119:[function(e,t,r){var n=e("escodegen").generate;t.exports=function(e,t){t||(t={});var r={},i=function e(i,o){if("Literal"===i.type)return i.value;if("UnaryExpression"===i.type){var a=e(i.argument);return"+"===i.operator?+a:"-"===i.operator?-a:"~"===i.operator?~a:"!"===i.operator?!a:r}if("ArrayExpression"===i.type){for(var u=[],s=0,c=i.elements.length;s<c;s++){var l=e(i.elements[s]);if(l===r)return r;u.push(l)}return u}if("ObjectExpression"===i.type){for(var f={},s=0;s<i.properties.length;s++){var d=i.properties[s],h=null===d.value?d.value:e(d.value);if(h===r)return r;f[d.key.value||d.key.name]=h}return f}if("BinaryExpression"===i.type||"LogicalExpression"===i.type){var c=e(i.left);if(c===r)return r;var p=e(i.right);if(p===r)return r;var y=i.operator;return"=="===y?c==p:"==="===y?c===p:"!="===y?c!=p:"!=="===y?c!==p:"+"===y?c+p:"-"===y?c-p:"*"===y?c*p:"/"===y?c/p:"%"===y?c%p:"<"===y?c<p:"<="===y?c<=p:">"===y?c>p:">="===y?c>=p:"|"===y?c|p:"&"===y?c&p:"^"===y?c^p:"&&"===y?c&&p:"||"===y?c||p:r}if("Identifier"===i.type)return{}.hasOwnProperty.call(t,i.name)?t[i.name]:r;if("ThisExpression"===i.type)return{}.hasOwnProperty.call(t,"this")?t.this:r;if("CallExpression"===i.type){var m=e(i.callee);if(m===r)return r;if("function"!=typeof m)return r;var v=i.callee.object?e(i.callee.object):r;v===r&&(v=null);for(var _=[],s=0,c=i.arguments.length;s<c;s++){var l=e(i.arguments[s]);if(l===r)return r;_.push(l)}return m.apply(v,_)}if("MemberExpression"===i.type){var f=e(i.object);if(f===r||"function"==typeof f)return r;if("Identifier"===i.property.type)return f[i.property.name];var d=e(i.property);return d===r?r:f[d]}if("ConditionalExpression"===i.type){var a=e(i.test);return a===r?r:e(a?i.consequent:i.alternate)}if("ExpressionStatement"===i.type){var a=e(i.expression);return a===r?r:a}if("ReturnStatement"===i.type)return e(i.argument);if("FunctionExpression"===i.type){var g=i.body.body,b={};Object.keys(t).forEach(function(e){b[e]=t[e]});for(var s=0;s<i.params.length;s++){var w=i.params[s];if("Identifier"!=w.type)return r;t[w.name]=null}for(var s in g)if(e(g[s])===r)return r;t=b;var E=Object.keys(t),A=E.map(function(e){return t[e]});return Function(E.join(", "),"return "+n(i)).apply(null,A)}if("TemplateLiteral"===i.type){for(var O="",s=0;s<i.expressions.length;s++)O+=e(i.quasis[s]),O+=e(i.expressions[s]);return O+=e(i.quasis[s])}if("TaggedTemplateExpression"===i.type){var S=e(i.tag),P=i.quasi,D=P.quasis.map(e),C=P.expressions.map(e);return S.apply(null,[D].concat(C))}return"TemplateElement"===i.type?i.value.cooked:r}(e);return i===r?void 0:i}},{escodegen:54}],120:[function(e,t,r){function n(e){if(!(this instanceof n))return new n(e);u.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){if(!this.allowHalfOpen&&!this._writableState.ended){var e=this;a(function(){e.end()})}}t.exports=n;var o=e("inherits"),a=e("process/browser.js").nextTick,u=e("./readable.js"),s=e("./writable.js");o(n,u),n.prototype.write=s.prototype.write,n.prototype.end=s.prototype.end,n.prototype._write=s.prototype._write},{"./readable.js":123,"./writable.js":125,inherits:99,"process/browser.js":116}],121:[function(e,t,r){function n(){i.call(this)}t.exports=n;var i=e("events").EventEmitter;e("inherits")(n,i),n.Readable=e("./readable.js"),n.Writable=e("./writable.js"),n.Duplex=e("./duplex.js"),n.Transform=e("./transform.js"),n.PassThrough=e("./passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&c.pause&&c.pause()}function n(){c.readable&&c.resume&&c.resume()}function o(){l||(l=!0,e.end())}function a(){l||(l=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(s(),0===i.listenerCount(this,"error"))throw e}function s(){c.removeListener("data",r),e.removeListener("drain",n),c.removeListener("end",o),c.removeListener("close",a),c.removeListener("error",u),e.removeListener("error",u),c.removeListener("end",s),c.removeListener("close",s),e.removeListener("close",s)}var c=this;c.on("data",r),e.on("drain",n),e._isStdio||t&&!1===t.end||(c.on("end",o),c.on("close",a));var l=!1;return c.on("error",u),e.on("error",u),c.on("end",s),c.on("close",s),e.on("close",s),e.emit("pipe",c),e}},{"./duplex.js":120,"./passthrough.js":122,"./readable.js":123,"./transform.js":124,"./writable.js":125,events:73,inherits:99}],122:[function(e,t,r){function n(e){if(!(this instanceof n))return new n(e);i.call(this,e)}t.exports=n;var i=e("./transform.js");e("inherits")(n,i),n.prototype._transform=function(e,t,r){r(null,e)}},{"./transform.js":124,inherits:99}],123:[function(e,t,r){(function(r){function n(t,r){t=t||{};var n=t.highWaterMark;this.highWaterMark=n||0===n?n:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(A||(A=e("string_decoder").StringDecoder),this.decoder=new A(t.encoding),this.encoding=t.encoding)}function i(e){if(!(this instanceof i))return new i(e);this._readableState=new n(e,this),this.readable=!0,S.call(this)}function o(e,t,r,n,i){var o=c(t,r);if(o)e.emit("error",o);else if(null===r||void 0===r)t.reading=!1,t.ended||l(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var u=new Error("stream.push() after EOF");e.emit("error",u)}else if(t.endEmitted&&i){var u=new Error("stream.unshift() after end event");e.emit("error",u)}else!t.decoder||i||n||(r=t.decoder.write(r)),t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):(t.reading=!1,t.buffer.push(r)),t.needReadable&&f(e),h(e,t);else i||(t.reading=!1);return a(t)}function a(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}
21
21
  function u(e){if(e>=C)e=C;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}function s(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||null===e?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=u(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function c(e,t){var r=null;return P.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||r||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(e,t){if(t.decoder&&!t.ended){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.length>0?f(e):b(e)}function f(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,t.sync?D(function(){d(e)}):d(e))}function d(e){e.emit("readable")}function h(e,t){t.readingMore||(t.readingMore=!0,D(function(){p(e,t)}))}function p(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function y(e){return function(){var t=e._readableState;0===--t.awaitDrain&&m(e)}}function m(e){function t(e,t,i){!1===e.write(r)&&n.awaitDrain++}var r,n=e._readableState;for(n.awaitDrain=0;n.pipesCount&&null!==(r=e.read());)if(1===n.pipesCount?t(n.pipes,0,null):w(n.pipes,t),e.emit("data",r),n.awaitDrain>0)return;if(0===n.pipesCount)return n.flowing=!1,void(O.listenerCount(e,"data")>0&&_(e));n.ranOut=!0}function v(){this._readableState.ranOut&&(this._readableState.ranOut=!1,m(this))}function _(e,t){if(e._readableState.flowing)throw new Error("Cannot switch to old mode now.");var r=t||!1,n=!1;e.readable=!0,e.pipe=S.prototype.pipe,e.on=e.addListener=S.prototype.on,e.on("readable",function(){n=!0;for(var t;!r&&null!==(t=e.read());)e.emit("data",t);null===t&&(n=!1,e._readableState.needReadable=!0)}),e.pause=function(){r=!0,this.emit("pause")},e.resume=function(){r=!1,n?D(function(){e.emit("readable")}):this.read(0),this.emit("resume")},e.emit("readable")}function g(e,t){var r,n=t.buffer,i=t.length,o=!!t.decoder,a=!!t.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(a)r=n.shift();else if(!e||e>=i)r=o?n.join(""):P.concat(n,i),n.length=0;else if(e<n[0].length){var u=n[0];r=u.slice(0,e),n[0]=u.slice(e)}else if(e===n[0].length)r=n.shift();else{r=o?"":new P(e);for(var s=0,c=0,l=n.length;c<l&&s<e;c++){var u=n[0],f=Math.min(e-s,u.length);o?r+=u.slice(0,f):u.copy(r,s,0,f),f<u.length?n[0]=u.slice(f):n.shift(),s+=f}}return r}function b(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");!t.endEmitted&&t.calledRead&&(t.ended=!0,D(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function w(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}function E(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}t.exports=i,i.ReadableState=n;var A,O=e("events").EventEmitter,S=e("./index.js"),P=e("buffer").Buffer,D=e("process/browser.js").nextTick;e("inherits")(i,S),i.prototype.push=function(e,t){var r=this._readableState;return"string"!=typeof e||r.objectMode||(t=t||r.defaultEncoding)!==r.encoding&&(e=new P(e,t),t=""),o(this,r,e,t,!1)},i.prototype.unshift=function(e){return o(this,this._readableState,e,"",!0)},i.prototype.setEncoding=function(t){A||(A=e("string_decoder").StringDecoder),this._readableState.decoder=new A(t),this._readableState.encoding=t};var C=8388608;i.prototype.read=function(e){var t=this._readableState;t.calledRead=!0;var r=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f(this),null;if(0===(e=s(e,t))&&t.ended)return 0===t.length&&b(this),null;var n=t.needReadable;t.length-e<=t.highWaterMark&&(n=!0),(t.ended||t.reading)&&(n=!1),n&&(t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),n&&!t.reading&&(e=s(r,t));var i;return i=e>0?g(e,t):null,null===i&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),t.ended&&!t.endEmitted&&0===t.length&&b(this),i},i.prototype._read=function(e){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,t){function n(e){e===l&&o()}function i(){e.end()}function o(){e.removeListener("close",u),e.removeListener("finish",s),e.removeListener("drain",p),e.removeListener("error",a),e.removeListener("unpipe",n),l.removeListener("end",i),l.removeListener("end",o),e._writableState&&!e._writableState.needDrain||p()}function a(t){c(),0===_&&0===O.listenerCount(e,"error")&&e.emit("error",t)}function u(){e.removeListener("finish",s),c()}function s(){e.removeListener("close",u),c()}function c(){l.unpipe(e)}var l=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=e;break;case 1:f.pipes=[f.pipes,e];break;default:f.pipes.push(e)}f.pipesCount+=1;var d=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,h=d?i:o;f.endEmitted?D(h):l.once("end",h),e.on("unpipe",n);var p=y(l);e.on("drain",p);var _=O.listenerCount(e,"error");return e.once("error",a),e.once("close",u),e.once("finish",s),e.emit("pipe",l),f.flowing||(this.on("readable",v),f.flowing=!0,D(function(){m(l)})),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,this.removeListener("readable",v),t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,this.removeListener("readable",v),t.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}var i=E(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},i.prototype.on=function(e,t){var r=S.prototype.on.call(this,e,t);if("data"!==e||this._readableState.flowing||_(this),"readable"===e&&this.readable){var n=this._readableState;n.readableListening||(n.readableListening=!0,n.emittedReadable=!1,n.needReadable=!0,n.reading?n.length&&f(this):this.read(0))}return r},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){_(this),this.read(0),this.emit("resume")},i.prototype.pause=function(){_(this,!0),this.emit("pause")},i.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(i){if(t.decoder&&(i=t.decoder.write(i)),i&&(t.objectMode||i.length)){n.push(i)||(r=!0,e.pause())}});for(var i in e)"function"==typeof e[i]&&void 0===this[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return w(["error","close","destroy","pause","resume"],function(t){e.on(t,function(e){return n.emit.apply(n,t,e)})}),n._read=function(t){r&&(r=!1,e.resume())},n},i._fromList=g}).call(this,e("FWaASH"))},{"./index.js":121,FWaASH:50,buffer:52,events:73,inherits:99,"process/browser.js":116,string_decoder:51}],124:[function(e,t,r){function n(e,t){this.afterTransform=function(e,r){return i(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&e.push(r),i&&i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);u.call(this,e);var t=(this._transformState=new n(e,this),this);this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){"function"==typeof this._flush?this._flush(function(e){a(t,e)}):a(t)})}function a(e,t){if(t)return e.emit("error",t);var r=e._writableState,n=(e._readableState,e._transformState);if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}t.exports=o;var u=e("./duplex.js");e("inherits")(o,u),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,r){throw new Error("not implemented")},o.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0}},{"./duplex.js":120,inherits:99}],125:[function(e,t,r){function n(e,t,r){this.chunk=e,this.encoding=t,this.callback=r}function i(e,t){e=e||{};var r=e.highWaterMark;this.highWaterMark=r||0===r?r:16384,this.objectMode=!!e.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var n=!1===e.decodeStrings;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){h(t,e)},this.writecb=null,this.writelen=0,this.buffer=[]}function o(e){if(!(this instanceof o||this instanceof A.Duplex))return new o(e);this._writableState=new i(e,this),this.writable=!0,A.call(this)}function a(e,t,r){var n=new Error("write after end");e.emit("error",n),O(function(){r(n)})}function u(e,t,r,n){var i=!0;if(!S.isBuffer(r)&&"string"!=typeof r&&null!==r&&void 0!==r&&!t.objectMode){var o=new TypeError("Invalid non-string/buffer chunk");e.emit("error",o),O(function(){n(o)}),i=!1}return i}function s(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=new S(t,r)),t}function c(e,t,r,i,o){r=s(t,r,i);var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;return t.needDrain=!u,t.writing?t.buffer.push(new n(r,i,o)):l(e,t,a,r,i,o),u}function l(e,t,r,n,i,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,e._write(n,i,t.onwrite),t.sync=!1}function f(e,t,r,n,i){r?O(function(){i(n)}):i(n),e.emit("error",n)}function d(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function h(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(d(r),t)f(e,r,n,t,i);else{var o=v(e,r);o||r.bufferProcessing||!r.buffer.length||m(e,r),n?O(function(){p(e,r,o,i)}):p(e,r,o,i)}}function p(e,t,r,n){r||y(e,t),n(),r&&_(e,t)}function y(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function m(e,t){t.bufferProcessing=!0;for(var r=0;r<t.buffer.length;r++){var n=t.buffer[r],i=n.chunk,o=n.encoding,a=n.callback;if(l(e,t,t.objectMode?1:i.length,i,o,a),t.writing){r++;break}}t.bufferProcessing=!1,r<t.buffer.length?t.buffer=t.buffer.slice(r):t.buffer.length=0}function v(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function _(e,t){var r=v(e,t);return r&&(t.finished=!0,e.emit("finish")),r}function g(e,t,r){t.ending=!0,_(e,t),r&&(t.finished?O(r):e.once("finish",r)),t.ended=!0}t.exports=o,o.WritableState=i;var b="undefined"!=typeof Uint8Array?function(e){return e instanceof Uint8Array}:function(e){return e&&e.constructor&&"Uint8Array"===e.constructor.name},w="undefined"!=typeof ArrayBuffer?function(e){return e instanceof ArrayBuffer}:function(e){return e&&e.constructor&&"ArrayBuffer"===e.constructor.name},E=e("inherits"),A=e("./index.js"),O=e("process/browser.js").nextTick,S=e("buffer").Buffer;E(o,A),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(e,t,r){var n=this._writableState,i=!1;return"function"==typeof t&&(r=t,t=null),!S.isBuffer(e)&&b(e)&&(e=new S(e)),w(e)&&"undefined"!=typeof Uint8Array&&(e=new S(new Uint8Array(e))),S.isBuffer(e)?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=function(){}),n.ended?a(this,n,r):u(this,n,e,r)&&(i=c(this,n,e,t,r)),i},o.prototype._write=function(e,t,r){r(new Error("not implemented"))},o.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),void 0!==e&&null!==e&&this.write(e,t),n.ending||n.finished||g(this,n,r)}},{"./index.js":121,buffer:52,inherits:99,"process/browser.js":116}],126:[function(e,t,r){"use strict";function n(e){if(e._patchedBySuperagentMocker)return n;e._patchedBySuperagentMocker=!0;for(var t in m)if(m.hasOwnProperty(t)){var r=m[t];a(e,t,r)}var i=e.Request.prototype,o=y.end=e.Request.prototype.end;i.end=function(e){var t=this._superagentMockerState;if(t&&t.current){var r=t.current;setTimeout(function(t){try{var n=r(t);if(/20[0-6]/.test(n.status))e&&e(null,n);else{var i=new Error(n.status);i.status=n.status,i.response=n,e&&e(i,null)}}catch(t){e&&e(t,null)}},c(n.timeout),t.request)}else o.call(this,e)};var h=y.set=i.set;i.set=function(e,t){var r=this._superagentMockerState;if(!r||!r.current)return h.call(this,e,t);if(u(e)){for(var n in e)this.set(n,e[n]);return this}if("string"!=typeof e)throw new TypeError("Header keys must be strings.");return r.request.headers[e.toLowerCase()]=t,this};var p=y.send=i.send;i.send=function(e){var t=this._superagentMockerState;return t&&t.current?(u(e)?t.request.body=d(t.current.body,e):t.request.body=e,this):p.call(this,e)};var v=y.query=i.query;return i.query=function(e){var t=this._superagentMockerState;if(!t||!t.current)return v.call(this,e);var r={};return s(e)?r=l(e):u(e)&&(r=f(e)),t.request.query=d(t.request.query,r),this},n}function i(e,t,r){return p.reduce(function(n,i){var o=i.match(e,t,r);return o||n},null)}function o(e,t,r){return p.push(new v({url:t,handler:r,method:e})),n}function a(e,t,r){var n=y[t]=e[t];e[t]=function(e,t,o){var a=i(r,e,t),u=n.call(this,e,t,o);return u._superagentMockerState={current:a,request:{headers:{},body:{},query:{}}},u}}function u(e){return null!=e&&"object"==typeof e}function s(e){return"string"==typeof e}function c(e){return"function"==typeof e?e():e}function l(e){return e.split("&").reduce(function(e,t){var r=t.split("="),n=r.shift(),i=r.shift();return n&&i&&(e[n]=i),e},{})}function f(e){return Object.keys(e).reduce(function(t,r){return t[r]=String(e[r]),t},{})}function d(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];if(u(r))for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}return e}var h=e("path-to-regexp");t.exports=n,n.get=o.bind(null,"GET"),n.post=o.bind(null,"POST"),n.put=o.bind(null,"PUT"),n.del=o.bind(null,"DELETE"),n.patch=o.bind(null,"PATCH"),n.timeout=0;var p=[],y={};n.clearRoutes=function(){p.splice(0,p.length)};var m={get:"GET",post:"POST",put:"PUT",del:"DELETE",patch:"PATCH"};n.clearRoute=function(e,t){e=m[e]||e,p=p.filter(function(r){return!(r.url===t&&r.method===e)})},n.unmock=function(e){["get","post","put","patch","del"].forEach(function(t){e[t]=y[t]});var t=e.Request.prototype;["end","set","send"].forEach(function(e){t[e]=y[e]}),delete e._patchedBySuperagentMocker};var v=function(e){this.url=e.url,this.handler=e.handler,this.method=e.method,this.regexp=h(this.url,this.keys=[])};v.prototype.match=function(e,t,r){if(this.method!==e)return!1;var n={},i=this.regexp.exec(t);if(!i)return!1;for(var o=1,a=i.length;o<a;++o){var s=this.keys[o-1],c=i[o];void 0===c&&hasOwnProperty.call(n,s.name)||(n[s.name]=c)}var l=this;return function(e){return d({status:200},l.handler({url:t,params:n||{},body:u(e.body)?d(r,e.body):e.body,headers:e.headers,query:e.query}))}}},{"path-to-regexp":115}],127:[function(e,t,r){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(e){n.prototype[e]=function(){return this._defaults.push({fn:e,arguments:arguments}),this}}),n.prototype._setDefaults=function(e){this._defaults.forEach(function(t){e[t.fn].apply(e,t.arguments)})},t.exports=n},{}],128:[function(e,t,r){function n(){}function i(e){if(!y(e))return e;var t=[];for(var r in e)o(t,r,e[r]);return t.join("&")}function o(e,t,r){if(null!=r)if(Array.isArray(r))r.forEach(function(r){o(e,t,r)});else if(y(r))for(var n in r)o(e,t+"["+n+"]",r[n]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(r));else null===r&&e.push(encodeURIComponent(t))}function a(e){for(var t,r,n={},i=e.split("&"),o=0,a=i.length;o<a;++o)t=i[o],r=t.indexOf("="),-1==r?n[decodeURIComponent(t)]="":n[decodeURIComponent(t.slice(0,r))]=decodeURIComponent(t.slice(r+1));return n}function u(e){for(var t,r,n,i,o=e.split(/\r?\n/),a={},u=0,s=o.length;u<s;++u)r=o[u],-1!==(t=r.indexOf(":"))&&(n=r.slice(0,t).toLowerCase(),i=g(r.slice(t+1)),a[n]=i);return a}function s(e){return/[\/+]json($|[^-\w])/.test(e)}function c(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.header=this.headers=u(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function l(e,t){var r=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new c(r)}catch(t){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=t,r.xhr?(e.rawResponse=void 0===r.xhr.responseType?r.xhr.responseText:r.xhr.response,e.status=r.xhr.status?r.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),r.callback(e)}r.emit("response",t);var n;try{r._isResponseOK(t)||(n=new Error(t.statusText||"Unsuccessful HTTP response"))}catch(e){n=e}n?(n.original=e,n.response=t,n.status=t.status,r.callback(n,t)):r.callback(null,t)})}function f(e,t,r){var n=_("DELETE",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n}var d;"undefined"!=typeof window?d=window:"undefined"!=typeof self?d=self:(console.warn("Using browser-only version of superagent in non-browser environment"),d=this);var h=e("component-emitter"),p=e("./request-base"),y=e("./is-object"),m=e("./response-base"),v=e("./agent-base"),_=r=t.exports=function(e,t){return"function"==typeof t?new r.Request("GET",e).end(t):1==arguments.length?new r.Request("GET",e):new r.Request(e,t)};r.Request=l,_.getXHR=function(){if(!(!d.XMLHttpRequest||d.location&&"file:"==d.location.protocol&&d.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only version of superagent could not find XHR")};var g="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};_.serializeObject=i,_.parseString=a,_.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},_.serialize={"application/x-www-form-urlencoded":i,"application/json":JSON.stringify},_.parse={"application/x-www-form-urlencoded":a,"application/json":JSON.parse},m(c.prototype),c.prototype._parseBody=function(e){var t=_.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&s(this.type)&&(t=_.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null)},c.prototype.toError=function(){var e=this.req,t=e.method,r=e.url,n="cannot "+t+" "+r+" ("+this.status+")",i=new Error(n);return i.status=this.status,i.method=t,i.url=r,i},_.Response=c,h(l.prototype),p(l.prototype),l.prototype.type=function(e){return this.set("Content-Type",_.types[e]||e),this},l.prototype.accept=function(e){return this.set("Accept",_.types[e]||e),this},l.prototype.auth=function(e,t,r){1===arguments.length&&(t=""),"object"==typeof t&&null!==t&&(r=t,t=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});var n=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,r,n)},l.prototype.query=function(e){return"string"!=typeof e&&(e=i(e)),e&&this._query.push(e),this},l.prototype.attach=function(e,t,r){if(t){if(this._data)throw Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,r||t.name)}return this},l.prototype._getFormData=function(){return this._formData||(this._formData=new d.FormData),this._formData},l.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var r=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),r(e,t)},l.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},l.prototype.buffer=l.prototype.ca=l.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},l.prototype.pipe=l.prototype.write=function(){throw Error("Streaming is not supported in browser version of superagent")},l.prototype._isHost=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},l.prototype.end=function(e){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||n,this._finalizeQueryString(),this._end()},l.prototype._end=function(){var e=this,t=this.xhr=_.getXHR(),r=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var r=t.readyState;if(r>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==r){var n;try{n=t.status}catch(e){n=0}if(!n){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var n=function(t,r){r.total>0&&(r.percent=r.loaded/r.total*100),r.direction=t,e.emit("progress",r)};if(this.hasListeners("progress"))try{t.onprogress=n.bind(null,"download"),t.upload&&(t.upload.onprogress=n.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof r&&!this._isHost(r)){var i=this._header["content-type"],o=this._serializer||_.serialize[i?i.split(";")[0]:""];!o&&s(i)&&(o=_.serialize["application/json"]),o&&(r=o(r))}for(var a in this.header)null!=this.header[a]&&this.header.hasOwnProperty(a)&&t.setRequestHeader(a,this.header[a]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0!==r?r:null),this},_.agent=function(){return new v},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){v.prototype[e.toLowerCase()]=function(t,r){var n=new _.Request(e,t);return this._setDefaults(n),r&&n.end(r),n}}),v.prototype.del=v.prototype.delete,_.get=function(e,t,r){var n=_("GET",e);return"function"==typeof t&&(r=t,t=null),t&&n.query(t),r&&n.end(r),n},_.head=function(e,t,r){var n=_("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&n.query(t),r&&n.end(r),n},_.options=function(e,t,r){var n=_("OPTIONS",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},_.del=f,_.delete=f,_.patch=function(e,t,r){var n=_("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},_.post=function(e,t,r){var n=_("POST",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},_.put=function(e,t,r){var n=_("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n}},{"./agent-base":127,"./is-object":129,"./request-base":130,"./response-base":131,"component-emitter":53}],129:[function(e,t,r){"use strict";function n(e){return null!==e&&"object"==typeof e}t.exports=n},{}],130:[function(e,t,r){"use strict";function n(e){if(e)return i(e)}function i(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}var o=e("./is-object");t.exports=n,n.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},n.prototype.parse=function(e){return this._parser=e,this},n.prototype.responseType=function(e){return this._responseType=e,this},n.prototype.serialize=function(e){return this._serializer=e,this},n.prototype.timeout=function(e){if(!e||"object"!=typeof e)return this._timeout=e,this._responseTimeout=0,this;for(var t in e)switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;default:console.warn("Unknown timeout option",t)}return this},n.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var a=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];n.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(e,t);if(!0===r)return!0;if(!1===r)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~a.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},n.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},n.prototype.then=function(e,t){if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(e,t){r.end(function(r,n){r?t(r):e(n)})})}return this._fullfilledPromise.then(e,t)},n.prototype.catch=function(e){return this.then(void 0,e)},n.prototype.use=function(e){return e(this),this},n.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},n.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},n.prototype.get=function(e){return this._header[e.toLowerCase()]},n.prototype.getHeader=n.prototype.get,n.prototype.set=function(e,t){if(o(e)){for(var r in e)this.set(r,e[r]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},n.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},n.prototype.field=function(e,t){if(null===e||void 0===e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),o(e)){for(var r in e)this.field(r,e[r]);return this}if(Array.isArray(t)){for(var n in t)this.field(e,t[n]);return this}if(null===t||void 0===t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},n.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},n.prototype._auth=function(e,t,r,n){switch(r.type){case"basic":this.set("Authorization","Basic "+n(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},n.prototype.withCredentials=function(e){return void 0==e&&(e=!0),this._withCredentials=e,this},n.prototype.redirects=function(e){return this._maxRedirects=e,this},n.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},n.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},n.prototype.send=function(e){var t=o(e),r=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&o(this._data))for(var n in e)this._data[n]=e[n];else"string"==typeof e?(r||this.type("form"),r=this._header["content-type"],this._data="application/x-www-form-urlencoded"==r?this._data?this._data+"&"+e:e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(r||this.type("json"),this)},n.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},n.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var r=this.url.substring(t+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.substring(0,t)+"?"+r.join("&")}}},n.prototype._appendQueryString=function(){console.trace("Unsupported")},n.prototype._timeoutError=function(e,t,r){if(!this._aborted){var n=new Error(e+t+"ms exceeded");n.timeout=t,n.code="ECONNABORTED",n.errno=r,this.timedout=!0,this.abort(),this.callback(n)}},n.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},{"./is-object":129}],131:[function(e,t,r){"use strict";function n(e){if(e)return i(e)}function i(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}var o=e("./utils");t.exports=n,n.prototype.get=function(e){return this.header[e.toLowerCase()]},n.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=o.type(t);var r=o.params(t);for(var n in r)this[n]=r[n];this.links={};try{e.link&&(this.links=o.parseLinks(e.link))}catch(e){}},n.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.created=201==e,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e,this.unprocessableEntity=422==e}},{"./utils":132}],132:[function(e,t,r){"use strict";r.type=function(e){return e.split(/ *; */).shift()},r.params=function(e){return e.split(/ *; */).reduce(function(e,t){var r=t.split(/ *= */),n=r.shift(),i=r.shift();return n&&i&&(e[n]=i),e},{})},r.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var r=t.split(/ *; */),n=r[0].slice(1,-1);return e[r[1].split(/ *= */)[1].slice(1,-1)]=n,e},{})},r.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},{}],133:[function(e,t,r){(function(e){!function(){var n="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||this||{},i=n._,o=Array.prototype,a=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,s=o.push,c=o.slice,l=a.toString,f=a.hasOwnProperty,d=Array.isArray,h=Object.keys,p=Object.create,y=function(){},m=function(e){return e instanceof m?e:this instanceof m?void(this._wrapped=e):new m(e)}
22
22
  ;void 0===r||r.nodeType?n._=m:(void 0!==t&&!t.nodeType&&t.exports&&(r=t.exports=m),r._=m),m.VERSION="1.9.1";var v,_=function(e,t,r){if(void 0===t)return e;switch(null==r?3:r){case 1:return function(r){return e.call(t,r)};case 3:return function(r,n,i){return e.call(t,r,n,i)};case 4:return function(r,n,i,o){return e.call(t,r,n,i,o)}}return function(){return e.apply(t,arguments)}},g=function(e,t,r){return m.iteratee!==v?m.iteratee(e,t):null==e?m.identity:m.isFunction(e)?_(e,t,r):m.isObject(e)&&!m.isArray(e)?m.matcher(e):m.property(e)};m.iteratee=v=function(e,t){return g(e,t,1/0)};var b=function(e,t){return t=null==t?e.length-1:+t,function(){for(var r=Math.max(arguments.length-t,0),n=Array(r),i=0;i<r;i++)n[i]=arguments[i+t];switch(t){case 0:return e.call(this,n);case 1:return e.call(this,arguments[0],n);case 2:return e.call(this,arguments[0],arguments[1],n)}var o=Array(t+1);for(i=0;i<t;i++)o[i]=arguments[i];return o[t]=n,e.apply(this,o)}},w=function(e){if(!m.isObject(e))return{};if(p)return p(e);y.prototype=e;var t=new y;return y.prototype=null,t},E=function(e){return function(t){return null==t?void 0:t[e]}},A=function(e,t){return null!=e&&f.call(e,t)},O=function(e,t){for(var r=t.length,n=0;n<r;n++){if(null==e)return;e=e[t[n]]}return r?e:void 0},S=Math.pow(2,53)-1,P=E("length"),D=function(e){var t=P(e);return"number"==typeof t&&t>=0&&t<=S};m.each=m.forEach=function(e,t,r){t=_(t,r);var n,i;if(D(e))for(n=0,i=e.length;n<i;n++)t(e[n],n,e);else{var o=m.keys(e);for(n=0,i=o.length;n<i;n++)t(e[o[n]],o[n],e)}return e},m.map=m.collect=function(e,t,r){t=g(t,r);for(var n=!D(e)&&m.keys(e),i=(n||e).length,o=Array(i),a=0;a<i;a++){var u=n?n[a]:a;o[a]=t(e[u],u,e)}return o};var C=function(e){var t=function(t,r,n,i){var o=!D(t)&&m.keys(t),a=(o||t).length,u=e>0?0:a-1;for(i||(n=t[o?o[u]:u],u+=e);u>=0&&u<a;u+=e){var s=o?o[u]:u;n=r(n,t[s],s,t)}return n};return function(e,r,n,i){var o=arguments.length>=3;return t(e,_(r,i,4),n,o)}};m.reduce=m.foldl=m.inject=C(1),m.reduceRight=m.foldr=C(-1),m.find=m.detect=function(e,t,r){var n=D(e)?m.findIndex:m.findKey,i=n(e,t,r);if(void 0!==i&&-1!==i)return e[i]},m.filter=m.select=function(e,t,r){var n=[];return t=g(t,r),m.each(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n},m.reject=function(e,t,r){return m.filter(e,m.negate(g(t)),r)},m.every=m.all=function(e,t,r){t=g(t,r);for(var n=!D(e)&&m.keys(e),i=(n||e).length,o=0;o<i;o++){var a=n?n[o]:o;if(!t(e[a],a,e))return!1}return!0},m.some=m.any=function(e,t,r){t=g(t,r);for(var n=!D(e)&&m.keys(e),i=(n||e).length,o=0;o<i;o++){var a=n?n[o]:o;if(t(e[a],a,e))return!0}return!1},m.contains=m.includes=m.include=function(e,t,r,n){return D(e)||(e=m.values(e)),("number"!=typeof r||n)&&(r=0),m.indexOf(e,t,r)>=0},m.invoke=b(function(e,t,r){var n,i;return m.isFunction(t)?i=t:m.isArray(t)&&(n=t.slice(0,-1),t=t[t.length-1]),m.map(e,function(e){var o=i;if(!o){if(n&&n.length&&(e=O(e,n)),null==e)return;o=e[t]}return null==o?o:o.apply(e,r)})}),m.pluck=function(e,t){return m.map(e,m.property(t))},m.where=function(e,t){return m.filter(e,m.matcher(t))},m.findWhere=function(e,t){return m.find(e,m.matcher(t))},m.max=function(e,t,r){var n,i,o=-1/0,a=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=D(e)?e:m.values(e);for(var u=0,s=e.length;u<s;u++)null!=(n=e[u])&&n>o&&(o=n)}else t=g(t,r),m.each(e,function(e,r,n){((i=t(e,r,n))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)});return o},m.min=function(e,t,r){var n,i,o=1/0,a=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=D(e)?e:m.values(e);for(var u=0,s=e.length;u<s;u++)null!=(n=e[u])&&n<o&&(o=n)}else t=g(t,r),m.each(e,function(e,r,n){((i=t(e,r,n))<a||i===1/0&&o===1/0)&&(o=e,a=i)});return o},m.shuffle=function(e){return m.sample(e,1/0)},m.sample=function(e,t,r){if(null==t||r)return D(e)||(e=m.values(e)),e[m.random(e.length-1)];var n=D(e)?m.clone(e):m.values(e),i=P(n);t=Math.max(Math.min(t,i),0);for(var o=i-1,a=0;a<t;a++){var u=m.random(a,o),s=n[a];n[a]=n[u],n[u]=s}return n.slice(0,t)},m.sortBy=function(e,t,r){var n=0;return t=g(t,r),m.pluck(m.map(e,function(e,r,i){return{value:e,index:n++,criteria:t(e,r,i)}}).sort(function(e,t){var r=e.criteria,n=t.criteria;if(r!==n){if(r>n||void 0===r)return 1;if(r<n||void 0===n)return-1}return e.index-t.index}),"value")};var k=function(e,t){return function(r,n,i){var o=t?[[],[]]:{};return n=g(n,i),m.each(r,function(t,i){var a=n(t,i,r);e(o,t,a)}),o}};m.groupBy=k(function(e,t,r){A(e,r)?e[r].push(t):e[r]=[t]}),m.indexBy=k(function(e,t,r){e[r]=t}),m.countBy=k(function(e,t,r){A(e,r)?e[r]++:e[r]=1});var T=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;m.toArray=function(e){return e?m.isArray(e)?c.call(e):m.isString(e)?e.match(T):D(e)?m.map(e,m.identity):m.values(e):[]},m.size=function(e){return null==e?0:D(e)?e.length:m.keys(e).length},m.partition=k(function(e,t,r){e[r?0:1].push(t)},!0),m.first=m.head=m.take=function(e,t,r){return null==e||e.length<1?null==t?void 0:[]:null==t||r?e[0]:m.initial(e,e.length-t)},m.initial=function(e,t,r){return c.call(e,0,Math.max(0,e.length-(null==t||r?1:t)))},m.last=function(e,t,r){return null==e||e.length<1?null==t?void 0:[]:null==t||r?e[e.length-1]:m.rest(e,Math.max(0,e.length-t))},m.rest=m.tail=m.drop=function(e,t,r){return c.call(e,null==t||r?1:t)},m.compact=function(e){return m.filter(e,Boolean)};var F=function(e,t,r,n){n=n||[];for(var i=n.length,o=0,a=P(e);o<a;o++){var u=e[o];if(D(u)&&(m.isArray(u)||m.isArguments(u)))if(t)for(var s=0,c=u.length;s<c;)n[i++]=u[s++];else F(u,t,r,n),i=n.length;else r||(n[i++]=u)}return n};m.flatten=function(e,t){return F(e,t,!1)},m.without=b(function(e,t){return m.difference(e,t)}),m.uniq=m.unique=function(e,t,r,n){m.isBoolean(t)||(n=r,r=t,t=!1),null!=r&&(r=g(r,n));for(var i=[],o=[],a=0,u=P(e);a<u;a++){var s=e[a],c=r?r(s,a,e):s;t&&!r?(a&&o===c||i.push(s),o=c):r?m.contains(o,c)||(o.push(c),i.push(s)):m.contains(i,s)||i.push(s)}return i},m.union=b(function(e){return m.uniq(F(e,!0,!0))}),m.intersection=function(e){for(var t=[],r=arguments.length,n=0,i=P(e);n<i;n++){var o=e[n];if(!m.contains(t,o)){var a;for(a=1;a<r&&m.contains(arguments[a],o);a++);a===r&&t.push(o)}}return t},m.difference=b(function(e,t){return t=F(t,!0,!0),m.filter(e,function(e){return!m.contains(t,e)})}),m.unzip=function(e){for(var t=e&&m.max(e,P).length||0,r=Array(t),n=0;n<t;n++)r[n]=m.pluck(e,n);return r},m.zip=b(m.unzip),m.object=function(e,t){for(var r={},n=0,i=P(e);n<i;n++)t?r[e[n]]=t[n]:r[e[n][0]]=e[n][1];return r};var j=function(e){return function(t,r,n){r=g(r,n);for(var i=P(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(r(t[o],o,t))return o;return-1}};m.findIndex=j(1),m.findLastIndex=j(-1),m.sortedIndex=function(e,t,r,n){r=g(r,n,1);for(var i=r(t),o=0,a=P(e);o<a;){var u=Math.floor((o+a)/2);r(e[u])<i?o=u+1:a=u}return o};var x=function(e,t,r){return function(n,i,o){var a=0,u=P(n);if("number"==typeof o)e>0?a=o>=0?o:Math.max(o+u,a):u=o>=0?Math.min(o+1,u):o+u+1;else if(r&&o&&u)return o=r(n,i),n[o]===i?o:-1;if(i!==i)return o=t(c.call(n,a,u),m.isNaN),o>=0?o+a:-1;for(o=e>0?a:u-1;o>=0&&o<u;o+=e)if(n[o]===i)return o;return-1}};m.indexOf=x(1,m.findIndex,m.sortedIndex),m.lastIndexOf=x(-1,m.findLastIndex),m.range=function(e,t,r){null==t&&(t=e||0,e=0),r||(r=t<e?-1:1);for(var n=Math.max(Math.ceil((t-e)/r),0),i=Array(n),o=0;o<n;o++,e+=r)i[o]=e;return i},m.chunk=function(e,t){if(null==t||t<1)return[];for(var r=[],n=0,i=e.length;n<i;)r.push(c.call(e,n,n+=t));return r};var B=function(e,t,r,n,i){if(!(n instanceof t))return e.apply(r,i);var o=w(e.prototype),a=e.apply(o,i);return m.isObject(a)?a:o};m.bind=b(function(e,t,r){if(!m.isFunction(e))throw new TypeError("Bind must be called on a function");var n=b(function(i){return B(e,n,t,this,r.concat(i))});return n}),m.partial=b(function(e,t){var r=m.partial.placeholder,n=function(){for(var i=0,o=t.length,a=Array(o),u=0;u<o;u++)a[u]=t[u]===r?arguments[i++]:t[u];for(;i<arguments.length;)a.push(arguments[i++]);return B(e,n,this,this,a)};return n}),m.partial.placeholder=m,m.bindAll=b(function(e,t){t=F(t,!1,!1);var r=t.length;if(r<1)throw new Error("bindAll must be passed function names");for(;r--;){var n=t[r];e[n]=m.bind(e[n],e)}}),m.memoize=function(e,t){var r=function(n){var i=r.cache,o=""+(t?t.apply(this,arguments):n);return A(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return r.cache={},r},m.delay=b(function(e,t,r){return setTimeout(function(){return e.apply(null,r)},t)}),m.defer=m.partial(m.delay,m,1),m.throttle=function(e,t,r){var n,i,o,a,u=0;r||(r={});var s=function(){u=!1===r.leading?0:m.now(),n=null,a=e.apply(i,o),n||(i=o=null)},c=function(){var c=m.now();u||!1!==r.leading||(u=c);var l=t-(c-u);return i=this,o=arguments,l<=0||l>t?(n&&(clearTimeout(n),n=null),u=c,a=e.apply(i,o),n||(i=o=null)):n||!1===r.trailing||(n=setTimeout(s,l)),a};return c.cancel=function(){clearTimeout(n),u=0,n=i=o=null},c},m.debounce=function(e,t,r){var n,i,o=function(t,r){n=null,r&&(i=e.apply(t,r))},a=b(function(a){if(n&&clearTimeout(n),r){var u=!n;n=setTimeout(o,t),u&&(i=e.apply(this,a))}else n=m.delay(o,t,this,a);return i});return a.cancel=function(){clearTimeout(n),n=null},a},m.wrap=function(e,t){return m.partial(t,e)},m.negate=function(e){return function(){return!e.apply(this,arguments)}},m.compose=function(){var e=arguments,t=e.length-1;return function(){for(var r=t,n=e[t].apply(this,arguments);r--;)n=e[r].call(this,n);return n}},m.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},m.before=function(e,t){var r;return function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=null),r}},m.once=m.partial(m.before,2),m.restArguments=b;var M=!{toString:null}.propertyIsEnumerable("toString"),R=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],I=function(e,t){var r=R.length,n=e.constructor,i=m.isFunction(n)&&n.prototype||a,o="constructor";for(A(e,o)&&!m.contains(t,o)&&t.push(o);r--;)(o=R[r])in e&&e[o]!==i[o]&&!m.contains(t,o)&&t.push(o)};m.keys=function(e){if(!m.isObject(e))return[];if(h)return h(e);var t=[];for(var r in e)A(e,r)&&t.push(r);return M&&I(e,t),t},m.allKeys=function(e){if(!m.isObject(e))return[];var t=[];for(var r in e)t.push(r);return M&&I(e,t),t},m.values=function(e){for(var t=m.keys(e),r=t.length,n=Array(r),i=0;i<r;i++)n[i]=e[t[i]];return n},m.mapObject=function(e,t,r){t=g(t,r);for(var n=m.keys(e),i=n.length,o={},a=0;a<i;a++){var u=n[a];o[u]=t(e[u],u,e)}return o},m.pairs=function(e){for(var t=m.keys(e),r=t.length,n=Array(r),i=0;i<r;i++)n[i]=[t[i],e[t[i]]];return n},m.invert=function(e){for(var t={},r=m.keys(e),n=0,i=r.length;n<i;n++)t[e[r[n]]]=r[n];return t},m.functions=m.methods=function(e){var t=[];for(var r in e)m.isFunction(e[r])&&t.push(r);return t.sort()};var N=function(e,t){return function(r){var n=arguments.length;if(t&&(r=Object(r)),n<2||null==r)return r;for(var i=1;i<n;i++)for(var o=arguments[i],a=e(o),u=a.length,s=0;s<u;s++){var c=a[s];t&&void 0!==r[c]||(r[c]=o[c])}return r}};m.extend=N(m.allKeys),m.extendOwn=m.assign=N(m.keys),m.findKey=function(e,t,r){t=g(t,r);for(var n,i=m.keys(e),o=0,a=i.length;o<a;o++)if(n=i[o],t(e[n],n,e))return n};var U=function(e,t,r){return t in r};m.pick=b(function(e,t){var r={},n=t[0];if(null==e)return r;m.isFunction(n)?(t.length>1&&(n=_(n,t[1])),t=m.allKeys(e)):(n=U,t=F(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i<o;i++){var a=t[i],u=e[a];n(u,a,e)&&(r[a]=u)}return r}),m.omit=b(function(e,t){var r,n=t[0];return m.isFunction(n)?(n=m.negate(n),t.length>1&&(r=t[1])):(t=m.map(F(t,!1,!1),String),n=function(e,r){return!m.contains(t,r)}),m.pick(e,n,r)}),m.defaults=N(m.allKeys,!0),m.create=function(e,t){var r=w(e);return t&&m.extendOwn(r,t),r},m.clone=function(e){return m.isObject(e)?m.isArray(e)?e.slice():m.extend({},e):e},m.tap=function(e,t){return t(e),e},m.isMatch=function(e,t){var r=m.keys(t),n=r.length;if(null==e)return!n;for(var i=Object(e),o=0;o<n;o++){var a=r[o];if(t[a]!==i[a]||!(a in i))return!1}return!0};var L,z;L=function(e,t,r,n){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!==e)return t!==t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&z(e,t,r,n)},z=function(e,t,r,n){e instanceof m&&(e=e._wrapped),t instanceof m&&(t=t._wrapped);var i=l.call(e);if(i!==l.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return u.valueOf.call(e)===u.valueOf.call(t)}var o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!(m.isFunction(a)&&a instanceof a&&m.isFunction(s)&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[],n=n||[];for(var c=r.length;c--;)if(r[c]===e)return n[c]===t;if(r.push(e),n.push(t),o){if((c=e.length)!==t.length)return!1;for(;c--;)if(!L(e[c],t[c],r,n))return!1}else{var f,d=m.keys(e);if(c=d.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=d[c],!A(t,f)||!L(e[f],t[f],r,n))return!1}return r.pop(),n.pop(),!0},m.isEqual=function(e,t){return L(e,t)},m.isEmpty=function(e){return null==e||(D(e)&&(m.isArray(e)||m.isString(e)||m.isArguments(e))?0===e.length:0===m.keys(e).length)},m.isElement=function(e){return!(!e||1!==e.nodeType)},m.isArray=d||function(e){return"[object Array]"===l.call(e)},m.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},m.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(e){m["is"+e]=function(t){return l.call(t)==="[object "+e+"]"}}),m.isArguments(arguments)||(m.isArguments=function(e){return A(e,"callee")});var G=n.document&&n.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof G&&(m.isFunction=function(e){return"function"==typeof e||!1}),m.isFinite=function(e){return!m.isSymbol(e)&&isFinite(e)&&!isNaN(parseFloat(e))},m.isNaN=function(e){return m.isNumber(e)&&isNaN(e)},m.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"===l.call(e)},m.isNull=function(e){return null===e},m.isUndefined=function(e){return void 0===e},m.has=function(e,t){if(!m.isArray(t))return A(e,t);for(var r=t.length,n=0;n<r;n++){var i=t[n];if(null==e||!f.call(e,i))return!1;e=e[i]}return!!r},m.noConflict=function(){return n._=i,this},m.identity=function(e){return e},m.constant=function(e){return function(){return e}},m.noop=function(){},m.property=function(e){return m.isArray(e)?function(t){return O(t,e)}:E(e)},m.propertyOf=function(e){return null==e?function(){}:function(t){return m.isArray(t)?O(e,t):e[t]}},m.matcher=m.matches=function(e){return e=m.extendOwn({},e),function(t){return m.isMatch(t,e)}},m.times=function(e,t,r){var n=Array(Math.max(0,e));t=_(t,r,1);for(var i=0;i<e;i++)n[i]=t(i);return n},m.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},m.now=Date.now||function(){return(new Date).getTime()};var q={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},V=m.invert(q),H=function(e){var t=function(t){return e[t]},r="(?:"+m.keys(e).join("|")+")",n=RegExp(r),i=RegExp(r,"g");return function(e){return e=null==e?"":""+e,n.test(e)?e.replace(i,t):e}};m.escape=H(q),m.unescape=H(V),m.result=function(e,t,r){m.isArray(t)||(t=[t]);var n=t.length;if(!n)return m.isFunction(r)?r.call(e):r;for(var i=0;i<n;i++){var o=null==e?void 0:e[t[i]];void 0===o&&(o=r,i=n),e=m.isFunction(o)?o.call(e):o}return e};var W=0;m.uniqueId=function(e){var t=++W+"";return e?e+t:t},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Y=/(.)^/,$={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},K=/\\|'|\r|\n|\u2028|\u2029/g,J=function(e){return"\\"+$[e]};m.template=function(e,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var n=RegExp([(t.escape||Y).source,(t.interpolate||Y).source,(t.evaluate||Y).source].join("|")+"|$","g"),i=0,o="__p+='";e.replace(n,function(t,r,n,a,u){return o+=e.slice(i,u).replace(K,J),i=u+t.length,r?o+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?o+="'+\n((__t=("+n+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t}),o+="';\n",t.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";var a;try{a=new Function(t.variable||"obj","_",o)}catch(e){throw e.source=o,e}var u=function(e){return a.call(this,e,m)};return u.source="function("+(t.variable||"obj")+"){\n"+o+"}",u},m.chain=function(e){var t=m(e);return t._chain=!0,t};var Q=function(e,t){return e._chain?m(t).chain():t};m.mixin=function(e){return m.each(m.functions(e),function(t){var r=m[t]=e[t];m.prototype[t]=function(){var e=[this._wrapped];return s.apply(e,arguments),Q(this,r.apply(m,e))}}),m},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=o[e];m.prototype[e]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==e&&"splice"!==e||0!==r.length||delete r[0],Q(this,r)}}),m.each(["concat","join","slice"],function(e){var t=o[e];m.prototype[e]=function(){return Q(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return String(this._wrapped)},"function"==typeof define&&define.amd&&define("underscore",[],function(){return m})}()}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],134:[function(e,t,r){!function(e,n){"object"==typeof r&&void 0!==t?n(r):"function"==typeof define&&define.amd?define(["exports"],n):n(e.URI=e.URI||{})}(this,function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function o(e){return void 0!==e&&null!==e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function a(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function u(e){var n=t("[0-9]","[A-Fa-f]"),i=r(r("%[EFef]"+n+"%"+n+n+"%"+n+n)+"|"+r("%[89A-Fa-f]"+n+"%"+n+n)+"|"+r("%"+n+n)),o="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",a=t("[\\:\\/\\?\\#\\[\\]\\@]",o),u=e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",s=e?"[\\uE000-\\uF8FF]":"[]",c=t("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",u),l=r("[A-Za-z]"+t("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),f=r(r(i+"|"+t(c,o,"[\\:]"))+"*"),d=(r(r("25[0-5]")+"|"+r("2[0-4][0-9]")+"|"+r("1[0-9][0-9]")+"|"+r("[1-9][0-9]")+"|[0-9]"),r(r("25[0-5]")+"|"+r("2[0-4][0-9]")+"|"+r("1[0-9][0-9]")+"|"+r("0?[1-9][0-9]")+"|0?0?[0-9]")),h=r(d+"\\."+d+"\\."+d+"\\."+d),p=r(n+"{1,4}"),y=r(r(p+"\\:"+p)+"|"+h),m=r(r(p+"\\:")+"{6}"+y),v=r("\\:\\:"+r(p+"\\:")+"{5}"+y),_=r(r(p)+"?\\:\\:"+r(p+"\\:")+"{4}"+y),g=r(r(r(p+"\\:")+"{0,1}"+p)+"?\\:\\:"+r(p+"\\:")+"{3}"+y),b=r(r(r(p+"\\:")+"{0,2}"+p)+"?\\:\\:"+r(p+"\\:")+"{2}"+y),w=r(r(r(p+"\\:")+"{0,3}"+p)+"?\\:\\:"+p+"\\:"+y),E=r(r(r(p+"\\:")+"{0,4}"+p)+"?\\:\\:"+y),A=r(r(r(p+"\\:")+"{0,5}"+p)+"?\\:\\:"+p),O=r(r(r(p+"\\:")+"{0,6}"+p)+"?\\:\\:"),S=r([m,v,_,g,b,w,E,A,O].join("|")),P=r(r(c+"|"+i)+"+"),D=(r(S+"\\%25"+P),r(S+r("\\%25|\\%(?!"+n+"{2})")+P)),C=r("[vV]"+n+"+\\."+t(c,o,"[\\:]")+"+"),k=r("\\["+r(D+"|"+S+"|"+C)+"\\]"),T=r(r(i+"|"+t(c,o))+"*"),F=r(k+"|"+h+"(?!"+T+")|"+T),j=r("[0-9]*"),x=r(r(f+"@")+"?"+F+r("\\:"+j)+"?"),B=r(i+"|"+t(c,o,"[\\:\\@]")),M=r(B+"*"),R=r(B+"+"),I=r(r(i+"|"+t(c,o,"[\\@]"))+"+"),N=r(r("\\/"+M)+"*"),U=r("\\/"+r(R+N)+"?"),L=r(I+N),z=r(R+N),G="(?!"+B+")",q=(r(N+"|"+U+"|"+L+"|"+z+"|"+G),r(r(B+"|"+t("[\\/\\?]",s))+"*")),V=r(r(B+"|[\\/\\?]")+"*"),H=r(r("\\/\\/"+x+N)+"|"+U+"|"+z+"|"+G),W=r(l+"\\:"+H+r("\\?"+q)+"?"+r("\\#"+V)+"?"),Y=r(r("\\/\\/"+x+N)+"|"+U+"|"+L+"|"+G),$=r(Y+r("\\?"+q)+"?"+r("\\#"+V)+"?");r(W+"|"+$),r(l+"\\:"+H+r("\\?"+q)+"?"),r(r("\\/\\/("+r("("+f+")@")+"?("+F+")"+r("\\:("+j+")")+"?)")+"?("+N+"|"+U+"|"+z+"|"+G+")"),r("\\?("+q+")"),r("\\#("+V+")"),r(r("\\/\\/("+r("("+f+")@")+"?("+F+")"+r("\\:("+j+")")+"?)")+"?("+N+"|"+U+"|"+L+"|"+G+")"),r("\\?("+q+")"),r("\\#("+V+")"),r(r("\\/\\/("+r("("+f+")@")+"?("+F+")"+r("\\:("+j+")")+"?)")+"?("+N+"|"+U+"|"+z+"|"+G+")"),r("\\?("+q+")"),r("\\#("+V+")"),r("("+f+")@"),r("\\:("+j+")");return{NOT_SCHEME:new RegExp(t("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",c,o),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",c,o),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",c,o),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",c,o),"g"),NOT_QUERY:new RegExp(t("[^\\%]",c,o,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",c,o,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",c,o),"g"),UNRESERVED:new RegExp(c,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",c,a),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+S+")"+r(r("\\%25|\\%(?!"+n+"{2})")+"("+P+")")+"?\\]?$")}}function s(e){throw new RangeError(I[e])}function c(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function l(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(R,"."),n+c(e.split("."),t).join(".")}function f(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var o=e.charCodeAt(r++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),r--)}else t.push(i)}return t}function d(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function h(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var a=parseInt(e.substr(r+4,2),16),u=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&a)<<6|63&u)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function p(e,t){function r(e){var r=h(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,d).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,d).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,d).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,d).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,d).replace(t.PCT_ENCODED,i)),e}function y(e){return e.replace(/^0*(.*)/,"$1")||"0"}function m(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=F(r,2),i=n[1];return i?i.split(".").map(y).join("."):e}function v(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=F(r,3),i=n[1],o=n[2];if(i){for(var a=i.toLowerCase().split("::").reverse(),u=F(a,2),s=u[0],c=u[1],l=c?c.split(":").map(y):[],f=s.split(":").map(y),d=t.IPV4ADDRESS.test(f[f.length-1]),h=d?7:8,p=f.length-h,v=Array(h),_=0;_<h;++_)v[_]=l[_]||f[p+_]||"";d&&(v[h-1]=m(v[h-1],t));var g=v.reduce(function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e},[]),b=g.sort(function(e,t){return t.length-e.length})[0],w=void 0;if(b&&b.length>1){var E=v.slice(0,b.index),A=v.slice(b.index+b.length);w=E.join(":")+"::"+A.join(":")}else w=v.join(":");return o&&(w+="%"+o),w}return e}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?T:k;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(J);if(i){Q?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=v(m(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=K[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)p(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=$.toASCII(r.host.replace(n.PCT_ENCODED,h).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}p(r,k)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function g(e,t){var r=!1!==t.iri?T:k,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(v(m(String(e.host),r),r).replace(r.IPV6ADDRESS,function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"})),"number"==typeof e.port&&(n.push(":"),n.push(e.port.toString(10))),n.length?n.join(""):void 0}function b(e){for(var t=[];e.length;)if(e.match(X))e=e.replace(X,"");else if(e.match(Z))e=e.replace(Z,"/");else if(e.match(ee))e=e.replace(ee,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(te);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?T:k,n=[],i=K[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?$.toUnicode(e.host):$.toASCII(e.host.replace(r.PCT_ENCODED,h).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}p(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=g(e,t);if(void 0!==o&&("suffix"!==t.reference&&n.push("//"),n.push(o),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var a=e.path;t.absolutePath||i&&i.absolutePath||(a=b(a)),void 0===o&&(a=a.replace(/^\/\//,"/%2F")),n.push(a)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function E(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments[3],i={};return n||(e=_(w(e,r),r),t=_(w(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=b(t.path||""),i.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=b(t.path||""),i.query=t.query):(t.path?("/"===t.path.charAt(0)?i.path=b(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path:i.path="/"+t.path,i.path=b(i.path)),i.query=t.query):(i.path=e.path,void 0!==t.query?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function A(e,t,r){var n=a({scheme:"null"},r);return w(E(_(e,n),_(t,n),n,!0),n)}function O(e,t){return"string"==typeof e?e=w(_(e,t),t):"object"===n(e)&&(e=_(w(e,t),t)),e}function S(e,t,r){return"string"==typeof e?e=w(_(e,r),r):"object"===n(e)&&(e=w(e,r)),"string"==typeof t?t=w(_(t,r),r):"object"===n(t)&&(t=w(t,r)),e===t}function P(e,t){return e&&e.toString().replace(t&&t.iri?T.ESCAPE:k.ESCAPE,d)}function D(e,t){return e&&e.toString().replace(t&&t.iri?T.PCT_ENCODED:k.PCT_ENCODED,h)}function C(e){var t=h(e);return t.match(ce)?t:e}var k=u(!1),T=u(!0),F=function(){function e(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(n=(a=u.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),j=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},x=2147483647,B=/^xn--/,M=/[^\0-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,I={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},N=Math.floor,U=String.fromCharCode,L=function(e){return String.fromCodePoint.apply(String,j(e))},z=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36},G=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},q=function(e,t,r){var n=0;for(e=r?N(e/700):e>>1,e+=N(e/t);e>455;n+=36)e=N(e/35);return N(n+36*e/(e+38))},V=function(e){var t=[],r=e.length,n=0,i=128,o=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var u=0;u<a;++u)e.charCodeAt(u)>=128&&s("not-basic"),t.push(e.charCodeAt(u));for(var c=a>0?a+1:0;c<r;){for(var l=n,f=1,d=36;;d+=36){c>=r&&s("invalid-input");var h=z(e.charCodeAt(c++));(h>=36||h>N((x-n)/f))&&s("overflow"),n+=h*f;var p=d<=o?1:d>=o+26?26:d-o;if(h<p)break;var y=36-p;f>N(x/y)&&s("overflow"),f*=y}var m=t.length+1;o=q(n-l,m,0==l),N(n/m)>x-i&&s("overflow"),i+=N(n/m),n%=m,t.splice(n++,0,i)}return String.fromCodePoint.apply(String,t)},H=function(e){var t=[];e=f(e);var r=e.length,n=128,i=0,o=72,a=!0,u=!1,c=void 0;try{for(var l,d=e[Symbol.iterator]();!(a=(l=d.next()).done);a=!0){var h=l.value;h<128&&t.push(U(h))}}catch(e){u=!0,c=e}finally{try{!a&&d.return&&d.return()}finally{if(u)throw c}}var p=t.length,y=p;for(p&&t.push("-");y<r;){var m=x,v=!0,_=!1,g=void 0;try{for(var b,w=e[Symbol.iterator]();!(v=(b=w.next()).done);v=!0){var E=b.value;E>=n&&E<m&&(m=E)}}catch(e){_=!0,g=e}finally{try{!v&&w.return&&w.return()}finally{if(_)throw g}}var A=y+1;m-n>N((x-i)/A)&&s("overflow"),i+=(m-n)*A,n=m;var O=!0,S=!1,P=void 0;try{for(var D,C=e[Symbol.iterator]();!(O=(D=C.next()).done);O=!0){var k=D.value;if(k<n&&++i>x&&s("overflow"),k==n){for(var T=i,F=36;;F+=36){var j=F<=o?1:F>=o+26?26:F-o;if(T<j)break;var B=T-j,M=36-j;t.push(U(G(j+B%M,0))),T=N(B/M)}t.push(U(G(T,0))),o=q(i,A,y==p),i=0,++y}}}catch(e){S=!0,P=e}finally{try{!O&&C.return&&C.return()}finally{if(S)throw P}}++i,++n}return t.join("")},W=function(e){return l(e,function(e){return B.test(e)?V(e.slice(4).toLowerCase()):e})},Y=function(e){return l(e,function(e){return M.test(e)?"xn--"+H(e):e})},$={version:"2.1.0",ucs2:{decode:f,encode:L},decode:V,encode:H,toASCII:Y,toUnicode:W},K={},J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Q=void 0==="".match(/(){0}/)[1],X=/^\.\.?\//,Z=/^\/\.(\/|$)/,ee=/^\/\.\.(\/|$)/,te=/^\/?(?:.|\n)*?(?=\/|$)/,re={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},ne={scheme:"https",domainHost:re.domainHost,parse:re.parse,serialize:re.serialize
23
- },ie={},oe="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ae="[0-9A-Fa-f]",ue=r(r("%[EFef][0-9A-Fa-f]%"+ae+ae+"%"+ae+ae)+"|"+r("%[89A-Fa-f][0-9A-Fa-f]%"+ae+ae)+"|"+r("%"+ae+ae)),se=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ce=new RegExp(oe,"g"),le=new RegExp(ue,"g"),fe=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',se),"g"),de=new RegExp(t("[^]",oe,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),he=de,pe={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,o={},a=r.query.split("&"),u=0,s=a.length;u<s;++u){var c=a[u].split("=");switch(c[0]){case"to":for(var l=c[1].split(","),f=0,d=l.length;f<d;++f)n.push(l[f]);break;case"subject":r.subject=D(c[1],t);break;case"body":r.body=D(c[1],t);break;default:i=!0,o[D(c[0],t)]=D(c[1],t)}}i&&(r.headers=o)}r.query=void 0;for(var h=0,p=n.length;h<p;++h){var y=n[h].split("@");if(y[0]=D(y[0]),t.unicodeSupport)y[1]=D(y[1],t).toLowerCase();else try{y[1]=$.toASCII(D(y[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[h]=y.join("@")}return r},serialize:function(e,t){var r=e,n=o(e.to);if(n){for(var a=0,u=n.length;a<u;++a){var s=String(n[a]),c=s.lastIndexOf("@"),l=s.slice(0,c).replace(le,C).replace(le,i).replace(fe,d),f=s.slice(c+1);try{f=t.iri?$.toUnicode(f):$.toASCII(D(f,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[a]=l+"@"+f}r.path=n.join(",")}var h=e.headers=e.headers||{};e.subject&&(h.subject=e.subject),e.body&&(h.body=e.body);var p=[];for(var y in h)h[y]!==ie[y]&&p.push(y.replace(le,C).replace(le,i).replace(de,d)+"="+h[y].replace(le,C).replace(le,i).replace(he,d));return p.length&&(r.query=p.join("&")),r}},ye=/^([^\:]+)\:(.*)/,me={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(ye),n=e;if(r){var i=t.scheme||n.scheme||"urn",o=r[1].toLowerCase(),a=r[2],u=i+":"+(t.nid||o),s=K[u];n.nid=o,n.nss=a,n.path=void 0,s&&(n=s.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),o=K[i];o&&(e=o.serialize(e,t));var a=e,u=e.nss;return a.path=(n||t.nid)+":"+u,a}},ve=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,_e={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(ve)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};K[re.scheme]=re,K[ne.scheme]=ne,K[pe.scheme]=pe,K[me.scheme]=me,K[_e.scheme]=_e,e.SCHEMES=K,e.pctEncChar=d,e.pctDecChars=h,e.parse=_,e.removeDotSegments=b,e.serialize=w,e.resolveComponents=E,e.resolve=A,e.normalize=O,e.equal=S,e.escapeComponent=P,e.unescapeComponent=D,Object.defineProperty(e,"__esModule",{value:!0})})},{}],135:[function(e,t,r){(function(r){"use strict";function n(e){return!e||("utf8"===(e=e.toLowerCase())||"utf-8"===e)}function i(e,t){if(n(t))return encodeURIComponent(e);for(var r=h.encode(e,t),i="",o="",a=0;a<r.length;a++)o=r[a].toString("16"),1===o.length&&(o="0"+o),i+="%"+o;return i=i.toUpperCase()}function o(e,t){if(n(t))return decodeURIComponent(e);for(var i=[],o=0;o<e.length;)"%"===e[o]?(o++,i.push(parseInt(e.substring(o,o+2),16)),o+=2):(i.push(e.charCodeAt(o)),o++);var a=new r(i);return h.decode(a,t)}function a(e,t,r,n){"object"==typeof t&&(n=t,t=null),t=t||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var a=/\+/g;e=e.split(t);var s=1e3,c=null;n&&("number"==typeof n.maxKeys&&(s=n.maxKeys),"string"==typeof n.charset&&(c=n.charset));var l=e.length;s>0&&l>s&&(l=s);for(var f=0;f<l;++f){var d,h,p,y,m=e[f].replace(a,"%20"),v=m.indexOf(r);if(v>=0?(d=m.substr(0,v),h=m.substr(v+1)):(d=m,h=""),d&&d.indexOf("%")>=0)try{p=o(d,c)}catch(e){p=d}else p=d;if(h&&h.indexOf("%")>=0)try{y=o(h,c)}catch(e){y=h}else y=h;u(i,p)?Array.isArray(i[p])?i[p].push(y):i[p]=[i[p],y]:i[p]=y}return i}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){return/^[\x00-\x7F]*$/.test(e)}function c(e,t){return e=String(e),e=s(e)?encodeURIComponent(e):i(e,t)}function l(e,t,r){if(!t)throw new TypeError("stringify expects an object");return t+"="+c(e,r.charset)}function f(e,t,r){var n=[];if(!t)throw new TypeError("stringify expects an object");for(var i=0;i<e.length;i++)n.push(p(e[i],t+"["+i+"]",r));return n.join("&")}function d(e,t,r){for(var n,o=[],a=Object.keys(e),u=r.charset,s=0,l=a.length;s<l;++s)""!==(n=a[s])&&(null===e[n]?o.push(i(n,u)+"="):o.push(p(e[n],t?t+"["+c(n,u)+"]":c(n,u),r)));return o.join("&")}var h=e("iconv-lite"),p=function(e,t,r){"string"!=typeof t&&(r=t||{},t=null);var n=r.charset||"utf-8";return Array.isArray(e)?f(e,t,r):"[object Object]"==={}.toString.call(e)?d(e,t,r):"string"==typeof e?l(e,t,r):t+"="+c(String(e),n)};t.exports=i,t.exports.encode=i,t.exports.decode=o,t.exports.parse=a,t.exports.stringify=p}).call(this,e("buffer").Buffer)},{buffer:52,"iconv-lite":96}],136:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("q"),c=n(s),l=e("../provision/BaseProvision"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/ai",void 0,["organization","file"],"north/ai"),this._ogapi=e}return o(t,e),a(t,[{key:"_buildURL",value:function(){return this._organization+"/models/"+this._identifier}},{key:"withIdentifier",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"identifier"});return this._identifier=e,this}},{key:"withOrganization",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"organization"});return this._organization=e,this}},{key:"withFile",value:function(e){this._file=e}},{key:"_composeElement",value:function(){return this._checkRequiredParameters(),this._resource=this._organization+"/models",{modelFile:this._file||void 0}}},{key:"_composeUpdateElement",value:function(){return u(Object.getPrototypeOf(t.prototype),"_composeUpdateElement",this).call(this)}},{key:"prediction",value:function(e){var t=c.default.defer(),r=t.promise;return this._ogapi.Napi.post(this._buildURL()+"/prediction",e,this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(e){t.resolve({statusCode:e.statusCode,body:e.body})}).catch(function(e){t.reject(e)}),r}},{key:"create",value:function(){var e=this._composeElement(),t=c.default.defer();return this._ogapi.Napi.post_multipart(this._resource,{modelFile:e.modelFile},{},this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(e){switch(e.statusCode){case 200:var r=""!=e.text?JSON.parse(e.text):{},n=e.status;t.resolve({data:r,statusCode:n});break;case 201:var n=e.status,i=e.header&&e.header.location;t.resolve({location:i,statusCode:n});break;case 204:t.resolve(e);break;default:t.reject({errors:e.data.errors,statusCode:e.statusCode})}}).catch(function(e){t.reject(e)}),t.promise}},{key:"update",value:function(){var e=this._composeElement(),t=c.default.defer();return this._ogapi.Napi.put_multipart(this._buildURL(),{modelFile:e.modelFile},{},this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(e){switch(e.statusCode){case 200:var r=""!=e.text?JSON.parse(e.text):{},n=e.status;t.resolve({data:r,statusCode:n});break;default:t.reject({errors:e.data.errors,statusCode:e.statusCode})}}).catch(function(e){t.reject(e)}),t.promise}}]),t}(f.default);r.default=d,t.exports=r.default},{"../provision/BaseProvision":235,q:117}],137:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../GenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"ai","list","AIModel not found","north")}return i(t,e),o(t,[{key:"findByOrganization",value:function(e){return this._organization=e,this._execute()}},{key:"findByOrganizationAndIdentifier",value:function(e,t){return this._organization=e,this._identifier=t,this._execute()}},{key:"downloadByOrganizationAndIdentifierAndFilename",value:function(e,t,r){return this._organization=e,this._identifier=t,this._filename=r,this._download()}},{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._organization+"/models"+(this._identifier?"/"+this._identifier+(this._filename?"/"+this._filename:""):"")}}]),t}(s.default);r.default=c,t.exports=r.default},{"../GenericFinder":138}],138:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=e("q"),u=n(a),s=e("http-status-codes"),c=n(s),l=function(){function e(t,r,n,o,a){i(this,e),this._api=t.Napi,this._baseUrl=r,this._entity=n,this._error_not_found=o,this._id=void 0,this._headers=void 0,this._urlParameters=void 0,this._serviceBaseURL=a}return o(e,[{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._id}},{key:"_withId",value:function(e){return this._id=e,this}},{key:"_getExtraHeaders",value:function(){return this._headers}},{key:"_setExtraHeaders",value:function(e){if(this._headers)for(var t=Object.keys(e),r=0;r<t.length;r++){var n=t[r];this._headers[n]=e[n]}else this._headers=e}},{key:"_getUrlParameters",value:function(){return this._urlParameters}},{key:"_setUrlParameters",value:function(e){if(this.parameters)for(var t=Object.keys(e),r=0;r<t.length;r++){var n=t[r];this._urlParameters[n]=e[n]}else this._urlParameters=e}},{key:"_execute",value:function(){var e=u.default.defer(),t=e.promise,r=this._entity,n=this._error_not_found;return this._api.get(this._composeUrl(),void 0,this._getExtraHeaders(),this._getUrlParameters(),!1,this._getServiceBaseURL()).then(function(t){if(204===t.statusCode)e.reject({error:n,statusCode:c.default.NOT_FOUND});else{var i=t.body[r]&&t.body.provision?t.body:t.body[r];e.resolve({data:i||t.body,statusCode:t.statusCode})}}).catch(function(t){400===t.statusCode&&(t.statusCode=c.default.NOT_FOUND),e.reject(t)}),t}},{key:"_downloadUrl",value:function(){return this._composeUrl()}},{key:"_download",value:function(e){var t=u.default.defer(),r=t.promise,n=this._error_not_found;return this._api.get(this._downloadUrl(),void 0,this._getExtraHeaders(),this._getUrlParameters(),!e,this._getServiceBaseURL()).then(function(e){204===e.statusCode?t.reject({data:n,statusCode:c.default.NOT_FOUND}):t.resolve({data:e,statusCode:e.statusCode})}).catch(function(e){t.reject(e)}),r}},{key:"_getServiceBaseURL",value:function(){return this._serviceBaseURL}}]),e}();r.default=l,t.exports=r.default},{"http-status-codes":76,q:117}],139:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=e("./operations/Operations"),u=n(a),s=e("./users/UserFinder"),c=n(s),l=e("./geocluster/GeoclusterFinder"),f=n(l),d=e("./geocluster/Geocluster"),h=n(d),p=e("./security/Certificates"),y=n(p),m=e("./users/Users"),v=n(m),_=e("./organizations/OrganizationFinder"),g=n(_),b=e("./channels/ChannelFinder"),w=n(b),E=e("./searching/builder/AreasSearchBuilder"),A=n(E),O=e("./searching/builder/DatasetsCatalogSearchBuilder"),S=n(O),P=e("./areas/AreaFinder"),D=n(P),C=e("./searching/builder/BulkSearchBuilder"),k=n(C),T=e("./searching/builder/BulkExecutionSearchBuilder"),F=n(T),j=e("./bulk/BulkFinder"),x=n(j),B=e("./bulk/BulkExecutionFinder"),M=n(B),R=e("./channels/Channels"),I=n(R),N=e("./areas/Areas"),U=n(N),L=e("./datasets/Datasets"),z=n(L),G=e("./timeseries/Timeseries"),q=n(G),V=e("./searching/builder/ChannelsSearchBuilder"),H=n(V),W=e("./rulesConfiguration/RuleConfigurations"),Y=n(W),$=e("./rulesConfiguration/RuleConfigurationsFinder"),K=n($),J=e("./rulesConfiguration/RuleConfigurationsCatalog"),Q=n(J),X=e("./rulesConfiguration/RuleConfigurationsHelper"),Z=n(X),ee=e("./datasets/DatasetFinder"),te=n(ee),re=e("./timeseries/TimeseriesFinder"),ne=n(re),ie=e("./operationTypes/OperationType"),oe=n(ie),ae=e("./operationTypes/OperationTypeFinder"),ue=n(ae),se=e("./operationTypes/OperationTypeCatalog"),ce=n(se),le=e("./security/CertificateFinder"),fe=n(le),de=e("./operations/OperationFinder"),he=n(de),pe=e("./searching/FilterBuilder"),ye=n(pe),me=e("./searching/SelectBuilder"),ve=n(me),_e=e("./operations/OperationActions"),ge=n(_e),be=e("./operations/PeriodicityActions"),we=n(be),Ee=e("./util/Expression"),Ae=n(Ee),Oe=e("./util/SelectElement"),Se=n(Oe),Pe=e("./searching/builder/RawSearchBuilder"),De=n(Pe),Ce=e("./searching/builder/DevicesSearchBuilder"),ke=n(Ce),Te=e("./searching/builder/SubscribersSearchBuilder"),Fe=n(Te),je=e("./searching/builder/SubscriptionsSearchBuilder"),xe=n(je),Be=e("./searching/builder/AssetsSearchBuilder"),Me=n(Be),Re=e("./searching/builder/TicketsSearchBuilder"),Ie=n(Re),Ne=e("./searching/builder/TasksSearchBuilder"),Ue=n(Ne),Le=e("./searching/builder/OperationsSearchBuilder"),ze=n(Le),Ge=e("./searching/builder/ExecutionsSearchBuilder"),qe=n(Ge),Ve=e("./searching/builder/ExecutionsHistorySearchBuilder"),He=n(Ve),We=e("./searching/builder/AlarmsSearchBuilder"),Ye=n(We),$e=e("./searching/builder/DatamodelsSearchBuilder"),Ke=n($e),Je=e("./searching/builder/FeedsSearchBuilder"),Qe=n(Je),Xe=e("./searching/builder/DatastreamsSearchBuilder"),Ze=n(Xe),et=e("./searching/builder/DatapointsSearchBuilder"),tt=n(et),rt=e("./searching/builder/BundlesSearchBuilder"),nt=n(rt),it=e("./searching/builder/CertificatesSearchBuilder"),ot=n(it),at=e("./searching/builder/HardwaresSearchBuilder"),ut=n(at),st=e("./searching/builder/SoftwaresSearchBuilder"),ct=n(st),lt=e("./searching/builder/OperationalStatusSearchBuilder"),ft=n(lt),dt=e("./searching/builder/ServiceGroupSearchBuilder"),ht=n(dt),pt=e("./searching/builder/AdministrativeStateSearchBuilder"),yt=n(pt),mt=e("./searching/builder/CommunicationsModuleTypeSearchBuilder"),vt=n(mt),_t=e("./searching/builder/FieldsDefinitionSearchBuilder"),gt=n(_t),bt=e("./searching/builder/BasicTypesSearchBuilder"),wt=n(bt),Et=e("./searching/builder/MobilePhoneProviderSearchBuilder"),At=n(Et),Ot=e("./searching/builder/IoTDatastreamPeriodSearchBuilder"),St=n(Ot),Pt=e("./searching/builder/ResourceTypeSearchBuilder"),Dt=n(Pt),Ct=e("./searching/builder/AllowedResourceTypeSearchBuilder"),kt=n(Ct),Tt=e("./searching/builder/IoTDatastreamAccessSearchBuilder"),Ft=n(Tt),jt=e("./searching/builder/IoTDatastreamStoragePeriodSearchBuilder"),xt=n(jt),Bt=e("./searching/builder/TicketSeveritySearchBuilder"),Mt=n(Bt),Rt=e("./searching/builder/TicketPrioritySearchBuilder"),It=n(Rt),Nt=e("./searching/builder/TicketStatusSearchBuilder"),Ut=n(Nt),Lt=e("./searching/builder/RulesSearchBuilder"),zt=n(Lt),Gt=e("./searching/builder/OperationTypesSearchBuilder"),qt=n(Gt),Vt=e("./searching/builder/UsersSearchBuilder"),Ht=n(Vt),Wt=e("./searching/builder/DomainsSearchBuilder"),Yt=n(Wt),$t=e("./searching/builder/PlansSearchBuilder"),Kt=n($t),Jt=e("./searching/builder/DevicesPlansSearchBuilder"),Qt=n(Jt),Xt=e("./bundles/Bundles"),Zt=n(Xt),er=e("./bundles/BundleFinder"),tr=n(er),rr=e("./organizations/Organizations"),nr=n(rr),ir=e("./domains/Domains"),or=n(ir),ar=e("./domains/DomainsFinder"),ur=n(ar),sr=e("./entities/DeviceFinder"),cr=n(sr),lr=e("./entities/TicketFinder"),fr=n(lr),dr=e("./entities/SubscriptionsFinder"),hr=n(dr),pr=e("./entities/SubscribersFinder"),yr=n(pr),mr=e("./collection/devices/DeviceMessage"),vr=n(mr),_r=e("./collection/devices/collect/Datastreams"),gr=n(_r),br=e("./collection/devices/collect/Datapoint"),wr=n(br),Er=e("./collection/devices/collect/Hardware"),Ar=n(Er),Or=e("./collection/devices/collect/Software"),Sr=n(Or),Pr=e("./collection/devices/collect/Storage"),Dr=n(Pr),Cr=e("./collection/devices/collect/Usage"),kr=n(Cr),Tr=e("./collection/devices/collect/PowerSupply"),Fr=n(Tr),jr=e("./collection/devices/collect/CommsModuleMessage"),xr=n(jr),Br=e("./collection/devices/collect/Mobile"),Mr=n(Br),Rr=e("./collection/devices/collect/Subscriber"),Ir=n(Rr),Nr=e("./collection/devices/collect/Subscription"),Ur=n(Nr),Lr=e("./workgroups/WorkgroupRelations"),zr=n(Lr),Gr=e("./workgroups/Workgroups"),qr=n(Gr),Vr=e("./workgroups/WorkgroupFinder"),Hr=n(Vr),Wr=e("./searching/builder/WorkgroupsSearchBuilder"),Yr=n(Wr),$r=e("./workgroups/WorkgroupRelationsFinder"),Kr=n($r),Jr=e("./searching/builder/UserProfilesSearchBuilder"),Qr=n(Jr),Xr=e("./iot/datamodels/Datamodels"),Zr=n(Xr),en=e("./iot/datamodels/DatamodelsHelper"),tn=n(en),rn=e("./iot/datamodels/DatamodelsFinder"),nn=n(rn),on=e("./iot/catalog/Datastream"),an=n(on),un=e("./iot/catalog/Qrating"),sn=n(un),cn=e("./provision/entities/EntityBuilder"),ln=n(cn),fn=e("./provision/bulk/BulkExecutionBuilder"),dn=n(fn),hn=e("./searching/builder/EntitiesSearchBuilder"),pn=n(hn),yn=e("./searching/builder/DatasetEntitiesSearchBuilder"),mn=n(yn),vn=e("./searching/builder/DatasetSearchBuilder"),_n=n(vn),gn=e("./searching/builder/TimeserieSearchBuilder"),bn=n(gn),wn=e("./searching/builder/CountryCodesSearchBuilder"),En=n(wn),An=e("./searching/builder/TimezoneSearchBuilder"),On=n(An),Sn=e("./searching/builder/UserLanguagesSearchBuilder"),Pn=n(Sn),Dn=e("./provisionProcessors/provisionProcessors"),Cn=n(Dn),kn=e("./provisionProcessors/provisionProcessorsFinder"),Tn=n(kn),Fn=e("./entities/EntityFinder"),jn=n(Fn),xn=e("./alarms/AlarmActions"),Bn=n(xn),Mn=e("superagent"),Rn=n(Mn),In=e("./connectorsFunctionsConfiguration/ConnectorFunctionsHelper"),Nn=n(In),Un=e("./connectorsFunctionsConfiguration/ConnectorFunctionsFinder"),Ln=n(Un),zn=e("./connectorsFunctionsConfiguration/ConnectorFunctions"),Gn=n(zn),qn=e("./pipelines/PipelineFinder"),Vn=n(qn),Hn=e("./transformers/TransformerFinder"),Wn=n(Hn),Yn=e("./AIModels/AIModelsFinder"),$n=n(Yn),Kn=e("./transformers/Transformers"),Jn=n(Kn),Qn=e("./AIModels/AIModels"),Xn=n(Qn),Zn=e("./pipelines/Pipelines"),ei=n(Zn),ti=e("./manufacturers/Manufacturer"),ri=n(ti),ni=e("./manufacturers/Model"),ii=n(ni),oi=e("./manufacturers/ManufacturerFinder"),ai=n(oi),ui=e("./manufacturers/ModelFinder"),si=n(ui),ci=e("./provision/country/CountriesCatalog"),li=n(ci),fi=function(){var e=void 0,t=Rn.default.Request.prototype.end;return Rn.default.Request.prototype.end=function(r){return e&&e.call&&e(this),t.call(this,function(e,t){"function"==typeof r&&r(e,t)})},function(t){e=t}}(),di=function(){function e(t,r,n){if(i(this,e),this.constructor===e)throw new Error("Cannot construct Abstract instances directly");if("object"!=typeof t)throw new Error("Must instance mandatory parameter: northAmpliaREST");if("object"!=typeof r)throw new Error("Must instance mandatory parameter: southAmpliaREST");n.hooks&&n.hooks.beforeStart&&"function"==typeof n.hooks.beforeStart&&fi(n.hooks.beforeStart),this.Napi=t,this.Sapi=r,this.EX=Ae.default,this.SE=Se.default,this.operations=new u.default(this),this.alarms=new Bn.default(this),this.entityBuilder=new ln.default(this)}return o(e,[{key:"newUserFinder",value:function(){return new c.default(this)}},{key:"newGeoclusterFinder",value:function(){return new f.default(this)}},{key:"geoclusterBuilder",value:function(){return new h.default(this)}},{key:"newOrganizationFinder",value:function(){return new g.default(this)}},{key:"newChannelFinder",value:function(){return new w.default(this)}},{key:"areasSearchBuilder",value:function(){return new A.default(this)}},{key:"datasetsCatalogSearchBuilder",value:function(){return new S.default(this)}},{key:"bulkSearchBuilder",value:function(){return new k.default(this)}},{key:"bulkExecutionSearchBuilder",value:function(){return new F.default(this)}},{key:"newBulkFinder",value:function(){return new x.default(this)}},{key:"newBulkExecutionFinder",value:function(){return new M.default(this)}},{key:"newAreaFinder",value:function(){return new D.default(this)}},{key:"newOperationFinder",value:function(){return new he.default(this)}},{key:"newOperationTypeFinder",value:function(){return new ue.default(this)}},{key:"newOperationTypeCatalog",value:function(){return new ce.default(this)}},{key:"newCountriesCatalog",value:function(){return new li.default(this)}},{key:"operationTypeBuilder",value:function(e,t,r){return new oe.default(this,e,t,r)}},{key:"newRuleConfigurationsFinder",value:function(){return new K.default(this)}},{key:"newRuleConfigurationsHelper",value:function(){return new Z.default(this)}},{key:"newDatasetFinder",value:function(){return new te.default(this)}},{key:"newTimeserieFinder",value:function(){return new ne.default(this)}},{key:"newRuleConfigurationsCatalog",value:function(){return new Q.default(this)}},{key:"ruleConfigurationBuilder",value:function(e,t,r,n){return new Y.default(this,e,t,r,n)}},{key:"newCertificateFinder",value:function(){return new fe.default(this)}},{key:"newDeviceFinder",value:function(){return new cr.default(this)}},{key:"newTicketFinder",value:function(){return new fr.default(this)}},{key:"newSubscriptionsFinder",value:function(){return new hr.default(this)}},{key:"newSubscribersFinder",value:function(){return new yr.default(this)}},{key:"newEntityFinder",value:function(){return new jn.default(this)}},{key:"newFilterBuilder",value:function(){return new ye.default}},{key:"newSelectBuilder",value:function(){return new ve.default}},{key:"rawSearchBuilder",value:function(){return new De.default(this)}},{key:"usersSearchBuilder",value:function(){return new Ht.default(this)}},{key:"domainsSearchBuilder",value:function(){return new Yt.default(this)}},{key:"devicesSearchBuilder",value:function(){return new ke.default(this)}},{key:"assetsSearchBuilder",value:function(){return new Me.default(this)}},{key:"subscribersSearchBuilder",value:function(){return new Fe.default(this)}},{key:"subscriptionsSearchBuilder",value:function(){return new xe.default(this)}},{key:"ticketsSearchBuilder",value:function(){return new Ie.default(this)}},{key:"communicationsModuleTypeSearchBuilder",value:function(){return new vt.default(this)}},{key:"fieldsDefinitionSearchBuilder",value:function(){return new gt.default(this)}},{key:"mobilePhoneProviderSearchBuilder",value:function(){return new At.default(this)}},{key:"ioTDatastreamPeriodSearchBuilder",value:function(){return new St.default(this)}},{key:"resourceTypeSearchBuilder",value:function(){return new Dt.default(this)}},{key:"allowedResourceTypeSearchBuilder",value:function(){return new kt.default(this)}},{key:"ioTDatastreamAccessSearchBuilder",value:function(){return new Ft.default(this)}},{key:"ioTDatastreamStoragePeriodSearchBuilder",value:function(){return new xt.default(this)}},{key:"ticketSeveritySearchBuilder",value:function(){return new Mt.default(this)}},{key:"ticketPrioritySearchBuilder",value:function(){return new It.default(this)}},{key:"ticketStatusSearchBuilder",value:function(){return new Ut.default(this)}},{key:"rulesSearchBuilder",value:function(){return new zt.default(this)}},{key:"operationTypesSearchBuilder",value:function(){return new qt.default(this)}},{key:"tasksSearchBuilder",value:function(){return new Ue.default(this)}},{key:"operationsSearchBuilder",value:function(){return new ze.default(this)}},{key:"executionsSearchBuilder",value:function(){return new qe.default(this)}},{key:"executionsHistorySearchBuilder",value:function(){return new He.default(this)}},{key:"alarmsSearchBuilder",value:function(){return new Ye.default(this)}},{key:"datastreamsSearchBuilder",value:function(){return new Ze.default(this)}},{key:"datamodelsSearchBuilder",value:function(){return new Ke.default(this)}},{key:"feedsSearchBuilder",value:function(){return new Qe.default(this)}},{key:"datapointsSearchBuilder",value:function(){return new tt.default(this)}},{key:"bundlesSearchBuilder",value:function(){return new nt.default(this)}},{key:"certificatesSearchBuilder",value:function(){return new ot.default(this)}},{key:"basicTypesSearchBuilder",value:function(){return new wt.default(this)}},{key:"entitiesSearchBuilder",value:function(){return new pn.default(this)}},{key:"datasetEntitiesSearchBuilder",value:function(e,t){return new mn.default(this,e,t)}},{key:"datasetSearchBuilder",value:function(e,t){return new _n.default(this,e,t)}},{key:"timeserieSearchBuilder",value:function(e,t){return new bn.default(this,e,t)}},{key:"plansSearchBuilder",value:function(){return new Kt.default(this)}},{key:"devicesPlansSearchBuilder",value:function(){return new Qt.default(this)}},{key:"bundlesBuilder",value:function(){return new Zt.default(this)}},{key:"newBundleFinder",value:function(){return new tr.default(this)}},{key:"organizationsBuilder",value:function(){return new nr.default(this)}},{key:"domainsBuilder",value:function(){return new or.default(this)}},{key:"newDomainFinder",value:function(){return new ur.default(this)}},{key:"usersBuilder",value:function(){return new v.default(this)}},{key:"certificatesBuilder",value:function(){return new y.default(this)}},{key:"hardwaresSearchBuilder",value:function(){return new ut.default(this)}},{key:"softwaresSearchBuilder",value:function(){return new ct.default(this)}},{key:"operationalStatusSearchBuilder",value:function(){return new ft.default(this)}},{key:"serviceGroupSearchBuilder",value:function(){return new ht.default(this)}},{key:"administrativeStateSearchBuilder",value:function(){return new yt.default(this)}},{key:"deviceMessageBuilder",value:function(){return new vr.default(this)}},{key:"datastreamBuilder",value:function(){return new gr.default(this)}},{key:"datapointsBuilder",value:function(){return new wr.default(this)}},{key:"hardwareMessageBuilder",value:function(){return new Ar.default(this)}},{key:"softwareMessageBuilder",value:function(){return new Sr.default(this)}},{key:"storageMessageBuilder",value:function(){return new Dr.default(this)}},{key:"usageMessageBuilder",value:function(){return new kr.default(this)}},{key:"powerSupplyMessageBuilder",value:function(){return new Fr.default(this)}},{key:"commsModuleMessageMessageBuilder",value:function(){return new xr.default(this)}},{key:"subscriberMessageBuilder",value:function(){return new Ir.default(this)}},{key:"subscriptionMessageBuilder",value:function(){return new Ur.default(this)}},{key:"mobileMessageMessageBuilder",value:function(){return new Mr.default(this)}},{key:"newOperationActions",value:function(e){return new ge.default(this,e)}},{key:"newPeriodicityActions",value:function(e){return new we.default(this,e)}},{key:"workgroupRelationsBuilder",value:function(){return new zr.default(this)}},{key:"newWorkgroupRelationsFinder",value:function(){return new Kr.default(this)}},{key:"workgroupsBuilder",value:function(){return new qr.default(this)}},{key:"newWorkgroupFinder",value:function(){return new Hr.default(this)}},{key:"workgroupsSearchBuilder",value:function(){return new Yr.default(this)}},{key:"channelsBuilder",value:function(){return new I.default(this)}},{key:"areasBuilder",value:function(){return new U.default(this)}},{key:"datasetsBuilder",value:function(){return new z.default(this)}},{key:"timeseriesBuilder",value:function(){return new q.default(this)}},{key:"channelsSearchBuilder",value:function(){return new H.default(this)}},{key:"userProfilesSearchBuilder",value:function(){return new Qr.default(this)}},{key:"datamodelsBuilder",value:function(e){return new Zr.default(this,e)}},{key:"datamodelsHelper",value:function(e,t){return new tn.default(this,e,t)}},{key:"newDatamodelsFinder",value:function(){return new nn.default(this)}},{key:"datastreamsBuilder",value:function(){return new an.default(this)}},{key:"bulkExecutionBuilder",value:function(e,t,r){return new dn.default(this,e,t,r)}},{key:"qratingsBuilder",value:function(){return new sn.default(this)}},{key:"countryCodesSearchBuilder",value:function(){return new En.default(this)}},{key:"timezoneSearchBuilder",value:function(){return new On.default(this)}},{key:"userLanguagesSearchBuilder",value:function(){return new Pn.default(this)}},{key:"newConnectorFunctionsFinder",value:function(){return new Ln.default(this)}},{key:"newConnectorFunctionsHelper",value:function(){return new Nn.default(this)}},{key:"connectorFunctionsBuilder",value:function(e,t,r,n){return new Gn.default(this,e,t,r,n)}},{key:"provisionProcessorsBuilder",value:function(){return new Cn.default(this)}},{key:"newProvisionProcessorsFinder",value:function(){return new Tn.default(this)}},{key:"newPipelineFinder",value:function(){return new Vn.default(this)}},{key:"newTransformerFinder",value:function(){return new Wn.default(this)}},{key:"newAIModelFinder",value:function(){return new $n.default(this)}},{key:"transformersBuilder",value:function(){return new Jn.default(this)}},{key:"aiModelsBuilder",value:function(){return new Xn.default(this)}},{key:"pipelinesBuilder",value:function(){return new ei.default(this)}},{key:"manufacturersBuilder",value:function(){return new ri.default(this)}},{key:"manufacturerModelsBuilder",value:function(){return new ii.default(this)}},{key:"newManufacturersFinder",value:function(){return new ai.default(this)}},{key:"newModelFinder",value:function(){return new si.default(this)}}]),e}();r.default=di,t.exports=r.default},{"./AIModels/AIModels":136,"./AIModels/AIModelsFinder":137,"./alarms/AlarmActions":141,
24
- "./areas/AreaFinder":146,"./areas/Areas":147,"./bulk/BulkExecutionFinder":149,"./bulk/BulkFinder":150,"./bundles/BundleFinder":152,"./bundles/Bundles":153,"./channels/ChannelFinder":160,"./channels/Channels":161,"./collection/devices/DeviceMessage":162,"./collection/devices/collect/CommsModuleMessage":163,"./collection/devices/collect/Datapoint":164,"./collection/devices/collect/Datastreams":165,"./collection/devices/collect/Hardware":167,"./collection/devices/collect/Mobile":168,"./collection/devices/collect/PowerSupply":169,"./collection/devices/collect/Software":170,"./collection/devices/collect/Storage":171,"./collection/devices/collect/Subscriber":172,"./collection/devices/collect/Subscription":173,"./collection/devices/collect/Usage":174,"./connectorsFunctionsConfiguration/ConnectorFunctions":183,"./connectorsFunctionsConfiguration/ConnectorFunctionsFinder":184,"./connectorsFunctionsConfiguration/ConnectorFunctionsHelper":185,"./datasets/DatasetFinder":187,"./datasets/Datasets":188,"./domains/Domains":189,"./domains/DomainsFinder":190,"./entities/DeviceFinder":191,"./entities/EntityFinder":192,"./entities/SubscribersFinder":193,"./entities/SubscriptionsFinder":194,"./entities/TicketFinder":195,"./geocluster/Geocluster":196,"./geocluster/GeoclusterFinder":197,"./iot/catalog/Datastream":199,"./iot/catalog/Qrating":200,"./iot/datamodels/Datamodels":201,"./iot/datamodels/DatamodelsFinder":202,"./iot/datamodels/DatamodelsHelper":203,"./manufacturers/Manufacturer":204,"./manufacturers/ManufacturerFinder":205,"./manufacturers/Model":207,"./manufacturers/ModelFinder":208,"./operationTypes/OperationType":210,"./operationTypes/OperationTypeCatalog":211,"./operationTypes/OperationTypeFinder":212,"./operations/OperationActions":213,"./operations/OperationFinder":214,"./operations/Operations":215,"./operations/PeriodicityActions":216,"./organizations/OrganizationFinder":231,"./organizations/Organizations":232,"./pipelines/PipelineFinder":233,"./pipelines/Pipelines":234,"./provision/bulk/BulkExecutionBuilder":236,"./provision/country/CountriesCatalog":237,"./provision/entities/EntityBuilder":243,"./provisionProcessors/provisionProcessors":250,"./provisionProcessors/provisionProcessorsFinder":251,"./rulesConfiguration/RuleConfigurations":252,"./rulesConfiguration/RuleConfigurationsCatalog":253,"./rulesConfiguration/RuleConfigurationsFinder":254,"./rulesConfiguration/RuleConfigurationsHelper":255,"./searching/FilterBuilder":262,"./searching/SelectBuilder":265,"./searching/builder/AdministrativeStateSearchBuilder":268,"./searching/builder/AlarmsSearchBuilder":269,"./searching/builder/AllowedResourceTypeSearchBuilder":270,"./searching/builder/AreasSearchBuilder":271,"./searching/builder/AssetsSearchBuilder":272,"./searching/builder/BasicTypesSearchBuilder":273,"./searching/builder/BulkExecutionSearchBuilder":274,"./searching/builder/BulkSearchBuilder":275,"./searching/builder/BundlesSearchBuilder":276,"./searching/builder/CertificatesSearchBuilder":277,"./searching/builder/ChannelsSearchBuilder":278,"./searching/builder/CommunicationsModuleTypeSearchBuilder":279,"./searching/builder/CountryCodesSearchBuilder":280,"./searching/builder/DatamodelsSearchBuilder":281,"./searching/builder/DatapointsSearchBuilder":282,"./searching/builder/DatasetEntitiesSearchBuilder":283,"./searching/builder/DatasetSearchBuilder":284,"./searching/builder/DatasetsCatalogSearchBuilder":285,"./searching/builder/DatastreamsSearchBuilder":286,"./searching/builder/DevicesPlansSearchBuilder":287,"./searching/builder/DevicesSearchBuilder":288,"./searching/builder/DomainsSearchBuilder":289,"./searching/builder/EntitiesSearchBuilder":290,"./searching/builder/ExecutionsHistorySearchBuilder":291,"./searching/builder/ExecutionsSearchBuilder":292,"./searching/builder/FeedsSearchBuilder":293,"./searching/builder/FieldsDefinitionSearchBuilder":294,"./searching/builder/HardwaresSearchBuilder":296,"./searching/builder/IoTDatastreamAccessSearchBuilder":297,"./searching/builder/IoTDatastreamPeriodSearchBuilder":298,"./searching/builder/IoTDatastreamStoragePeriodSearchBuilder":299,"./searching/builder/MobilePhoneProviderSearchBuilder":300,"./searching/builder/OperationTypesSearchBuilder":301,"./searching/builder/OperationalStatusSearchBuilder":302,"./searching/builder/OperationsSearchBuilder":303,"./searching/builder/PlansSearchBuilder":304,"./searching/builder/RawSearchBuilder":306,"./searching/builder/ResourceTypeSearchBuilder":307,"./searching/builder/RulesSearchBuilder":308,"./searching/builder/ServiceGroupSearchBuilder":311,"./searching/builder/SoftwaresSearchBuilder":312,"./searching/builder/SubscribersSearchBuilder":313,"./searching/builder/SubscriptionsSearchBuilder":314,"./searching/builder/TasksSearchBuilder":315,"./searching/builder/TicketPrioritySearchBuilder":316,"./searching/builder/TicketSeveritySearchBuilder":317,"./searching/builder/TicketStatusSearchBuilder":318,"./searching/builder/TicketsSearchBuilder":319,"./searching/builder/TimeserieSearchBuilder":320,"./searching/builder/TimezoneSearchBuilder":321,"./searching/builder/UserLanguagesSearchBuilder":322,"./searching/builder/UserProfilesSearchBuilder":323,"./searching/builder/UsersSearchBuilder":324,"./searching/builder/WorkgroupsSearchBuilder":325,"./security/CertificateFinder":327,"./security/Certificates":328,"./timeseries/Timeseries":332,"./timeseries/TimeseriesFinder":333,"./transformers/TransformerFinder":334,"./transformers/Transformers":335,"./users/UserFinder":336,"./users/Users":337,"./util/Expression":339,"./util/SelectElement":341,"./workgroups/WorkgroupFinder":347,"./workgroups/WorkgroupRelations":348,"./workgroups/WorkgroupRelationsFinder":349,"./workgroups/Workgroups":350,superagent:128}],140:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("q"),s=(n(u),e("http-status-codes")),c=(n(s),e("./GenericFinder")),l=n(c),f=function(e){function t(e,r,n,o){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"provision/"+r,n,o)}return o(t,e),t}(l.default);r.default=f,t.exports=r.default},{"./GenericFinder":138,"http-status-codes":76,q:117}],141:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=e("./actions/AlarmAttendBuilder"),u=n(a),s=e("./actions/AlarmCloseBuilder"),c=n(s),l=function(){function e(t){i(this,e),this._ogapi=t}return o(e,[{key:"newCloseBuilder",value:function(){return new c.default(this._ogapi)}},{key:"newAttendBuilder",value:function(){return new u.default(this._ogapi)}}]),e}();r.default=l,t.exports=r.default},{"./actions/AlarmAttendBuilder":144,"./actions/AlarmCloseBuilder":145}],142:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("q"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),u=function(){function e(t,r,i){n(this,e),this._ogapi=t,this._resource=r,this._postObj=i}return i(e,[{key:"execute",value:function(){var e=this,t=a.default.defer();return this._ogapi.Napi.post(this._resource,this._postObj).then(function(r){var n=void 0;try{n=JSON.parse(r.text)}catch(t){console.warn("Error parsing response data when execute post action to "+e._resource)}t.resolve({data:n||{},statusCode:r.statusCode,location:r.header.location})}).catch(function(e){e.data||(e.data={}),e.data.errors||(e.data.errors=["string"==typeof e?{message:e}:e]),t.reject(e)}),t.promise}}]),e}();r.default=u,t.exports=r.default},{q:117}],143:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("./Alarm"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),u=function(){function e(t,r){if(n(this,e),this._ogapi=t,this._action=r,this._resource="alarms",this._build={alarms:[],notes:void 0,action:r},this.constructor===e)throw new Error("Cannot construct Abstract instances directly")}return i(e,[{key:"addAlarmId",value:function(e){if("string"!=typeof e)throw new Error("Parameter alarmId must be a string");return this._build.alarms.push(e),this}},{key:"withNotes",value:function(e){if("string"!=typeof e)throw new Error("Parameter notes must be a string");return this._build.notes=e,this}},{key:"build",value:function(){if(0===this._build.alarms.length)throw new Error("Builder error. You must append at least one alarmId with addAlarmId method");return"string"!=typeof this._build.notes&&delete this._build.notes,new a.default(this._ogapi,this._resource,this._build)}}]),e}();r.default=u,t.exports=r.default},{"./Alarm":142}],144:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},a=e("./AlarmActionBuilder"),u=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(e){function t(e){n(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"ATTEND")}return i(t,e),t}(u.default);r.default=s,t.exports=r.default},{"./AlarmActionBuilder":143}],145:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},a=e("./AlarmActionBuilder"),u=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(e){function t(e){n(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"CLOSE")}return i(t,e),t}(u.default);r.default=s,t.exports=r.default},{"./AlarmActionBuilder":143}],146:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../ProvisionGenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"organizations","area","Area/s not found")}return i(t,e),o(t,[{key:"findByOrganizationAndIdentifier",value:function(e,t){return this._checkString(e,"organization"),this._checkString(t,"identifier"),this._organization=e,this._identifier=t,this._execute()}},{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._organization+"/areas/"+this._identifier}},{key:"_checkString",value:function(e,t){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER")}}]),t}(s.default);r.default=c,t.exports=r.default},{"../ProvisionGenericFinder":140}],147:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./TYPE_ENUM"),c=e("../provision/BaseProvision"),l=n(c),f=e("../util/formats/check_types"),d=n(f),h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/organizations/",void 0,["identifier","organization","type","coordinates"])}return o(t,e),a(t,[{key:"_buildURL",value:function(){return"provision/organizations/"+this._organization+"/areas/"+this._identifier}},{key:"withOrganization",value:function(e){return d.default._checkStringAndLength(e,50,"organization"),this._organization=e,this}},{key:"withIdentifier",value:function(e){return d.default._checkStringAndLength(e,50,"identifier"),this._identifier=e,this}},{key:"withName",value:function(e){return d.default._checkStringAndLength(e,50,"name"),this._name=e,this}},{key:"withColor",value:function(e){return d.default._checkStringAndLength(e,50,"color"),this._color=e,this}},{key:"withDescription",value:function(e){return d.default._checkStringAndLength(e,50,"description"),this._description=e,this}},{key:"withOrder",value:function(e){return d.default._checkNumber(e,"order"),this._order=e,this}},{key:"withGeometry",value:function(e,t){return d.default._checkType(e,s.TYPE_ENUM),d.default._checkArray(t,"coordinates"),this._type=e,this._coordinates=t,this}},{key:"withEntities",value:function(e){return d.default._checkArray(e,"entities"),this._entities=e,this}},{key:"_composeElement",value:function(){return this._resource="provision/organizations/"+this._organization+"/areas/",{identifier:this._identifier,name:this._name,description:this._description,order:this._order,color:this._color,geometry:{type:this._type,coordinates:this._coordinates},entities:this._entities}}},{key:"_composeUpdateElement",value:function(){var e=u(Object.getPrototypeOf(t.prototype),"_composeUpdateElement",this).call(this);return delete e.identifier,e}}]),t}(l.default);r.default=h,t.exports=r.default},{"../provision/BaseProvision":235,"../util/formats/check_types":343,"./TYPE_ENUM":148}],148:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["Polygon","Point","LineString"];r.TYPE_ENUM=n},{}],149:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../GenericFinder"),c=n(s),l=e("q"),f=(n(l),e("http-status-codes")),d=(n(f),["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]);r.MIME_TYPES_ENUM=d;var h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"provisionProcessors/provision/organizations","value","Bulk not found")}return o(t,e),a(t,[{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._organization+"/bulk/"+this._id+(this._details?"/details":"")}},{key:"findByOrganizationAndId",value:function(e,t,r){if(this._organization=e,this._id=t,this._details=!1,r){var n="";if(void 0===d.find(function(e){return e==this},r)&&(n=r),""!==n)throw new Error("Parameter mimetype is not allowed. Parameter value <'"+JSON.stringify(n)+"'>, mimetype allowed <'"+JSON.stringify(d)+"'>");return this._details=!0,this._setExtraHeaders({accept:r}),this._download()}return this._details=!1,this._setExtraHeaders({accept:void 0}),this._execute()}}]),t}(c.default);r.default=h},{"../GenericFinder":138,"http-status-codes":76,q:117}],150:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../ProvisionGenericFinder"),c=n(s),l=e("q"),f=(n(l),e("http-status-codes")),d=(n(f),function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"organizations","bulk/async","Bulk not found"),this._raw=!1}return o(t,e),a(t,[{key:"findByOrganizationAndId",value:function(e,t,r,n){return this._organization=e,this._id=t,this._setUrlParameters({format:r}),n&&this._setExtraHeaders({accept:n}),this._download(!0)}},{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._organization+"/"+this._entity+"/"+this._id}}]),t}(c.default));r.default=d,t.exports=r.default},{"../ProvisionGenericFinder":140,"http-status-codes":76,q:117}],151:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["HARDWARE_RESET","SOFTWARE_RESET","COMMS_DOWN","COMMS_UP","COMMS_RESET"];r.ACTION_ENUM=n},{}],152:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../ProvisionGenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"bundles","bundle","Bundle not found")}return i(t,e),o(t,[{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._name+"/versions/"+this._version}},{key:"findByNameAndVersion",value:function(e,t){return this._name=e,this._version=t,this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../ProvisionGenericFinder":140}],153:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./ACTION_ENUM"),c=e("./deployment/DeploymentElement"),l=n(c),f=e("q"),d=n(f),h=e("../provision/BaseProvision"),p=n(h),y=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/bundles")}return o(t,e),a(t,[{key:"withName",value:function(e){if("string"!=typeof e||e.length>255)throw new Error("OGAPI_NAME_PARAMETER_MAX_LENGTH_255");return this._name=e,this}},{key:"withVersion",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"version"});return this._version=e,this}},{key:"withHardware",value:function(e){if("string"!=typeof e)throw new Error("Parameter hardware must be a string");return this._hardware=e,this}},{key:"withWorkgroup",value:function(e){if("string"!=typeof e)throw new Error("Parameter workgroup must be a string");return this._workgroup=e,this}},{key:"withDescription",value:function(e){if("string"!=typeof e||e.length>250)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_250",parameter:"description"});return this._description=e,this}},{key:"withTimeout",value:function(e){if("number"!=typeof e)throw new Error("Parameter ms must be a number");return this._timeout=e,this}},{key:"_checkActions",value:function(e,t){if(void 0===e||e.constructor!==Array)throw new Error("Parameter "+t+" must be typeof Array");for(var r=[],n=0;n<e.length;n++){void 0===s.ACTION_ENUM.find(function(e){return e==this},e[n])&&r.push(e[n])}if(0!==r.length)throw new Error("Any action into parameter "+t+" is not allowed. Parameter value <'"+JSON.stringify(r)+"'>, "+t+" allowed <'"+JSON.stringify(s.ACTION_ENUM)+"'>");return e}},{key:"withPreaction",value:function(e){return this._preaction=this._checkActions(e,"preaction"),this}},{key:"withPostaction",value:function(e){return this._postaction=this._checkActions(e,"postaction"),this}},{key:"withUserNotes",value:function(e){if("string"!=typeof e||e.length>250)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_250",parameter:"notes"});return this._userNotes=e,this}},{key:"withActive",value:function(e){if("boolean"!=typeof e)throw new Error("Parameter active must be a boolean");return this._active=e,this}},{key:"_composeElement",value:function(){if(void 0===this._name||void 0===this._version)throw new Error("Parameters name, version must be defined");return{bundle:{name:this._name||void 0,version:this._version||void 0,hardware:this._hardware||void 0,workgroup:this._workgroup||void 0,description:this._description||void 0,preaction:this._preaction||void 0,postaction:this._postaction||void 0,userNotes:this._userNotes||void 0,active:this._active||void 0}}}},{key:"_buildURL",value:function(){if(void 0===this._name||void 0===this._version)throw new Error("Parameters name, version must be defined");return this._resource+"/"+this._name+"/versions/"+this._version}},{key:"activate",value:function(){var e=d.default.defer(),t=e.promise;return this._ogapi.Napi.put(this._buildURL(),{bundle:{active:!0}},void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(t){200===t.statusCode?e.resolve({statusCode:t.statusCode}):e.reject({errors:[{code:t.statusCode,message:"OGAPI_BUNDLE_NOT_ACTIVE"}],statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}},{key:"deactivate",value:function(){var e=d.default.defer(),t=e.promise;return this._ogapi.Napi.put(this._buildURL(),{bundle:{active:!1}},void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(t){200===t.statusCode?e.resolve({statusCode:t.statusCode}):e.reject({errors:[{code:t.statusCode,message:"OGAPI_BUNDLE_NOT_DEACTIVE"}],statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}},{key:"addDeploymentElement",value:function(e){if(void 0===this._name||void 0===this._version)throw new Error("Parameters name, version must be defined");this._deploymentElements||(this._deploymentElements=[]);var t=new l.default(this._parent,this._ogapi,encodeURI(this._buildURL()),e);return this._deploymentElements.push(t),this._deploymentElements[this._deploymentElements.length-1]}},{key:"deployAndActivate",value:function(){var e=this,t=d.default.defer(),r=t.promise;if(e._deploymentElements&&e._deploymentElements.length>0){var n=0,i=0;for(i=0;i<e._deploymentElements.length;i++){var o=0;if(e._deploymentElements[i]._validators&&e._deploymentElements[i]._validators.length>0)for(o=0;o<e._deploymentElements[i]._validators.length;o++)"TRUSTED_BOOT"===e._deploymentElements[i]._validators[o].mode&&(n+=1)}if(n>1)throw new Error("OGAPI_422_ONE_TRUSTED_BOOT_ALLOWED")}e._allPromisesOk=!0;var a=function(r){201===r.statusCode?function(){var n=r;e._deploymentElements&&e._deploymentElements.length>0?function(){var r=[];e._deploymentElements.forEach(function(e){r.push(e.deploy())}),Promise.all(r).then(function(){e._allPromisesOk&&e.activate().then(function(e,r){t.resolve(n)}).catch(function(e){t.reject(e)})}).catch(function(t){e._allPromisesOk=!1,u(t)})}():t.resolve(n)}():u({statusCode:r.statusCode})},u=function(r){e.delete(),t.reject(r)};return e.create().then(a).catch(u),r}},{key:"create",value:function(){var e=this;if(void 0===this._name||void 0===this._version||void 0===this._hardware||void 0===this._workgroup)throw new Error("Parameters name, version, hardware and workgroup must be defined");var r=d.default.defer(),n=r.promise,i=function(e){201===e.statusCode?r.resolve(e):o({statusCode:e.statusCode})},o=function(e){r.reject(e)};return this._ogapi.newBundleFinder().findByNameAndVersion(this._name,this._version).then(function(n){204===n.statusCode?u(Object.getPrototypeOf(t.prototype),"create",e).call(e).then(i).catch(o):r.reject({errors:[{code:204,message:"OGAPI_400_BUNDLE_EXIST"}],statusCode:400})}).catch(function(n){404===n.statusCode?u(Object.getPrototypeOf(t.prototype),"create",e).call(e).then(i).catch(o):r.reject({errors:[{code:204,message:"OGAPI_400_BUNDLE_EXIST"}],statusCode:400})}),n}},{key:"update",value:function(){var e=d.default.defer(),t=e.promise,r=this._composeElement();return delete r.bundle.name,delete r.bundle.version,delete r.bundle.workgroup,delete r.bundle.hardware,this._ogapi.Napi.put(this._buildURL(),r,void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(t){200===t.statusCode?e.resolve({statusCode:t.statusCode}):e.reject({errors:[{code:t.statusCode,message:"OGAPI_400_BUNDLE_NOT_UPDATED"}],statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}}]),t}(p.default);r.default=y,t.exports=r.default},{"../provision/BaseProvision":235,"./ACTION_ENUM":151,"./deployment/DeploymentElement":154,q:117}],154:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}
23
+ },ie={},oe="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ae="[0-9A-Fa-f]",ue=r(r("%[EFef][0-9A-Fa-f]%"+ae+ae+"%"+ae+ae)+"|"+r("%[89A-Fa-f][0-9A-Fa-f]%"+ae+ae)+"|"+r("%"+ae+ae)),se=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ce=new RegExp(oe,"g"),le=new RegExp(ue,"g"),fe=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',se),"g"),de=new RegExp(t("[^]",oe,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),he=de,pe={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,o={},a=r.query.split("&"),u=0,s=a.length;u<s;++u){var c=a[u].split("=");switch(c[0]){case"to":for(var l=c[1].split(","),f=0,d=l.length;f<d;++f)n.push(l[f]);break;case"subject":r.subject=D(c[1],t);break;case"body":r.body=D(c[1],t);break;default:i=!0,o[D(c[0],t)]=D(c[1],t)}}i&&(r.headers=o)}r.query=void 0;for(var h=0,p=n.length;h<p;++h){var y=n[h].split("@");if(y[0]=D(y[0]),t.unicodeSupport)y[1]=D(y[1],t).toLowerCase();else try{y[1]=$.toASCII(D(y[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[h]=y.join("@")}return r},serialize:function(e,t){var r=e,n=o(e.to);if(n){for(var a=0,u=n.length;a<u;++a){var s=String(n[a]),c=s.lastIndexOf("@"),l=s.slice(0,c).replace(le,C).replace(le,i).replace(fe,d),f=s.slice(c+1);try{f=t.iri?$.toUnicode(f):$.toASCII(D(f,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[a]=l+"@"+f}r.path=n.join(",")}var h=e.headers=e.headers||{};e.subject&&(h.subject=e.subject),e.body&&(h.body=e.body);var p=[];for(var y in h)h[y]!==ie[y]&&p.push(y.replace(le,C).replace(le,i).replace(de,d)+"="+h[y].replace(le,C).replace(le,i).replace(he,d));return p.length&&(r.query=p.join("&")),r}},ye=/^([^\:]+)\:(.*)/,me={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(ye),n=e;if(r){var i=t.scheme||n.scheme||"urn",o=r[1].toLowerCase(),a=r[2],u=i+":"+(t.nid||o),s=K[u];n.nid=o,n.nss=a,n.path=void 0,s&&(n=s.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),o=K[i];o&&(e=o.serialize(e,t));var a=e,u=e.nss;return a.path=(n||t.nid)+":"+u,a}},ve=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,_e={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(ve)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};K[re.scheme]=re,K[ne.scheme]=ne,K[pe.scheme]=pe,K[me.scheme]=me,K[_e.scheme]=_e,e.SCHEMES=K,e.pctEncChar=d,e.pctDecChars=h,e.parse=_,e.removeDotSegments=b,e.serialize=w,e.resolveComponents=E,e.resolve=A,e.normalize=O,e.equal=S,e.escapeComponent=P,e.unescapeComponent=D,Object.defineProperty(e,"__esModule",{value:!0})})},{}],135:[function(e,t,r){(function(r){"use strict";function n(e){return!e||("utf8"===(e=e.toLowerCase())||"utf-8"===e)}function i(e,t){if(n(t))return encodeURIComponent(e);for(var r=h.encode(e,t),i="",o="",a=0;a<r.length;a++)o=r[a].toString("16"),1===o.length&&(o="0"+o),i+="%"+o;return i=i.toUpperCase()}function o(e,t){if(n(t))return decodeURIComponent(e);for(var i=[],o=0;o<e.length;)"%"===e[o]?(o++,i.push(parseInt(e.substring(o,o+2),16)),o+=2):(i.push(e.charCodeAt(o)),o++);var a=new r(i);return h.decode(a,t)}function a(e,t,r,n){"object"==typeof t&&(n=t,t=null),t=t||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var a=/\+/g;e=e.split(t);var s=1e3,c=null;n&&("number"==typeof n.maxKeys&&(s=n.maxKeys),"string"==typeof n.charset&&(c=n.charset));var l=e.length;s>0&&l>s&&(l=s);for(var f=0;f<l;++f){var d,h,p,y,m=e[f].replace(a,"%20"),v=m.indexOf(r);if(v>=0?(d=m.substr(0,v),h=m.substr(v+1)):(d=m,h=""),d&&d.indexOf("%")>=0)try{p=o(d,c)}catch(e){p=d}else p=d;if(h&&h.indexOf("%")>=0)try{y=o(h,c)}catch(e){y=h}else y=h;u(i,p)?Array.isArray(i[p])?i[p].push(y):i[p]=[i[p],y]:i[p]=y}return i}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){return/^[\x00-\x7F]*$/.test(e)}function c(e,t){return e=String(e),e=s(e)?encodeURIComponent(e):i(e,t)}function l(e,t,r){if(!t)throw new TypeError("stringify expects an object");return t+"="+c(e,r.charset)}function f(e,t,r){var n=[];if(!t)throw new TypeError("stringify expects an object");for(var i=0;i<e.length;i++)n.push(p(e[i],t+"["+i+"]",r));return n.join("&")}function d(e,t,r){for(var n,o=[],a=Object.keys(e),u=r.charset,s=0,l=a.length;s<l;++s)""!==(n=a[s])&&(null===e[n]?o.push(i(n,u)+"="):o.push(p(e[n],t?t+"["+c(n,u)+"]":c(n,u),r)));return o.join("&")}var h=e("iconv-lite"),p=function(e,t,r){"string"!=typeof t&&(r=t||{},t=null);var n=r.charset||"utf-8";return Array.isArray(e)?f(e,t,r):"[object Object]"==={}.toString.call(e)?d(e,t,r):"string"==typeof e?l(e,t,r):t+"="+c(String(e),n)};t.exports=i,t.exports.encode=i,t.exports.decode=o,t.exports.parse=a,t.exports.stringify=p}).call(this,e("buffer").Buffer)},{buffer:52,"iconv-lite":96}],136:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("q"),c=n(s),l=e("../provision/BaseProvision"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/ai",void 0,["organization","file"],"north/ai"),this._ogapi=e}return o(t,e),a(t,[{key:"_buildURL",value:function(){return this._organization+"/models/"+this._identifier}},{key:"withIdentifier",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"identifier"});return this._identifier=e,this}},{key:"withOrganization",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"organization"});return this._organization=e,this}},{key:"withFile",value:function(e){this._file=e}},{key:"_composeElement",value:function(){return this._checkRequiredParameters(),this._resource=this._organization+"/models",{modelFile:this._file||void 0}}},{key:"_composeUpdateElement",value:function(){return u(Object.getPrototypeOf(t.prototype),"_composeUpdateElement",this).call(this)}},{key:"prediction",value:function(e){var t=c.default.defer(),r=t.promise;return this._ogapi.Napi.post(this._buildURL()+"/prediction",e,this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(e){t.resolve({statusCode:e.statusCode,body:e.body})}).catch(function(e){t.reject(e)}),r}},{key:"create",value:function(){var e=this._composeElement(),t=c.default.defer();return this._ogapi.Napi.post_multipart(this._resource,{modelFile:e.modelFile},{},this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(e){switch(e.statusCode){case 200:var r=""!=e.text?JSON.parse(e.text):{},n=e.status;t.resolve({data:r,statusCode:n});break;case 201:var n=e.status,i=e.header&&e.header.location;t.resolve({location:i,statusCode:n});break;case 204:t.resolve(e);break;default:t.reject({errors:e.data.errors,statusCode:e.statusCode})}}).catch(function(e){t.reject(e)}),t.promise}},{key:"update",value:function(){var e=this._composeElement(),t=c.default.defer();return this._ogapi.Napi.put_multipart(this._buildURL(),{modelFile:e.modelFile},{},this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(e){switch(e.statusCode){case 200:var r=""!=e.text?JSON.parse(e.text):{},n=e.status;t.resolve({data:r,statusCode:n});break;default:t.reject({errors:e.data.errors,statusCode:e.statusCode})}}).catch(function(e){t.reject(e)}),t.promise}}]),t}(f.default);r.default=d,t.exports=r.default},{"../provision/BaseProvision":235,q:117}],137:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../GenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"ai","list","AIModel not found","north")}return i(t,e),o(t,[{key:"findByOrganization",value:function(e){return this._organization=e,this._execute()}},{key:"findByOrganizationAndIdentifier",value:function(e,t){return this._organization=e,this._identifier=t,this._execute()}},{key:"downloadByOrganizationAndIdentifier",value:function(e,t){return this._organization=e,this._identifier=t,this._filename=!0,this._download()}},{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._organization+"/models"+(this._identifier?"/"+this._identifier+(this._filename?"/file":""):"")}}]),t}(s.default);r.default=c,t.exports=r.default},{"../GenericFinder":138}],138:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=e("q"),u=n(a),s=e("http-status-codes"),c=n(s),l=function(){function e(t,r,n,o,a){i(this,e),this._api=t.Napi,this._baseUrl=r,this._entity=n,this._error_not_found=o,this._id=void 0,this._headers=void 0,this._urlParameters=void 0,this._serviceBaseURL=a}return o(e,[{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._id}},{key:"_withId",value:function(e){return this._id=e,this}},{key:"_getExtraHeaders",value:function(){return this._headers}},{key:"_setExtraHeaders",value:function(e){if(this._headers)for(var t=Object.keys(e),r=0;r<t.length;r++){var n=t[r];this._headers[n]=e[n]}else this._headers=e}},{key:"_getUrlParameters",value:function(){return this._urlParameters}},{key:"_setUrlParameters",value:function(e){if(this.parameters)for(var t=Object.keys(e),r=0;r<t.length;r++){var n=t[r];this._urlParameters[n]=e[n]}else this._urlParameters=e}},{key:"_execute",value:function(){var e=u.default.defer(),t=e.promise,r=this._entity,n=this._error_not_found;return this._api.get(this._composeUrl(),void 0,this._getExtraHeaders(),this._getUrlParameters(),!1,this._getServiceBaseURL()).then(function(t){if(204===t.statusCode)e.reject({error:n,statusCode:c.default.NOT_FOUND});else{var i=t.body[r]&&t.body.provision?t.body:t.body[r];e.resolve({data:i||t.body,statusCode:t.statusCode})}}).catch(function(t){400===t.statusCode&&(t.statusCode=c.default.NOT_FOUND),e.reject(t)}),t}},{key:"_downloadUrl",value:function(){return this._composeUrl()}},{key:"_download",value:function(e){var t=u.default.defer(),r=t.promise,n=this._error_not_found;return this._api.get(this._downloadUrl(),void 0,this._getExtraHeaders(),this._getUrlParameters(),!e,this._getServiceBaseURL()).then(function(e){204===e.statusCode?t.reject({data:n,statusCode:c.default.NOT_FOUND}):t.resolve({data:e,statusCode:e.statusCode})}).catch(function(e){t.reject(e)}),r}},{key:"_getServiceBaseURL",value:function(){return this._serviceBaseURL}}]),e}();r.default=l,t.exports=r.default},{"http-status-codes":76,q:117}],139:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=e("./operations/Operations"),u=n(a),s=e("./users/UserFinder"),c=n(s),l=e("./geocluster/GeoclusterFinder"),f=n(l),d=e("./geocluster/Geocluster"),h=n(d),p=e("./security/Certificates"),y=n(p),m=e("./users/Users"),v=n(m),_=e("./organizations/OrganizationFinder"),g=n(_),b=e("./channels/ChannelFinder"),w=n(b),E=e("./searching/builder/AreasSearchBuilder"),A=n(E),O=e("./searching/builder/DatasetsCatalogSearchBuilder"),S=n(O),P=e("./areas/AreaFinder"),D=n(P),C=e("./searching/builder/BulkSearchBuilder"),k=n(C),T=e("./searching/builder/BulkExecutionSearchBuilder"),F=n(T),j=e("./bulk/BulkFinder"),x=n(j),B=e("./bulk/BulkExecutionFinder"),M=n(B),R=e("./channels/Channels"),I=n(R),N=e("./areas/Areas"),U=n(N),L=e("./datasets/Datasets"),z=n(L),G=e("./timeseries/Timeseries"),q=n(G),V=e("./searching/builder/ChannelsSearchBuilder"),H=n(V),W=e("./rulesConfiguration/RuleConfigurations"),Y=n(W),$=e("./rulesConfiguration/RuleConfigurationsFinder"),K=n($),J=e("./rulesConfiguration/RuleConfigurationsCatalog"),Q=n(J),X=e("./rulesConfiguration/RuleConfigurationsHelper"),Z=n(X),ee=e("./datasets/DatasetFinder"),te=n(ee),re=e("./timeseries/TimeseriesFinder"),ne=n(re),ie=e("./operationTypes/OperationType"),oe=n(ie),ae=e("./operationTypes/OperationTypeFinder"),ue=n(ae),se=e("./operationTypes/OperationTypeCatalog"),ce=n(se),le=e("./security/CertificateFinder"),fe=n(le),de=e("./operations/OperationFinder"),he=n(de),pe=e("./searching/FilterBuilder"),ye=n(pe),me=e("./searching/SelectBuilder"),ve=n(me),_e=e("./operations/OperationActions"),ge=n(_e),be=e("./operations/PeriodicityActions"),we=n(be),Ee=e("./util/Expression"),Ae=n(Ee),Oe=e("./util/SelectElement"),Se=n(Oe),Pe=e("./searching/builder/RawSearchBuilder"),De=n(Pe),Ce=e("./searching/builder/DevicesSearchBuilder"),ke=n(Ce),Te=e("./searching/builder/SubscribersSearchBuilder"),Fe=n(Te),je=e("./searching/builder/SubscriptionsSearchBuilder"),xe=n(je),Be=e("./searching/builder/AssetsSearchBuilder"),Me=n(Be),Re=e("./searching/builder/TicketsSearchBuilder"),Ie=n(Re),Ne=e("./searching/builder/TasksSearchBuilder"),Ue=n(Ne),Le=e("./searching/builder/OperationsSearchBuilder"),ze=n(Le),Ge=e("./searching/builder/ExecutionsSearchBuilder"),qe=n(Ge),Ve=e("./searching/builder/ExecutionsHistorySearchBuilder"),He=n(Ve),We=e("./searching/builder/AlarmsSearchBuilder"),Ye=n(We),$e=e("./searching/builder/DatamodelsSearchBuilder"),Ke=n($e),Je=e("./searching/builder/FeedsSearchBuilder"),Qe=n(Je),Xe=e("./searching/builder/DatastreamsSearchBuilder"),Ze=n(Xe),et=e("./searching/builder/DatapointsSearchBuilder"),tt=n(et),rt=e("./searching/builder/BundlesSearchBuilder"),nt=n(rt),it=e("./searching/builder/CertificatesSearchBuilder"),ot=n(it),at=e("./searching/builder/HardwaresSearchBuilder"),ut=n(at),st=e("./searching/builder/SoftwaresSearchBuilder"),ct=n(st),lt=e("./searching/builder/OperationalStatusSearchBuilder"),ft=n(lt),dt=e("./searching/builder/ServiceGroupSearchBuilder"),ht=n(dt),pt=e("./searching/builder/AdministrativeStateSearchBuilder"),yt=n(pt),mt=e("./searching/builder/CommunicationsModuleTypeSearchBuilder"),vt=n(mt),_t=e("./searching/builder/FieldsDefinitionSearchBuilder"),gt=n(_t),bt=e("./searching/builder/BasicTypesSearchBuilder"),wt=n(bt),Et=e("./searching/builder/MobilePhoneProviderSearchBuilder"),At=n(Et),Ot=e("./searching/builder/IoTDatastreamPeriodSearchBuilder"),St=n(Ot),Pt=e("./searching/builder/ResourceTypeSearchBuilder"),Dt=n(Pt),Ct=e("./searching/builder/AllowedResourceTypeSearchBuilder"),kt=n(Ct),Tt=e("./searching/builder/IoTDatastreamAccessSearchBuilder"),Ft=n(Tt),jt=e("./searching/builder/IoTDatastreamStoragePeriodSearchBuilder"),xt=n(jt),Bt=e("./searching/builder/TicketSeveritySearchBuilder"),Mt=n(Bt),Rt=e("./searching/builder/TicketPrioritySearchBuilder"),It=n(Rt),Nt=e("./searching/builder/TicketStatusSearchBuilder"),Ut=n(Nt),Lt=e("./searching/builder/RulesSearchBuilder"),zt=n(Lt),Gt=e("./searching/builder/OperationTypesSearchBuilder"),qt=n(Gt),Vt=e("./searching/builder/UsersSearchBuilder"),Ht=n(Vt),Wt=e("./searching/builder/DomainsSearchBuilder"),Yt=n(Wt),$t=e("./searching/builder/PlansSearchBuilder"),Kt=n($t),Jt=e("./searching/builder/DevicesPlansSearchBuilder"),Qt=n(Jt),Xt=e("./bundles/Bundles"),Zt=n(Xt),er=e("./bundles/BundleFinder"),tr=n(er),rr=e("./organizations/Organizations"),nr=n(rr),ir=e("./domains/Domains"),or=n(ir),ar=e("./domains/DomainsFinder"),ur=n(ar),sr=e("./entities/DeviceFinder"),cr=n(sr),lr=e("./entities/TicketFinder"),fr=n(lr),dr=e("./entities/SubscriptionsFinder"),hr=n(dr),pr=e("./entities/SubscribersFinder"),yr=n(pr),mr=e("./collection/devices/DeviceMessage"),vr=n(mr),_r=e("./collection/devices/collect/Datastreams"),gr=n(_r),br=e("./collection/devices/collect/Datapoint"),wr=n(br),Er=e("./collection/devices/collect/Hardware"),Ar=n(Er),Or=e("./collection/devices/collect/Software"),Sr=n(Or),Pr=e("./collection/devices/collect/Storage"),Dr=n(Pr),Cr=e("./collection/devices/collect/Usage"),kr=n(Cr),Tr=e("./collection/devices/collect/PowerSupply"),Fr=n(Tr),jr=e("./collection/devices/collect/CommsModuleMessage"),xr=n(jr),Br=e("./collection/devices/collect/Mobile"),Mr=n(Br),Rr=e("./collection/devices/collect/Subscriber"),Ir=n(Rr),Nr=e("./collection/devices/collect/Subscription"),Ur=n(Nr),Lr=e("./workgroups/WorkgroupRelations"),zr=n(Lr),Gr=e("./workgroups/Workgroups"),qr=n(Gr),Vr=e("./workgroups/WorkgroupFinder"),Hr=n(Vr),Wr=e("./searching/builder/WorkgroupsSearchBuilder"),Yr=n(Wr),$r=e("./workgroups/WorkgroupRelationsFinder"),Kr=n($r),Jr=e("./searching/builder/UserProfilesSearchBuilder"),Qr=n(Jr),Xr=e("./iot/datamodels/Datamodels"),Zr=n(Xr),en=e("./iot/datamodels/DatamodelsHelper"),tn=n(en),rn=e("./iot/datamodels/DatamodelsFinder"),nn=n(rn),on=e("./iot/catalog/Datastream"),an=n(on),un=e("./iot/catalog/Qrating"),sn=n(un),cn=e("./provision/entities/EntityBuilder"),ln=n(cn),fn=e("./provision/bulk/BulkExecutionBuilder"),dn=n(fn),hn=e("./searching/builder/EntitiesSearchBuilder"),pn=n(hn),yn=e("./searching/builder/DatasetEntitiesSearchBuilder"),mn=n(yn),vn=e("./searching/builder/DatasetSearchBuilder"),_n=n(vn),gn=e("./searching/builder/TimeserieSearchBuilder"),bn=n(gn),wn=e("./searching/builder/CountryCodesSearchBuilder"),En=n(wn),An=e("./searching/builder/TimezoneSearchBuilder"),On=n(An),Sn=e("./searching/builder/UserLanguagesSearchBuilder"),Pn=n(Sn),Dn=e("./provisionProcessors/provisionProcessors"),Cn=n(Dn),kn=e("./provisionProcessors/provisionProcessorsFinder"),Tn=n(kn),Fn=e("./entities/EntityFinder"),jn=n(Fn),xn=e("./alarms/AlarmActions"),Bn=n(xn),Mn=e("superagent"),Rn=n(Mn),In=e("./connectorsFunctionsConfiguration/ConnectorFunctionsHelper"),Nn=n(In),Un=e("./connectorsFunctionsConfiguration/ConnectorFunctionsFinder"),Ln=n(Un),zn=e("./connectorsFunctionsConfiguration/ConnectorFunctions"),Gn=n(zn),qn=e("./pipelines/PipelineFinder"),Vn=n(qn),Hn=e("./transformers/TransformerFinder"),Wn=n(Hn),Yn=e("./AIModels/AIModelsFinder"),$n=n(Yn),Kn=e("./transformers/Transformers"),Jn=n(Kn),Qn=e("./AIModels/AIModels"),Xn=n(Qn),Zn=e("./pipelines/Pipelines"),ei=n(Zn),ti=e("./manufacturers/Manufacturer"),ri=n(ti),ni=e("./manufacturers/Model"),ii=n(ni),oi=e("./manufacturers/ManufacturerFinder"),ai=n(oi),ui=e("./manufacturers/ModelFinder"),si=n(ui),ci=e("./provision/country/CountriesCatalog"),li=n(ci),fi=function(){var e=void 0,t=Rn.default.Request.prototype.end;return Rn.default.Request.prototype.end=function(r){return e&&e.call&&e(this),t.call(this,function(e,t){"function"==typeof r&&r(e,t)})},function(t){e=t}}(),di=function(){function e(t,r,n){if(i(this,e),this.constructor===e)throw new Error("Cannot construct Abstract instances directly");if("object"!=typeof t)throw new Error("Must instance mandatory parameter: northAmpliaREST");if("object"!=typeof r)throw new Error("Must instance mandatory parameter: southAmpliaREST");n.hooks&&n.hooks.beforeStart&&"function"==typeof n.hooks.beforeStart&&fi(n.hooks.beforeStart),this.Napi=t,this.Sapi=r,this.EX=Ae.default,this.SE=Se.default,this.operations=new u.default(this),this.alarms=new Bn.default(this),this.entityBuilder=new ln.default(this)}return o(e,[{key:"newUserFinder",value:function(){return new c.default(this)}},{key:"newGeoclusterFinder",value:function(){return new f.default(this)}},{key:"geoclusterBuilder",value:function(){return new h.default(this)}},{key:"newOrganizationFinder",value:function(){return new g.default(this)}},{key:"newChannelFinder",value:function(){return new w.default(this)}},{key:"areasSearchBuilder",value:function(){return new A.default(this)}},{key:"datasetsCatalogSearchBuilder",value:function(){return new S.default(this)}},{key:"bulkSearchBuilder",value:function(){return new k.default(this)}},{key:"bulkExecutionSearchBuilder",value:function(){return new F.default(this)}},{key:"newBulkFinder",value:function(){return new x.default(this)}},{key:"newBulkExecutionFinder",value:function(){return new M.default(this)}},{key:"newAreaFinder",value:function(){return new D.default(this)}},{key:"newOperationFinder",value:function(){return new he.default(this)}},{key:"newOperationTypeFinder",value:function(){return new ue.default(this)}},{key:"newOperationTypeCatalog",value:function(){return new ce.default(this)}},{key:"newCountriesCatalog",value:function(){return new li.default(this)}},{key:"operationTypeBuilder",value:function(e,t,r){return new oe.default(this,e,t,r)}},{key:"newRuleConfigurationsFinder",value:function(){return new K.default(this)}},{key:"newRuleConfigurationsHelper",value:function(){return new Z.default(this)}},{key:"newDatasetFinder",value:function(){return new te.default(this)}},{key:"newTimeserieFinder",value:function(){return new ne.default(this)}},{key:"newRuleConfigurationsCatalog",value:function(){return new Q.default(this)}},{key:"ruleConfigurationBuilder",value:function(e,t,r,n){return new Y.default(this,e,t,r,n)}},{key:"newCertificateFinder",value:function(){return new fe.default(this)}},{key:"newDeviceFinder",value:function(){return new cr.default(this)}},{key:"newTicketFinder",value:function(){return new fr.default(this)}},{key:"newSubscriptionsFinder",value:function(){return new hr.default(this)}},{key:"newSubscribersFinder",value:function(){return new yr.default(this)}},{key:"newEntityFinder",value:function(){return new jn.default(this)}},{key:"newFilterBuilder",value:function(){return new ye.default}},{key:"newSelectBuilder",value:function(){return new ve.default}},{key:"rawSearchBuilder",value:function(){return new De.default(this)}},{key:"usersSearchBuilder",value:function(){return new Ht.default(this)}},{key:"domainsSearchBuilder",value:function(){return new Yt.default(this)}},{key:"devicesSearchBuilder",value:function(){return new ke.default(this)}},{key:"assetsSearchBuilder",value:function(){return new Me.default(this)}},{key:"subscribersSearchBuilder",value:function(){return new Fe.default(this)}},{key:"subscriptionsSearchBuilder",value:function(){return new xe.default(this)}},{key:"ticketsSearchBuilder",value:function(){return new Ie.default(this)}},{key:"communicationsModuleTypeSearchBuilder",value:function(){return new vt.default(this)}},{key:"fieldsDefinitionSearchBuilder",value:function(){return new gt.default(this)}},{key:"mobilePhoneProviderSearchBuilder",value:function(){return new At.default(this)}},{key:"ioTDatastreamPeriodSearchBuilder",value:function(){return new St.default(this)}},{key:"resourceTypeSearchBuilder",value:function(){return new Dt.default(this)}},{key:"allowedResourceTypeSearchBuilder",value:function(){return new kt.default(this)}},{key:"ioTDatastreamAccessSearchBuilder",value:function(){return new Ft.default(this)}},{key:"ioTDatastreamStoragePeriodSearchBuilder",value:function(){return new xt.default(this)}},{key:"ticketSeveritySearchBuilder",value:function(){return new Mt.default(this)}},{key:"ticketPrioritySearchBuilder",value:function(){return new It.default(this)}},{key:"ticketStatusSearchBuilder",value:function(){return new Ut.default(this)}},{key:"rulesSearchBuilder",value:function(){return new zt.default(this)}},{key:"operationTypesSearchBuilder",value:function(){return new qt.default(this)}},{key:"tasksSearchBuilder",value:function(){return new Ue.default(this)}},{key:"operationsSearchBuilder",value:function(){return new ze.default(this)}},{key:"executionsSearchBuilder",value:function(){return new qe.default(this)}},{key:"executionsHistorySearchBuilder",value:function(){return new He.default(this)}},{key:"alarmsSearchBuilder",value:function(){return new Ye.default(this)}},{key:"datastreamsSearchBuilder",value:function(){return new Ze.default(this)}},{key:"datamodelsSearchBuilder",value:function(){return new Ke.default(this)}},{key:"feedsSearchBuilder",value:function(){return new Qe.default(this)}},{key:"datapointsSearchBuilder",value:function(){return new tt.default(this)}},{key:"bundlesSearchBuilder",value:function(){return new nt.default(this)}},{key:"certificatesSearchBuilder",value:function(){return new ot.default(this)}},{key:"basicTypesSearchBuilder",value:function(){return new wt.default(this)}},{key:"entitiesSearchBuilder",value:function(){return new pn.default(this)}},{key:"datasetEntitiesSearchBuilder",value:function(e,t){return new mn.default(this,e,t)}},{key:"datasetSearchBuilder",value:function(e,t){return new _n.default(this,e,t)}},{key:"timeserieSearchBuilder",value:function(e,t){return new bn.default(this,e,t)}},{key:"plansSearchBuilder",value:function(){return new Kt.default(this)}},{key:"devicesPlansSearchBuilder",value:function(){return new Qt.default(this)}},{key:"bundlesBuilder",value:function(){return new Zt.default(this)}},{key:"newBundleFinder",value:function(){return new tr.default(this)}},{key:"organizationsBuilder",value:function(){return new nr.default(this)}},{key:"domainsBuilder",value:function(){return new or.default(this)}},{key:"newDomainFinder",value:function(){return new ur.default(this)}},{key:"usersBuilder",value:function(){return new v.default(this)}},{key:"certificatesBuilder",value:function(){return new y.default(this)}},{key:"hardwaresSearchBuilder",value:function(){return new ut.default(this)}},{key:"softwaresSearchBuilder",value:function(){return new ct.default(this)}},{key:"operationalStatusSearchBuilder",value:function(){return new ft.default(this)}},{key:"serviceGroupSearchBuilder",value:function(){return new ht.default(this)}},{key:"administrativeStateSearchBuilder",value:function(){return new yt.default(this)}},{key:"deviceMessageBuilder",value:function(){return new vr.default(this)}},{key:"datastreamBuilder",value:function(){return new gr.default(this)}},{key:"datapointsBuilder",value:function(){return new wr.default(this)}},{key:"hardwareMessageBuilder",value:function(){return new Ar.default(this)}},{key:"softwareMessageBuilder",value:function(){return new Sr.default(this)}},{key:"storageMessageBuilder",value:function(){return new Dr.default(this)}},{key:"usageMessageBuilder",value:function(){return new kr.default(this)}},{key:"powerSupplyMessageBuilder",value:function(){return new Fr.default(this)}},{key:"commsModuleMessageMessageBuilder",value:function(){return new xr.default(this)}},{key:"subscriberMessageBuilder",value:function(){return new Ir.default(this)}},{key:"subscriptionMessageBuilder",value:function(){return new Ur.default(this)}},{key:"mobileMessageMessageBuilder",value:function(){return new Mr.default(this)}},{key:"newOperationActions",value:function(e){return new ge.default(this,e)}},{key:"newPeriodicityActions",value:function(e){return new we.default(this,e)}},{key:"workgroupRelationsBuilder",value:function(){return new zr.default(this)}},{key:"newWorkgroupRelationsFinder",value:function(){return new Kr.default(this)}},{key:"workgroupsBuilder",value:function(){return new qr.default(this)}},{key:"newWorkgroupFinder",value:function(){return new Hr.default(this)}},{key:"workgroupsSearchBuilder",value:function(){return new Yr.default(this)}},{key:"channelsBuilder",value:function(){return new I.default(this)}},{key:"areasBuilder",value:function(){return new U.default(this)}},{key:"datasetsBuilder",value:function(){return new z.default(this)}},{key:"timeseriesBuilder",value:function(){return new q.default(this)}},{key:"channelsSearchBuilder",value:function(){return new H.default(this)}},{key:"userProfilesSearchBuilder",value:function(){return new Qr.default(this)}},{key:"datamodelsBuilder",value:function(e){return new Zr.default(this,e)}},{key:"datamodelsHelper",value:function(e,t){return new tn.default(this,e,t)}},{key:"newDatamodelsFinder",value:function(){return new nn.default(this)}},{key:"datastreamsBuilder",value:function(){return new an.default(this)}},{key:"bulkExecutionBuilder",value:function(e,t,r){return new dn.default(this,e,t,r)}},{key:"qratingsBuilder",value:function(){return new sn.default(this)}},{key:"countryCodesSearchBuilder",value:function(){return new En.default(this)}},{key:"timezoneSearchBuilder",value:function(){return new On.default(this)}},{key:"userLanguagesSearchBuilder",value:function(){return new Pn.default(this)}},{key:"newConnectorFunctionsFinder",value:function(){return new Ln.default(this)}},{key:"newConnectorFunctionsHelper",value:function(){return new Nn.default(this)}},{key:"connectorFunctionsBuilder",value:function(e,t,r,n){return new Gn.default(this,e,t,r,n)}},{key:"provisionProcessorsBuilder",value:function(){return new Cn.default(this)}},{key:"newProvisionProcessorsFinder",value:function(){return new Tn.default(this)}},{key:"newPipelineFinder",value:function(){return new Vn.default(this)}},{key:"newTransformerFinder",value:function(){return new Wn.default(this)}},{key:"newAIModelFinder",value:function(){return new $n.default(this)}},{key:"transformersBuilder",value:function(){return new Jn.default(this)}},{key:"aiModelsBuilder",value:function(){return new Xn.default(this)}},{key:"pipelinesBuilder",value:function(){return new ei.default(this)}},{key:"manufacturersBuilder",value:function(){return new ri.default(this)}},{key:"manufacturerModelsBuilder",value:function(){return new ii.default(this)}},{key:"newManufacturersFinder",value:function(){return new ai.default(this)}},{key:"newModelFinder",value:function(){return new si.default(this)}}]),e}();r.default=di,t.exports=r.default},{"./AIModels/AIModels":136,"./AIModels/AIModelsFinder":137,"./alarms/AlarmActions":141,"./areas/AreaFinder":146,
24
+ "./areas/Areas":147,"./bulk/BulkExecutionFinder":149,"./bulk/BulkFinder":150,"./bundles/BundleFinder":152,"./bundles/Bundles":153,"./channels/ChannelFinder":160,"./channels/Channels":161,"./collection/devices/DeviceMessage":162,"./collection/devices/collect/CommsModuleMessage":163,"./collection/devices/collect/Datapoint":164,"./collection/devices/collect/Datastreams":165,"./collection/devices/collect/Hardware":167,"./collection/devices/collect/Mobile":168,"./collection/devices/collect/PowerSupply":169,"./collection/devices/collect/Software":170,"./collection/devices/collect/Storage":171,"./collection/devices/collect/Subscriber":172,"./collection/devices/collect/Subscription":173,"./collection/devices/collect/Usage":174,"./connectorsFunctionsConfiguration/ConnectorFunctions":183,"./connectorsFunctionsConfiguration/ConnectorFunctionsFinder":184,"./connectorsFunctionsConfiguration/ConnectorFunctionsHelper":185,"./datasets/DatasetFinder":187,"./datasets/Datasets":188,"./domains/Domains":189,"./domains/DomainsFinder":190,"./entities/DeviceFinder":191,"./entities/EntityFinder":192,"./entities/SubscribersFinder":193,"./entities/SubscriptionsFinder":194,"./entities/TicketFinder":195,"./geocluster/Geocluster":196,"./geocluster/GeoclusterFinder":197,"./iot/catalog/Datastream":199,"./iot/catalog/Qrating":200,"./iot/datamodels/Datamodels":201,"./iot/datamodels/DatamodelsFinder":202,"./iot/datamodels/DatamodelsHelper":203,"./manufacturers/Manufacturer":204,"./manufacturers/ManufacturerFinder":205,"./manufacturers/Model":207,"./manufacturers/ModelFinder":208,"./operationTypes/OperationType":210,"./operationTypes/OperationTypeCatalog":211,"./operationTypes/OperationTypeFinder":212,"./operations/OperationActions":213,"./operations/OperationFinder":214,"./operations/Operations":215,"./operations/PeriodicityActions":216,"./organizations/OrganizationFinder":231,"./organizations/Organizations":232,"./pipelines/PipelineFinder":233,"./pipelines/Pipelines":234,"./provision/bulk/BulkExecutionBuilder":236,"./provision/country/CountriesCatalog":237,"./provision/entities/EntityBuilder":243,"./provisionProcessors/provisionProcessors":250,"./provisionProcessors/provisionProcessorsFinder":251,"./rulesConfiguration/RuleConfigurations":252,"./rulesConfiguration/RuleConfigurationsCatalog":253,"./rulesConfiguration/RuleConfigurationsFinder":254,"./rulesConfiguration/RuleConfigurationsHelper":255,"./searching/FilterBuilder":262,"./searching/SelectBuilder":265,"./searching/builder/AdministrativeStateSearchBuilder":268,"./searching/builder/AlarmsSearchBuilder":269,"./searching/builder/AllowedResourceTypeSearchBuilder":270,"./searching/builder/AreasSearchBuilder":271,"./searching/builder/AssetsSearchBuilder":272,"./searching/builder/BasicTypesSearchBuilder":273,"./searching/builder/BulkExecutionSearchBuilder":274,"./searching/builder/BulkSearchBuilder":275,"./searching/builder/BundlesSearchBuilder":276,"./searching/builder/CertificatesSearchBuilder":277,"./searching/builder/ChannelsSearchBuilder":278,"./searching/builder/CommunicationsModuleTypeSearchBuilder":279,"./searching/builder/CountryCodesSearchBuilder":280,"./searching/builder/DatamodelsSearchBuilder":281,"./searching/builder/DatapointsSearchBuilder":282,"./searching/builder/DatasetEntitiesSearchBuilder":283,"./searching/builder/DatasetSearchBuilder":284,"./searching/builder/DatasetsCatalogSearchBuilder":285,"./searching/builder/DatastreamsSearchBuilder":286,"./searching/builder/DevicesPlansSearchBuilder":287,"./searching/builder/DevicesSearchBuilder":288,"./searching/builder/DomainsSearchBuilder":289,"./searching/builder/EntitiesSearchBuilder":290,"./searching/builder/ExecutionsHistorySearchBuilder":291,"./searching/builder/ExecutionsSearchBuilder":292,"./searching/builder/FeedsSearchBuilder":293,"./searching/builder/FieldsDefinitionSearchBuilder":294,"./searching/builder/HardwaresSearchBuilder":296,"./searching/builder/IoTDatastreamAccessSearchBuilder":297,"./searching/builder/IoTDatastreamPeriodSearchBuilder":298,"./searching/builder/IoTDatastreamStoragePeriodSearchBuilder":299,"./searching/builder/MobilePhoneProviderSearchBuilder":300,"./searching/builder/OperationTypesSearchBuilder":301,"./searching/builder/OperationalStatusSearchBuilder":302,"./searching/builder/OperationsSearchBuilder":303,"./searching/builder/PlansSearchBuilder":304,"./searching/builder/RawSearchBuilder":306,"./searching/builder/ResourceTypeSearchBuilder":307,"./searching/builder/RulesSearchBuilder":308,"./searching/builder/ServiceGroupSearchBuilder":311,"./searching/builder/SoftwaresSearchBuilder":312,"./searching/builder/SubscribersSearchBuilder":313,"./searching/builder/SubscriptionsSearchBuilder":314,"./searching/builder/TasksSearchBuilder":315,"./searching/builder/TicketPrioritySearchBuilder":316,"./searching/builder/TicketSeveritySearchBuilder":317,"./searching/builder/TicketStatusSearchBuilder":318,"./searching/builder/TicketsSearchBuilder":319,"./searching/builder/TimeserieSearchBuilder":320,"./searching/builder/TimezoneSearchBuilder":321,"./searching/builder/UserLanguagesSearchBuilder":322,"./searching/builder/UserProfilesSearchBuilder":323,"./searching/builder/UsersSearchBuilder":324,"./searching/builder/WorkgroupsSearchBuilder":325,"./security/CertificateFinder":327,"./security/Certificates":328,"./timeseries/Timeseries":332,"./timeseries/TimeseriesFinder":333,"./transformers/TransformerFinder":334,"./transformers/Transformers":335,"./users/UserFinder":336,"./users/Users":337,"./util/Expression":339,"./util/SelectElement":341,"./workgroups/WorkgroupFinder":347,"./workgroups/WorkgroupRelations":348,"./workgroups/WorkgroupRelationsFinder":349,"./workgroups/Workgroups":350,superagent:128}],140:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("q"),s=(n(u),e("http-status-codes")),c=(n(s),e("./GenericFinder")),l=n(c),f=function(e){function t(e,r,n,o){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"provision/"+r,n,o)}return o(t,e),t}(l.default);r.default=f,t.exports=r.default},{"./GenericFinder":138,"http-status-codes":76,q:117}],141:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=e("./actions/AlarmAttendBuilder"),u=n(a),s=e("./actions/AlarmCloseBuilder"),c=n(s),l=function(){function e(t){i(this,e),this._ogapi=t}return o(e,[{key:"newCloseBuilder",value:function(){return new c.default(this._ogapi)}},{key:"newAttendBuilder",value:function(){return new u.default(this._ogapi)}}]),e}();r.default=l,t.exports=r.default},{"./actions/AlarmAttendBuilder":144,"./actions/AlarmCloseBuilder":145}],142:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("q"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),u=function(){function e(t,r,i){n(this,e),this._ogapi=t,this._resource=r,this._postObj=i}return i(e,[{key:"execute",value:function(){var e=this,t=a.default.defer();return this._ogapi.Napi.post(this._resource,this._postObj).then(function(r){var n=void 0;try{n=JSON.parse(r.text)}catch(t){console.warn("Error parsing response data when execute post action to "+e._resource)}t.resolve({data:n||{},statusCode:r.statusCode,location:r.header.location})}).catch(function(e){e.data||(e.data={}),e.data.errors||(e.data.errors=["string"==typeof e?{message:e}:e]),t.reject(e)}),t.promise}}]),e}();r.default=u,t.exports=r.default},{q:117}],143:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("./Alarm"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),u=function(){function e(t,r){if(n(this,e),this._ogapi=t,this._action=r,this._resource="alarms",this._build={alarms:[],notes:void 0,action:r},this.constructor===e)throw new Error("Cannot construct Abstract instances directly")}return i(e,[{key:"addAlarmId",value:function(e){if("string"!=typeof e)throw new Error("Parameter alarmId must be a string");return this._build.alarms.push(e),this}},{key:"withNotes",value:function(e){if("string"!=typeof e)throw new Error("Parameter notes must be a string");return this._build.notes=e,this}},{key:"build",value:function(){if(0===this._build.alarms.length)throw new Error("Builder error. You must append at least one alarmId with addAlarmId method");return"string"!=typeof this._build.notes&&delete this._build.notes,new a.default(this._ogapi,this._resource,this._build)}}]),e}();r.default=u,t.exports=r.default},{"./Alarm":142}],144:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},a=e("./AlarmActionBuilder"),u=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(e){function t(e){n(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"ATTEND")}return i(t,e),t}(u.default);r.default=s,t.exports=r.default},{"./AlarmActionBuilder":143}],145:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},a=e("./AlarmActionBuilder"),u=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(e){function t(e){n(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"CLOSE")}return i(t,e),t}(u.default);r.default=s,t.exports=r.default},{"./AlarmActionBuilder":143}],146:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../ProvisionGenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"organizations","area","Area/s not found")}return i(t,e),o(t,[{key:"findByOrganizationAndIdentifier",value:function(e,t){return this._checkString(e,"organization"),this._checkString(t,"identifier"),this._organization=e,this._identifier=t,this._execute()}},{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._organization+"/areas/"+this._identifier}},{key:"_checkString",value:function(e,t){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER")}}]),t}(s.default);r.default=c,t.exports=r.default},{"../ProvisionGenericFinder":140}],147:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./TYPE_ENUM"),c=e("../provision/BaseProvision"),l=n(c),f=e("../util/formats/check_types"),d=n(f),h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/organizations/",void 0,["identifier","organization","type","coordinates"])}return o(t,e),a(t,[{key:"_buildURL",value:function(){return"provision/organizations/"+this._organization+"/areas/"+this._identifier}},{key:"withOrganization",value:function(e){return d.default._checkStringAndLength(e,50,"organization"),this._organization=e,this}},{key:"withIdentifier",value:function(e){return d.default._checkStringAndLength(e,50,"identifier"),this._identifier=e,this}},{key:"withName",value:function(e){return d.default._checkStringAndLength(e,50,"name"),this._name=e,this}},{key:"withColor",value:function(e){return d.default._checkStringAndLength(e,50,"color"),this._color=e,this}},{key:"withDescription",value:function(e){return d.default._checkStringAndLength(e,50,"description"),this._description=e,this}},{key:"withOrder",value:function(e){return d.default._checkNumber(e,"order"),this._order=e,this}},{key:"withGeometry",value:function(e,t){return d.default._checkType(e,s.TYPE_ENUM),d.default._checkArray(t,"coordinates"),this._type=e,this._coordinates=t,this}},{key:"withEntities",value:function(e){return d.default._checkArray(e,"entities"),this._entities=e,this}},{key:"_composeElement",value:function(){return this._resource="provision/organizations/"+this._organization+"/areas/",{identifier:this._identifier,name:this._name,description:this._description,order:this._order,color:this._color,geometry:{type:this._type,coordinates:this._coordinates},entities:this._entities}}},{key:"_composeUpdateElement",value:function(){var e=u(Object.getPrototypeOf(t.prototype),"_composeUpdateElement",this).call(this);return delete e.identifier,e}}]),t}(l.default);r.default=h,t.exports=r.default},{"../provision/BaseProvision":235,"../util/formats/check_types":343,"./TYPE_ENUM":148}],148:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["Polygon","Point","LineString"];r.TYPE_ENUM=n},{}],149:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../GenericFinder"),c=n(s),l=e("q"),f=(n(l),e("http-status-codes")),d=(n(f),["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]);r.MIME_TYPES_ENUM=d;var h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"provisionProcessors/provision/organizations","value","Bulk not found")}return o(t,e),a(t,[{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._organization+"/bulk/"+this._id+(this._details?"/details":"")}},{key:"findByOrganizationAndId",value:function(e,t,r){if(this._organization=e,this._id=t,this._details=!1,r){var n="";if(void 0===d.find(function(e){return e==this},r)&&(n=r),""!==n)throw new Error("Parameter mimetype is not allowed. Parameter value <'"+JSON.stringify(n)+"'>, mimetype allowed <'"+JSON.stringify(d)+"'>");return this._details=!0,this._setExtraHeaders({accept:r}),this._download()}return this._details=!1,this._setExtraHeaders({accept:void 0}),this._execute()}}]),t}(c.default);r.default=h},{"../GenericFinder":138,"http-status-codes":76,q:117}],150:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../ProvisionGenericFinder"),c=n(s),l=e("q"),f=(n(l),e("http-status-codes")),d=(n(f),function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"organizations","bulk/async","Bulk not found"),this._raw=!1}return o(t,e),a(t,[{key:"findByOrganizationAndId",value:function(e,t,r,n){return this._organization=e,this._id=t,this._setUrlParameters({format:r}),n&&this._setExtraHeaders({accept:n}),this._download(!0)}},{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._organization+"/"+this._entity+"/"+this._id}}]),t}(c.default));r.default=d,t.exports=r.default},{"../ProvisionGenericFinder":140,"http-status-codes":76,q:117}],151:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["HARDWARE_RESET","SOFTWARE_RESET","COMMS_DOWN","COMMS_UP","COMMS_RESET"];r.ACTION_ENUM=n},{}],152:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../ProvisionGenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"bundles","bundle","Bundle not found")}return i(t,e),o(t,[{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._name+"/versions/"+this._version}},{key:"findByNameAndVersion",value:function(e,t){return this._name=e,this._version=t,this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../ProvisionGenericFinder":140}],153:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./ACTION_ENUM"),c=e("./deployment/DeploymentElement"),l=n(c),f=e("q"),d=n(f),h=e("../provision/BaseProvision"),p=n(h),y=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/bundles")}return o(t,e),a(t,[{key:"withName",value:function(e){if("string"!=typeof e||e.length>255)throw new Error("OGAPI_NAME_PARAMETER_MAX_LENGTH_255");return this._name=e,this}},{key:"withVersion",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"version"});return this._version=e,this}},{key:"withHardware",value:function(e){if("string"!=typeof e)throw new Error("Parameter hardware must be a string");return this._hardware=e,this}},{key:"withWorkgroup",value:function(e){if("string"!=typeof e)throw new Error("Parameter workgroup must be a string");return this._workgroup=e,this}},{key:"withDescription",value:function(e){if("string"!=typeof e||e.length>250)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_250",parameter:"description"});return this._description=e,this}},{key:"withTimeout",value:function(e){if("number"!=typeof e)throw new Error("Parameter ms must be a number");return this._timeout=e,this}},{key:"_checkActions",value:function(e,t){if(void 0===e||e.constructor!==Array)throw new Error("Parameter "+t+" must be typeof Array");for(var r=[],n=0;n<e.length;n++){void 0===s.ACTION_ENUM.find(function(e){return e==this},e[n])&&r.push(e[n])}if(0!==r.length)throw new Error("Any action into parameter "+t+" is not allowed. Parameter value <'"+JSON.stringify(r)+"'>, "+t+" allowed <'"+JSON.stringify(s.ACTION_ENUM)+"'>");return e}},{key:"withPreaction",value:function(e){return this._preaction=this._checkActions(e,"preaction"),this}},{key:"withPostaction",value:function(e){return this._postaction=this._checkActions(e,"postaction"),this}},{key:"withUserNotes",value:function(e){if("string"!=typeof e||e.length>250)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_250",parameter:"notes"});return this._userNotes=e,this}},{key:"withActive",value:function(e){if("boolean"!=typeof e)throw new Error("Parameter active must be a boolean");return this._active=e,this}},{key:"_composeElement",value:function(){if(void 0===this._name||void 0===this._version)throw new Error("Parameters name, version must be defined");return{bundle:{name:this._name||void 0,version:this._version||void 0,hardware:this._hardware||void 0,workgroup:this._workgroup||void 0,description:this._description||void 0,preaction:this._preaction||void 0,postaction:this._postaction||void 0,userNotes:this._userNotes||void 0,active:this._active||void 0}}}},{key:"_buildURL",value:function(){if(void 0===this._name||void 0===this._version)throw new Error("Parameters name, version must be defined");return this._resource+"/"+this._name+"/versions/"+this._version}},{key:"activate",value:function(){var e=d.default.defer(),t=e.promise;return this._ogapi.Napi.put(this._buildURL(),{bundle:{active:!0}},void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(t){200===t.statusCode?e.resolve({statusCode:t.statusCode}):e.reject({errors:[{code:t.statusCode,message:"OGAPI_BUNDLE_NOT_ACTIVE"}],statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}},{key:"deactivate",value:function(){var e=d.default.defer(),t=e.promise;return this._ogapi.Napi.put(this._buildURL(),{bundle:{active:!1}},void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(t){200===t.statusCode?e.resolve({statusCode:t.statusCode}):e.reject({errors:[{code:t.statusCode,message:"OGAPI_BUNDLE_NOT_DEACTIVE"}],statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}},{key:"addDeploymentElement",value:function(e){if(void 0===this._name||void 0===this._version)throw new Error("Parameters name, version must be defined");this._deploymentElements||(this._deploymentElements=[]);var t=new l.default(this._parent,this._ogapi,encodeURI(this._buildURL()),e);return this._deploymentElements.push(t),this._deploymentElements[this._deploymentElements.length-1]}},{key:"deployAndActivate",value:function(){var e=this,t=d.default.defer(),r=t.promise;if(e._deploymentElements&&e._deploymentElements.length>0){var n=0,i=0;for(i=0;i<e._deploymentElements.length;i++){var o=0;if(e._deploymentElements[i]._validators&&e._deploymentElements[i]._validators.length>0)for(o=0;o<e._deploymentElements[i]._validators.length;o++)"TRUSTED_BOOT"===e._deploymentElements[i]._validators[o].mode&&(n+=1)}if(n>1)throw new Error("OGAPI_422_ONE_TRUSTED_BOOT_ALLOWED")}e._allPromisesOk=!0;var a=function(r){201===r.statusCode?function(){var n=r;e._deploymentElements&&e._deploymentElements.length>0?function(){var r=[];e._deploymentElements.forEach(function(e){r.push(e.deploy())}),Promise.all(r).then(function(){e._allPromisesOk&&e.activate().then(function(e,r){t.resolve(n)}).catch(function(e){t.reject(e)})}).catch(function(t){e._allPromisesOk=!1,u(t)})}():t.resolve(n)}():u({statusCode:r.statusCode})},u=function(r){e.delete(),t.reject(r)};return e.create().then(a).catch(u),r}},{key:"create",value:function(){var e=this;if(void 0===this._name||void 0===this._version||void 0===this._hardware||void 0===this._workgroup)throw new Error("Parameters name, version, hardware and workgroup must be defined");var r=d.default.defer(),n=r.promise,i=function(e){201===e.statusCode?r.resolve(e):o({statusCode:e.statusCode})},o=function(e){r.reject(e)};return this._ogapi.newBundleFinder().findByNameAndVersion(this._name,this._version).then(function(n){204===n.statusCode?u(Object.getPrototypeOf(t.prototype),"create",e).call(e).then(i).catch(o):r.reject({errors:[{code:204,message:"OGAPI_400_BUNDLE_EXIST"}],statusCode:400})}).catch(function(n){404===n.statusCode?u(Object.getPrototypeOf(t.prototype),"create",e).call(e).then(i).catch(o):r.reject({errors:[{code:204,message:"OGAPI_400_BUNDLE_EXIST"}],statusCode:400})}),n}},{key:"update",value:function(){var e=d.default.defer(),t=e.promise,r=this._composeElement();return delete r.bundle.name,delete r.bundle.version,delete r.bundle.workgroup,delete r.bundle.hardware,this._ogapi.Napi.put(this._buildURL(),r,void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(t){200===t.statusCode?e.resolve({statusCode:t.statusCode}):e.reject({errors:[{code:t.statusCode,message:"OGAPI_400_BUNDLE_NOT_UPDATED"}],statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}}]),t}(p.default);r.default=y,t.exports=r.default},{"../provision/BaseProvision":235,"./ACTION_ENUM":151,"./deployment/DeploymentElement":154,q:117}],154:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}
25
25
  },s=e("./OPERATION_ENUM"),c=e("./OPTION_ENUM"),l=e("./TYPE_ENUM"),f=e("./TYPE_VALIDATORS_ENUM"),d=e("./MODE_VALIDATORS_ENUM"),h=e("q"),p=n(h),y=e("../../provision/BaseProvision"),m=n(y),v=function(e){function t(e,r,n,o){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,r,n+"/deploymentElements"),this._progressEvent=o,this._resource=n+"/deploymentElements",this.validation=!1,this._name=void 0,this._version=void 0,this._type=void 0,this._path=void 0,this._order=void 0,this._operation=void 0,this._option=void 0,this._fileName=void 0,this._downloadUrl=void 0,this._validators=void 0,this._oldName=void 0,this._oldVersion=void 0,this._oldPath=void 0}return o(t,e),a(t,[{key:"withName",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"name"});return this._name=e,this}},{key:"withVersion",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"version"});return this._version=e,this}},{key:"withType",value:function(e){if(void 0===e||"string"!=typeof e)throw new Error({message:"OGAPI_STRING_PARAMETER",parameter:"type"});var t="";if(void 0===l.TYPE_ENUM.find(function(e){return e==this},e)&&(t=e),""!==t)throw new Error({message:"OGAPI_NOT_ALLOWED_PARAMETER",parameter:JSON.stringify(t),allowed:JSON.stringify(l.TYPE_ENUM)});return this._type=e,this}},{key:"withPath",value:function(e){if("string"!=typeof e)throw new Error({message:"OGAPI_STRING_PARAMETER",parameter:"path"});return this._path=e,this}},{key:"withOrder",value:function(e){return this._order=e,this}},{key:"withOperation",value:function(e){if(void 0===e||"string"!=typeof e)throw new Error({message:"OGAPI_STRING_PARAMETER",parameter:"operation"});var t="";if(void 0===s.OPERATION_ENUM.find(function(e){return e==this},e)&&(t=e),""!==t)throw new Error("Parameter operation is not allowed. Parameter value <'"+JSON.stringify(t)+"'>, operation allowed <'"+JSON.stringify(s.OPERATION_ENUM)+"'>");return this._operation=e,this}},{key:"withOption",value:function(e){if(void 0===e||"string"!=typeof e)throw new Error({message:"OGAPI_STRING_PARAMETER",parameter:"option"});var t="";if(void 0===c.OPTION_ENUM.find(function(e){return e==this},e)&&(t=e),""!==t)throw new Error("Parameter option is not allowed. Parameter value <'"+JSON.stringify(t)+"'>, option allowed <'"+JSON.stringify(c.OPTION_ENUM)+"'>");return this._option=e,this}},{key:"withValidators",value:function(e){var t={},r=[];if(void 0===e||e.constructor!==Array)throw new Error("Parameter validators must be typeof Array");for(var n=!1,i=0;i<e.length;i++){if(t=this._checkValidator(e[i]),"TRUSTED_BOOT"===t.mode){if(n)throw new Error("OGAPI_422_ONE_TRUSTED_BOOT_ALLOWED_DEPLOY_ELEMENT");n=!0}r.push(t)}return this._validators=r,this}},{key:"_checkValidator",value:function(e){var t={};if(e.mode){var r="",n=e.mode;if(void 0===n||"string"!=typeof n)throw new Error({message:"OGAPI_STRING_PARAMETER",parameter:"type"});if(void 0===d.MODE_VALIDATORS_ENUM.find(function(e){return e==this},n)&&(r=n),""!==r)throw new Error("Parameter type is not allowed. Parameter value <'"+JSON.stringify(r)+"'>, type allowed <'"+JSON.stringify(d.MODE_VALIDATORS_ENUM)+"'>");if("TRUSTED_BOOT"===n&&("TRUSTED_BOOT"!==n||"FIRMWARE"!==this._type))throw new Error("TRUSTED_BOOT validator only allowed for FIRMWARE deployment element");t.mode=n}else t.mode=d.MODE_VALIDATORS_ENUM[0];if(!e.type)throw new Error("Parameter type is required");var r="",i=e.type;if(void 0===i||"string"!=typeof i)throw new Error({message:"OGAPI_STRING_PARAMETER",parameter:"type"});if(void 0===f.TYPE_VALIDATORS_ENUM.find(function(e){return e==this},i)&&(r=i),""!==r)throw new Error("Parameter type is not allowed. Parameter value <'"+JSON.stringify(r)+"'>, type allowed <'"+JSON.stringify(f.TYPE_VALIDATORS_ENUM)+"'>");if(t.type=i,t.mode===d.MODE_VALIDATORS_ENUM[0]){if(!e.value)throw new Error("Parameter value is required when mode is "+d.MODE_VALIDATORS_ENUM[0]);var o=e.value;if("string"!=typeof o)throw new Error("Parameter value must be a string");t.value=o}return t}},{key:"withDownloadUrl",value:function(e){if("string"!=typeof e)throw new Error("Parameter downloadUrl must be a string");return this._downloadUrl=e,this}},{key:"withFileName",value:function(e){if("string"!=typeof e)throw new Error("Parameter fileName must be a string");return this._fileName=e,this}},{key:"withValidation",value:function(e){if("boolean"!=typeof e)throw new Error("Parameter validation must be a boolean");return this.validation=e,this}},{key:"withOldName",value:function(e){if("string"!=typeof e)throw new Error("Parameter old name must be a string");return this._oldName=e,this}},{key:"withOldVersion",value:function(e){if("string"!=typeof e)throw new Error("Parameter old version must be a string");return this._oldVersion=e,this}},{key:"withOldPath",value:function(e){if("string"!=typeof e)throw new Error("Parameter old path must be a string");return this._oldPath=e,this}},{key:"withFile",value:function(e){return this._rawFile=e,this}},{key:"_composeUrlCreate",value:function(){if(void 0===this._name||void 0===this._version||""===this._name||""===this._version)throw new Error("Method not allowed - You must to define the name and version");return this._setUrlParameters({fileValidationRequired:this.validation}),this._resource}},{key:"_composeElement",value:function(){if("UPGRADE"===this._operation){if(void 0===this._name||void 0===this._version||void 0===this._type||void 0===this._path||void 0===this._order||void 0===this._operation||void 0===this._oldName||void 0===this._oldVersion||void 0===this._oldPath)throw new Error("Method not allowed - You must define the basic element [name, version, type, path, order, operation, oldName, oldVersion and oldPath ]")}else if(void 0===this._name||void 0===this._version||void 0===this._type||void 0===this._path||void 0===this._order||void 0===this._operation||void 0===this._option)throw new Error("Method not allowed - You must define the basic element [name, version, type, path, order, option and operation]");return{deploymentElement:{name:this._name||void 0,version:this._version||void 0,type:this._type||void 0,path:this._path||void 0,order:this._order||void 0,operation:this._operation||void 0,option:this._option||void 0,fileName:this._fileName||void 0,downloadUrl:this._downloadUrl||void 0,validators:this._validators||void 0,oldName:this._oldName||void 0,oldVersion:this._oldVersion||void 0,oldPath:this._oldPath||void 0}}}},{key:"withTimeout",value:function(e){if("number"!=typeof e)throw new Error("Parameter ms must be a number");return this._timeout=e,this}},{key:"_buildURL",value:function(){if(void 0===this._name||void 0===this._version)throw new Error("Parameters name, version must be defined");return this._resource+"/"+this._name+"/version/"+this._version}},{key:"createWithFile",value:function(e){var t=void 0;if("string"!=typeof e){t=new FormData;var r=new Blob([JSON.stringify(this._composeElement())],{type:"application/octet-stream"});t.append("meta",r),e&&t.append("file",e)}else t={},t.meta=JSON.stringify(this._composeElement()),e&&(t.file=e);var n={};void 0!=this._progressEvent&&(n={progress:this._progressEvent});var i=p.default.defer(),o=i.promise;return this._ogapi.Napi.post_multipart(this._composeUrlCreate(),t,n,this._timeout,this._getExtraHeaders(),this._getUrlParameters()).then(function(e){201===e.statusCode?i.resolve({location:e.header.location,statusCode:e.statusCode}):i.reject({errors:[{code:e.statusCode,message:"OGAPI_FILE_NOT_CREATE"}],statusCode:e.statusCode})}).catch(function(e){i.reject(e)}),o}},{key:"deploy",value:function(){return this.createWithFile(this._rawFile)}},{key:"update",value:function(){throw new Error("OGAPI_DEPLOYMENT_ELEMENT_NOT_UPDATED")}}]),t}(m.default);r.default=v,t.exports=r.default},{"../../provision/BaseProvision":235,"./MODE_VALIDATORS_ENUM":155,"./OPERATION_ENUM":156,"./OPTION_ENUM":157,"./TYPE_ENUM":158,"./TYPE_VALIDATORS_ENUM":159,q:117}],155:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["PLATFORM","TRUSTED_BOOT"];r.MODE_VALIDATORS_ENUM=n},{}],156:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["INSTALL","UNINSTALL","UPGRADE"];r.OPERATION_ENUM=n},{}],157:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["MANDATORY","OPTIONAL"];r.OPTION_ENUM=n},{}],158:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["SOFTWARE","FIRMWARE","CONFIGURATION","PARAMETERS"];r.TYPE_ENUM=n},{}],159:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["MD2","MD5","SHA-1","SHA-256","SHA-384","SHA-512","CERTIFICATE_SIGN"];r.TYPE_VALIDATORS_ENUM=n},{}],160:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../ProvisionGenericFinder"),c=n(s),l=e("q"),f=n(l),d=e("http-status-codes"),h=n(d),p=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"organizations","channel","Channel not found")}return o(t,e),a(t,[{key:"findByOrganizationAndName",value:function(e,t){return this._organization=e,this._name=t,this._execute()}},{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._organization+"/channels/"+this._name}},{key:"findByDomainAndWorkgroup",value:function(e,t){this._domain=e,this._workgroup=t;var r=this._error_not_found,n=f.default.defer(),i=n.promise;return this._executeWorkgroupRelation().then(function(e){if(204===e.statusCode)n.reject({data:r,statusCode:h.default.NO_CONTENT});else{var t=e.data,i=[];for(var o in t.channels)i.push({organization:t.channels[o].organization,name:t.channels[o].channel});n.resolve({data:i,statusCode:e.statusCode})}}).catch(function(e){n.reject(e)}),i}},{key:"findByDomainAndWorkgroupAndOrganization",value:function(e,t,r){var n=this;n._domain=e,n._workgroup=t,n._organization=r;var i=n._error_not_found,o=f.default.defer(),a=o.promise;return n._executeWorkgroupRelation().then(function(e){if(204===e.statusCode)o.reject({data:i,statusCode:h.default.NOT_FOUND});else{var t=e.data,r=[];for(var a in t.channels)n._organization===t.channels[a].organization&&r.push({organization:t.channels[a].organization,name:t.channels[a].channel});r.length>0?o.resolve({data:r,statusCode:e.statusCode}):o.reject({data:i,statusCode:h.default.NOT_FOUND})}}).catch(function(e){o.reject(e)}),a}},{key:"_executeWorkgroupRelation",value:function(){var e="provision/domains/"+this._domain+"/workgroups/"+this._workgroup+"/relations",t=f.default.defer(),r=t.promise,n=this._error_not_found;return this._api.get(e,void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(e){204===e.statusCode?t.reject({data:n,statusCode:h.default.NOT_FOUND}):t.resolve({data:e.body.workgroupRelation,statusCode:e.statusCode})}).catch(function(e){t.reject(e)}),r}}]),t}(c.default);r.default=p,t.exports=r.default},{"../ProvisionGenericFinder":140,"http-status-codes":76,q:117}],161:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("q"),c=(n(s),e("../provision/BaseProvision")),l=n(c),f=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/organizations",void 0,["name","organization"]),this._ogapi=e}return o(t,e),a(t,[{key:"_buildURL",value:function(){return"provision/organizations/"+this._organization+"/channels/"+this._name}},{key:"withName",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"name"});return this._name=e,this}},{key:"withDescription",value:function(e){if("string"!=typeof e||e.length>250)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_250",parameter:"description"});return this._description=e,this}},{key:"withOrganization",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"organization"});return this._organization=e,this}},{key:"withCertificate",value:function(e){if("string"!=typeof e)throw new Error({message:"OGAPI_STRING_PARAMETER",parameter:"certificate"});return this._certificates||(this._certificates=[]),this._certificates.push(e),this}},{key:"_composeElement",value:function(){return this._checkRequiredParameters(),this._resource="provision/organizations/"+this._organization+"/channels",{channel:{name:this._name||void 0,description:this._description||void 0,certificates:this._certificates||void 0}}}},{key:"_composeUpdateElement",value:function(){var e=u(Object.getPrototypeOf(t.prototype),"_composeUpdateElement",this).call(this);return delete e.channel.name,e}}]),t}(l.default);r.default=f,t.exports=r.default},{"../provision/BaseProvision":235,q:117}],162:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("q"),c=n(s),l=e("./collect/Event"),f=n(l),d=e("../devices/collect/Datastreams"),h=n(d),p=function(e){function t(e,r,n){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this._ogapi=e,this._resource="devices",this._iotMessage=void 0,this._dmmMessage=void 0,this._id=void 0,this._version=void 0,this._dataStreamVersion=void 0,this._deviceId=void 0,this._datastreams=[]}return o(t,e),a(t,[{key:"withId",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"id"});return this._id=e,this}},{key:"withDataStreamVersion",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"version"});return this._dataStreamVersion=e,this}},{key:"withDmmVersion",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"version"});return this._version=e,this}},{key:"withDeviceId",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"device"});return this._deviceId=e,this}},{key:"withDataStream",value:function(e){return e instanceof h.default&&this._datastreams.push(e.composeElement()),this}},{key:"_buildIotURL",value:function(){if(void 0===this._id)throw new Error("Parameters id must be defined");return this._resource+"/"+this._id+"/collect/iot"}},{key:"_buildDmmURL",value:function(){if(void 0===this._id)throw new Error("Parameters id must be defined");return this._resource+"/"+this._id+"/collect/dmm"}},{key:"_composeIotMessage",value:function(){if(void 0===this._datastreams||void 0===this._dataStreamVersion)throw new Error("Parameters datastreams and version must be defined");return{version:this._dataStreamVersion,device:this._deviceId,datastreams:this._datastreams}}},{key:"_composeDmmMessage",value:function(){if(void 0===this._version)throw new Error("Parameters id must be defined");var e=u(Object.getPrototypeOf(t.prototype),"composeElement",this).call(this);return{version:this._version,event:e}}},{key:"create",value:function(){var e=c.default.defer(),t=e.promise,r=[];return this._datastreams.length>0&&r.push(this._ogapi.Sapi.post(this._buildIotURL(),this._composeIotMessage()).then(function(e){if(201!==e.statusCode)throw new Error("IOT NOT CREATED")})),void 0!==this._version&&r.push(this._ogapi.Sapi.post(this._buildDmmURL(),this._composeDmmMessage()).then(function(e){if(201!==e.statusCode)throw new Error("DMM NOT CREATED")})),c.default.all(r).catch(function(t){e.reject({errors:t,statusCode:400})}).done(function(t){e.resolve({statusCode:201})}),t}}]),t}(f.default);r.default=p,t.exports=r.default},{"../devices/collect/Datastreams":165,"./collect/Event":166,q:117}],163:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=e("./enum/ANTENNA_STATUS_ENUM"),u=e("./Hardware"),s=n(u),c=e("./Software"),l=n(c),f=e("./Mobile"),d=n(f),h=e("./Subscriber"),p=n(h),y=e("./Subscription"),m=n(y),v=function(){function e(t){i(this,e),this._ogapi=t,this._id=void 0,this._name=void 0,this._type=void 0,this._hardware=void 0,this._operationalStatus=void 0,this._antennaStatus=void 0,this._softwareList=[],this._mobile=void 0,this._subscriber=void 0,this._subscription=void 0}return o(e,[{key:"withId",value:function(e){if("string"!=typeof e)throw new Error({message:"OGAPI_STRING_PARAMETER",parameter:"id"});return this._id=e,this}},{key:"withName",value:function(e){if("string"!=typeof e)throw new Error({message:"OGAPI_STRING_PARAMETER",parameter:"name"});return this._name=e,this}},{key:"withType",value:function(e){if("string"!=typeof e)throw new Error({message:"OGAPI_STRING_PARAMETER",parameter:"type"});return this._type=e,this}},{key:"withHardware",value:function(e){if(!(e instanceof s.default))throw new Error("Parameter hardware must be hardware type");return this._hardware=e,this}},{key:"withOperationalStatus",value:function(e){return this._ogapi.operationalStatusSearchBuilder().withEntityType("COMMUNICATIONS_MODULE").withId(e).build().execute().then(function(e){if(204===e.statusCode)throw new Error("Operational Status not found")}),this._operationalStatus=e,this}},{key:"withAntennaStatus",value:function(e){if("string"!=typeof e)throw new Error("Parameter antennaStatus must be a string");return this._antennaStatus=this._checkValues(e,a.ANTENNA_STATUS_ENUM),this}},{key:"withSoftware",value:function(e){if(!(e instanceof l.default))throw new Error("Parameter software must be software type");return this._softwareList.push(e.composeElement()),this}},{key:"withMobile",value:function(e){if(!(e instanceof d.default))throw new Error("Parameter mobile must be Mobile type");return this._mobile=e,this}},{key:"withSubscriber",value:function(e){if(!(e instanceof p.default))throw new Error("Parameter subscriber must be Subscriber type");return this._subscriber=e,this}},{key:"withSubscription",value:function(e){if(!(e instanceof m.default))throw new Error("Parameter subscription must be Subscription type");return this._subscription=e,this}},{key:"_checkValues",value:function(e,t){var r=[];return void 0===t.find(function(e){return e==this},e)&&r.push(e),0!==r.length&&console.warn("Parameter value not allowed <'"+JSON.stringify(r)+"'>, allowed <'"+JSON.stringify(t)+"'>"),e}},{key:"composeElement",value:function(){var e={id:this._id,name:this._name,type:this._type,hardware:this._hardware.composeElement(),operationalStatus:this._operationalStatus,antennaStatus:this._antennaStatus};return this._softwareList.length>0&&(e.softwareList=this._softwareList),void 0!==this._mobile&&(e.mobile=this._mobile.composeElement()),void 0!==this._subscriber&&(e.subscriber=this._subscriber.composeElement()),void 0!==this._subscription&&(e.subscription=this._subscription.composeElement()),e}}]),e}();r.default=v,t.exports=r.default},{"./Hardware":167,"./Mobile":168,"./Software":170,"./Subscriber":172,"./Subscription":173,"./enum/ANTENNA_STATUS_ENUM":176}],164:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function(){function e(){n(this,e),this._from=void 0,this._at=void 0,this._value=void 0,this._tags=void 0}return i(e,[{key:"withFrom",value:function(e){if(null!==e){if("number"!=typeof e)throw new Error("OGAPI_MUST_BE_NUMBER_PARAMETER");this._from=e}return this}},{key:"withAt",value:function(e){if(null!==e){if("number"!=typeof e)throw new Error("OGAPI_MUST_BE_NUMBER_PARAMETER");this._at=e}return this}},{key:"withValue",value:function(e){if(void 0===e||0===e.length)throw new Error("OGAPI_DEFINED_PARAMETER");return this._value=e,this}},{key:"withTags",value:function(e){if(null!==e){if(e.constructor!==Array||0===e.length)throw new Error({message:"OGAPI_ARRAY_PARAMETER",parameter:"tags"});this._tags=e}return this}},{key:"composeElement",value:function(){if(void 0===this._value||0===this._value.length)throw new Error({message:"OGAPI_DEFINED_PARAMETER",parameter:"value"});return{from:this._from||void 0,at:this._at||void 0,value:this._value,tags:this._tags||void 0}}}]),e}();r.default=o,t.exports=r.default},{}],165:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("./Datapoint"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),u=function(){function e(){n(this,e),this._id=void 0,this._feed=void 0,this._datapoints=[]}return i(e,[{key:"withId",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("OGAPI_STRING_PARAMETER_ID");return this._id=e,this}},{key:"withFeed",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("OGAPI_STRING_PARAMETER_FEED");return this._feed=e,this}},{key:"withDatapoint",value:function(e){if(!(e instanceof a.default))throw new Error("OGAPI_PARAMETER_DATAPOINT");return this._datapoints.push(e.composeElement()),this}},{key:"composeElement",value:function(){if(void 0===this._id||0===this._id.length||0===this._datapoints.length)throw new Error("Parameter id must be defined and dapoint list must have at least one element");return{id:this._id,feed:this._feed,datapoints:this._datapoints}}}]),e}();r.default=u,t.exports=r.default},{"./Datapoint":164}],166:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=e("q"),u=(n(a),e("./Hardware")),s=n(u),c=e("./Software"),l=n(c),f=e("./Usage"),d=n(f),h=e("./Storage"),p=n(h),y=e("./PowerSupply"),m=n(y),v=e("./CommsModuleMessage"),_=n(v),g=e("./enum/TEMPERATURE_STATUS_ENUM"),b=e("./enum/LEVEL_TREND_ENUM"),w=function(){function e(t){i(this,e),this._ogapi=t,this._event_id=void 0,this._deviceId=void 0,this._path=void 0,this._name=void 0,this._description=void 0,this._hardware=void 0,this._operationalStatus=void 0,this._softwareList=[],this._location=void 0,this._temperature=void 0,this._cpuUsage=void 0,this._ram=void 0,this._volatilStorage=void 0,this._nonVolatilStorage=void 0,this._powerSupply=void 0,this._upTime=void 0,this._communicationsModulesList=[]}return o(e,[{key:"withEventId",value:function(e){if("string"!=typeof e)throw new Error({message:"OGAPI_STRING_PARAMETER",parameter:"EventId"});return this._event_id=e,this}},{key:"withDeviceId",value:function(e){if("string"!=typeof e)throw new Error("deviceId cannot be empty");return this._deviceId=e,this}},{key:"withPath",value:function(e){if(e.constructor!==Array||0===e.length)throw new Error("Parameter path must be an Array and cannot be empty");return this._path=e,this}},{key:"withEventName",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter name must be String type and cannot be empty");return this._name=e,this}},{key:"withEventDescription",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter description must be String type and cannot be empty");return this._description=e,this}},{key:"withHardware",value:function(e){if(!(e instanceof s.default))throw new Error("Parameter hardware must be Hardware type");return this._hardware=e,this}},{key:"withOperationalStatus",value:function(e){return this._ogapi.operationalStatusSearchBuilder().withEntityType("ASSET").withId(e).build().execute().then(function(e){if(204===e.statusCode)throw new Error("Operational Status not found")}),this._operationalStatus=e,this}},{key:"withSoftware",value:function(e){if(!(e instanceof l.default))throw new Error("Parameter software must be software type");return this._softwareList.push(e.composeElement()),this}},{key:"withDateLocation",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter date must be String type and cannot be empty");return void 0===this._location&&(this._location={coordinates:{}}),this._location.timestamp=e,this}},{key:"withLatitude",value:function(e){if("number"!=typeof e||0===e.length)throw new Error("Parameter latitude must be number type and cannot be empty");return void 0===this._location&&(this._location={coordinates:{}}),this._location.coordinates.latitude=e,this}},{key:"withLongitude",value:function(e){if("number"!=typeof e||0===e.length)throw new Error("Parameter longitude must be number type and cannot be empty");return void 0===this._location&&(this._location={coordinates:{}}),this._location.coordinates.longitude=e,this}},{key:"withCurrentTemperature",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter currentTemperature must be string type and cannot be empty");return void 0===this._temperature&&(this._temperature={}),this._temperature.current=e,this}},{key:"withUnitTemperature",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter unitTemperature must be string type and cannot be empty");return void 0===this._temperature&&(this._temperature={}),this._temperature.unit=e,this}},{key:"withStatusTemperature",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter unitTemperature must be string type and cannot be empty");return void 0===this._temperature&&(this._temperature={}),this._temperature.status=this._checkValues(e,g.TEMPERATURE_STATUS_ENUM),this}},{key:"withTrendTemperature",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter unitTemperature must be string type and cannot be empty");return void 0===this._temperature&&(this._temperature={}),this._temperature.trend=this._checkValues(e,b.LEVEL_TREND_ENUM),this}},{key:"withTemperatureAverage",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter averageTemperature must be string type and cannot be empty");return void 0===this._temperature&&(this._temperature={}),this._temperature.average=e,this}},{key:"withMinimumTemperature",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter minimumTemperature must be string type and cannot be empty");return void 0===this._temperature&&(this._temperature={}),this._temperature.minimum=e,this}},{key:"withMaximumTemperature",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter maximumTemperature must be string type and cannot be empty");return void 0===this._temperature&&(this._temperature={}),this._temperature.maximum=e,this}},{key:"withCpuUsage",value:function(e){if(!(e instanceof d.default))throw new Error("Parameter cpuUsage must be Usage type");return this._cpuUsage=e,this}},{key:"withRam",value:function(e){if(!(e instanceof p.default))throw new Error("Parameter ram must be Storage type");return this._ram=e,this}},{key:"withVolatilStorage",value:function(e){if(!(e instanceof p.default))throw new Error("Parameter volatilStorage must be Storage type");return this._volatilStorage=e,this}},{key:"withNonVolatilStorage",value:function(e){if(!(e instanceof p.default))throw new Error("Parameter nonVolatilStorage must be Storage type");return this._nonVolatilStorage=e,this}},{key:"withPowerSupply",value:function(e){if(!(e instanceof m.default))throw new Error("Parameter powerSupply must be PowerSupply type");return this._powerSupply=e,this}},{key:"withCommsModule",value:function(e){if(!(e instanceof _.default))throw new Error("Parameter communicationsModules must be CommsModuleMessage type");return this._communicationsModulesList.push(e.composeElement()),this}},{key:"withUpTime",value:function(e){if("number"!=typeof e||0===e.length)throw new Error("Parameter upTime must be number type and cannot be empty");return this._upTime=e,this}},{key:"_checkValues",value:function(e,t){var r=[];return void 0===t.find(function(e){return e==this},e)&&r.push(e),
26
26
  0!==r.length&&console.warn("Parameter value not allowed <'"+JSON.stringify(r)+"'>, allowed <'"+JSON.stringify(t)+"'>"),e}},{key:"composeElement",value:function(){var e={id:this._event_id,device:{id:this._deviceId,path:this._path,name:this._name,description:this._description,operationalStatus:this._operationalStatus}};return void 0!==this._hardware&&(e.device.hardware=this._hardware.composeElement()),this._softwareList.length>0&&(e.device.softwareList=this._softwareList),void 0!==this._location&&(e.device.location=this._location),void 0!==this._temperature&&(e.device.temperature=this._temperature),void 0!==this._cpuUsage&&(e.device.cpuUsage=this._cpuUsage.composeElement()),void 0!==this._ram&&(e.device.ram=this._ram.composeElement()),void 0!==this._volatilStorage&&(e.device.volatilStorage=this._volatilStorage.composeElement()),void 0!==this._nonVolatilStorage&&(e.device.nonVolatilStorage=this._nonVolatilStorage.composeElement()),void 0!==this._powerSupply&&(e.device.powerSupply=this._powerSupply.composeElement()),this._communicationsModulesList.length>0&&(e.device.communicationsModules=this._communicationsModulesList),void 0!==this._upTime&&(e.device.upTime=this._upTime),e}}]),e}();r.default=w,t.exports=r.default},{"./CommsModuleMessage":163,"./Hardware":167,"./PowerSupply":169,"./Software":170,"./Storage":171,"./Usage":174,"./enum/LEVEL_TREND_ENUM":179,"./enum/TEMPERATURE_STATUS_ENUM":182,q:117}],167:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function(){function e(){n(this,e),this._serialnumber=void 0,this._manufacturerName=void 0,this._manufacturerOui=void 0,this._modelName=void 0,this._modelVersion=void 0,this._clockDate=void 0}return i(e,[{key:"withSerialnumber",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter serial number must be a string and cannot be empty");return this._serialnumber=e,this}},{key:"withManufacturerName",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter manufacturer Name must be a string and cannot be empty");return this._manufacturerName=e,this}},{key:"withManufacturerOui",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter manufacturer code must be a string and cannot be empty");return this._manufacturerOui=e,this}},{key:"withModelName",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter model Name must be a string and cannot be empty");return this._modelName=e,this}},{key:"withModelVersion",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter model Version must be a string and cannot be empty");return this._modelVersion=e,this}},{key:"withClockDate",value:function(e){if(!this._isValidDate(e))throw new Error("The clockDate parameter has a wrong format. Example of rigth format is 2015-07-16T19:20:30+01:00");return this._clockDate=e,this}},{key:"_isValidDate",value:function(e){if(""===e||null===e)return!1;var t=e.match(/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\+(\d{2}):(\d{2})/);if(null===t||"object"!=typeof t)return!1;if("object"!=typeof t&&null!==t&&3!==t.size)return!1;var r=!0,n=(new Date).getFullYear();return(t[1].length<4||t[1]<1999||t[1]>n)&&(r=!1),(t[2].length<2||t[2]<1||t[2]>12)&&(r=!1),(t[3].length<2||t[3]<1||t[3]>31)&&(r=!1),r}},{key:"composeElement",value:function(){return{serialnumber:this._serialnumber,manufacturer:{name:this._manufacturerName,oui:this._manufacturerOui||""},model:{name:this._modelName||"",version:this._modelVersion||""},clockDate:this._clockDate}}}]),e}();r.default=o,t.exports=r.default},{}],168:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function(){function e(){n(this,e),this._mr=void 0,this._apn=void 0,this._bcch=void 0,this._cgi=void 0,this._cellId=void 0,this._lac=void 0,this._ratType=void 0,this._plmn=void 0,this._timingAdvance=void 0,this._signalStrength=void 0,this._signalStrengthMax=void 0,this._signalStrengthMin=void 0,this._signalQuality=void 0,this._signalQualityMax=void 0,this._signalQualityMin=void 0}return i(e,[{key:"withMr",value:function(e){if("string"!=typeof e)throw new Error("Parameter mr usage must be String type ");return this._mr=e,this}},{key:"withApn",value:function(e){if("string"!=typeof e)throw new Error("Parameter apn usage must be String type ");return this._apn=e,this}},{key:"withBcch",value:function(e){if("string"!=typeof e)throw new Error("Parameter bcch usage must be String type ");return this._bcch=e,this}},{key:"withCgi",value:function(e){if("string"!=typeof e)throw new Error("Parameter cgi usage must be String type ");return this._cgi=e,this}},{key:"withCellId",value:function(e){if("string"!=typeof e)throw new Error("Parameter cellId usage must be String type ");return this._cellId=e,this}},{key:"withLac",value:function(e){if("string"!=typeof e)throw new Error("Parameter lac usage must be String type ");return this._lac=e,this}},{key:"withRatType",value:function(e){if("string"!=typeof e)throw new Error("Parameter ratType usage must be String type ");return this._ratType=e,this}},{key:"withPlmn",value:function(e){if("string"!=typeof e)throw new Error("Parameter plmn usage must be String type ");return this._plmn=e,this}},{key:"withTimingAdvance",value:function(e){if("string"!=typeof e)throw new Error("Parameter timingAdvance usage must be String type ");return this._timingAdvance=e,this}},{key:"withSignalStrength",value:function(e){if("string"!=typeof e)throw new Error("Parameter signalStrength usage must be String type ");return this._signalStrength=e,this}},{key:"withSignalStrengthMax",value:function(e){if("string"!=typeof e)throw new Error("Parameter signalStrengthMax usage must be String type ");return this._signalStrengthMax=e,this}},{key:"withsignalStrengthMin",value:function(e){if("string"!=typeof e)throw new Error("Parameter signalStrengthMin usage must be String type ");return this._signalStrengthMin=e,this}},{key:"withsignalQuality",value:function(e){if("string"!=typeof e)throw new Error("Parameter signalQuality usage must be String type ");return this._signalQuality=e,this}},{key:"withsignalQualityMax",value:function(e){if("string"!=typeof e)throw new Error("Parameter signalQualityMax usage must be String type ");return this._signalQualityMax=e,this}},{key:"withsignalQualityMin",value:function(e){if("string"!=typeof e)throw new Error("Parameter signalQualityMin usage must be String type ");return this._signalQualityMin=e,this}},{key:"composeElement",value:function(){return{mr:this._mr,apn:this._apn,bcch:this._bcch,cgi:this._cgi,cellId:this._cellId,lac:this._lac,ratType:this._ratType,plmn:this._plmn,timingAdvance:this._timingAdvance,signalStrength:this._signalStrength,signalStrengthMax:this._signalStrengthMax,signalStrengthMin:this._signalStrengthMin,signalQuality:this._signalQuality,signalQualityMax:this._signalQualityMax,signalQualityMin:this._signalQualityMin}}}]),e}();r.default=o,t.exports=r.default},{}],169:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("./enum/POWER_SUPPLY_SOURCE_ENUM"),a=e("./enum/BATTERY_CHARGE_STATUS_ENUM"),u=e("./enum/BATTERY_CHARGE_LEVEL_STATUS_ENUM"),s=e("./enum/LEVEL_TREND_ENUM"),c=function(){function e(){n(this,e),this._source=void 0,this._status=void 0,this._trend=void 0,this._batteryStatus=void 0,this._percentage=void 0,this._outageDate=void 0,this._outageDuration=void 0}return i(e,[{key:"withSource",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter source must be string type and cannot be empty");return this._source=this._checkValues(e,o.POWER_SUPPLY_SOURCE_ENUM),this}},{key:"withStatus",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter status must be string type and cannot be empty");return this._status=this._checkValues(e,a.BATTERY_CHARGE_STATUS_ENUM),this}},{key:"withBatteryChargeLevelTrend",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter trend must be string type and cannot be empty");return this._trend=this._checkValues(e,s.LEVEL_TREND_ENUM),this}},{key:"withBatteryChargeLevelStatus",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter Battery Charge Level Status must be string type and cannot be empty");return this._batteryStatus=this._checkValues(e,u.BATTERY_CHARGE_LEVEL_STATUS_ENUM),this}},{key:"withBatteryChargeLevelPercentage",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter percentage must be string type and cannot be empty");return this._percentage=e,this}},{key:"withOutageDate",value:function(e){if(!this._isValidDate(e))throw new Error("The outageDate parameter has a wrong format. Example of rigth format is 2015-07-16T19:20:30+01:00");return this._outageDate=e,this}},{key:"withOutageDuration",value:function(e){if("number"!=typeof e||0===e.length)throw new Error("Parameter duration must be number type and cannot be empty");return this._outageDuration=e,this}},{key:"_checkValues",value:function(e,t){var r=[];return void 0===t.find(function(e){return e==this},e)&&r.push(e),0!==r.length&&console.warn("Parameter value not allowed <'"+JSON.stringify(r)+"'>, allowed <'"+JSON.stringify(t)+"'>"),e}},{key:"_isValidDate",value:function(e){if(""===e||null===e)return!1;var t=e.match(/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\+(\d{2}):(\d{2})/);if(null===t||"object"!=typeof t)return!1;if("object"!=typeof t&&null!==t&&3!==t.size)return!1;var r=!0,n=(new Date).getFullYear();return(t[1].length<4||t[1]<1999||t[1]>n)&&(r=!1),(t[2].length<2||t[2]<1||t[2]>12)&&(r=!1),(t[3].length<2||t[3]<1||t[3]>31)&&(r=!1),r}},{key:"composeElement",value:function(){var e={source:this._source,status:this._status,batteryChargeLevel:{trend:this._trend,status:this._batteryStatus,percentage:this._percentage}};return void 0===this._outageDate&&void 0===this._outageDuration||(e.outage={timestamp:this._outageDate,duration:this._outageDuration}),e}}]),e}();r.default=c,t.exports=r.default},{"./enum/BATTERY_CHARGE_LEVEL_STATUS_ENUM":177,"./enum/BATTERY_CHARGE_STATUS_ENUM":178,"./enum/LEVEL_TREND_ENUM":179,"./enum/POWER_SUPPLY_SOURCE_ENUM":180}],170:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("q"),a=(function(e){e&&e.__esModule}(o),e("./enum/SOFTWARE_TYPE_ENUM")),u=function(){function e(){n(this,e),this._name=void 0,this._type=void 0,this._version=void 0,this._date=void 0}return i(e,[{key:"withName",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter name must be a string and cannot be empty");return this._name=e,this}},{key:"withType",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter type must be a string and cannot be empty");return this._type=this._checkValues(e,a.SOFTWARE_TYPE_ENUM),this}},{key:"withVersion",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter version must be a string and cannot be empty");return this._version=e,this}},{key:"withDate",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter date must be a string and cannot be empty");return this._date=e,this}},{key:"_checkValues",value:function(e,t){var r=[];return void 0===t.find(function(e){return e==this},e)&&r.push(e),0!==r.length&&console.warn("Parameter value not allowed <'"+JSON.stringify(r)+"'>, allowed <'"+JSON.stringify(t)+"'>"),e}},{key:"composeElement",value:function(){return{name:this._name,type:this._type,version:this._version,date:this._date}}}]),e}();r.default=u,t.exports=r.default},{"./enum/SOFTWARE_TYPE_ENUM":181,q:117}],171:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./Usage"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this._unit=void 0,this._total=void 0}return i(t,e),o(t,[{key:"withUnit",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter unit must be String type and cannot be empty");return this._unit=e,this}},{key:"withTotal",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter total must be string type and cannot be empty");return this._total=e,this}},{key:"composeElement",value:function(){var e=a(Object.getPrototypeOf(t.prototype),"composeElement",this).call(this);return{unit:this._unit,total:this._total,usage:e}}}]),t}(s.default);r.default=c,t.exports=r.default},{"./Usage":174}],172:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("./Hardware"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),u=function(){function e(){n(this,e),this._id=void 0,this._name=void 0,this._type=void 0,this._hardware=void 0}return i(e,[{key:"withId",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter id must be a string and cannot be empty");return this._id=e,this}},{key:"withName",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter name must be a string and cannot be empty");return this._name=e,this}},{key:"withType",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter type must be a string and cannot be empty");return this._type=e,this}},{key:"withHardware",value:function(e){if(!(e instanceof a.default))throw new Error("Parameter hardware must be hardware type");return this._hardware=e,this}},{key:"composeElement",value:function(){var e={id:this._id,name:this._name,type:this._type};return void 0!==this._hardware&&(e.hardware=this._hardware.composeElement()),e}}]),e}();r.default=u,t.exports=r.default},{"./Hardware":167}],173:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("./enum/ADDRESS_TYPE_ENUM"),a=function(){function e(){n(this,e),this._id=void 0,this._name=void 0,this._type=void 0,this._description=void 0,this._operator=void 0,this._imsi=void 0,this._msisdn=void 0,this._addressType=void 0,this._addressValue=void 0,this._addressApn=void 0}return i(e,[{key:"withId",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter id must be a string and cannot be empty");return this._id=e,this}},{key:"withName",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter name must be a string and cannot be empty");return this._name=e,this}},{key:"withType",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter type must be a string and cannot be empty");return this._type=e,this}},{key:"withDescription",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter description must be a string and cannot be empty");return this._description=e,this}},{key:"withOperator",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter operator must be a string and cannot be empty");return this._operator=e,this}},{key:"withImsi",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter imsi must be a string and cannot be empty");return this._imsi=e,this}},{key:"withMsisdn",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter msisdn must be a string and cannot be empty");return this._msisdn=e,this}},{key:"withAddressType",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter addressType must be a string and cannot be empty");return this._addressType=this._checkValues(e,o.ADDRESS_TYPE_ENUM),this}},{key:"withAddressValue",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter addressValue must be a string and cannot be empty");return this._addressValue=e,this}},{key:"withAddressApn",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter addressApn must be a string and cannot be empty");return this._addressApn=e,this}},{key:"_checkValues",value:function(e,t){var r=[];return void 0===t.find(function(e){return e==this},e)&&r.push(e),0!==r.length&&console.warn("Parameter value not allowed <'"+JSON.stringify(r)+"'>, allowed <'"+JSON.stringify(t)+"'>"),e}},{key:"composeElement",value:function(){return{id:this._id,name:this._name,type:this._type,description:this._description,operator:this._operator,imsi:this._imsi,msisdn:this._msisdn,address:{type:this._addressType,value:this._addressValue,apn:this._addressApn}}}}]),e}();r.default=a,t.exports=r.default},{"./enum/ADDRESS_TYPE_ENUM":175}],174:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function(){function e(){n(this,e),this._usageUnit=void 0,this._current=void 0,this._average=void 0,this._maximum=void 0,this._minimum=void 0}return i(e,[{key:"withUsageUnit",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter unit usage must be String type and cannot be empty");return this._usageUnit=e,this}},{key:"withCurrent",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter current must be string type and cannot be empty");return this._current=e,this}},{key:"withAverage",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter average must be string type and cannot be empty");return this._average=e,this}},{key:"withMaximum",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter maximum must be string type and cannot be empty");return this._maximum=e,this}},{key:"withMinimum",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter minimum must be string type and cannot be empty");return this._minimum=e,this}},{key:"composeElement",value:function(){return{unit:this._usageUnit,current:this._current,average:this._average,maximum:this._maximum,minimum:this._minimum}}}]),e}();r.default=o,t.exports=r.default},{}],175:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["IPV4","IPV6","MAC"];r.ADDRESS_TYPE_ENUM=n},{}],176:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["OK","SHORT_CIRCUIT","OPEN","UNKONW"];r.ANTENNA_STATUS_ENUM=n},{}],177:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["CHARGING","CHARGED"];r.BATTERY_CHARGE_LEVEL_STATUS_ENUM=n},{}],178:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["NORMAL","LOW_CRITICAL","LOW_WARNING","MEDIUM","COMPLETE"];r.BATTERY_CHARGE_STATUS_ENUM=n},{}],179:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["RISING","DECREASING","FLAT","EMPTY"];r.LEVEL_TREND_ENUM=n},{}],180:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["NETWORK_PLUGGED","DIESEL_GENERATOR","SOLAR","BATTERY","OTHER"];r.POWER_SUPPLY_SOURCE_ENUM=n},{}],181:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["FIRMWARE","SOFTWARE"];r.SOFTWARE_TYPE_ENUM=n},{}],182:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["NORMAL","LOW_CRITICAL","LOW_WARNING","HIGH_WARNING","HIGH_CRITICAL"];r.TEMPERATURE_STATUS_ENUM=n},{}],183:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../provision/BaseProvision"),c=n(s),l=e("./enum/_CONNECTOR_FUNCTIONS_ENUMS"),f=e("q"),d=n(f),h=function(e){function t(e,r,n,o,a){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/organizations"),this.withOrganization(r),this.withChannel(n),o&&this.withIdentifier(o),a&&(a.name&&this.withName(a.name),a.operationName&&this.withOperationName(a.operationName),a.operationalStatus&&this.withOperationalStatus(a.operationalStatus),a.type&&this.withType(a.type),a.payloadType&&this.withPayloadType(a.payloadType),a.description&&this.withDescription(a.description),a.northCriterias&&this.withNorthCriterias(a.northCriterias),a.southCriterias&&this.withSouthCriterias(a.southCriterias),a.javascript&&this.withJavascript(a.javascript))}return o(t,e),a(t,[{key:"withOrganization",value:function(e){if("string"!=typeof e||0===e.length||e.length>50)throw new Error("Parameter organization must be a string, cannot be empty and has a maximum length of 50");return this._organization=e,this}},{key:"withChannel",value:function(e){if("string"!=typeof e||0===e.length||e.length>50)throw new Error("Parameter channel must be a string, cannot be empty and has a maximum length of 50");return this._channel=e,this}},{key:"withIdentifier",value:function(e){if("string"!=typeof e||0===e.length||e.length>50)throw new Error("Parameter identifier must be a string, cannot be empty and has a maximum length of 50");return this._identifier=e,this}},{key:"withName",value:function(e){if("string"!=typeof e||0===e.length||e.length>50)throw new Error("Parameter name must be a string, cannot be empty and has a maximum length of 50");return this._name=e,this}},{key:"withDescription",value:function(e){if("string"!=typeof e||e.length>250)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_250",parameter:"description"});return this._description=e,this}},{key:"withOperationName",value:function(e){if("string"!=typeof e||0===e.length||e.length>50)throw new Error("Parameter operation name must be a string, cannot be empty and has a maximum length of 50");return this._operationName=e,this}},{key:"withJavascript",value:function(e){if("string"!=typeof e)throw new Error("Parameter javascript must be a string");return this._javascript=e,this}},{key:"withNorthCriterias",value:function(e){if(!(e instanceof Array)||0===e.length)throw new Error("Parameter north criteria must be an array and cannot be empty");return this._northCriterias=e,this}},{key:"withSouthCriterias",value:function(e){var t=this;if(!(e instanceof Array)||0===e.length)throw new Error("Parameter south criteria must be an array and cannot be empty");return e.forEach(function(e){try{t.addSouthCriteria(e)}catch(e){throw t._southCriterias=null,e}}),this}},{key:"addSouthCriteria",value:function(e){if("string"!=typeof e)throw new Error("South criteria must be a string");return this._southCriterias||(this._southCriterias=[]),this._southCriterias.push(e),this}},{key:"withType",value:function(e){if("string"!=typeof e||!this._checkValues(e,l.CONNECTOR_FUNCTION_TYPES))throw new Error("Parameter type must be a string and must be one of these values: "+l.CONNECTOR_FUNCTION_TYPES);return this._type=e,this}},{key:"withPayloadType",value:function(e){if("string"!=typeof e||!this._checkValues(e,l.CONNECTOR_FUNCTION_PAYLOAD_TYPES))throw new Error("Parameter payload type must be a string and must be one of these values: "+l.CONNECTOR_FUNCTION_PAYLOAD_TYPES);return this._payloadType=e,this}},{key:"withOperationalStatus",value:function(e){if("string"!=typeof e||!this._checkValues(e,l.CONNECTOR_FUNCTION_OPERATIONAL_STATUS))throw new Error("Parameter operational status must be a string and must be one of these values: "+l.CONNECTOR_FUNCTION_OPERATIONAL_STATUS);return this._operationalStatus=e,this}},{key:"_composeElement",value:function(){return{identifier:this._identifier,name:this._name,operationalStatus:this._operationalStatus,operationName:"COLLECTION"!==this._type?this._operationName:void 0,type:this._type,payloadType:this._payloadType,javascript:this._javascript,description:this._description?this._description:void 0,northCriterias:"REQUEST"===this._type?this._northCriterias:void 0,southCriterias:"REQUEST"!==this._type?this._southCriterias:void 0}}},{key:"_checkRequiredParameters",value:function(e){if(e){if(void 0===this._identifier||void 0===this._organization||void 0===this._channel||void 0===this._operationalStatus||void 0===this._type||void 0===this._payloadType||void 0===this._javascript)throw new Error("Parameters organization, channel, operational status, type, payloadType, javascript and identifier must be defined")}else if(void 0===this._name||void 0===this._organization||void 0===this._channel||void 0===this._operationalStatus||void 0===this._type||void 0===this._payloadType||void 0===this._javascript)throw new Error("Parameters organization, channel, operational status, type, payloadType, javascript and name must be defined");if("REQUEST"===this._type&&"JSON"!==this._payloadType)throw new Error("Parameter payload type must be JSON when type REQUEST")}},{key:"_buildURL",value:function(){return"connectorFunctions/"+this._resource+"/"+this._organization+"/channels/"+this._channel+"/"}},{key:"create",value:function(){return this._checkRequiredParameters(),this._doNorthPost(this._buildURL(),this._composeElement())}},{key:"update",value:function(){return this._checkRequiredParameters(!0),this._doNorthPut(this._buildURL()+this._identifier,this._composeElement())}},{key:"delete",value:function(){if(void 0===this._identifier||void 0===this._organization||void 0===this._channel)throw new Error("Parameters organization, channel and name must be defined");var e=d.default.defer(),t=e.promise;return this._ogapi.Napi.delete(this._buildURL()+this._identifier).then(function(t){200===t.statusCode?e.resolve({statusCode:t.statusCode}):e.reject({errors:t.errors,statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}}]),t}(c.default);r.default=h,t.exports=r.default},{"../provision/BaseProvision":235,"./enum/_CONNECTOR_FUNCTIONS_ENUMS":186,q:117}],184:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../GenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"connectorFunctions/provision/organizations","connectorFunctions","Connector functions not found")}return i(t,e),o(t,[{key:"findByOrganizationAndChannel",value:function(e,t){var r=this;return r._organization=e,r._channel=t,this._execute()}},{key:"findByOrganizationAndChannelAndName",value:function(e,t,r){var n=this;return n._organization=e,n._channel=t,n._name=r,this._execute()}},{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._organization+"/channels/"+this._channel+(this._name?"/"+this._name:"")}}]),t}(s.default);r.default=c,t.exports=r.default},{"../GenericFinder":138}],185:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0})
27
27
  ;var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../GenericFinder"),c=n(s),l=e("q"),f=n(l),d=e("http-status-codes"),h=n(d),p=e("./enum/_CONNECTOR_FUNCTIONS_ENUMS"),y=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"connectorFunctions"),this._jsHeaders={accept:"application/javascript"},this._mdHeaders={accept:"text/markdown"}}return o(t,e),a(t,[{key:"getdDummyFunctions",value:function(){return this._setExtraHeaders(this._jsHeaders),this._id="doc/jsApi/javascript",this._execute()}},{key:"getDocPrivateJavascriptFunctions",value:function(){return this._setExtraHeaders(this._mdHeaders),this._id="doc/jsApi/internal",this._execute()}},{key:"getDocJavascriptFunctions",value:function(){return this._setExtraHeaders(this._mdHeaders),this._id="doc/jsApi/client",this._execute()}},{key:"_execute",value:function(){var e=f.default.defer(),t=e.promise,r=this._error_not_found;return this._api.get(this._composeUrl(),void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(t){204===t.statusCode?e.reject({error:r,statusCode:h.default.NOT_FOUND}):e.resolve({data:t,statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}},{key:"getSouthCriteriasProtocols",value:function(){return p.CONNECTOR_FUNCTION_SOUTH_PROTOCOLS}},{key:"getPayloadTypes",value:function(){return p.CONNECTOR_FUNCTION_PAYLOAD_TYPES}}]),t}(c.default);r.default=y,t.exports=r.default},{"../GenericFinder":138,"./enum/_CONNECTOR_FUNCTIONS_ENUMS":186,"http-status-codes":76,q:117}],186:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["DISABLED","PRODUCTION","TEST"];r.CONNECTOR_FUNCTION_OPERATIONAL_STATUS=n;var i=["COLLECTION","REQUEST","RESPONSE"];r.CONNECTOR_FUNCTION_TYPES=i;var o=["TEXT","JSON","BINARY"];r.CONNECTOR_FUNCTION_PAYLOAD_TYPES=o;var a=["https://","wss://","mqtts://"];r.CONNECTOR_FUNCTION_SOUTH_PROTOCOLS=a},{}],187:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../GenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"datasets/provision/organizations","datasets")}return i(t,e),o(t,[{key:"findByOrganization",value:function(e){return this._withId(e),this._execute()}},{key:"findByOrganizationAndDatasetId",value:function(e,t){return this._withId(e+"/"+t),this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../GenericFinder":138}],188:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../provision/BaseProvision"),c=n(s),l=e("../util/formats/check_types"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/organizations/",void 0,["name","organization","columns","identifierColumn"])}return o(t,e),a(t,[{key:"_buildURL",value:function(){return"datasets/provision/organizations/"+this._organization+"/"+this._identifier}},{key:"withOrganization",value:function(e){return f.default._checkStringAndLength(e,50,"organization"),this._organization=e,this}},{key:"withIdentifier",value:function(e){return f.default._checkString(e,"identifier"),this._identifier=e,this}},{key:"withName",value:function(e){return f.default._checkString(e,"name"),this._name=e,this}},{key:"withIdentifierColumn",value:function(e){return f.default._checkString(e,"identifierColumn"),this._identifierColumn=e,this}},{key:"withDescription",value:function(e){return e&&f.default._checkString(e,"description"),this._description=e,this}},{key:"withColumns",value:function(e){return f.default._checkArray(e,"columns"),this._columns=e,this}},{key:"_composeElement",value:function(){return this._resource="datasets/provision/organizations/"+this._organization,{name:this._name,description:this._description,type:this._type,identifierColumn:this._identifierColumn,columns:this._columns}}},{key:"update",value:function(){throw new Error("OGAPI_DAATASET_NOT_UPDATED")}}]),t}(c.default);r.default=d,t.exports=r.default},{"../provision/BaseProvision":235,"../util/formats/check_types":343}],189:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("q"),c=(n(s),e("../provision/BaseProvision")),l=n(c),f=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/domains"),this._ogapi=e}return o(t,e),a(t,[{key:"withName",value:function(e){if("string"!=typeof e||e.length>50)throw new Error("OGAPI_NAME_PARAMETER_MAX_LENGTH_50");return this._name=e,this}},{key:"withDescription",value:function(e){if("string"!=typeof e||e.length>250)throw new Error("OGAPI_DESCRIPTION_PARAMETER_MAX_LENGTH_250");return this._description=e,this}},{key:"withParentDomain",value:function(e){if("string"!=typeof e||e.length>50)throw new Error("OGAPI_DOMAIN_PARAMETER_MAX_LENGTH_50");return this._parentDomain=e,this}},{key:"_composeElement",value:function(){if(void 0===this._name)throw new Error({message:"OGAPI_DEFINED_PARAMETER",parameter:"name"});return{domain:{name:this._name||void 0,description:this._description||void 0,parentDomain:this._parentDomain||void 0}}}},{key:"_buildURL",value:function(){return this._resource+"/"+this._name}},{key:"_composeUpdateElement",value:function(){var e=u(Object.getPrototypeOf(t.prototype),"_composeUpdateElement",this).call(this);return delete e.domain.name,e}}]),t}(l.default);r.default=f,t.exports=r.default},{"../provision/BaseProvision":235,q:117}],190:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../ProvisionGenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"domains","domain","Domain not found")}return i(t,e),o(t,[{key:"_composeUrl",value:function(){return this._setUrlParameters({hierarchy:this._hierarchy}),this._baseUrl+"/"+this._name}},{key:"findByName",value:function(e){return this._name=e,this._hierarchy="false",this._execute()}},{key:"findByNameWithHierarchy",value:function(e){return this._name=e,this._hierarchy="true",this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../ProvisionGenericFinder":140}],191:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},a=e("./EntityFinder"),u=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(e){function t(e){n(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"device","Device not found")}return i(t,e),t}(u.default);r.default=s,t.exports=r.default},{"./EntityFinder":192}],192:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../ProvisionGenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e,r,i,o){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"organizations",r||"entity",i||"Entity not found"),this._entitySource=o||"entities",this._flattened=!1}return i(t,e),o(t,[{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._organization+"/"+this._entitySource+"/"+this._id}},{key:"findByOrganizationAndId",value:function(e,t,r){return this._organization=e,this._id=t,this._setUrlParameters({flattened:!!r}),this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../ProvisionGenericFinder":140}],193:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},a=e("./EntityFinder"),u=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(e){function t(e){n(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"subscriber","Subscriber not found")}return i(t,e),t}(u.default);r.default=s,t.exports=r.default},{"./EntityFinder":192}],194:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},a=e("./EntityFinder"),u=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(e){function t(e){n(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"subscription","Subscription not found")}return i(t,e),t}(u.default);r.default=s,t.exports=r.default},{"./EntityFinder":192}],195:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},a=e("./EntityFinder"),u=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(e){function t(e){n(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"ticket","Ticket not found","tickets")}return i(t,e),t}(u.default);r.default=s,t.exports=r.default},{"./EntityFinder":192}],196:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("q"),c=n(s),l=e("../provision/BaseProvision"),f=n(l),d=e("../util/formats/check_types"),h=n(d),p=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/geocluster",void 0,"identifier")}return o(t,e),a(t,[{key:"_buildURL",value:function(){return"provision/geocluster/"+this._identifier+"/clustering"}},{key:"withIdentifier",value:function(e){return h.default._checkStringAndLength(e,50,"identifier"),this._identifier=e,this}},{key:"_composeElement",value:function(){this._resource="provision/geocluster/"+this._identifier+"/clustering"}},{key:"_composeElementUpdate",value:function(){return u(Object.getPrototypeOf(t.prototype),"_composeUpdateElement",this).call(this)}},{key:"update",value:function(){var e=c.default.defer(),t=e.promise;return this._ogapi.Napi.put(this._buildURL(),this._composeElementUpdate(),void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(t){200===t.statusCode?e.resolve({statusCode:t.statusCode}):200===t.status?e.resolve({statusCode:t.status}):e.reject({errors:t.errors,statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}}]),t}(f.default);r.default=p,t.exports=r.default},{"../provision/BaseProvision":235,"../util/formats/check_types":343,q:117}],197:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../ProvisionGenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"geocluster","geocluster","Geocluster not found")}return i(t,e),o(t,[{key:"findById",value:function(e){return this._id=e,this._setUrlParameters(),this._execute()}},{key:"findAll",value:function(){return this._id=void 0,this._setUrlParameters(),this._execute()}},{key:"findFeatures",value:function(e,t){var r=t.zoom,n=t.topRight,i=t.bottomLeft;return this._id=e,this._setUrlParameters({zoom:r,topRight:n,bottomLeft:i}),this._execute()}},{key:"_composeUrl",value:function(){return this._id?this._getUrlParameters()?this._baseUrl+"/"+this._id+"/view":this._baseUrl+"/"+this._id:this._baseUrl}}]),t}(s.default);r.default=c,t.exports=r.default},{"../ProvisionGenericFinder":140}],198:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("./Datastream"),a=(function(e){e&&e.__esModule}(o),function(){function e(t,r,i){n(this,e),this._ogapi=t,this._isValidString(r,"identifier",50),this._identifier=r,this._datastreams=i||[]}return i(e,[{key:"withName",value:function(e){return this._isValidString(e,"name",100),this._name=e,this}},{key:"addDatastream",value:function(e){if(!e||"object"!=typeof e)throw new Error("Datastream must be an object");return this._datastreams.push(e),this}},{key:"addDatastreams",value:function(e){var t=this;if(!Array.isArray(e))throw new Error("Datastreams must be an array");var r=[];if(e.forEach(function(e,n){try{t.addDatastream(e)}catch(e){r.push("Error on datastream with index ["+n+"]: "+e)}}),r.length>0)throw new Error("Error adding datastreams: "+JSON.stringify(r));return this}},{key:"_isValidString",value:function(e,t,r){if("string"!=typeof e||0===e.length||e.length>r)throw new Error("Parameter "+t+" must be a string, cannot be empty and has a maximum length of "+r+" on Category")}},{key:"_composeElement",value:function(){if(!this._identifier)throw new Error("identifier is required on Category");return{identifier:this._identifier,name:this._name?this._name:void 0,datastreams:this._datastreams}}}]),e}());r.default=a,t.exports=r.default},{"./Datastream":199}],199:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("ajv"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),u=function(){function e(){n(this,e)}return i(e,[{key:"withId",value:function(e){return this._isValidString(e,"id",100),this._id=e,this}},{key:"withName",value:function(e){return this._isValidString(e,"name",100),this._name=e,this}},{key:"withDescription",value:function(e){return e&&this._isValidString(e,"description",500),this._description=e,this}},{key:"withUnit",value:function(e,t,r){return this._isValidString(e,"type",500),this._isValidString(t,"label",500),this._isValidString(r,"symbol",10),this._unit={type:e,label:t,symbol:r},this}},{key:"withPeriod",value:function(e){return this._isValidString(e,"period",500),this._period=e,this}},{key:"withSchema",value:function(e){if(!e||"object"!=typeof e)throw new Error("Schema must be an object or a string on Datastream");return this._schema=e,this}},{key:"withTags",value:function(e){if(e){if(!Array.isArray(e))throw new Error("Tags must be an array on Datastream");this._tags=e}return this}},{key:"addQrating",value:function(e){if(!e||"object"!=typeof e)throw new Error("Qrating must be an instance of object on Datastream");return this._qrating=e,this}},{key:"withStorage",value:function(e,t){if(this._isValidString(e,"period",500),!t||"number"!=typeof t)throw new Error("Total must be a number on Datastream");return this._storage={total:t,period:e},this}},{key:"withAccess",value:function(e){if(this._isValidString(e,"access",50),!e)throw new Error("Access must be a valid string");return this._access=e,this}},{key:"withHardwaresIds",value:function(e){if(e&&!Array.isArray(e))throw new Error("hardware Ids must be an array on Datastream");return this._hardwares=e,this}},{key:"build",value:function(){if(!this._id)throw new Error("Id is required on Datastream");if(!this._name)throw new Error("Name is required on Datastream");if(!this._unit)throw new Error("Unit is required on Datastream");if(!this._period)throw new Error("Period is required on Datastream");if(!this._schema)throw new Error("Schema is required on Datastream");try{(new a.default).compile(this._schema)}catch(e){throw new Error("Schema not valid: "+e)}return{identifier:this._id,name:this._name,description:this._description,period:this._period,tags:this._tags,unit:this._unit,schema:this._schema,qrating:this._qrating,storage:this._storage,hardwareIds:this._hardwares,access:this._access}}},{key:"_isValidString",value:function(e,t,r){if("string"!=typeof e||0===e.length||e.length>r)throw new Error("Parameter "+t+" must be a string, cannot be empty and has a maximum length of "+r+" on Datastream")}}]),e}();r.default=u,t.exports=r.default},{ajv:2}],200:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function(){function e(){n(this,e)}return i(e,[{key:"withMinRequired",value:function(e,t){return this._isValidString(e,"label",50),this._isValidNumber(t,"value"),this._minRequired={label:e,value:t},this}},{key:"withMinDesired",value:function(e,t){return this._isValidString(e,"label",50),this._isValidNumber(t,"value"),this._minDesired={label:e,value:t},this}},{key:"withIdeal",value:function(e,t){return this._isValidString(e,"label",50),this._isValidNumber(t,"value"),this._ideal={label:e,value:t},this}},{key:"withMaxDesired",value:function(e,t){return this._isValidString(e,"label",50),this._isValidNumber(t,"value"),this._maxDesired={label:e,value:t},this}},{key:"withMaxAllowed",value:function(e,t){return this._isValidString(e,"label",50),this._isValidNumber(t,"value"),this._maxAllowed={label:e,value:t},this}},{key:"withMaxScore",value:function(e){return this._isValidNumber(e,"maxScore"),this._maxScore=e,this}},{key:"withCumulativePeriodDivisor",value:function(e){return e&&this._isValidNumber(e,"cumulativePeriodDivisor"),this._cumulativePeriodDivisor=e,this}},{key:"withConversionMatrix",value:function(e){if(e&&"object"!=typeof e)throw new Error("ConversionMatrix must be an object on Qrating");return this._conversionMatrix=e,this}},{key:"withVersion",value:function(e){return this._isValidString(e,"version",100),this._version=e,this}},{key:"build",value:function(){if(!this._version)throw new Error("Version is required on Qrating");if(!this._minRequired)throw new Error("MinRequired is required on Qrating");if(!this._minDesired)throw new Error("MinDesired is required on Qrating");if(!this._ideal)throw new Error("Ideal is required on Qrating");if(!this._maxDesired)throw new Error("MaxDesired is required on Qrating");if(!this._maxAllowed)throw new Error("MaxAllowed is required on Qrating");if(!this._maxScore)throw new Error("MaxScore is required on Qrating");return{min_required:this._minRequired,min_desired:this._minDesired,ideal:this._ideal,max_desired:this._minDesired,max_allowed:this._maxAllowed,max_score:this._maxScore,cumulative_period_divisor:this._cumulativePeriodDivisor,conversion_matrix:this._conversionMatrix,version:this._version}}},{key:"_isValidString",value:function(e,t,r){if("string"!=typeof e||0===e.length||e.length>r)throw new Error("Parameter "+t+" must be a string, cannot be empty and has a maximum length of "+r+" on Qrating")}},{key:"_isValidNumber",value:function(e,t){if("number"!=typeof e)throw new Error("Parameter "+t+" must be a number, cannot be empty on Qrating")}}]),e}();r.default=o,t.exports=r.default},{}],201:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../../provision/BaseProvision"),c=n(s),l=e("../catalog/Category"),f=n(l),d=e("../catalog/Datastream"),h=(n(d),"/organizations");r.PRE_RESOURCE=h;var p="/datamodels";r.DATAMODELS_RESOURCE=p;var y=function(e){function t(e,r){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,h),this._isValidString(r,"organization",50),this._organization=r,this._categories=[],this._resourceType=[],this._resource=this._resource+"/"+this._organization+p}return o(t,e),a(t,[{key:"withIdentifier",value:function(e){return this._isValidString(e,"identifier",100),this._identifier=e,this}},{key:"withName",value:function(e){return this._isValidString(e,"name",100),this._name=e,this}},{key:"withVersion",value:function(e){return this._isValidString(e,"version",100),this._version=e,this}},{key:"withDescription",value:function(e){return e&&this._isValidString(e,"description",100),this._description=e,this}},{key:"addAllowedResourceType",value:function(e){return e&&this._isValidString(e,"resourceType",100),this._resourceType.push(e),this}},{key:"addCategory",value:function(e,t){var r=e.identifier;if(!r||this._isValidString(r,"category",100))throw new Error("Category identifier is required");this._categories.forEach(function(e,t){if(r===e.identifier)throw new Error("Category "+r+" already exists.")});var n=new f.default(this._ogapi,r);return e.name&&n.withName(e.name),t&&t.length>0&&n.addDatastreams(t),this._categories.push(n._composeElement()),this}},{key:"addDatastream",value:function(e,t){this._isValidString(e,"category",100);var r=-1;if(this._categories.forEach(function(t,n){t.identifier===e&&(r=n)}),-1===r)throw new Error("Category "+e+" not exists for this datamodel. Use addCategory instead.");return this._categories[r].datastreams?this._categories[r].datastreams.push(t):this._categories[r].datastreams=[t],this}},{key:"_composeElement",value:function(){if(!this._name)throw new Error("name is required on IoTDatamodel")
@@ -38,4 +38,4 @@ if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}fu
38
38
  ;return this._api.get(this._downloadUrl(),void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(t){204===t.statusCode?e.reject({data:r,statusCode:h.default.NOT_FOUND}):e.resolve({data:t,statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}}]),t}(c.default);r.default=y,t.exports=r.default},{"../ProvisionGenericFinder":140,"./MIME_TYPES_ENUM":329,"http-status-codes":76,q:117}],328:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_get=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},_Security2=require("./Security"),_Security3=_interopRequireDefault(_Security2),_q=require("q"),_q2=_interopRequireDefault(_q),_ADMINISTRATIVE_STATE_ENUM=require("./ADMINISTRATIVE_STATE_ENUM"),_USAGES_ENUM=require("./USAGES_ENUM"),max_length_name=50,max_length_id=50,max_length_description=200,Certificates=function(_Security){function Certificates(e){_classCallCheck(this,Certificates),_get(Object.getPrototypeOf(Certificates.prototype),"constructor",this).call(this,e,"/certificates")}return _inherits(Certificates,_Security),_createClass(Certificates,[{key:"withId",value:function(e){if("string"!=typeof e||0===e.length||e.length>max_length_id)throw new Error("Parameter id must be a string, cannot be empty and has a maximum length of "+max_length_id);return this._id=e,this}},{key:"withName",value:function(e){if("string"!=typeof e||0===e.length||e.length>max_length_name)throw new Error("Parameter name must be a string, cannot be empty and has a maximum length of "+max_length_name);return this._name=e,this}},{key:"withDescription",value:function(e){if("string"!=typeof e||0===e.length||e.length>max_length_description)throw new Error("Parameter description must be a string, cannot be empty and has a maximum length of "+max_length_description);return this._description=e,this}},{key:"withAdministrativeState",value:function(e){if("string"!=typeof e||e.length<=0)throw new Error("Parameter administrativeState must be typeof string and cannot be empty");var t="";if(void 0===_ADMINISTRATIVE_STATE_ENUM.ADMINISTRATIVE_STATE_ENUM.find(function(e){return e==this},e)&&(t=e),""!==t)throw new Error("Parameter in administrativeState is not allowed. Parameter value '"+JSON.stringify(t)+"', parameters allowed in administrativeState are: '"+JSON.stringify(_ADMINISTRATIVE_STATE_ENUM.ADMINISTRATIVE_STATE_ENUM)+"'");return this._administrativeState=e,this}},{key:"withUsages",value:function(e){if(void 0===e||e.constructor!==Array||0===e.length)throw new Error("Parameter usages must be typeof Array and cannot be empty");for(var t=[],r=0;r<e.length;r++){void 0===_USAGES_ENUM.USAGES_ENUM.find(function(e){return e==this},e[r])&&t.push(e[r])}if(0!==t.length)throw new Error("There are not any parameters allowed. Parameters value: '"+JSON.stringify(t)+"'. Usages parameters allowed are: '"+JSON.stringify(_USAGES_ENUM.USAGES_ENUM)+"'");return this._usages=e,this}},{key:"withHardware",value:function(e){var t=[];if(void 0===e||e.constructor!==Array||0===e.length)throw new Error("Parameter hardwares must be typeof Array and cannot be empty");for(var r=0;r<e.length;r++)if(this._checkHardware(e[r]))try{e[r]=JSON.parse(e[r])}catch(e){}else t.push(r+1);if(0!==t.length)throw new Error("The hardware attribute is not well formed, the message "+JSON.stringify(t)+" not correct. Remember: hardwareId or [manufacturer, model and modelVersion] must be defined");return this._hardware=e,this}},{key:"_checkHardware",value:function _checkHardware(hardware){"string"==typeof hardware&&(hardware=eval("("+hardware+")"));var length=Object.keys(hardware).length,valid=!1;return 1===length&&hardware.hardwareId&&"string"==typeof hardware.hardwareId&&hardware.hardwareId.length>0?valid=!0:3===length&&hardware.manufacturer&&hardware.model&&hardware.modelVersion&&"string"==typeof hardware.manufacturer&&"string"==typeof hardware.model&&"string"==typeof hardware.modelVersion&&hardware.manufacturer.length>0&&hardware.model.length>0&&hardware.modelVersion.length>0&&(valid=!0),valid}},{key:"withTags",value:function(e){if(void 0===e||e.constructor!==Array||e.length<=0)throw new Error("Parameter tags must be typeof Array and cannot be empty");for(var t=[],r=0;r<e.length;r++)(void 0===e[r]||"string"!=typeof e[r]||typeof e[r].length<=0)&&t.push(e[r]);if(0!==t.length)throw new Error("The following tags values are not allowed:"+JSON.stringify(t));return this._tags=e,this}},{key:"withParameters",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter parameters must be a string, cannot be empty");return this._parameters=e,this}},{key:"withDomains",value:function(e){if(void 0===e||e.constructor!==Array||e.length<=0)throw new Error("Parameter domains must be typeof Array and cannot be empty");for(var t=[],r=0;r<e.length;r++)(void 0===e[r]||"string"!=typeof e[r]||typeof e[r].length<=0)&&t.push(e[r]);if(0!==t.length)throw new Error("The following domains values are not allowed:"+JSON.stringify(t));return this._domains=e,this}},{key:"_composeElement",value:function(){if(void 0===this._name||void 0===this._administrativeState||void 0===this._usages)throw new Error("Parameters name, usages, administrativeState must be defined");return{certificate:{id:this._id||void 0,name:this._name||void 0,description:this._description||void 0,administrativeState:this._administrativeState||void 0,usages:this._usages||void 0,hardware:this._hardware||void 0,tags:this._tags||void 0,parameters:this._parameters||void 0,domains:this._domains||void 0}}}},{key:"create",value:function(e){var t=this,r=void 0;if("string"!=typeof e){r=new FormData;var n=new Blob([JSON.stringify(this._composeElement())],{type:"application/json"});r.append("json",n);var i=new Blob([e],{type:"application/x-pem-file"});e&&r.append("certificate",i)}else r={},r.json=JSON.stringify(this._composeElement()),r.certificate=e;var o=_q2.default.defer(),a=o.promise;return this._ogapi.Napi.post_multipart(this._resource,r,{},this._timeout,this._getExtraHeaders(),this._getUrlParameters()).then(function(e){var r=e.statusCode;201===r?("function"==typeof t._onCreated&&t._onCreated(e.header.location),o.resolve({location:e.header.location,statusCode:r})):o.reject({errors:e.errors,statusCode:r})}).catch(function(e){o.reject(e)}),a}},{key:"_onCreated",value:function(e){var t=e.split("/").pop(-1);this.withId(t)}},{key:"update",value:function(){var e=this._composeElement();delete e.certificate.id;var t=_q2.default.defer(),r=t.promise;return this._ogapi.Napi.put(this._buildURL(),e,void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(e){var r=e.body;void 0===r?t.reject("Cannot update the certificate"):t.resolve(r,e.statusCode)}).catch(function(e){t.reject(e)}),r}},{key:"_buildURL",value:function(){if(void 0===this._id)throw new Error("Parameters id must be defined");return this._resource+"/"+this._id}}]),Certificates}(_Security3.default);exports.default=Certificates,module.exports=exports.default},{"./ADMINISTRATIVE_STATE_ENUM":326,"./Security":330,"./USAGES_ENUM":331,q:117}],329:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["x-pem-file","pkcs7-mime","raw","text/plain"];r.MIME_TYPES_ENUM=n},{}],330:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},a=e("../provision/BaseProvision"),u=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(e){function t(e,r,i){n(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/security"+(void 0===r?"":r),i)}return i(t,e),t}(u.default);r.default=s,t.exports=r.default},{"../provision/BaseProvision":235}],331:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["FILE_VALIDATION","DEVICE_COMMUNICATIONS","DEVICE_ACCESS","CERT_SIGN"];r.USAGES_ENUM=n},{}],332:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../provision/BaseProvision"),c=n(s),l=e("../util/formats/check_types"),f=n(l),d="timeseries/provision/organizations/";r.URL=d;var h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/organizations/",void 0,["name","organization","timeBucket","identifierColumn"])}return o(t,e),a(t,[{key:"_buildURL",value:function(){return d+this._organization+"/"+this._identifier}},{key:"withOrganization",value:function(e){return f.default._checkStringAndLength(e,50,"organization"),this._organization=e,this}},{key:"withIdentifier",value:function(e){return f.default._checkString(e,"identifier"),this._identifier=e,this}},{key:"withName",value:function(e){return f.default._checkStringAndPattern(e,"^[a-zA-Z0-9_@.-]*$","name"),this._name=e,this}},{key:"withIdentifierColumn",value:function(e){return f.default._checkString(e,"identifierColumn"),this._identifierColumn=e,this}},{key:"withTimeBucket",value:function(e){return f.default._checkNumber(e,"timeBucket"),this._timeBucket=e,this}},{key:"withDescription",value:function(e){return e&&f.default._checkString(e,"description"),this._description=e,this}},{key:"withColumns",value:function(e){return f.default._checkArray(e,"columns"),this._columns=e,this}},{key:"withBucketColumn",value:function(e){return f.default._checkStringAndPattern(e,"^[a-zA-Z0-9 _-]*$","bucketColumn"),this._bucketColumn=e,this}},{key:"withRetention",value:function(e){return f.default._checkNumber(e,"retention"),this._retention=e,this}},{key:"withOrigin",value:function(e){return f.default._checkISODateTime(e,"origin"),this._origin=e,this}},{key:"withContext",value:function(e){return f.default._checkArray(e,"context"),this._context=e,this}},{key:"_composeElement",value:function(){return this._resource=d+this._organization,this._timeBucket>0&&f.default._checkStringAndPattern(this._bucketColumn,"^[a-zA-Z0-9 _-]*$","bucketColumn"),{name:this._name,description:this._description,timeBucket:this._timeBucket,bucketColumn:this._timeBucket?this._bucketColumn:void 0,retention:this._retention,origin:this._origin,context:this._context||[],identifierColumn:this._identifierColumn,columns:this._columns||[]}}},{key:"update",value:function(){throw new Error("OGAPI_TIMESERIES_NOT_UPDATED")}}]),t}(c.default);r.default=h},{"../provision/BaseProvision":235,"../util/formats/check_types":343}],333:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../GenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"timeseries/provision/organizations","timeseries")}return i(t,e),o(t,[{key:"findByOrganization",value:function(e){return this._withId(e),this._execute()}},{key:"findByOrganizationAndTimeserieId",value:function(e,t){return this._withId(e+"/"+t),this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../GenericFinder":138}],334:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../GenericFinder"),c=n(s),l=e("q"),f=(n(l),e("http-status-codes")),d=(n(f),function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"ai","list","Transformer not found","north")}return o(t,e),a(t,[{key:"findByOrganization",value:function(e){return this._organization=e,this._execute()}},{key:"findByOrganizationAndIdentifier",value:function(e,t){return this._organization=e,this._identifier=t,this._execute()}},{key:"downloadByOrganizationAndIdentifierAndFilename",value:function(e,t,r){return this._organization=e,this._identifier=t,this._filename=r,this._download()}},{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._organization+"/transformers"+(this._identifier?"/"+this._identifier+(this._filename?"/"+this._filename:""):"")}}]),t}(c.default));r.default=d,t.exports=r.default},{"../GenericFinder":138,"http-status-codes":76,q:117}],335:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("q"),c=n(s),l=e("../provision/BaseProvision"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/organizations",void 0,["organization","files"],"north/ai"),this._ogapi=e}return o(t,e),a(t,[{key:"_buildURL",value:function(){return this._organization+"/transformers/"+this._identifier}},{key:"withIdentifier",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"identifier"});return this._identifier=e,this}},{key:"withOrganization",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"organization"});return this._organization=e,this}},{key:"addFile",value:function(e){this._files||(this._files=[]),this._files.push(e)}},{key:"withFiles",value:function(e){if(!(e instanceof Array))throw new Error({message:"Parameter files requires an array",parameter:"files"});this._files=e}},{key:"_composeElement",value:function(){return this._checkRequiredParameters(),this._resource=this._organization+"/transformers",{files:this._files||void 0}}},{key:"_composeUpdateElement",value:function(){var e=u(Object.getPrototypeOf(t.prototype),"_composeUpdateElement",this).call(this);return delete e.name,e}},{key:"performTest",value:function(e){var t=c.default.defer(),r=t.promise;return this._ogapi.Napi.post(this._buildURL()+"/transform",e,this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(e){t.resolve({statusCode:e.statusCode,body:e.body})}).catch(function(e){t.reject(e)}),r}},{key:"create",value:function(){var e=this._composeElement(),t=c.default.defer();return this._ogapi.Napi.post_multipart(this._resource,{files:e.files},{},this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(e){switch(e.statusCode){case 200:var r=""!=e.text?JSON.parse(e.text):{},n=e.status;t.resolve({data:r,statusCode:n});break;case 201:var n=e.status,i=e.header&&e.header.location;t.resolve({location:i,statusCode:n});break;case 204:t.resolve(e);break;default:t.reject({errors:e.data.errors,statusCode:e.statusCode})}}).catch(function(e){t.reject(e)}),t.promise}},{key:"update",value:function(){var e=this._composeElement(),t=c.default.defer();return this._ogapi.Napi.put_multipart(this._buildURL(),{files:e.files},{},this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(e){switch(e.statusCode){case 200:var r=""!=e.text?JSON.parse(e.text):{},n=e.status;t.resolve({data:r,statusCode:n});break;default:t.reject({errors:e.data.errors,statusCode:e.statusCode})}}).catch(function(e){t.reject(e)}),t.promise}}]),t}(f.default);r.default=d,t.exports=r.default},{"../provision/BaseProvision":235,q:117}],336:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../ProvisionGenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"users","user","User not found")}return i(t,e),o(t,[{key:"findByEmail",value:function(e){return this._id=e,this._execute()}},{key:"findByEmailAndPassword",value:function(e,t){return this._id=e,this._setExtraHeaders({"X-ApiPass":t}),this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../ProvisionGenericFinder":140}],337:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../provision/BaseProvision"),c=n(s),l=e("q"),f=(n(l),e("lodash")),d=n(f),h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/users",void 0,["email","workgroup","domain","profile","countryCode","langCode"])}return o(t,e),a(t,[{key:"withName",value:function(e){if("string"!=typeof e||e.length>100)throw new Error("Parameter name must be a string and has a maximum length of 100");return this._name=e,this}},{key:"withSurname",value:function(e){if("string"!=typeof e||e.length>100)throw new Error("Parameter surname must be a string and has a maximum length of 100");return this._surname=e,this}},{key:"withEmail",value:function(e){if("string"!=typeof e||e.length>100)throw new Error("Parameter email must be a string and has a maximum length of 100");return this._email=e,this}},{key:"withPassword",value:function(e){if("string"!=typeof e||e.length>50)throw new Error("Parameter password must be a string and has a maximum length of 50");return this._password=e,this}},{key:"withWorkgroup",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_WORKGROUP");return this._workgroup=e,this}},{key:"withDomain",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_DOMAIN");return this._domain=e,this}},{key:"withProfile",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_PROFILE");return this._profile=e,this}},{key:"withCountryCode",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_COUNTRY_CODE");return this._countryCode=e,this}},{key:"withLangCode",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_LANGUAGE");return this._langCode=e,this}},{key:"withDescription",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_DESCRIPTION");return this._description=e,this}},{key:"withTimezone",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_TIMEZONE");return this._timezone=e,this}},{key:"with2FaType",value:function(e){if("string"!=typeof e||e.length>100)throw new Error("Parameter twoFaType must be a string and has a maximum length of 100");return this._twoFaType=e,this}},{key:"_buildURL",value:function(){if(void 0===this._email)throw new Error("OGAPI_EMAIL_MUST_BE_DEFINED");return this._resource+"/"+this._email}},{key:"_composeElement",value:function(){return{user:{name:this._name||void 0,surname:this._surname||void 0,password:this._password||void 0,description:this._description||void 0,email:this._email||void 0,workgroup:this._workgroup||void 0,domain:this._domain||void 0,profile:this._profile||void 0,countryCode:this._countryCode||void 0,langCode:this._langCode||void 0,timezone:this._timezone||void 0,"2FaType":this._twoFaType||void 0}}}},{key:"_composeUpdateElement",value:function(){if(this._password)throw new Error("OGAPI_PASSWORD_NOT_ALLOWED");if(void 0===this._email)throw new Error("OGAPI_USER_UPDATE_PARAMETER_MUST_BE_DEFINED");return{user:{name:this._name||void 0,surname:this._surname||void 0,description:this._description||void 0,email:this._email||void 0,workgroup:this._workgroup||void 0,domain:this._domain||void 0,profile:this._profile||void 0,countryCode:this._countryCode||void 0,langCode:this._langCode||void 0,timezone:this._timezone||void 0,"2FaType":this._twoFaType||void 0}}}},{key:"changePassword",value:function(e){if(this._newPassword=e,d.default.isEmpty(this._email)||d.default.isEmpty(this._password)||d.default.isEmpty(this._newPassword))throw new Error("OGAPI_USER_UPDATE_PASSWORD_PARAMETER_MUST_BE_DEFINED");var t={user:{password:this._newPassword}};return this._setExtraHeaders({"X-ApiPass":this._password}),this._doNorthPut(this._buildURL(),t)}},{key:"requestResetPassword",value:function(){if(d.default.isEmpty(this._email))throw new Error("OGAPI_USER_MAIL_RESET_PASSWORD_PARAMETER_MUST_BE_DEFINED");var e=this._buildURL()+"/reset";return this._doNorthPost(e)}},{key:"updatePassword",value:function(e,t){if(this._newPassword=e,this._tokenId=t,d.default.isEmpty(this._email))throw new Error("OGAPI_USER_MAIL_RESET_PASSWORD_PARAMETER_MUST_BE_DEFINED");if(d.default.isEmpty(this._newPassword))throw new Error("OGAPI_USER_PASSWORD_RESET_PASSWORD_PARAMETER_MUST_BE_DEFINED");if(d.default.isEmpty(t))throw new Error("OGAPI_USER_TOKENID_RESET_PASSWORD_PARAMETER_MUST_BE_DEFINED");var r={password:this._newPassword},n=this._buildURL()+"/reset/"+t;return this._doNorthPost(n,r)}},{key:"login",value:function(e,t,r){if(this._email=e,this._password=t,this._twoFaCode=r,d.default.isEmpty(this._email)||d.default.isEmpty(this._password))throw new Error("OGAPI_USER_LOGIN_EMAIL_AND_PASSWORD_PARAMETER_MUST_BE_DEFINED");var n={email:this._email,password:this._password,"2FaCode":this._twoFaCode||void 0},i=this._resource+"/login";return this._doNorthPost(i,n,!0)}}]),t}(c.default);r.default=h,t.exports=r.default},{"../provision/BaseProvision":235,lodash:111,q:117}],338:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.DATE_FORMAT="";r.TIME_FORMAT="HH:mm:ssZ"},{}],339:[function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(){function e(){i(this,e)}return o(e,null,[{key:"eq",value:function(e,t){return{eq:n({},e,t)}}},{key:"neq",value:function(e,t){return{neq:n({},e,t)}}},{key:"like",value:function(e,t){return{like:n({},e,t)}}},{key:"gt",value:function(e,t){return{gt:n({},e,t)}}},{key:"lt",value:function(e,t){return{lt:n({},e,t)}}},{key:"gte",value:function(e,t){return{gte:n({},e,t)}}},{key:"lte",value:function(e,t){return{lte:n({},e,t)}}},{key:"in",value:function(e,t){return{in:n({},e,t)}}},{key:"or",value:function(){for(var e={or:[]},t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var i=0;i<r.length;i++)e.or.push(r[i]);return e}},{key:"and",value:function(){for(var e={and:[]},t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var i=0;i<r.length;i++)e.and.push(r[i]);return e}}]),e}();r.default=a,t.exports=r.default},{}],340:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=e("merge"),u=n(a),s=e("urlencode"),c=n(s),l=e("superagent"),f=n(l),d=e("q"),h=n(d),p=e("lodash"),y=n(p),m=e("superagent-mocker"),v=n(m),_=(0,v.default)(f.default),g=function(){function e(t,r){i(this,e),this._options=u.default.recursive(!0,this.default(),t),this._headers=r,y.default.isEmpty(t.mocks)||this._applyMocks(t.mocks)}return o(e,[{key:"_applyMocks",value:function(e){var t=this;Object.keys(e).filter(function(t){return!y.default.isEmpty(e[t])}).forEach(function(r){console.log("Mocking "+r.toLocaleUpperCase()+" requests"),Object.keys(e[r]).forEach(function(n){console.log("Mocking url:",n);var i=e[r][n];_[r](t._options.url+n,function(t){if("function"==typeof i)return console.log("Function returned"),i(t);var o=e[r][n];return console.log("Data returned:",o),o.headers||(o.headers={}),o})})})}},{key:"default",value:function(){return{timeout:5e3}}},{key:"_url",value:function(e){return e.url}},{key:"get",value:function(e,t,r,n,i,o){var a=this._createUrl(e,n,o);console.info("GET",a);var u=f.default.get(a);return this._createPromiseRequest(u,null,t,r,i)}},{key:"patch",value:function(e,t,r,n,i,o){var a=this._createUrl(e,i,o);console.info("PATCH",a);var u=f.default.patch(a).send(t);return this._createPromiseRequest(u,null,r,n)}},{key:"post",value:function(e,t,r,n,i,o){var a=this._createUrl(e,i,o);console.info("POST",a);var u=f.default.post(a).send(t);return this._createPromiseRequest(u,null,r,n)}},{key:"post_multipart",value:function(e,t,r,n,i,o,a){var u=this._createUrl(e,o,a);console.info("POST_MULTIPART",u);var s=f.default.post(u),c=!0;return Object.keys(t).forEach(function(e){switch(e){case"meta":case"json":case"file":s.field(e,t[e]),delete t[e];break;case"hardwareMedia":case"certificate":case"processorBulkFile":s.attach("file",t[e]),c=!1;break;case"files":t[e].forEach(function(t,r){console.log(t.name),s.attach(e,t)}),
39
39
  delete t[e],c=!1;break;case"modelFile":s.field(e,t[e]),delete t[e],c=!1;break;case"bulkFile":s.set("Content-Type",t.ext),t=t.bulkFile}}),c&&s.send(t),this._createPromiseRequest(s,r,n,i)}},{key:"put",value:function(e,t,r,n,i,o){var a=this._createUrl(e,i,o);console.info("PUT",a);var u=f.default.put(a).send(t);return n?n["Content-Type"]="application/json":n={"Content-Type":"application/json"},this._createPromiseRequest(u,null,r,n)}},{key:"put_multipart",value:function(e,t,r,n,i,o,a){var u=this._createUrl(e,o,a);console.info("PUT_MULTIPART",u);var s=f.default.put(u),c=!0;return Object.keys(t).forEach(function(e){switch(e){case"meta":case"json":case"file":s.field(e,t[e]),delete t[e];break;case"hardwareMedia":case"certificate":case"processorBulkFile":s.attach("file",t[e]),c=!1;break;case"files":t[e].forEach(function(t,r){console.log(t.name),s.attach(e,t)}),delete t[e],c=!1;break;case"modelFile":s.field(e,t[e]),delete t[e],c=!1;break;case"bulkFile":s.set("Content-Type",t.ext),t=t.bulkFile}}),c&&s.send(t),this._createPromiseRequest(s,r,n,i)}},{key:"delete",value:function(e,t,r,n,i,o){var a=this._createUrl(e,n,o);console.info("DELETE",a);var u;return u=i?f.default.del(a).send(i):f.default.del(a),this._createPromiseRequest(u,null,t,r)}},{key:"_createUrl",value:function(e,t,r){var n=[];if(t)for(var i=Object.keys(t),o=0;o<i.length;o++){var a=i[o],u=a+"="+t[a];e=0===o?e+"?"+u:e+"&"+u}var s=e.split("/"),l=s.length;return s.forEach(function(e,t){if(t===l-1&&e.indexOf("?")>0){var r=e.substring(e.indexOf("?"),e.length),i=e.substring(0,e.indexOf("?"));n.push((0,c.default)(i)+r)}else n.push((0,c.default)(e))}),this._url(this._options)+"/"+this._getDefaultBaseURL(r)+"/"+n.join("/")}},{key:"_getDefaultBaseURL",value:function(e){return e||(this._isSouth?"v80":"north/v80")}},{key:"_createPromiseRequest",value:function(e,t,r,n,i){var o=r;void 0!==o&&null!==o||(o=this._options.timeout);var a=h.default.defer(),u=a.promise,s=this._options.apiKey,c=this._options.jwt,l=-1===o?e:e.timeout(o);if(c&&!this._isSouth?l=l.set("Authorization","Bearer "+c):s&&(l=l.set("X-ApiKey",this._options.apiKey)),n)for(var f=Object.keys(n),d=0;d<f.length;d++){var p=f[d];void 0!==n[p]&&(l=l.set(p,n[p]))}if(t)for(var y in t)l=l.on(y,t[y]);return i&&e.responseType("blob"),l=l.end(function(e,t){if(null!==e){console.error("OGAPI ERROR: "),console.error(e);var r=void 0,n=void 0,i=e.status?e.status:void 0,o={errors:[{code:i,message:"OGAPI: Something is broken. Please contact with your administrator."}]};void 0!==e.response?(r=e.response.body?e.response.body:o,n=e.response.headers,i=e.status):i?(r=e.message,i=408):(r=o,i=500),a.reject({statusCode:i,data:r,headers:n})}else a.resolve(t)}),u}}]),e}();r.default=g,t.exports=r.default},{lodash:111,merge:112,q:117,superagent:128,"superagent-mocker":126,urlencode:135}],341:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function(){function e(){n(this,e)}return i(e,null,[{key:"element",value:function(e,t){return{name:e,fields:t}}}]),e}();r.default=o,t.exports=r.default},{}],342:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./NorthAmpliaREST"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e,r){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r),this._isSouth=!0}return i(t,e),o(t,[{key:"_url",value:function(e){return e.south.url}}]),t}(s.default);r.default=c,t.exports=r.default},{"./NorthAmpliaREST":340}],343:[function(e,t,r){"use strict";t.exports={_checkType:function(e,t){var r=[];if(void 0===t.find(function(e){return e==this},e)&&r.push(e),0!==r.length)throw new Error({message:"OGAPI_NOT_ALLOWED_PARAMETER",parameter:JSON.stringify(r),allowed:JSON.stringify(t)});return e},_checkISODateTime:function(e,t){if("string"!=typeof e||new RegExp("\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d+(Z|[+-]\\d{2}:\\d{2})").test(e))throw new Error([{message:"OGAPI_ISO_DATE_TIME_PARAMETER",parameter:t},{message:"OGAPI_STRING_PATTERN",parameter:t}]);try{new Date(e)}catch(e){throw new Error([{message:"OGAPI_ISO_DATE_TIME_PARAMETER",parameter:t},{message:"OGAPI_STRING_PATTERN",parameter:t}])}},_checkStringAndPattern:function(e,t,r){if("string"!=typeof e||!new RegExp(t).test(e))throw new Error([{message:"OGAPI_STRING_PARAMETER",parameter:r},{message:"OGAPI_STRING_PATTERN",parameter:r,pattern:t}])},_checkStringAndLength:function(e,t,r){if("string"!=typeof e||e.length>t)throw new Error([{message:"OGAPI_STRING_PARAMETER",parameter:r},{message:"OGAPI_MAX_LENGTH",parameter:t}])},_checkString:function(e,t){if("string"!=typeof e)throw new Error([{message:"OGAPI_STRING_PARAMETER",parameter:t}])},_checkNumber:function(e,t){if("number"!=typeof e)throw new Error([{message:"OGAPI_NUMBER_PARAMETER",parameter:t}])},_checkArray:function(e,t){if(!Array.isArray(e)||0===e.length)throw new Error({message:"OGAPI_ARRAY_PARAMETER",parameter:t})},_checkObject:function(e,t){if("object"!=typeof e)throw new Error({message:"OGAPI_OBJECT_PARAMETER",parameter:t})}}},{}],344:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(r,"__esModule",{value:!0});var a,u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=e("q"),c=n(s),l=e("lodash"),f=n(l),d=e("./source-precompiled/Fields"),h=e("./IotFields"),p=d.GENERATED_FIELDS;for(var y in h.IOT_FIELDS)if(p[y])for(var m in h.IOT_FIELDS[y])p[y][m]=h.IOT_FIELDS[y][m];else p[y]=h.IOT_FIELDS[y];var v=new RegExp("^(.+)._current\\.?(.+)?$"),_=new RegExp("\\[[0-9]+\\]"),g=(new RegExp("value\\.?"),{"/jobs":"JOB","/tasks":"TASKS","/alarms":"ENTITY_ALARM","/operations":"ENTITY_OPERATION","/operations/history":"ENTITY_OPERATION_HISTORY","/certificates":"CERTIFICATE","/bundles":"UPDATE_BUNDLE_VERSION","/datapoints":"DATAPOINTS","/datastreams":"DATASTREAMS","/datamodels":"DATAMODELS","/dmmQRating":"DMMQRATING","/iotQRating":"IOTQRATING","/catalog/softwares":"SOFTWARE_VERSION","/catalog/hardwares":"MANUFACTURER","/catalog/operators":"OPERATORS","/domains":"DOMAIN","/users":"USER","/areas":"AREAS","/bulk/async":"LEGACY_BULK","provisionProcessors/bulk/search":"BULK","/devices":"SearchOnDatamodel","/subscriptions":"SearchOnDatamodel","/subscribers":"SearchOnDatamodel","/entities":"SearchOnDatamodel","entity-asset":"SearchOnDatamodel","/tickets":"SearchOnDatamodel","/channels":"SearchOnDatamodel",datasets:"SearchOnDataset",timeseries:"SearchOnTimeseries","/catalog/plans/organization":"PLANS","/catalog/plans/device":"PLANS"}),b={ENTITY_ALARM:"alarm",UPDATE_BUNDLE_VERSION:"bundle",DATAPOINTS:"datapoints",ENTITY_OPERATION:["operation","job"]},w={get:function(e){switch(e){case"entity-asset":return["entity.asset"];case"/tickets":return["ticket"];case"/channels":return["channel"];default:return}}},E={subscriber:"DEVICE_PART_SUBSCRIBER",subscription:"DEVICE_PART_SUBSCRIPTION",communicationsModule:"DEVICE_PART_COMMSMODULE",device:"DEVICE_PART_DEVICE"},A={DEVICE_PART_SUBSCRIBER:"subscriber",DEVICE_PART_SUBSCRIPTION:"subscription",DEVICE_PART_COMMSMODULE:"communicationsModule",DEVICE_PART_DEVICE:"device"},O=["relColl","relProv"],S=["DEVICE_PART_SUBSCRIBER","DEVICE_PART_SUBSCRIPTION","DEVICE_PART_COMMSMODULE","DEVICE_PART_DEVICE"],P=["subscriber","subscription","communicationsModule","device"],D="search",C={get:function(e){if(S.indexOf(g[e])>=0)return"complex";switch(g[e]){case"SearchOnDatamodel":return D;case"SearchOnDataset":return"dataset";case"SearchOnTimeseries":return"timeserie";default:return"simple"}}},k=function(e,t){function r(e){for(var t=!0;t;){var r=e;t=!1;{if(!(r.length>0&&r[0].constructor===Array))return r;r=r.reduce(function(e,t){return e.concat(t)}),e=r,t=!0}}}var n=c.default.defer(),i=t.selectedField,o=t.selectAll,a=t.extraData&&t.extraData.organization,u=e._ogapi.datamodelsSearchBuilder(),s={and:[]};return e._resourceTypes&&s.and.push({in:{"datamodels.allowedResourceTypes":e._resourceTypes}}),a&&s.and.push({eq:{"datamodels.organizationName":a}}),i&&s.and.push({eq:{"datamodels.categories.datastreams.identifier":i}}),s.and.length>0&&u.filter(s),u.build().execute().then(function(e){var t=[];200===e.statusCode&&(t=e.data.datamodels.map(function(e){return(e.categories||[]).map(function(e){return(e.datastreams||[]).map(function(e){return i||o?e:e.identifier})})}),t=r(t)),i?n.resolve(t.find(function(e){return i===e.identifier})):n.resolve(t)}).catch(function(e){n.reject(e)}),n.promise},T=function(e,t,r,n){var i=r.selectedField,o=[],a=r.extraData.organization,u=r.extraData[t.entity];e._ogapi[t.api]()[t.method](a,u).then(function(t){if(200===t.statusCode){t.data.identifierColumn&&o.push({identifier:t.data.identifierColumn,name:t.data.identifierColumn,path:"provision.administration.identifier._current.value",indexed:!0,sort:!0,notFilterable:!1,filter:"YES",type:"string",schema:{type:"string"}}),t.data.bucketColumn&&o.push({identifier:t.data.bucketColumn,name:t.data.bucketColumn,path:"provision.administration.identifier._current.at",indexed:!0,sort:!0,notFilterable:!1,filter:"YES",type:"date-time",schema:{type:"string",format:"datetime"}});var a=f.default.concat(t.data.columns||[],t.data.context||[]);e._ogapi.basicTypesSearchBuilder().withPath("$").build().execute().then(function(t){t.data.definitions;if(r.selectAll=!0,i){a=a.filter(function(e){return i===(e.name||e.alias)});var u=a[0],s=u.path.match(v),c=s[1].replace(_,"[]");r.selectedField=c}k(e,r).then(function(e){a.forEach(function(t){"date-time"!==t.type?t.schema={type:t.type}:t.schema={type:"string",format:"datetime"},t.path.endsWith("._current.value")&&function(){var r=t.path.substring(0,t.path.indexOf("._current.value"));Array.isArray(e)&&e.find(function(e){return r===e.identifier})}(),t.identifier=t.name||t.alias,t.indexed="NO"!==t.filter,t.notFilterable="NO"===t.filter,o.push(t)}),n.resolve(o)}).catch(function(e){console.error(e),n.reject(e)})}).catch(function(e){console.error(e),n.reject(e)})}}).catch(function(e){console.error(e),n.reject(e)})},F=(a={},o(a,D,function(e,t){k(this,e).then(function(e){t.resolve(e)}).catch(function(e){t.reject(e)})}),o(a,"simple",function(e,t){var r=e.context,n=e.primaryType,i=e.selectedField,o=[];if(r[n]instanceof Array)i?function(){var e=0,t=null;for(e=0;null===t&&e<r[n].length;e++)!function(){var o=r[n][e];o.toLowerCase()===i.toLowerCase()||o.toLowerCase()===i.toLowerCase()+"name"?t=o:b[n]&&(b[n]instanceof Array?b[n].forEach(function(e){o.toLowerCase()!==e+i.toLowerCase()&&o.toLowerCase()!==e+"."+i.toLowerCase()&&o.toLowerCase()!==e+i.toLowerCase()+"name"&&o.toLowerCase()!==e+"."+i.toLowerCase()+"name"||t||(t=o)}):o.toLowerCase()!==b[n]+i.toLowerCase()&&o.toLowerCase()!==b[n]+"."+i.toLowerCase()&&o.toLowerCase()!==b[n]+i.toLowerCase()+"name"&&o.toLowerCase()!==b[n]+"."+i.toLowerCase()+"name"||(t=o))}();t&&o.push(t)}():o=r[n].slice();else if(i)if(r[n][i])o.push(r[n][i]);else for(var a=Object.keys(r[n]),u=0;u<a.length;u++)r[n][a[u]].toLowerCase().indexOf(i.toLowerCase())>-1&&o.push(r[n][a[u]]);else for(var a=Object.keys(r[n]),u=0;u<a.length;u++)o.push(r[n][a[u]]);t.resolve(o.slice())}),o(a,"complex",function(e,t){function r(e,t){var n=void 0;if(!(r=E[e])||!(n=t[r]))throw new Error("Invalid primaryType: "+e);return n.slice()}function n(e){return e!=this}function i(e,t){var r=[];return t.forEach(function(t){var n=e.slice(0,-1);n.push(t),r.push(n.join("."))}),r}var o=e.states,a=e.context,u=e.primaryType,s={1:function(e,t){return t[u].concat(P.filter(n,A[u]))},2:function(e,t){try{return i(e,r(e[0],t).concat(O))}catch(e){return[]}},3:function(e,t){var n=e[1];if(-1===O.indexOf(n))return[];try{return i(e,r(e[0],t))}catch(e){return[]}}},c=o.length,l=s[c];return void 0===l?t.resolve([]):t.resolve(l(o,a))}),o(a,"dataset",function(e,t){T(this,{api:"newDatasetFinder",method:"findByOrganizationAndDatasetId",entity:"dataset"},e,t)}),o(a,"timeserie",function(e,t){T(this,{api:"newTimeserieFinder",method:"findByOrganizationAndTimeserieId",entity:"timeserie"},e,t)}),a),j=function(){function e(t,r,n){i(this,e),this._ogapi=t,this._url=r,this._type=C.get(r),this._extraData=n,this._type===D&&(this._resourceTypes=w.get(r))}return u(e,[{key:"find",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=c.default.defer(),r={states:e.split("."),context:p[g[this._url]],primaryType:g[this._url],extraData:this._extraData};return F[this._type].call(this,r,t),t.promise}},{key:"findAll",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=c.default.defer(),r={states:e.split("."),context:p[g[this._url]],primaryType:g[this._url],selectAll:!0,extraData:this._extraData};return F[this._type].call(this,r,t),t.promise}},{key:"findFieldPath",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=c.default.defer(),r={states:e,context:p[g[this._url]],primaryType:g[this._url],selectedField:e,extraData:this._extraData};return F[this._type].call(this,r,t),t.promise}}]),e}();r.default=j,t.exports=r.default},{"./IotFields":345,"./source-precompiled/Fields":346,lodash:111,q:117}],345:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DATAPOINTS:{DATAPOINTS:["datapoints.organization","datapoints.channel","datapoints.datastreamId","datapoints.entityIdentifier","datapoints.subEntityIdentifier","datapoints.entityRelated","datapoints._current.feedId","datapoints._current.date","datapoints._current.at","datapoints._current.value","datapoints._current.tags","datapoints._current.scoring.performance","datapoints._current.scoring.qrating.min_required.value","datapoints._current.scoring.qrating.min_required.label","datapoints._current.scoring.qrating.min_desired.value","datapoints._current.scoring.qrating.min_desired.label","datapoints._current.scoring.qrating.ideal.value","datapoints._current.scoring.qrating.ideal.label","datapoints._current.scoring.qrating.max_desired.value","datapoints._current.scoring.qrating.max_desired.label","datapoints._current.scoring.qrating.max_allowed.value","datapoints._current.scoring.qrating.max_allowed.label","datapoints._current.scoring.qrating.max_score","datapoints._current.scoring.qrating.cumulative_period_divisor","datapoints._current.scoring.qrating.conversion_matrix","datapoints._current.scoring.qrating.version"]},DATAMODELS:{DATAMODELS:["datamodels.organizationName","datamodels.identifier","datamodels.name","datamodels.description","datamodels.version","datamodels.categories.name","datamodels.categories.identifier","datamodels.categories.datastreams.identifier","datamodels.categories.datastreams.name","datamodels.categories.datastreams.description","datamodels.categories.datastreams.hardwareIds","datamodels.categories.datastreams.unit","datamodels.categories.datastreams.unit.type","datamodels.categories.datastreams.unit.label","datamodels.categories.datastreams.unit.symbol","datamodels.categories.datastreams.period","datamodels.categories.datastreams.access","datamodels.categories.datastreams.schema","datamodels.categories.datastreams.storage","datamodels.categories.datastreams.storage.period","datamodels.categories.datastreams.storage.total","datamodels.categories.datastreams.tags","datamodels.categories.datastreams.views","datamodels.categories.datastreams.icon","datamodels.categories.datastreams.modifiable","datamodels.categories.datastreams.required","datamodels.categories.datastreams.qrating.min_required.value","datamodels.categories.datastreams.qrating.min_required.label","datamodels.categories.datastreams.qrating.min_desired.value","datamodels.categories.datastreams.qrating.min_desired.label","datamodels.categories.datastreams.qrating.ideal.value","datamodels.categories.datastreams.qrating.ideal.label","datamodels.categories.datastreams.qrating.max_desired.value","datamodels.categories.datastreams.qrating.max_desired.label","datamodels.categories.datastreams.qrating.max_allowed.value","datamodels.categories.datastreams.qrating.max_allowed.label","datamodels.categories.datastreams.qrating.max_score","datamodels.categories.datastreams.qrating.cumulative_period_divisor","datamodels.categories.datastreams.qrating.conversion_matrix","datamodels.categories.datastreams.qrating.version"]},DATASTREAMS:{DATASTREAMS:["datastreams.datastreamId","datastreams.name","datastreams.description","datastreams.unit.type","datastreams.unit.label","datastreams.unit.symbol","datastreams.period","datastreams._current.tags","datastreams._current.date","datastreams._current.value","datastreams.categoryId","datastreams.datamodelId","datastreams.access","datastreams.channel","datastreams.organization","datastreams.entityIdentifier","feeds.entityIdentifier","datastreams._id.subEntityIdentifier","datastreams._current.scoring.qrating.min_required.value","datastreams._current.scoring.qrating.min_required.label","datastreams._current.scoring.qrating.min_desired.value","datastreams._current.scoring.qrating.min_desired.label","datastreams._current.scoring.qrating.ideal.value","datastreams._current.scoring.qrating.ideal.label","datastreams._current.scoring.qrating.max_desired.value","datastreams._current.scoring.qrating.max_desired.label","datastreams._current.scoring.qrating.max_allowed.value","datastreams._current.scoring.qrating.max_allowed.label","datastreams._current.scoring.qrating.max_score","datastreams._current.scoring.qrating.cumulative_period_divisor","datastreams._current.scoring.qrating.max_score","datastreams._current.scoring.qrating.conversion_matrix","datastreams.version","feeds.identifier","datastreams._current.scoring.qrating.version","datastreams._current.scoring.scoringPerformance"]},DEVICE_PART_DEVICE:{IOT:["datastream.id","datastream.name","datastream.feed","datastream.device","datastream.description","datastream.unit.type","datastream.unit.label","datastream.unit.symbol","datastream.period","datastream.tags","datastream.updated","datastream.minValue","datastream.maxValue","datastream.currentValue","datastream.categoryName","datastream.profileId","datastream.profileName","datastream.profileDescription","datastream.profileVersion","datastream.qratingScoringQValue","datastream.qratingScoringQScore","datastream.qratingScoringQuality","datastream.qratingScoringPerformance","datastream.qratingMinRequiredValue","datastream.qratingMinRequiredLabel","datastream.qratingMinDesiredValue","datastream.qratingMinDesiredLabel","datastream.qratingIdealValue","datastream.qratingIdealLabel","datastream.qratingMaxDesiredValue","datastream.qratingMaxDesiredLabel","datastream.qratingMaxAllowedValue","datastream.qratingMaxAllowedLabel","datastream.qratingMaxScore","deviceId","feedId","deviceOrganization","profile.Name","profile.Description","profile.Version","profile.Score","profile.MaxScore","profile.Performance","profile.AvgPerformance","profile.Quality","category.Name","category.Score","category.MaxScore","category.Performance","category.AvgPerformance","category.Quality","device.Score","device.MaxScore","device.Performance","device.AvgPerformance","device.Quality","device.Channel","device.EntityType"]},USER:{USER:{email:"user.email",description:"user.description",workgroup:"workgroup.name",domain:"domain.name",profile:"profile.name",name:"user.name",surname:"user.surname",countryCode:"country.code",langCode:"language.code",timezone:"user.timezone"}},DOMAIN:{DOMAIN:["domain.name","domain.description"]},AREAS:{AREAS:{identifier:"areas.identifier",name:"areas.name",description:"areas.description",entities:"areas.entities",geometry:"areas.geometry",color:"areas.color",organization:"areas.organization"}},TASKS:{TASKS:["tasks.id","tasks.name","tasks.description","tasks.state","tasks.domain","tasks.workgroup","tasks.job.request.user"]},LEGACY_BULK:{LEGACY_BULK:{identifier:"bulks.identifier",organization:"bulks.organization",fileName:"bulks.request.fileName",userEmail:"bulks.request.userEmail",headerAccept:"bulks.request.header.accept",contentType:"bulks.request.header.contentType",headerCsvFormat:"bulks.request.header.csvFormat",paramsFlattened:"bulks.request.params.flattened",paramsAction:"bulks.request.params.action",paramsFull:"bulks.request.params.full",paramsType:"bulks.request.params.type",status:"bulks.status",startedDate:"bulks.startedDate",finishedDate:"bulks.finishedDate",processed:"bulks.summary.processed",successful:"bulks.summary.successful",error:"bulks.summary.error"}},BULK:{BULK:{identifier:"bulks.identifier",provisionProcessorId:"bulks.provisionProcessorId",organization:"bulks.organization",userEmail:"bulks.request.userEmail",fileName:"bulks.request.fileName",headerAccept:"bulks.request.header.accept",contentType:"bulks.request.header.contentType",status:"bulks.status",startedDate:"bulks.startedDate",finishedDate:"bulks.finishedDate",processed:"bulks.summary.processed",successful:"bulks.summary.successful",error:"bulks.summary.error"}},RULE:{RULE:{organizationId:"rule.organizationId",channelId:"rule.channelId",name:"rule.name",active:"rule.active"}},ENTITY_ALARM:{ENTITY_ALARM:{alarmId:"alarm.identifier",alarmSubEntityIdentifier:"alarm.subEntityIdentifier",entityId:"alarm.entityIdentifier",entityType:"alarm.resourceType",organizationName:"alarm.organization",channelName:"alarm.channel",alarmRuleName:"alarm.rule",alarmName:"alarm.name",alarmSeverity:"alarm.severity",alarmPriority:"alarm.priority",alarmDescription:"alarm.description",alarmStatus:"alarm.status",alarmOpenDate:"alarm.openingDate",alarmAttentionDate:"alarm.attentionDate",alarmAttentionUser:"alarm.attentionUser",alarmAttentionNote:"alarm.attentionNote",alarmClosureDate:"alarm.closureDate",alarmClosureUser:"alarm.closureUser",alarmClosureNote:"alarm.closureNote"}},GENERAL:{GENERAL:[]},EMPTY:{EMPTY:[]},OPERATORS:{OPERATORS:["operator.name"]},PLANS:{PLANS:["plan.identifier","plan.name","plan.flowRate.value","plan.flowRate.unit","plan.maxDeviceAmount","plan.maxStorageLifeTime.period","plan.maxStorageLifeTime.total","plan.defaultAssigned","plan.defaultProvision"]}};r.IOT_FIELDS=n},{}],346:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={ENTITY_OPERATION_HISTORY:{ENTITY_OPERATION_HISTORY:["applicationEmail","entityId","entityType","jobActivatedDate","jobId","jobUserNotes","operationAttemptCurrent","operationAttemptMax","operationDate","operationDetails","operationEndDate","operationId","operationInitDate","operationName","operationNotify","operationParameters","operationResult","operationStatus","operationSteps"]},ENTITY_OPERATION:{ENTITY_OPERATION:["applicationEmail","channelKey","channelName","domainKey","entityId","entityType","entityUk","jobActivatedDate","jobEntityTotal","jobErrorCode","jobErrorDescription","jobFinishedCancelledByEngine","jobFinishedCancelledByExternal","jobFinishedCancelledByExternalTimeout","jobFinishedCancelledByTimeout","jobFinishedCancelledByUser","jobFinishedCancelledTotal","jobFinishedDate","jobFinishedError","jobFinishedOotError","jobFinishedOotSuccessful","jobFinishedOotTotal","jobFinishedSuccessful","jobFinishedTotal","jobId","jobInProgressPendingExecution","jobInProgressScheduled","jobInProgressStarted","jobInProgressTotal","jobInProgressWaitingForConnection","jobJson","jobStartedDate","jobState","jobStatus","jobTotal","jobUser","jobUserNotes","notDeletable","operationAttemptCurrent","operationAttemptMax","operationDate","operationDetails","operationEndDate","operationId","operationInitDate","operationJson","operationName","operationNotify","operationResult","operationScheduleTimestamp","operationStatus","operationStatusKey","operationStepDescription","operationStepName","operationStepResponse","operationStepResult","operationStepTimestamp","operationTimeoutTimestamp","operationUserNotes","organizationKey","organizationName","profileKey","provAdministrativeState","provAdministrativeStateKey","provDefaultFeed","serviceGroupName","tag","taskEmpty_null","taskId","taskKey","taskName","taskState","taskStatus","workgroupKey","workgroupName"]},MANUFACTURER:{MANUFACTURER:["manufacturerAddress","manufacturerDescription","manufacturerEmail","manufacturerFax","manufacturerIdentifier","manufacturerMediaFileName","manufacturerMediaHeight","manufacturerMediaIdentifier","manufacturerMediaName","manufacturerMediaSize","manufacturerMediaTypeName","manufacturerMediaWidth","manufacturerName","manufacturerNotes","manufacturerTelephone","manufacturerUrl","modelDescription","modelIdentifier","modelMediaFileName","modelMediaHeight","modelMediaIdentifier","modelMediaName","modelMediaSize","modelMediaTypeName","modelMediaWidth","modelName","modelNotes","modelUrl","modelVersion"]},MODEL:{MODEL:["modelDescription","modelIdentifier","modelName","modelNotes","modelUrl","modelVersion"]},JOB:{JOB:["jobActivatedDate","jobActivatedTime","jobCallback","jobEntityTotal","jobErrorCode","jobErrorDescription","jobFinishedCancelledByEngine","jobFinishedCancelledByExternal","jobFinishedCancelledByExternalTimeout","jobFinishedCancelledByTimeout","jobFinishedCancelledByUser","jobFinishedCancelledTotal","jobFinishedDate","jobFinishedError","jobFinishedOotError","jobFinishedOotSuccessful","jobFinishedOotTotal","jobFinishedSuccessful","jobFinishedTime","jobFinishedTotal","jobId","jobInProgressPendingExecution","jobInProgressScheduled","jobInProgressStarted","jobInProgressTotal","jobInProgressWaitingForConnection","jobJson","jobOperationName","jobScheduledTime","jobStartedDate","jobState","jobStatus","jobTotal","jobTrap","jobUser","jobUserNotes","jobVisible","operationId","operationName","operationResult","operationStatusKey","taskCoremessage","taskId","taskKey","taskName","taskNextExecution","taskState","taskStatus"]},SOFTWARE_VERSION:{SOFTWARE_VERSION:["manufacturerAddress","manufacturerDescription","manufacturerEmail","manufacturerFax","manufacturerIdentifier","manufacturerName","manufacturerNotes","manufacturerTelephone","manufacturerUrl","modelDescription","modelIdentifier","modelName","modelNotes","modelUrl","modelVersion","softwareId","softwareName","softwareType","softwareVersion"]},UPDATE_BUNDLE_VERSION:{UPDATE_BUNDLE_VERSION:["bundleActionDef","bundleActionOrder","bundleActionType","bundleActive","bundleConstrained","bundleCreationDate","bundleDeploymentElementDownloadUrl","bundleDeploymentElementId","bundleDeploymentElementName","bundleDeploymentElementOperation","bundleDeploymentElementOption","bundleDeploymentElementOrder","bundleDeploymentElementPath","bundleDeploymentElementSize","bundleDeploymentElementType","bundleDeploymentElementValidators","bundleDeploymentElementVersion","bundleDescription","bundleHardware","bundleId","bundleName","bundleUserNotes","bundleVersion","bundleWorkgroup","updateBundleDate","updateBundleManufacturer","updateBundleModel","updateBundleName","updateBundleVersion","updateBundleVersionUuid","updateDescription"]},CERTIFICATE:{CERTIFICATE:["certificateAdministrativeState","certificateDescription","certificateDomain","certificateId","certificateIssuer","certificateManufacturer","certificateModel","certificateModelIdentifier","certificateModelVersion","certificateName","certificatePublicKeyAlgorithm","certificatePublicKeyFormat","certificatePublicKeySize","certificateSerialNumber","certificateSubject","certificateTag","certificateTrustChain","certificateUsage","certificateValidFrom","certificateValidUntil","certificateVersion"]}};r.GENERATED_FIELDS=n},{}],347:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../ProvisionGenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"domains","workgroup","Workgroup not found")}return i(t,e),o(t,[{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._domain+"/workgroups/"+this._name}},{key:"findByDomainAndName",value:function(e,t){return this._domain=e,this._name=t,this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../ProvisionGenericFinder":140}],348:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../provision/BaseProvision"),c=n(s),l=e("./Workgroups"),f=n(l),d=e("../channels/Channels"),h=n(d),p=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/domains",void 0,["workgroup","channels"]),this._ogapi=e,this._action="CREATE"}return o(t,e),a(t,[{key:"withWorkgroup",value:function(e){
40
40
  if(e.constructor.prototype!=f.default.prototype)throw new Error("Parameter workgroup must be a workgroup");return this._workgroup=e,this}},{key:"withChannel",value:function(e){if(e.constructor.prototype!=h.default.prototype)throw new Error("Parameter channel must be a channel");return this._channels||(this._channels=[]),this._channels.push({organization:e._organization,channel:e._name}),this}},{key:"_composeElement",value:function(){return this._checkRequiredParameters(),this._resource="provision/domains/"+this._workgroup._domainName+"/workgroups/"+this._workgroup._name+"/relations",{workgroupRelation:{channels:this._channels?this._channels:void 0}}}},{key:"_buildURL",value:function(){return"provision/domains/"+this._workgroup._domainName+"/workgroups/"+this._workgroup._name+"/relations"}},{key:"create",value:function(){var e=this._composeElement(),t=this._resource;return this._setUrlParameters({action:"CREATE"}),this._doNorthPost(t,e)}},{key:"delete",value:function(){this._setUrlParameters({action:"DELETE"});var e=this._buildURL();if(this._channels){var t=this._composeElement();return this._doNorthPost(e,t)}return this._doNorthPost(e,{workgroupRelation:{channels:[]}})}},{key:"update",value:function(){throw new Error("Workgroup relation update not allowed")}}]),t}(c.default);r.default=p,t.exports=r.default},{"../channels/Channels":161,"../provision/BaseProvision":235,"./Workgroups":350}],349:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../ProvisionGenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"domains","workgroup","Workgroup relation not found")}return i(t,e),o(t,[{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._domain+"/workgroups/"+this._name+"/relations"}},{key:"findByDomainAndName",value:function(e,t){return this._domain=e,this._name=t,this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../ProvisionGenericFinder":140}],350:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("q"),c=n(s),l=e("../provision/BaseProvision"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/domains",void 0,["name","domainName"]),this._ogapi=e}return o(t,e),a(t,[{key:"withName",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"name"});return this._name=e,this}},{key:"withDescription",value:function(e){if("string"!=typeof e||e.length>250)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_250",parameter:"description"});return this._description=e,this}},{key:"withAdministrative",value:function(e){return this._administrative=e,this}},{key:"withDomainName",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"domainName"});return this._domainName=e,this}},{key:"_composeElement",value:function(){return this._checkRequiredParameters(),this._resource="provision/domains/"+this._domainName+"/workgroups",{workgroup:{name:this._name||void 0,description:this._description||void 0,administrative:this._administrative||!1}}}},{key:"_composeElementUpdate",value:function(){return this._checkRequiredParameters(),this._resource="provision/domains/"+this._domainName+"/workgroups",{workgroup:{description:this._description||void 0}}}},{key:"_buildURL",value:function(){return"provision/domains/"+this._domainName+"/workgroups/"+this._name}},{key:"update",value:function(){var e=c.default.defer(),t=e.promise;return this._ogapi.Napi.put(this._buildURL(),this._composeElementUpdate(),void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(t){200===t.statusCode?e.resolve({statusCode:t.statusCode}):200===t.status?e.resolve({statusCode:t.status}):e.reject({errors:t.errors,statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}}]),t}(f.default);r.default=d,t.exports=r.default},{"../provision/BaseProvision":235,q:117}]},{},[1]);
41
- //# sourceMappingURL=opengate-api-bower-12.9.3.min.js.map
41
+ //# sourceMappingURL=opengate-api-bower-12.9.4.min.js.map