diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-23 16:45:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-23 16:45:13 +0000 |
commit | 389020e14594e4894e28d1eb9103c210b142509e (patch) | |
tree | 2ba734cdd7a243f46dda7c3d0cc88c2293d9699f /src/pybind/mgr/dashboard/frontend/dist/fr/889.a4d8d718c0568f41.js | |
parent | Adding upstream version 18.2.2. (diff) | |
download | ceph-389020e14594e4894e28d1eb9103c210b142509e.tar.xz ceph-389020e14594e4894e28d1eb9103c210b142509e.zip |
Adding upstream version 18.2.3.upstream/18.2.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/pybind/mgr/dashboard/frontend/dist/fr/889.a4d8d718c0568f41.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/frontend/dist/fr/889.a4d8d718c0568f41.js b/src/pybind/mgr/dashboard/frontend/dist/fr/889.a4d8d718c0568f41.js new file mode 100644 index 000000000..ea855816a --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/dist/fr/889.a4d8d718c0568f41.js @@ -0,0 +1 @@ +(self.webpackChunkceph_dashboard=self.webpackChunkceph_dashboard||[]).push([[889],{3875:(K,Y,d)=>{"use strict";var g=d(96434),r=d(12658);Y.Buffer=l,Y.SlowBuffer=function G(T){return+T!=T&&(T=0),l.alloc(+T)},Y.INSPECT_MAX_BYTES=50;var A=2147483647;function Z(T){if(T>A)throw new RangeError('The value "'+T+'" is invalid for option "size"');var _=new Uint8Array(T);return _.__proto__=l.prototype,_}function l(T,_,s){if("number"==typeof T){if("string"==typeof _)throw new TypeError('The "string" argument must be of type string. Received type number');return N(T)}return h(T,_,s)}function h(T,_,s){if("string"==typeof T)return function v(T,_){if(("string"!=typeof _||""===_)&&(_="utf8"),!l.isEncoding(_))throw new TypeError("Unknown encoding: "+_);var s=0|B(T,_),F=Z(s),X=F.write(T,_);return X!==s&&(F=F.slice(0,X)),F}(T,_);if(ArrayBuffer.isView(T))return k(T);if(null==T)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T);if(b(T,ArrayBuffer)||T&&b(T.buffer,ArrayBuffer))return function P(T,_,s){if(_<0||T.byteLength<_)throw new RangeError('"offset" is outside of buffer bounds');if(T.byteLength<_+(s||0))throw new RangeError('"length" is outside of buffer bounds');var F;return(F=void 0===_&&void 0===s?new Uint8Array(T):void 0===s?new Uint8Array(T,_):new Uint8Array(T,_,s)).__proto__=l.prototype,F}(T,_,s);if("number"==typeof T)throw new TypeError('The "value" argument must not be of type number. Received type number');var F=T.valueOf&&T.valueOf();if(null!=F&&F!==T)return l.from(F,_,s);var X=function L(T){if(l.isBuffer(T)){var _=0|I(T.length),s=Z(_);return 0===s.length||T.copy(s,0,0,_),s}return void 0!==T.length?"number"!=typeof T.length||D(T.length)?Z(0):k(T):"Buffer"===T.type&&Array.isArray(T.data)?k(T.data):void 0}(T);if(X)return X;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof T[Symbol.toPrimitive])return l.from(T[Symbol.toPrimitive]("string"),_,s);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T)}function R(T){if("number"!=typeof T)throw new TypeError('"size" argument must be of type number');if(T<0)throw new RangeError('The value "'+T+'" is invalid for option "size"')}function N(T){return R(T),Z(T<0?0:0|I(T))}function k(T){for(var _=T.length<0?0:0|I(T.length),s=Z(_),F=0;F<_;F+=1)s[F]=255&T[F];return s}function I(T){if(T>=A)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A.toString(16)+" bytes");return 0|T}function B(T,_){if(l.isBuffer(T))return T.length;if(ArrayBuffer.isView(T)||b(T,ArrayBuffer))return T.byteLength;if("string"!=typeof T)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof T);var s=T.length,F=arguments.length>2&&!0===arguments[2];if(!F&&0===s)return 0;for(var X=!1;;)switch(_){case"ascii":case"latin1":case"binary":return s;case"utf8":case"utf-8":return a(T).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*s;case"hex":return s>>>1;case"base64":return ie(T).length;default:if(X)return F?-1:a(T).length;_=(""+_).toLowerCase(),X=!0}}function S(T,_,s){var F=!1;if((void 0===_||_<0)&&(_=0),_>this.length||((void 0===s||s>this.length)&&(s=this.length),s<=0)||(s>>>=0)<=(_>>>=0))return"";for(T||(T="utf8");;)switch(T){case"hex":return pe(this,_,s);case"utf8":case"utf-8":return z(this,_,s);case"ascii":return de(this,_,s);case"latin1":case"binary":return ne(this,_,s);case"base64":return q(this,_,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,_,s);default:if(F)throw new TypeError("Unknown encoding: "+T);T=(T+"").toLowerCase(),F=!0}}function U(T,_,s){var F=T[_];T[_]=T[s],T[s]=F}function m(T,_,s,F,X){if(0===T.length)return-1;if("string"==typeof s?(F=s,s=0):s>2147483647?s=2147483647:s<-2147483648&&(s=-2147483648),D(s=+s)&&(s=X?0:T.length-1),s<0&&(s=T.length+s),s>=T.length){if(X)return-1;s=T.length-1}else if(s<0){if(!X)return-1;s=0}if("string"==typeof _&&(_=l.from(_,F)),l.isBuffer(_))return 0===_.length?-1:p(T,_,s,F,X);if("number"==typeof _)return _&=255,"function"==typeof Uint8Array.prototype.indexOf?X?Uint8Array.prototype.indexOf.call(T,_,s):Uint8Array.prototype.lastIndexOf.call(T,_,s):p(T,[_],s,F,X);throw new TypeError("val must be string, number or Buffer")}function p(T,_,s,F,X){var Ne,ee=1,te=T.length,ge=_.length;if(void 0!==F&&("ucs2"===(F=String(F).toLowerCase())||"ucs-2"===F||"utf16le"===F||"utf-16le"===F)){if(T.length<2||_.length<2)return-1;ee=2,te/=2,ge/=2,s/=2}function Ce(qe,Be){return 1===ee?qe[Be]:qe.readUInt16BE(Be*ee)}if(X){var Ze=-1;for(Ne=s;Ne<te;Ne++)if(Ce(T,Ne)===Ce(_,-1===Ze?0:Ne-Ze)){if(-1===Ze&&(Ze=Ne),Ne-Ze+1===ge)return Ze*ee}else-1!==Ze&&(Ne-=Ne-Ze),Ze=-1}else for(s+ge>te&&(s=te-ge),Ne=s;Ne>=0;Ne--){for(var be=!0,ze=0;ze<ge;ze++)if(Ce(T,Ne+ze)!==Ce(_,ze)){be=!1;break}if(be)return Ne}return-1}function u(T,_,s,F){s=Number(s)||0;var X=T.length-s;F?(F=Number(F))>X&&(F=X):F=X;var ee=_.length;F>ee/2&&(F=ee/2);for(var te=0;te<F;++te){var ge=parseInt(_.substr(2*te,2),16);if(D(ge))return te;T[s+te]=ge}return te}function E(T,_,s,F){return ae(a(_,T.length-s),T,s,F)}function e(T,_,s,F){return ae(function w(T){for(var _=[],s=0;s<T.length;++s)_.push(255&T.charCodeAt(s));return _}(_),T,s,F)}function f(T,_,s,F){return e(T,_,s,F)}function $(T,_,s,F){return ae(ie(_),T,s,F)}function M(T,_,s,F){return ae(function W(T,_){for(var s,F,ee=[],te=0;te<T.length&&!((_-=2)<0);++te)F=(s=T.charCodeAt(te))>>8,ee.push(s%256),ee.push(F);return ee}(_,T.length-s),T,s,F)}function q(T,_,s){return g.fromByteArray(0===_&&s===T.length?T:T.slice(_,s))}function z(T,_,s){s=Math.min(T.length,s);for(var F=[],X=_;X<s;){var Ce,Ne,Ze,be,ee=T[X],te=null,ge=ee>239?4:ee>223?3:ee>191?2:1;if(X+ge<=s)switch(ge){case 1:ee<128&&(te=ee);break;case 2:128==(192&(Ce=T[X+1]))&&(be=(31&ee)<<6|63&Ce)>127&&(te=be);break;case 3:Ne=T[X+2],128==(192&(Ce=T[X+1]))&&128==(192&Ne)&&(be=(15&ee)<<12|(63&Ce)<<6|63&Ne)>2047&&(be<55296||be>57343)&&(te=be);break;case 4:Ne=T[X+2],Ze=T[X+3],128==(192&(Ce=T[X+1]))&&128==(192&Ne)&&128==(192&Ze)&&(be=(15&ee)<<18|(63&Ce)<<12|(63&Ne)<<6|63&Ze)>65535&&be<1114112&&(te=be)}null===te?(te=65533,ge=1):te>65535&&(F.push((te-=65536)>>>10&1023|55296),te=56320|1023&te),F.push(te),X+=ge}return function le(T){var _=T.length;if(_<=V)return String.fromCharCode.apply(String,T);for(var s="",F=0;F<_;)s+=String.fromCharCode.apply(String,T.slice(F,F+=V));return s}(F)}Y.kMaxLength=A,!(l.TYPED_ARRAY_SUPPORT=function x(){try{var T=new Uint8Array(1);return T.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===T.foo()}catch{return!1}}())&&typeof console<"u"&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&null!=Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),l.poolSize=8192,l.from=function(T,_,s){return h(T,_,s)},l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,l.alloc=function(T,_,s){return function y(T,_,s){return R(T),T<=0?Z(T):void 0!==_?"string"==typeof s?Z(T).fill(_,s):Z(T).fill(_):Z(T)}(T,_,s)},l.allocUnsafe=function(T){return N(T)},l.allocUnsafeSlow=function(T){return N(T)},l.isBuffer=function(_){return null!=_&&!0===_._isBuffer&&_!==l.prototype},l.compare=function(_,s){if(b(_,Uint8Array)&&(_=l.from(_,_.offset,_.byteLength)),b(s,Uint8Array)&&(s=l.from(s,s.offset,s.byteLength)),!l.isBuffer(_)||!l.isBuffer(s))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(_===s)return 0;for(var F=_.length,X=s.length,ee=0,te=Math.min(F,X);ee<te;++ee)if(_[ee]!==s[ee]){F=_[ee],X=s[ee];break}return F<X?-1:X<F?1:0},l.isEncoding=function(_){switch(String(_).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(_,s){if(!Array.isArray(_))throw new TypeError('"list" argument must be an Array of Buffers');if(0===_.length)return l.alloc(0);var F;if(void 0===s)for(s=0,F=0;F<_.length;++F)s+=_[F].length;var X=l.allocUnsafe(s),ee=0;for(F=0;F<_.length;++F){var te=_[F];if(b(te,Uint8Array)&&(te=l.from(te)),!l.isBuffer(te))throw new TypeError('"list" argument must be an Array of Buffers');te.copy(X,ee),ee+=te.length}return X},l.byteLength=B,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var _=this.length;if(_%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var s=0;s<_;s+=2)U(this,s,s+1);return this},l.prototype.swap32=function(){var _=this.length;if(_%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var s=0;s<_;s+=4)U(this,s,s+3),U(this,s+1,s+2);return this},l.prototype.swap64=function(){var _=this.length;if(_%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var s=0;s<_;s+=8)U(this,s,s+7),U(this,s+1,s+6),U(this,s+2,s+5),U(this,s+3,s+4);return this},l.prototype.toLocaleString=l.prototype.toString=function(){var _=this.length;return 0===_?"":0===arguments.length?z(this,0,_):S.apply(this,arguments)},l.prototype.equals=function(_){if(!l.isBuffer(_))throw new TypeError("Argument must be a Buffer");return this===_||0===l.compare(this,_)},l.prototype.inspect=function(){var _="",s=Y.INSPECT_MAX_BYTES;return _=this.toString("hex",0,s).replace(/(.{2})/g,"$1 ").trim(),this.length>s&&(_+=" ... "),"<Buffer "+_+">"},l.prototype.compare=function(_,s,F,X,ee){if(b(_,Uint8Array)&&(_=l.from(_,_.offset,_.byteLength)),!l.isBuffer(_))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof _);if(void 0===s&&(s=0),void 0===F&&(F=_?_.length:0),void 0===X&&(X=0),void 0===ee&&(ee=this.length),s<0||F>_.length||X<0||ee>this.length)throw new RangeError("out of range index");if(X>=ee&&s>=F)return 0;if(X>=ee)return-1;if(s>=F)return 1;if(this===_)return 0;for(var te=(ee>>>=0)-(X>>>=0),ge=(F>>>=0)-(s>>>=0),Ce=Math.min(te,ge),Ne=this.slice(X,ee),Ze=_.slice(s,F),be=0;be<Ce;++be)if(Ne[be]!==Ze[be]){te=Ne[be],ge=Ze[be];break}return te<ge?-1:ge<te?1:0},l.prototype.includes=function(_,s,F){return-1!==this.indexOf(_,s,F)},l.prototype.indexOf=function(_,s,F){return m(this,_,s,F,!0)},l.prototype.lastIndexOf=function(_,s,F){return m(this,_,s,F,!1)},l.prototype.write=function(_,s,F,X){if(void 0===s)X="utf8",F=this.length,s=0;else if(void 0===F&&"string"==typeof s)X=s,F=this.length,s=0;else{if(!isFinite(s))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");s>>>=0,isFinite(F)?(F>>>=0,void 0===X&&(X="utf8")):(X=F,F=void 0)}var ee=this.length-s;if((void 0===F||F>ee)&&(F=ee),_.length>0&&(F<0||s<0)||s>this.length)throw new RangeError("Attempt to write outside buffer bounds");X||(X="utf8");for(var te=!1;;)switch(X){case"hex":return u(this,_,s,F);case"utf8":case"utf-8":return E(this,_,s,F);case"ascii":return e(this,_,s,F);case"latin1":case"binary":return f(this,_,s,F);case"base64":return $(this,_,s,F);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,_,s,F);default:if(te)throw new TypeError("Unknown encoding: "+X);X=(""+X).toLowerCase(),te=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var V=4096;function de(T,_,s){var F="";s=Math.min(T.length,s);for(var X=_;X<s;++X)F+=String.fromCharCode(127&T[X]);return F}function ne(T,_,s){var F="";s=Math.min(T.length,s);for(var X=_;X<s;++X)F+=String.fromCharCode(T[X]);return F}function pe(T,_,s){var F=T.length;(!_||_<0)&&(_=0),(!s||s<0||s>F)&&(s=F);for(var X="",ee=_;ee<s;++ee)X+=C(T[ee]);return X}function ue(T,_,s){for(var F=T.slice(_,s),X="",ee=0;ee<F.length;ee+=2)X+=String.fromCharCode(F[ee]+256*F[ee+1]);return X}function he(T,_,s){if(T%1!=0||T<0)throw new RangeError("offset is not uint");if(T+_>s)throw new RangeError("Trying to access beyond buffer length")}function fe(T,_,s,F,X,ee){if(!l.isBuffer(T))throw new TypeError('"buffer" argument must be a Buffer instance');if(_>X||_<ee)throw new RangeError('"value" argument is out of bounds');if(s+F>T.length)throw new RangeError("Index out of range")}function Ie(T,_,s,F,X,ee){if(s+F>T.length)throw new RangeError("Index out of range");if(s<0)throw new RangeError("Index out of range")}function we(T,_,s,F,X){return _=+_,s>>>=0,X||Ie(T,0,s,4),r.write(T,_,s,F,23,4),s+4}function Oe(T,_,s,F,X){return _=+_,s>>>=0,X||Ie(T,0,s,8),r.write(T,_,s,F,52,8),s+8}l.prototype.slice=function(_,s){var F=this.length;(_=~~_)<0?(_+=F)<0&&(_=0):_>F&&(_=F),(s=void 0===s?F:~~s)<0?(s+=F)<0&&(s=0):s>F&&(s=F),s<_&&(s=_);var X=this.subarray(_,s);return X.__proto__=l.prototype,X},l.prototype.readUIntLE=function(_,s,F){_>>>=0,s>>>=0,F||he(_,s,this.length);for(var X=this[_],ee=1,te=0;++te<s&&(ee*=256);)X+=this[_+te]*ee;return X},l.prototype.readUIntBE=function(_,s,F){_>>>=0,s>>>=0,F||he(_,s,this.length);for(var X=this[_+--s],ee=1;s>0&&(ee*=256);)X+=this[_+--s]*ee;return X},l.prototype.readUInt8=function(_,s){return _>>>=0,s||he(_,1,this.length),this[_]},l.prototype.readUInt16LE=function(_,s){return _>>>=0,s||he(_,2,this.length),this[_]|this[_+1]<<8},l.prototype.readUInt16BE=function(_,s){return _>>>=0,s||he(_,2,this.length),this[_]<<8|this[_+1]},l.prototype.readUInt32LE=function(_,s){return _>>>=0,s||he(_,4,this.length),(this[_]|this[_+1]<<8|this[_+2]<<16)+16777216*this[_+3]},l.prototype.readUInt32BE=function(_,s){return _>>>=0,s||he(_,4,this.length),16777216*this[_]+(this[_+1]<<16|this[_+2]<<8|this[_+3])},l.prototype.readIntLE=function(_,s,F){_>>>=0,s>>>=0,F||he(_,s,this.length);for(var X=this[_],ee=1,te=0;++te<s&&(ee*=256);)X+=this[_+te]*ee;return X>=(ee*=128)&&(X-=Math.pow(2,8*s)),X},l.prototype.readIntBE=function(_,s,F){_>>>=0,s>>>=0,F||he(_,s,this.length);for(var X=s,ee=1,te=this[_+--X];X>0&&(ee*=256);)te+=this[_+--X]*ee;return te>=(ee*=128)&&(te-=Math.pow(2,8*s)),te},l.prototype.readInt8=function(_,s){return _>>>=0,s||he(_,1,this.length),128&this[_]?-1*(255-this[_]+1):this[_]},l.prototype.readInt16LE=function(_,s){_>>>=0,s||he(_,2,this.length);var F=this[_]|this[_+1]<<8;return 32768&F?4294901760|F:F},l.prototype.readInt16BE=function(_,s){_>>>=0,s||he(_,2,this.length);var F=this[_+1]|this[_]<<8;return 32768&F?4294901760|F:F},l.prototype.readInt32LE=function(_,s){return _>>>=0,s||he(_,4,this.length),this[_]|this[_+1]<<8|this[_+2]<<16|this[_+3]<<24},l.prototype.readInt32BE=function(_,s){return _>>>=0,s||he(_,4,this.length),this[_]<<24|this[_+1]<<16|this[_+2]<<8|this[_+3]},l.prototype.readFloatLE=function(_,s){return _>>>=0,s||he(_,4,this.length),r.read(this,_,!0,23,4)},l.prototype.readFloatBE=function(_,s){return _>>>=0,s||he(_,4,this.length),r.read(this,_,!1,23,4)},l.prototype.readDoubleLE=function(_,s){return _>>>=0,s||he(_,8,this.length),r.read(this,_,!0,52,8)},l.prototype.readDoubleBE=function(_,s){return _>>>=0,s||he(_,8,this.length),r.read(this,_,!1,52,8)},l.prototype.writeUIntLE=function(_,s,F,X){_=+_,s>>>=0,F>>>=0,X||fe(this,_,s,F,Math.pow(2,8*F)-1,0);var te=1,ge=0;for(this[s]=255&_;++ge<F&&(te*=256);)this[s+ge]=_/te&255;return s+F},l.prototype.writeUIntBE=function(_,s,F,X){_=+_,s>>>=0,F>>>=0,X||fe(this,_,s,F,Math.pow(2,8*F)-1,0);var te=F-1,ge=1;for(this[s+te]=255&_;--te>=0&&(ge*=256);)this[s+te]=_/ge&255;return s+F},l.prototype.writeUInt8=function(_,s,F){return _=+_,s>>>=0,F||fe(this,_,s,1,255,0),this[s]=255&_,s+1},l.prototype.writeUInt16LE=function(_,s,F){return _=+_,s>>>=0,F||fe(this,_,s,2,65535,0),this[s]=255&_,this[s+1]=_>>>8,s+2},l.prototype.writeUInt16BE=function(_,s,F){return _=+_,s>>>=0,F||fe(this,_,s,2,65535,0),this[s]=_>>>8,this[s+1]=255&_,s+2},l.prototype.writeUInt32LE=function(_,s,F){return _=+_,s>>>=0,F||fe(this,_,s,4,4294967295,0),this[s+3]=_>>>24,this[s+2]=_>>>16,this[s+1]=_>>>8,this[s]=255&_,s+4},l.prototype.writeUInt32BE=function(_,s,F){return _=+_,s>>>=0,F||fe(this,_,s,4,4294967295,0),this[s]=_>>>24,this[s+1]=_>>>16,this[s+2]=_>>>8,this[s+3]=255&_,s+4},l.prototype.writeIntLE=function(_,s,F,X){if(_=+_,s>>>=0,!X){var ee=Math.pow(2,8*F-1);fe(this,_,s,F,ee-1,-ee)}var te=0,ge=1,Ce=0;for(this[s]=255&_;++te<F&&(ge*=256);)_<0&&0===Ce&&0!==this[s+te-1]&&(Ce=1),this[s+te]=(_/ge>>0)-Ce&255;return s+F},l.prototype.writeIntBE=function(_,s,F,X){if(_=+_,s>>>=0,!X){var ee=Math.pow(2,8*F-1);fe(this,_,s,F,ee-1,-ee)}var te=F-1,ge=1,Ce=0;for(this[s+te]=255&_;--te>=0&&(ge*=256);)_<0&&0===Ce&&0!==this[s+te+1]&&(Ce=1),this[s+te]=(_/ge>>0)-Ce&255;return s+F},l.prototype.writeInt8=function(_,s,F){return _=+_,s>>>=0,F||fe(this,_,s,1,127,-128),_<0&&(_=255+_+1),this[s]=255&_,s+1},l.prototype.writeInt16LE=function(_,s,F){return _=+_,s>>>=0,F||fe(this,_,s,2,32767,-32768),this[s]=255&_,this[s+1]=_>>>8,s+2},l.prototype.writeInt16BE=function(_,s,F){return _=+_,s>>>=0,F||fe(this,_,s,2,32767,-32768),this[s]=_>>>8,this[s+1]=255&_,s+2},l.prototype.writeInt32LE=function(_,s,F){return _=+_,s>>>=0,F||fe(this,_,s,4,2147483647,-2147483648),this[s]=255&_,this[s+1]=_>>>8,this[s+2]=_>>>16,this[s+3]=_>>>24,s+4},l.prototype.writeInt32BE=function(_,s,F){return _=+_,s>>>=0,F||fe(this,_,s,4,2147483647,-2147483648),_<0&&(_=4294967295+_+1),this[s]=_>>>24,this[s+1]=_>>>16,this[s+2]=_>>>8,this[s+3]=255&_,s+4},l.prototype.writeFloatLE=function(_,s,F){return we(this,_,s,!0,F)},l.prototype.writeFloatBE=function(_,s,F){return we(this,_,s,!1,F)},l.prototype.writeDoubleLE=function(_,s,F){return Oe(this,_,s,!0,F)},l.prototype.writeDoubleBE=function(_,s,F){return Oe(this,_,s,!1,F)},l.prototype.copy=function(_,s,F,X){if(!l.isBuffer(_))throw new TypeError("argument should be a Buffer");if(F||(F=0),!X&&0!==X&&(X=this.length),s>=_.length&&(s=_.length),s||(s=0),X>0&&X<F&&(X=F),X===F||0===_.length||0===this.length)return 0;if(s<0)throw new RangeError("targetStart out of bounds");if(F<0||F>=this.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("sourceEnd out of bounds");X>this.length&&(X=this.length),_.length-s<X-F&&(X=_.length-s+F);var ee=X-F;if(this===_&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(s,F,X);else if(this===_&&F<s&&s<X)for(var te=ee-1;te>=0;--te)_[te+s]=this[te+F];else Uint8Array.prototype.set.call(_,this.subarray(F,X),s);return ee},l.prototype.fill=function(_,s,F,X){if("string"==typeof _){if("string"==typeof s?(X=s,s=0,F=this.length):"string"==typeof F&&(X=F,F=this.length),void 0!==X&&"string"!=typeof X)throw new TypeError("encoding must be a string");if("string"==typeof X&&!l.isEncoding(X))throw new TypeError("Unknown encoding: "+X);if(1===_.length){var ee=_.charCodeAt(0);("utf8"===X&&ee<128||"latin1"===X)&&(_=ee)}}else"number"==typeof _&&(_&=255);if(s<0||this.length<s||this.length<F)throw new RangeError("Out of range index");if(F<=s)return this;var te;if(s>>>=0,F=void 0===F?this.length:F>>>0,_||(_=0),"number"==typeof _)for(te=s;te<F;++te)this[te]=_;else{var ge=l.isBuffer(_)?_:l.from(_,X),Ce=ge.length;if(0===Ce)throw new TypeError('The value "'+_+'" is invalid for argument "value"');for(te=0;te<F-s;++te)this[te+s]=ge[te%Ce]}return this};var Ae=/[^+/0-9A-Za-z-_]/g;function C(T){return T<16?"0"+T.toString(16):T.toString(16)}function a(T,_){_=_||1/0;for(var s,F=T.length,X=null,ee=[],te=0;te<F;++te){if((s=T.charCodeAt(te))>55295&&s<57344){if(!X){if(s>56319){(_-=3)>-1&&ee.push(239,191,189);continue}if(te+1===F){(_-=3)>-1&&ee.push(239,191,189);continue}X=s;continue}if(s<56320){(_-=3)>-1&&ee.push(239,191,189),X=s;continue}s=65536+(X-55296<<10|s-56320)}else X&&(_-=3)>-1&&ee.push(239,191,189);if(X=null,s<128){if((_-=1)<0)break;ee.push(s)}else if(s<2048){if((_-=2)<0)break;ee.push(s>>6|192,63&s|128)}else if(s<65536){if((_-=3)<0)break;ee.push(s>>12|224,s>>6&63|128,63&s|128)}else{if(!(s<1114112))throw new Error("Invalid code point");if((_-=4)<0)break;ee.push(s>>18|240,s>>12&63|128,s>>6&63|128,63&s|128)}}return ee}function ie(T){return g.toByteArray(function We(T){if((T=(T=T.split("=")[0]).trim().replace(Ae,"")).length<2)return"";for(;T.length%4!=0;)T+="=";return T}(T))}function ae(T,_,s,F){for(var X=0;X<F&&!(X+s>=_.length||X>=T.length);++X)_[X+s]=T[X];return X}function b(T,_){return T instanceof _||null!=T&&null!=T.constructor&&null!=T.constructor.name&&T.constructor.name===_.name}function D(T){return T!=T}},93105:K=>{var Y=Object.create||function m(E){var e=function(){};return e.prototype=E,new e},d=Object.keys||function p(E){var e=[];for(var f in E)Object.prototype.hasOwnProperty.call(E,f)&&e.push(f);return f},g=Function.prototype.bind||function u(E){var e=this;return function(){return e.apply(E,arguments)}};function r(){(!this._events||!Object.prototype.hasOwnProperty.call(this,"_events"))&&(this._events=Y(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}K.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0;var x,A=10;try{var Z={};Object.defineProperty&&Object.defineProperty(Z,"x",{value:0}),x=0===Z.x}catch{x=!1}function l(E){return void 0===E._maxListeners?r.defaultMaxListeners:E._maxListeners}function k(E,e,f,$){var M,q,z;if("function"!=typeof f)throw new TypeError('"listener" argument must be a function');if((q=E._events)?(q.newListener&&(E.emit("newListener",e,f.listener?f.listener:f),q=E._events),z=q[e]):(q=E._events=Y(null),E._eventsCount=0),z){if("function"==typeof z?z=q[e]=$?[f,z]:[z,f]:$?z.unshift(f):z.push(f),!z.warned&&(M=l(E))&&M>0&&z.length>M){z.warned=!0;var V=new Error("Possible EventEmitter memory leak detected. "+z.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');V.name="MaxListenersExceededWarning",V.emitter=E,V.type=e,V.count=z.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",V.name,V.message)}}else z=q[e]=f,++E._eventsCount;return E}function P(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var E=new Array(arguments.length),e=0;e<E.length;++e)E[e]=arguments[e];this.listener.apply(this.target,E)}}function L(E,e,f){var $={fired:!1,wrapFn:void 0,target:E,type:e,listener:f},M=g.call(P,$);return M.listener=f,$.wrapFn=M,M}function I(E,e,f){var $=E._events;if(!$)return[];var M=$[e];return M?"function"==typeof M?f?[M.listener||M]:[M]:f?function U(E){for(var e=new Array(E.length),f=0;f<e.length;++f)e[f]=E[f].listener||E[f];return e}(M):S(M,M.length):[]}function G(E){var e=this._events;if(e){var f=e[E];if("function"==typeof f)return 1;if(f)return f.length}return 0}function S(E,e){for(var f=new Array(e),$=0;$<e;++$)f[$]=E[$];return f}x?Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return A},set:function(E){if("number"!=typeof E||E<0||E!=E)throw new TypeError('"defaultMaxListeners" must be a positive number');A=E}}):r.defaultMaxListeners=A,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},r.prototype.getMaxListeners=function(){return l(this)},r.prototype.emit=function(e){var f,$,M,q,z,V,le="error"===e;if(V=this._events)le=le&&null==V.error;else if(!le)return!1;if(le){if(arguments.length>1&&(f=arguments[1]),f instanceof Error)throw f;var de=new Error('Unhandled "error" event. ('+f+")");throw de.context=f,de}if(!($=V[e]))return!1;var ne="function"==typeof $;switch(M=arguments.length){case 1:!function h(E,e,f){if(e)E.call(f);else for(var $=E.length,M=S(E,$),q=0;q<$;++q)M[q].call(f)}($,ne,this);break;case 2:!function R(E,e,f,$){if(e)E.call(f,$);else for(var M=E.length,q=S(E,M),z=0;z<M;++z)q[z].call(f,$)}($,ne,this,arguments[1]);break;case 3:!function y(E,e,f,$,M){if(e)E.call(f,$,M);else for(var q=E.length,z=S(E,q),V=0;V<q;++V)z[V].call(f,$,M)}($,ne,this,arguments[1],arguments[2]);break;case 4:!function N(E,e,f,$,M,q){if(e)E.call(f,$,M,q);else for(var z=E.length,V=S(E,z),le=0;le<z;++le)V[le].call(f,$,M,q)}($,ne,this,arguments[1],arguments[2],arguments[3]);break;default:for(q=new Array(M-1),z=1;z<M;z++)q[z-1]=arguments[z];!function v(E,e,f,$){if(e)E.apply(f,$);else for(var M=E.length,q=S(E,M),z=0;z<M;++z)q[z].apply(f,$)}($,ne,this,q)}return!0},r.prototype.on=r.prototype.addListener=function(e,f){return k(this,e,f,!1)},r.prototype.prependListener=function(e,f){return k(this,e,f,!0)},r.prototype.once=function(e,f){if("function"!=typeof f)throw new TypeError('"listener" argument must be a function');return this.on(e,L(this,e,f)),this},r.prototype.prependOnceListener=function(e,f){if("function"!=typeof f)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,L(this,e,f)),this},r.prototype.removeListener=function(e,f){var $,M,q,z,V;if("function"!=typeof f)throw new TypeError('"listener" argument must be a function');if(!(M=this._events))return this;if(!($=M[e]))return this;if($===f||$.listener===f)0==--this._eventsCount?this._events=Y(null):(delete M[e],M.removeListener&&this.emit("removeListener",e,$.listener||f));else if("function"!=typeof $){for(q=-1,z=$.length-1;z>=0;z--)if($[z]===f||$[z].listener===f){V=$[z].listener,q=z;break}if(q<0)return this;0===q?$.shift():function B(E,e){for(var f=e,$=f+1,M=E.length;$<M;f+=1,$+=1)E[f]=E[$];E.pop()}($,q),1===$.length&&(M[e]=$[0]),M.removeListener&&this.emit("removeListener",e,V||f)}return this},r.prototype.removeAllListeners=function(e){var f,$,M;if(!($=this._events))return this;if(!$.removeListener)return 0===arguments.length?(this._events=Y(null),this._eventsCount=0):$[e]&&(0==--this._eventsCount?this._events=Y(null):delete $[e]),this;if(0===arguments.length){var z,q=d($);for(M=0;M<q.length;++M)"removeListener"!==(z=q[M])&&this.removeAllListeners(z);return this.removeAllListeners("removeListener"),this._events=Y(null),this._eventsCount=0,this}if("function"==typeof(f=$[e]))this.removeListener(e,f);else if(f)for(M=f.length-1;M>=0;M--)this.removeListener(e,f[M]);return this},r.prototype.listeners=function(e){return I(this,e,!0)},r.prototype.rawListeners=function(e){return I(this,e,!1)},r.listenerCount=function(E,e){return"function"==typeof E.listenerCount?E.listenerCount(e):G.call(E,e)},r.prototype.listenerCount=G,r.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},59879:K=>{K.exports="function"==typeof Object.create?function(d,g){g&&(d.super_=g,d.prototype=Object.create(g.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}))}:function(d,g){if(g){d.super_=g;var r=function(){};r.prototype=g.prototype,d.prototype=new r,d.prototype.constructor=d}}},55859:(K,Y,d)=>{var g=d(3875),r=g.Buffer;function A(Z,l){for(var h in Z)l[h]=Z[h]}function x(Z,l,h){return r(Z,l,h)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?K.exports=g:(A(g,Y),Y.Buffer=x),x.prototype=Object.create(r.prototype),A(r,x),x.from=function(Z,l,h){if("number"==typeof Z)throw new TypeError("Argument must not be a number");return r(Z,l,h)},x.alloc=function(Z,l,h){if("number"!=typeof Z)throw new TypeError("Argument must be a number");var R=r(Z);return void 0!==l?"string"==typeof h?R.fill(l,h):R.fill(l):R.fill(0),R},x.allocUnsafe=function(Z){if("number"!=typeof Z)throw new TypeError("Argument must be a number");return r(Z)},x.allocUnsafeSlow=function(Z){if("number"!=typeof Z)throw new TypeError("Argument must be a number");return g.SlowBuffer(Z)}},5473:(K,Y,d)=>{!function(g){g.parser=function(C,a){return new A(C,a)},g.SAXParser=A,g.SAXStream=N,g.createStream=function y(C,a){return new N(C,a)},g.MAX_BUFFER_LENGTH=65536;var h,r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function A(C,a){if(!(this instanceof A))return new A(C,a);var w=this;(function Z(C){for(var a=0,w=r.length;a<w;a++)C[r[a]]=""})(w),w.q=w.c="",w.bufferCheckPosition=g.MAX_BUFFER_LENGTH,w.opt=a||{},w.opt.lowercase=w.opt.lowercase||w.opt.lowercasetags,w.looseCase=w.opt.lowercase?"toLowerCase":"toUpperCase",w.tags=[],w.closed=w.closedRoot=w.sawRoot=!1,w.tag=w.error=null,w.strict=!!C,w.noscript=!(!C&&!w.opt.noscript),w.state=f.BEGIN,w.strictEntities=w.opt.strictEntities,w.ENTITIES=Object.create(w.strictEntities?g.XML_ENTITIES:g.ENTITIES),w.attribList=[],w.opt.xmlns&&(w.ns=Object.create(I)),w.trackPosition=!1!==w.opt.position,w.trackPosition&&(w.position=w.line=w.column=0),M(w,"onready")}g.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(C){function a(){}return a.prototype=C,new a}),Object.keys||(Object.keys=function(C){var a=[];for(var w in C)C.hasOwnProperty(w)&&a.push(w);return a}),A.prototype={end:function(){de(this)},write:function We(C){var a=this;if(this.error)throw this.error;if(a.closed)return le(a,"Cannot write after close. Assign an onready handler.");if(null===C)return de(a);"object"==typeof C&&(C=C.toString());for(var w=0,W="";W=Ae(C,w++),a.c=W,W;)switch(a.trackPosition&&(a.position++,"\n"===W?(a.line++,a.column=0):a.column++),a.state){case f.BEGIN:if(a.state=f.BEGIN_WHITESPACE,"\ufeff"===W)continue;Oe(a,W);continue;case f.BEGIN_WHITESPACE:Oe(a,W);continue;case f.TEXT:if(a.sawRoot&&!a.closedRoot){for(var ie=w-1;W&&"<"!==W&&"&"!==W;)(W=Ae(C,w++))&&a.trackPosition&&(a.position++,"\n"===W?(a.line++,a.column=0):a.column++);a.textNode+=C.substring(ie,w-1)}"<"!==W||a.sawRoot&&a.closedRoot&&!a.strict?(!m(W)&&(!a.sawRoot||a.closedRoot)&&ne(a,"Text data outside of root node."),"&"===W?a.state=f.TEXT_ENTITY:a.textNode+=W):(a.state=f.OPEN_WAKA,a.startTagPosition=a.position);continue;case f.SCRIPT:"<"===W?a.state=f.SCRIPT_ENDING:a.script+=W;continue;case f.SCRIPT_ENDING:"/"===W?a.state=f.CLOSE_TAG:(a.script+="<"+W,a.state=f.SCRIPT);continue;case f.OPEN_WAKA:"!"===W?(a.state=f.SGML_DECL,a.sgmlDecl=""):m(W)||(E(G,W)?(a.state=f.OPEN_TAG,a.tagName=W):"/"===W?(a.state=f.CLOSE_TAG,a.tagName=""):"?"===W?(a.state=f.PROC_INST,a.procInstName=a.procInstBody=""):(ne(a,"Unencoded <"),a.startTagPosition+1<a.position&&(W=new Array(a.position-a.startTagPosition).join(" ")+W),a.textNode+="<"+W,a.state=f.TEXT));continue;case f.SGML_DECL:(a.sgmlDecl+W).toUpperCase()===v?(q(a,"onopencdata"),a.state=f.CDATA,a.sgmlDecl="",a.cdata=""):a.sgmlDecl+W==="--"?(a.state=f.COMMENT,a.comment="",a.sgmlDecl=""):(a.sgmlDecl+W).toUpperCase()===k?(a.state=f.DOCTYPE,(a.doctype||a.sawRoot)&&ne(a,"Inappropriately located doctype declaration"),a.doctype="",a.sgmlDecl=""):">"===W?(q(a,"onsgmldeclaration",a.sgmlDecl),a.sgmlDecl="",a.state=f.TEXT):(p(W)&&(a.state=f.SGML_DECL_QUOTED),a.sgmlDecl+=W);continue;case f.SGML_DECL_QUOTED:W===a.q&&(a.state=f.SGML_DECL,a.q=""),a.sgmlDecl+=W;continue;case f.DOCTYPE:">"===W?(a.state=f.TEXT,q(a,"ondoctype",a.doctype),a.doctype=!0):(a.doctype+=W,"["===W?a.state=f.DOCTYPE_DTD:p(W)&&(a.state=f.DOCTYPE_QUOTED,a.q=W));continue;case f.DOCTYPE_QUOTED:a.doctype+=W,W===a.q&&(a.q="",a.state=f.DOCTYPE);continue;case f.DOCTYPE_DTD:a.doctype+=W,"]"===W?a.state=f.DOCTYPE:p(W)&&(a.state=f.DOCTYPE_DTD_QUOTED,a.q=W);continue;case f.DOCTYPE_DTD_QUOTED:a.doctype+=W,W===a.q&&(a.state=f.DOCTYPE_DTD,a.q="");continue;case f.COMMENT:"-"===W?a.state=f.COMMENT_ENDING:a.comment+=W;continue;case f.COMMENT_ENDING:"-"===W?(a.state=f.COMMENT_ENDED,a.comment=V(a.opt,a.comment),a.comment&&q(a,"oncomment",a.comment),a.comment=""):(a.comment+="-"+W,a.state=f.COMMENT);continue;case f.COMMENT_ENDED:">"!==W?(ne(a,"Malformed comment"),a.comment+="--"+W,a.state=f.COMMENT):a.state=f.TEXT;continue;case f.CDATA:"]"===W?a.state=f.CDATA_ENDING:a.cdata+=W;continue;case f.CDATA_ENDING:"]"===W?a.state=f.CDATA_ENDING_2:(a.cdata+="]"+W,a.state=f.CDATA);continue;case f.CDATA_ENDING_2:">"===W?(a.cdata&&q(a,"oncdata",a.cdata),q(a,"onclosecdata"),a.cdata="",a.state=f.TEXT):"]"===W?a.cdata+="]":(a.cdata+="]]"+W,a.state=f.CDATA);continue;case f.PROC_INST:"?"===W?a.state=f.PROC_INST_ENDING:m(W)?a.state=f.PROC_INST_BODY:a.procInstName+=W;continue;case f.PROC_INST_BODY:if(!a.procInstBody&&m(W))continue;"?"===W?a.state=f.PROC_INST_ENDING:a.procInstBody+=W;continue;case f.PROC_INST_ENDING:">"===W?(q(a,"onprocessinginstruction",{name:a.procInstName,body:a.procInstBody}),a.procInstName=a.procInstBody="",a.state=f.TEXT):(a.procInstBody+="?"+W,a.state=f.PROC_INST_BODY);continue;case f.OPEN_TAG:E(B,W)?a.tagName+=W:(pe(a),">"===W?fe(a):"/"===W?a.state=f.OPEN_TAG_SLASH:(m(W)||ne(a,"Invalid character in tag name"),a.state=f.ATTRIB));continue;case f.OPEN_TAG_SLASH:">"===W?(fe(a,!0),Ie(a)):(ne(a,"Forward-slash in opening tag not followed by >"),a.state=f.ATTRIB);continue;case f.ATTRIB:if(m(W))continue;">"===W?fe(a):"/"===W?a.state=f.OPEN_TAG_SLASH:E(G,W)?(a.attribName=W,a.attribValue="",a.state=f.ATTRIB_NAME):ne(a,"Invalid attribute name");continue;case f.ATTRIB_NAME:"="===W?a.state=f.ATTRIB_VALUE:">"===W?(ne(a,"Attribute without value"),a.attribValue=a.attribName,he(a),fe(a)):m(W)?a.state=f.ATTRIB_NAME_SAW_WHITE:E(B,W)?a.attribName+=W:ne(a,"Invalid attribute name");continue;case f.ATTRIB_NAME_SAW_WHITE:if("="===W)a.state=f.ATTRIB_VALUE;else{if(m(W))continue;ne(a,"Attribute without value"),a.tag.attributes[a.attribName]="",a.attribValue="",q(a,"onattribute",{name:a.attribName,value:""}),a.attribName="",">"===W?fe(a):E(G,W)?(a.attribName=W,a.state=f.ATTRIB_NAME):(ne(a,"Invalid attribute name"),a.state=f.ATTRIB)}continue;case f.ATTRIB_VALUE:if(m(W))continue;p(W)?(a.q=W,a.state=f.ATTRIB_VALUE_QUOTED):(ne(a,"Unquoted attribute value"),a.state=f.ATTRIB_VALUE_UNQUOTED,a.attribValue=W);continue;case f.ATTRIB_VALUE_QUOTED:if(W!==a.q){"&"===W?a.state=f.ATTRIB_VALUE_ENTITY_Q:a.attribValue+=W;continue}he(a),a.q="",a.state=f.ATTRIB_VALUE_CLOSED;continue;case f.ATTRIB_VALUE_CLOSED:m(W)?a.state=f.ATTRIB:">"===W?fe(a):"/"===W?a.state=f.OPEN_TAG_SLASH:E(G,W)?(ne(a,"No whitespace between attributes"),a.attribName=W,a.attribValue="",a.state=f.ATTRIB_NAME):ne(a,"Invalid attribute name");continue;case f.ATTRIB_VALUE_UNQUOTED:if(!u(W)){"&"===W?a.state=f.ATTRIB_VALUE_ENTITY_U:a.attribValue+=W;continue}he(a),">"===W?fe(a):a.state=f.ATTRIB;continue;case f.CLOSE_TAG:if(a.tagName)">"===W?Ie(a):E(B,W)?a.tagName+=W:a.script?(a.script+="</"+a.tagName,a.tagName="",a.state=f.SCRIPT):(m(W)||ne(a,"Invalid tagname in closing tag"),a.state=f.CLOSE_TAG_SAW_WHITE);else{if(m(W))continue;e(G,W)?a.script?(a.script+="</"+W,a.state=f.SCRIPT):ne(a,"Invalid tagname in closing tag."):a.tagName=W}continue;case f.CLOSE_TAG_SAW_WHITE:if(m(W))continue;">"===W?Ie(a):ne(a,"Invalid characters in closing tag");continue;case f.TEXT_ENTITY:case f.ATTRIB_VALUE_ENTITY_Q:case f.ATTRIB_VALUE_ENTITY_U:var b,D;switch(a.state){case f.TEXT_ENTITY:b=f.TEXT,D="textNode";break;case f.ATTRIB_VALUE_ENTITY_Q:b=f.ATTRIB_VALUE_QUOTED,D="attribValue";break;case f.ATTRIB_VALUE_ENTITY_U:b=f.ATTRIB_VALUE_UNQUOTED,D="attribValue"}if(";"===W)if(a.opt.unparsedEntities){var T=we(a);a.entity="",a.state=b,a.write(T)}else a[D]+=we(a),a.entity="",a.state=b;else E(a.entity.length?U:S,W)?a.entity+=W:(ne(a,"Invalid character in entity name"),a[D]+="&"+a.entity+W,a.entity="",a.state=b);continue;default:throw new Error(a,"Unknown state: "+a.state)}return a.position>=a.bufferCheckPosition&&function x(C){for(var a=Math.max(g.MAX_BUFFER_LENGTH,10),w=0,W=0,ie=r.length;W<ie;W++){var ae=C[r[W]].length;if(ae>a)switch(r[W]){case"textNode":z(C);break;case"cdata":q(C,"oncdata",C.cdata),C.cdata="";break;case"script":q(C,"onscript",C.script),C.script="";break;default:le(C,"Max buffer length exceeded: "+r[W])}w=Math.max(w,ae)}C.bufferCheckPosition=g.MAX_BUFFER_LENGTH-w+C.position}(a),a},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){!function l(C){z(C),""!==C.cdata&&(q(C,"oncdata",C.cdata),C.cdata=""),""!==C.script&&(q(C,"onscript",C.script),C.script="")}(this)}};try{h=d(36917).Stream}catch{h=function(){}}h||(h=function(){});var R=g.EVENTS.filter(function(C){return"error"!==C&&"end"!==C});function N(C,a){if(!(this instanceof N))return new N(C,a);h.apply(this),this._parser=new A(C,a),this.writable=!0,this.readable=!0;var w=this;this._parser.onend=function(){w.emit("end")},this._parser.onerror=function(W){w.emit("error",W),w._parser.error=null},this._decoder=null,R.forEach(function(W){Object.defineProperty(w,"on"+W,{get:function(){return w._parser["on"+W]},set:function(ie){if(!ie)return w.removeAllListeners(W),w._parser["on"+W]=ie,ie;w.on(W,ie)},enumerable:!0,configurable:!1})})}(N.prototype=Object.create(h.prototype,{constructor:{value:N}})).write=function(C){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(C)){if(!this._decoder){var a=d(32519).s;this._decoder=new a("utf8")}C=this._decoder.write(C)}return this._parser.write(C.toString()),this.emit("data",C),!0},N.prototype.end=function(C){return C&&C.length&&this.write(C),this._parser.end(),!0},N.prototype.on=function(C,a){var w=this;return!w._parser["on"+C]&&-1!==R.indexOf(C)&&(w._parser["on"+C]=function(){var W=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);W.splice(0,0,C),w.emit.apply(w,W)}),h.prototype.on.call(w,C,a)};var v="[CDATA[",k="DOCTYPE",P="http://www.w3.org/XML/1998/namespace",L="http://www.w3.org/2000/xmlns/",I={xml:P,xmlns:L},G=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,B=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,S=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,U=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function m(C){return" "===C||"\n"===C||"\r"===C||"\t"===C}function p(C){return'"'===C||"'"===C}function u(C){return">"===C||m(C)}function E(C,a){return C.test(a)}function e(C,a){return!E(C,a)}var C,a,w,f=0;for(var $ in g.STATE={BEGIN:f++,BEGIN_WHITESPACE:f++,TEXT:f++,TEXT_ENTITY:f++,OPEN_WAKA:f++,SGML_DECL:f++,SGML_DECL_QUOTED:f++,DOCTYPE:f++,DOCTYPE_QUOTED:f++,DOCTYPE_DTD:f++,DOCTYPE_DTD_QUOTED:f++,COMMENT_STARTING:f++,COMMENT:f++,COMMENT_ENDING:f++,COMMENT_ENDED:f++,CDATA:f++,CDATA_ENDING:f++,CDATA_ENDING_2:f++,PROC_INST:f++,PROC_INST_BODY:f++,PROC_INST_ENDING:f++,OPEN_TAG:f++,OPEN_TAG_SLASH:f++,ATTRIB:f++,ATTRIB_NAME:f++,ATTRIB_NAME_SAW_WHITE:f++,ATTRIB_VALUE:f++,ATTRIB_VALUE_QUOTED:f++,ATTRIB_VALUE_CLOSED:f++,ATTRIB_VALUE_UNQUOTED:f++,ATTRIB_VALUE_ENTITY_Q:f++,ATTRIB_VALUE_ENTITY_U:f++,CLOSE_TAG:f++,CLOSE_TAG_SAW_WHITE:f++,SCRIPT:f++,SCRIPT_ENDING:f++},g.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},g.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(g.ENTITIES).forEach(function(C){var a=g.ENTITIES[C],w="number"==typeof a?String.fromCharCode(a):a;g.ENTITIES[C]=w}),g.STATE)g.STATE[g.STATE[$]]=$;function M(C,a,w){C[a]&&C[a](w)}function q(C,a,w){C.textNode&&z(C),M(C,a,w)}function z(C){C.textNode=V(C.opt,C.textNode),C.textNode&&M(C,"ontext",C.textNode),C.textNode=""}function V(C,a){return C.trim&&(a=a.trim()),C.normalize&&(a=a.replace(/\s+/g," ")),a}function le(C,a){return z(C),C.trackPosition&&(a+="\nLine: "+C.line+"\nColumn: "+C.column+"\nChar: "+C.c),a=new Error(a),C.error=a,M(C,"onerror",a),C}function de(C){return C.sawRoot&&!C.closedRoot&&ne(C,"Unclosed root tag"),C.state!==f.BEGIN&&C.state!==f.BEGIN_WHITESPACE&&C.state!==f.TEXT&&le(C,"Unexpected end"),z(C),C.c="",C.closed=!0,M(C,"onend"),A.call(C,C.strict,C.opt),C}function ne(C,a){if("object"!=typeof C||!(C instanceof A))throw new Error("bad call to strictFail");C.strict&&le(C,a)}function pe(C){C.strict||(C.tagName=C.tagName[C.looseCase]());var a=C.tags[C.tags.length-1]||C,w=C.tag={name:C.tagName,attributes:{}};C.opt.xmlns&&(w.ns=a.ns),C.attribList.length=0,q(C,"onopentagstart",w)}function ue(C,a){var W=C.indexOf(":")<0?["",C]:C.split(":"),ie=W[0],ae=W[1];return a&&"xmlns"===C&&(ie="xmlns",ae=""),{prefix:ie,local:ae}}function he(C){if(C.strict||(C.attribName=C.attribName[C.looseCase]()),-1!==C.attribList.indexOf(C.attribName)||C.tag.attributes.hasOwnProperty(C.attribName))C.attribName=C.attribValue="";else{if(C.opt.xmlns){var a=ue(C.attribName,!0),W=a.local;if("xmlns"===a.prefix)if("xml"===W&&C.attribValue!==P)ne(C,"xml: prefix must be bound to "+P+"\nActual: "+C.attribValue);else if("xmlns"===W&&C.attribValue!==L)ne(C,"xmlns: prefix must be bound to "+L+"\nActual: "+C.attribValue);else{var ie=C.tag,ae=C.tags[C.tags.length-1]||C;ie.ns===ae.ns&&(ie.ns=Object.create(ae.ns)),ie.ns[W]=C.attribValue}C.attribList.push([C.attribName,C.attribValue])}else C.tag.attributes[C.attribName]=C.attribValue,q(C,"onattribute",{name:C.attribName,value:C.attribValue});C.attribName=C.attribValue=""}}function fe(C,a){if(C.opt.xmlns){var w=C.tag,W=ue(C.tagName);w.prefix=W.prefix,w.local=W.local,w.uri=w.ns[W.prefix]||"",w.prefix&&!w.uri&&(ne(C,"Unbound namespace prefix: "+JSON.stringify(C.tagName)),w.uri=W.prefix),w.ns&&(C.tags[C.tags.length-1]||C).ns!==w.ns&&Object.keys(w.ns).forEach(function(ge){q(C,"onopennamespace",{prefix:ge,uri:w.ns[ge]})});for(var ae=0,b=C.attribList.length;ae<b;ae++){var D=C.attribList[ae],T=D[0],_=D[1],s=ue(T,!0),F=s.prefix,ee=""===F?"":w.ns[F]||"",te={name:T,value:_,prefix:F,local:s.local,uri:ee};F&&"xmlns"!==F&&!ee&&(ne(C,"Unbound namespace prefix: "+JSON.stringify(F)),te.uri=F),C.tag.attributes[T]=te,q(C,"onattribute",te)}C.attribList.length=0}C.tag.isSelfClosing=!!a,C.sawRoot=!0,C.tags.push(C.tag),q(C,"onopentag",C.tag),a||(C.state=C.noscript||"script"!==C.tagName.toLowerCase()?f.TEXT:f.SCRIPT,C.tag=null,C.tagName=""),C.attribName=C.attribValue="",C.attribList.length=0}function Ie(C){if(!C.tagName)return ne(C,"Weird empty close tag."),C.textNode+="</>",void(C.state=f.TEXT);if(C.script){if("script"!==C.tagName)return C.script+="</"+C.tagName+">",C.tagName="",void(C.state=f.SCRIPT);q(C,"onscript",C.script),C.script=""}var a=C.tags.length,w=C.tagName;C.strict||(w=w[C.looseCase]());for(var W=w;a--&&C.tags[a].name!==W;)ne(C,"Unexpected close tag");if(a<0)return ne(C,"Unmatched closing tag: "+C.tagName),C.textNode+="</"+C.tagName+">",void(C.state=f.TEXT);C.tagName=w;for(var ae=C.tags.length;ae-- >a;){var b=C.tag=C.tags.pop();C.tagName=C.tag.name,q(C,"onclosetag",C.tagName);var D={};for(var T in b.ns)D[T]=b.ns[T];C.opt.xmlns&&b.ns!==(C.tags[C.tags.length-1]||C).ns&&Object.keys(b.ns).forEach(function(s){q(C,"onclosenamespace",{prefix:s,uri:b.ns[s]})})}0===a&&(C.closedRoot=!0),C.tagName=C.attribValue=C.attribName="",C.attribList.length=0,C.state=f.TEXT}function we(C){var W,a=C.entity,w=a.toLowerCase(),ie="";return C.ENTITIES[a]?C.ENTITIES[a]:C.ENTITIES[w]?C.ENTITIES[w]:("#"===(a=w).charAt(0)&&("x"===a.charAt(1)?(a=a.slice(2),ie=(W=parseInt(a,16)).toString(16)):(a=a.slice(1),ie=(W=parseInt(a,10)).toString(10))),a=a.replace(/^0+/,""),isNaN(W)||ie.toLowerCase()!==a?(ne(C,"Invalid character entity"),"&"+C.entity+";"):String.fromCodePoint(W))}function Oe(C,a){"<"===a?(C.state=f.OPEN_WAKA,C.startTagPosition=C.position):m(a)||(ne(C,"Non-whitespace before first tag."),C.textNode=a,C.state=f.TEXT)}function Ae(C,a){var w="";return a<C.length&&(w=C.charAt(a)),w}f=g.STATE,String.fromCodePoint||(C=String.fromCharCode,a=Math.floor,w=function(){var ie=[],D=-1,T=arguments.length;if(!T)return"";for(var _="";++D<T;){var s=Number(arguments[D]);if(!isFinite(s)||s<0||s>1114111||a(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?ie.push(s):ie.push(55296+((s-=65536)>>10),s%1024+56320),(D+1===T||ie.length>16384)&&(_+=C.apply(null,ie),ie.length=0)}return _},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:w,configurable:!0,writable:!0}):String.fromCodePoint=w)}(Y)},45470:function(){!function(K,Y){"use strict";if(!K.setImmediate){var x,d=1,g={},r=!1,A=K.document,I=Object.getPrototypeOf&&Object.getPrototypeOf(K);I=I&&I.setTimeout?I:K,"[object process]"==={}.toString.call(K.process)?function y(){x=function(G){process.nextTick(function(){R(G)})}}():function N(){if(K.postMessage&&!K.importScripts){var G=!0,B=K.onmessage;return K.onmessage=function(){G=!1},K.postMessage("","*"),K.onmessage=B,G}}()?function v(){var G="setImmediate$"+Math.random()+"$",B=function(S){S.source===K&&"string"==typeof S.data&&0===S.data.indexOf(G)&&R(+S.data.slice(G.length))};K.addEventListener?K.addEventListener("message",B,!1):K.attachEvent("onmessage",B),x=function(S){K.postMessage(G+S,"*")}}():K.MessageChannel?function k(){var G=new MessageChannel;G.port1.onmessage=function(B){R(B.data)},x=function(B){G.port2.postMessage(B)}}():A&&"onreadystatechange"in A.createElement("script")?function P(){var G=A.documentElement;x=function(B){var S=A.createElement("script");S.onreadystatechange=function(){R(B),S.onreadystatechange=null,G.removeChild(S),S=null},G.appendChild(S)}}():function L(){x=function(G){setTimeout(R,0,G)}}(),I.setImmediate=function Z(G){"function"!=typeof G&&(G=new Function(""+G));for(var B=new Array(arguments.length-1),S=0;S<B.length;S++)B[S]=arguments[S+1];return g[d]={callback:G,args:B},x(d),d++},I.clearImmediate=l}function l(G){delete g[G]}function R(G){if(r)setTimeout(R,0,G);else{var B=g[G];if(B){r=!0;try{!function h(G){var B=G.callback,S=G.args;switch(S.length){case 0:B();break;case 1:B(S[0]);break;case 2:B(S[0],S[1]);break;case 3:B(S[0],S[1],S[2]);break;default:B.apply(Y,S)}}(B)}finally{l(G),r=!1}}}}}(typeof self>"u"?typeof global>"u"?this:global:self)},36917:(K,Y,d)=>{K.exports=A;var g=d(93105).EventEmitter;function A(){g.call(this)}d(59879)(A,g),A.Readable=d(88917),A.Writable=d(38908),A.Duplex=d(83500),A.Transform=d(83484),A.PassThrough=d(97567),A.finished=d(83770),A.pipeline=d(77882),A.Stream=A,A.prototype.pipe=function(x,Z){var l=this;function h(L){x.writable&&!1===x.write(L)&&l.pause&&l.pause()}function R(){l.readable&&l.resume&&l.resume()}l.on("data",h),x.on("drain",R),!x._isStdio&&(!Z||!1!==Z.end)&&(l.on("end",N),l.on("close",v));var y=!1;function N(){y||(y=!0,x.end())}function v(){y||(y=!0,"function"==typeof x.destroy&&x.destroy())}function k(L){if(P(),0===g.listenerCount(this,"error"))throw L}function P(){l.removeListener("data",h),x.removeListener("drain",R),l.removeListener("end",N),l.removeListener("close",v),l.removeListener("error",k),x.removeListener("error",k),l.removeListener("end",P),l.removeListener("close",P),x.removeListener("close",P)}return l.on("error",k),x.on("error",k),l.on("end",P),l.on("close",P),x.on("close",P),x.emit("pipe",l),x}},86985:K=>{"use strict";var d={};function g(l,h,R){R||(R=Error);var N=function(v){function k(P,L,I){return v.call(this,function y(v,k,P){return"string"==typeof h?h:h(v,k,P)}(P,L,I))||this}return function Y(l,h){l.prototype=Object.create(h.prototype),l.prototype.constructor=l,l.__proto__=h}(k,v),k}(R);N.prototype.name=R.name,N.prototype.code=l,d[l]=N}function r(l,h){if(Array.isArray(l)){var R=l.length;return l=l.map(function(y){return String(y)}),R>2?"one of ".concat(h," ").concat(l.slice(0,R-1).join(", "),", or ")+l[R-1]:2===R?"one of ".concat(h," ").concat(l[0]," or ").concat(l[1]):"of ".concat(h," ").concat(l[0])}return"of ".concat(h," ").concat(String(l))}g("ERR_INVALID_OPT_VALUE",function(l,h){return'The value "'+h+'" is invalid for option "'+l+'"'},TypeError),g("ERR_INVALID_ARG_TYPE",function(l,h,R){var y,N;if("string"==typeof h&&function A(l,h,R){return l.substr(!R||R<0?0:+R,h.length)===h}(h,"not ")?(y="must not be",h=h.replace(/^not /,"")):y="must be",function x(l,h,R){return(void 0===R||R>l.length)&&(R=l.length),l.substring(R-h.length,R)===h}(l," argument"))N="The ".concat(l," ").concat(y," ").concat(r(h,"type"));else{var v=function Z(l,h,R){return"number"!=typeof R&&(R=0),!(R+h.length>l.length)&&-1!==l.indexOf(h,R)}(l,".")?"property":"argument";N='The "'.concat(l,'" ').concat(v," ").concat(y," ").concat(r(h,"type"))}return N+". Received type ".concat(typeof R)},TypeError),g("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),g("ERR_METHOD_NOT_IMPLEMENTED",function(l){return"The "+l+" method is not implemented"}),g("ERR_STREAM_PREMATURE_CLOSE","Premature close"),g("ERR_STREAM_DESTROYED",function(l){return"Cannot call "+l+" after a stream was destroyed"}),g("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),g("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),g("ERR_STREAM_WRITE_AFTER_END","write after end"),g("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),g("ERR_UNKNOWN_ENCODING",function(l){return"Unknown encoding: "+l},TypeError),g("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),K.exports.q=d},83500:(K,Y,d)=>{"use strict";var g=Object.keys||function(N){var v=[];for(var k in N)v.push(k);return v};K.exports=h;var r=d(88917),A=d(38908);d(59879)(h,r);for(var x=g(A.prototype),Z=0;Z<x.length;Z++){var l=x[Z];h.prototype[l]||(h.prototype[l]=A.prototype[l])}function h(N){if(!(this instanceof h))return new h(N);r.call(this,N),A.call(this,N),this.allowHalfOpen=!0,N&&(!1===N.readable&&(this.readable=!1),!1===N.writable&&(this.writable=!1),!1===N.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",R)))}function R(){this._writableState.ended||process.nextTick(y,this)}function y(N){N.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(h.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(h.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(v){void 0===this._readableState||void 0===this._writableState||(this._readableState.destroyed=v,this._writableState.destroyed=v)}})},97567:(K,Y,d)=>{"use strict";K.exports=r;var g=d(83484);function r(A){if(!(this instanceof r))return new r(A);g.call(this,A)}d(59879)(r,g),r.prototype._transform=function(A,x,Z){Z(null,A)}},88917:(K,Y,d)=>{"use strict";var g;K.exports=M,M.ReadableState=$,d(93105);var N,A=function(D,T){return D.listeners(T).length},x=d(27882),Z=d(3875).Buffer,l=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},y=d(40964);N=y&&y.debuglog?y.debuglog("stream"):function(){};var m,p,u,v=d(82319),k=d(87904),L=d(62632).getHighWaterMark,I=d(86985).q,G=I.ERR_INVALID_ARG_TYPE,B=I.ERR_STREAM_PUSH_AFTER_EOF,S=I.ERR_METHOD_NOT_IMPLEMENTED,U=I.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;d(59879)(M,x);var E=k.errorOrDestroy,e=["error","close","destroy","pause","resume"];function $(b,D,T){g=g||d(83500),"boolean"!=typeof T&&(T=D instanceof g),this.objectMode=!!(b=b||{}).objectMode,T&&(this.objectMode=this.objectMode||!!b.readableObjectMode),this.highWaterMark=L(this,b,"readableHighWaterMark",T),this.buffer=new v,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==b.emitClose,this.autoDestroy=!!b.autoDestroy,this.destroyed=!1,this.defaultEncoding=b.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,b.encoding&&(m||(m=d(32519).s),this.decoder=new m(b.encoding),this.encoding=b.encoding)}function M(b){if(g=g||d(83500),!(this instanceof M))return new M(b);this._readableState=new $(b,this,this instanceof g),this.readable=!0,b&&("function"==typeof b.read&&(this._read=b.read),"function"==typeof b.destroy&&(this._destroy=b.destroy)),x.call(this)}function q(b,D,T,_,s){N("readableAddChunk",D);var X,F=b._readableState;if(null===D)F.reading=!1,function pe(b,D){if(N("onEofChunk"),!D.ended){if(D.decoder){var T=D.decoder.end();T&&T.length&&(D.buffer.push(T),D.length+=D.objectMode?1:T.length)}D.ended=!0,D.sync?ue(b):(D.needReadable=!1,D.emittedReadable||(D.emittedReadable=!0,he(b)))}}(b,F);else if(s||(X=function V(b,D){var T;return!function R(b){return Z.isBuffer(b)||b instanceof l}(D)&&"string"!=typeof D&&void 0!==D&&!b.objectMode&&(T=new G("chunk",["string","Buffer","Uint8Array"],D)),T}(F,D)),X)E(b,X);else if(F.objectMode||D&&D.length>0)if("string"!=typeof D&&!F.objectMode&&Object.getPrototypeOf(D)!==Z.prototype&&(D=function h(b){return Z.from(b)}(D)),_)F.endEmitted?E(b,new U):z(b,F,D,!0);else if(F.ended)E(b,new B);else{if(F.destroyed)return!1;F.reading=!1,F.decoder&&!T?(D=F.decoder.write(D),F.objectMode||0!==D.length?z(b,F,D,!1):fe(b,F)):z(b,F,D,!1)}else _||(F.reading=!1,fe(b,F));return!F.ended&&(F.length<F.highWaterMark||0===F.length)}function z(b,D,T,_){D.flowing&&0===D.length&&!D.sync?(D.awaitDrain=0,b.emit("data",T)):(D.length+=D.objectMode?1:T.length,_?D.buffer.unshift(T):D.buffer.push(T),D.needReadable&&ue(b)),fe(b,D)}Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(D){this._readableState&&(this._readableState.destroyed=D)}}),M.prototype.destroy=k.destroy,M.prototype._undestroy=k.undestroy,M.prototype._destroy=function(b,D){D(b)},M.prototype.push=function(b,D){var _,T=this._readableState;return T.objectMode?_=!0:"string"==typeof b&&((D=D||T.defaultEncoding)!==T.encoding&&(b=Z.from(b,D),D=""),_=!0),q(this,b,D,!1,_)},M.prototype.unshift=function(b){return q(this,b,null,!0,!1)},M.prototype.isPaused=function(){return!1===this._readableState.flowing},M.prototype.setEncoding=function(b){m||(m=d(32519).s);var D=new m(b);this._readableState.decoder=D,this._readableState.encoding=this._readableState.decoder.encoding;for(var T=this._readableState.buffer.head,_="";null!==T;)_+=D.write(T.data),T=T.next;return this._readableState.buffer.clear(),""!==_&&this._readableState.buffer.push(_),this._readableState.length=_.length,this};var le=1073741824;function ne(b,D){return b<=0||0===D.length&&D.ended?0:D.objectMode?1:b!=b?D.flowing&&D.length?D.buffer.head.data.length:D.length:(b>D.highWaterMark&&(D.highWaterMark=function de(b){return b>=le?b=le:(b--,b|=b>>>1,b|=b>>>2,b|=b>>>4,b|=b>>>8,b|=b>>>16,b++),b}(b)),b<=D.length?b:D.ended?D.length:(D.needReadable=!0,0))}function ue(b){var D=b._readableState;N("emitReadable",D.needReadable,D.emittedReadable),D.needReadable=!1,D.emittedReadable||(N("emitReadable",D.flowing),D.emittedReadable=!0,process.nextTick(he,b))}function he(b){var D=b._readableState;N("emitReadable_",D.destroyed,D.length,D.ended),!D.destroyed&&(D.length||D.ended)&&(b.emit("readable"),D.emittedReadable=!1),D.needReadable=!D.flowing&&!D.ended&&D.length<=D.highWaterMark,a(b)}function fe(b,D){D.readingMore||(D.readingMore=!0,process.nextTick(Ie,b,D))}function Ie(b,D){for(;!D.reading&&!D.ended&&(D.length<D.highWaterMark||D.flowing&&0===D.length);){var T=D.length;if(N("maybeReadMore read 0"),b.read(0),T===D.length)break}D.readingMore=!1}function Oe(b){var D=b._readableState;D.readableListening=b.listenerCount("readable")>0,D.resumeScheduled&&!D.paused?D.flowing=!0:b.listenerCount("data")>0&&b.resume()}function Ae(b){N("readable nexttick read 0"),b.read(0)}function C(b,D){N("resume",D.reading),D.reading||b.read(0),D.resumeScheduled=!1,b.emit("resume"),a(b),D.flowing&&!D.reading&&b.read(0)}function a(b){var D=b._readableState;for(N("flow",D.flowing);D.flowing&&null!==b.read(););}function w(b,D){return 0===D.length?null:(D.objectMode?T=D.buffer.shift():!b||b>=D.length?(T=D.decoder?D.buffer.join(""):1===D.buffer.length?D.buffer.first():D.buffer.concat(D.length),D.buffer.clear()):T=D.buffer.consume(b,D.decoder),T);var T}function W(b){var D=b._readableState;N("endReadable",D.endEmitted),D.endEmitted||(D.ended=!0,process.nextTick(ie,D,b))}function ie(b,D){if(N("endReadableNT",b.endEmitted,b.length),!b.endEmitted&&0===b.length&&(b.endEmitted=!0,D.readable=!1,D.emit("end"),b.autoDestroy)){var T=D._writableState;(!T||T.autoDestroy&&T.finished)&&D.destroy()}}function ae(b,D){for(var T=0,_=b.length;T<_;T++)if(b[T]===D)return T;return-1}M.prototype.read=function(b){N("read",b),b=parseInt(b,10);var D=this._readableState,T=b;if(0!==b&&(D.emittedReadable=!1),0===b&&D.needReadable&&((0!==D.highWaterMark?D.length>=D.highWaterMark:D.length>0)||D.ended))return N("read: emitReadable",D.length,D.ended),0===D.length&&D.ended?W(this):ue(this),null;if(0===(b=ne(b,D))&&D.ended)return 0===D.length&&W(this),null;var s,_=D.needReadable;return N("need readable",_),(0===D.length||D.length-b<D.highWaterMark)&&N("length less than watermark",_=!0),D.ended||D.reading?N("reading or ended",_=!1):_&&(N("do read"),D.reading=!0,D.sync=!0,0===D.length&&(D.needReadable=!0),this._read(D.highWaterMark),D.sync=!1,D.reading||(b=ne(T,D))),null===(s=b>0?w(b,D):null)?(D.needReadable=D.length<=D.highWaterMark,b=0):(D.length-=b,D.awaitDrain=0),0===D.length&&(D.ended||(D.needReadable=!0),T!==b&&D.ended&&W(this)),null!==s&&this.emit("data",s),s},M.prototype._read=function(b){E(this,new S("_read()"))},M.prototype.pipe=function(b,D){var T=this,_=this._readableState;switch(_.pipesCount){case 0:_.pipes=b;break;case 1:_.pipes=[_.pipes,b];break;default:_.pipes.push(b)}_.pipesCount+=1,N("pipe count=%d opts=%j",_.pipesCount,D);var F=D&&!1===D.end||b===process.stdout||b===process.stderr?qe:ee;function ee(){N("onend"),b.end()}_.endEmitted?process.nextTick(F):T.once("end",F),b.on("unpipe",function X(Be,Ke){N("onunpipe"),Be===T&&Ke&&!1===Ke.hasUnpiped&&(Ke.hasUnpiped=!0,function Ce(){N("cleanup"),b.removeListener("close",be),b.removeListener("finish",ze),b.removeListener("drain",te),b.removeListener("error",Ze),b.removeListener("unpipe",X),T.removeListener("end",ee),T.removeListener("end",qe),T.removeListener("data",Ne),ge=!0,_.awaitDrain&&(!b._writableState||b._writableState.needDrain)&&te()}())});var te=function we(b){return function(){var T=b._readableState;N("pipeOnDrain",T.awaitDrain),T.awaitDrain&&T.awaitDrain--,0===T.awaitDrain&&A(b,"data")&&(T.flowing=!0,a(b))}}(T);b.on("drain",te);var ge=!1;function Ne(Be){N("ondata");var Ke=b.write(Be);N("dest.write",Ke),!1===Ke&&((1===_.pipesCount&&_.pipes===b||_.pipesCount>1&&-1!==ae(_.pipes,b))&&!ge&&(N("false write response, pause",_.awaitDrain),_.awaitDrain++),T.pause())}function Ze(Be){N("onerror",Be),qe(),b.removeListener("error",Ze),0===A(b,"error")&&E(b,Be)}function be(){b.removeListener("finish",ze),qe()}function ze(){N("onfinish"),b.removeListener("close",be),qe()}function qe(){N("unpipe"),T.unpipe(b)}return T.on("data",Ne),function f(b,D,T){if("function"==typeof b.prependListener)return b.prependListener(D,T);b._events&&b._events[D]?Array.isArray(b._events[D])?b._events[D].unshift(T):b._events[D]=[T,b._events[D]]:b.on(D,T)}(b,"error",Ze),b.once("close",be),b.once("finish",ze),b.emit("pipe",T),_.flowing||(N("pipe resume"),T.resume()),b},M.prototype.unpipe=function(b){var D=this._readableState,T={hasUnpiped:!1};if(0===D.pipesCount)return this;if(1===D.pipesCount)return b&&b!==D.pipes||(b||(b=D.pipes),D.pipes=null,D.pipesCount=0,D.flowing=!1,b&&b.emit("unpipe",this,T)),this;if(!b){var _=D.pipes,s=D.pipesCount;D.pipes=null,D.pipesCount=0,D.flowing=!1;for(var F=0;F<s;F++)_[F].emit("unpipe",this,{hasUnpiped:!1});return this}var X=ae(D.pipes,b);return-1===X||(D.pipes.splice(X,1),D.pipesCount-=1,1===D.pipesCount&&(D.pipes=D.pipes[0]),b.emit("unpipe",this,T)),this},M.prototype.addListener=M.prototype.on=function(b,D){var T=x.prototype.on.call(this,b,D),_=this._readableState;return"data"===b?(_.readableListening=this.listenerCount("readable")>0,!1!==_.flowing&&this.resume()):"readable"===b&&!_.endEmitted&&!_.readableListening&&(_.readableListening=_.needReadable=!0,_.flowing=!1,_.emittedReadable=!1,N("on readable",_.length,_.reading),_.length?ue(this):_.reading||process.nextTick(Ae,this)),T},M.prototype.removeListener=function(b,D){var T=x.prototype.removeListener.call(this,b,D);return"readable"===b&&process.nextTick(Oe,this),T},M.prototype.removeAllListeners=function(b){var D=x.prototype.removeAllListeners.apply(this,arguments);return("readable"===b||void 0===b)&&process.nextTick(Oe,this),D},M.prototype.resume=function(){var b=this._readableState;return b.flowing||(N("resume"),b.flowing=!b.readableListening,function We(b,D){D.resumeScheduled||(D.resumeScheduled=!0,process.nextTick(C,b,D))}(this,b)),b.paused=!1,this},M.prototype.pause=function(){return N("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(N("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(b){var D=this,T=this._readableState,_=!1;for(var s in b.on("end",function(){if(N("wrapped end"),T.decoder&&!T.ended){var X=T.decoder.end();X&&X.length&&D.push(X)}D.push(null)}),b.on("data",function(X){N("wrapped data"),T.decoder&&(X=T.decoder.write(X)),T.objectMode&&null==X||!(T.objectMode||X&&X.length)||D.push(X)||(_=!0,b.pause())}),b)void 0===this[s]&&"function"==typeof b[s]&&(this[s]=function(ee){return function(){return b[ee].apply(b,arguments)}}(s));for(var F=0;F<e.length;F++)b.on(e[F],this.emit.bind(this,e[F]));return this._read=function(X){N("wrapped _read",X),_&&(_=!1,b.resume())},this},"function"==typeof Symbol&&(M.prototype[Symbol.asyncIterator]=function(){return void 0===p&&(p=d(94300)),p(this)}),Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(D){this._readableState&&(this._readableState.flowing=D)}}),M._fromList=w,Object.defineProperty(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(M.from=function(b,D){return void 0===u&&(u=d(9966)),u(M,b,D)})},83484:(K,Y,d)=>{"use strict";K.exports=R;var g=d(86985).q,r=g.ERR_METHOD_NOT_IMPLEMENTED,A=g.ERR_MULTIPLE_CALLBACK,x=g.ERR_TRANSFORM_ALREADY_TRANSFORMING,Z=g.ERR_TRANSFORM_WITH_LENGTH_0,l=d(83500);function h(v,k){var P=this._transformState;P.transforming=!1;var L=P.writecb;if(null===L)return this.emit("error",new A);P.writechunk=null,P.writecb=null,null!=k&&this.push(k),L(v);var I=this._readableState;I.reading=!1,(I.needReadable||I.length<I.highWaterMark)&&this._read(I.highWaterMark)}function R(v){if(!(this instanceof R))return new R(v);l.call(this,v),this._transformState={afterTransform:h.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,v&&("function"==typeof v.transform&&(this._transform=v.transform),"function"==typeof v.flush&&(this._flush=v.flush)),this.on("prefinish",y)}function y(){var v=this;"function"!=typeof this._flush||this._readableState.destroyed?N(this,null,null):this._flush(function(k,P){N(v,k,P)})}function N(v,k,P){if(k)return v.emit("error",k);if(null!=P&&v.push(P),v._writableState.length)throw new Z;if(v._transformState.transforming)throw new x;return v.push(null)}d(59879)(R,l),R.prototype.push=function(v,k){return this._transformState.needTransform=!1,l.prototype.push.call(this,v,k)},R.prototype._transform=function(v,k,P){P(new r("_transform()"))},R.prototype._write=function(v,k,P){var L=this._transformState;if(L.writecb=P,L.writechunk=v,L.writeencoding=k,!L.transforming){var I=this._readableState;(L.needTransform||I.needReadable||I.length<I.highWaterMark)&&this._read(I.highWaterMark)}},R.prototype._read=function(v){var k=this._transformState;null===k.writechunk||k.transforming?k.needTransform=!0:(k.transforming=!0,this._transform(k.writechunk,k.writeencoding,k.afterTransform))},R.prototype._destroy=function(v,k){l.prototype._destroy.call(this,v,function(P){k(P)})}},38908:(K,Y,d)=>{"use strict";function r(a){var w=this;this.next=null,this.entry=null,this.finish=function(){!function C(a,w,W){var ie=a.entry;for(a.entry=null;ie;){var ae=ie.callback;w.pendingcb--,ae(W),ie=ie.next}w.corkedRequestsFree.next=a}(w,a)}}var A;K.exports=$,$.WritableState=e;var f,x={deprecate:d(15822)},Z=d(27882),l=d(3875).Buffer,h=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},N=d(87904),k=d(62632).getHighWaterMark,P=d(86985).q,L=P.ERR_INVALID_ARG_TYPE,I=P.ERR_METHOD_NOT_IMPLEMENTED,G=P.ERR_MULTIPLE_CALLBACK,B=P.ERR_STREAM_CANNOT_PIPE,S=P.ERR_STREAM_DESTROYED,U=P.ERR_STREAM_NULL_VALUES,m=P.ERR_STREAM_WRITE_AFTER_END,p=P.ERR_UNKNOWN_ENCODING,u=N.errorOrDestroy;function E(){}function e(a,w,W){A=A||d(83500),"boolean"!=typeof W&&(W=w instanceof A),this.objectMode=!!(a=a||{}).objectMode,W&&(this.objectMode=this.objectMode||!!a.writableObjectMode),this.highWaterMark=k(this,a,"writableHighWaterMark",W),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===a.decodeStrings),this.defaultEncoding=a.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ae){!function pe(a,w){var W=a._writableState,ie=W.sync,ae=W.writecb;if("function"!=typeof ae)throw new G;if(function ne(a){a.writing=!1,a.writecb=null,a.length-=a.writelen,a.writelen=0}(W),w)!function de(a,w,W,ie,ae){--w.pendingcb,W?(process.nextTick(ae,ie),process.nextTick(Ae,a,w),a._writableState.errorEmitted=!0,u(a,ie)):(ae(ie),a._writableState.errorEmitted=!0,u(a,ie),Ae(a,w))}(a,W,ie,w,ae);else{var b=Ie(W)||a.destroyed;!b&&!W.corked&&!W.bufferProcessing&&W.bufferedRequest&&fe(a,W),ie?process.nextTick(ue,a,W,b,ae):ue(a,W,b,ae)}}(w,ae)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==a.emitClose,this.autoDestroy=!!a.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function $(a){var w=this instanceof(A=A||d(83500));if(!w&&!f.call($,this))return new $(a);this._writableState=new e(a,this,w),this.writable=!0,a&&("function"==typeof a.write&&(this._write=a.write),"function"==typeof a.writev&&(this._writev=a.writev),"function"==typeof a.destroy&&(this._destroy=a.destroy),"function"==typeof a.final&&(this._final=a.final)),Z.call(this)}function le(a,w,W,ie,ae,b,D){w.writelen=ie,w.writecb=D,w.writing=!0,w.sync=!0,w.destroyed?w.onwrite(new S("write")):W?a._writev(ae,w.onwrite):a._write(ae,b,w.onwrite),w.sync=!1}function ue(a,w,W,ie){W||function he(a,w){0===w.length&&w.needDrain&&(w.needDrain=!1,a.emit("drain"))}(a,w),w.pendingcb--,ie(),Ae(a,w)}function fe(a,w){w.bufferProcessing=!0;var W=w.bufferedRequest;if(a._writev&&W&&W.next){var ae=new Array(w.bufferedRequestCount),b=w.corkedRequestsFree;b.entry=W;for(var D=0,T=!0;W;)ae[D]=W,W.isBuf||(T=!1),W=W.next,D+=1;ae.allBuffers=T,le(a,w,!0,w.length,ae,"",b.finish),w.pendingcb++,w.lastBufferedRequest=null,b.next?(w.corkedRequestsFree=b.next,b.next=null):w.corkedRequestsFree=new r(w),w.bufferedRequestCount=0}else{for(;W;){var _=W.chunk;if(le(a,w,!1,w.objectMode?1:_.length,_,W.encoding,W.callback),W=W.next,w.bufferedRequestCount--,w.writing)break}null===W&&(w.lastBufferedRequest=null)}w.bufferedRequest=W,w.bufferProcessing=!1}function Ie(a){return a.ending&&0===a.length&&null===a.bufferedRequest&&!a.finished&&!a.writing}function we(a,w){a._final(function(W){w.pendingcb--,W&&u(a,W),w.prefinished=!0,a.emit("prefinish"),Ae(a,w)})}function Ae(a,w){var W=Ie(w);if(W&&(function Oe(a,w){!w.prefinished&&!w.finalCalled&&("function"!=typeof a._final||w.destroyed?(w.prefinished=!0,a.emit("prefinish")):(w.pendingcb++,w.finalCalled=!0,process.nextTick(we,a,w)))}(a,w),0===w.pendingcb&&(w.finished=!0,a.emit("finish"),w.autoDestroy))){var ie=a._readableState;(!ie||ie.autoDestroy&&ie.endEmitted)&&a.destroy()}return W}d(59879)($,Z),e.prototype.getBuffer=function(){for(var w=this.bufferedRequest,W=[];w;)W.push(w),w=w.next;return W},function(){try{Object.defineProperty(e.prototype,"buffer",{get:x.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty($,Symbol.hasInstance,{value:function(w){return!!f.call(this,w)||this===$&&w&&w._writableState instanceof e}})):f=function(w){return w instanceof this},$.prototype.pipe=function(){u(this,new B)},$.prototype.write=function(a,w,W){var ie=this._writableState,ae=!1,b=!ie.objectMode&&function y(a){return l.isBuffer(a)||a instanceof h}(a);return b&&!l.isBuffer(a)&&(a=function R(a){return l.from(a)}(a)),"function"==typeof w&&(W=w,w=null),b?w="buffer":w||(w=ie.defaultEncoding),"function"!=typeof W&&(W=E),ie.ending?function M(a,w){var W=new m;u(a,W),process.nextTick(w,W)}(this,W):(b||function q(a,w,W,ie){var ae;return null===W?ae=new U:"string"!=typeof W&&!w.objectMode&&(ae=new L("chunk",["string","Buffer"],W)),!ae||(u(a,ae),process.nextTick(ie,ae),!1)}(this,ie,a,W))&&(ie.pendingcb++,ae=function V(a,w,W,ie,ae,b){if(!W){var D=function z(a,w,W){return!a.objectMode&&!1!==a.decodeStrings&&"string"==typeof w&&(w=l.from(w,W)),w}(w,ie,ae);ie!==D&&(W=!0,ae="buffer",ie=D)}var T=w.objectMode?1:ie.length;w.length+=T;var _=w.length<w.highWaterMark;if(_||(w.needDrain=!0),w.writing||w.corked){var s=w.lastBufferedRequest;w.lastBufferedRequest={chunk:ie,encoding:ae,isBuf:W,callback:b,next:null},s?s.next=w.lastBufferedRequest:w.bufferedRequest=w.lastBufferedRequest,w.bufferedRequestCount+=1}else le(a,w,!1,T,ie,ae,b);return _}(this,ie,b,a,w,W)),ae},$.prototype.cork=function(){this._writableState.corked++},$.prototype.uncork=function(){var a=this._writableState;a.corked&&(a.corked--,!a.writing&&!a.corked&&!a.bufferProcessing&&a.bufferedRequest&&fe(this,a))},$.prototype.setDefaultEncoding=function(w){if("string"==typeof w&&(w=w.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((w+"").toLowerCase())>-1))throw new p(w);return this._writableState.defaultEncoding=w,this},Object.defineProperty($.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty($.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),$.prototype._write=function(a,w,W){W(new I("_write()"))},$.prototype._writev=null,$.prototype.end=function(a,w,W){var ie=this._writableState;return"function"==typeof a?(W=a,a=null,w=null):"function"==typeof w&&(W=w,w=null),null!=a&&this.write(a,w),ie.corked&&(ie.corked=1,this.uncork()),ie.ending||function We(a,w,W){w.ending=!0,Ae(a,w),W&&(w.finished?process.nextTick(W):a.once("finish",W)),w.ended=!0,a.writable=!1}(this,ie,W),this},Object.defineProperty($.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty($.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(w){this._writableState&&(this._writableState.destroyed=w)}}),$.prototype.destroy=N.destroy,$.prototype._undestroy=N.undestroy,$.prototype._destroy=function(a,w){w(a)}},94300:(K,Y,d)=>{"use strict";var g;function r(m,p,u){return p=function A(m){var p=function x(m,p){if("object"!=typeof m||null===m)return m;var u=m[Symbol.toPrimitive];if(void 0!==u){var E=u.call(m,p||"default");if("object"!=typeof E)return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===p?String:Number)(m)}(m,"string");return"symbol"==typeof p?p:String(p)}(p),p in m?Object.defineProperty(m,p,{value:u,enumerable:!0,configurable:!0,writable:!0}):m[p]=u,m}var Z=d(83770),l=Symbol("lastResolve"),h=Symbol("lastReject"),R=Symbol("error"),y=Symbol("ended"),N=Symbol("lastPromise"),v=Symbol("handlePromise"),k=Symbol("stream");function P(m,p){return{value:m,done:p}}function L(m){var p=m[l];if(null!==p){var u=m[k].read();null!==u&&(m[N]=null,m[l]=null,m[h]=null,p(P(u,!1)))}}function I(m){process.nextTick(L,m)}var B=Object.getPrototypeOf(function(){}),S=Object.setPrototypeOf((r(g={get stream(){return this[k]},next:function(){var p=this,u=this[R];if(null!==u)return Promise.reject(u);if(this[y])return Promise.resolve(P(void 0,!0));if(this[k].destroyed)return new Promise(function($,M){process.nextTick(function(){p[R]?M(p[R]):$(P(void 0,!0))})});var e,E=this[N];if(E)e=new Promise(function G(m,p){return function(u,E){m.then(function(){p[y]?u(P(void 0,!0)):p[v](u,E)},E)}}(E,this));else{var f=this[k].read();if(null!==f)return Promise.resolve(P(f,!1));e=new Promise(this[v])}return this[N]=e,e}},Symbol.asyncIterator,function(){return this}),r(g,"return",function(){var p=this;return new Promise(function(u,E){p[k].destroy(null,function(e){e?E(e):u(P(void 0,!0))})})}),g),B);K.exports=function(p){var u,E=Object.create(S,(r(u={},k,{value:p,writable:!0}),r(u,l,{value:null,writable:!0}),r(u,h,{value:null,writable:!0}),r(u,R,{value:null,writable:!0}),r(u,y,{value:p._readableState.endEmitted,writable:!0}),r(u,v,{value:function(f,$){var M=E[k].read();M?(E[N]=null,E[l]=null,E[h]=null,f(P(M,!1))):(E[l]=f,E[h]=$)},writable:!0}),u));return E[N]=null,Z(p,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var f=E[h];return null!==f&&(E[N]=null,E[l]=null,E[h]=null,f(e)),void(E[R]=e)}var $=E[l];null!==$&&(E[N]=null,E[l]=null,E[h]=null,$(P(void 0,!0))),E[y]=!0}),p.on("readable",I.bind(null,E)),E}},82319:(K,Y,d)=>{"use strict";function g(I,G){var B=Object.keys(I);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(I);G&&(S=S.filter(function(U){return Object.getOwnPropertyDescriptor(I,U).enumerable})),B.push.apply(B,S)}return B}function r(I){for(var G=1;G<arguments.length;G++){var B=null!=arguments[G]?arguments[G]:{};G%2?g(Object(B),!0).forEach(function(S){A(I,S,B[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(B)):g(Object(B)).forEach(function(S){Object.defineProperty(I,S,Object.getOwnPropertyDescriptor(B,S))})}return I}function A(I,G,B){return(G=h(G))in I?Object.defineProperty(I,G,{value:B,enumerable:!0,configurable:!0,writable:!0}):I[G]=B,I}function Z(I,G){for(var B=0;B<G.length;B++){var S=G[B];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(I,h(S.key),S)}}function h(I){var G=function R(I,G){if("object"!=typeof I||null===I)return I;var B=I[Symbol.toPrimitive];if(void 0!==B){var S=B.call(I,G||"default");if("object"!=typeof S)return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===G?String:Number)(I)}(I,"string");return"symbol"==typeof G?G:String(G)}var N=d(3875).Buffer,k=d(69862).inspect,P=k&&k.custom||"inspect";function L(I,G,B){N.prototype.copy.call(I,G,B)}K.exports=function(){function I(){(function x(I,G){if(!(I instanceof G))throw new TypeError("Cannot call a class as a function")})(this,I),this.head=null,this.tail=null,this.length=0}return function l(I,G,B){G&&Z(I.prototype,G),B&&Z(I,B),Object.defineProperty(I,"prototype",{writable:!1})}(I,[{key:"push",value:function(B){var S={data:B,next:null};this.length>0?this.tail.next=S:this.head=S,this.tail=S,++this.length}},{key:"unshift",value:function(B){var S={data:B,next:this.head};0===this.length&&(this.tail=S),this.head=S,++this.length}},{key:"shift",value:function(){if(0!==this.length){var B=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,B}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(B){if(0===this.length)return"";for(var S=this.head,U=""+S.data;S=S.next;)U+=B+S.data;return U}},{key:"concat",value:function(B){if(0===this.length)return N.alloc(0);for(var S=N.allocUnsafe(B>>>0),U=this.head,m=0;U;)L(U.data,S,m),m+=U.data.length,U=U.next;return S}},{key:"consume",value:function(B,S){var U;return B<this.head.data.length?(U=this.head.data.slice(0,B),this.head.data=this.head.data.slice(B)):U=B===this.head.data.length?this.shift():S?this._getString(B):this._getBuffer(B),U}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(B){var S=this.head,U=1,m=S.data;for(B-=m.length;S=S.next;){var p=S.data,u=B>p.length?p.length:B;if(m+=u===p.length?p:p.slice(0,B),0==(B-=u)){u===p.length?(++U,this.head=S.next?S.next:this.tail=null):(this.head=S,S.data=p.slice(u));break}++U}return this.length-=U,m}},{key:"_getBuffer",value:function(B){var S=N.allocUnsafe(B),U=this.head,m=1;for(U.data.copy(S),B-=U.data.length;U=U.next;){var p=U.data,u=B>p.length?p.length:B;if(p.copy(S,S.length-B,0,u),0==(B-=u)){u===p.length?(++m,this.head=U.next?U.next:this.tail=null):(this.head=U,U.data=p.slice(u));break}++m}return this.length-=m,S}},{key:P,value:function(B,S){return k(this,r(r({},S),{},{depth:0,customInspect:!1}))}}]),I}()},87904:K=>{"use strict";function d(Z,l){A(Z,l),g(Z)}function g(Z){Z._writableState&&!Z._writableState.emitClose||Z._readableState&&!Z._readableState.emitClose||Z.emit("close")}function A(Z,l){Z.emit("error",l)}K.exports={destroy:function Y(Z,l){var h=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(l?l(Z):Z&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(A,this,Z)):process.nextTick(A,this,Z)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(Z||null,function(N){!l&&N?h._writableState?h._writableState.errorEmitted?process.nextTick(g,h):(h._writableState.errorEmitted=!0,process.nextTick(d,h,N)):process.nextTick(d,h,N):l?(process.nextTick(g,h),l(N)):process.nextTick(g,h)}),this)},undestroy:function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function x(Z,l){var h=Z._readableState,R=Z._writableState;h&&h.autoDestroy||R&&R.autoDestroy?Z.destroy(l):Z.emit("error",l)}}},83770:(K,Y,d)=>{"use strict";var g=d(86985).q.ERR_STREAM_PREMATURE_CLOSE;function A(){}K.exports=function Z(l,h,R){if("function"==typeof h)return Z(l,null,h);h||(h={}),R=function r(l){var h=!1;return function(){if(!h){h=!0;for(var R=arguments.length,y=new Array(R),N=0;N<R;N++)y[N]=arguments[N];l.apply(this,y)}}}(R||A);var y=h.readable||!1!==h.readable&&l.readable,N=h.writable||!1!==h.writable&&l.writable,v=function(){l.writable||P()},k=l._writableState&&l._writableState.finished,P=function(){N=!1,k=!0,y||R.call(l)},L=l._readableState&&l._readableState.endEmitted,I=function(){y=!1,L=!0,N||R.call(l)},G=function(m){R.call(l,m)},B=function(){var m;return y&&!L?((!l._readableState||!l._readableState.ended)&&(m=new g),R.call(l,m)):N&&!k?((!l._writableState||!l._writableState.ended)&&(m=new g),R.call(l,m)):void 0},S=function(){l.req.on("finish",P)};return function x(l){return l.setHeader&&"function"==typeof l.abort}(l)?(l.on("complete",P),l.on("abort",B),l.req?S():l.on("request",S)):N&&!l._writableState&&(l.on("end",v),l.on("close",v)),l.on("end",I),l.on("finish",P),!1!==h.error&&l.on("error",G),l.on("close",B),function(){l.removeListener("complete",P),l.removeListener("abort",B),l.removeListener("request",S),l.req&&l.req.removeListener("finish",P),l.removeListener("end",v),l.removeListener("close",v),l.removeListener("finish",P),l.removeListener("end",I),l.removeListener("error",G),l.removeListener("close",B)}}},9966:K=>{K.exports=function(){throw new Error("Readable.from is not available in the browser")}},77882:(K,Y,d)=>{"use strict";var g,A=d(86985).q,x=A.ERR_MISSING_ARGS,Z=A.ERR_STREAM_DESTROYED;function l(P){if(P)throw P}function y(P){P()}function N(P,L){return P.pipe(L)}K.exports=function k(){for(var P=arguments.length,L=new Array(P),I=0;I<P;I++)L[I]=arguments[I];var G=function v(P){return P.length&&"function"==typeof P[P.length-1]?P.pop():l}(L);if(Array.isArray(L[0])&&(L=L[0]),L.length<2)throw new x("streams");var B,S=L.map(function(U,m){var p=m<L.length-1;return function R(P,L,I,G){G=function r(P){var L=!1;return function(){L||(L=!0,P.apply(void 0,arguments))}}(G);var B=!1;P.on("close",function(){B=!0}),void 0===g&&(g=d(83770)),g(P,{readable:L,writable:I},function(U){if(U)return G(U);B=!0,G()});var S=!1;return function(U){if(!B&&!S){if(S=!0,function h(P){return P.setHeader&&"function"==typeof P.abort}(P))return P.abort();if("function"==typeof P.destroy)return P.destroy();G(U||new Z("pipe"))}}}(U,p,m>0,function(E){B||(B=E),E&&S.forEach(y),!p&&(S.forEach(y),G(B))})});return L.reduce(N)}},62632:(K,Y,d)=>{"use strict";var g=d(86985).q.ERR_INVALID_OPT_VALUE;K.exports={getHighWaterMark:function A(x,Z,l,h){var R=function r(x,Z,l){return null!=x.highWaterMark?x.highWaterMark:Z?x[l]:null}(Z,h,l);if(null!=R){if(!isFinite(R)||Math.floor(R)!==R||R<0)throw new g(h?l:"highWaterMark",R);return Math.floor(R)}return x.objectMode?16:16384}}},27882:(K,Y,d)=>{K.exports=d(93105).EventEmitter},32519:(K,Y,d)=>{"use strict";var g=d(55859).Buffer,r=g.isEncoding||function(S){switch((S=""+S)&&S.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Z(S){var U;switch(this.encoding=function x(S){var U=function A(S){if(!S)return"utf8";for(var U;;)switch(S){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return S;default:if(U)return;S=(""+S).toLowerCase(),U=!0}}(S);if("string"!=typeof U&&(g.isEncoding===r||!r(S)))throw new Error("Unknown encoding: "+S);return U||S}(S),this.encoding){case"utf16le":this.text=k,this.end=P,U=4;break;case"utf8":this.fillLast=y,U=4;break;case"base64":this.text=L,this.end=I,U=3;break;default:return this.write=G,void(this.end=B)}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(U)}function l(S){return S<=127?0:S>>5==6?2:S>>4==14?3:S>>3==30?4:S>>6==2?-1:-2}function y(S){var U=this.lastTotal-this.lastNeed,m=function R(S,U,m){if(128!=(192&U[0]))return S.lastNeed=0,"\ufffd";if(S.lastNeed>1&&U.length>1){if(128!=(192&U[1]))return S.lastNeed=1,"\ufffd";if(S.lastNeed>2&&U.length>2&&128!=(192&U[2]))return S.lastNeed=2,"\ufffd"}}(this,S);return void 0!==m?m:this.lastNeed<=S.length?(S.copy(this.lastChar,U,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(S.copy(this.lastChar,U,0,S.length),void(this.lastNeed-=S.length))}function k(S,U){if((S.length-U)%2==0){var m=S.toString("utf16le",U);if(m){var p=m.charCodeAt(m.length-1);if(p>=55296&&p<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=S[S.length-2],this.lastChar[1]=S[S.length-1],m.slice(0,-1)}return m}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=S[S.length-1],S.toString("utf16le",U,S.length-1)}function P(S){var U=S&&S.length?this.write(S):"";return this.lastNeed?U+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):U}function L(S,U){var m=(S.length-U)%3;return 0===m?S.toString("base64",U):(this.lastNeed=3-m,this.lastTotal=3,1===m?this.lastChar[0]=S[S.length-1]:(this.lastChar[0]=S[S.length-2],this.lastChar[1]=S[S.length-1]),S.toString("base64",U,S.length-m))}function I(S){var U=S&&S.length?this.write(S):"";return this.lastNeed?U+this.lastChar.toString("base64",0,3-this.lastNeed):U}function G(S){return S.toString(this.encoding)}function B(S){return S&&S.length?this.write(S):""}Y.s=Z,Z.prototype.write=function(S){if(0===S.length)return"";var U,m;if(this.lastNeed){if(void 0===(U=this.fillLast(S)))return"";m=this.lastNeed,this.lastNeed=0}else m=0;return m<S.length?U?U+this.text(S,m):this.text(S,m):U||""},Z.prototype.end=function v(S){var U=S&&S.length?this.write(S):"";return this.lastNeed?U+"\ufffd":U},Z.prototype.text=function N(S,U){var m=function h(S,U,m){var p=U.length-1;if(p<m)return 0;var u=l(U[p]);return u>=0?(u>0&&(S.lastNeed=u-1),u):--p<m||-2===u?0:(u=l(U[p]))>=0?(u>0&&(S.lastNeed=u-2),u):--p<m||-2===u?0:(u=l(U[p]))>=0?(u>0&&(2===u?u=0:S.lastNeed=u-3),u):0}(this,S,U);if(!this.lastNeed)return S.toString("utf8",U);this.lastTotal=m;var p=S.length-(m-this.lastNeed);return S.copy(this.lastChar,0,p),S.toString("utf8",U,p)},Z.prototype.fillLast=function(S){if(this.lastNeed<=S.length)return S.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);S.copy(this.lastChar,this.lastTotal-this.lastNeed,0,S.length),this.lastNeed-=S.length}},82584:function(K,Y,d){var g=typeof global<"u"&&global||typeof self<"u"&&self||window,r=Function.prototype.apply;function A(x,Z){this._id=x,this._clearFn=Z}Y.setTimeout=function(){return new A(r.call(setTimeout,g,arguments),clearTimeout)},Y.setInterval=function(){return new A(r.call(setInterval,g,arguments),clearInterval)},Y.clearTimeout=Y.clearInterval=function(x){x&&x.close()},A.prototype.unref=A.prototype.ref=function(){},A.prototype.close=function(){this._clearFn.call(g,this._id)},Y.enroll=function(x,Z){clearTimeout(x._idleTimeoutId),x._idleTimeout=Z},Y.unenroll=function(x){clearTimeout(x._idleTimeoutId),x._idleTimeout=-1},Y._unrefActive=Y.active=function(x){clearTimeout(x._idleTimeoutId);var Z=x._idleTimeout;Z>=0&&(x._idleTimeoutId=setTimeout(function(){x._onTimeout&&x._onTimeout()},Z))},d(45470),Y.setImmediate=typeof self<"u"&&self.setImmediate||typeof global<"u"&&global.setImmediate||this&&this.setImmediate,Y.clearImmediate=typeof self<"u"&&self.clearImmediate||typeof global<"u"&&global.clearImmediate||this&&this.clearImmediate},15822:K=>{function d(g){try{if(!global.localStorage)return!1}catch{return!1}var r=global.localStorage[g];return null!=r&&"true"===String(r).toLowerCase()}K.exports=function Y(g,r){if(d("noDeprecation"))return g;var A=!1;return function x(){if(!A){if(d("throwDeprecation"))throw new Error(r);d("traceDeprecation")?console.trace(r):console.warn(r),A=!0}return g.apply(this,arguments)}}},62655:function(K,Y){(function(){"use strict";Y.stripBOM=function(d){return"\ufeff"===d[0]?d.substring(1):d}}).call(this)},54408:function(K,Y,d){(function(){"use strict";var g,r,A,x,Z,l={}.hasOwnProperty;g=d(71741),r=d(81031).defaults,x=function(h){return"string"==typeof h&&(h.indexOf("&")>=0||h.indexOf(">")>=0||h.indexOf("<")>=0)},Z=function(h){return"<![CDATA["+A(h)+"]]>"},A=function(h){return h.replace("]]>","]]]]><![CDATA[>")},Y.Builder=function(){function h(R){var y,N;for(y in this.options={},N=r[.2])l.call(N,y)&&(this.options[y]=N[y]);for(y in R)l.call(R,y)&&(this.options[y]=R[y])}return h.prototype.buildObject=function(R){var y,N,v,k,P,L;return y=this.options.attrkey,N=this.options.charkey,1===Object.keys(R).length&&this.options.rootName===r[.2].rootName?R=R[P=Object.keys(R)[0]]:P=this.options.rootName,L=this,v=function(I,G){var B,S,U,m,p;if("object"!=typeof G)L.options.cdata&&x(G)?I.raw(Z(G)):I.txt(G);else if(Array.isArray(G)){for(m in G)if(l.call(G,m))for(p in S=G[m])U=S[p],I=v(I.ele(p),U).up()}else for(p in G)if(l.call(G,p))if(S=G[p],p===y){if("object"==typeof S)for(B in S)I=I.att(B,S[B])}else if(p===N)I=L.options.cdata&&x(S)?I.raw(Z(S)):I.txt(S);else if(Array.isArray(S))for(m in S)l.call(S,m)&&(I="string"==typeof(U=S[m])?L.options.cdata&&x(U)?I.ele(p).raw(Z(U)).up():I.ele(p,U).up():v(I.ele(p),U).up());else"object"==typeof S?I=v(I.ele(p),S).up():"string"==typeof S&&L.options.cdata&&x(S)?I=I.ele(p).raw(Z(S)).up():(null==S&&(S=""),I=I.ele(p,S.toString()).up());return I},k=g.create(P,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),v(k,R).end(this.options.renderOpts)},h}()}).call(this)},81031:function(K,Y){(function(){Y.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},52972:function(K,Y,d){(function(){"use strict";var g,r,A,x,Z,l,h,R,y,N=function(P,L){return function(){return P.apply(L,arguments)}},k={}.hasOwnProperty;R=d(5473),x=d(93105),g=d(62655),h=d(65489),y=d(82584).setImmediate,r=d(81031).defaults,Z=function(P){return"object"==typeof P&&null!=P&&0===Object.keys(P).length},l=function(P,L,I){var G,B;for(G=0,B=P.length;G<B;G++)L=(0,P[G])(L,I);return L},A=function(P,L,I){var G;return(G=Object.create(null)).value=I,G.writable=!0,G.enumerable=!0,G.configurable=!0,Object.defineProperty(P,L,G)},Y.Parser=function(P){function L(I){var G,B;if(this.parseStringPromise=N(this.parseStringPromise,this),this.parseString=N(this.parseString,this),this.reset=N(this.reset,this),this.assignOrPush=N(this.assignOrPush,this),this.processAsync=N(this.processAsync,this),!(this instanceof Y.Parser))return new Y.Parser(I);for(G in this.options={},B=r[.2])k.call(B,G)&&(this.options[G]=B[G]);for(G in I)k.call(I,G)&&(this.options[G]=I[G]);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(h.normalize)),this.reset()}return function(P,L){for(var I in L)k.call(L,I)&&(P[I]=L[I]);function G(){this.constructor=P}G.prototype=L.prototype,P.prototype=new G,P.__super__=L.prototype}(L,P),L.prototype.processAsync=function(){var I,G;try{return this.remaining.length<=this.options.chunkSize?(I=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(I),this.saxParser.close()):(I=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(I),y(this.processAsync))}catch(B){if(G=B,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(G)}},L.prototype.assignOrPush=function(I,G,B){return G in I?(I[G]instanceof Array||A(I,G,[I[G]]),I[G].push(B)):A(I,G,this.options.explicitArray?[B]:B)},L.prototype.reset=function(){var I,G,B,S,U;return this.removeAllListeners(),this.saxParser=R.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(U=this,function(m){if(U.saxParser.resume(),!U.saxParser.errThrown)return U.saxParser.errThrown=!0,U.emit("error",m)}),this.saxParser.onend=function(U){return function(){if(!U.saxParser.ended)return U.saxParser.ended=!0,U.emit("end",U.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,S=[],I=this.options.attrkey,G=this.options.charkey,this.saxParser.onopentag=function(U){return function(m){var p,u,E,e,f;if((E={})[G]="",!U.options.ignoreAttrs)for(p in f=m.attributes)k.call(f,p)&&(!(I in E)&&!U.options.mergeAttrs&&(E[I]={}),u=U.options.attrValueProcessors?l(U.options.attrValueProcessors,m.attributes[p],p):m.attributes[p],e=U.options.attrNameProcessors?l(U.options.attrNameProcessors,p):p,U.options.mergeAttrs?U.assignOrPush(E,e,u):A(E[I],e,u));return E["#name"]=U.options.tagNameProcessors?l(U.options.tagNameProcessors,m.name):m.name,U.options.xmlns&&(E[U.options.xmlnskey]={uri:m.uri,local:m.local}),S.push(E)}}(this),this.saxParser.onclosetag=function(U){return function(){var m,p,u,E,e,f,$,M,q,z;if(f=S.pop(),e=f["#name"],(!U.options.explicitChildren||!U.options.preserveChildrenOrder)&&delete f["#name"],!0===f.cdata&&(m=f.cdata,delete f.cdata),q=S[S.length-1],f[G].match(/^\s*$/)&&!m?(p=f[G],delete f[G]):(U.options.trim&&(f[G]=f[G].trim()),U.options.normalize&&(f[G]=f[G].replace(/\s{2,}/g," ").trim()),f[G]=U.options.valueProcessors?l(U.options.valueProcessors,f[G],e):f[G],1===Object.keys(f).length&&G in f&&!U.EXPLICIT_CHARKEY&&(f=f[G])),Z(f)&&(f="function"==typeof U.options.emptyTag?U.options.emptyTag():""!==U.options.emptyTag?U.options.emptyTag:p),null!=U.options.validator&&(z="/"+function(){var V,le,de;for(de=[],V=0,le=S.length;V<le;V++)de.push((E=S[V])["#name"]);return de}().concat(e).join("/"),function(){try{f=U.options.validator(z,q&&q[e],f)}catch(le){return U.emit("error",le)}}()),U.options.explicitChildren&&!U.options.mergeAttrs&&"object"==typeof f)if(U.options.preserveChildrenOrder){if(q){for(u in q[U.options.childkey]=q[U.options.childkey]||[],$={},f)k.call(f,u)&&A($,u,f[u]);q[U.options.childkey].push($),delete f["#name"],1===Object.keys(f).length&&G in f&&!U.EXPLICIT_CHARKEY&&(f=f[G])}}else E={},U.options.attrkey in f&&(E[U.options.attrkey]=f[U.options.attrkey],delete f[U.options.attrkey]),!U.options.charsAsChildren&&U.options.charkey in f&&(E[U.options.charkey]=f[U.options.charkey],delete f[U.options.charkey]),Object.getOwnPropertyNames(f).length>0&&(E[U.options.childkey]=f),f=E;return S.length>0?U.assignOrPush(q,e,f):(U.options.explicitRoot&&(M=f,A(f={},e,M)),U.resultObject=f,U.saxParser.ended=!0,U.emit("end",U.resultObject))}}(this),B=function(U){return function(m){var p,u;if(u=S[S.length-1])return u[G]+=m,U.options.explicitChildren&&U.options.preserveChildrenOrder&&U.options.charsAsChildren&&(U.options.includeWhiteChars||""!==m.replace(/\\n/g,"").trim())&&(u[U.options.childkey]=u[U.options.childkey]||[],(p={"#name":"__text__"})[G]=m,U.options.normalize&&(p[G]=p[G].replace(/\s{2,}/g," ").trim()),u[U.options.childkey].push(p)),u}}(this),this.saxParser.ontext=B,this.saxParser.oncdata=function(m){var p;if(p=B(m))return p.cdata=!0}},L.prototype.parseString=function(I,G){var B;null!=G&&"function"==typeof G&&(this.on("end",function(S){return this.reset(),G(null,S)}),this.on("error",function(S){return this.reset(),G(S)}));try{return""===(I=I.toString()).trim()?(this.emit("end",null),!0):(I=g.stripBOM(I),this.options.async?(this.remaining=I,y(this.processAsync),this.saxParser):this.saxParser.write(I).close())}catch(S){if(B=S,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",B),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw B}},L.prototype.parseStringPromise=function(I){return new Promise((G=this,function(B,S){return G.parseString(I,function(U,m){return U?S(U):B(m)})}));var G},L}(x),Y.parseString=function(P,L,I){var G,B;return null!=I?("function"==typeof I&&(G=I),"object"==typeof L&&(B=L)):("function"==typeof L&&(G=L),B={}),new Y.Parser(B).parseString(P,G)},Y.parseStringPromise=function(P,L){var I;return"object"==typeof L&&(I=L),new Y.Parser(I).parseStringPromise(P)}}).call(this)},65489:function(K,Y){(function(){"use strict";var d;d=new RegExp(/(?!xmlns)^.*:/),Y.normalize=function(g){return g.toLowerCase()},Y.firstCharLowerCase=function(g){return g.charAt(0).toLowerCase()+g.slice(1)},Y.stripPrefix=function(g){return g.replace(d,"")},Y.parseNumbers=function(g){return isNaN(g)||(g=g%1==0?parseInt(g,10):parseFloat(g)),g},Y.parseBooleans=function(g){return/^(?:true|false)$/i.test(g)&&(g="true"===g.toLowerCase()),g}}).call(this)},49277:function(K,Y,d){(function(){"use strict";var g,r,A,x,l={}.hasOwnProperty;r=d(81031),g=d(54408),A=d(52972),x=d(65489),Y.defaults=r.defaults,Y.processors=x,Y.ValidationError=function(h){function R(y){this.message=y}return function(h,R){for(var y in R)l.call(R,y)&&(h[y]=R[y]);function N(){this.constructor=h}N.prototype=R.prototype,h.prototype=new N,h.__super__=R.prototype}(R,Error),R}(),Y.Builder=g.Builder,Y.Parser=A.Parser,Y.parseString=A.parseString,Y.parseStringPromise=A.parseStringPromise}).call(this)},69053:function(K){(function(){K.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},42870:function(K){(function(){K.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},63146:function(K){(function(){var Y,d,g,r,A,x,Z,l=[].slice,h={}.hasOwnProperty;Y=function(){var R,y,N,v,k,P;if(P=arguments[0],k=2<=arguments.length?l.call(arguments,1):[],A(Object.assign))Object.assign.apply(null,arguments);else for(R=0,N=k.length;R<N;R++)if(null!=(v=k[R]))for(y in v)h.call(v,y)&&(P[y]=v[y]);return P},A=function(R){return!!R&&"[object Function]"===Object.prototype.toString.call(R)},x=function(R){var y;return!!R&&("function"==(y=typeof R)||"object"===y)},g=function(R){return A(Array.isArray)?Array.isArray(R):"[object Array]"===Object.prototype.toString.call(R)},r=function(R){var y;if(g(R))return!R.length;for(y in R)if(h.call(R,y))return!1;return!0},Z=function(R){var y,N;return x(R)&&(N=Object.getPrototypeOf(R))&&(y=N.constructor)&&"function"==typeof y&&y instanceof y&&Function.prototype.toString.call(y)===Function.prototype.toString.call(Object)},d=function(R){return A(R.valueOf)?R.valueOf():R},K.exports.assign=Y,K.exports.isFunction=A,K.exports.isObject=x,K.exports.isArray=g,K.exports.isEmpty=r,K.exports.isPlainObject=Z,K.exports.getValue=d}).call(this)},47159:function(K){(function(){K.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},88828:function(K,Y,d){(function(){var g;g=d(42870),d(26627),K.exports=function(){function x(Z,l,h){if(this.parent=Z,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),null==l)throw new Error("Missing attribute name. "+this.debugInfo(l));this.name=this.stringify.name(l),this.value=this.stringify.attValue(h),this.type=g.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(x.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(x.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(x.prototype,"textContent",{get:function(){return this.value},set:function(Z){return this.value=Z||""}}),Object.defineProperty(x.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(x.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(x.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(x.prototype,"specified",{get:function(){return!0}}),x.prototype.clone=function(){return Object.create(this)},x.prototype.toString=function(Z){return this.options.writer.attribute(this,this.options.writer.filterOptions(Z))},x.prototype.debugInfo=function(Z){return null==(Z=Z||this.name)?"parent: <"+this.parent.name+">":"attribute: {"+Z+"}, parent: <"+this.parent.name+">"},x.prototype.isEqualNode=function(Z){return!(Z.namespaceURI!==this.namespaceURI||Z.prefix!==this.prefix||Z.localName!==this.localName||Z.value!==this.value)},x}()}).call(this)},19832:function(K,Y,d){(function(){var g,A,Z={}.hasOwnProperty;g=d(42870),A=d(26068),K.exports=function(l){function h(R,y){if(h.__super__.constructor.call(this,R),null==y)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=g.CData,this.value=this.stringify.cdata(y)}return function(l,h){for(var R in h)Z.call(h,R)&&(l[R]=h[R]);function y(){this.constructor=l}y.prototype=h.prototype,l.prototype=new y,l.__super__=h.prototype}(h,l),h.prototype.clone=function(){return Object.create(this)},h.prototype.toString=function(R){return this.options.writer.cdata(this,this.options.writer.filterOptions(R))},h}(A)}).call(this)},26068:function(K,Y,d){(function(){var r,x={}.hasOwnProperty;r=d(26627),K.exports=function(Z){function l(h){l.__super__.constructor.call(this,h),this.value=""}return function(Z,l){for(var h in l)x.call(l,h)&&(Z[h]=l[h]);function R(){this.constructor=Z}R.prototype=l.prototype,Z.prototype=new R,Z.__super__=l.prototype}(l,Z),Object.defineProperty(l.prototype,"data",{get:function(){return this.value},set:function(h){return this.value=h||""}}),Object.defineProperty(l.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(l.prototype,"textContent",{get:function(){return this.value},set:function(h){return this.value=h||""}}),l.prototype.clone=function(){return Object.create(this)},l.prototype.substringData=function(h,R){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.appendData=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.insertData=function(h,R){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.deleteData=function(h,R){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.replaceData=function(h,R,y){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.isEqualNode=function(h){return!(!l.__super__.isEqualNode.apply(this,arguments).isEqualNode(h)||h.data!==this.data)},l}(r)}).call(this)},73940:function(K,Y,d){(function(){var g,r,Z={}.hasOwnProperty;g=d(42870),r=d(26068),K.exports=function(l){function h(R,y){if(h.__super__.constructor.call(this,R),null==y)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=g.Comment,this.value=this.stringify.comment(y)}return function(l,h){for(var R in h)Z.call(h,R)&&(l[R]=h[R]);function y(){this.constructor=l}y.prototype=h.prototype,l.prototype=new y,l.__super__=h.prototype}(h,l),h.prototype.clone=function(){return Object.create(this)},h.prototype.toString=function(R){return this.options.writer.comment(this,this.options.writer.filterOptions(R))},h}(r)}).call(this)},34817:function(K,Y,d){(function(){var r,A;r=d(34551),A=d(53569),K.exports=function(){function x(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new r,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}return Object.defineProperty(x.prototype,"parameterNames",{get:function(){return new A(Object.keys(this.defaultParams))}}),x.prototype.getParameter=function(Z){return this.params.hasOwnProperty(Z)?this.params[Z]:null},x.prototype.canSetParameter=function(Z,l){return!0},x.prototype.setParameter=function(Z,l){return null!=l?this.params[Z]=l:delete this.params[Z]},x}()}).call(this)},34551:function(K){(function(){K.exports=function(){function d(){}return d.prototype.handleError=function(g){throw new Error(g)},d}()}).call(this)},57951:function(K){(function(){K.exports=function(){function d(){}return d.prototype.hasFeature=function(g,r){return!0},d.prototype.createDocumentType=function(g,r,A){throw new Error("This DOM method is not implemented.")},d.prototype.createDocument=function(g,r,A){throw new Error("This DOM method is not implemented.")},d.prototype.createHTMLDocument=function(g){throw new Error("This DOM method is not implemented.")},d.prototype.getFeature=function(g,r){throw new Error("This DOM method is not implemented.")},d}()}).call(this)},53569:function(K){(function(){K.exports=function(){function d(g){this.arr=g||[]}return Object.defineProperty(d.prototype,"length",{get:function(){return this.arr.length}}),d.prototype.item=function(g){return this.arr[g]||null},d.prototype.contains=function(g){return-1!==this.arr.indexOf(g)},d}()}).call(this)},70438:function(K,Y,d){(function(){var g,A,Z={}.hasOwnProperty;A=d(26627),g=d(42870),K.exports=function(l){function h(R,y,N,v,k,P){if(h.__super__.constructor.call(this,R),null==y)throw new Error("Missing DTD element name. "+this.debugInfo());if(null==N)throw new Error("Missing DTD attribute name. "+this.debugInfo(y));if(!v)throw new Error("Missing DTD attribute type. "+this.debugInfo(y));if(!k)throw new Error("Missing DTD attribute default. "+this.debugInfo(y));if(0!==k.indexOf("#")&&(k="#"+k),!k.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(y));if(P&&!k.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(y));this.elementName=this.stringify.name(y),this.type=g.AttributeDeclaration,this.attributeName=this.stringify.name(N),this.attributeType=this.stringify.dtdAttType(v),P&&(this.defaultValue=this.stringify.dtdAttDefault(P)),this.defaultValueType=k}return function(l,h){for(var R in h)Z.call(h,R)&&(l[R]=h[R]);function y(){this.constructor=l}y.prototype=h.prototype,l.prototype=new y,l.__super__=h.prototype}(h,l),h.prototype.toString=function(R){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(R))},h}(A)}).call(this)},33020:function(K,Y,d){(function(){var g,A,Z={}.hasOwnProperty;A=d(26627),g=d(42870),K.exports=function(l){function h(R,y,N){if(h.__super__.constructor.call(this,R),null==y)throw new Error("Missing DTD element name. "+this.debugInfo());N||(N="(#PCDATA)"),Array.isArray(N)&&(N="("+N.join(",")+")"),this.name=this.stringify.name(y),this.type=g.ElementDeclaration,this.value=this.stringify.dtdElementValue(N)}return function(l,h){for(var R in h)Z.call(h,R)&&(l[R]=h[R]);function y(){this.constructor=l}y.prototype=h.prototype,l.prototype=new y,l.__super__=h.prototype}(h,l),h.prototype.toString=function(R){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(R))},h}(A)}).call(this)},80015:function(K,Y,d){(function(){var g,A,x,l={}.hasOwnProperty;x=d(63146).isObject,A=d(26627),g=d(42870),K.exports=function(h){function R(y,N,v,k){if(R.__super__.constructor.call(this,y),null==v)throw new Error("Missing DTD entity name. "+this.debugInfo(v));if(null==k)throw new Error("Missing DTD entity value. "+this.debugInfo(v));if(this.pe=!!N,this.name=this.stringify.name(v),this.type=g.EntityDeclaration,x(k)){if(!k.pubID&&!k.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(v));if(k.pubID&&!k.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(v));if(this.internal=!1,null!=k.pubID&&(this.pubID=this.stringify.dtdPubID(k.pubID)),null!=k.sysID&&(this.sysID=this.stringify.dtdSysID(k.sysID)),null!=k.nData&&(this.nData=this.stringify.dtdNData(k.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(v))}else this.value=this.stringify.dtdEntityValue(k),this.internal=!0}return function(h,R){for(var y in R)l.call(R,y)&&(h[y]=R[y]);function N(){this.constructor=h}N.prototype=R.prototype,h.prototype=new N,h.__super__=R.prototype}(R,h),Object.defineProperty(R.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(R.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(R.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(R.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(R.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(R.prototype,"xmlVersion",{get:function(){return null}}),R.prototype.toString=function(y){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(y))},R}(A)}).call(this)},46600:function(K,Y,d){(function(){var g,A,Z={}.hasOwnProperty;A=d(26627),g=d(42870),K.exports=function(l){function h(R,y,N){if(h.__super__.constructor.call(this,R),null==y)throw new Error("Missing DTD notation name. "+this.debugInfo(y));if(!N.pubID&&!N.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(y));this.name=this.stringify.name(y),this.type=g.NotationDeclaration,null!=N.pubID&&(this.pubID=this.stringify.dtdPubID(N.pubID)),null!=N.sysID&&(this.sysID=this.stringify.dtdSysID(N.sysID))}return function(l,h){for(var R in h)Z.call(h,R)&&(l[R]=h[R]);function y(){this.constructor=l}y.prototype=h.prototype,l.prototype=new y,l.__super__=h.prototype}(h,l),Object.defineProperty(h.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(h.prototype,"systemId",{get:function(){return this.sysID}}),h.prototype.toString=function(R){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(R))},h}(A)}).call(this)},29413:function(K,Y,d){(function(){var g,A,x,l={}.hasOwnProperty;x=d(63146).isObject,A=d(26627),g=d(42870),K.exports=function(h){function R(y,N,v,k){var P;R.__super__.constructor.call(this,y),x(N)&&(N=(P=N).version,v=P.encoding,k=P.standalone),N||(N="1.0"),this.type=g.Declaration,this.version=this.stringify.xmlVersion(N),null!=v&&(this.encoding=this.stringify.xmlEncoding(v)),null!=k&&(this.standalone=this.stringify.xmlStandalone(k))}return function(h,R){for(var y in R)l.call(R,y)&&(h[y]=R[y]);function N(){this.constructor=h}N.prototype=R.prototype,h.prototype=new N,h.__super__=R.prototype}(R,h),R.prototype.toString=function(y){return this.options.writer.declaration(this,this.options.writer.filterOptions(y))},R}(A)}).call(this)},67905:function(K,Y,d){(function(){var g,r,A,x,Z,h,R,y,v={}.hasOwnProperty;y=d(63146).isObject,R=d(26627),g=d(42870),r=d(70438),x=d(80015),A=d(33020),Z=d(46600),h=d(25631),K.exports=function(k){function P(L,I,G){var B,S,U,m,p,u;if(P.__super__.constructor.call(this,L),this.type=g.DocType,L.children)for(S=0,U=(m=L.children).length;S<U;S++)if((B=m[S]).type===g.Element){this.name=B.name;break}this.documentObject=L,y(I)&&(I=(p=I).pubID,G=p.sysID),null==G&&(G=(u=[I,G])[0],I=u[1]),null!=I&&(this.pubID=this.stringify.dtdPubID(I)),null!=G&&(this.sysID=this.stringify.dtdSysID(G))}return function(k,P){for(var L in P)v.call(P,L)&&(k[L]=P[L]);function I(){this.constructor=k}I.prototype=P.prototype,k.prototype=new I,k.__super__=P.prototype}(P,k),Object.defineProperty(P.prototype,"entities",{get:function(){var L,I,G,B,S;for(B={},I=0,G=(S=this.children).length;I<G;I++)(L=S[I]).type===g.EntityDeclaration&&!L.pe&&(B[L.name]=L);return new h(B)}}),Object.defineProperty(P.prototype,"notations",{get:function(){var L,I,G,B,S;for(B={},I=0,G=(S=this.children).length;I<G;I++)(L=S[I]).type===g.NotationDeclaration&&(B[L.name]=L);return new h(B)}}),Object.defineProperty(P.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(P.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(P.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),P.prototype.element=function(L,I){var G;return G=new A(this,L,I),this.children.push(G),this},P.prototype.attList=function(L,I,G,B,S){var U;return U=new r(this,L,I,G,B,S),this.children.push(U),this},P.prototype.entity=function(L,I){var G;return G=new x(this,!1,L,I),this.children.push(G),this},P.prototype.pEntity=function(L,I){var G;return G=new x(this,!0,L,I),this.children.push(G),this},P.prototype.notation=function(L,I){var G;return G=new Z(this,L,I),this.children.push(G),this},P.prototype.toString=function(L){return this.options.writer.docType(this,this.options.writer.filterOptions(L))},P.prototype.ele=function(L,I){return this.element(L,I)},P.prototype.att=function(L,I,G,B,S){return this.attList(L,I,G,B,S)},P.prototype.ent=function(L,I){return this.entity(L,I)},P.prototype.pent=function(L,I){return this.pEntity(L,I)},P.prototype.not=function(L,I){return this.notation(L,I)},P.prototype.up=function(){return this.root()||this.documentObject},P.prototype.isEqualNode=function(L){return!(!P.__super__.isEqualNode.apply(this,arguments).isEqualNode(L)||L.name!==this.name||L.publicId!==this.publicId||L.systemId!==this.systemId)},P}(R)}).call(this)},32008:function(K,Y,d){(function(){var g,r,A,Z,l,h,R,N={}.hasOwnProperty;R=d(63146).isPlainObject,A=d(57951),r=d(34817),Z=d(26627),g=d(42870),h=d(93258),l=d(28337),K.exports=function(v){function k(P){k.__super__.constructor.call(this,null),this.name="#document",this.type=g.Document,this.documentURI=null,this.domConfig=new r,P||(P={}),P.writer||(P.writer=new l),this.options=P,this.stringify=new h(P)}return function(v,k){for(var P in k)N.call(k,P)&&(v[P]=k[P]);function L(){this.constructor=v}L.prototype=k.prototype,v.prototype=new L,v.__super__=k.prototype}(k,v),Object.defineProperty(k.prototype,"implementation",{value:new A}),Object.defineProperty(k.prototype,"doctype",{get:function(){var P,L,I,G;for(L=0,I=(G=this.children).length;L<I;L++)if((P=G[L]).type===g.DocType)return P;return null}}),Object.defineProperty(k.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(k.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(k.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(k.prototype,"xmlEncoding",{get:function(){return 0!==this.children.length&&this.children[0].type===g.Declaration?this.children[0].encoding:null}}),Object.defineProperty(k.prototype,"xmlStandalone",{get:function(){return 0!==this.children.length&&this.children[0].type===g.Declaration&&"yes"===this.children[0].standalone}}),Object.defineProperty(k.prototype,"xmlVersion",{get:function(){return 0!==this.children.length&&this.children[0].type===g.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(k.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(k.prototype,"origin",{get:function(){return null}}),Object.defineProperty(k.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(k.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(k.prototype,"contentType",{get:function(){return null}}),k.prototype.end=function(P){var L;return L={},P?R(P)&&(L=P,P=this.options.writer):P=this.options.writer,P.document(this,P.filterOptions(L))},k.prototype.toString=function(P){return this.options.writer.document(this,this.options.writer.filterOptions(P))},k.prototype.createElement=function(P){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.createTextNode=function(P){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.createComment=function(P){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.createCDATASection=function(P){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.createProcessingInstruction=function(P,L){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.createAttribute=function(P){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.createEntityReference=function(P){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.getElementsByTagName=function(P){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.importNode=function(P,L){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.createElementNS=function(P,L){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.createAttributeNS=function(P,L){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.getElementsByTagNameNS=function(P,L){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.getElementById=function(P){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.adoptNode=function(P){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.renameNode=function(P,L,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.getElementsByClassName=function(P){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.createEvent=function(P){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.createNodeIterator=function(P,L,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.createTreeWalker=function(P,L,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},k}(Z)}).call(this)},25795:function(K,Y,d){(function(){var g,r,A,x,Z,l,h,R,y,N,v,k,L,I,G,B,S,U,m,p,u,E,e,f={}.hasOwnProperty;e=d(63146),u=e.isObject,p=e.isFunction,E=e.isPlainObject,m=e.getValue,g=d(42870),k=d(32008),L=d(17770),x=d(19832),Z=d(73940),G=d(99166),U=d(80504),I=d(12726),N=d(29413),v=d(67905),l=d(70438),R=d(80015),h=d(33020),y=d(46600),A=d(88828),S=d(93258),B=d(28337),r=d(47159),K.exports=function(){function $(M,q,z){var V;this.name="?xml",this.type=g.Document,M||(M={}),V={},M.writer?E(M.writer)&&(V=M.writer,M.writer=new B):M.writer=new B,this.options=M,this.writer=M.writer,this.writerOptions=this.writer.filterOptions(V),this.stringify=new S(M),this.onDataCallback=q||function(){},this.onEndCallback=z||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return $.prototype.createChildNode=function(M){var z,V,le,de,ne,pe,ue;switch(M.type){case g.CData:this.cdata(M.value);break;case g.Comment:this.comment(M.value);break;case g.Element:for(z in V={},pe=M.attribs)f.call(pe,z)&&(V[z]=pe[z].value);this.node(M.name,V);break;case g.Dummy:this.dummy();break;case g.Raw:this.raw(M.value);break;case g.Text:this.text(M.value);break;case g.ProcessingInstruction:this.instruction(M.target,M.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+M.constructor.name)}for(de=0,ne=(ue=M.children).length;de<ne;de++)this.createChildNode(le=ue[de]),le.type===g.Element&&this.up();return this},$.prototype.dummy=function(){return this},$.prototype.node=function(M,q,z){var V;if(null==M)throw new Error("Missing node name.");if(this.root&&-1===this.currentLevel)throw new Error("Document can only have one root node. "+this.debugInfo(M));return this.openCurrent(),M=m(M),null==q&&(q={}),q=m(q),u(q)||(z=(V=[q,z])[0],q=V[1]),this.currentNode=new L(this,M,q),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,null!=z&&this.text(z),this},$.prototype.element=function(M,q,z){var V,le,de,ne,pe,ue;if(this.currentNode&&this.currentNode.type===g.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(M)||u(M)||p(M))for(ne=this.options.noValidation,this.options.noValidation=!0,(ue=new k(this.options).element("TEMP_ROOT")).element(M),this.options.noValidation=ne,le=0,de=(pe=ue.children).length;le<de;le++)this.createChildNode(V=pe[le]),V.type===g.Element&&this.up();else this.node(M,q,z);return this},$.prototype.attribute=function(M,q){var z;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(M));if(null!=M&&(M=m(M)),u(M))for(z in M)f.call(M,z)&&this.attribute(z,M[z]);else p(q)&&(q=q.apply()),this.options.keepNullAttributes&&null==q?this.currentNode.attribs[M]=new A(this,M,""):null!=q&&(this.currentNode.attribs[M]=new A(this,M,q));return this},$.prototype.text=function(M){var q;return this.openCurrent(),q=new U(this,M),this.onData(this.writer.text(q,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.cdata=function(M){var q;return this.openCurrent(),q=new x(this,M),this.onData(this.writer.cdata(q,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.comment=function(M){var q;return this.openCurrent(),q=new Z(this,M),this.onData(this.writer.comment(q,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.raw=function(M){var q;return this.openCurrent(),q=new G(this,M),this.onData(this.writer.raw(q,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.instruction=function(M,q){var z,V,de,ne;if(this.openCurrent(),null!=M&&(M=m(M)),null!=q&&(q=m(q)),Array.isArray(M))for(z=0,de=M.length;z<de;z++)this.instruction(V=M[z]);else if(u(M))for(V in M)f.call(M,V)&&this.instruction(V,M[V]);else p(q)&&(q=q.apply()),ne=new I(this,M,q),this.onData(this.writer.processingInstruction(ne,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},$.prototype.declaration=function(M,q,z){var V;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return V=new N(this,M,q,z),this.onData(this.writer.declaration(V,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.doctype=function(M,q,z){if(this.openCurrent(),null==M)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new v(this,q,z),this.currentNode.rootNodeName=M,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},$.prototype.dtdElement=function(M,q){var z;return this.openCurrent(),z=new h(this,M,q),this.onData(this.writer.dtdElement(z,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.attList=function(M,q,z,V,le){var de;return this.openCurrent(),de=new l(this,M,q,z,V,le),this.onData(this.writer.dtdAttList(de,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.entity=function(M,q){var z;return this.openCurrent(),z=new R(this,!1,M,q),this.onData(this.writer.dtdEntity(z,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.pEntity=function(M,q){var z;return this.openCurrent(),z=new R(this,!0,M,q),this.onData(this.writer.dtdEntity(z,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.notation=function(M,q){var z;return this.openCurrent(),z=new y(this,M,q),this.onData(this.writer.dtdNotation(z,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},$.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},$.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},$.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},$.prototype.openNode=function(M){var z,V,le;if(!M.isOpen){if(!this.root&&0===this.currentLevel&&M.type===g.Element&&(this.root=M),z="",M.type===g.Element){for(V in this.writerOptions.state=r.OpenTag,z=this.writer.indent(M,this.writerOptions,this.currentLevel)+"<"+M.name,le=M.attribs)f.call(le,V)&&(z+=this.writer.attribute(le[V],this.writerOptions,this.currentLevel));z+=(M.children?">":"/>")+this.writer.endline(M,this.writerOptions,this.currentLevel),this.writerOptions.state=r.InsideTag}else this.writerOptions.state=r.OpenTag,z=this.writer.indent(M,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+M.rootNodeName,M.pubID&&M.sysID?z+=' PUBLIC "'+M.pubID+'" "'+M.sysID+'"':M.sysID&&(z+=' SYSTEM "'+M.sysID+'"'),M.children?(z+=" [",this.writerOptions.state=r.InsideTag):(this.writerOptions.state=r.CloseTag,z+=">"),z+=this.writer.endline(M,this.writerOptions,this.currentLevel);return this.onData(z,this.currentLevel),M.isOpen=!0}},$.prototype.closeNode=function(M){var q;if(!M.isClosed)return"",this.writerOptions.state=r.CloseTag,q=M.type===g.Element?this.writer.indent(M,this.writerOptions,this.currentLevel)+"</"+M.name+">"+this.writer.endline(M,this.writerOptions,this.currentLevel):this.writer.indent(M,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(M,this.writerOptions,this.currentLevel),this.writerOptions.state=r.None,this.onData(q,this.currentLevel),M.isClosed=!0},$.prototype.onData=function(M,q){return this.documentStarted=!0,this.onDataCallback(M,q+1)},$.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},$.prototype.debugInfo=function(M){return null==M?"":"node: <"+M+">"},$.prototype.ele=function(){return this.element.apply(this,arguments)},$.prototype.nod=function(M,q,z){return this.node(M,q,z)},$.prototype.txt=function(M){return this.text(M)},$.prototype.dat=function(M){return this.cdata(M)},$.prototype.com=function(M){return this.comment(M)},$.prototype.ins=function(M,q){return this.instruction(M,q)},$.prototype.dec=function(M,q,z){return this.declaration(M,q,z)},$.prototype.dtd=function(M,q,z){return this.doctype(M,q,z)},$.prototype.e=function(M,q,z){return this.element(M,q,z)},$.prototype.n=function(M,q,z){return this.node(M,q,z)},$.prototype.t=function(M){return this.text(M)},$.prototype.d=function(M){return this.cdata(M)},$.prototype.c=function(M){return this.comment(M)},$.prototype.r=function(M){return this.raw(M)},$.prototype.i=function(M,q){return this.instruction(M,q)},$.prototype.att=function(){return this.currentNode&&this.currentNode.type===g.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},$.prototype.a=function(){return this.currentNode&&this.currentNode.type===g.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},$.prototype.ent=function(M,q){return this.entity(M,q)},$.prototype.pent=function(M,q){return this.pEntity(M,q)},$.prototype.not=function(M,q){return this.notation(M,q)},$}()}).call(this)},71616:function(K,Y,d){(function(){var g,A,Z={}.hasOwnProperty;A=d(26627),g=d(42870),K.exports=function(l){function h(R){h.__super__.constructor.call(this,R),this.type=g.Dummy}return function(l,h){for(var R in h)Z.call(h,R)&&(l[R]=h[R]);function y(){this.constructor=l}y.prototype=h.prototype,l.prototype=new y,l.__super__=h.prototype}(h,l),h.prototype.clone=function(){return Object.create(this)},h.prototype.toString=function(R){return""},h}(A)}).call(this)},17770:function(K,Y,d){(function(){var g,r,x,Z,l,h,R,y,v={}.hasOwnProperty;y=d(63146),R=y.isObject,h=y.isFunction,l=y.getValue,Z=d(26627),g=d(42870),r=d(88828),x=d(25631),K.exports=function(k){function P(L,I,G){var B,S,U,m;if(P.__super__.constructor.call(this,L),null==I)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(I),this.type=g.Element,this.attribs={},this.schemaTypeInfo=null,null!=G&&this.attribute(G),L.type===g.Document&&(this.isRoot=!0,this.documentObject=L,L.rootObject=this,L.children))for(S=0,U=(m=L.children).length;S<U;S++)if((B=m[S]).type===g.DocType){B.name=this.name;break}}return function(k,P){for(var L in P)v.call(P,L)&&(k[L]=P[L]);function I(){this.constructor=k}I.prototype=P.prototype,k.prototype=new I,k.__super__=P.prototype}(P,k),Object.defineProperty(P.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(P.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(P.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(P.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(P.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(P.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(P.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(P.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new x(this.attribs)),this.attributeMap}}),P.prototype.clone=function(){var I,G,B;for(I in(G=Object.create(this)).isRoot&&(G.documentObject=null),G.attribs={},B=this.attribs)v.call(B,I)&&(G.attribs[I]=B[I].clone());return G.children=[],this.children.forEach(function(S){var U;return(U=S.clone()).parent=G,G.children.push(U)}),G},P.prototype.attribute=function(L,I){var G;if(null!=L&&(L=l(L)),R(L))for(G in L)v.call(L,G)&&this.attribute(G,L[G]);else h(I)&&(I=I.apply()),this.options.keepNullAttributes&&null==I?this.attribs[L]=new r(this,L,""):null!=I&&(this.attribs[L]=new r(this,L,I));return this},P.prototype.removeAttribute=function(L){var G,B;if(null==L)throw new Error("Missing attribute name. "+this.debugInfo());if(L=l(L),Array.isArray(L))for(G=0,B=L.length;G<B;G++)delete this.attribs[L[G]];else delete this.attribs[L];return this},P.prototype.toString=function(L){return this.options.writer.element(this,this.options.writer.filterOptions(L))},P.prototype.att=function(L,I){return this.attribute(L,I)},P.prototype.a=function(L,I){return this.attribute(L,I)},P.prototype.getAttribute=function(L){return this.attribs.hasOwnProperty(L)?this.attribs[L].value:null},P.prototype.setAttribute=function(L,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},P.prototype.getAttributeNode=function(L){return this.attribs.hasOwnProperty(L)?this.attribs[L]:null},P.prototype.setAttributeNode=function(L){throw new Error("This DOM method is not implemented."+this.debugInfo())},P.prototype.removeAttributeNode=function(L){throw new Error("This DOM method is not implemented."+this.debugInfo())},P.prototype.getElementsByTagName=function(L){throw new Error("This DOM method is not implemented."+this.debugInfo())},P.prototype.getAttributeNS=function(L,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},P.prototype.setAttributeNS=function(L,I,G){throw new Error("This DOM method is not implemented."+this.debugInfo())},P.prototype.removeAttributeNS=function(L,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},P.prototype.getAttributeNodeNS=function(L,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},P.prototype.setAttributeNodeNS=function(L){throw new Error("This DOM method is not implemented."+this.debugInfo())},P.prototype.getElementsByTagNameNS=function(L,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},P.prototype.hasAttribute=function(L){return this.attribs.hasOwnProperty(L)},P.prototype.hasAttributeNS=function(L,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},P.prototype.setIdAttribute=function(L,I){return this.attribs.hasOwnProperty(L)?this.attribs[L].isId:I},P.prototype.setIdAttributeNS=function(L,I,G){throw new Error("This DOM method is not implemented."+this.debugInfo())},P.prototype.setIdAttributeNode=function(L,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},P.prototype.getElementsByTagName=function(L){throw new Error("This DOM method is not implemented."+this.debugInfo())},P.prototype.getElementsByTagNameNS=function(L,I){throw new Error("This DOM method is not implemented."+this.debugInfo())},P.prototype.getElementsByClassName=function(L){throw new Error("This DOM method is not implemented."+this.debugInfo())},P.prototype.isEqualNode=function(L){var I,G,B;if(!P.__super__.isEqualNode.apply(this,arguments).isEqualNode(L)||L.namespaceURI!==this.namespaceURI||L.prefix!==this.prefix||L.localName!==this.localName||L.attribs.length!==this.attribs.length)return!1;for(I=G=0,B=this.attribs.length-1;0<=B?G<=B:G>=B;I=0<=B?++G:--G)if(!this.attribs[I].isEqualNode(L.attribs[I]))return!1;return!0},P}(Z)}).call(this)},25631:function(K){(function(){K.exports=function(){function d(g){this.nodes=g}return Object.defineProperty(d.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),d.prototype.clone=function(){return this.nodes=null},d.prototype.getNamedItem=function(g){return this.nodes[g]},d.prototype.setNamedItem=function(g){var r;return r=this.nodes[g.nodeName],this.nodes[g.nodeName]=g,r||null},d.prototype.removeNamedItem=function(g){var r;return r=this.nodes[g],delete this.nodes[g],r||null},d.prototype.item=function(g){return this.nodes[Object.keys(this.nodes)[g]]||null},d.prototype.getNamedItemNS=function(g,r){throw new Error("This DOM method is not implemented.")},d.prototype.setNamedItemNS=function(g){throw new Error("This DOM method is not implemented.")},d.prototype.removeNamedItemNS=function(g,r){throw new Error("This DOM method is not implemented.")},d}()}).call(this)},26627:function(K,Y,d){(function(){var g,r,A,x,Z,l,h,R,v,k,P,L,I,G,B,S,U,m={}.hasOwnProperty;U=d(63146),S=U.isObject,B=U.isFunction,G=U.isEmpty,I=U.getValue,R=null,A=null,x=null,Z=null,l=null,P=null,L=null,k=null,h=null,r=null,v=null,g=null,K.exports=function(){function p(u){this.parent=u,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,R||(R=d(17770),A=d(19832),x=d(73940),Z=d(29413),l=d(67905),P=d(99166),L=d(80504),k=d(12726),h=d(71616),r=d(42870),v=d(87137),d(25631),g=d(69053))}return Object.defineProperty(p.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(p.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(p.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(p.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(p.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new v(this.children)),this.childNodeList}}),Object.defineProperty(p.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(p.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(p.prototype,"previousSibling",{get:function(){var u;return u=this.parent.children.indexOf(this),this.parent.children[u-1]||null}}),Object.defineProperty(p.prototype,"nextSibling",{get:function(){var u;return u=this.parent.children.indexOf(this),this.parent.children[u+1]||null}}),Object.defineProperty(p.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(p.prototype,"textContent",{get:function(){var u,E,e,f,$;if(this.nodeType===r.Element||this.nodeType===r.DocumentFragment){for($="",E=0,e=(f=this.children).length;E<e;E++)(u=f[E]).textContent&&($+=u.textContent);return $}return null},set:function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),p.prototype.setParent=function(u){var e,f,$,M;for(this.parent=u,u&&(this.options=u.options,this.stringify=u.stringify),M=[],e=0,f=($=this.children).length;e<f;e++)M.push($[e].setParent(this));return M},p.prototype.element=function(u,E,e){var f,M,q,z,V,le,de,ne,pe,ue;if(V=null,null===E&&null==e&&(E=(ne=[{},null])[0],e=ne[1]),null==E&&(E={}),E=I(E),S(E)||(e=(pe=[E,e])[0],E=pe[1]),null!=u&&(u=I(u)),Array.isArray(u))for(M=0,le=u.length;M<le;M++)V=this.element(u[M]);else if(B(u))V=this.element(u.apply());else if(S(u)){for(z in u)if(m.call(u,z))if(B(ue=u[z])&&(ue=ue.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===z.indexOf(this.stringify.convertAttKey))V=this.attribute(z.substr(this.stringify.convertAttKey.length),ue);else if(!this.options.separateArrayItems&&Array.isArray(ue)&&G(ue))V=this.dummy();else if(S(ue)&&G(ue))V=this.element(z);else if(this.options.keepNullNodes||null!=ue)if(!this.options.separateArrayItems&&Array.isArray(ue))for(q=0,de=ue.length;q<de;q++)(f={})[z]=ue[q],V=this.element(f);else S(ue)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===z.indexOf(this.stringify.convertTextKey)?V=this.element(ue):(V=this.element(z)).element(ue):V=this.element(z,ue);else V=this.dummy()}else V=this.options.keepNullNodes||null!==e?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===u.indexOf(this.stringify.convertTextKey)?this.text(e):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===u.indexOf(this.stringify.convertCDataKey)?this.cdata(e):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===u.indexOf(this.stringify.convertCommentKey)?this.comment(e):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===u.indexOf(this.stringify.convertRawKey)?this.raw(e):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===u.indexOf(this.stringify.convertPIKey)?this.instruction(u.substr(this.stringify.convertPIKey.length),e):this.node(u,E,e):this.dummy();if(null==V)throw new Error("Could not create any elements with: "+u+". "+this.debugInfo());return V},p.prototype.insertBefore=function(u,E,e){var f,$,M,q,z;if(u?.type)return q=E,(M=u).setParent(this),q?($=children.indexOf(q),z=children.splice($),children.push(M),Array.prototype.push.apply(children,z)):children.push(M),M;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(u));return $=this.parent.children.indexOf(this),z=this.parent.children.splice($),f=this.parent.element(u,E,e),Array.prototype.push.apply(this.parent.children,z),f},p.prototype.insertAfter=function(u,E,e){var f,$,M;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(u));return $=this.parent.children.indexOf(this),M=this.parent.children.splice($+1),f=this.parent.element(u,E,e),Array.prototype.push.apply(this.parent.children,M),f},p.prototype.remove=function(){var u;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return u=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[u,u-u+1].concat([])),this.parent},p.prototype.node=function(u,E,e){var f,$;return null!=u&&(u=I(u)),E||(E={}),E=I(E),S(E)||(e=($=[E,e])[0],E=$[1]),f=new R(this,u,E),null!=e&&f.text(e),this.children.push(f),f},p.prototype.text=function(u){var E;return S(u)&&this.element(u),E=new L(this,u),this.children.push(E),this},p.prototype.cdata=function(u){var E;return E=new A(this,u),this.children.push(E),this},p.prototype.comment=function(u){var E;return E=new x(this,u),this.children.push(E),this},p.prototype.commentBefore=function(u){var e,f;return e=this.parent.children.indexOf(this),f=this.parent.children.splice(e),this.parent.comment(u),Array.prototype.push.apply(this.parent.children,f),this},p.prototype.commentAfter=function(u){var e,f;return e=this.parent.children.indexOf(this),f=this.parent.children.splice(e+1),this.parent.comment(u),Array.prototype.push.apply(this.parent.children,f),this},p.prototype.raw=function(u){var E;return E=new P(this,u),this.children.push(E),this},p.prototype.dummy=function(){return new h(this)},p.prototype.instruction=function(u,E){var e,$,M,q;if(null!=u&&(u=I(u)),null!=E&&(E=I(E)),Array.isArray(u))for(M=0,q=u.length;M<q;M++)this.instruction(e=u[M]);else if(S(u))for(e in u)m.call(u,e)&&this.instruction(e,u[e]);else B(E)&&(E=E.apply()),$=new k(this,u,E),this.children.push($);return this},p.prototype.instructionBefore=function(u,E){var f,$;return f=this.parent.children.indexOf(this),$=this.parent.children.splice(f),this.parent.instruction(u,E),Array.prototype.push.apply(this.parent.children,$),this},p.prototype.instructionAfter=function(u,E){var f,$;return f=this.parent.children.indexOf(this),$=this.parent.children.splice(f+1),this.parent.instruction(u,E),Array.prototype.push.apply(this.parent.children,$),this},p.prototype.declaration=function(u,E,e){var f,$;return f=this.document(),$=new Z(f,u,E,e),0===f.children.length?f.children.unshift($):f.children[0].type===r.Declaration?f.children[0]=$:f.children.unshift($),f.root()||f},p.prototype.dtd=function(u,E){var f,$,M,q,z,V,le,de,ne;for(f=this.document(),$=new l(f,u,E),M=q=0,V=(de=f.children).length;q<V;M=++q)if(de[M].type===r.DocType)return f.children[M]=$,$;for(M=z=0,le=(ne=f.children).length;z<le;M=++z)if(ne[M].isRoot)return f.children.splice(M,0,$),$;return f.children.push($),$},p.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},p.prototype.root=function(){var u;for(u=this;u;){if(u.type===r.Document)return u.rootObject;if(u.isRoot)return u;u=u.parent}},p.prototype.document=function(){var u;for(u=this;u;){if(u.type===r.Document)return u;u=u.parent}},p.prototype.end=function(u){return this.document().end(u)},p.prototype.prev=function(){var u;if((u=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[u-1]},p.prototype.next=function(){var u;if(-1===(u=this.parent.children.indexOf(this))||u===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[u+1]},p.prototype.importDocument=function(u){var E;return(E=u.root().clone()).parent=this,E.isRoot=!1,this.children.push(E),this},p.prototype.debugInfo=function(u){var E,e;return null!=(u=u||this.name)||null!=(E=this.parent)&&E.name?null==u?"parent: <"+this.parent.name+">":null!=(e=this.parent)&&e.name?"node: <"+u+">, parent: <"+this.parent.name+">":"node: <"+u+">":""},p.prototype.ele=function(u,E,e){return this.element(u,E,e)},p.prototype.nod=function(u,E,e){return this.node(u,E,e)},p.prototype.txt=function(u){return this.text(u)},p.prototype.dat=function(u){return this.cdata(u)},p.prototype.com=function(u){return this.comment(u)},p.prototype.ins=function(u,E){return this.instruction(u,E)},p.prototype.doc=function(){return this.document()},p.prototype.dec=function(u,E,e){return this.declaration(u,E,e)},p.prototype.e=function(u,E,e){return this.element(u,E,e)},p.prototype.n=function(u,E,e){return this.node(u,E,e)},p.prototype.t=function(u){return this.text(u)},p.prototype.d=function(u){return this.cdata(u)},p.prototype.c=function(u){return this.comment(u)},p.prototype.r=function(u){return this.raw(u)},p.prototype.i=function(u,E){return this.instruction(u,E)},p.prototype.u=function(){return this.up()},p.prototype.importXMLBuilder=function(u){return this.importDocument(u)},p.prototype.replaceChild=function(u,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.removeChild=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.appendChild=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.hasChildNodes=function(){return 0!==this.children.length},p.prototype.cloneNode=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.isSupported=function(u,E){return!0},p.prototype.hasAttributes=function(){return 0!==this.attribs.length},p.prototype.compareDocumentPosition=function(u){var E,e;return(E=this)===u?0:this.document()!==u.document()?(e=g.Disconnected|g.ImplementationSpecific,Math.random()<.5?e|=g.Preceding:e|=g.Following,e):E.isAncestor(u)?g.Contains|g.Preceding:E.isDescendant(u)?g.Contains|g.Following:E.isPreceding(u)?g.Preceding:g.Following},p.prototype.isSameNode=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.lookupPrefix=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.isDefaultNamespace=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.lookupNamespaceURI=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.isEqualNode=function(u){var E,e,f;if(u.nodeType!==this.nodeType||u.children.length!==this.children.length)return!1;for(E=e=0,f=this.children.length-1;0<=f?e<=f:e>=f;E=0<=f?++e:--e)if(!this.children[E].isEqualNode(u.children[E]))return!1;return!0},p.prototype.getFeature=function(u,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.setUserData=function(u,E,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getUserData=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.contains=function(u){return!!u&&(u===this||this.isDescendant(u))},p.prototype.isDescendant=function(u){var E,f,$,M;for(f=0,$=(M=this.children).length;f<$;f++)if(u===(E=M[f])||E.isDescendant(u))return!0;return!1},p.prototype.isAncestor=function(u){return u.isDescendant(this)},p.prototype.isPreceding=function(u){var E,e;return E=this.treePosition(u),e=this.treePosition(this),-1!==E&&-1!==e&&E<e},p.prototype.isFollowing=function(u){var E,e;return E=this.treePosition(u),e=this.treePosition(this),-1!==E&&-1!==e&&E>e},p.prototype.treePosition=function(u){var E,e;return e=0,E=!1,this.foreachTreeNode(this.document(),function(f){if(e++,!E&&f===u)return E=!0}),E?e:-1},p.prototype.foreachTreeNode=function(u,E){var e,f,$,M,q;for(u||(u=this.document()),f=0,$=(M=u.children).length;f<$;f++){if(q=E(e=M[f]))return q;if(q=this.foreachTreeNode(e,E))return q}},p}()}).call(this)},87137:function(K){(function(){K.exports=function(){function d(g){this.nodes=g}return Object.defineProperty(d.prototype,"length",{get:function(){return this.nodes.length||0}}),d.prototype.clone=function(){return this.nodes=null},d.prototype.item=function(g){return this.nodes[g]||null},d}()}).call(this)},12726:function(K,Y,d){(function(){var g,r,Z={}.hasOwnProperty;g=d(42870),r=d(26068),K.exports=function(l){function h(R,y,N){if(h.__super__.constructor.call(this,R),null==y)throw new Error("Missing instruction target. "+this.debugInfo());this.type=g.ProcessingInstruction,this.target=this.stringify.insTarget(y),this.name=this.target,N&&(this.value=this.stringify.insValue(N))}return function(l,h){for(var R in h)Z.call(h,R)&&(l[R]=h[R]);function y(){this.constructor=l}y.prototype=h.prototype,l.prototype=new y,l.__super__=h.prototype}(h,l),h.prototype.clone=function(){return Object.create(this)},h.prototype.toString=function(R){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(R))},h.prototype.isEqualNode=function(R){return!(!h.__super__.isEqualNode.apply(this,arguments).isEqualNode(R)||R.target!==this.target)},h}(r)}).call(this)},99166:function(K,Y,d){(function(){var g,r,Z={}.hasOwnProperty;g=d(42870),r=d(26627),K.exports=function(l){function h(R,y){if(h.__super__.constructor.call(this,R),null==y)throw new Error("Missing raw text. "+this.debugInfo());this.type=g.Raw,this.value=this.stringify.raw(y)}return function(l,h){for(var R in h)Z.call(h,R)&&(l[R]=h[R]);function y(){this.constructor=l}y.prototype=h.prototype,l.prototype=new y,l.__super__=h.prototype}(h,l),h.prototype.clone=function(){return Object.create(this)},h.prototype.toString=function(R){return this.options.writer.raw(this,this.options.writer.filterOptions(R))},h}(r)}).call(this)},50864:function(K,Y,d){(function(){var g,r,x,l={}.hasOwnProperty;g=d(42870),x=d(56425),r=d(47159),K.exports=function(h){function R(y,N){this.stream=y,R.__super__.constructor.call(this,N)}return function(h,R){for(var y in R)l.call(R,y)&&(h[y]=R[y]);function N(){this.constructor=h}N.prototype=R.prototype,h.prototype=new N,h.__super__=R.prototype}(R,h),R.prototype.endline=function(y,N,v){return y.isLastRootNode&&N.state===r.CloseTag?"":R.__super__.endline.call(this,y,N,v)},R.prototype.document=function(y,N){var k,P,L,I,G,B,S,U;for(k=P=0,I=(B=y.children).length;P<I;k=++P)B[k].isLastRootNode=k===y.children.length-1;for(N=this.filterOptions(N),U=[],L=0,G=(S=y.children).length;L<G;L++)U.push(this.writeChildNode(S[L],N,0));return U},R.prototype.attribute=function(y,N,v){return this.stream.write(R.__super__.attribute.call(this,y,N,v))},R.prototype.cdata=function(y,N,v){return this.stream.write(R.__super__.cdata.call(this,y,N,v))},R.prototype.comment=function(y,N,v){return this.stream.write(R.__super__.comment.call(this,y,N,v))},R.prototype.declaration=function(y,N,v){return this.stream.write(R.__super__.declaration.call(this,y,N,v))},R.prototype.docType=function(y,N,v){var P,L,I;if(v||(v=0),this.openNode(y,N,v),N.state=r.OpenTag,this.stream.write(this.indent(y,N,v)),this.stream.write("<!DOCTYPE "+y.root().name),y.pubID&&y.sysID?this.stream.write(' PUBLIC "'+y.pubID+'" "'+y.sysID+'"'):y.sysID&&this.stream.write(' SYSTEM "'+y.sysID+'"'),y.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(y,N,v)),N.state=r.InsideTag,P=0,L=(I=y.children).length;P<L;P++)this.writeChildNode(I[P],N,v+1);N.state=r.CloseTag,this.stream.write("]")}return N.state=r.CloseTag,this.stream.write(N.spaceBeforeSlash+">"),this.stream.write(this.endline(y,N,v)),N.state=r.None,this.closeNode(y,N,v)},R.prototype.element=function(y,N,v){var L,I,G,B,S,m,p;for(S in v||(v=0),this.openNode(y,N,v),N.state=r.OpenTag,this.stream.write(this.indent(y,N,v)+"<"+y.name),m=y.attribs)l.call(m,S)&&this.attribute(m[S],N,v);if(I=0===(L=y.children.length)?null:y.children[0],0===L||y.children.every(function(u){return(u.type===g.Text||u.type===g.Raw)&&""===u.value}))N.allowEmpty?(this.stream.write(">"),N.state=r.CloseTag,this.stream.write("</"+y.name+">")):(N.state=r.CloseTag,this.stream.write(N.spaceBeforeSlash+"/>"));else if(!N.pretty||1!==L||I.type!==g.Text&&I.type!==g.Raw||null==I.value){for(this.stream.write(">"+this.endline(y,N,v)),N.state=r.InsideTag,G=0,B=(p=y.children).length;G<B;G++)this.writeChildNode(p[G],N,v+1);N.state=r.CloseTag,this.stream.write(this.indent(y,N,v)+"</"+y.name+">")}else this.stream.write(">"),N.state=r.InsideTag,N.suppressPrettyCount++,this.writeChildNode(I,N,v+1),N.suppressPrettyCount--,N.state=r.CloseTag,this.stream.write("</"+y.name+">");return this.stream.write(this.endline(y,N,v)),N.state=r.None,this.closeNode(y,N,v)},R.prototype.processingInstruction=function(y,N,v){return this.stream.write(R.__super__.processingInstruction.call(this,y,N,v))},R.prototype.raw=function(y,N,v){return this.stream.write(R.__super__.raw.call(this,y,N,v))},R.prototype.text=function(y,N,v){return this.stream.write(R.__super__.text.call(this,y,N,v))},R.prototype.dtdAttList=function(y,N,v){return this.stream.write(R.__super__.dtdAttList.call(this,y,N,v))},R.prototype.dtdElement=function(y,N,v){return this.stream.write(R.__super__.dtdElement.call(this,y,N,v))},R.prototype.dtdEntity=function(y,N,v){return this.stream.write(R.__super__.dtdEntity.call(this,y,N,v))},R.prototype.dtdNotation=function(y,N,v){return this.stream.write(R.__super__.dtdNotation.call(this,y,N,v))},R}(x)}).call(this)},28337:function(K,Y,d){(function(){var r,x={}.hasOwnProperty;r=d(56425),K.exports=function(Z){function l(h){l.__super__.constructor.call(this,h)}return function(Z,l){for(var h in l)x.call(l,h)&&(Z[h]=l[h]);function R(){this.constructor=Z}R.prototype=l.prototype,Z.prototype=new R,Z.__super__=l.prototype}(l,Z),l.prototype.document=function(h,R){var N,v,k,P;for(R=this.filterOptions(R),k="",N=0,v=(P=h.children).length;N<v;N++)k+=this.writeChildNode(P[N],R,0);return R.pretty&&k.slice(-R.newline.length)===R.newline&&(k=k.slice(0,-R.newline.length)),k},l}(r)}).call(this)},93258:function(K){(function(){var d=function(r,A){return function(){return r.apply(A,arguments)}},g={}.hasOwnProperty;K.exports=function(){function r(A){var x,Z;for(x in this.assertLegalName=d(this.assertLegalName,this),this.assertLegalChar=d(this.assertLegalChar,this),A||(A={}),this.options=A,this.options.version||(this.options.version="1.0"),Z=A.stringify||{})g.call(Z,x)&&(this[x]=Z[x])}return r.prototype.name=function(A){return this.options.noValidation?A:this.assertLegalName(""+A||"")},r.prototype.text=function(A){return this.options.noValidation?A:this.assertLegalChar(this.textEscape(""+A||""))},r.prototype.cdata=function(A){return this.options.noValidation?A:(A=(A=""+A||"").replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(A))},r.prototype.comment=function(A){if(this.options.noValidation)return A;if((A=""+A||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+A);return this.assertLegalChar(A)},r.prototype.raw=function(A){return this.options.noValidation?A:""+A||""},r.prototype.attValue=function(A){return this.options.noValidation?A:this.assertLegalChar(this.attEscape(A=""+A||""))},r.prototype.insTarget=function(A){return this.options.noValidation?A:this.assertLegalChar(""+A||"")},r.prototype.insValue=function(A){if(this.options.noValidation)return A;if((A=""+A||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+A);return this.assertLegalChar(A)},r.prototype.xmlVersion=function(A){if(this.options.noValidation)return A;if(!(A=""+A||"").match(/1\.[0-9]+/))throw new Error("Invalid version number: "+A);return A},r.prototype.xmlEncoding=function(A){if(this.options.noValidation)return A;if(!(A=""+A||"").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+A);return this.assertLegalChar(A)},r.prototype.xmlStandalone=function(A){return this.options.noValidation?A:A?"yes":"no"},r.prototype.dtdPubID=function(A){return this.options.noValidation?A:this.assertLegalChar(""+A||"")},r.prototype.dtdSysID=function(A){return this.options.noValidation?A:this.assertLegalChar(""+A||"")},r.prototype.dtdElementValue=function(A){return this.options.noValidation?A:this.assertLegalChar(""+A||"")},r.prototype.dtdAttType=function(A){return this.options.noValidation?A:this.assertLegalChar(""+A||"")},r.prototype.dtdAttDefault=function(A){return this.options.noValidation?A:this.assertLegalChar(""+A||"")},r.prototype.dtdEntityValue=function(A){return this.options.noValidation?A:this.assertLegalChar(""+A||"")},r.prototype.dtdNData=function(A){return this.options.noValidation?A:this.assertLegalChar(""+A||"")},r.prototype.convertAttKey="@",r.prototype.convertPIKey="?",r.prototype.convertTextKey="#text",r.prototype.convertCDataKey="#cdata",r.prototype.convertCommentKey="#comment",r.prototype.convertRawKey="#raw",r.prototype.assertLegalChar=function(A){var Z;if(this.options.noValidation)return A;if("1.0"===this.options.version){if(Z=A.match(/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+A+" at index "+Z.index)}else if("1.1"===this.options.version&&(Z=A.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/)))throw new Error("Invalid character in string: "+A+" at index "+Z.index);return A},r.prototype.assertLegalName=function(A){if(this.options.noValidation)return A;if(this.assertLegalChar(A),!A.match(/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/))throw new Error("Invalid character in name");return A},r.prototype.textEscape=function(A){return this.options.noValidation?A:A.replace(this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")},r.prototype.attEscape=function(A){return this.options.noValidation?A:A.replace(this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")},r}()}).call(this)},80504:function(K,Y,d){(function(){var g,r,Z={}.hasOwnProperty;g=d(42870),r=d(26068),K.exports=function(l){function h(R,y){if(h.__super__.constructor.call(this,R),null==y)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=g.Text,this.value=this.stringify.text(y)}return function(l,h){for(var R in h)Z.call(h,R)&&(l[R]=h[R]);function y(){this.constructor=l}y.prototype=h.prototype,l.prototype=new y,l.__super__=h.prototype}(h,l),Object.defineProperty(h.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(h.prototype,"wholeText",{get:function(){var R,y,N;for(N="",y=this.previousSibling;y;)N=y.data+N,y=y.previousSibling;for(N+=this.data,R=this.nextSibling;R;)N+=R.data,R=R.nextSibling;return N}}),h.prototype.clone=function(){return Object.create(this)},h.prototype.toString=function(R){return this.options.writer.text(this,this.options.writer.filterOptions(R))},h.prototype.splitText=function(R){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.replaceWholeText=function(R){throw new Error("This DOM method is not implemented."+this.debugInfo())},h}(r)}).call(this)},56425:function(K,Y,d){(function(){var g,r,B,S={}.hasOwnProperty;B=d(63146).assign,g=d(42870),d(29413),d(67905),d(19832),d(73940),d(17770),d(99166),d(80504),d(12726),d(71616),d(70438),d(33020),d(80015),d(46600),r=d(47159),K.exports=function(){function U(m){var p,u,E;for(p in m||(m={}),this.options=m,u=m.writer||{})S.call(u,p)&&(E=u[p],this["_"+p]=this[p],this[p]=E)}return U.prototype.filterOptions=function(m){var p,u,E,e,f,$,M,q;return m||(m={}),m=B({},this.options,m),(p={writer:this}).pretty=m.pretty||!1,p.allowEmpty=m.allowEmpty||!1,p.indent=null!=(u=m.indent)?u:" ",p.newline=null!=(E=m.newline)?E:"\n",p.offset=null!=(e=m.offset)?e:0,p.dontPrettyTextNodes=null!=(f=null!=($=m.dontPrettyTextNodes)?$:m.dontprettytextnodes)?f:0,p.spaceBeforeSlash=null!=(M=null!=(q=m.spaceBeforeSlash)?q:m.spacebeforeslash)?M:"",!0===p.spaceBeforeSlash&&(p.spaceBeforeSlash=" "),p.suppressPrettyCount=0,p.user={},p.state=r.None,p},U.prototype.indent=function(m,p,u){var E;return!p.pretty||p.suppressPrettyCount?"":p.pretty&&(E=(u||0)+p.offset+1)>0?new Array(E).join(p.indent):""},U.prototype.endline=function(m,p,u){return!p.pretty||p.suppressPrettyCount?"":p.newline},U.prototype.attribute=function(m,p,u){var E;return this.openAttribute(m,p,u),E=" "+m.name+'="'+m.value+'"',this.closeAttribute(m,p,u),E},U.prototype.cdata=function(m,p,u){var E;return this.openNode(m,p,u),p.state=r.OpenTag,E=this.indent(m,p,u)+"<![CDATA[",p.state=r.InsideTag,E+=m.value,p.state=r.CloseTag,E+="]]>"+this.endline(m,p,u),p.state=r.None,this.closeNode(m,p,u),E},U.prototype.comment=function(m,p,u){var E;return this.openNode(m,p,u),p.state=r.OpenTag,E=this.indent(m,p,u)+"\x3c!-- ",p.state=r.InsideTag,E+=m.value,p.state=r.CloseTag,E+=" --\x3e"+this.endline(m,p,u),p.state=r.None,this.closeNode(m,p,u),E},U.prototype.declaration=function(m,p,u){var E;return this.openNode(m,p,u),p.state=r.OpenTag,E=this.indent(m,p,u)+"<?xml",p.state=r.InsideTag,E+=' version="'+m.version+'"',null!=m.encoding&&(E+=' encoding="'+m.encoding+'"'),null!=m.standalone&&(E+=' standalone="'+m.standalone+'"'),p.state=r.CloseTag,E+=p.spaceBeforeSlash+"?>",E+=this.endline(m,p,u),p.state=r.None,this.closeNode(m,p,u),E},U.prototype.docType=function(m,p,u){var e,f,$,M;if(u||(u=0),this.openNode(m,p,u),p.state=r.OpenTag,$=this.indent(m,p,u),$+="<!DOCTYPE "+m.root().name,m.pubID&&m.sysID?$+=' PUBLIC "'+m.pubID+'" "'+m.sysID+'"':m.sysID&&($+=' SYSTEM "'+m.sysID+'"'),m.children.length>0){for($+=" [",$+=this.endline(m,p,u),p.state=r.InsideTag,e=0,f=(M=m.children).length;e<f;e++)$+=this.writeChildNode(M[e],p,u+1);p.state=r.CloseTag,$+="]"}return p.state=r.CloseTag,$+=p.spaceBeforeSlash+">",$+=this.endline(m,p,u),p.state=r.None,this.closeNode(m,p,u),$},U.prototype.element=function(m,p,u){var e,f,$,M,q,z,V,le,de,ne,pe,ue,he;for(le in u||(u=0),de=!1,ne="",this.openNode(m,p,u),p.state=r.OpenTag,ne+=this.indent(m,p,u)+"<"+m.name,pe=m.attribs)S.call(pe,le)&&(ne+=this.attribute(pe[le],p,u));if($=0===(f=m.children.length)?null:m.children[0],0===f||m.children.every(function(fe){return(fe.type===g.Text||fe.type===g.Raw)&&""===fe.value}))p.allowEmpty?(ne+=">",p.state=r.CloseTag,ne+="</"+m.name+">"+this.endline(m,p,u)):(p.state=r.CloseTag,ne+=p.spaceBeforeSlash+"/>"+this.endline(m,p,u));else if(!p.pretty||1!==f||$.type!==g.Text&&$.type!==g.Raw||null==$.value){if(p.dontPrettyTextNodes)for(M=0,z=(ue=m.children).length;M<z;M++)if(((e=ue[M]).type===g.Text||e.type===g.Raw)&&null!=e.value){p.suppressPrettyCount++,de=!0;break}for(ne+=">"+this.endline(m,p,u),p.state=r.InsideTag,q=0,V=(he=m.children).length;q<V;q++)ne+=this.writeChildNode(e=he[q],p,u+1);p.state=r.CloseTag,ne+=this.indent(m,p,u)+"</"+m.name+">",de&&p.suppressPrettyCount--,ne+=this.endline(m,p,u),p.state=r.None}else ne+=">",p.state=r.InsideTag,p.suppressPrettyCount++,de=!0,ne+=this.writeChildNode($,p,u+1),p.suppressPrettyCount--,de=!1,p.state=r.CloseTag,ne+="</"+m.name+">"+this.endline(m,p,u);return this.closeNode(m,p,u),ne},U.prototype.writeChildNode=function(m,p,u){switch(m.type){case g.CData:return this.cdata(m,p,u);case g.Comment:return this.comment(m,p,u);case g.Element:return this.element(m,p,u);case g.Raw:return this.raw(m,p,u);case g.Text:return this.text(m,p,u);case g.ProcessingInstruction:return this.processingInstruction(m,p,u);case g.Dummy:return"";case g.Declaration:return this.declaration(m,p,u);case g.DocType:return this.docType(m,p,u);case g.AttributeDeclaration:return this.dtdAttList(m,p,u);case g.ElementDeclaration:return this.dtdElement(m,p,u);case g.EntityDeclaration:return this.dtdEntity(m,p,u);case g.NotationDeclaration:return this.dtdNotation(m,p,u);default:throw new Error("Unknown XML node type: "+m.constructor.name)}},U.prototype.processingInstruction=function(m,p,u){var E;return this.openNode(m,p,u),p.state=r.OpenTag,E=this.indent(m,p,u)+"<?",p.state=r.InsideTag,E+=m.target,m.value&&(E+=" "+m.value),p.state=r.CloseTag,E+=p.spaceBeforeSlash+"?>",E+=this.endline(m,p,u),p.state=r.None,this.closeNode(m,p,u),E},U.prototype.raw=function(m,p,u){var E;return this.openNode(m,p,u),p.state=r.OpenTag,E=this.indent(m,p,u),p.state=r.InsideTag,E+=m.value,p.state=r.CloseTag,E+=this.endline(m,p,u),p.state=r.None,this.closeNode(m,p,u),E},U.prototype.text=function(m,p,u){var E;return this.openNode(m,p,u),p.state=r.OpenTag,E=this.indent(m,p,u),p.state=r.InsideTag,E+=m.value,p.state=r.CloseTag,E+=this.endline(m,p,u),p.state=r.None,this.closeNode(m,p,u),E},U.prototype.dtdAttList=function(m,p,u){var E;return this.openNode(m,p,u),p.state=r.OpenTag,E=this.indent(m,p,u)+"<!ATTLIST",p.state=r.InsideTag,E+=" "+m.elementName+" "+m.attributeName+" "+m.attributeType,"#DEFAULT"!==m.defaultValueType&&(E+=" "+m.defaultValueType),m.defaultValue&&(E+=' "'+m.defaultValue+'"'),p.state=r.CloseTag,E+=p.spaceBeforeSlash+">"+this.endline(m,p,u),p.state=r.None,this.closeNode(m,p,u),E},U.prototype.dtdElement=function(m,p,u){var E;return this.openNode(m,p,u),p.state=r.OpenTag,E=this.indent(m,p,u)+"<!ELEMENT",p.state=r.InsideTag,E+=" "+m.name+" "+m.value,p.state=r.CloseTag,E+=p.spaceBeforeSlash+">"+this.endline(m,p,u),p.state=r.None,this.closeNode(m,p,u),E},U.prototype.dtdEntity=function(m,p,u){var E;return this.openNode(m,p,u),p.state=r.OpenTag,E=this.indent(m,p,u)+"<!ENTITY",p.state=r.InsideTag,m.pe&&(E+=" %"),E+=" "+m.name,m.value?E+=' "'+m.value+'"':(m.pubID&&m.sysID?E+=' PUBLIC "'+m.pubID+'" "'+m.sysID+'"':m.sysID&&(E+=' SYSTEM "'+m.sysID+'"'),m.nData&&(E+=" NDATA "+m.nData)),p.state=r.CloseTag,E+=p.spaceBeforeSlash+">"+this.endline(m,p,u),p.state=r.None,this.closeNode(m,p,u),E},U.prototype.dtdNotation=function(m,p,u){var E;return this.openNode(m,p,u),p.state=r.OpenTag,E=this.indent(m,p,u)+"<!NOTATION",p.state=r.InsideTag,E+=" "+m.name,m.pubID&&m.sysID?E+=' PUBLIC "'+m.pubID+'" "'+m.sysID+'"':m.pubID?E+=' PUBLIC "'+m.pubID+'"':m.sysID&&(E+=' SYSTEM "'+m.sysID+'"'),p.state=r.CloseTag,E+=p.spaceBeforeSlash+">"+this.endline(m,p,u),p.state=r.None,this.closeNode(m,p,u),E},U.prototype.openNode=function(m,p,u){},U.prototype.closeNode=function(m,p,u){},U.prototype.openAttribute=function(m,p,u){},U.prototype.closeAttribute=function(m,p,u){},U}()}).call(this)},71741:function(K,Y,d){(function(){var g,r,A,x,Z,l,h,R,y,N;N=d(63146),R=N.assign,y=N.isFunction,A=d(57951),x=d(32008),Z=d(25795),h=d(28337),l=d(50864),g=d(42870),r=d(47159),K.exports.create=function(v,k,P,L){var I,G;if(null==v)throw new Error("Root element needs a name.");return L=R({},k,P,L),G=(I=new x(L)).element(v),L.headless||(I.declaration(L),(null!=L.pubID||null!=L.sysID)&&I.dtd(L)),G},K.exports.begin=function(v,k,P){var L;return y(v)&&(k=(L=[v,k])[0],P=L[1],v={}),k?new Z(v,k,P):new x(v)},K.exports.stringWriter=function(v){return new h(v)},K.exports.streamWriter=function(v,k){return new l(v,k)},K.exports.implementation=new A,K.exports.nodeType=g,K.exports.writerState=r}).call(this)},59889:(K,Y,d)=>{"use strict";d.r(Y),d.d(Y,{RgwModule:()=>wn,RoutedRgwModule:()=>Mc});var g=d(88692),r=d(20092),A=d(54247),x=d(51389),Z=d(37496),l=d(79512),h=d(4268),R=d(44466),y=d(66265),N=d(23815),v=d.n(N),k=d(35758),P=d(49277),L=d(95152),I=d(33394),G=d(64762),B=d(35732),S=d(25917),U=d(19773),m=d(96736),p=d(5304),u=d(20523),E=d(93523),e=d(64537);let f=class{constructor(i,t){this.http=i,this.rgwDaemonService=t,this.url="api/rgw/user"}list(){return this.enumerate().pipe((0,U.zg)(i=>i.length>0?(0,k.D)(i.map(t=>this.get(t))):(0,S.of)([])))}enumerate(){return this.rgwDaemonService.request(i=>this.http.get(this.url,{params:i}))}enumerateEmail(){return this.rgwDaemonService.request(i=>this.http.get(`${this.url}/get_emails`,{params:i}))}get(i){return this.rgwDaemonService.request(t=>this.http.get(`${this.url}/${i}`,{params:t}))}getQuota(i){return this.rgwDaemonService.request(t=>this.http.get(`${this.url}/${i}/quota`,{params:t}))}create(i){return this.rgwDaemonService.request(t=>(v().keys(i).forEach(o=>{t=t.append(o,i[o])}),this.http.post(this.url,null,{params:t})))}update(i,t){return this.rgwDaemonService.request(o=>(v().keys(t).forEach(c=>{o=o.append(c,t[c])}),this.http.put(`${this.url}/${i}`,null,{params:o})))}updateQuota(i,t){return this.rgwDaemonService.request(o=>(v().keys(t).forEach(c=>{o=o.append(c,t[c])}),this.http.put(`${this.url}/${i}/quota`,null,{params:o})))}delete(i){return this.rgwDaemonService.request(t=>this.http.delete(`${this.url}/${i}`,{params:t}))}createSubuser(i,t){return this.rgwDaemonService.request(o=>(v().keys(t).forEach(c=>{o=o.append(c,t[c])}),this.http.post(`${this.url}/${i}/subuser`,null,{params:o})))}deleteSubuser(i,t){return this.rgwDaemonService.request(o=>this.http.delete(`${this.url}/${i}/subuser/${t}`,{params:o}))}addCapability(i,t,o){return this.rgwDaemonService.request(c=>(c=(c=c.append("type",t)).append("perm",o),this.http.post(`${this.url}/${i}/capability`,null,{params:c})))}deleteCapability(i,t,o){return this.rgwDaemonService.request(c=>(c=(c=c.append("type",t)).append("perm",o),this.http.delete(`${this.url}/${i}/capability`,{params:c})))}addS3Key(i,t){return this.rgwDaemonService.request(o=>(o=o.append("key_type","s3"),v().keys(t).forEach(c=>{o=o.append(c,t[c])}),this.http.post(`${this.url}/${i}/key`,null,{params:o})))}deleteS3Key(i,t){return this.rgwDaemonService.request(o=>(o=(o=o.append("key_type","s3")).append("access_key",t),this.http.delete(`${this.url}/${i}/key`,{params:o})))}exists(i){return this.get(i).pipe((0,m.h)(!0),(0,p.K)(t=>(v().isFunction(t.preventDefault)&&t.preventDefault(),(0,S.of)(!1))))}emailExists(i){return i=decodeURIComponent(i),this.enumerateEmail().pipe((0,U.zg)(t=>{const o=v().indexOf(t,i);return(0,S.of)(-1!==o)}))}};f.\u0275fac=function(i){return new(i||f)(e.LFG(B.eN),e.LFG(u.b))},f.\u0275prov=e.Yz7({token:f,factory:f.\u0275fac,providedIn:"root"}),f=(0,G.gn)([E.o,(0,G.w6)("design:paramtypes",[B.eN,u.b])],f);var $=d(65862),M=d(18001),q=d(93614),z=d(90070),V=d(97161);class le{constructor(){this.kmsProviders=["vault"],this.authMethods=["token","agent"],this.secretEngines=["kv","transit"],this.sse_s3="AES256",this.sse_kms="aws:kms"}}var de=(()=>{return(n=de||(de={})).ENABLED="Enabled",n.DISABLED="Disabled",de;var n})(),ne=(()=>{return(n=ne||(ne={})).Read="Read",n.Write="Write",n.All="Read and write",n.FullControl="Full control",ne;var n})(),pe=(()=>{return(n=pe||(pe={})).Owner="Owner",n.Everyone="Everyone",n.AuthenticatedUsers="Authenticated Users",pe;var n})(),ue=(()=>{return(n=ue||(ue={})).ENABLED="Enabled",n.SUSPENDED="Suspended",ue;var n})(),he=d(62862),fe=d(18372),Ie=d(60312),we=d(30839),Oe=d(87925),Ae=d(94276),We=d(56310),C=d(41582);function a(n,i){1&n&&(e.TgZ(0,"option",29),e.SDv(1,30),e.qZA()),2&n&&e.Q6J("ngValue",null)}function w(n,i){if(1&n&&(e.TgZ(0,"option",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t)}}function W(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,33),e.qZA())}function ie(n,i){if(1&n&&(e.TgZ(0,"div")(1,"div",7)(2,"label",22),e.SDv(3,23),e.qZA(),e.TgZ(4,"div",24)(5,"select",25),e.YNc(6,a,2,1,"option",26),e.YNc(7,w,2,2,"option",27),e.qZA(),e.YNc(8,W,2,0,"span",28),e.qZA()()()),2&n){const t=e.oxw(),o=e.MAs(5);e.xp6(6),e.Q6J("ngIf",null!==t.kmsProviders),e.xp6(1),e.Q6J("ngForOf",t.kmsProviders),e.xp6(1),e.Q6J("ngIf",t.configForm.showError("kms_provider",o,"required"))}}function ae(n,i){if(1&n&&(e.TgZ(0,"option",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t)}}function b(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,37),e.qZA())}function D(n,i){if(1&n&&(e.TgZ(0,"div")(1,"div",7)(2,"label",34),e.SDv(3,35),e.qZA(),e.TgZ(4,"div",24)(5,"select",36),e.YNc(6,ae,2,2,"option",27),e.qZA(),e.YNc(7,b,2,0,"span",28),e.qZA()()()),2&n){const t=e.oxw(),o=e.MAs(5);e.xp6(6),e.Q6J("ngForOf",t.authMethods),e.xp6(1),e.Q6J("ngIf",t.configForm.showError("auth_method",o,"required"))}}function T(n,i){if(1&n&&(e.TgZ(0,"option",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t)}}function _(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,41),e.qZA())}function s(n,i){if(1&n&&(e.TgZ(0,"div")(1,"div",7)(2,"label",38),e.SDv(3,39),e.qZA(),e.TgZ(4,"div",24)(5,"select",40),e.YNc(6,T,2,2,"option",27),e.qZA(),e.YNc(7,_,2,0,"span",28),e.qZA()()()),2&n){const t=e.oxw(),o=e.MAs(5);e.xp6(6),e.Q6J("ngForOf",t.secretEngines),e.xp6(1),e.Q6J("ngIf",t.configForm.showError("secret_engine",o,"required"))}}function F(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,45),e.qZA())}function X(n,i){if(1&n&&(e.TgZ(0,"div")(1,"div",7)(2,"label",42),e.SDv(3,43),e.qZA(),e.TgZ(4,"div",24),e._UZ(5,"input",44),e.YNc(6,F,2,0,"span",28),e.qZA()()()),2&n){const t=e.oxw(),o=e.MAs(5);e.xp6(6),e.Q6J("ngIf",t.configForm.showError("secret_path",o,"required"))}}function ee(n,i){1&n&&(e.TgZ(0,"div")(1,"div",7)(2,"label",46),e.SDv(3,47),e.qZA(),e.TgZ(4,"div",24),e._UZ(5,"input",48),e.qZA()()())}function te(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,52),e.qZA())}function ge(n,i){if(1&n&&(e.TgZ(0,"div")(1,"div",7)(2,"label",49),e.SDv(3,50),e.qZA(),e.TgZ(4,"div",24),e._UZ(5,"input",51),e.YNc(6,te,2,0,"span",28),e.qZA()()()),2&n){const t=e.oxw(),o=e.MAs(5);e.xp6(6),e.Q6J("ngIf",t.configForm.showError("address",o,"required"))}}function Ce(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,57),e.qZA())}function Ne(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",7)(1,"label",53)(2,"span"),e.SDv(3,54),e.qZA(),e.TgZ(4,"cd-helper"),e.SDv(5,55),e.qZA()(),e.TgZ(6,"div",24)(7,"input",56),e.NdJ("change",function(c){e.CHM(t);const O=e.oxw();return e.KtG(O.fileUpload(c.target.files,"token"))}),e.qZA(),e.YNc(8,Ce,2,0,"span",28),e.qZA()()}if(2&n){const t=e.oxw(),o=e.MAs(5);e.xp6(8),e.Q6J("ngIf",t.configForm.showError("token",o,"required"))}}function Ze(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,62),e.qZA())}function be(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"div",7)(2,"label",58)(3,"span"),e.SDv(4,59),e.qZA(),e.TgZ(5,"cd-helper"),e.SDv(6,60),e.qZA()(),e.TgZ(7,"div",24)(8,"input",61),e.NdJ("change",function(c){e.CHM(t);const O=e.oxw();return e.KtG(O.fileUpload(c.target.files,"ssl_cert"))}),e.qZA(),e.YNc(9,Ze,2,0,"span",28),e.qZA()()()}if(2&n){const t=e.oxw(),o=e.MAs(5);e.xp6(9),e.Q6J("ngIf",t.configForm.showError("ssl_cert",o,"required"))}}function ze(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,67),e.qZA())}function qe(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"div",7)(2,"label",63)(3,"span"),e.SDv(4,64),e.qZA(),e.TgZ(5,"cd-helper"),e.SDv(6,65),e.qZA()(),e.TgZ(7,"div",24)(8,"input",66),e.NdJ("change",function(c){e.CHM(t);const O=e.oxw();return e.KtG(O.fileUpload(c.target.files,"client_cert"))}),e.qZA(),e.YNc(9,ze,2,0,"span",28),e.qZA()()()}if(2&n){const t=e.oxw(),o=e.MAs(5);e.xp6(9),e.Q6J("ngIf",t.configForm.showError("client_cert",o,"required"))}}function Be(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,72),e.qZA())}function Ke(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"div",7)(2,"label",68)(3,"span"),e.SDv(4,69),e.qZA(),e.TgZ(5,"cd-helper"),e.SDv(6,70),e.qZA()(),e.TgZ(7,"div",24)(8,"input",71),e.NdJ("change",function(c){e.CHM(t);const O=e.oxw();return e.KtG(O.fileUpload(c.target.files,"client_key"))}),e.qZA(),e.YNc(9,Be,2,0,"span",28),e.qZA()()()}if(2&n){const t=e.oxw(),o=e.MAs(5);e.xp6(9),e.Q6J("ngIf",t.configForm.showError("client_key",o,"required"))}}let $n=(()=>{class n{constructor(t,o,c,O,H,Q,J){this.formBuilder=t,this.activeModal=o,this.router=c,this.actionLabels=O,this.rgwBucketService=H,this.rgwEncryptionModal=Q,this.notificationService=J,this.vaultAddress=/^((https?:\/\/)|(www.))(?:([a-zA-Z]+)|(\d+\.\d+.\d+.\d+)):\d{4}$/,this.submitAction=new e.vpe,this.createForm()}ngOnInit(){this.kmsProviders=this.rgwEncryptionModal.kmsProviders,this.authMethods=this.rgwEncryptionModal.authMethods,this.secretEngines=this.rgwEncryptionModal.secretEngines}createForm(){this.configForm=this.formBuilder.group({address:[null,[r.kI.required,z.h.custom("vaultPattern",t=>!v().isEmpty(t)&&!this.vaultAddress.test(t))]],kms_provider:["vault",r.kI.required],encryptionType:["aws:kms",r.kI.required],auth_method:["token",r.kI.required],secret_engine:["kv",r.kI.required],secret_path:["/"],namespace:[null],token:[null,[z.h.requiredIf({auth_method:"token"})]],ssl_cert:[null,z.h.sslCert()],client_cert:[null,z.h.pemCert()],client_key:[null,z.h.sslPrivKey()],kmsEnabled:[{value:!1}],s3Enabled:[{value:!1}]})}fileUpload(t,o){const c=t[0];(new FileReader).addEventListener("load",()=>{const H=this.configForm.get(o);H.setValue(c),H.markAsDirty(),H.markAsTouched(),H.updateValueAndValidity()})}onSubmit(){const t=this.configForm.value;this.rgwBucketService.setEncryptionConfig(t.encryptionType,t.kms_provider,t.auth_method,t.secret_engine,t.secret_path,t.namespace,t.address,t.token,t.owner,t.ssl_cert,t.client_cert,t.client_key).subscribe({next:()=>{this.notificationService.show(M.k.success,"Updated RGW Encryption Configuration values")},error:o=>{this.notificationService.show(M.k.error,o),this.configForm.setErrors({cdSubmitButton:!0})},complete:()=>{this.activeModal.close(),this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.router.navigate([this.router.url])}})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(he.O),e.Y36(x.Kz),e.Y36(A.F0),e.Y36(l.p4),e.Y36(L.o),e.Y36(le),e.Y36(V.g))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-config-modal"]],outputs:{submitAction:"submitAction"},features:[e._Bn([le])],decls:30,vars:14,consts:function(){let i,t,o,c,O,H,Q,J,j,oe,Te,Me,Fe,Pe,me,Ge,ye,Le,Ee,Ue,$e,xe,De,ve,se,Re,ce,Je;return i="Update RGW Encryption Configurations",t="Encryption Type",o="SSE-S3 Encryption",c="SSE-KMS Encryption",O="Key management service provider",H="-- Select a provider --",Q="This field is required.",J="Authentication Method",j="This field is required.",oe="Secret Engine",Te="This field is required.",Me="Secret Path ",Fe="This field is required.",Pe="Namespace ",me="Vault Address ",Ge="This field is required.",ye="Token",Le=" The token authentication method expects a Vault token to be present in a plaintext file. ",Ee="This field is required.",Ue="CA Certificate",$e="The SSL certificate in PEM format.",xe="This field is required.",De="Client Certificate",ve="The Client certificate in PEM format.",se="This field is required.",Re="Client Private Key",ce="The Client Private Key in PEM format.",Je="This field is required.",[[3,"modalRef"],[1,"modal-title"],i,[1,"modal-content"],["name","configForm",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","encryptionType",1,"cd-col-form-label","required"],t,[1,"col-md-auto","custom-checkbox","form-check-inline","ms-3"],["formControlName","encryptionType","id","s3Enabled","type","radio","name","encryptionType","value","AES256",1,"form-check-input"],["for","s3Enabled",1,"custom-check-label"],o,[1,"col-md-auto","custom-checkbox","form-check-inline"],["formControlName","encryptionType","id","kmsEnabled","name","encryptionType","value","aws:kms","type","radio",1,"form-check-input"],["for","kmsEnabled",1,"custom-check-label"],c,[4,"ngIf"],["class","form-group row",4,"ngIf"],[1,"modal-footer"],[3,"submitText","form","submitActionEvent"],["for","kms_provider",1,"cd-col-form-label","required"],O,[1,"cd-col-form-input"],["id","kms_provider","name","kms_provider","formControlName","kms_provider",1,"form-select"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["class","invalid-feedback",4,"ngIf"],[3,"ngValue"],H,[3,"value"],[1,"invalid-feedback"],Q,["for","auth_method",1,"cd-col-form-label","required"],J,["id","auth_method","name","auth_method","formControlName","auth_method",1,"form-select"],j,["for","secret_engine",1,"cd-col-form-label","required"],oe,["id","secret_engine","name","secret_engine","formControlName","secret_engine",1,"form-select"],Te,["for","secret_path",1,"cd-col-form-label"],Me,["id","secret_path","name","secret_path","type","text","formControlName","secret_path",1,"form-control"],Fe,["for","namespace",1,"cd-col-form-label"],Pe,["id","namespace","name","namespace","type","text","formControlName","namespace",1,"form-control"],["for","address",1,"cd-col-form-label","required"],me,["id","address","name","address","formControlName","address","placeholder","http://127.0.0.1:8000",1,"form-control"],Ge,["for","token",1,"cd-col-form-label","required"],ye,Le,["type","file","formControlName","token",3,"change"],Ee,["for","ssl_cert",1,"cd-col-form-label"],Ue,$e,["type","file","formControlName","ssl_cert",3,"change"],xe,["for","client_cert",1,"cd-col-form-label"],De,ve,["type","file","formControlName","client_cert",3,"change"],se,["for","client_key",1,"cd-col-form-label"],Re,ce,["type","file",3,"change"],Je]},template:function(t,o){1&t&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.BQk(),e.ynx(3,3),e.TgZ(4,"form",4,5)(6,"div",6)(7,"div",7)(8,"label",8),e.SDv(9,9),e.qZA(),e.TgZ(10,"div",10),e._UZ(11,"input",11),e.TgZ(12,"label",12),e.SDv(13,13),e.qZA()(),e.TgZ(14,"div",14),e._UZ(15,"input",15),e.TgZ(16,"label",16),e.SDv(17,17),e.qZA()()(),e.YNc(18,ie,9,3,"div",18),e.YNc(19,D,8,2,"div",18),e.YNc(20,s,8,2,"div",18),e.YNc(21,X,7,1,"div",18),e.YNc(22,ee,6,0,"div",18),e.YNc(23,ge,7,1,"div",18),e.YNc(24,Ne,9,1,"div",19),e.YNc(25,be,10,1,"div",18),e.YNc(26,qe,10,1,"div",18),e.YNc(27,Ke,10,1,"div",18),e.qZA(),e.TgZ(28,"div",20)(29,"cd-form-button-panel",21),e.NdJ("submitActionEvent",function(){return o.onSubmit()}),e.qZA()()(),e.BQk(),e.qZA()),2&t&&(e.Q6J("modalRef",o.activeModal),e.xp6(4),e.Q6J("formGroup",o.configForm),e.xp6(14),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","token"===o.configForm.getValue("auth_method")),e.xp6(1),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(1),e.Q6J("ngIf","aws:kms"===o.configForm.getValue("encryptionType")||"AES256"===o.configForm.getValue("encryptionType")),e.xp6(2),e.Q6J("submitText",o.actionLabels.SUBMIT)("form",o.configForm))},dependencies:[g.sg,g.O5,fe.S,Ie.z,we.p,Oe.o,Ae.b,We.P,C.V,r._Y,r.YN,r.Kr,r.Fj,r.EJ,r._,r.JJ,r.JL,r.sg,r.u]}),n})();function xn(n,i){1&n&&(e.TgZ(0,"span",18),e.SDv(1,19),e.qZA())}function Zn(n,i){1&n&&(e.TgZ(0,"span",18),e.SDv(1,20),e.qZA())}function kn(n,i){1&n&&(e.TgZ(0,"span",18),e.SDv(1,21),e.qZA())}function Bn(n,i){1&n&&(e.TgZ(0,"span",18),e.SDv(1,22),e.qZA())}function zn(n,i){1&n&&(e.TgZ(0,"span",18),e.SDv(1,23),e.qZA())}let qn=(()=>{class n{constructor(t,o,c){this.formBuilder=t,this.activeModal=o,this.actionLabels=c,this.submitAction=new e.vpe,this.editMode=!1,this.createForm()}createForm(){this.form=this.formBuilder.group({key:[null,[r.kI.required,z.h.custom("unique",t=>!(v().isEmpty(t)&&!this.currentKeyTags)&&this.storedKey!==t&&this.currentKeyTags.includes(t)),z.h.custom("maxLength",t=>!v().isEmpty(t)&&t.length>128)]],value:[null,[r.kI.required,z.h.custom("maxLength",t=>!v().isEmpty(t)&&t.length>128)]]})}onSubmit(){this.submitAction.emit(this.form.value),this.activeModal.close()}getMode(){return this.editMode?this.actionLabels.EDIT:this.actionLabels.ADD}fillForm(t){this.form.setValue(t)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(he.O),e.Y36(x.Kz),e.Y36(l.p4))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-bucket-tag-modal"]],outputs:{submitAction:"submitAction"},decls:24,vars:10,consts:function(){let i,t,o,c,O,H,Q,J;return i="" + "\ufffd0\ufffd" + " Tag",t="Key",o="Value",c="This field is required.",O="This key must be unique.",H="Length of the key must be maximum of 128 characters",Q="This field is required.",J="Length of the value must be a maximum of 128 characters",[[3,"modalRef"],[1,"modal-title"],i,[1,"modal-content"],[1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","key",1,"cd-col-form-label","required"],t,[1,"cd-col-form-input"],["type","text","formControlName","key","id","key",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","value",1,"cd-col-form-label","required"],o,["id","value","type","text","formControlName","value",1,"form-control"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],c,O,H,Q,J]},template:function(t,o){if(1&t&&(e.TgZ(0,"cd-modal",0)(1,"span",1),e.SDv(2,2),e.qZA(),e.ynx(3,3),e.TgZ(4,"form",4,5)(6,"div",6)(7,"div",7)(8,"label",8),e.SDv(9,9),e.qZA(),e.TgZ(10,"div",10),e._UZ(11,"input",11),e.YNc(12,xn,2,0,"span",12),e.YNc(13,Zn,2,0,"span",12),e.YNc(14,kn,2,0,"span",12),e.qZA()(),e.TgZ(15,"div",7)(16,"label",13),e.SDv(17,14),e.qZA(),e.TgZ(18,"div",10),e._UZ(19,"input",15),e.YNc(20,Bn,2,0,"span",12),e.YNc(21,zn,2,0,"span",12),e.qZA()()(),e.TgZ(22,"div",16)(23,"cd-form-button-panel",17),e.NdJ("submitActionEvent",function(){return o.onSubmit()}),e.qZA()()(),e.BQk(),e.qZA()),2&t){const c=e.MAs(5);e.Q6J("modalRef",o.activeModal),e.xp6(2),e.pQV(o.getMode()),e.QtT(2),e.xp6(2),e.Q6J("formGroup",o.form),e.xp6(8),e.Q6J("ngIf",o.form.showError("key",c,"required")),e.xp6(1),e.Q6J("ngIf",o.form.showError("key",c,"unique")),e.xp6(1),e.Q6J("ngIf",o.form.showError("key",c,"maxLength")),e.xp6(6),e.Q6J("ngIf",o.form.showError("value",c,"required")),e.xp6(1),e.Q6J("ngIf",o.form.showError("value",c,"maxLength")),e.xp6(2),e.Q6J("form",o.form)("submitText",o.getMode())}},dependencies:[g.O5,Ie.z,we.p,Oe.o,Ae.b,We.P,C.V,r._Y,r.Fj,r.JJ,r.JL,r.sg,r.u]}),n})();var Qe=d(63285),Hn=d(24737),Ve=d(34501);const Xn=["*"];let Kn=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-help-text"]],ngContentSelectors:Xn,decls:2,vars:0,consts:[[1,"form-text","text-muted"]],template:function(t,o){1&t&&(e.F$t(),e.TgZ(0,"div",0),e.Hsn(1),e.qZA())},styles:["legend .text-muted{font-size:small}"]}),n})();var Qn=d(1372),st=d(82945),cn=d(63622),Ye=d(10545);const Yn=["bucketPolicyTextArea"];function Jn(n,i){1&n&&(e.TgZ(0,"div",10)(1,"label",39),e.SDv(2,60),e.qZA(),e.TgZ(3,"div",13),e._UZ(4,"input",61),e.qZA()())}function Vn(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,63),e.qZA())}function jn(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,64),e.qZA())}function eo(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,65),e.qZA())}function to(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,66),e.qZA())}function no(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,67),e.qZA())}function oo(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,68),e.qZA())}function io(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,69),e.qZA())}function _o(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,70),e.qZA())}function ro(n,i){1&n&&(e.TgZ(0,"option",71),e.SDv(1,72),e.qZA()),2&n&&e.Q6J("ngValue",null)}function so(n,i){1&n&&(e.TgZ(0,"option",71),e.SDv(1,73),e.qZA()),2&n&&e.Q6J("ngValue",null)}function ao(n,i){if(1&n&&(e.TgZ(0,"option",74),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t)}}function lo(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,75),e.qZA())}function co(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"fieldset")(1,"legend",22),e.SDv(2,76),e.qZA(),e.TgZ(3,"div",10)(4,"div",77)(5,"div",78)(6,"input",79),e.NdJ("change",function(){e.CHM(t);const c=e.oxw(2);return e.KtG(c.setMfaDeleteValidators())}),e.qZA(),e.TgZ(7,"label",80),e.SDv(8,81),e.qZA(),e.TgZ(9,"cd-helper")(10,"span"),e.SDv(11,82),e.qZA()()()()()()}}function uo(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,91),e.qZA())}function fo(n,i){if(1&n&&(e.TgZ(0,"div",10)(1,"label",88),e.SDv(2,89),e.qZA(),e.TgZ(3,"div",13),e._UZ(4,"input",90),e.YNc(5,uo,2,0,"span",15),e.qZA()()),2&n){e.oxw(2);const t=e.MAs(2),o=e.oxw();e.xp6(5),e.Q6J("ngIf",o.bucketForm.showError("mfa-token-serial",t,"required"))}}function po(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,95),e.qZA())}function go(n,i){if(1&n&&(e.TgZ(0,"div",10)(1,"label",92),e.SDv(2,93),e.qZA(),e.TgZ(3,"div",13),e._UZ(4,"input",94),e.YNc(5,po,2,0,"span",15),e.qZA()()),2&n){e.oxw(2);const t=e.MAs(2),o=e.oxw();e.xp6(5),e.Q6J("ngIf",o.bucketForm.showError("mfa-token-pin",t,"required"))}}function To(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"fieldset")(1,"legend",22),e.SDv(2,83),e.qZA(),e.TgZ(3,"div",10)(4,"div",77)(5,"div",78)(6,"input",84),e.NdJ("change",function(){e.CHM(t);const c=e.oxw(2);return e.KtG(c.setMfaDeleteValidators())}),e.qZA(),e.TgZ(7,"label",85),e.SDv(8,86),e.qZA(),e.TgZ(9,"cd-helper")(10,"span"),e.SDv(11,87),e.qZA()()()()(),e.YNc(12,fo,6,1,"div",9),e.YNc(13,go,6,1,"div",9),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(12),e.Q6J("ngIf",t.areMfaCredentialsRequired()),e.xp6(1),e.Q6J("ngIf",t.areMfaCredentialsRequired())}}function Eo(n,i){1&n&&(e.TgZ(0,"span"),e.SDv(1,110),e.qZA())}function Ro(n,i){1&n&&(e.TgZ(0,"span"),e.SDv(1,111),e.qZA())}function mo(n,i){if(1&n&&(e.TgZ(0,"div",10)(1,"label",103),e.SDv(2,104),e.qZA(),e.TgZ(3,"div",13)(4,"select",105)(5,"option",106),e.SDv(6,107),e.qZA(),e.TgZ(7,"option",108),e.SDv(8,109),e.qZA()(),e.TgZ(9,"cd-help-text"),e.YNc(10,Eo,2,0,"span",21),e.YNc(11,Ro,2,0,"span",21),e.qZA()()()),2&n){const t=e.oxw(3);e.xp6(10),e.Q6J("ngIf","COMPLIANCE"===t.bucketForm.getValue("lock_mode")),e.xp6(1),e.Q6J("ngIf","GOVERNANCE"===t.bucketForm.getValue("lock_mode"))}}function ho(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,116),e.qZA())}function Mo(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,117),e.qZA())}function So(n,i){if(1&n&&(e.TgZ(0,"div",10)(1,"label",112),e.ynx(2),e.SDv(3,113),e.BQk(),e.qZA(),e.TgZ(4,"div",13),e._UZ(5,"input",114),e.TgZ(6,"cd-help-text")(7,"span"),e.SDv(8,115),e.qZA()(),e.YNc(9,ho,2,0,"span",15),e.YNc(10,Mo,2,0,"span",15),e.qZA()()),2&n){e.oxw(2);const t=e.MAs(2),o=e.oxw();e.xp6(9),e.Q6J("ngIf",o.bucketForm.showError("lock_retention_period_days",t,"pattern")),e.xp6(1),e.Q6J("ngIf",o.bucketForm.showError("lock_retention_period_days",t,"lockDays"))}}function Co(n,i){1&n&&(e.TgZ(0,"cd-alert-panel",118),e._uU(1," Bucket Versioning can't be disabled when Object Locking is enabled. "),e.qZA())}function Fo(n,i){1&n&&(e.TgZ(0,"cd-alert-panel",119),e._uU(1," Enabling Object Locking will allow the configuration of GOVERNANCE or COMPLIANCE modes, which will help ensure that an object version cannot be overwritten or deleted for the specified period. "),e.qZA())}function Oo(n,i){if(1&n&&(e.TgZ(0,"fieldset")(1,"legend",22),e.tHW(2,96),e._UZ(3,"cd-help-text"),e.N_p(),e.qZA(),e.TgZ(4,"div",10)(5,"label",97),e.SDv(6,98),e.qZA(),e.TgZ(7,"div",13),e._UZ(8,"input",99),e.TgZ(9,"cd-help-text")(10,"span"),e.SDv(11,100),e.qZA()()()(),e.YNc(12,mo,12,2,"div",9),e.YNc(13,So,11,2,"div",9),e.TgZ(14,"div",10),e._UZ(15,"div",49),e.TgZ(16,"div",13),e.YNc(17,Co,2,0,"cd-alert-panel",101),e.YNc(18,Fo,2,0,"cd-alert-panel",102),e.qZA()()()),2&n){const t=e.oxw(2);e.xp6(12),e.Q6J("ngIf",t.bucketForm.getValue("lock_enabled")),e.xp6(1),e.Q6J("ngIf",t.bucketForm.getValue("lock_enabled")),e.xp6(4),e.Q6J("ngIf",t.bucketForm.getValue("lock_enabled")),e.xp6(1),e.Q6J("ngIf",t.bucketForm.getValue("lock_enabled"))}}function No(n,i){1&n&&(e.TgZ(0,"option",71),e.SDv(1,130),e.qZA()),2&n&&e.Q6J("ngValue",null)}function Po(n,i){if(1&n&&(e.TgZ(0,"option",74),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t)}}function Ao(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,131),e.qZA())}function bo(n,i){if(1&n&&(e.TgZ(0,"div")(1,"div",10)(2,"label",127),e.SDv(3,128),e.qZA(),e.TgZ(4,"div",13)(5,"select",129),e.YNc(6,No,2,1,"option",19),e.YNc(7,Po,2,2,"option",20),e.qZA(),e.YNc(8,Ao,2,0,"span",15),e.qZA()()()),2&n){e.oxw(2);const t=e.MAs(2),o=e.oxw();e.xp6(5),e.Q6J("autofocus",o.editing),e.xp6(1),e.Q6J("ngIf",null!==o.kmsProviders),e.xp6(1),e.Q6J("ngForOf",o.kmsProviders),e.xp6(1),e.Q6J("ngIf",o.bucketForm.showError("kms_provider",t,"required"))}}function Io(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,135),e.qZA())}function Go(n,i){if(1&n&&(e.TgZ(0,"div")(1,"div",10)(2,"label",132),e.SDv(3,133),e.qZA(),e.TgZ(4,"div",13),e._UZ(5,"input",134),e.YNc(6,Io,2,0,"span",15),e.qZA()()()),2&n){e.oxw(2);const t=e.MAs(2),o=e.oxw();e.xp6(6),e.Q6J("ngIf",o.bucketForm.showError("keyId",t,"required"))}}function yo(n,i){if(1&n&&(e.TgZ(0,"div")(1,"div",10)(2,"div",77)(3,"div",120),e._UZ(4,"input",121),e.TgZ(5,"label",122),e.SDv(6,123),e.qZA()()()(),e.TgZ(7,"div",10)(8,"div",77)(9,"div",120),e._UZ(10,"input",124),e.TgZ(11,"label",125),e.SDv(12,126),e.qZA()()()(),e.YNc(13,bo,9,4,"div",21),e.YNc(14,Go,7,1,"div",21),e.qZA()),2&n){const t=e.oxw(2);e.xp6(4),e.uIk("disabled",!t.s3VaultConfig||null),e.xp6(6),e.uIk("disabled",!t.kmsVaultConfig||null),e.xp6(3),e.Q6J("ngIf","aws:kms"===t.bucketForm.getValue("encryption_type")),e.xp6(1),e.Q6J("ngIf","aws:kms"===t.bucketForm.getValue("encryption_type"))}}function Lo(n,i){1&n&&e.GkF(0)}const Do=function(n,i){return{index:n,tag:i}};function vo(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,Lo,1,0,"ng-container",136),e.qZA()),2&n){const t=i.$implicit,o=i.index;e.oxw(2);const c=e.MAs(2);e.xp6(1),e.Q6J("ngTemplateOutlet",c)("ngTemplateOutletContext",e.WLB(2,Do,o,t))}}function wo(n,i){1&n&&(e.TgZ(0,"strong",137),e.SDv(1,138),e.qZA())}function Wo(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,139),e.qZA())}function Uo(n,i){if(1&n&&(e.TgZ(0,"option",74),e.SDv(1,140),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.pQV(t),e.QtT(1)}}function $o(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,141),e.qZA())}function xo(n,i){if(1&n&&(e.TgZ(0,"option",74),e.SDv(1,142),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.pQV(t),e.QtT(1)}}function Zo(n,i){1&n&&(e.TgZ(0,"span",62),e.SDv(1,143),e.qZA())}function ko(n,i){1&n&&(e.TgZ(0,"option",71),e.SDv(1,148),e.qZA()),2&n&&e.Q6J("ngValue",null)}function Bo(n,i){1&n&&(e.TgZ(0,"option",71),e.SDv(1,149),e.qZA()),2&n&&e.Q6J("ngValue",null)}function zo(n,i){if(1&n&&(e.TgZ(0,"option",74),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t.name),e.xp6(1),e.Oqu(t.description)}}function qo(n,i){if(1&n&&(e.TgZ(0,"cd-form-advanced-fieldset")(1,"div",10)(2,"label",144),e.SDv(3,145),e.qZA(),e.TgZ(4,"div",13)(5,"select",146),e.YNc(6,ko,2,1,"option",19),e.YNc(7,Bo,2,1,"option",19),e.YNc(8,zo,2,2,"option",20),e.qZA(),e.TgZ(9,"cd-help-text")(10,"span"),e.SDv(11,147),e.qZA()()()()()),2&n){const t=e.oxw(2);e.xp6(6),e.Q6J("ngIf",null===t.placementTargets),e.xp6(1),e.Q6J("ngIf",null!==t.placementTargets),e.xp6(1),e.Q6J("ngForOf",t.placementTargets)}}const Ho=function(n){return{required:n}},je=function(n){return[n]};function Xo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",2)(1,"form",3,4)(3,"div",5)(4,"div",6),e.SDv(5,7),e.ALo(6,"titlecase"),e.ALo(7,"upperFirst"),e.qZA(),e.TgZ(8,"div",8),e.YNc(9,Jn,5,0,"div",9),e.TgZ(10,"div",10)(11,"label",11),e.SDv(12,12),e.qZA(),e.TgZ(13,"div",13),e._UZ(14,"input",14),e.YNc(15,Vn,2,0,"span",15),e.YNc(16,jn,2,0,"span",15),e.YNc(17,eo,2,0,"span",15),e.YNc(18,to,2,0,"span",15),e.YNc(19,no,2,0,"span",15),e.YNc(20,oo,2,0,"span",15),e.YNc(21,io,2,0,"span",15),e.YNc(22,_o,2,0,"span",15),e.qZA()(),e.TgZ(23,"div",10)(24,"label",16),e.SDv(25,17),e.qZA(),e.TgZ(26,"div",13)(27,"select",18),e.YNc(28,ro,2,1,"option",19),e.YNc(29,so,2,1,"option",19),e.YNc(30,ao,2,2,"option",20),e.qZA(),e.YNc(31,lo,2,0,"span",15),e.qZA()(),e.YNc(32,co,12,0,"fieldset",21),e.YNc(33,To,14,2,"fieldset",21),e.YNc(34,Oo,19,4,"fieldset",21),e.TgZ(35,"fieldset")(36,"legend",22),e.SDv(37,23),e.qZA(),e.TgZ(38,"div",10)(39,"label",24),e.SDv(40,25),e.qZA(),e.TgZ(41,"div",13),e._UZ(42,"input",26),e.TgZ(43,"cd-help-text",27)(44,"span"),e.tHW(45,28),e.TgZ(46,"a",29),e.NdJ("click",function(){e.CHM(t);const c=e.oxw();return e.KtG(c.openConfigModal())}),e.qZA(),e.N_p(),e.qZA()()()(),e.YNc(47,yo,15,4,"div",21),e.qZA(),e.TgZ(48,"fieldset")(49,"legend",22),e.tHW(50,30),e._UZ(51,"cd-help-text"),e.N_p(),e.qZA(),e.YNc(52,vo,2,5,"span",31),e.TgZ(53,"div",32)(54,"div",33),e.YNc(55,wo,2,0,"strong",34),e.TgZ(56,"button",35),e.NdJ("click",function(){e.CHM(t);const c=e.oxw();return e.KtG(c.showTagModal())}),e._UZ(57,"i",36),e.ynx(58),e.SDv(59,37),e.BQk(),e.qZA()()()(),e.TgZ(60,"fieldset")(61,"legend",22),e.SDv(62,38),e.qZA(),e.TgZ(63,"div",32)(64,"div",33)(65,"div",10)(66,"label",39),e.SDv(67,40),e.qZA(),e.TgZ(68,"div",13)(69,"textarea",41,42),e.NdJ("change",function(){e.CHM(t);const c=e.oxw();return e.KtG(c.bucketPolicyOnChange())}),e._uU(71," "),e.qZA(),e.YNc(72,Wo,2,0,"span",15),e.TgZ(73,"button",43),e.NdJ("click",function(){e.CHM(t);const c=e.oxw();return e.KtG(c.clearBucketPolicy())}),e.tHW(74,44),e._UZ(75,"i",36),e.N_p(),e.qZA(),e.TgZ(76,"div",45)(77,"button",46),e.NdJ("click",function(){e.CHM(t);const c=e.oxw();return e.KtG(c.openUrl("https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html?icmpid=docs_amazons3_console"))}),e.tHW(78,47),e._UZ(79,"i",36),e.N_p(),e.qZA(),e.TgZ(80,"button",46),e.NdJ("click",function(){e.CHM(t);const c=e.oxw();return e.KtG(c.openUrl("https://awspolicygen.s3.amazonaws.com/policygen.html"))}),e.tHW(81,48),e._UZ(82,"i",36),e.N_p(),e.qZA()()()(),e.TgZ(83,"div",10)(84,"label",49),e.tHW(85,50),e._UZ(86,"cd-helper"),e.N_p(),e.qZA(),e.TgZ(87,"div",13)(88,"div",51)(89,"span",52),e.tHW(90,53),e._UZ(91,"cd-helper"),e.N_p(),e.qZA(),e.TgZ(92,"select",54),e.NdJ("change",function(){e.CHM(t);const c=e.oxw();return e.KtG(c.onSelectionFilter())}),e.YNc(93,Uo,2,2,"option",20),e.qZA(),e.YNc(94,$o,2,0,"span",15),e.TgZ(95,"span",55),e.tHW(96,56),e._UZ(97,"cd-helper"),e.N_p(),e.qZA(),e.TgZ(98,"select",57),e.YNc(99,xo,2,2,"option",20),e.qZA(),e.YNc(100,Zo,2,0,"span",15),e.qZA()()()()()(),e.YNc(101,qo,12,3,"cd-form-advanced-fieldset",21),e.qZA(),e.TgZ(102,"div",58)(103,"cd-form-button-panel",59),e.NdJ("submitActionEvent",function(){e.CHM(t);const c=e.oxw();return e.KtG(c.submit())}),e.ALo(104,"titlecase"),e.ALo(105,"upperFirst"),e.qZA()()()()()}if(2&n){const t=e.MAs(2),o=e.oxw();e.xp6(1),e.Q6J("formGroup",o.bucketForm),e.xp6(6),e.pQV(e.lcZ(6,40,o.action))(e.lcZ(7,42,o.resource)),e.QtT(5),e.xp6(2),e.Q6J("ngIf",o.editing),e.xp6(2),e.Q6J("ngClass",e.VKq(48,Ho,!o.editing)),e.xp6(3),e.Q6J("readonly",o.editing)("autofocus",!o.editing),e.xp6(1),e.Q6J("ngIf",o.bucketForm.showError("bid",t,"required")),e.xp6(1),e.Q6J("ngIf",o.bucketForm.showError("bid",t,"bucketNameInvalid")),e.xp6(1),e.Q6J("ngIf",o.bucketForm.showError("bid",t,"bucketNameNotAllowed")),e.xp6(1),e.Q6J("ngIf",o.bucketForm.showError("bid",t,"containsUpperCase")),e.xp6(1),e.Q6J("ngIf",o.bucketForm.showError("bid",t,"lowerCaseOrNumber")),e.xp6(1),e.Q6J("ngIf",o.bucketForm.showError("bid",t,"ipAddress")),e.xp6(1),e.Q6J("ngIf",o.bucketForm.showError("bid",t,"onlyLowerCaseAndNumbers")),e.xp6(1),e.Q6J("ngIf",o.bucketForm.showError("bid",t,"shouldBeInRange")),e.xp6(5),e.Q6J("autofocus",o.editing),e.xp6(1),e.Q6J("ngIf",null===o.owners),e.xp6(1),e.Q6J("ngIf",null!==o.owners),e.xp6(1),e.Q6J("ngForOf",o.owners),e.xp6(1),e.Q6J("ngIf",o.bucketForm.showError("owner",t,"required")),e.xp6(1),e.Q6J("ngIf",o.editing),e.xp6(1),e.Q6J("ngIf",o.editing),e.xp6(1),e.Q6J("ngIf",!o.editing||o.editing&&o.bucketForm.getValue("lock_enabled")),e.xp6(8),e.uIk("disabled",!o.kmsVaultConfig&&!o.s3VaultConfig||null),e.xp6(5),e.Q6J("ngIf",o.bucketForm.getValue("encryption_enabled")),e.xp6(5),e.Q6J("ngForOf",o.tags),e.xp6(3),e.Q6J("ngIf",o.tags.length>19),e.xp6(1),e.Q6J("disabled",o.tags.length>19),e.xp6(1),e.Q6J("ngClass",e.VKq(50,je,o.icons.add)),e.xp6(15),e.Q6J("ngIf",o.bucketForm.showError("bucket_policy",t,"invalidJson")),e.xp6(3),e.Q6J("ngClass",e.VKq(52,je,o.icons.destroy)),e.xp6(4),e.Q6J("ngClass",e.VKq(54,je,o.icons.externalUrl)),e.xp6(3),e.Q6J("ngClass",e.VKq(56,je,o.icons.externalUrl)),e.xp6(11),e.Q6J("ngForOf",o.grantees),e.xp6(1),e.Q6J("ngIf",o.bucketForm.showError("grantee",t,"required")),e.xp6(5),e.Q6J("ngForOf",o.aclPermissions),e.xp6(1),e.Q6J("ngIf",o.bucketForm.showError("aclPermission",t,"required")),e.xp6(1),e.Q6J("ngIf",!o.editing),e.xp6(2),e.Q6J("form",o.bucketForm)("submitText",e.lcZ(104,44,o.action)+" "+e.lcZ(105,46,o.resource))}}function Ko(n,i){if(1&n&&(e.ynx(0),e._UZ(1,"input",153),e.BQk()),2&n){const t=i.$implicit,o=e.oxw(),c=o.index,O=o.tag;e.xp6(1),e.hYB("id","tag-",t.attribute,"-",c,""),e.Q6J("ngbTooltip",t.attribute)("value",O[t.attribute])}}function Qo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",150),e.YNc(1,Ko,2,4,"ng-container",31),e.TgZ(2,"button",151),e.NdJ("click",function(){const O=e.CHM(t).index,H=e.oxw();return e.KtG(H.showTagModal(O))}),e._UZ(3,"i",36),e.qZA(),e.TgZ(4,"button",152),e.NdJ("click",function(){const O=e.CHM(t).index,H=e.oxw();return e.KtG(H.deleteTag(O))}),e._UZ(5,"i",36),e.qZA()()}if(2&n){const t=i.index,o=e.oxw();e.xp6(1),e.Q6J("ngForOf",o.tagConfig),e.xp6(1),e.MGl("id","tag-edit-",t,""),e.xp6(1),e.Q6J("ngClass",e.VKq(5,je,o.icons.edit)),e.xp6(1),e.MGl("id","tag-delete-",t,""),e.xp6(1),e.Q6J("ngClass",e.VKq(7,je,o.icons.trash))}}let un=(()=>{class n extends q.E{get isVersioningEnabled(){return this.bucketForm.getValue("versioning")}get isMfaDeleteEnabled(){return this.bucketForm.getValue("mfa-delete")}constructor(t,o,c,O,H,Q,J,j,oe,Te,Me,Fe){super(),this.route=t,this.router=o,this.formBuilder=c,this.rgwBucketService=O,this.rgwSiteService=H,this.modalService=Q,this.rgwUserService=J,this.notificationService=j,this.rgwEncryptionModal=oe,this.textAreaJsonFormatterService=Te,this.actionLabels=Me,this.changeDetectorRef=Fe,this.editing=!1,this.owners=null,this.kmsProviders=null,this.placementTargets=[],this.isVersioningAlreadyEnabled=!1,this.isMfaDeleteAlreadyEnabled=!1,this.icons=$.P,this.kmsVaultConfig=!1,this.s3VaultConfig=!1,this.tags=[],this.dirtyTags=!1,this.tagConfig=[{attribute:"key"},{attribute:"value"}],this.grantees=[pe.Owner,pe.Everyone,pe.AuthenticatedUsers],this.aclPermissions=[ne.FullControl],this.editing=this.router.url.startsWith(`/rgw/bucket/${l.MQ.EDIT}`),this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE,this.resource="bucket",this.createForm()}ngAfterViewChecked(){this.changeDetectorRef.detectChanges(),this.bucketPolicyOnChange()}createForm(){const t=this,o=z.h.custom("lockDays",()=>{if(!t.bucketForm||!v().get(t.bucketForm.getRawValue(),"lock_enabled"))return!1;const c=Number(t.bucketForm.getValue("lock_retention_period_days"));return!Number.isInteger(c)||0===c});this.bucketForm=this.formBuilder.group({id:[null],bid:[null,[r.kI.required],this.editing?[]:[z.h.bucketName(),z.h.bucketExistence(!1,this.rgwBucketService)]],owner:[null,[r.kI.required]],kms_provider:["vault"],"placement-target":[null],versioning:[null],"mfa-delete":[null],"mfa-token-serial":[""],"mfa-token-pin":[""],lock_enabled:[{value:!1,disabled:this.editing}],encryption_enabled:[null],encryption_type:[null,[z.h.requiredIf({encryption_enabled:!0})]],keyId:[null,[z.h.requiredIf({encryption_type:"aws:kms",encryption_enabled:!0})]],lock_mode:["COMPLIANCE"],lock_retention_period_days:[10,[z.h.number(!1),o]],bucket_policy:["{}",z.h.json()],grantee:[pe.Owner,[r.kI.required]],aclPermission:[[ne.FullControl],[r.kI.required]]})}ngOnInit(){const t={owners:this.rgwUserService.enumerate()};this.kmsProviders=this.rgwEncryptionModal.kmsProviders,this.rgwBucketService.getEncryptionConfig().subscribe(o=>{this.kmsVaultConfig=o[0],this.s3VaultConfig=o[1],this.kmsVaultConfig&&this.s3VaultConfig?this.bucketForm.get("encryption_type").setValue(""):this.kmsVaultConfig?this.bucketForm.get("encryption_type").setValue("aws:kms"):this.s3VaultConfig?this.bucketForm.get("encryption_type").setValue("AES256"):this.bucketForm.get("encryption_type").setValue("")}),this.editing||(t.getPlacementTargets=this.rgwSiteService.get("placement-targets")),this.route.params.subscribe(o=>{if(o.hasOwnProperty("bid")){const c=decodeURIComponent(o.bid);t.getBid=this.rgwBucketService.get(c)}(0,k.D)(t).subscribe(c=>{if(this.owners=c.owners.sort(),c.getPlacementTargets){const O=c.getPlacementTargets;this.zonegroup=O.zonegroup,v().forEach(O.placement_targets,H=>{H.description=`${H.name} (${"pool"}: ${H.data_pool})`,this.placementTargets.push(H)}),1===this.placementTargets.length&&this.bucketForm.get("placement-target").setValue(this.placementTargets[0].name)}if(c.getBid){const O=c.getBid,H=v().clone(this.bucketForm.getRawValue());let Q=v().pick(O,v().keys(H));if(Q.lock_retention_period_days=this.rgwBucketService.getLockDays(O),Q["placement-target"]=O.placement_rule,Q.versioning=O.versioning===ue.ENABLED,Q["mfa-delete"]=O.mfa_delete===de.ENABLED,Q.encryption_enabled="Enabled"===O.encryption,O.tagset)for(const[J,j]of Object.entries(O.tagset))this.tags.push({key:J,value:j.toString()});Q=v().merge(H,Q),this.editing&&([Q.grantee,Q.aclPermission]=this.aclXmlToFormValues(O.acl,O.owner)),this.bucketForm.setValue(Q),this.editing&&(this.isVersioningAlreadyEnabled=this.isVersioningEnabled,this.isMfaDeleteAlreadyEnabled=this.isMfaDeleteEnabled,this.setMfaDeleteValidators(),Q.lock_enabled&&this.bucketForm.controls.versioning.disable(),Q.bucket_policy&&this.bucketForm.get("bucket_policy").setValue(JSON.stringify(Q.bucket_policy,null,2)),this.filterAclPermissions())}this.loadingReady()})})}goToListView(){this.router.navigate(["/rgw/bucket"])}submit(){if(null==this.bucketForm.getValue("encryption_enabled")&&(this.bucketForm.get("encryption_enabled").setValue(!1),this.bucketForm.get("encryption_type").setValue(null)),this.bucketForm.pristine)return void this.goToListView();const t=this.bucketForm.value,o=this.tagsToXML(this.tags),c=this.getBucketPolicy(),O=this.permissionToCannedAcl();if(this.editing){const H=this.getVersioningStatus(),Q=this.getMfaDeleteStatus();this.rgwBucketService.update(t.bid,t.id,t.owner,H,t.encryption_enabled,t.encryption_type,t.keyId,Q,t["mfa-token-serial"],t["mfa-token-pin"],t.lock_mode,t.lock_retention_period_days,o,c,O).subscribe(()=>{this.notificationService.show(M.k.success,"Updated Object Gateway bucket '\n " + t.bid + "'.\n "),this.goToListView()},()=>{this.bucketForm.setErrors({cdSubmitButton:!0})})}else this.rgwBucketService.create(t.bid,t.owner,this.zonegroup,t["placement-target"],t.lock_enabled,t.lock_mode,t.lock_retention_period_days,t.encryption_enabled,t.encryption_type,t.keyId,o,c,O).subscribe(()=>{this.notificationService.show(M.k.success,"Created Object Gateway bucket '\n " + t.bid + "'\n "),this.goToListView()},()=>{this.bucketForm.setErrors({cdSubmitButton:!0})})}areMfaCredentialsRequired(){return this.isMfaDeleteEnabled!==this.isMfaDeleteAlreadyEnabled||this.isMfaDeleteAlreadyEnabled&&this.isVersioningEnabled!==this.isVersioningAlreadyEnabled}setMfaDeleteValidators(){const t=this.bucketForm.get("mfa-token-serial"),o=this.bucketForm.get("mfa-token-pin");this.areMfaCredentialsRequired()?(t.setValidators(r.kI.required),o.setValidators(r.kI.required)):(t.setValidators(null),o.setValidators(null)),t.updateValueAndValidity(),o.updateValueAndValidity()}getVersioningStatus(){return this.isVersioningEnabled?ue.ENABLED:ue.SUSPENDED}getMfaDeleteStatus(){return this.isMfaDeleteEnabled?de.ENABLED:de.DISABLED}getBucketPolicy(){return this.bucketForm.getValue("bucket_policy")||"{}"}fileUpload(t,o){const c=t[0];(new FileReader).addEventListener("load",()=>{const H=this.bucketForm.get(o);H.setValue(c),H.markAsDirty(),H.markAsTouched(),H.updateValueAndValidity()})}bucketPolicyOnChange(){this.bucketPolicyTextArea&&this.textAreaJsonFormatterService.format(this.bucketPolicyTextArea)}openUrl(t){window.open(t,"_blank")}clearBucketPolicy(){this.bucketForm.get("bucket_policy").setValue("{}"),this.bucketForm.markAsDirty(),this.bucketForm.updateValueAndValidity()}openConfigModal(){this.modalService.show($n,null,{size:"lg"}).componentInstance.configForm.get("encryptionType").setValue(this.bucketForm.getValue("encryption_type")||"AES256")}showTagModal(t){const c=this.modalService.show(qn).componentInstance;c.currentKeyTags=this.tags.map(O=>O.key),v().isNumber(t)&&(c.editMode=!0,c.fillForm(this.tags[t]),c.storedKey=this.tags[t].key),c.submitAction.subscribe(O=>{this.setTag(O,t)})}deleteTag(t){this.tags.splice(t,1),this.dirtyTags=!0,this.bucketForm.markAsDirty(),this.bucketForm.updateValueAndValidity()}setTag(t,o){v().isNumber(o)?this.tags[o]=t:this.tags.push(t),this.dirtyTags=!0,this.bucketForm.markAsDirty(),this.bucketForm.updateValueAndValidity()}tagsToXML(t){if(!this.dirtyTags&&0===t.length)return"";let o="<Tagging><TagSet>";for(const c of t){o+="<Tag>";for(const O in c)"key"===O?o+=`<Key>${c[O]}</Key>`:"value"===O&&(o+=`<Value>${c[O]}</Value>`);o+="</Tag>"}return o+="</TagSet></Tagging>",o}aclXmlToFormValues(t,o){const c=new P.Parser({explicitArray:!1,trim:!0});let O=ne.FullControl,H=pe.Owner;return c.parseString(t,(Q,J)=>{if(Q)return null;const j=J.AccessControlPolicy.AccessControlList.Grant;for(let oe=0;oe<j.length;oe++)j[oe].Grantee.ID!==o&&(j[oe].Grantee.URI&&j[oe].Grantee.URI.includes("AllUsers")?(H=pe.Everyone,O="READ"===j[oe].Permission&&O!==ne.Write?ne.Read:" WRITE"===j[oe].Permission&&O!==ne.Read?ne.Write:ne.All):j[oe].Grantee.URI&&j[oe].Grantee.URI.includes("AuthenticatedUsers")&&(H=pe.AuthenticatedUsers,O=ne.Read))}),[H,O]}onSelectionFilter(){this.filterAclPermissions(),this.bucketForm.get("aclPermission").setValue(this.aclPermissions[0])}filterAclPermissions(){switch(this.bucketForm.get("grantee").value){case pe.Owner:this.aclPermissions=[ne.FullControl];break;case pe.Everyone:this.aclPermissions=[ne.Read,ne.All];break;case pe.AuthenticatedUsers:this.aclPermissions=[ne.Read]}}permissionToCannedAcl(){const t=this.bucketForm.get("grantee").value,o=this.bucketForm.get("aclPermission").value;switch(t){case pe.Everyone:return o===ne.Read?"public-read":"public-read-write";case pe.AuthenticatedUsers:return"authenticated-read";default:return"private"}}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.gz),e.Y36(A.F0),e.Y36(he.O),e.Y36(L.o),e.Y36(I.I),e.Y36(Qe.Z),e.Y36(f),e.Y36(V.g),e.Y36(le),e.Y36(Hn.F),e.Y36(l.p4),e.Y36(e.sBO))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-bucket-form"]],viewQuery:function(t,o){if(1&t&&e.Gf(Yn,5),2&t){let c;e.iGM(c=e.CRH())&&(o.bucketPolicyTextArea=c.first)}},features:[e._Bn([le]),e.qOj],decls:3,vars:1,consts:function(){let i,t,o,c,O,H,Q,J,j,oe,Te,Me,Fe,Pe,me,Ge,ye,Le,Ee,Ue,$e,xe,De,ve,se,Re,ce,Je,Se,ut,dt,ft,pt,gt,Tt,Et,Rt,mt,ht,Mt,St,Ct,Ft,Ot,Nt,Pt,At,bt,It,Gt,yt,Lt,Dt,vt,wt,Wt,Ut,$t,xt,Zt,kt,Bt,zt,qt,Ht,Xt,Kt,Qt,Yt,Jt;return i="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",t="Name",o="Nom...",c="Owner",O="Encryption",H=" Enable ",Q="Enables encryption for the objects in the bucket. To enable encryption on a bucket you need to set the configuration values for SSE-S3 or SSE-KMS. To set the configuration values " + "\ufffd#46\ufffd" + "Click here" + "\ufffd/#46\ufffd" + "",J="Tags " + "\ufffd#51\ufffd" + "Tagging provides a way to categorize storage" + "\ufffd/#51\ufffd" + "",j="Add tag",oe="Policies ",Te="Bucket policy",Me="" + "\ufffd#75\ufffd" + "" + "\ufffd/#75\ufffd" + " Clear ",Fe="" + "\ufffd#79\ufffd" + "" + "\ufffd/#79\ufffd" + " Policy examples ",Pe="" + "\ufffd#82\ufffd" + "" + "\ufffd/#82\ufffd" + " Policy generator ",me="ACL " + "\ufffd#86\ufffd" + "Any changes to the ACL will overwrite previous one. You can choose any of the available options to modify the spcified user group." + "\ufffd/#86\ufffd" + "",Ge="Grantee " + "\ufffd#91\ufffd" + "Select a grantee (user group) to modify it's permisions" + "\ufffd/#91\ufffd" + "",ye="Permissions " + "\ufffd#97\ufffd" + "Select the permision to give to the selected grantee. Regardless, the owner of the bucket will always have FULL CONTROL access" + "\ufffd/#97\ufffd" + "",Le="ID",Ee="This field is required.",Ue="Bucket names can only contain lowercase letters, numbers, periods and hyphens.",$e="Le nom s\xE9lectionn\xE9 est d\xE9j\xE0 en cours d'utilisation.",xe="Bucket names must not contain uppercase characters or underscores.",De="Each label must start and end with a lowercase letter or a number.",ve="Bucket names cannot be formatted as IP address.",se="Bucket labels cannot be empty and can only contain lowercase letters, numbers and hyphens.",Re="Bucket names must be 3 to 63 characters long.",ce="Chargement...",Je="-- S\xE9lectionner un utilisateur --",Se="This field is required.",ut="Versioning",dt="Enabled",ft="Enables versioning for the objects in the bucket.",pt="Multi-Factor Authentication",gt="Delete enabled",Tt="Enables MFA (multi-factor authentication) Delete, which requires additional authentication for changing the bucket versioning state.",Et="Token Serial Number",Rt="This field is required.",mt="Token PIN",ht="This field is required.",Mt=" Object Locking " + "\ufffd#3\ufffd" + " Store objects using a write-once-read-many (WORM) model to prevent objects from being deleted or overwritten for a fixed amount of time or indefinitely. Object Locking works only in versioned buckets. " + "\ufffd/#3\ufffd" + "",St=" Enable ",Ct="Enables locking for the objects in the bucket. Locking can only be enabled while creating a bucket.",Ft="Mode",Ot=" Compliance ",Nt=" Governance ",Pt=" In COMPLIANCE an object version cannot be overwritten or deleted for the duration of the period. ",At=" In GOVERNANCE mode, users cannot overwrite or delete an object version or alter its lock settings unless they have special permissions. ",bt="Days",It="The number of days that you want to specify for the default retention period that will be applied to new objects placed in this bucket.",Gt="The entered value must be a positive integer.",yt="Retention Days must be a positive integer.",Lt="SSE-S3 Encryption",Dt="Connect to an external key management service",vt="KMS Provider",wt="-- Select a provider --",Wt="This field is required.",Ut="Key Id ",$t="This field is required.",xt="Maximum of 20 tags reached",Zt="Invalid json text",kt="" + "\ufffd0\ufffd" + "",Bt="This field is required.",zt="" + "\ufffd0\ufffd" + "",qt="This field is required.",Ht="Placement target",Xt=" When creating a bucket, a placement target can be provided as part of the LocationConstraint to override the default placement targets from the user and zonegroup. ",Kt="Chargement...",Qt="-- Select a placement target --",Yt="Edit",Jt="Delete",[["class","cd-col-form",4,"cdFormLoading"],["tagTpl",""],[1,"cd-col-form"],["name","bucketForm","novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],i,[1,"card-body"],["class","form-group row",4,"ngIf"],[1,"form-group","row"],["for","bid",1,"cd-col-form-label",3,"ngClass"],t,[1,"cd-col-form-input"],["id","bid","name","bid","type","text","placeholder",o,"formControlName","bid",1,"form-control",3,"readonly","autofocus"],["class","invalid-feedback",4,"ngIf"],["for","owner",1,"cd-col-form-label","required"],c,["id","owner","name","owner","formControlName","owner",1,"form-select",3,"autofocus"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"cd-header"],O,["for","encryption_enabled",1,"cd-col-form-label","pt-0"],H,["id","encryption_enabled","name","encryption_enabled","formControlName","encryption_enabled","type","checkbox",1,"form-check-input"],["aria-label","encryption helper"],Q,["href","#/rgw/bucket/create","aria-label","click here",3,"click"],J,[4,"ngFor","ngForOf"],[1,"row"],[1,"col-12"],["class","text-warning",4,"ngIf"],["type","button","id","add-tag",1,"btn","btn-light","float-end","my-3",3,"disabled","click"],[3,"ngClass"],j,oe,["for","id",1,"cd-col-form-label"],Te,["id","bucket_policy","formControlName","bucket_policy",1,"form-control","resize-vertical",3,"change"],["bucketPolicyTextArea",""],["type","button","id","clear-bucket-policy",1,"btn","btn-light","my-3",3,"click"],Me,["role","group","aria-label","bucket-policy-helpers",1,"btn-group","float-end"],["type","button","id","example-generator-button",1,"btn","btn-light","my-3",3,"click"],Fe,Pe,[1,"cd-col-form-label"],me,[1,"input-group"],["for","grantee",1,"input-group-text"],Ge,["id","grantee","name","grantee","formControlName","grantee",1,"form-input","form-select",3,"change"],["for","aclPermission",1,"input-group-text"],ye,["id","aclPermission","name","aclPermission","formControlName","aclPermission",1,"form-input","form-select"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],Le,["id","id","name","id","type","text","formControlName","id","readonly","",1,"form-control"],[1,"invalid-feedback"],Ee,Ue,$e,xe,De,ve,se,Re,[3,"ngValue"],ce,Je,[3,"value"],Se,ut,[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","versioning","name","versioning","formControlName","versioning",1,"custom-control-input",3,"change"],["for","versioning",1,"custom-control-label"],dt,ft,pt,["type","checkbox","id","mfa-delete","name","mfa-delete","formControlName","mfa-delete",1,"custom-control-input",3,"change"],["for","mfa-delete",1,"custom-control-label"],gt,Tt,["for","mfa-token-serial",1,"cd-col-form-label"],Et,["type","text","id","mfa-token-serial","name","mfa-token-serial","formControlName","mfa-token-serial",1,"form-control"],Rt,["for","mfa-token-pin",1,"cd-col-form-label"],mt,["type","text","id","mfa-token-pin","name","mfa-token-pin","formControlName","mfa-token-pin",1,"form-control"],ht,Mt,["for","lock_enabled",1,"cd-col-form-label","pt-0"],St,["id","lock_enabled","formControlName","lock_enabled","type","checkbox",1,"form-check-input"],Ct,["type","info","class","me-1",4,"ngIf"],["type","warning",4,"ngIf"],["for","lock_mode",1,"cd-col-form-label"],Ft,["formControlName","lock_mode","name","lock_mode","id","lock_mode",1,"form-select"],["value","COMPLIANCE"],Ot,["value","GOVERNANCE"],Nt,Pt,At,["for","lock_retention_period_days",1,"cd-col-form-label"],bt,["type","number","id","lock_retention_period_days","formControlName","lock_retention_period_days","min","1",1,"form-control"],It,Gt,yt,["type","info",1,"me-1"],["type","warning"],[1,"custom-control","custom-radio","custom-control-inline","ps-5"],["formControlName","encryption_type","id","sse_S3_enabled","type","radio","name","encryption_type","value","AES256",1,"form-check-input"],["for","sse_S3_enabled",1,"form-control-label"],Lt,["formControlName","encryption_type","id","kms_enabled","name","encryption_type","value","aws:kms","type","radio",1,"form-check-input"],["for","kms_enabled",1,"form-control-label"],Dt,["for","kms_provider",1,"cd-col-form-label","required"],vt,["id","kms_provider","name","kms_provider","formControlName","kms_provider",1,"form-select",3,"autofocus"],wt,Wt,["for","keyId",1,"cd-col-form-label","required"],Ut,["id","keyId","name","keyId","type","text","formControlName","keyId",1,"form-control"],$t,[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"text-warning"],xt,Zt,kt,Bt,zt,qt,["for","placement-target",1,"cd-col-form-label"],Ht,["id","placement-target","name","placement-target","formControlName","placement-target",1,"form-select"],Xt,Kt,Qt,[1,"input-group","my-2"],["type","button","ngbTooltip",Yt,1,"btn","btn-light",3,"id","click"],["type","button","ngbTooltip",Jt,1,"btn","btn-light",3,"id","click"],["type","text","disabled","","readonly","",1,"form-control",3,"id","ngbTooltip","value"]]},template:function(t,o){1&t&&(e.YNc(0,Xo,106,58,"div",0),e.YNc(1,Qo,6,9,"ng-template",null,1,e.W1O)),2&t&&e.Q6J("cdFormLoading",o.loading)},dependencies:[g.mk,g.sg,g.O5,g.tP,fe.S,Ve.G,we.p,Kn,Qn.B,st.U,cn.y,Oe.o,Ae.b,We.P,C.V,r._Y,r.YN,r.Kr,r.Fj,r.wV,r.Wl,r.EJ,r._,r.JJ,r.JL,r.qQ,r.sg,r.u,x._L,g.rS,Ye.m]}),n})();var dn=d(70882),en=d(68136),tn=d(30982),et=d(83697),Vt=d(68774),nn=d(47557),fn=d(66369),tt=d(51847),nt=d(47640),pn=d(60251),on=d(94928),gn=d(59376),Tn=d(68962),Yo=d(96102);function Jo(n,i){1&n&&(e.TgZ(0,"td"),e.SDv(1,26),e.qZA())}function Vo(n,i){if(1&n&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"dimless"),e.qZA()),2&n){const t=e.oxw(4);e.xp6(1),e.hij(" ",e.lcZ(2,1,t.selection.bucket_quota.max_size)," ")}}function jo(n,i){1&n&&(e.TgZ(0,"td"),e.SDv(1,27),e.qZA())}function ei(n,i){if(1&n&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&n){const t=e.oxw(4);e.xp6(1),e.hij(" ",t.selection.bucket_quota.max_objects," ")}}function ti(n,i){if(1&n&&(e.ynx(0),e.TgZ(1,"tr")(2,"td",14),e.SDv(3,24),e.qZA(),e.YNc(4,Jo,2,0,"td",0),e.YNc(5,Vo,3,3,"td",0),e.qZA(),e.TgZ(6,"tr")(7,"td",14),e.SDv(8,25),e.qZA(),e.YNc(9,jo,2,0,"td",0),e.YNc(10,ei,2,1,"td",0),e.qZA(),e.BQk()),2&n){const t=e.oxw(3);e.xp6(4),e.Q6J("ngIf",t.selection.bucket_quota.max_size<=-1),e.xp6(1),e.Q6J("ngIf",t.selection.bucket_quota.max_size>-1),e.xp6(4),e.Q6J("ngIf",t.selection.bucket_quota.max_objects<=-1),e.xp6(1),e.Q6J("ngIf",t.selection.bucket_quota.max_objects>-1)}}function ni(n,i){if(1&n&&(e.ynx(0),e.TgZ(1,"tr")(2,"td",14),e.SDv(3,28),e.qZA(),e.TgZ(4,"td"),e._uU(5),e.qZA()(),e.TgZ(6,"tr")(7,"td",14),e.SDv(8,29),e.qZA(),e.TgZ(9,"td"),e._uU(10),e.qZA()(),e.BQk()),2&n){const t=e.oxw(3);e.xp6(5),e.Oqu(t.selection.lock_mode),e.xp6(5),e.Oqu(t.selection.lock_retention_period_days)}}function oi(n,i){if(1&n&&(e.TgZ(0,"tr")(1,"td",11),e.SDv(2,32),e.qZA(),e.TgZ(3,"td",13),e._uU(4),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.pQV(t.key),e.QtT(2),e.xp6(2),e.Oqu(t.value)}}function ii(n,i){if(1&n&&(e.ynx(0),e.TgZ(1,"legend"),e.SDv(2,30),e.qZA(),e.TgZ(3,"table",10)(4,"tbody"),e.YNc(5,oi,5,2,"tr",31),e.ALo(6,"keyvalue"),e.qZA()(),e.BQk()),2&n){const t=e.oxw(3);e.xp6(5),e.Q6J("ngForOf",e.lcZ(6,1,t.selection.tagset))}}function _i(n,i){if(1&n&&(e.TgZ(0,"table",10)(1,"tbody")(2,"tr")(3,"td",11),e.SDv(4,12),e.qZA(),e.TgZ(5,"td",13),e._uU(6),e.qZA()(),e.TgZ(7,"tr")(8,"td",14),e.SDv(9,15),e.qZA(),e.TgZ(10,"td"),e._uU(11),e.qZA()(),e.TgZ(12,"tr")(13,"td",14),e.SDv(14,16),e.qZA(),e.TgZ(15,"td"),e._uU(16),e.qZA()(),e.TgZ(17,"tr")(18,"td",14),e.SDv(19,17),e.qZA(),e.TgZ(20,"td"),e._uU(21),e.qZA()(),e.TgZ(22,"tr")(23,"td",14),e.SDv(24,18),e.qZA(),e.TgZ(25,"td"),e._uU(26),e.qZA()(),e.TgZ(27,"tr")(28,"td",14),e.SDv(29,19),e.qZA(),e.TgZ(30,"td"),e._uU(31),e.ALo(32,"cdDate"),e.qZA()()()(),e.TgZ(33,"div")(34,"legend"),e.SDv(35,20),e.qZA(),e.TgZ(36,"table",10)(37,"tbody")(38,"tr")(39,"td",11),e.SDv(40,21),e.qZA(),e.TgZ(41,"td",13),e._uU(42),e.ALo(43,"booleanText"),e.qZA()(),e.YNc(44,ti,11,4,"ng-container",0),e.qZA()()(),e.TgZ(45,"legend"),e.SDv(46,22),e.qZA(),e.TgZ(47,"table",10)(48,"tbody")(49,"tr")(50,"td",11),e.SDv(51,23),e.qZA(),e.TgZ(52,"td",13),e._uU(53),e.ALo(54,"booleanText"),e.qZA()(),e.YNc(55,ni,11,2,"ng-container",0),e.qZA()(),e.YNc(56,ii,7,3,"ng-container",0),e.ALo(57,"keyvalue")),2&n){const t=e.oxw(2);let o;e.xp6(6),e.Oqu(t.selection.versioning),e.xp6(5),e.Oqu(t.selection.encryption),e.xp6(5),e.Oqu(t.selection.mfa_delete),e.xp6(5),e.Oqu(t.selection.index_type),e.xp6(5),e.Oqu(t.selection.placement_rule),e.xp6(5),e.Oqu(e.lcZ(32,11,t.selection.mtime)),e.xp6(11),e.Oqu(e.lcZ(43,13,t.selection.bucket_quota.enabled)),e.xp6(2),e.Q6J("ngIf",t.selection.bucket_quota.enabled),e.xp6(9),e.Oqu(e.lcZ(54,15,t.selection.lock_enabled)),e.xp6(2),e.Q6J("ngIf",t.selection.lock_enabled),e.xp6(1),e.Q6J("ngIf",null==(o=e.lcZ(57,17,t.selection.tagset))?null:o.length)}}function ri(n,i){if(1&n&&(e.TgZ(0,"table",10)(1,"tbody")(2,"tr")(3,"td",11),e.SDv(4,33),e.qZA(),e.TgZ(5,"td")(6,"pre"),e._uU(7),e.ALo(8,"json"),e.qZA()()(),e.TgZ(9,"tr")(10,"td",11),e.SDv(11,34),e.qZA(),e.TgZ(12,"td")(13,"table",35)(14,"thead")(15,"tr"),e.tHW(16,36),e._UZ(17,"th")(18,"th"),e.N_p(),e.qZA()(),e.TgZ(19,"tbody")(20,"tr"),e.tHW(21,37),e._UZ(22,"td")(23,"td"),e.N_p(),e.qZA(),e.TgZ(24,"tr"),e.tHW(25,38),e._UZ(26,"td")(27,"td"),e.N_p(),e.qZA(),e.TgZ(28,"tr"),e.tHW(29,39),e._UZ(30,"td")(31,"td"),e.N_p(),e.qZA()()()()()()()),2&n){const t=e.oxw(2);e.xp6(7),e.Oqu(e.lcZ(8,4,t.selection.bucket_policy)),e.xp6(16),e.pQV(t.aclPermissions.Owner||"-"),e.QtT(21),e.xp6(4),e.pQV(t.aclPermissions.AllUsers||"-"),e.QtT(25),e.xp6(4),e.pQV(t.aclPermissions.AuthenticatedUsers||"-"),e.QtT(29)}}function si(n,i){if(1&n&&(e.ynx(0),e.TgZ(1,"nav",1,2),e.ynx(3,3),e.TgZ(4,"a",4),e.SDv(5,5),e.qZA(),e.YNc(6,_i,58,19,"ng-template",6),e.BQk(),e.ynx(7,7),e.TgZ(8,"a",4),e.SDv(9,8),e.qZA(),e.YNc(10,ri,32,6,"ng-template",6),e.BQk(),e.qZA(),e._UZ(11,"div",9),e.BQk()),2&n){const t=e.MAs(2);e.xp6(11),e.Q6J("ngbNavOutlet",t)}}let ai=(()=>{class n{constructor(t){this.rgwBucketService=t,this.aclPermissions={}}ngOnChanges(){this.selection&&this.rgwBucketService.get(this.selection.bid).subscribe(t=>{t.lock_retention_period_days=this.rgwBucketService.getLockDays(t),this.selection=t,this.aclPermissions=this.parseXmlAcl(this.selection.acl,this.selection.owner)})}parseXmlAcl(t,o){const c=new P.Parser({explicitArray:!1,trim:!0});let O={Owner:["-"],AllUsers:["-"],AuthenticatedUsers:["-"]};return c.parseString(t,(H,Q)=>{if(H)return null;const J=Q.AccessControlPolicy.AccessControlList.Grant;if(Array.isArray(J))for(let j=0;j<J.length;j++){const oe=J[j];if(oe?.Grantee?.URI){const Te=oe.Grantee.URI.split("/").pop();O[Te].includes("-")?O[Te]=[oe?.Permission]:O[Te].push(oe?.Permission)}oe?.Grantee?.ID&&o===oe?.Grantee?.ID&&(O.Owner=oe?.Permission)}else J?.Grantee?.ID&&o===J?.Grantee?.ID&&(O.Owner=J?.Permission)}),O}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(L.o))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-bucket-details"]],inputs:{selection:"selection"},features:[e.TTD],decls:1,vars:1,consts:function(){let i,t,o,c,O,H,Q,J,j,oe,Te,Me,Fe,Pe,me,Ge,ye,Le,Ee,Ue,$e,xe,De,ve,se,Re;return i="D\xE9tails",t="Policies",o="Versioning",c="Encryption",O="MFA Delete",H="Type d'index",Q="R\xE8gle de placement",J="Last modification time",j="Quota de compartiments",oe="Enabled",Te="Locking",Me="Enabled",Fe="Taille maximale",Pe="Nombre maximal d'objets",me="Unlimited",Ge="Unlimited",ye="Mode",Le="Days",Ee="Balises",Ue="" + "\ufffd0\ufffd" + "",$e="Bucket policy",xe="ACL",De="" + "[\ufffd#17\ufffd|\ufffd#18\ufffd]" + "Grantee" + "[\ufffd/#17\ufffd|\ufffd/#18\ufffd]" + "" + "[\ufffd#17\ufffd|\ufffd#18\ufffd]" + "Permissions" + "[\ufffd/#17\ufffd|\ufffd/#18\ufffd]" + "",De=e.Zx4(De),ve="" + "[\ufffd#22\ufffd|\ufffd#23\ufffd]" + "Bucket Owner" + "[\ufffd/#22\ufffd|\ufffd/#23\ufffd]" + "" + "[\ufffd#22\ufffd|\ufffd#23\ufffd]" + "" + "\ufffd0\ufffd" + "" + "[\ufffd/#22\ufffd|\ufffd/#23\ufffd]" + "",ve=e.Zx4(ve),se="" + "[\ufffd#26\ufffd|\ufffd#27\ufffd]" + "Everyone" + "[\ufffd/#26\ufffd|\ufffd/#27\ufffd]" + "" + "[\ufffd#26\ufffd|\ufffd#27\ufffd]" + "" + "\ufffd0\ufffd" + "" + "[\ufffd/#26\ufffd|\ufffd/#27\ufffd]" + "",se=e.Zx4(se),Re="" + "[\ufffd#30\ufffd|\ufffd#31\ufffd]" + "Authenticated users group" + "[\ufffd/#30\ufffd|\ufffd/#31\ufffd]" + "" + "[\ufffd#30\ufffd|\ufffd#31\ufffd]" + "" + "\ufffd0\ufffd" + "" + "[\ufffd/#30\ufffd|\ufffd/#31\ufffd]" + "",Re=e.Zx4(Re),[[4,"ngIf"],["ngbNav","","cdStatefulTab","rgw-bucket-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],i,["ngbNavContent",""],["ngbNavItem","permissions"],t,[3,"ngbNavOutlet"],[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],o,[1,"w-75"],[1,"bold"],c,O,H,Q,J,j,oe,Te,Me,Fe,Pe,me,Ge,ye,Le,Ee,[4,"ngFor","ngForOf"],Ue,$e,xe,[1,"table"],De,ve,se,Re]},template:function(t,o){1&t&&e.YNc(0,si,12,1,"ng-container",0),2&t&&e.Q6J("ngIf",o.selection)},dependencies:[g.sg,g.O5,gn.m,x.uN,x.Pz,x.nv,x.Vx,x.tO,x.Dy,g.Ts,g.Nd,Tn.T,fn.n,Yo.N],styles:["table[_ngcontent-%COMP%]{table-layout:fixed}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{word-wrap:break-word}"]}),n})();const li=["bucketSizeTpl"],ci=["bucketObjectTpl"];function ui(n,i){if(1&n&&e._UZ(0,"cd-usage-bar",8),2&n){const t=e.oxw().row;e.Q6J("total",t.bucket_quota.max_size)("used",t.bucket_size)}}function di(n,i){1&n&&e.SDv(0,9)}function fi(n,i){if(1&n&&(e.YNc(0,ui,1,2,"cd-usage-bar",6),e.YNc(1,di,1,0,"ng-template",null,7,e.W1O)),2&n){const t=i.row,o=e.MAs(2);e.Q6J("ngIf",t.bucket_quota.max_size>0&&t.bucket_quota.enabled)("ngIfElse",o)}}function pi(n,i){if(1&n&&e._UZ(0,"cd-usage-bar",12),2&n){const t=e.oxw().row;e.Q6J("total",t.bucket_quota.max_objects)("used",t.num_objects)("isBinary",!1)}}function gi(n,i){1&n&&e.SDv(0,13)}function Ti(n,i){if(1&n&&(e.YNc(0,pi,1,3,"cd-usage-bar",10),e.YNc(1,gi,1,0,"ng-template",null,11,e.W1O)),2&n){const t=i.row,o=e.MAs(2);e.Q6J("ngIf",t.bucket_quota.max_objects>0&&t.bucket_quota.enabled)("ngIfElse",o)}}let Ri=(()=>{class n extends en.o{constructor(t,o,c,O,H,Q,J,j){super(j),this.authStorageService=t,this.dimlessBinaryPipe=o,this.dimlessPipe=c,this.rgwBucketService=O,this.modalService=H,this.urlBuilder=Q,this.actionLabels=J,this.ngZone=j,this.columns=[],this.buckets=[],this.selection=new Vt.r}ngOnInit(){this.permission=this.authStorageService.getPermissions().rgw,this.columns=[{name:"Name",prop:"bid",flexGrow:2},{name:"Owner",prop:"owner",flexGrow:2.5},{name:"Used Capacity",prop:"bucket_size",flexGrow:.6,pipe:this.dimlessBinaryPipe},{name:"Capacity Limit %",prop:"size_usage",cellTemplate:this.bucketSizeTpl,flexGrow:.8},{name:"Objects",prop:"num_objects",flexGrow:.6,pipe:this.dimlessPipe},{name:"Object Limit %",prop:"object_usage",cellTemplate:this.bucketObjectTpl,flexGrow:.8}];const t=()=>this.selection.first()&&`${encodeURIComponent(this.selection.first().bid)}`;this.tableActions=[{permission:"create",icon:$.P.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE,canBePrimary:H=>!H.hasSelection},{permission:"update",icon:$.P.edit,routerLink:()=>this.urlBuilder.getEdit(t()),name:this.actionLabels.EDIT},{permission:"delete",icon:$.P.destroy,click:()=>this.deleteAction(),disable:()=>!this.selection.hasSelection,name:this.actionLabels.DELETE,canBePrimary:H=>H.hasMultiSelection}],this.setTableRefreshTimeout()}transformBucketData(){v().forEach(this.buckets,t=>{const o=t.bucket_quota.max_size,c=t.bucket_quota.max_objects;t.bucket_size=0,t.num_objects=0,v().isEmpty(t.usage)||(t.bucket_size=t.usage["rgw.main"].size_actual,t.num_objects=t.usage["rgw.main"].num_objects),t.size_usage=o>0?t.bucket_size/o:void 0,t.object_usage=c>0?t.num_objects/c:void 0})}getBucketList(t){this.setTableRefreshTimeout(),this.rgwBucketService.list(!0).subscribe(o=>{this.buckets=o,this.transformBucketData()},()=>{t.error()})}updateSelection(t){this.selection=t}deleteAction(){this.modalService.show(tn.M,{itemDescription:this.selection.hasSingleSelection?"bucket":"buckets",itemNames:this.selection.selected.map(t=>t.bid),submitActionObservable:()=>new dn.y(t=>{(0,k.D)(this.selection.selected.map(o=>this.rgwBucketService.delete(o.bid))).subscribe({error:o=>{t.error(o),this.table.refreshBtn()},complete:()=>{t.complete(),this.table.refreshBtn()}})})})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(nt.j),e.Y36(nn.$),e.Y36(fn.n),e.Y36(L.o),e.Y36(Qe.Z),e.Y36(tt.F),e.Y36(l.p4),e.Y36(e.R0b))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-bucket-list"]],viewQuery:function(t,o){if(1&t&&(e.Gf(et.a,7),e.Gf(li,7),e.Gf(ci,7)),2&t){let c;e.iGM(c=e.CRH())&&(o.table=c.first),e.iGM(c=e.CRH())&&(o.bucketSizeTpl=c.first),e.iGM(c=e.CRH())&&(o.bucketObjectTpl=c.first)}},features:[e._Bn([{provide:tt.F,useValue:new tt.F("rgw/bucket")}]),e.qOj],decls:8,vars:9,consts:function(){let i,t;return i="No Limit",t="No Limit",[["columnMode","flex","selectionType","multiClick","identifier","bid",3,"autoReload","data","columns","hasDetails","status","setExpandedRow","updateSelection","fetchData"],["table",""],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["bucketSizeTpl",""],["bucketObjectTpl",""],[3,"total","used",4,"ngIf","ngIfElse"],["noSizeQuota",""],[3,"total","used"],i,[3,"total","used","isBinary",4,"ngIf","ngIfElse"],["noObjectQuota",""],[3,"total","used","isBinary"],t]},template:function(t,o){1&t&&(e.TgZ(0,"cd-table",0,1),e.NdJ("setExpandedRow",function(O){return o.setExpandedRow(O)})("updateSelection",function(O){return o.updateSelection(O)})("fetchData",function(O){return o.getBucketList(O)}),e._UZ(2,"cd-table-actions",2)(3,"cd-rgw-bucket-details",3),e.qZA(),e.YNc(4,fi,3,2,"ng-template",null,4,e.W1O),e.YNc(6,Ti,3,2,"ng-template",null,5,e.W1O)),2&t&&(e.Q6J("autoReload",!1)("data",o.buckets)("columns",o.columns)("hasDetails",!0)("status",o.tableStatus),e.xp6(2),e.Q6J("permission",o.permission)("selection",o.selection)("tableActions",o.tableActions),e.xp6(1),e.Q6J("selection",o.expandedRow))},dependencies:[g.O5,pn.O,et.a,on.K,ai]}),n})();var mi=d(58111),En=d(76317),Rn=d(61350),hi=d(60351);function Mi(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"cd-table-key-value",11),e.NdJ("fetchData",function(){e.CHM(t);const c=e.oxw(2);return e.KtG(c.getMetaData())}),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("data",t.metadata)}}function Si(n,i){if(1&n&&e._UZ(0,"cd-table-performance-counter",12),2&n){const t=e.oxw(2);e.Q6J("serviceId",t.serviceMapId)}}function Ci(n,i){if(1&n&&e._UZ(0,"cd-grafana",15),2&n){const t=e.oxw(3);e.Q6J("grafanaPath","rgw-instance-detail?var-rgw_servers=rgw."+t.serviceId)("type","metrics")}}function Fi(n,i){1&n&&(e.ynx(0,13),e.TgZ(1,"a",4),e.SDv(2,14),e.qZA(),e.YNc(3,Ci,1,2,"ng-template",6),e.BQk())}function Oi(n,i){if(1&n&&(e.ynx(0),e.TgZ(1,"nav",1,2),e.ynx(3,3),e.TgZ(4,"a",4),e.SDv(5,5),e.qZA(),e.YNc(6,Mi,1,1,"ng-template",6),e.BQk(),e.ynx(7,7),e.TgZ(8,"a",4),e.SDv(9,8),e.qZA(),e.YNc(10,Si,1,1,"ng-template",6),e.BQk(),e.YNc(11,Fi,4,0,"ng-container",9),e.qZA(),e._UZ(12,"div",10),e.BQk()),2&n){const t=e.MAs(2),o=e.oxw();e.xp6(11),e.Q6J("ngIf",o.grafanaPermission.read),e.xp6(1),e.Q6J("ngbNavOutlet",t)}}let Ni=(()=>{class n{constructor(t,o){this.rgwDaemonService=t,this.authStorageService=o,this.serviceId="",this.serviceMapId="",this.grafanaPermission=this.authStorageService.getPermissions().grafana}ngOnChanges(){this.selection&&(this.serviceId=this.selection.id,this.serviceMapId=this.selection.service_map_id)}getMetaData(){v().isEmpty(this.serviceId)||this.rgwDaemonService.get(this.serviceId).subscribe(t=>{this.metadata=t.rgw_metadata})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(u.b),e.Y36(nt.j))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-daemon-details"]],inputs:{selection:"selection"},features:[e.TTD],decls:1,vars:1,consts:function(){let i,t,o,c;return i="D\xE9tails",t="Compteurs de performance",o="D\xE9tails des performances",c="RGW instance details",[[4,"ngIf"],["ngbNav","","cdStatefulTab","rgw-daemon-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],i,["ngbNavContent",""],["ngbNavItem","performance-counters"],t,["ngbNavItem","performance-details",4,"ngIf"],[3,"ngbNavOutlet"],[3,"data","fetchData"],["serviceType","rgw",3,"serviceId"],["ngbNavItem","performance-details"],o,["title",c,"uid","x5ARzZtmk","grafanaStyle","one",3,"grafanaPath","type"]]},template:function(t,o){1&t&&e.YNc(0,Oi,13,2,"ng-container",0),2&t&&e.Q6J("ngIf",o.selection)},dependencies:[g.O5,En.F,Rn.b,gn.m,hi.p,x.uN,x.Pz,x.nv,x.Vx,x.tO,x.Dy]}),n})();function Pi(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"cd-table",8),e.NdJ("setExpandedRow",function(c){e.CHM(t);const O=e.oxw();return e.KtG(O.setExpandedRow(c))})("fetchData",function(c){e.CHM(t);const O=e.oxw();return e.KtG(O.getDaemonList(c))}),e._UZ(1,"cd-rgw-daemon-details",9),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("data",t.daemons)("columns",t.columns)("hasDetails",!0),e.xp6(1),e.Q6J("selection",t.expandedRow)}}function Ai(n,i){1&n&&e._UZ(0,"cd-grafana",11),2&n&&e.Q6J("grafanaPath","rgw-overview?")("type","metrics")}function bi(n,i){1&n&&(e.ynx(0,2),e.TgZ(1,"a",3),e.SDv(2,10),e.qZA(),e.YNc(3,Ai,1,2,"ng-template",5),e.BQk())}function Ii(n,i){1&n&&e._UZ(0,"cd-grafana",13),2&n&&e.Q6J("grafanaPath","radosgw-sync-overview?")("type","metrics")}function Gi(n,i){1&n&&(e.ynx(0,2),e.TgZ(1,"a",3),e.SDv(2,12),e.qZA(),e.YNc(3,Ii,1,2,"ng-template",5),e.BQk())}let yi=(()=>{class n extends en.o{constructor(t,o,c,O){super(),this.rgwDaemonService=t,this.authStorageService=o,this.cephShortVersionPipe=c,this.rgwSiteService=O,this.columns=[],this.daemons=[],this.updateDaemons=H=>{this.daemons=H}}ngOnInit(){this.grafanaPermission=this.authStorageService.getPermissions().grafana,this.columns=[{name:"ID",prop:"id",flexGrow:2},{name:"Hostname",prop:"server_hostname",flexGrow:2},{name:"Port",prop:"port",flexGrow:1},{name:"Realm",prop:"realm_name",flexGrow:2},{name:"Zone Group",prop:"zonegroup_name",flexGrow:2},{name:"Zone",prop:"zone_name",flexGrow:2},{name:"Version",prop:"version",flexGrow:1,pipe:this.cephShortVersionPipe}],this.rgwSiteService.get("realms").subscribe(t=>this.isMultiSite=t.length>0)}getDaemonList(t){this.rgwDaemonService.list().subscribe(this.updateDaemons,()=>{t.error()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(u.b),e.Y36(nt.j),e.Y36(mi.F),e.Y36(I.I))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-daemon-list"]],features:[e.qOj],decls:9,vars:3,consts:function(){let i,t,o,c,O;return i="Gateways List",t="Performance globale",o="RGW overview",c="Sync Performance",O="Radosgw sync overview",[["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem",""],["ngbNavLink",""],i,["ngbNavContent",""],["ngbNavItem","",4,"ngIf"],[3,"ngbNavOutlet"],["columnMode","flex",3,"data","columns","hasDetails","setExpandedRow","fetchData"],["cdTableDetail","",3,"selection"],t,["title",o,"uid","WAkugZpiz","grafanaStyle","two",3,"grafanaPath","type"],c,["title",O,"uid","rgw-sync-overview","grafanaStyle","two",3,"grafanaPath","type"]]},template:function(t,o){if(1&t&&(e.TgZ(0,"nav",0,1),e.ynx(2,2),e.TgZ(3,"a",3),e.SDv(4,4),e.qZA(),e.YNc(5,Pi,2,4,"ng-template",5),e.BQk(),e.YNc(6,bi,4,0,"ng-container",6),e.YNc(7,Gi,4,0,"ng-container",6),e.qZA(),e._UZ(8,"div",7)),2&t){const c=e.MAs(1);e.xp6(6),e.Q6J("ngIf",o.grafanaPermission.read),e.xp6(1),e.Q6J("ngIf",o.grafanaPermission.read&&o.isMultiSite),e.xp6(1),e.Q6J("ngbNavOutlet",c)}},dependencies:[g.O5,En.F,et.a,x.uN,x.Pz,x.nv,x.Vx,x.tO,x.Dy,Ni]}),n})();var Li=d(6481),_n=d(28211),jt=(()=>{return(n=jt||(jt={})).USERS="users",n.BUCKETS="buckets",n.METADATA="metadata",n.USAGE="usage",n.ZONE="zone",jt;var n})();let mn=(()=>{class n{static getAll(){return Object.values(n.capabilities)}}return n.capabilities=jt,n})();function Di(n,i){1&n&&e._UZ(0,"input",22),2&n&&e.Q6J("readonly",!0)}function vi(n,i){1&n&&(e.TgZ(0,"option",17),e.SDv(1,25),e.qZA()),2&n&&e.Q6J("ngValue",null)}function wi(n,i){if(1&n&&(e.TgZ(0,"option",26),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t)}}function Wi(n,i){if(1&n&&(e.TgZ(0,"select",23),e.YNc(1,vi,2,1,"option",24),e.YNc(2,wi,2,2,"option",19),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",null!==t.types),e.xp6(1),e.Q6J("ngForOf",t.types)}}function Ui(n,i){1&n&&(e.TgZ(0,"span",27),e.SDv(1,28),e.qZA())}function $i(n,i){if(1&n&&(e.TgZ(0,"option",26),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t," ")}}function xi(n,i){1&n&&(e.TgZ(0,"span",27),e.SDv(1,29),e.qZA())}const Zi=function(n){return{required:n}},ki=function(){return["read","write","*"]};let Bi=(()=>{class n{constructor(t,o,c){this.formBuilder=t,this.activeModal=o,this.actionLabels=c,this.submitAction=new e.vpe,this.editing=!0,this.types=[],this.resource="capability",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({type:[null,[r.kI.required]],perm:[null,[r.kI.required]]})}setEditing(t=!0){this.editing=t,this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.ADD}setValues(t,o){this.formGroup.setValue({type:t,perm:o})}setCapabilities(t){const o=[];t.forEach(c=>{o.push(c.type)}),this.types=[],mn.getAll().forEach(c=>{-1===v().indexOf(o,c)&&this.types.push(c)})}onSubmit(){this.submitAction.emit(this.formGroup.value),this.activeModal.close()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(he.O),e.Y36(x.Kz),e.Y36(l.p4))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-user-capability-modal"]],outputs:{submitAction:"submitAction"},decls:29,vars:24,consts:function(){let i,t,o,c,O,H,Q;return i="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",t="Type",o="Autorisation",c="-- S\xE9lectionner une autorisation --",O="-- S\xE9lectionner un type --",H="This field is required.",Q="This field is required.",[[3,"modalRef"],[1,"modal-title"],i,[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","type",1,"cd-col-form-label",3,"ngClass"],t,[1,"cd-col-form-input"],["id","type","class","form-control","type","text","formControlName","type",3,"readonly",4,"ngIf"],["id","type","class","form-select","formControlName","type","autofocus","",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["for","perm",1,"cd-col-form-label","required"],o,["id","perm","formControlName","perm",1,"form-select"],[3,"ngValue"],c,[3,"value",4,"ngFor","ngForOf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],["id","type","type","text","formControlName","type",1,"form-control",3,"readonly"],["id","type","formControlName","type","autofocus","",1,"form-select"],[3,"ngValue",4,"ngIf"],O,[3,"value"],[1,"invalid-feedback"],H,Q]},template:function(t,o){if(1&t&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5)(8,"div",6)(9,"div",7)(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10),e.YNc(13,Di,1,1,"input",11),e.YNc(14,Wi,3,2,"select",12),e.YNc(15,Ui,2,0,"span",13),e.qZA()(),e.TgZ(16,"div",7)(17,"label",14),e.SDv(18,15),e.qZA(),e.TgZ(19,"div",10)(20,"select",16)(21,"option",17),e.SDv(22,18),e.qZA(),e.YNc(23,$i,2,2,"option",19),e.qZA(),e.YNc(24,xi,2,0,"span",13),e.qZA()()(),e.TgZ(25,"div",20)(26,"cd-form-button-panel",21),e.NdJ("submitActionEvent",function(){return o.onSubmit()}),e.ALo(27,"titlecase"),e.ALo(28,"upperFirst"),e.qZA()()(),e.BQk(),e.qZA()),2&t){const c=e.MAs(7);e.Q6J("modalRef",o.activeModal),e.xp6(4),e.pQV(e.lcZ(3,13,o.action))(e.lcZ(4,15,o.resource)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",o.formGroup),e.xp6(4),e.Q6J("ngClass",e.VKq(21,Zi,!o.editing)),e.xp6(3),e.Q6J("ngIf",o.editing),e.xp6(1),e.Q6J("ngIf",!o.editing),e.xp6(1),e.Q6J("ngIf",o.formGroup.showError("type",c,"required")),e.xp6(6),e.Q6J("ngValue",null),e.xp6(2),e.Q6J("ngForOf",e.DdM(23,ki)),e.xp6(1),e.Q6J("ngIf",o.formGroup.showError("perm",c,"required")),e.xp6(2),e.Q6J("form",o.formGroup)("submitText",e.lcZ(27,17,o.action)+" "+e.lcZ(28,19,o.resource))}},dependencies:[g.mk,g.sg,g.O5,Ie.z,we.p,st.U,Oe.o,Ae.b,We.P,C.V,r._Y,r.YN,r.Kr,r.Fj,r.EJ,r.JJ,r.JL,r.sg,r.u,g.rS,Ye.m]}),n})();var at=d(58039),lt=d(4416);function zi(n,i){1&n&&e._UZ(0,"input",17),2&n&&e.Q6J("readonly",!0)}function qi(n,i){1&n&&(e.TgZ(0,"option",21),e.SDv(1,22),e.qZA()),2&n&&e.Q6J("ngValue",null)}function Hi(n,i){if(1&n&&(e.TgZ(0,"option",23),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t)}}function Xi(n,i){if(1&n&&(e.TgZ(0,"select",18),e.YNc(1,qi,2,1,"option",19),e.YNc(2,Hi,2,2,"option",20),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",null!==t.userCandidates),e.xp6(1),e.Q6J("ngForOf",t.userCandidates)}}function Ki(n,i){1&n&&(e.TgZ(0,"span",24),e.SDv(1,25),e.qZA())}function Qi(n,i){1&n&&(e.TgZ(0,"div",7)(1,"div",26)(2,"div",27),e._UZ(3,"input",28),e.TgZ(4,"label",29),e.SDv(5,30),e.qZA()()()())}function Yi(n,i){1&n&&(e.TgZ(0,"span",24),e.SDv(1,37),e.qZA())}const rn=function(n){return{required:n}};function Ji(n,i){if(1&n&&(e.TgZ(0,"div",7)(1,"label",31),e.SDv(2,32),e.qZA(),e.TgZ(3,"div",10)(4,"div",33),e._UZ(5,"input",34)(6,"button",35)(7,"cd-copy-2-clipboard-button",36),e.qZA(),e.YNc(8,Yi,2,0,"span",13),e.qZA()()),2&n){const t=e.oxw(),o=e.MAs(7);e.xp6(1),e.Q6J("ngClass",e.VKq(3,rn,!t.viewing)),e.xp6(4),e.Q6J("readonly",t.viewing),e.xp6(3),e.Q6J("ngIf",t.formGroup.showError("access_key",o,"required"))}}function Vi(n,i){1&n&&(e.TgZ(0,"span",24),e.SDv(1,43),e.qZA())}function ji(n,i){if(1&n&&(e.TgZ(0,"div",7)(1,"label",38),e.SDv(2,39),e.qZA(),e.TgZ(3,"div",10)(4,"div",33),e._UZ(5,"input",40)(6,"button",41)(7,"cd-copy-2-clipboard-button",42),e.qZA(),e.YNc(8,Vi,2,0,"span",13),e.qZA()()),2&n){const t=e.oxw(),o=e.MAs(7);e.xp6(1),e.Q6J("ngClass",e.VKq(3,rn,!t.viewing)),e.xp6(4),e.Q6J("readonly",t.viewing),e.xp6(3),e.Q6J("ngIf",t.formGroup.showError("secret_key",o,"required"))}}let hn=(()=>{class n{constructor(t,o,c){this.formBuilder=t,this.activeModal=o,this.actionLabels=c,this.submitAction=new e.vpe,this.viewing=!0,this.userCandidates=[],this.resource="S3 Key",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({user:[null,[r.kI.required]],generate_key:[!0],access_key:[null,[z.h.requiredIf({generate_key:!1})]],secret_key:[null,[z.h.requiredIf({generate_key:!1})]]})}setViewing(t=!0){this.viewing=t,this.action=this.viewing?this.actionLabels.SHOW:this.actionLabels.CREATE}setValues(t,o,c){this.formGroup.setValue({user:t,generate_key:v().isEmpty(o),access_key:o,secret_key:c})}setUserCandidates(t){this.userCandidates=t}onSubmit(){this.submitAction.emit(this.formGroup.value),this.activeModal.close()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(he.O),e.Y36(x.Kz),e.Y36(l.p4))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-user-s3-key-modal"]],outputs:{submitAction:"submitAction"},decls:23,vars:24,consts:function(){let i,t,o,c,O,H,Q,J,j;return i="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",t="Username",o="-- S\xE9lectionner un nom d'utilisateur --",c="This field is required.",O="G\xE9n\xE9rer automatiquement la clef",H="Clef d'acc\xE8s",Q="This field is required.",J="Clef secr\xE8te",j="This field is required.",[[3,"modalRef"],[1,"modal-title"],i,[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","user",1,"cd-col-form-label",3,"ngClass"],t,[1,"cd-col-form-input"],["id","user","class","form-control","type","text","formControlName","user",3,"readonly",4,"ngIf"],["id","user","class","form-control","formControlName","user","autofocus","",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["class","form-group row",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","showSubmit","submitActionEvent"],["id","user","type","text","formControlName","user",1,"form-control",3,"readonly"],["id","user","formControlName","user","autofocus","",1,"form-control"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"ngValue"],o,[3,"value"],[1,"invalid-feedback"],c,[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","generate_key","type","checkbox","formControlName","generate_key",1,"custom-control-input"],["for","generate_key",1,"custom-control-label"],O,["for","access_key",1,"cd-col-form-label",3,"ngClass"],H,[1,"input-group"],["id","access_key","type","password","formControlName","access_key",1,"form-control",3,"readonly"],["type","button","cdPasswordButton","access_key",1,"btn","btn-light"],["source","access_key"],Q,["for","secret_key",1,"cd-col-form-label",3,"ngClass"],J,["id","secret_key","type","password","formControlName","secret_key",1,"form-control",3,"readonly"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],j]},template:function(t,o){if(1&t&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5)(8,"div",6)(9,"div",7)(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10),e.YNc(13,zi,1,1,"input",11),e.YNc(14,Xi,3,2,"select",12),e.YNc(15,Ki,2,0,"span",13),e.qZA()(),e.YNc(16,Qi,6,0,"div",14),e.YNc(17,Ji,9,5,"div",14),e.YNc(18,ji,9,5,"div",14),e.qZA(),e.TgZ(19,"div",15)(20,"cd-form-button-panel",16),e.NdJ("submitActionEvent",function(){return o.onSubmit()}),e.ALo(21,"titlecase"),e.ALo(22,"upperFirst"),e.qZA()()(),e.BQk(),e.qZA()),2&t){const c=e.MAs(7);e.Q6J("modalRef",o.activeModal),e.xp6(4),e.pQV(e.lcZ(3,14,o.action))(e.lcZ(4,16,o.resource)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",o.formGroup),e.xp6(4),e.Q6J("ngClass",e.VKq(22,rn,!o.viewing)),e.xp6(3),e.Q6J("ngIf",o.viewing),e.xp6(1),e.Q6J("ngIf",!o.viewing),e.xp6(1),e.Q6J("ngIf",o.formGroup.showError("user",c,"required")),e.xp6(1),e.Q6J("ngIf",!o.viewing),e.xp6(1),e.Q6J("ngIf",!o.formGroup.getValue("generate_key")),e.xp6(1),e.Q6J("ngIf",!o.formGroup.getValue("generate_key")),e.xp6(2),e.Q6J("form",o.formGroup)("submitText",e.lcZ(21,18,o.action)+" "+e.lcZ(22,20,o.resource))("showSubmit",!o.viewing)}},dependencies:[g.mk,g.sg,g.O5,Ie.z,at.s,we.p,st.U,lt.C,Oe.o,Ae.b,We.P,C.V,r._Y,r.YN,r.Kr,r.Fj,r.Wl,r.EJ,r.JJ,r.JL,r.sg,r.u,g.rS,Ye.m]}),n})();class e_{}function t_(n,i){1&n&&(e.TgZ(0,"span",29),e.SDv(1,30),e.qZA())}function n_(n,i){1&n&&(e.TgZ(0,"span",29),e.SDv(1,31),e.qZA())}function o_(n,i){if(1&n&&(e.TgZ(0,"option",32),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t," ")}}function i_(n,i){1&n&&(e.TgZ(0,"span",29),e.SDv(1,33),e.qZA())}function __(n,i){1&n&&(e.TgZ(0,"span",29),e.SDv(1,47),e.qZA())}function r_(n,i){if(1&n&&(e.TgZ(0,"div",7)(1,"label",41),e.SDv(2,42),e.qZA(),e.TgZ(3,"div",10)(4,"div",43),e._UZ(5,"input",44)(6,"button",45)(7,"cd-copy-2-clipboard-button",46),e.qZA(),e.YNc(8,__,2,0,"span",15),e.qZA()()),2&n){const t=e.oxw(2),o=e.MAs(7);e.xp6(8),e.Q6J("ngIf",t.formGroup.showError("secret_key",o,"required"))}}function s_(n,i){if(1&n&&(e.TgZ(0,"fieldset")(1,"legend"),e.SDv(2,34),e.qZA(),e.TgZ(3,"div",7)(4,"div",35)(5,"div",36),e._UZ(6,"input",37),e.TgZ(7,"label",38),e.SDv(8,39),e.qZA()()()(),e.YNc(9,r_,9,1,"div",40),e.qZA()),2&n){const t=e.oxw();e.xp6(9),e.Q6J("ngIf",!t.editing&&!t.formGroup.getValue("generate_secret"))}}const a_=function(n){return{required:n}},l_=function(){return["read","write"]};let c_=(()=>{class n{constructor(t,o,c){this.formBuilder=t,this.bsModalRef=o,this.actionLabels=c,this.submitAction=new e.vpe,this.editing=!0,this.subusers=[],this.resource="Subuser",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({uid:[null],subuid:[null,[r.kI.required,this.subuserValidator()]],perm:[null,[r.kI.required]],generate_secret:[!0],secret_key:[null,[z.h.requiredIf({generate_secret:!1})]]})}subuserValidator(){const t=this;return o=>t.editing||(0,z.P)(o.value)?null:t.subusers.some(O=>v().isEqual(t.getSubuserName(O.id),o.value))?{subuserIdExists:!0}:null}getSubuserName(t){if(v().isEmpty(t))return t;const o=t.match(/([^:]+)(:(.+))?/);return v().isUndefined(o[3])?o[1]:o[3]}setEditing(t=!0){this.editing=t,this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE}setValues(t,o="",c=""){this.formGroup.setValue({uid:t,subuid:this.getSubuserName(o),perm:c,generate_secret:!0,secret_key:null})}setSubusers(t){this.subusers=t}onSubmit(){const t=this.formGroup.value,o=new e_;o.id=`${t.uid}:${t.subuid}`,o.permissions=t.perm,o.generate_secret=t.generate_secret,o.secret_key=t.secret_key,this.submitAction.emit(o),this.bsModalRef.close()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(he.O),e.Y36(x.Kz),e.Y36(l.p4))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-user-subuser-modal"]],outputs:{submitAction:"submitAction"},decls:39,vars:26,consts:function(){let i,t,o,c,O,H,Q,J,j,oe,Te,Me,Fe,Pe;return i="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",t="Username",o="Subuser",c="Autorisation",O="-- S\xE9lectionner une autorisation --",H="lire, \xE9crire",Q="complet",J="This field is required.",j="L'ID d'utilisateur secondaire s\xE9lectionn\xE9 est d\xE9j\xE0 utilis\xE9.",oe="This field is required.",Te="Cl\xE9 Swift",Me="G\xE9n\xE9rer automatiquement le secret",Fe="Clef secr\xE8te",Pe="This field is required.",[[3,"modalRef"],[1,"modal-title"],i,[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","uid",1,"cd-col-form-label"],t,[1,"cd-col-form-input"],["id","uid","type","text","formControlName","uid",1,"form-control",3,"readonly"],["for","subuid",1,"cd-col-form-label",3,"ngClass"],o,["id","subuid","type","text","formControlName","subuid","autofocus","",1,"form-control",3,"readonly"],["class","invalid-feedback",4,"ngIf"],["for","perm",1,"cd-col-form-label","required"],c,["id","perm","formControlName","perm",1,"form-select"],[3,"ngValue"],O,[3,"value",4,"ngFor","ngForOf"],["value","read-write"],H,["value","full-control"],Q,[4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],J,j,[3,"value"],oe,Te,[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","generate_secret","type","checkbox","formControlName","generate_secret",1,"custom-control-input"],["for","generate_secret",1,"custom-control-label"],Me,["class","form-group row",4,"ngIf"],["for","secret_key",1,"cd-col-form-label","required"],Fe,[1,"input-group"],["id","secret_key","type","password","formControlName","secret_key",1,"form-control"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],Pe]},template:function(t,o){if(1&t&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5)(8,"div",6)(9,"div",7)(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10),e._UZ(13,"input",11),e.qZA()(),e.TgZ(14,"div",7)(15,"label",12),e.SDv(16,13),e.qZA(),e.TgZ(17,"div",10),e._UZ(18,"input",14),e.YNc(19,t_,2,0,"span",15),e.YNc(20,n_,2,0,"span",15),e.qZA()(),e.TgZ(21,"div",7)(22,"label",16),e.SDv(23,17),e.qZA(),e.TgZ(24,"div",10)(25,"select",18)(26,"option",19),e.SDv(27,20),e.qZA(),e.YNc(28,o_,2,2,"option",21),e.TgZ(29,"option",22),e.SDv(30,23),e.qZA(),e.TgZ(31,"option",24),e.SDv(32,25),e.qZA()(),e.YNc(33,i_,2,0,"span",15),e.qZA()(),e.YNc(34,s_,10,1,"fieldset",26),e.qZA(),e.TgZ(35,"div",27)(36,"cd-form-button-panel",28),e.NdJ("submitActionEvent",function(){return o.onSubmit()}),e.ALo(37,"titlecase"),e.ALo(38,"upperFirst"),e.qZA()()(),e.BQk(),e.qZA()),2&t){const c=e.MAs(7);e.Q6J("modalRef",o.bsModalRef),e.xp6(4),e.pQV(e.lcZ(3,15,o.action))(e.lcZ(4,17,o.resource)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",o.formGroup),e.xp6(7),e.Q6J("readonly",!0),e.xp6(2),e.Q6J("ngClass",e.VKq(23,a_,!o.editing)),e.xp6(3),e.Q6J("readonly",o.editing),e.xp6(1),e.Q6J("ngIf",o.formGroup.showError("subuid",c,"required")),e.xp6(1),e.Q6J("ngIf",o.formGroup.showError("subuid",c,"subuserIdExists")),e.xp6(6),e.Q6J("ngValue",null),e.xp6(2),e.Q6J("ngForOf",e.DdM(25,l_)),e.xp6(5),e.Q6J("ngIf",o.formGroup.showError("perm",c,"required")),e.xp6(1),e.Q6J("ngIf",!o.editing),e.xp6(2),e.Q6J("form",o.formGroup)("submitText",e.lcZ(37,19,o.action)+" "+e.lcZ(38,21,o.resource))}},dependencies:[g.mk,g.sg,g.O5,Ie.z,at.s,we.p,st.U,lt.C,Oe.o,Ae.b,We.P,C.V,r._Y,r.YN,r.Kr,r.Fj,r.Wl,r.EJ,r.JJ,r.JL,r.sg,r.u,g.rS,Ye.m]}),n})();var Mn=d(13472);let Sn=(()=>{class n{constructor(t,o){this.activeModal=t,this.actionLabels=o,this.resource="Swift Key",this.action=this.actionLabels.SHOW}setValues(t,o){this.user=t,this.secret_key=o}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(x.Kz),e.Y36(l.p4))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-user-swift-key-modal"]],decls:23,vars:11,consts:function(){let i,t,o;return i="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",t="Username",o="Clef secr\xE8te",[[3,"modalRef"],[1,"modal-title"],i,[1,"modal-content"],[1,"modal-body"],["novalidate",""],[1,"form-group","row"],["for","user",1,"cd-col-form-label"],t,[1,"cd-col-form-input"],["id","user","name","user","type","text",1,"form-control",3,"readonly","ngModel","ngModelChange"],["for","secret_key",1,"cd-col-form-label"],o,[1,"input-group"],["id","secret_key","name","secret_key","type","password",1,"form-control",3,"ngModel","readonly","ngModelChange"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],[1,"modal-footer"],[3,"backAction"]]},template:function(t,o){1&t&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"div",4)(7,"form",5)(8,"div",6)(9,"label",7),e.SDv(10,8),e.qZA(),e.TgZ(11,"div",9)(12,"input",10),e.NdJ("ngModelChange",function(O){return o.user=O}),e.qZA()()(),e.TgZ(13,"div",6)(14,"label",11),e.SDv(15,12),e.qZA(),e.TgZ(16,"div",9)(17,"div",13)(18,"input",14),e.NdJ("ngModelChange",function(O){return o.secret_key=O}),e.qZA(),e._UZ(19,"button",15)(20,"cd-copy-2-clipboard-button",16),e.qZA()()()()(),e.TgZ(21,"div",17)(22,"cd-back-button",18),e.NdJ("backAction",function(){return o.activeModal.close()}),e.qZA()(),e.BQk(),e.qZA()),2&t&&(e.Q6J("modalRef",o.activeModal),e.xp6(4),e.pQV(e.lcZ(3,7,o.action))(e.lcZ(4,9,o.resource)),e.QtT(2),e.xp6(8),e.Q6J("readonly",!0)("ngModel",o.user),e.xp6(6),e.Q6J("ngModel",o.secret_key)("readonly",!0))},dependencies:[Mn.W,Ie.z,at.s,lt.C,Oe.o,Ae.b,We.P,r._Y,r.Fj,r.JJ,r.JL,r.On,r.F,g.rS,Ye.m]}),n})();var u_=d(17932);function d_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,55),e.qZA())}function f_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,56),e.qZA())}function p_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,57),e.qZA())}function g_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,61),e.qZA())}function T_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,62),e.qZA())}function E_(n,i){if(1&n&&(e.TgZ(0,"div",8)(1,"label",58),e.SDv(2,59),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",60),e.YNc(5,g_,2,0,"span",13),e.YNc(6,T_,2,0,"span",13),e.qZA()()),2&n){e.oxw();const t=e.MAs(2),o=e.oxw();e.xp6(4),e.Q6J("readonly",o.editing),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("tenant",t,"pattern")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("tenant",t,"notUnique"))}}function R_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,63),e.qZA())}function m_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,64),e.qZA())}function h_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,65),e.qZA())}function M_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,66),e.qZA())}function S_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,69),e.qZA())}function C_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,70),e.qZA())}function F_(n,i){if(1&n&&(e.TgZ(0,"div",8),e._UZ(1,"label",67),e.TgZ(2,"div",11),e._UZ(3,"input",68),e.YNc(4,S_,2,0,"span",13),e.YNc(5,C_,2,0,"span",13),e.qZA()()),2&n){e.oxw();const t=e.MAs(2),o=e.oxw();e.xp6(4),e.Q6J("ngIf",o.userForm.showError("max_buckets",t,"required")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("max_buckets",t,"min"))}}function O_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,81),e.qZA())}function N_(n,i){if(1&n&&(e.TgZ(0,"div",8)(1,"label",75),e.SDv(2,76),e.qZA(),e.TgZ(3,"div",11)(4,"div",77),e._UZ(5,"input",78)(6,"button",79)(7,"cd-copy-2-clipboard-button",80),e.qZA(),e.YNc(8,O_,2,0,"span",13),e.qZA()()),2&n){e.oxw(2);const t=e.MAs(2),o=e.oxw();e.xp6(8),e.Q6J("ngIf",o.userForm.showError("access_key",t,"required"))}}function P_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,87),e.qZA())}function A_(n,i){if(1&n&&(e.TgZ(0,"div",8)(1,"label",82),e.SDv(2,83),e.qZA(),e.TgZ(3,"div",11)(4,"div",77),e._UZ(5,"input",84)(6,"button",85)(7,"cd-copy-2-clipboard-button",86),e.qZA(),e.YNc(8,P_,2,0,"span",13),e.qZA()()),2&n){e.oxw(2);const t=e.MAs(2),o=e.oxw();e.xp6(8),e.Q6J("ngIf",o.userForm.showError("secret_key",t,"required"))}}function b_(n,i){if(1&n&&(e.TgZ(0,"fieldset")(1,"legend"),e.SDv(2,71),e.qZA(),e.TgZ(3,"div",8)(4,"div",14)(5,"div",15),e._UZ(6,"input",72),e.TgZ(7,"label",73),e.SDv(8,74),e.qZA()()()(),e.YNc(9,N_,9,1,"div",19),e.YNc(10,A_,9,1,"div",19),e.qZA()),2&n){const t=e.oxw(2);e.xp6(9),e.Q6J("ngIf",!t.editing&&!t.userForm.getValue("generate_key")),e.xp6(1),e.Q6J("ngIf",!t.editing&&!t.userForm.getValue("generate_key"))}}function I_(n,i){1&n&&(e.TgZ(0,"span",98)(1,"span",99),e.SDv(2,100),e.qZA()())}const He=function(n){return[n]};function G_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"span")(1,"div",77)(2,"span",101),e._UZ(3,"i"),e.qZA(),e._UZ(4,"input",102),e.TgZ(5,"span",101),e._UZ(6,"i"),e.qZA(),e._UZ(7,"input",102),e.TgZ(8,"button",103),e.NdJ("click",function(){const O=e.CHM(t).index,H=e.oxw(3);return e.KtG(H.showSubuserModal(O))}),e._UZ(9,"i",95),e.qZA(),e.TgZ(10,"button",104),e.NdJ("click",function(){const O=e.CHM(t).index,H=e.oxw(3);return e.KtG(H.deleteSubuser(O))}),e._UZ(11,"i",95),e.qZA()(),e._UZ(12,"span",99),e.qZA()}if(2&n){const t=i.$implicit,o=e.oxw(3);e.xp6(3),e.Tol(o.icons.user),e.xp6(1),e.s9C("value",t.id),e.xp6(2),e.Tol(o.icons.share),e.xp6(1),e.s9C("value","full-control"===t.permissions?"full":t.permissions),e.xp6(2),e.Q6J("ngClass",e.VKq(10,He,o.icons.edit)),e.xp6(2),e.Q6J("ngClass",e.VKq(12,He,o.icons.destroy))}}function y_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"fieldset")(1,"legend"),e.SDv(2,88),e.qZA(),e.TgZ(3,"div",89)(4,"div",14),e.YNc(5,I_,3,0,"span",90),e.YNc(6,G_,13,14,"span",91),e.TgZ(7,"div",92)(8,"div",93)(9,"button",94),e.NdJ("click",function(){e.CHM(t);const c=e.oxw(2);return e.KtG(c.showSubuserModal())}),e._UZ(10,"i",95),e.ynx(11),e.SDv(12,96),e.ALo(13,"titlecase"),e.ALo(14,"upperFirst"),e.BQk(),e.qZA()()(),e._UZ(15,"span",97),e.qZA()()()}if(2&n){const t=e.oxw(2);e.xp6(5),e.Q6J("ngIf",0===t.subusers.length),e.xp6(1),e.Q6J("ngForOf",t.subusers),e.xp6(4),e.Q6J("ngClass",e.VKq(9,He,t.icons.add)),e.xp6(4),e.pQV(e.lcZ(13,5,t.actionLabels.CREATE))(e.lcZ(14,7,t.subuserLabel)),e.QtT(12)}}function L_(n,i){1&n&&(e.TgZ(0,"span",98)(1,"span",99),e.SDv(2,110),e.qZA()())}function D_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"span")(1,"div",77)(2,"div",101),e._UZ(3,"i"),e.qZA(),e._UZ(4,"input",102),e.TgZ(5,"button",111),e.NdJ("click",function(){const O=e.CHM(t).index,H=e.oxw(3);return e.KtG(H.showS3KeyModal(O))}),e._UZ(6,"i",95),e.qZA(),e.TgZ(7,"button",112),e.NdJ("click",function(){const O=e.CHM(t).index,H=e.oxw(3);return e.KtG(H.deleteS3Key(O))}),e._UZ(8,"i",95),e.qZA()(),e._UZ(9,"span",99),e.qZA()}if(2&n){const t=i.$implicit,o=e.oxw(3);e.xp6(3),e.Tol(o.icons.key),e.xp6(1),e.s9C("value",t.user),e.xp6(2),e.Q6J("ngClass",e.VKq(6,He,o.icons.show)),e.xp6(2),e.Q6J("ngClass",e.VKq(8,He,o.icons.destroy))}}function v_(n,i){1&n&&(e.TgZ(0,"span",98)(1,"span",99),e.SDv(2,113),e.qZA()())}function w_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"span")(1,"div",77)(2,"span",101),e._UZ(3,"i"),e.qZA(),e._UZ(4,"input",102),e.TgZ(5,"button",114),e.NdJ("click",function(){const O=e.CHM(t).index,H=e.oxw(3);return e.KtG(H.showSwiftKeyModal(O))}),e._UZ(6,"i",95),e.qZA()(),e._UZ(7,"span",99),e.qZA()}if(2&n){const t=i.$implicit,o=e.oxw(3);e.xp6(3),e.Tol(o.icons.key),e.xp6(1),e.s9C("value",t.user),e.xp6(2),e.Q6J("ngClass",e.VKq(5,He,o.icons.show))}}function W_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"fieldset")(1,"legend"),e.SDv(2,105),e.qZA(),e.TgZ(3,"div",8)(4,"label",67),e.SDv(5,106),e.qZA(),e.TgZ(6,"div",11),e.YNc(7,L_,3,0,"span",90),e.YNc(8,D_,10,10,"span",91),e.TgZ(9,"div",92)(10,"div",93)(11,"button",107),e.NdJ("click",function(){e.CHM(t);const c=e.oxw(2);return e.KtG(c.showS3KeyModal())}),e._UZ(12,"i",95),e.ynx(13),e.SDv(14,108),e.ALo(15,"titlecase"),e.ALo(16,"upperFirst"),e.BQk(),e.qZA()()(),e._UZ(17,"span",97),e.qZA(),e._UZ(18,"hr"),e.qZA(),e.TgZ(19,"div",8)(20,"label",67),e.SDv(21,109),e.qZA(),e.TgZ(22,"div",11),e.YNc(23,v_,3,0,"span",90),e.YNc(24,w_,8,7,"span",91),e.qZA()()()}if(2&n){const t=e.oxw(2);e.xp6(7),e.Q6J("ngIf",0===t.s3Keys.length),e.xp6(1),e.Q6J("ngForOf",t.s3Keys),e.xp6(4),e.Q6J("ngClass",e.VKq(11,He,t.icons.add)),e.xp6(4),e.pQV(e.lcZ(15,7,t.actionLabels.CREATE))(e.lcZ(16,9,t.s3keyLabel)),e.QtT(14),e.xp6(7),e.Q6J("ngIf",0===t.swiftKeys.length),e.xp6(1),e.Q6J("ngForOf",t.swiftKeys)}}function U_(n,i){1&n&&(e.TgZ(0,"span",98)(1,"span",99),e.SDv(2,118),e.qZA()())}function $_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"span")(1,"div",77)(2,"div",101),e._UZ(3,"i"),e.qZA(),e._UZ(4,"input",102),e.TgZ(5,"button",119),e.NdJ("click",function(){const O=e.CHM(t).index,H=e.oxw(3);return e.KtG(H.showCapabilityModal(O))}),e._UZ(6,"i",95),e.qZA(),e.TgZ(7,"button",120),e.NdJ("click",function(){const O=e.CHM(t).index,H=e.oxw(3);return e.KtG(H.deleteCapability(O))}),e._UZ(8,"i",95),e.qZA()(),e._UZ(9,"span",99),e.qZA()}if(2&n){const t=i.$implicit,o=e.oxw(3);e.xp6(3),e.Tol(o.icons.share),e.xp6(1),e.hYB("value","",t.type,":",t.perm,""),e.xp6(2),e.Q6J("ngClass",e.VKq(7,He,o.icons.edit)),e.xp6(2),e.Q6J("ngClass",e.VKq(9,He,o.icons.destroy))}}function x_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"fieldset")(1,"legend"),e.SDv(2,115),e.qZA(),e.TgZ(3,"div",8)(4,"div",14),e.YNc(5,U_,3,0,"span",90),e.YNc(6,$_,10,11,"span",91),e.TgZ(7,"div",92)(8,"div",93)(9,"button",116),e.NdJ("click",function(){e.CHM(t);const c=e.oxw(2);return e.KtG(c.showCapabilityModal())}),e.ALo(10,"pipeFunction"),e.ALo(11,"pipeFunction"),e._UZ(12,"i",95),e.ynx(13),e.SDv(14,117),e.ALo(15,"titlecase"),e.ALo(16,"upperFirst"),e.BQk(),e.qZA()()(),e._UZ(17,"span",97),e.qZA()()()}if(2&n){const t=e.oxw(2);e.xp6(5),e.Q6J("ngIf",0===t.capabilities.length),e.xp6(1),e.Q6J("ngForOf",t.capabilities),e.xp6(3),e.Q6J("disabled",e.xi3(10,7,t.capabilities,t.hasAllCapabilities))("disableTooltip",!e.xi3(11,10,t.capabilities,t.hasAllCapabilities)),e.xp6(3),e.Q6J("ngClass",e.VKq(17,He,t.icons.add)),e.xp6(4),e.pQV(e.lcZ(15,13,t.actionLabels.ADD))(e.lcZ(16,15,t.capabilityLabel)),e.QtT(14)}}function Z_(n,i){1&n&&(e.TgZ(0,"div",8)(1,"div",14)(2,"div",15),e._UZ(3,"input",121),e.TgZ(4,"label",122),e.SDv(5,123),e.qZA()()()())}function k_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,127),e.qZA())}function B_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,128),e.qZA())}function z_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,129),e.qZA())}function q_(n,i){if(1&n&&(e.TgZ(0,"div",8)(1,"label",124),e.SDv(2,125),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",126),e.YNc(5,k_,2,0,"span",13),e.YNc(6,B_,2,0,"span",13),e.YNc(7,z_,2,0,"span",13),e.qZA()()),2&n){e.oxw();const t=e.MAs(2),o=e.oxw();e.xp6(5),e.Q6J("ngIf",o.userForm.showError("user_quota_max_size",t,"required")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("user_quota_max_size",t,"quotaMaxSize")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("user_quota_max_size",o.formDir,"pattern"))}}function H_(n,i){1&n&&(e.TgZ(0,"div",8)(1,"div",14)(2,"div",15),e._UZ(3,"input",130),e.TgZ(4,"label",131),e.SDv(5,132),e.qZA()()()())}function X_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,136),e.qZA())}function K_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,137),e.qZA())}function Q_(n,i){if(1&n&&(e.TgZ(0,"div",8)(1,"label",133),e.SDv(2,134),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",135),e.YNc(5,X_,2,0,"span",13),e.YNc(6,K_,2,0,"span",13),e.qZA()()),2&n){e.oxw();const t=e.MAs(2),o=e.oxw();e.xp6(5),e.Q6J("ngIf",o.userForm.showError("user_quota_max_objects",t,"required")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("user_quota_max_objects",t,"min"))}}function Y_(n,i){1&n&&(e.TgZ(0,"div",8)(1,"div",14)(2,"div",15),e._UZ(3,"input",138),e.TgZ(4,"label",139),e.SDv(5,140),e.qZA()()()())}function J_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,144),e.qZA())}function V_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,145),e.qZA())}function j_(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,146),e.qZA())}function er(n,i){if(1&n&&(e.TgZ(0,"div",8)(1,"label",141),e.SDv(2,142),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",143),e.YNc(5,J_,2,0,"span",13),e.YNc(6,V_,2,0,"span",13),e.YNc(7,j_,2,0,"span",13),e.qZA()()),2&n){e.oxw();const t=e.MAs(2),o=e.oxw();e.xp6(5),e.Q6J("ngIf",o.userForm.showError("bucket_quota_max_size",t,"required")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("bucket_quota_max_size",t,"quotaMaxSize")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("bucket_quota_max_size",o.formDir,"pattern"))}}function tr(n,i){1&n&&(e.TgZ(0,"div",8)(1,"div",14)(2,"div",15),e._UZ(3,"input",147),e.TgZ(4,"label",148),e.SDv(5,149),e.qZA()()()())}function nr(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,153),e.qZA())}function or(n,i){1&n&&(e.TgZ(0,"span",54),e.SDv(1,154),e.qZA())}function ir(n,i){if(1&n&&(e.TgZ(0,"div",8)(1,"label",150),e.SDv(2,151),e.qZA(),e.TgZ(3,"div",11),e._UZ(4,"input",152),e.YNc(5,nr,2,0,"span",13),e.YNc(6,or,2,0,"span",13),e.qZA()()),2&n){e.oxw();const t=e.MAs(2),o=e.oxw();e.xp6(5),e.Q6J("ngIf",o.userForm.showError("bucket_quota_max_objects",t,"required")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("bucket_quota_max_objects",t,"min"))}}const Cn=function(n){return{required:n}};function _r(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",1)(1,"form",2,3)(3,"div",4)(4,"div",5),e.SDv(5,6),e.ALo(6,"titlecase"),e.ALo(7,"upperFirst"),e.qZA(),e.TgZ(8,"div",7)(9,"div",8)(10,"label",9),e.SDv(11,10),e.qZA(),e.TgZ(12,"div",11),e._UZ(13,"input",12),e.YNc(14,d_,2,0,"span",13),e.YNc(15,f_,2,0,"span",13),e.YNc(16,p_,2,0,"span",13),e.qZA()(),e.TgZ(17,"div",8)(18,"div",14)(19,"div",15)(20,"input",16),e.NdJ("click",function(){e.CHM(t);const c=e.oxw();return e.KtG(c.updateFieldsWhenTenanted())}),e.qZA(),e.TgZ(21,"label",17),e.SDv(22,18),e.qZA()()()(),e.YNc(23,E_,7,3,"div",19),e.TgZ(24,"div",8)(25,"label",20),e.SDv(26,21),e.qZA(),e.TgZ(27,"div",11),e._UZ(28,"input",22),e.YNc(29,R_,2,0,"span",13),e.YNc(30,m_,2,0,"span",13),e.qZA()(),e.TgZ(31,"div",8)(32,"label",23),e.SDv(33,24),e.qZA(),e.TgZ(34,"div",11),e._UZ(35,"input",25),e.YNc(36,h_,2,0,"span",13),e.YNc(37,M_,2,0,"span",13),e.qZA()(),e.TgZ(38,"div",8)(39,"label",26),e.SDv(40,27),e.qZA(),e.TgZ(41,"div",11)(42,"select",28),e.NdJ("change",function(c){e.CHM(t);const O=e.oxw();return e.KtG(O.onMaxBucketsModeChange(c.target.value))}),e.TgZ(43,"option",29),e.SDv(44,30),e.qZA(),e.TgZ(45,"option",31),e.SDv(46,32),e.qZA(),e.TgZ(47,"option",33),e.SDv(48,34),e.qZA()()()(),e.YNc(49,F_,6,2,"div",19),e.TgZ(50,"div",8)(51,"div",14)(52,"div",15),e._UZ(53,"input",35),e.TgZ(54,"label",36),e.SDv(55,37),e.qZA(),e.TgZ(56,"cd-helper"),e.SDv(57,38),e.qZA()()()(),e.TgZ(58,"div",8)(59,"div",14)(60,"div",15),e._UZ(61,"input",39),e.TgZ(62,"label",40),e.SDv(63,41),e.qZA(),e.TgZ(64,"cd-helper"),e.SDv(65,42),e.qZA()()()(),e.YNc(66,b_,11,2,"fieldset",43),e.YNc(67,y_,16,11,"fieldset",43),e.YNc(68,W_,25,13,"fieldset",43),e.YNc(69,x_,18,19,"fieldset",43),e.TgZ(70,"fieldset")(71,"legend"),e.SDv(72,44),e.qZA(),e.TgZ(73,"div",8)(74,"div",14)(75,"div",15),e._UZ(76,"input",45),e.TgZ(77,"label",46),e.SDv(78,47),e.qZA()()()(),e.YNc(79,Z_,6,0,"div",19),e.YNc(80,q_,8,3,"div",19),e.YNc(81,H_,6,0,"div",19),e.YNc(82,Q_,7,2,"div",19),e.qZA(),e.TgZ(83,"fieldset")(84,"legend"),e.SDv(85,48),e.qZA(),e.TgZ(86,"div",8)(87,"div",14)(88,"div",15),e._UZ(89,"input",49),e.TgZ(90,"label",50),e.SDv(91,51),e.qZA()()()(),e.YNc(92,Y_,6,0,"div",19),e.YNc(93,er,8,3,"div",19),e.YNc(94,tr,6,0,"div",19),e.YNc(95,ir,7,2,"div",19),e.qZA()(),e.TgZ(96,"div",52)(97,"cd-form-button-panel",53),e.NdJ("submitActionEvent",function(){e.CHM(t);const c=e.oxw();return e.KtG(c.onSubmit())}),e.ALo(98,"titlecase"),e.ALo(99,"upperFirst"),e.qZA()()()()()}if(2&n){const t=e.MAs(2),o=e.oxw();e.xp6(1),e.Q6J("formGroup",o.userForm),e.xp6(6),e.pQV(e.lcZ(6,30,o.action))(e.lcZ(7,32,o.resource)),e.QtT(5),e.xp6(3),e.Q6J("ngClass",e.VKq(38,Cn,!o.editing)),e.xp6(3),e.Q6J("readonly",o.editing),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("user_id",t,"required")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("user_id",t,"pattern")),e.xp6(1),e.Q6J("ngIf",!o.userForm.getValue("show_tenant")&&o.userForm.showError("user_id",t,"notUnique")),e.xp6(4),e.Q6J("readonly",!0),e.xp6(3),e.Q6J("ngIf",o.userForm.getValue("show_tenant")),e.xp6(2),e.Q6J("ngClass",e.VKq(40,Cn,!o.editing)),e.xp6(4),e.Q6J("ngIf",o.userForm.showError("display_name",t,"pattern")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("display_name",t,"required")),e.xp6(6),e.Q6J("ngIf",o.userForm.showError("email",t,"email")),e.xp6(1),e.Q6J("ngIf",o.userForm.showError("email",t,"notUnique")),e.xp6(12),e.Q6J("ngIf",1==o.userForm.get("max_buckets_mode").value),e.xp6(17),e.Q6J("ngIf",!o.editing),e.xp6(1),e.Q6J("ngIf",o.editing),e.xp6(1),e.Q6J("ngIf",o.editing),e.xp6(1),e.Q6J("ngIf",o.editing),e.xp6(10),e.Q6J("ngIf",o.userForm.controls.user_quota_enabled.value),e.xp6(1),e.Q6J("ngIf",o.userForm.controls.user_quota_enabled.value&&!o.userForm.getValue("user_quota_max_size_unlimited")),e.xp6(1),e.Q6J("ngIf",o.userForm.controls.user_quota_enabled.value),e.xp6(1),e.Q6J("ngIf",o.userForm.controls.user_quota_enabled.value&&!o.userForm.getValue("user_quota_max_objects_unlimited")),e.xp6(10),e.Q6J("ngIf",o.userForm.controls.bucket_quota_enabled.value),e.xp6(1),e.Q6J("ngIf",o.userForm.controls.bucket_quota_enabled.value&&!o.userForm.getValue("bucket_quota_max_size_unlimited")),e.xp6(1),e.Q6J("ngIf",o.userForm.controls.bucket_quota_enabled.value),e.xp6(1),e.Q6J("ngIf",o.userForm.controls.bucket_quota_enabled.value&&!o.userForm.getValue("bucket_quota_max_objects_unlimited")),e.xp6(2),e.Q6J("form",o.userForm)("submitText",e.lcZ(98,34,o.action)+" "+e.lcZ(99,36,o.resource))}}let Fn=(()=>{class n extends q.E{constructor(t,o,c,O,H,Q,J){super(),this.formBuilder=t,this.route=o,this.router=c,this.rgwUserService=O,this.modalService=H,this.notificationService=Q,this.actionLabels=J,this.editing=!1,this.submitObservables=[],this.icons=$.P,this.subusers=[],this.s3Keys=[],this.swiftKeys=[],this.capabilities=[],this.showTenant=!1,this.previousTenant=null,this.resource="user",this.subuserLabel="subuser",this.s3keyLabel="S3 Key",this.capabilityLabel="capability",this.editing=this.router.url.startsWith(`/rgw/user/${l.MQ.EDIT}`),this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE,this.createForm()}createForm(){this.userForm=this.formBuilder.group({user_id:[null,[r.kI.required,r.kI.pattern(/^[a-zA-Z0-9!@#%^&*()_-]+$/)],this.editing?[]:[z.h.unique(this.rgwUserService.exists,this.rgwUserService,()=>this.userForm.getValue("tenant"))]],show_tenant:[this.editing],tenant:[null,[r.kI.pattern(/^[a-zA-Z0-9!@#%^&*()_-]+$/)],this.editing?[]:[z.h.unique(this.rgwUserService.exists,this.rgwUserService,()=>this.userForm.getValue("user_id"),!0)]],display_name:[null,[r.kI.required,r.kI.pattern(/^[a-zA-Z0-9!@#%^&*()._ -]+$/)]],email:[null,[z.h.email],[z.h.unique(this.rgwUserService.emailExists,this.rgwUserService)]],max_buckets_mode:[1],max_buckets:[1e3,[z.h.requiredIf({max_buckets_mode:"1"}),z.h.number(!1)]],system:[!1],suspended:[!1],generate_key:[!0],access_key:[null,[z.h.requiredIf({generate_key:!1})]],secret_key:[null,[z.h.requiredIf({generate_key:!1})]],user_quota_enabled:[!1],user_quota_max_size_unlimited:[!0],user_quota_max_size:[null,[z.h.composeIf({user_quota_enabled:!0,user_quota_max_size_unlimited:!1},[r.kI.required,this.quotaMaxSizeValidator])]],user_quota_max_objects_unlimited:[!0],user_quota_max_objects:[null,[z.h.requiredIf({user_quota_enabled:!0,user_quota_max_objects_unlimited:!1})]],bucket_quota_enabled:[!1],bucket_quota_max_size_unlimited:[!0],bucket_quota_max_size:[null,[z.h.composeIf({bucket_quota_enabled:!0,bucket_quota_max_size_unlimited:!1},[r.kI.required,this.quotaMaxSizeValidator])]],bucket_quota_max_objects_unlimited:[!0],bucket_quota_max_objects:[null,[z.h.requiredIf({bucket_quota_enabled:!0,bucket_quota_max_objects_unlimited:!1})]]})}ngOnInit(){this.route.params.subscribe(t=>{if(!t.hasOwnProperty("uid"))return void this.loadingReady();const o=decodeURIComponent(t.uid),c=[];c.push(this.rgwUserService.get(o)),c.push(this.rgwUserService.getQuota(o)),(0,k.D)(c).subscribe(O=>{const H=v().clone(this.userForm.value);let Q=v().pick(O[0],v().keys(this.userForm.value));switch(Q.max_buckets){case-1:Q.max_buckets_mode=-1,Q.max_buckets="";break;case 0:Q.max_buckets_mode=0,Q.max_buckets="";break;default:Q.max_buckets_mode=1}["user","bucket"].forEach(j=>{const oe=O[1][j+"_quota"];Q[j+"_quota_enabled"]=oe.enabled,oe.max_size<0?(Q[j+"_quota_max_size_unlimited"]=!0,Q[j+"_quota_max_size"]=null):(Q[j+"_quota_max_size_unlimited"]=!1,Q[j+"_quota_max_size"]=`${oe.max_size} B`),oe.max_objects<0?(Q[j+"_quota_max_objects_unlimited"]=!0,Q[j+"_quota_max_objects"]=null):(Q[j+"_quota_max_objects_unlimited"]=!1,Q[j+"_quota_max_objects"]=oe.max_objects)}),Q=v().merge(H,Q),this.userForm.setValue(Q),this.subusers=O[0].subusers,this.s3Keys=O[0].keys,this.swiftKeys=O[0].swift_keys;const J={"read, write":"*"};O[0].caps.forEach(j=>{j.perm in J&&(j.perm=J[j.perm])}),this.capabilities=O[0].caps,this.loadingReady()},()=>{this.loadingError()})})}goToListView(){this.router.navigate(["/rgw/user"])}onSubmit(){let t;if(this.userForm.pristine)return void this.goToListView();const o=this.getUID();if(this.editing){if(this._isGeneralDirty()){const c=this._getUpdateArgs();this.submitObservables.push(this.rgwUserService.update(o,c))}t="Updated Object Gateway user '\n " + o + "'\n "}else{const c=this._getCreateArgs();this.submitObservables.push(this.rgwUserService.create(c)),t="Created Object Gateway user '\n " + o + "'\n "}if(this._isUserQuotaDirty()){const c=this._getUserQuotaArgs();this.submitObservables.push(this.rgwUserService.updateQuota(o,c))}if(this._isBucketQuotaDirty()){const c=this._getBucketQuotaArgs();this.submitObservables.push(this.rgwUserService.updateQuota(o,c))}(0,Li.z)(...this.submitObservables).subscribe({error:()=>{this.userForm.setErrors({cdSubmitButton:!0})},complete:()=>{this.notificationService.show(M.k.success,t),this.goToListView()}})}updateFieldsWhenTenanted(){this.showTenant=this.userForm.getValue("show_tenant"),this.showTenant?(this.userForm.get("user_id").markAsTouched(),this.previousTenant=this.userForm.get("tenant").value,this.userForm.get("tenant").patchValue(null)):(this.userForm.get("user_id").markAsUntouched(),this.userForm.get("tenant").patchValue(this.previousTenant))}getUID(){let t=this.userForm.getValue("user_id");const o=this.userForm?.getValue("tenant");return o&&o.length>0&&(t=`${this.userForm.getValue("tenant")}$${t}`),t}quotaMaxSizeValidator(t){return(0,z.P)(t.value)?null:null===RegExp("^(\\d+(\\.\\d+)?)\\s*(B|K(B|iB)?|M(B|iB)?|G(B|iB)?|T(B|iB)?)?$","i").exec(t.value)||(new _n.H).toBytes(t.value)<1024?{quotaMaxSize:!0}:null}setSubuser(t,o){const c={"full-control":"full","read-write":"readwrite"},O=this.getUID();this.submitObservables.push(this.rgwUserService.createSubuser(O,{subuser:t.id,access:t.permissions in c?c[t.permissions]:t.permissions,key_type:"swift",secret_key:t.secret_key,generate_secret:t.generate_secret?"true":"false"})),v().isNumber(o)?this.subusers[o]=t:(this.subusers.push(t),this.swiftKeys.push({user:t.id,secret_key:t.generate_secret?"Apply your changes first...":t.secret_key})),this.userForm.markAsDirty()}deleteSubuser(t){const o=this.subusers[t];this.submitObservables.push(this.rgwUserService.deleteSubuser(this.getUID(),o.id)),this.s3Keys=this.s3Keys.filter(c=>c.user!==o.id),this.swiftKeys=this.swiftKeys.filter(c=>c.user!==o.id),this.subusers.splice(t,1),this.userForm.markAsDirty()}setCapability(t,o){const c=this.getUID();if(v().isNumber(o)){const O=this.capabilities[o];this.submitObservables.push(this.rgwUserService.deleteCapability(c,O.type,O.perm)),this.submitObservables.push(this.rgwUserService.addCapability(c,t.type,t.perm)),this.capabilities[o]=t}else this.submitObservables.push(this.rgwUserService.addCapability(c,t.type,t.perm)),this.capabilities=[...this.capabilities,t];this.userForm.markAsDirty()}deleteCapability(t){const o=this.capabilities[t];this.submitObservables.push(this.rgwUserService.deleteCapability(this.getUID(),o.type,o.perm)),this.capabilities.splice(t,1),this.capabilities=[...this.capabilities],this.userForm.markAsDirty()}hasAllCapabilities(t){return!v().difference(mn.getAll(),v().map(t,"type")).length}setS3Key(t,o){if(!v().isNumber(o)){const c=t.user.match(/([^:]+)(:(.+))?/),O=c[1],H={subuser:c[2]?c[3]:"",generate_key:t.generate_key?"true":"false"};"false"===H.generate_key&&(v().isNil(t.access_key)||(H.access_key=t.access_key),v().isNil(t.secret_key)||(H.secret_key=t.secret_key)),this.submitObservables.push(this.rgwUserService.addS3Key(O,H)),this.s3Keys.push({user:t.user,access_key:t.generate_key?"Apply your changes first...":t.access_key,secret_key:t.generate_key?"Apply your changes first...":t.secret_key})}this.userForm.markAsDirty()}deleteS3Key(t){const o=this.s3Keys[t];this.submitObservables.push(this.rgwUserService.deleteS3Key(this.getUID(),o.access_key)),this.s3Keys.splice(t,1),this.userForm.markAsDirty()}showSubuserModal(t){const o=this.getUID(),c=this.modalService.show(c_);if(v().isNumber(t)){const O=this.subusers[t];c.componentInstance.setEditing(),c.componentInstance.setValues(o,O.id,O.permissions)}else c.componentInstance.setEditing(!1),c.componentInstance.setValues(o),c.componentInstance.setSubusers(this.subusers);c.componentInstance.submitAction.subscribe(O=>{this.setSubuser(O,t)})}showS3KeyModal(t){const o=this.modalService.show(hn);if(v().isNumber(t)){const c=this.s3Keys[t];o.componentInstance.setViewing(),o.componentInstance.setValues(c.user,c.access_key,c.secret_key)}else{const c=this._getS3KeyUserCandidates();o.componentInstance.setViewing(!1),o.componentInstance.setUserCandidates(c),o.componentInstance.submitAction.subscribe(O=>{this.setS3Key(O)})}}showSwiftKeyModal(t){const o=this.modalService.show(Sn),c=this.swiftKeys[t];o.componentInstance.setValues(c.user,c.secret_key)}showCapabilityModal(t){const o=this.modalService.show(Bi);if(v().isNumber(t)){const c=this.capabilities[t];o.componentInstance.setEditing(),o.componentInstance.setValues(c.type,c.perm)}else o.componentInstance.setEditing(!1),o.componentInstance.setCapabilities(this.capabilities);o.componentInstance.submitAction.subscribe(c=>{this.setCapability(c,t)})}_isGeneralDirty(){return["display_name","email","max_buckets_mode","max_buckets","system","suspended"].some(t=>this.userForm.get(t).dirty)}_isUserQuotaDirty(){return["user_quota_enabled","user_quota_max_size_unlimited","user_quota_max_size","user_quota_max_objects_unlimited","user_quota_max_objects"].some(t=>this.userForm.get(t).dirty)}_isBucketQuotaDirty(){return["bucket_quota_enabled","bucket_quota_max_size_unlimited","bucket_quota_max_size","bucket_quota_max_objects_unlimited","bucket_quota_max_objects"].some(t=>this.userForm.get(t).dirty)}_getCreateArgs(){const t={uid:this.getUID(),display_name:this.userForm.getValue("display_name"),system:this.userForm.getValue("system"),suspended:this.userForm.getValue("suspended"),email:"",max_buckets:this.userForm.getValue("max_buckets"),generate_key:this.userForm.getValue("generate_key"),access_key:"",secret_key:""},o=this.userForm.getValue("email");v().isString(o)&&o.length>0&&v().merge(t,{email:o}),this.userForm.getValue("generate_key")||v().merge(t,{generate_key:!1,access_key:this.userForm.getValue("access_key"),secret_key:this.userForm.getValue("secret_key")});const O=parseInt(this.userForm.getValue("max_buckets_mode"),10);return v().includes([-1,0],O)&&v().merge(t,{max_buckets:O}),t}_getUpdateArgs(){const t={},o=["display_name","email","max_buckets","system","suspended"];for(const O of o)t[O]=this.userForm.getValue(O);const c=parseInt(this.userForm.getValue("max_buckets_mode"),10);return v().includes([-1,0],c)&&(t.max_buckets=c),t}_getUserQuotaArgs(){const t={quota_type:"user",enabled:this.userForm.getValue("user_quota_enabled"),max_size_kb:-1,max_objects:-1};if(!this.userForm.getValue("user_quota_max_size_unlimited")){const o=(new _n.H).toBytes(this.userForm.getValue("user_quota_max_size"));t.max_size_kb=(o/1024).toFixed(0)}return this.userForm.getValue("user_quota_max_objects_unlimited")||(t.max_objects=this.userForm.getValue("user_quota_max_objects")),t}_getBucketQuotaArgs(){const t={quota_type:"bucket",enabled:this.userForm.getValue("bucket_quota_enabled"),max_size_kb:-1,max_objects:-1};if(!this.userForm.getValue("bucket_quota_max_size_unlimited")){const o=(new _n.H).toBytes(this.userForm.getValue("bucket_quota_max_size"));t.max_size_kb=(o/1024).toFixed(0)}return this.userForm.getValue("bucket_quota_max_objects_unlimited")||(t.max_objects=this.userForm.getValue("bucket_quota_max_objects")),t}_getS3KeyUserCandidates(){let t=[];const o=this.getUID();return v().isString(o)&&!v().isEmpty(o)&&t.push(o),this.subusers.forEach(c=>{t.push(c.id)}),this.s3Keys.forEach(c=>{t.push(c.user)}),t=v().uniq(t),t}onMaxBucketsModeChange(t){"1"===t&&(this.userForm.get("max_buckets").valid||this.userForm.patchValue({max_buckets:1e3}))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(he.O),e.Y36(A.gz),e.Y36(A.F0),e.Y36(f),e.Y36(Qe.Z),e.Y36(V.g),e.Y36(l.p4))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-user-form"]],features:[e.qOj],decls:1,vars:1,consts:function(){let i,t,o,c,O,H,Q,J,j,oe,Te,Me,Fe,Pe,me,Ge,ye,Le,Ee,Ue,$e,xe,De,ve,se,Re,ce,Je,Se,ut,dt,ft,pt,gt,Tt,Et,Rt,mt,ht,Mt,St,Ct,Ft,Ot,Nt,Pt,At,bt,It,Gt,yt,Lt,Dt,vt,wt,Wt,Ut,$t,xt,Zt,kt,Bt,zt,qt,Ht,Xt,Kt,Qt,Yt,Jt,_e,Wn,Un;return i="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",t="User ID",o="Show Tenant",c="Full name",O="Email address",H="Max. buckets",Q="Disabled",J="Unlimited",j="Custom",oe="Suspended",Te="Suspending the user disables the user and subuser.",Me="System user",Fe="System users are distinct from regular users, they are used by the RGW service to perform administrative tasks, manage buckets and objects",Pe="Quota utilisateur",me="Enabled",Ge="Quota de compartiments",ye="Enabled",Le="This field is required.",Ee="La valeur n'est pas valide.",Ue="L'ID utilisateur sp\xE9cifi\xE9 est d\xE9j\xE0 utilis\xE9.",$e="Tenant",xe="La valeur n'est pas valide.",De="The chosen user ID exists in this tenant.",ve="La valeur n'est pas valide.",se="This field is required.",Re="Ceci n'est pas une adresse \xE9lectronique valide.",ce="L'adresse \xE9lectronique sp\xE9cifi\xE9e est d\xE9j\xE0 utilis\xE9e.",Je="This field is required.",Se="The entered value must be >= 1.",ut="Clef S3",dt="G\xE9n\xE9rer automatiquement la clef",ft="Clef d'acc\xE8s",pt="This field is required.",gt="Clef secr\xE8te",Tt="This field is required.",Et="Utilisateurs secondaires",Rt="\n " + "\ufffd0\ufffd" + "\n " + "\ufffd1\ufffd" + "\n ",mt="Il n'y a aucun utilisateur secondaire.",ht="Edit",Mt="Delete",St="Clefs",Ct="S3",Ft="\n " + "\ufffd0\ufffd" + "\n " + "\ufffd1\ufffd" + "\n ",Ot="Swift",Nt="Il n'y a pas de clefs.",Pt="Show",At="Delete",bt="Il n'y a pas de clefs.",It="Show",Gt="Fonctionnalit\xE9s",yt="All capabilities are already added.",Lt="\n " + "\ufffd0\ufffd" + "\n " + "\ufffd1\ufffd" + "\n ",Dt="Il n'y a aucune fonctionnalit\xE9.",vt="Edit",wt="Delete",Wt="Taille illimit\xE9e",Ut="Taille max.",$t="This field is required.",xt="La valeur n'est pas valide.",Zt="Size must be a number or in a valid format. eg: 5 GiB",kt="Objets illimit\xE9s",Bt="Nombre max. d'objets",zt="This field is required.",qt="La valeur saisie doit \xEAtre >= 0.",Ht="Taille illimit\xE9e",Xt="Taille max.",Kt="This field is required.",Qt="La valeur n'est pas valide.",Yt="Size must be a number or in a valid format. eg: 5 GiB",Jt="Objets illimit\xE9s",_e="Nombre max. d'objets",Wn="This field is required.",Un="La valeur saisie doit \xEAtre >= 0.",[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],i,[1,"card-body"],[1,"form-group","row"],["for","user_id",1,"cd-col-form-label",3,"ngClass"],t,[1,"cd-col-form-input"],["id","user_id","type","text","formControlName","user_id",1,"form-control",3,"readonly"],["class","invalid-feedback",4,"ngIf"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","show_tenant","type","checkbox","formControlName","show_tenant",1,"custom-control-input",3,"readonly","click"],["for","show_tenant",1,"custom-control-label"],o,["class","form-group row",4,"ngIf"],["for","display_name",1,"cd-col-form-label",3,"ngClass"],c,["id","display_name","type","text","formControlName","display_name",1,"form-control"],["for","email",1,"cd-col-form-label"],O,["id","email","type","text","formControlName","email",1,"form-control"],["for","max_buckets_mode",1,"cd-col-form-label"],H,["formControlName","max_buckets_mode","name","max_buckets_mode","id","max_buckets_mode",1,"form-select",3,"change"],["value","-1"],Q,["value","0"],J,["value","1"],j,["id","suspended","type","checkbox","formControlName","suspended",1,"custom-control-input"],["for","suspended",1,"custom-control-label"],oe,Te,["id","system","type","checkbox","formControlName","system",1,"custom-control-input"],["for","system",1,"custom-control-label"],Me,Fe,[4,"ngIf"],Pe,["id","user_quota_enabled","type","checkbox","formControlName","user_quota_enabled",1,"custom-control-input"],["for","user_quota_enabled",1,"custom-control-label"],me,Ge,["id","bucket_quota_enabled","type","checkbox","formControlName","bucket_quota_enabled",1,"custom-control-input"],["for","bucket_quota_enabled",1,"custom-control-label"],ye,[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],Le,Ee,Ue,["for","tenant",1,"cd-col-form-label"],$e,["id","tenant","type","text","formControlName","tenant","autofocus","",1,"form-control",3,"readonly"],xe,De,ve,se,Re,ce,[1,"cd-col-form-label"],["id","max_buckets","type","number","formControlName","max_buckets","min","1",1,"form-control"],Je,Se,ut,["id","generate_key","type","checkbox","formControlName","generate_key",1,"custom-control-input"],["for","generate_key",1,"custom-control-label"],dt,["for","access_key",1,"cd-col-form-label","required"],ft,[1,"input-group"],["id","access_key","type","password","formControlName","access_key",1,"form-control"],["type","button","cdPasswordButton","access_key",1,"btn","btn-light"],["source","access_key"],pt,["for","secret_key",1,"cd-col-form-label","required"],gt,["id","secret_key","type","password","formControlName","secret_key",1,"form-control"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],Tt,Et,[1,"row"],["class","no-border",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"row","my-2"],[1,"col-12"],["type","button",1,"btn","btn-light","float-end","tc_addSubuserButton",3,"click"],[3,"ngClass"],Rt,[1,"help-block"],[1,"no-border"],[1,"form-text","text-muted"],mt,[1,"input-group-text"],["type","text","readonly","",1,"cd-form-control",3,"value"],["type","button","ngbTooltip",ht,1,"btn","btn-light","tc_showSubuserButton",3,"click"],["type","button","ngbTooltip",Mt,1,"btn","btn-light","tc_deleteSubuserButton",3,"click"],St,Ct,["type","button",1,"btn","btn-light","float-end","tc_addS3KeyButton",3,"click"],Ft,Ot,Nt,["type","button","ngbTooltip",Pt,1,"btn","btn-light","tc_showS3KeyButton",3,"click"],["type","button","ngbTooltip",At,1,"btn","btn-light","tc_deleteS3KeyButton",3,"click"],bt,["type","button","ngbTooltip",It,1,"btn","btn-light","tc_showSwiftKeyButton",3,"click"],Gt,["type","button","ngbTooltip",yt,"triggers","pointerenter:pointerleave",1,"btn","btn-light","float-end","tc_addCapButton",3,"disabled","disableTooltip","click"],Lt,Dt,["type","button","ngbTooltip",vt,1,"btn","btn-light","tc_editCapButton",3,"click"],["type","button","ngbTooltip",wt,1,"btn","btn-light","tc_deleteCapButton",3,"click"],["id","user_quota_max_size_unlimited","type","checkbox","formControlName","user_quota_max_size_unlimited",1,"custom-control-input"],["for","user_quota_max_size_unlimited",1,"custom-control-label"],Wt,["for","user_quota_max_size",1,"cd-col-form-label","required"],Ut,["id","user_quota_max_size","type","text","formControlName","user_quota_max_size","cdDimlessBinary","",1,"form-control"],$t,xt,Zt,["id","user_quota_max_objects_unlimited","type","checkbox","formControlName","user_quota_max_objects_unlimited",1,"custom-control-input"],["for","user_quota_max_objects_unlimited",1,"custom-control-label"],kt,["for","user_quota_max_objects",1,"cd-col-form-label","required"],Bt,["id","user_quota_max_objects","type","number","formControlName","user_quota_max_objects","min","0",1,"form-control"],zt,qt,["id","bucket_quota_max_size_unlimited","type","checkbox","formControlName","bucket_quota_max_size_unlimited",1,"custom-control-input"],["for","bucket_quota_max_size_unlimited",1,"custom-control-label"],Ht,["for","bucket_quota_max_size",1,"cd-col-form-label","required"],Xt,["id","bucket_quota_max_size","type","text","formControlName","bucket_quota_max_size","cdDimlessBinary","",1,"form-control"],Kt,Qt,Yt,["id","bucket_quota_max_objects_unlimited","type","checkbox","formControlName","bucket_quota_max_objects_unlimited",1,"custom-control-input"],["for","bucket_quota_max_objects_unlimited",1,"custom-control-label"],Jt,["for","bucket_quota_max_objects",1,"cd-col-form-label","required"],_e,["id","bucket_quota_max_objects","type","number","formControlName","bucket_quota_max_objects","min","0",1,"form-control"],Wn,Un]},template:function(t,o){1&t&&e.YNc(0,_r,100,42,"div",0),2&t&&e.Q6J("cdFormLoading",o.loading)},dependencies:[g.mk,g.sg,g.O5,fe.S,at.s,we.p,st.U,u_.Q,lt.C,cn.y,Oe.o,Ae.b,We.P,C.V,r._Y,r.YN,r.Kr,r.Fj,r.wV,r.Wl,r.EJ,r.JJ,r.JL,r.qQ,r.sg,r.u,x._L,g.rS,Ye.m,Z.i]}),n})();var On=d(99466),rr=d(86969),sr=d(78877);const ar=["accessKeyTpl"],lr=["secretKeyTpl"],cr=function(n){return[n]};function ur(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"legend"),e.SDv(2,13),e.qZA(),e.TgZ(3,"div")(4,"cd-table",14),e.NdJ("updateSelection",function(c){e.CHM(t);const O=e.oxw(3);return e.KtG(O.updateKeysSelection(c))}),e.TgZ(5,"div",15)(6,"div",16)(7,"button",17),e.NdJ("click",function(){e.CHM(t);const c=e.oxw(3);return e.KtG(c.showKeyModal())}),e._UZ(8,"i",18),e.ynx(9),e.SDv(10,19),e.BQk(),e.qZA()()()()()()}if(2&n){const t=e.oxw(3);e.xp6(4),e.Q6J("data",t.keys)("columns",t.keysColumns),e.xp6(3),e.Q6J("disabled",!t.keysSelection.hasSingleSelection),e.xp6(1),e.Q6J("ngClass",e.VKq(4,cr,t.icons.show))}}function dr(n,i){if(1&n&&(e.TgZ(0,"tr")(1,"td",8),e.SDv(2,20),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.qZA()()),2&n){const t=e.oxw(3);e.xp6(4),e.Oqu(t.user.email)}}function fr(n,i){if(1&n&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.AsE(" ",t.id," (",t.permissions,") ")}}function pr(n,i){if(1&n&&(e.TgZ(0,"tr")(1,"td",8),e.SDv(2,21),e.qZA(),e.TgZ(3,"td"),e.YNc(4,fr,2,2,"div",22),e.qZA()()),2&n){const t=e.oxw(3);e.xp6(4),e.Q6J("ngForOf",t.user.subusers)}}function gr(n,i){if(1&n&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.AsE(" ",t.type," (",t.perm,") ")}}function Tr(n,i){if(1&n&&(e.TgZ(0,"tr")(1,"td",8),e.SDv(2,23),e.qZA(),e.TgZ(3,"td"),e.YNc(4,gr,2,2,"div",22),e.qZA()()),2&n){const t=e.oxw(3);e.xp6(4),e.Q6J("ngForOf",t.user.caps)}}function Er(n,i){if(1&n&&(e.TgZ(0,"tr")(1,"td",8),e.SDv(2,24),e.qZA(),e.TgZ(3,"td"),e._uU(4),e.ALo(5,"join"),e.qZA()()),2&n){const t=e.oxw(3);e.xp6(4),e.Oqu(e.lcZ(5,1,t.user.mfa_ids))}}function Rr(n,i){1&n&&(e.TgZ(0,"td"),e._uU(1,"-"),e.qZA())}function mr(n,i){1&n&&(e.TgZ(0,"td"),e.SDv(1,29),e.qZA())}function hr(n,i){if(1&n&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"dimlessBinary"),e.qZA()),2&n){const t=e.oxw(4);e.xp6(1),e.hij(" ",e.lcZ(2,1,t.user.user_quota.max_size)," ")}}function Mr(n,i){1&n&&(e.TgZ(0,"td"),e._uU(1,"-"),e.qZA())}function Sr(n,i){1&n&&(e.TgZ(0,"td"),e.SDv(1,30),e.qZA())}function Cr(n,i){if(1&n&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&n){const t=e.oxw(4);e.xp6(1),e.hij(" ",t.user.user_quota.max_objects," ")}}function Fr(n,i){if(1&n&&(e.TgZ(0,"div")(1,"legend"),e.SDv(2,25),e.qZA(),e.TgZ(3,"table",2)(4,"tbody")(5,"tr")(6,"td",3),e.SDv(7,26),e.qZA(),e.TgZ(8,"td",5),e._uU(9),e.ALo(10,"booleanText"),e.qZA()(),e.TgZ(11,"tr")(12,"td",8),e.SDv(13,27),e.qZA(),e.YNc(14,Rr,2,0,"td",0),e.YNc(15,mr,2,0,"td",0),e.YNc(16,hr,3,3,"td",0),e.qZA(),e.TgZ(17,"tr")(18,"td",8),e.SDv(19,28),e.qZA(),e.YNc(20,Mr,2,0,"td",0),e.YNc(21,Sr,2,0,"td",0),e.YNc(22,Cr,2,1,"td",0),e.qZA()()()()),2&n){const t=e.oxw(3);e.xp6(9),e.Oqu(e.lcZ(10,7,t.user.user_quota.enabled)),e.xp6(5),e.Q6J("ngIf",!t.user.user_quota.enabled),e.xp6(1),e.Q6J("ngIf",t.user.user_quota.enabled&&t.user.user_quota.max_size<=-1),e.xp6(1),e.Q6J("ngIf",t.user.user_quota.enabled&&t.user.user_quota.max_size>-1),e.xp6(4),e.Q6J("ngIf",!t.user.user_quota.enabled),e.xp6(1),e.Q6J("ngIf",t.user.user_quota.enabled&&t.user.user_quota.max_objects<=-1),e.xp6(1),e.Q6J("ngIf",t.user.user_quota.enabled&&t.user.user_quota.max_objects>-1)}}function Or(n,i){1&n&&(e.TgZ(0,"td"),e._uU(1,"-"),e.qZA())}function Nr(n,i){1&n&&(e.TgZ(0,"td"),e.SDv(1,35),e.qZA())}function Pr(n,i){if(1&n&&(e.TgZ(0,"td"),e._uU(1),e.ALo(2,"dimlessBinary"),e.qZA()),2&n){const t=e.oxw(4);e.xp6(1),e.hij(" ",e.lcZ(2,1,t.user.bucket_quota.max_size)," ")}}function Ar(n,i){1&n&&(e.TgZ(0,"td"),e._uU(1,"-"),e.qZA())}function br(n,i){1&n&&(e.TgZ(0,"td"),e.SDv(1,36),e.qZA())}function Ir(n,i){if(1&n&&(e.TgZ(0,"td"),e._uU(1),e.qZA()),2&n){const t=e.oxw(4);e.xp6(1),e.hij(" ",t.user.bucket_quota.max_objects," ")}}function Gr(n,i){if(1&n&&(e.TgZ(0,"div")(1,"legend"),e.SDv(2,31),e.qZA(),e.TgZ(3,"table",2)(4,"tbody")(5,"tr")(6,"td",3),e.SDv(7,32),e.qZA(),e.TgZ(8,"td",5),e._uU(9),e.ALo(10,"booleanText"),e.qZA()(),e.TgZ(11,"tr")(12,"td",8),e.SDv(13,33),e.qZA(),e.YNc(14,Or,2,0,"td",0),e.YNc(15,Nr,2,0,"td",0),e.YNc(16,Pr,3,3,"td",0),e.qZA(),e.TgZ(17,"tr")(18,"td",8),e.SDv(19,34),e.qZA(),e.YNc(20,Ar,2,0,"td",0),e.YNc(21,br,2,0,"td",0),e.YNc(22,Ir,2,1,"td",0),e.qZA()()()()),2&n){const t=e.oxw(3);e.xp6(9),e.Oqu(e.lcZ(10,7,t.user.bucket_quota.enabled)),e.xp6(5),e.Q6J("ngIf",!t.user.bucket_quota.enabled),e.xp6(1),e.Q6J("ngIf",t.user.bucket_quota.enabled&&t.user.bucket_quota.max_size<=-1),e.xp6(1),e.Q6J("ngIf",t.user.bucket_quota.enabled&&t.user.bucket_quota.max_size>-1),e.xp6(4),e.Q6J("ngIf",!t.user.bucket_quota.enabled),e.xp6(1),e.Q6J("ngIf",t.user.bucket_quota.enabled&&t.user.bucket_quota.max_objects<=-1),e.xp6(1),e.Q6J("ngIf",t.user.bucket_quota.enabled&&t.user.bucket_quota.max_objects>-1)}}function yr(n,i){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,ur,11,6,"div",0),e.TgZ(2,"legend"),e.SDv(3,1),e.qZA(),e.TgZ(4,"table",2)(5,"tbody")(6,"tr")(7,"td",3),e.SDv(8,4),e.qZA(),e.TgZ(9,"td",5),e._uU(10),e.qZA()(),e.TgZ(11,"tr")(12,"td",3),e.SDv(13,6),e.qZA(),e.TgZ(14,"td",5),e._uU(15),e.qZA()(),e.TgZ(16,"tr")(17,"td",3),e.SDv(18,7),e.qZA(),e.TgZ(19,"td",5),e._uU(20),e.qZA()(),e.TgZ(21,"tr")(22,"td",8),e.SDv(23,9),e.qZA(),e.TgZ(24,"td"),e._uU(25),e.qZA()(),e.YNc(26,dr,5,1,"tr",0),e.TgZ(27,"tr")(28,"td",8),e.SDv(29,10),e.qZA(),e.TgZ(30,"td"),e._uU(31),e.ALo(32,"booleanText"),e.qZA()(),e.TgZ(33,"tr")(34,"td",8),e.SDv(35,11),e.qZA(),e.TgZ(36,"td"),e._uU(37),e.ALo(38,"booleanText"),e.qZA()(),e.TgZ(39,"tr")(40,"td",8),e.SDv(41,12),e.qZA(),e.TgZ(42,"td"),e._uU(43),e.ALo(44,"map"),e.qZA()(),e.YNc(45,pr,5,1,"tr",0),e.YNc(46,Tr,5,1,"tr",0),e.YNc(47,Er,6,3,"tr",0),e.qZA()(),e.YNc(48,Fr,23,9,"div",0),e.YNc(49,Gr,23,9,"div",0),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.keys.length),e.xp6(9),e.Oqu(t.user.tenant),e.xp6(5),e.Oqu(t.user.user_id),e.xp6(5),e.Oqu(t.user.uid),e.xp6(5),e.Oqu(t.user.display_name),e.xp6(1),e.Q6J("ngIf",null==t.user.email?null:t.user.email.length),e.xp6(5),e.Oqu(e.lcZ(32,14,t.user.suspended)),e.xp6(6),e.Oqu(e.lcZ(38,16,t.user.system)),e.xp6(6),e.Oqu(e.xi3(44,18,t.user.max_buckets,t.maxBucketsMap)),e.xp6(2),e.Q6J("ngIf",t.user.subusers&&t.user.subusers.length),e.xp6(1),e.Q6J("ngIf",t.user.caps&&t.user.caps.length),e.xp6(1),e.Q6J("ngIf",null==t.user.mfa_ids?null:t.user.mfa_ids.length),e.xp6(1),e.Q6J("ngIf",t.user.user_quota),e.xp6(1),e.Q6J("ngIf",t.user.bucket_quota)}}function Lr(n,i){if(1&n&&(e.ynx(0),e.YNc(1,yr,50,21,"div",0),e.BQk()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.user)}}let Dr=(()=>{class n{constructor(t,o){this.rgwUserService=t,this.modalService=o,this.keys=[],this.keysColumns=[],this.keysSelection=new Vt.r,this.icons=$.P}ngOnInit(){this.keysColumns=[{name:"Username",prop:"username",flexGrow:1},{name:"Type",prop:"type",flexGrow:1}],this.maxBucketsMap={"-1":"Disabled",0:"Unlimited"}}ngOnChanges(){this.selection&&(this.user=this.selection,this.user.subusers=v().sortBy(this.user.subusers,"id"),this.user.caps=v().sortBy(this.user.caps,"type"),this.rgwUserService.getQuota(this.user.uid).subscribe(t=>{v().extend(this.user,t)}),this.keys=[],this.user.keys&&this.user.keys.forEach(t=>{this.keys.push({id:this.keys.length+1,type:"S3",username:t.user,ref:t})}),this.user.swift_keys&&this.user.swift_keys.forEach(t=>{this.keys.push({id:this.keys.length+1,type:"Swift",username:t.user,ref:t})}),this.keys=v().sortBy(this.keys,"user"))}updateKeysSelection(t){this.keysSelection=t}showKeyModal(){const t=this.keysSelection.first(),o=this.modalService.show("S3"===t.type?hn:Sn);switch(t.type){case"S3":o.componentInstance.setViewing(),o.componentInstance.setValues(t.ref.user,t.ref.access_key,t.ref.secret_key);break;case"Swift":o.componentInstance.setValues(t.ref.user,t.ref.secret_key)}}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(f),e.Y36(Qe.Z))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-user-details"]],viewQuery:function(t,o){if(1&t&&(e.Gf(ar,5),e.Gf(lr,5)),2&t){let c;e.iGM(c=e.CRH())&&(o.accessKeyTpl=c.first),e.iGM(c=e.CRH())&&(o.secretKeyTpl=c.first)}},inputs:{selection:"selection"},features:[e.TTD],decls:1,vars:1,consts:function(){let i,t,o,c,O,H,Q,J,j,oe,Te,Me,Fe,Pe,me,Ge,ye,Le,Ee,Ue,$e,xe,De,ve,se,Re;return i="D\xE9tails",t="Tenant",o="User ID",c="Username",O="Full name",H="Suspended",Q="System user",J="Nombre maximal de compartiments",j="Clefs",oe="Show",Te="Email address",Me="Utilisateurs secondaires",Fe="Fonctionnalit\xE9s",Pe="MFAs(Id)",me="Quota utilisateur",Ge="Enabled",ye="Taille maximale",Le="Nombre maximal d'objets",Ee="Unlimited",Ue="Unlimited",$e="Quota de compartiments",xe="Enabled",De="Taille maximale",ve="Nombre maximal d'objets",se="Unlimited",Re="Unlimited",[[4,"ngIf"],i,[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],t,[1,"w-75"],o,c,[1,"bold"],O,H,Q,J,j,["columnMode","flex","selectionType","multi","forceIdentifier","true",3,"data","columns","updateSelection"],[1,"table-actions"],["dropdown","",1,"btn-group"],["type","button",1,"btn","btn-accent",3,"disabled","click"],[3,"ngClass"],oe,Te,Me,[4,"ngFor","ngForOf"],Fe,Pe,me,Ge,ye,Le,Ee,Ue,$e,xe,De,ve,se,Re]},template:function(t,o){1&t&&e.YNc(0,Lr,2,1,"ng-container",0),2&t&&e.Q6J("ngIf",o.selection)},dependencies:[g.mk,g.sg,g.O5,et.a,Oe.o,Tn.T,nn.$,rr.A,sr.b]}),n})();const Nn=function(){return{exact:!0}};let vr=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-user-tabs"]],decls:7,vars:4,consts:function(){let i,t;return i="Utilisateurs",t="Roles",[[1,"nav","nav-tabs"],[1,"nav-item"],["routerLink","/rgw/user","routerLinkActive","active","ariaCurrentWhenActive","page",1,"nav-link",3,"routerLinkActiveOptions"],i,["routerLink","/rgw/roles","routerLinkActive","active","ariaCurrentWhenActive","page",1,"nav-link",3,"routerLinkActiveOptions"],t]},template:function(t,o){1&t&&(e.TgZ(0,"ul",0)(1,"li",1)(2,"a",2),e.SDv(3,3),e.qZA()(),e.TgZ(4,"li",1)(5,"a",4),e.SDv(6,5),e.qZA()()()),2&t&&(e.xp6(2),e.Q6J("routerLinkActiveOptions",e.DdM(2,Nn)),e.xp6(3),e.Q6J("routerLinkActiveOptions",e.DdM(3,Nn)))},dependencies:[A.rH,A.Od]}),n})();const wr=["userSizeTpl"],Wr=["userObjectTpl"];function Ur(n,i){if(1&n&&e._UZ(0,"cd-usage-bar",8),2&n){const t=e.oxw().row;e.Q6J("total",t.user_quota.max_size)("used",t.stats.size_actual)}}function $r(n,i){1&n&&e.SDv(0,9)}function xr(n,i){if(1&n&&(e.YNc(0,Ur,1,2,"cd-usage-bar",6),e.YNc(1,$r,1,0,"ng-template",null,7,e.W1O)),2&n){const t=i.row,o=e.MAs(2);e.Q6J("ngIf",t.user_quota.max_size>0&&t.user_quota.enabled)("ngIfElse",o)}}function Zr(n,i){if(1&n&&e._UZ(0,"cd-usage-bar",12),2&n){const t=e.oxw().row;e.Q6J("total",t.user_quota.max_objects)("used",t.stats.num_objects)("isBinary",!1)}}function kr(n,i){1&n&&e.SDv(0,13)}function Br(n,i){if(1&n&&(e.YNc(0,Zr,1,3,"cd-usage-bar",10),e.YNc(1,kr,1,0,"ng-template",null,11,e.W1O)),2&n){const t=i.row,o=e.MAs(2);e.Q6J("ngIf",t.user_quota.max_objects>0&&t.user_quota.enabled)("ngIfElse",o)}}let qr=(()=>{class n extends en.o{constructor(t,o,c,O,H,Q){super(Q),this.authStorageService=t,this.rgwUserService=o,this.modalService=c,this.urlBuilder=O,this.actionLabels=H,this.ngZone=Q,this.columns=[],this.users=[],this.selection=new Vt.r}ngOnInit(){this.permission=this.authStorageService.getPermissions().rgw,this.columns=[{name:"Username",prop:"uid",flexGrow:1},{name:"Tenant",prop:"tenant",flexGrow:1},{name:"Full name",prop:"display_name",flexGrow:1},{name:"Email address",prop:"email",flexGrow:1},{name:"Suspended",prop:"suspended",flexGrow:1,cellClass:"text-center",cellTransformation:On.e.checkIcon},{name:"Max. buckets",prop:"max_buckets",flexGrow:1,cellTransformation:On.e.map,customTemplateConfig:{"-1":"Disabled",0:"Unlimited"}},{name:"Capacity Limit %",prop:"size_usage",cellTemplate:this.userSizeTpl,flexGrow:.8},{name:"Object Limit %",prop:"object_usage",cellTemplate:this.userObjectTpl,flexGrow:.8}];const t=()=>this.selection.first()&&`${encodeURIComponent(this.selection.first().uid)}`;this.tableActions=[{permission:"create",icon:$.P.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE,canBePrimary:H=>!H.hasSelection},{permission:"update",icon:$.P.edit,routerLink:()=>this.urlBuilder.getEdit(t()),name:this.actionLabels.EDIT},{permission:"delete",icon:$.P.destroy,click:()=>this.deleteAction(),disable:()=>!this.selection.hasSelection,name:this.actionLabels.DELETE,canBePrimary:H=>H.hasMultiSelection}],this.setTableRefreshTimeout()}getUserList(t){this.setTableRefreshTimeout(),this.rgwUserService.list().subscribe(o=>{this.users=o},()=>{t.error()})}updateSelection(t){this.selection=t}deleteAction(){this.modalService.show(tn.M,{itemDescription:this.selection.hasSingleSelection?"user":"users",itemNames:this.selection.selected.map(t=>t.uid),submitActionObservable:()=>new dn.y(t=>{(0,k.D)(this.selection.selected.map(o=>this.rgwUserService.delete(o.uid))).subscribe({error:o=>{t.error(o),this.table.refreshBtn()},complete:()=>{t.complete(),this.table.refreshBtn()}})})})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(nt.j),e.Y36(f),e.Y36(Qe.Z),e.Y36(tt.F),e.Y36(l.p4),e.Y36(e.R0b))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-user-list"]],viewQuery:function(t,o){if(1&t&&(e.Gf(et.a,7),e.Gf(wr,7),e.Gf(Wr,7)),2&t){let c;e.iGM(c=e.CRH())&&(o.table=c.first),e.iGM(c=e.CRH())&&(o.userSizeTpl=c.first),e.iGM(c=e.CRH())&&(o.userObjectTpl=c.first)}},features:[e._Bn([{provide:tt.F,useValue:new tt.F("rgw/user")}]),e.qOj],decls:9,vars:9,consts:function(){let i,t;return i="No Limit",t="No Limit",[["columnMode","flex","selectionType","multiClick","identifier","uid",3,"autoReload","data","columns","hasDetails","status","setExpandedRow","updateSelection","fetchData"],["table",""],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["userSizeTpl",""],["userObjectTpl",""],[3,"total","used",4,"ngIf","ngIfElse"],["noSizeQuota",""],[3,"total","used"],i,[3,"total","used","isBinary",4,"ngIf","ngIfElse"],["noObjectQuota",""],[3,"total","used","isBinary"],t]},template:function(t,o){1&t&&(e._UZ(0,"cd-rgw-user-tabs"),e.TgZ(1,"cd-table",0,1),e.NdJ("setExpandedRow",function(O){return o.setExpandedRow(O)})("updateSelection",function(O){return o.updateSelection(O)})("fetchData",function(O){return o.getUserList(O)}),e._UZ(3,"cd-table-actions",2)(4,"cd-rgw-user-details",3),e.qZA(),e.YNc(5,xr,3,2,"ng-template",null,4,e.W1O),e.YNc(7,Br,3,2,"ng-template",null,5,e.W1O)),2&t&&(e.xp6(1),e.Q6J("autoReload",!1)("data",o.users)("columns",o.columns)("hasDetails",!0)("status",o.tableStatus),e.xp6(2),e.Q6J("permission",o.permission)("selection",o.selection)("tableActions",o.tableActions),e.xp6(1),e.Q6J("selection",o.expandedRow))},dependencies:[g.O5,pn.O,et.a,on.K,Dr,vr]}),n})();var Pn=d(83357),sn=d(35512),An=d(13464),Hr=d(46797),ot=d(95596),an=d(80381),Xe=d(95463),ke=d(43186),it=d(97937),_t=d(98961);function Xr(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,33),e.qZA())}function Kr(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,34),e.qZA())}function Qr(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,35),e.qZA())}function Yr(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,36),e.qZA())}function Jr(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,37),e.qZA())}function Vr(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,38),e.qZA())}function jr(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,39),e.qZA())}function es(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,40),e.qZA())}function ts(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,41),e.qZA())}function ns(n,i){1&n&&(e.TgZ(0,"span",32),e.SDv(1,42),e.qZA())}let os=(()=>{class n{constructor(t,o,c,O,H,Q,J,j,oe){this.activeModal=t,this.actionLabels=o,this.rgwMultisiteService=c,this.rgwZoneService=O,this.notificationService=H,this.rgwZonegroupService=Q,this.rgwRealmService=J,this.rgwDaemonService=j,this.modalService=oe,this.endpoints=/^((https?:\/\/)|(www.))(?:([a-zA-Z]+)|(\d+\.\d+.\d+.\d+)):\d{2,4}$/,this.ipv4Rgx=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i,this.ipv6Rgx=/^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}$/i,this.submitAction=new e.vpe,this.multisiteInfo=[],this.createForm()}createForm(){this.multisiteMigrateForm=new Xe.d({realmName:new r.p4(null,{validators:[r.kI.required,z.h.custom("uniqueName",t=>this.realmNames&&-1!==this.zoneNames.indexOf(t))]}),zonegroupName:new r.p4(null,{validators:[r.kI.required,z.h.custom("uniqueName",t=>this.zonegroupNames&&-1!==this.zoneNames.indexOf(t))]}),zoneName:new r.p4(null,{validators:[r.kI.required,z.h.custom("uniqueName",t=>this.zoneNames&&-1!==this.zoneNames.indexOf(t))]}),zone_endpoints:new r.p4([],{validators:[z.h.custom("endpoint",t=>!(v().isEmpty(t)||(t.includes(",")?(t.split(",").forEach(o=>!this.endpoints.test(o)&&!this.ipv4Rgx.test(o)&&!this.ipv6Rgx.test(o)),1):this.endpoints.test(t)||this.ipv4Rgx.test(t)||this.ipv6Rgx.test(t)))),r.kI.required]}),zonegroup_endpoints:new r.p4([],[z.h.custom("endpoint",t=>!(v().isEmpty(t)||(t.includes(",")?(t.split(",").forEach(o=>!this.endpoints.test(o)&&!this.ipv4Rgx.test(o)&&!this.ipv6Rgx.test(o)),1):this.endpoints.test(t)||this.ipv4Rgx.test(t)||this.ipv6Rgx.test(t)))),r.kI.required]),access_key:new r.p4(null),secret_key:new r.p4(null)})}ngOnInit(){this.realmList=void 0!==this.multisiteInfo[0]&&this.multisiteInfo[0].hasOwnProperty("realms")?this.multisiteInfo[0].realms:[],this.realmNames=this.realmList.map(t=>t.name),this.zonegroupList=void 0!==this.multisiteInfo[1]&&this.multisiteInfo[1].hasOwnProperty("zonegroups")?this.multisiteInfo[1].zonegroups:[],this.zonegroupNames=this.zonegroupList.map(t=>t.name),this.zoneList=void 0!==this.multisiteInfo[2]&&this.multisiteInfo[2].hasOwnProperty("zones")?this.multisiteInfo[2].zones:[],this.zoneNames=this.zoneList.map(t=>t.name)}submit(){const t=this.multisiteMigrateForm.value;this.realm=new ke.L6,this.realm.name=t.realmName,this.zonegroup=new ke.iG,this.zonegroup.name=t.zonegroupName,this.zonegroup.endpoints=t.zonegroup_endpoints,this.zone=new ke.jb,this.zone.name=t.zoneName,this.zone.endpoints=t.zone_endpoints,this.zone.system_key=new ke.VY,this.zone.system_key.access_key=t.access_key,this.zone.system_key.secret_key=t.secret_key,this.rgwMultisiteService.migrate(this.realm,this.zonegroup,this.zone).subscribe(()=>{this.notificationService.show(M.k.success,"" + this.actionLabels.MIGRATE + " done successfully"),this.submitAction.emit(),this.activeModal.close()},()=>{this.notificationService.show(M.k.error,"Migration failed")})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(x.Kz),e.Y36(l.p4),e.Y36(an.o),e.Y36(it.g),e.Y36(V.g),e.Y36(_t.K),e.Y36(ot.y),e.Y36(u.b),e.Y36(Qe.Z))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-multisite-migrate"]],outputs:{submitAction:"submitAction"},decls:68,vars:14,consts:function(){let i,t,o,c,O,H,Q,J,j,oe,Te,Me,Fe,Pe,me,Ge,ye,Le;return i="Migrate Single Site to Multi-site " + "\ufffd#3\ufffd" + "" + "\ufffd#4\ufffd" + "Migrate from a single-site deployment with a default zone group and zone to a multi-site system" + "\ufffd/#4\ufffd" + "" + "\ufffd/#3\ufffd" + "",t="Realm Name",o="Rename default zone group",c="Zone group Endpoints ",O="Rename default zone",H="Zone Endpoints ",Q="S3 access key " + "\ufffd#47\ufffd" + "" + "\ufffd#48\ufffd" + "To see or copy your S3 access key, go to " + "[\ufffd#49\ufffd|\ufffd#50\ufffd|\ufffd#51\ufffd|\ufffd#52\ufffd]" + "Object Gateway > Users" + "[\ufffd/#49\ufffd|\ufffd/#50\ufffd|\ufffd/#51\ufffd|\ufffd/#52\ufffd]" + " and click on your user name. In " + "[\ufffd#49\ufffd|\ufffd#50\ufffd|\ufffd#51\ufffd|\ufffd#52\ufffd]" + "Keys" + "[\ufffd/#49\ufffd|\ufffd/#50\ufffd|\ufffd/#51\ufffd|\ufffd/#52\ufffd]" + ", click " + "[\ufffd#49\ufffd|\ufffd#50\ufffd|\ufffd#51\ufffd|\ufffd#52\ufffd]" + "Show" + "[\ufffd/#49\ufffd|\ufffd/#50\ufffd|\ufffd/#51\ufffd|\ufffd/#52\ufffd]" + ". View the access key by clicking Show and copy the key by clicking " + "[\ufffd#49\ufffd|\ufffd#50\ufffd|\ufffd#51\ufffd|\ufffd#52\ufffd]" + "Copy to Clipboard" + "[\ufffd/#49\ufffd|\ufffd/#50\ufffd|\ufffd/#51\ufffd|\ufffd/#52\ufffd]" + "." + "\ufffd/#48\ufffd" + "" + "\ufffd/#47\ufffd" + "",Q=e.Zx4(Q),J="S3 secret key " + "\ufffd#58\ufffd" + "" + "\ufffd#59\ufffd" + "To see or copy your S3 access key, go to " + "[\ufffd#60\ufffd|\ufffd#61\ufffd|\ufffd#62\ufffd|\ufffd#63\ufffd]" + "Object Gateway > Users" + "[\ufffd/#60\ufffd|\ufffd/#61\ufffd|\ufffd/#62\ufffd|\ufffd/#63\ufffd]" + " and click on your user name. In " + "[\ufffd#60\ufffd|\ufffd#61\ufffd|\ufffd#62\ufffd|\ufffd#63\ufffd]" + "Keys" + "[\ufffd/#60\ufffd|\ufffd/#61\ufffd|\ufffd/#62\ufffd|\ufffd/#63\ufffd]" + ", click " + "[\ufffd#60\ufffd|\ufffd#61\ufffd|\ufffd#62\ufffd|\ufffd#63\ufffd]" + "Show" + "[\ufffd/#60\ufffd|\ufffd/#61\ufffd|\ufffd/#62\ufffd|\ufffd/#63\ufffd]" + ". View the secret key by clicking Show and copy the key by clicking " + "[\ufffd#60\ufffd|\ufffd#61\ufffd|\ufffd#62\ufffd|\ufffd#63\ufffd]" + "Copy to Clipboard" + "[\ufffd/#60\ufffd|\ufffd/#61\ufffd|\ufffd/#62\ufffd|\ufffd/#63\ufffd]" + "." + "\ufffd/#59\ufffd" + "" + "\ufffd/#58\ufffd" + "",J=e.Zx4(J),j="This field is required.",oe="The chosen realm name is already in use.",Te="This field is required.",Me="The chosen zone group name is already in use.",Fe="This field is required.",Pe="Please enter a valid IP address.",me="This field is required.",Ge="The chosen zone name is already in use.",ye="This field is required.",Le="Please enter a valid IP address.",[[3,"modalRef"],[1,"modal-title"],i,[1,"modal-content"],["name","multisiteMigrateForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","realmName",1,"cd-col-form-label","required"],t,[1,"cd-col-form-input"],["type","text","placeholder","Realm name...","id","realmName","name","realmName","formControlName","realmName",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","zonegroupName",1,"cd-col-form-label","required"],o,["type","text","placeholder","Zone group name...","id","zonegroupName","name","zonegroupName","formControlName","zonegroupName",1,"form-control"],["for","zonegroup_endpoints",1,"cd-col-form-label","required"],c,["type","text","placeholder","e.g, http://ceph-node-00.com:80","id","zonegroup_endpoints","name","zonegroup_endpoints","formControlName","zonegroup_endpoints",1,"form-control"],["for","zoneName",1,"cd-col-form-label","required"],O,["type","text","placeholder","Zone name...","id","zoneName","name","zoneName","formControlName","zoneName",1,"form-control"],["for","zone_endpoints",1,"cd-col-form-label","required"],H,["type","text","placeholder","e.g, http://ceph-node-00.com:80","id","zone_endpoints","name","zone_endpoints","formControlName","zone_endpoints",1,"form-control"],["for","access_key",1,"cd-col-form-label","required"],Q,["type","text","placeholder","e.g.","id","access_key","name","access_key","formControlName","access_key",1,"form-control"],J,["type","text","placeholder","e.g.","id","secret_key","name","secret_key","formControlName","secret_key",1,"form-control"],[1,"modal-footer"],[3,"submitText","form","submitActionEvent"],[1,"invalid-feedback"],j,oe,Te,Me,Fe,Pe,me,Ge,ye,Le]},template:function(t,o){if(1&t&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.tHW(2,2),e.TgZ(3,"cd-helper"),e._UZ(4,"span"),e.qZA(),e.N_p(),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5)(8,"div",6)(9,"div",7)(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10),e._UZ(13,"input",11),e.YNc(14,Xr,2,0,"span",12),e.YNc(15,Kr,2,0,"span",12),e.qZA()(),e.TgZ(16,"div",7)(17,"label",13),e.SDv(18,14),e.qZA(),e.TgZ(19,"div",10),e._UZ(20,"input",15),e.YNc(21,Qr,2,0,"span",12),e.YNc(22,Yr,2,0,"span",12),e.qZA()(),e.TgZ(23,"div",7)(24,"label",16),e.SDv(25,17),e.qZA(),e.TgZ(26,"div",10),e._UZ(27,"input",18),e.YNc(28,Jr,2,0,"span",12),e.YNc(29,Vr,2,0,"span",12),e.qZA()(),e.TgZ(30,"div",7)(31,"label",19),e.SDv(32,20),e.qZA(),e.TgZ(33,"div",10),e._UZ(34,"input",21),e.YNc(35,jr,2,0,"span",12),e.YNc(36,es,2,0,"span",12),e.qZA()(),e.TgZ(37,"div",7)(38,"label",22),e.SDv(39,23),e.qZA(),e.TgZ(40,"div",10),e._UZ(41,"input",24),e.YNc(42,ts,2,0,"span",12),e.YNc(43,ns,2,0,"span",12),e.qZA()(),e.TgZ(44,"div",7)(45,"label",25),e.tHW(46,26),e.TgZ(47,"cd-helper")(48,"span"),e._UZ(49,"b")(50,"b")(51,"b")(52,"b"),e.qZA()(),e.N_p(),e.qZA(),e.TgZ(53,"div",10),e._UZ(54,"input",27),e.qZA()(),e.TgZ(55,"div",7)(56,"label",25),e.tHW(57,28),e.TgZ(58,"cd-helper")(59,"span"),e._UZ(60,"b")(61,"b")(62,"b")(63,"b"),e.qZA()(),e.N_p(),e.qZA(),e.TgZ(64,"div",10),e._UZ(65,"input",29),e.qZA()()(),e.TgZ(66,"div",30)(67,"cd-form-button-panel",31),e.NdJ("submitActionEvent",function(){return o.submit()}),e.qZA()()(),e.BQk(),e.qZA()),2&t){const c=e.MAs(7);e.Q6J("modalRef",o.activeModal),e.xp6(6),e.Q6J("formGroup",o.multisiteMigrateForm),e.xp6(8),e.Q6J("ngIf",o.multisiteMigrateForm.showError("realmName",c,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteMigrateForm.showError("realmName",c,"uniqueName")),e.xp6(6),e.Q6J("ngIf",o.multisiteMigrateForm.showError("zonegroupName",c,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteMigrateForm.showError("zonegroupName",c,"uniqueName")),e.xp6(6),e.Q6J("ngIf",o.multisiteMigrateForm.showError("zonegroup_endpoints",c,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteMigrateForm.showError("zonegroup_endpoints",c,"endpoint")),e.xp6(6),e.Q6J("ngIf",o.multisiteMigrateForm.showError("zoneName",c,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteMigrateForm.showError("zoneName",c,"uniqueName")),e.xp6(6),e.Q6J("ngIf",o.multisiteMigrateForm.showError("zone_endpoints",c,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteMigrateForm.showError("zone_endpoints",c,"endpoint")),e.xp6(24),e.Q6J("submitText",o.actionLabels.MIGRATE)("form",o.multisiteMigrateForm)}},dependencies:[g.O5,fe.S,Ie.z,we.p,Oe.o,Ae.b,We.P,C.V,r._Y,r.Fj,r.JJ,r.JL,r.sg,r.u]}),n})();var bn=d(80842);function is(n,i){if(1&n&&(e.TgZ(0,"strong",21),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t)}}function _s(n,i){1&n&&(e.TgZ(0,"div",22)(1,"cd-alert-panel",23),e.SDv(2,24),e.qZA()())}function rs(n,i){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"label",10),e.tHW(2,11),e._UZ(3,"strong"),e.N_p(),e.qZA(),e.TgZ(4,"label",12),e.SDv(5,13),e.qZA(),e.YNc(6,is,2,1,"strong",14),e.TgZ(7,"div",15)(8,"div",16)(9,"input",17),e.NdJ("change",function(){e.CHM(t);const c=e.oxw();return e.KtG(c.showDangerText())}),e.qZA(),e.TgZ(10,"label",18),e.SDv(11,19),e.qZA()(),e.YNc(12,_s,3,0,"div",20),e.qZA(),e.BQk()}if(2&n){const t=e.oxw();e.xp6(3),e.pQV(null==t.zone?null:t.zone.name),e.QtT(2),e.xp6(3),e.Q6J("ngForOf",t.includedPools),e.xp6(6),e.Q6J("ngIf",t.displayText)}}let ss=(()=>{class n{constructor(t,o,c,O,H){this.activeModal=t,this.actionLabels=o,this.notificationService=c,this.rgwZoneService=O,this.poolService=H,this.displayText=!1,this.includedPools=new Set,this.createForm()}ngOnInit(){this.zoneData$=this.rgwZoneService.get(this.zone),this.poolList$=this.poolService.getList()}ngAfterViewInit(){this.updateIncludedPools()}createForm(){this.zoneForm=new Xe.d({deletePools:new r.p4(!1)})}submit(){this.rgwZoneService.delete(this.zone.name,this.zoneForm.value.deletePools,this.includedPools,this.zone.parent).subscribe(()=>{this.notificationService.show(M.k.success,"Zone: '" + this.zone.name + "' deleted successfully"),this.activeModal.close()},()=>{this.zoneForm.setErrors({cdSubmitButton:!0})})}showDangerText(){this.displayText=!this.displayText}updateIncludedPools(){!this.zoneData$||!this.poolList$||this.zoneData$.subscribe(t=>{this.poolList$.subscribe(o=>{for(const c of o)for(const O of Object.values(t))if("string"==typeof O&&O.includes(c.pool_name))this.includedPools.add(c.pool_name);else if(Array.isArray(O)&&O[0].val)for(const H of O){const Q=H.val;Q.storage_classes.STANDARD.data_pool===c.pool_name&&this.includedPools.add(Q.storage_classes.STANDARD.data_pool),Q.data_extra_pool===c.pool_name&&this.includedPools.add(Q.data_extra_pool),Q.index_pool===c.pool_name&&this.includedPools.add(Q.index_pool)}})})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(x.Kz),e.Y36(l.p4),e.Y36(V.g),e.Y36(it.g),e.Y36(bn.q))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-multisite-zone-deletion-form"]],decls:12,vars:6,consts:function(){let i,t,o,c,O,H;return i="Delete Zone",t=" This will delete your " + "\ufffd#8\ufffd" + "" + "\ufffd0\ufffd" + "" + "\ufffd/#8\ufffd" + " Zone. ",o=" Do you want to delete the associated pools with the " + "\ufffd#3\ufffd" + "" + "\ufffd0\ufffd" + "" + "\ufffd/#3\ufffd" + " Zone?",c=" This will delete the following pools and any data stored in these pools:",O="Yes, I want to delete the pools.",H=" This will delete all the data in the pools! ",[[3,"modalRef"],[1,"modal-title"],i,[1,"modal-content"],["name","zoneForm","novalidate","",3,"formGroup"],[1,"modal-body","ms-4"],t,[4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"mt-3"],o,[1,"mb-4"],c,["class","block",4,"ngFor","ngForOf"],[1,"form-group"],[1,"custom-control","custom-checkbox","mt-2"],["type","checkbox","name","deletePools","id","deletePools","formControlName","deletePools",1,"custom-control-input",3,"change"],["for","deletePools",1,"custom-control-label"],O,["class","me-4",4,"ngIf"],[1,"block"],[1,"me-4"],["type","danger"],H]},template:function(t,o){1&t&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.BQk(),e.ynx(3,3),e.TgZ(4,"form",4)(5,"div",5)(6,"label"),e.tHW(7,6),e._UZ(8,"strong"),e.N_p(),e.qZA(),e.YNc(9,rs,13,3,"ng-container",7),e.qZA(),e.TgZ(10,"div",8)(11,"cd-form-button-panel",9),e.NdJ("submitActionEvent",function(){return o.submit()}),e.qZA()()(),e.BQk(),e.qZA()),2&t&&(e.Q6J("modalRef",o.activeModal),e.xp6(4),e.Q6J("formGroup",o.zoneForm),e.xp6(4),e.pQV(null==o.zone?null:o.zone.name),e.QtT(7),e.xp6(1),e.Q6J("ngIf",o.includedPools.size),e.xp6(2),e.Q6J("form",o.zoneForm)("submitText",o.actionLabels.DELETE))},dependencies:[g.sg,g.O5,Ie.z,Ve.G,we.p,Oe.o,Ae.b,We.P,C.V,r._Y,r.Wl,r.JJ,r.JL,r.sg,r.u],styles:[".block[_ngcontent-%COMP%]{display:block}#scroll[_ngcontent-%COMP%]{height:100%;max-height:10rem;overflow:auto}"]}),n})();function as(n,i){1&n&&(e.ynx(0),e.TgZ(1,"label"),e.SDv(2,21),e.qZA(),e.BQk())}function ls(n,i){if(1&n&&(e.TgZ(0,"strong",22),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t)}}function cs(n,i){if(1&n&&(e.TgZ(0,"strong",22),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t)}}function us(n,i){if(1&n&&(e.ynx(0),e.TgZ(1,"strong",13),e._uU(2,"Pools:"),e.qZA(),e.TgZ(3,"div",23),e.YNc(4,cs,2,1,"strong",15),e.qZA(),e.BQk()),2&n){const t=e.oxw(2);e.xp6(4),e.Q6J("ngForOf",t.includedPools)}}function ds(n,i){1&n&&(e.ynx(0),e.TgZ(1,"label",24),e.SDv(2,25),e.qZA(),e.BQk())}function fs(n,i){1&n&&(e.TgZ(0,"div",26)(1,"cd-alert-panel",27),e.SDv(2,28),e.qZA()())}function ps(n,i){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"label",11),e.tHW(2,12),e._UZ(3,"strong"),e.N_p(),e.qZA(),e.YNc(4,as,3,0,"ng-container",7),e.TgZ(5,"strong",13),e._uU(6,"Zones:"),e.qZA(),e.TgZ(7,"div",14),e.YNc(8,ls,2,1,"strong",15),e.qZA(),e.YNc(9,us,5,1,"ng-container",7),e.TgZ(10,"div",16)(11,"div",17)(12,"input",18),e.NdJ("change",function(){e.CHM(t);const c=e.oxw();return e.KtG(c.showDangerText())}),e.qZA(),e.YNc(13,ds,3,0,"ng-container",19),e.qZA(),e.YNc(14,fs,3,0,"div",20),e.qZA(),e.BQk()}if(2&n){const t=e.oxw(),o=e.MAs(13);e.xp6(3),e.pQV(null==t.zonegroup?null:t.zonegroup.name),e.QtT(2),e.xp6(1),e.Q6J("ngIf",t.includedPools.size>0),e.xp6(4),e.Q6J("ngForOf",t.zonesList),e.xp6(1),e.Q6J("ngIf",t.includedPools.size>0),e.xp6(4),e.Q6J("ngIf",t.includedPools.size>0)("ngIfElse",o),e.xp6(1),e.Q6J("ngIf",t.displayText)}}function gs(n,i){1&n&&(e.TgZ(0,"label",24),e.SDv(1,29),e.qZA())}let Ts=(()=>{class n{constructor(t,o,c,O,H,Q){this.activeModal=t,this.actionLabels=o,this.notificationService=c,this.rgwZonegroupService=O,this.poolService=H,this.rgwZoneService=Q,this.zonesPools=[],this.zonesList=[],this.displayText=!1,this.includedPools=new Set,this.createForm()}ngOnInit(){this.zonegroupData$=this.rgwZonegroupService.get(this.zonegroup),this.poolList$=this.poolService.getList()}ngAfterViewInit(){this.updateIncludedPools()}createForm(){this.zonegroupForm=new Xe.d({deletePools:new r.p4(!1)})}submit(){this.rgwZonegroupService.delete(this.zonegroup.name,this.zonegroupForm.value.deletePools,this.includedPools).subscribe(()=>{this.notificationService.show(M.k.success,"Zone: '" + this.zonegroup.name + "' deleted successfully"),this.activeModal.close()})}showDangerText(){this.includedPools.size>0&&(this.displayText=!this.displayText)}updateIncludedPools(){!this.zonegroupData$||!this.poolList$||this.zonegroupData$.subscribe(t=>{for(const o of t.zones)this.zonesList.push(o.name),this.rgwZoneService.get(o).subscribe(c=>{this.poolList$.subscribe(O=>{for(const H of Object.values(c))for(const Q of O)if("string"==typeof H&&H.includes(Q.pool_name))this.includedPools.add(Q.pool_name);else if(Array.isArray(H)&&H[0].val)for(const J of H){const j=J.val;j.storage_classes.STANDARD.data_pool===Q.pool_name&&this.includedPools.add(j.storage_classes.STANDARD.data_pool),j.data_extra_pool===Q.pool_name&&this.includedPools.add(j.data_extra_pool),j.index_pool===Q.pool_name&&this.includedPools.add(j.index_pool)}})})})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(x.Kz),e.Y36(l.p4),e.Y36(V.g),e.Y36(_t.K),e.Y36(bn.q),e.Y36(it.g))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-multisite-zonegroup-deletion-form"]],decls:14,vars:6,consts:function(){let i,t,o,c,O,H,Q;return i="Delete Zone Group",t=" This will delete your " + "\ufffd#8\ufffd" + "" + "\ufffd0\ufffd" + "" + "\ufffd/#8\ufffd" + " Zone Group. ",o=" Do you want to delete the associated zones and pools with the " + "\ufffd#3\ufffd" + "" + "\ufffd0\ufffd" + "" + "\ufffd/#3\ufffd" + " Zone Group?",c=" This will delete the following:",O="Yes, I want to delete the zones and their pools.",H=" This will delete all the data in the pools! ",Q="Yes, I want to delete the zones.",[[3,"modalRef"],[1,"modal-title"],i,[1,"modal-content"],["name","zonegroupForm","novalidate","",3,"formGroup"],[1,"modal-body","ms-4"],t,[4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],["noPoolsConfirmation",""],[1,"mt-3"],o,[1,"mt-3","mb-2","h5","block"],["id","scroll"],["class","block",4,"ngFor","ngForOf"],[1,"form-group"],[1,"custom-control","custom-checkbox","mt-2"],["type","checkbox","name","deletePools","id","deletePools","formControlName","deletePools",1,"custom-control-input",3,"change"],[4,"ngIf","ngIfElse"],["class","me-4",4,"ngIf"],c,[1,"block"],["id","scroll",1,"mb-2"],["for","deletePools",1,"custom-control-label"],O,[1,"me-4"],["type","danger"],H,Q]},template:function(t,o){1&t&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.BQk(),e.ynx(3,3),e.TgZ(4,"form",4)(5,"div",5)(6,"label"),e.tHW(7,6),e._UZ(8,"strong"),e.N_p(),e.qZA(),e.YNc(9,ps,15,7,"ng-container",7),e.qZA(),e.TgZ(10,"div",8)(11,"cd-form-button-panel",9),e.NdJ("submitActionEvent",function(){return o.submit()}),e.qZA()()(),e.BQk(),e.qZA(),e.YNc(12,gs,2,0,"ng-template",null,10,e.W1O)),2&t&&(e.Q6J("modalRef",o.activeModal),e.xp6(4),e.Q6J("formGroup",o.zonegroupForm),e.xp6(4),e.pQV(null==o.zonegroup?null:o.zonegroup.name),e.QtT(7),e.xp6(1),e.Q6J("ngIf",o.zonesList.length>0),e.xp6(2),e.Q6J("form",o.zonegroupForm)("submitText",o.actionLabels.DELETE))},dependencies:[g.sg,g.O5,Ie.z,Ve.G,we.p,Oe.o,Ae.b,We.P,C.V,r._Y,r.Wl,r.JJ,r.JL,r.sg,r.u],styles:[".block[_ngcontent-%COMP%]{display:block}#scroll[_ngcontent-%COMP%]{height:100%;max-height:10rem;overflow:auto}"]}),n})();const Es=function(n,i,t){return[n,i,t]};function Rs(n,i){if(1&n&&(e.TgZ(0,"span",10),e._UZ(1,"i",11),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngClass",e.kEZ(1,Es,t.icons.large3x,t.icons.spinner,t.icons.spin))}}function ms(n,i){if(1&n&&(e.tHW(0,16,1),e.TgZ(1,"div"),e._UZ(2,"b"),e.qZA(),e.N_p()),2&n){const t=i.$implicit;e.xp6(2),e.pQV(t.realm)(t.token),e.QtT(0)}}function hs(n,i){if(1&n&&(e.TgZ(0,"cd-alert-panel",15),e.tHW(1,16),e.YNc(2,ms,3,2,"div",14),e.N_p(),e.qZA()),2&n){const t=e.oxw(2);e.xp6(2),e.Q6J("ngForOf",t.realms)}}function Ms(n,i){1&n&&e._UZ(0,"hr")}function Ss(n,i){if(1&n&&(e.TgZ(0,"div")(1,"div",17)(2,"label",18),e.SDv(3,19),e.qZA(),e.TgZ(4,"div",20),e._UZ(5,"input",21),e.qZA()(),e.TgZ(6,"div",17)(7,"label",22),e.SDv(8,23),e.qZA(),e.TgZ(9,"div",20),e._UZ(10,"input",24)(11,"cd-copy-2-clipboard-button",25),e.qZA(),e.YNc(12,Ms,1,0,"hr",26),e.qZA()()),2&n){const t=i.$implicit,o=e.oxw(2);e.xp6(5),e.s9C("value",t.realm),e.xp6(5),e.s9C("value",t.token),e.xp6(1),e.s9C("source",t.token),e.Q6J("byId",!1),e.xp6(1),e.Q6J("ngIf",o.realms.length>1)}}function Cs(n,i){if(1&n&&(e.TgZ(0,"div",12),e.YNc(1,hs,3,1,"cd-alert-panel",13),e.YNc(2,Ss,13,5,"div",14),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.tokenValid),e.xp6(1),e.Q6J("ngForOf",t.realms)}}let Fs=(()=>{class n{constructor(t,o,c,O,H){this.activeModal=t,this.rgwRealmService=o,this.actionLabels=c,this.notificationService=O,this.changeDetectorRef=H,this.tokenValid=!1,this.loading=!0,this.icons=$.P,this.createForm()}createForm(){this.exportTokenForm=new Xe.d({})}onSubmit(){this.activeModal.close()}ngOnInit(){this.rgwRealmService.getRealmTokens().subscribe(t=>{this.loading=!1,this.realms=t;var o=new RegExp("^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$");this.realms.forEach(c=>{this.tokenValid=!!o.test(c.token)})})}ngAfterViewChecked(){this.changeDetectorRef.detectChanges()}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(x.Kz),e.Y36(ot.y),e.Y36(l.p4),e.Y36(V.g),e.Y36(e.sBO))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-multisite-export"]],decls:10,vars:4,consts:function(){let i,t,o,c;return i="Export Multi-site Realm Token",t="" + "\ufffd*2:1\ufffd\ufffd#1:1\ufffd" + "" + "\ufffd#2:1\ufffd" + "" + "\ufffd0:1\ufffd" + "" + "\ufffd/#2:1\ufffd" + " - " + "\ufffd1:1\ufffd" + " " + "\ufffd/#1:1\ufffd\ufffd/*2:1\ufffd" + "",o="Realm Name ",c="Token ",[[3,"modalRef"],[1,"modal-title"],i,[1,"modal-content"],["name","exportTokenForm",3,"formGroup"],["frm","ngForm"],["class","d-flex justify-content-center",4,"ngIf"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["aria-label","Close",1,"m-2","float-end",3,"backAction"],[1,"d-flex","justify-content-center"],[3,"ngClass"],[1,"modal-body"],["type","warning","class","mx-3",4,"ngIf"],[4,"ngFor","ngForOf"],["type","warning",1,"mx-3"],t,[1,"form-group","row"],["for","realmName",1,"cd-col-form-label"],o,[1,"cd-col-form-input"],["id","realmName","name","realmName","type","text","readonly","",3,"value"],["for","token",1,"cd-col-form-label"],c,["id","realmToken","name","realmToken","type","text","readonly","",1,"me-2","mb-4",3,"value"],[3,"source","byId"],[4,"ngIf"]]},template:function(t,o){1&t&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.BQk(),e.ynx(3,3),e.TgZ(4,"form",4,5),e.YNc(6,Rs,2,5,"span",6),e.YNc(7,Cs,3,2,"div",7),e.TgZ(8,"div",8)(9,"cd-back-button",9),e.NdJ("backAction",function(){return o.activeModal.close()}),e.qZA()()(),e.BQk(),e.qZA()),2&t&&(e.Q6J("modalRef",o.activeModal),e.xp6(4),e.Q6J("formGroup",o.exportTokenForm),e.xp6(2),e.Q6J("ngIf",o.loading),e.xp6(1),e.Q6J("ngIf",!o.loading))},dependencies:[g.mk,g.sg,g.O5,Mn.W,Ie.z,Ve.G,at.s,Oe.o,We.P,C.V,r._Y,r.JL,r.sg]}),n})();var Os=d(7022),Ns=d(22120),Ps=d(48168),As=d(14745),In=d(79765),bs=d(66682),Is=d(54395),Gs=d(87519),ys=d(45435),Ls=d(88002),Gn=d(60192);function Ds(n,i){1&n&&(e.TgZ(0,"span",29),e.SDv(1,30),e.qZA())}function vs(n,i){1&n&&(e.TgZ(0,"span",29),e.SDv(1,31),e.qZA())}function ws(n,i){1&n&&(e.TgZ(0,"span",29),e.SDv(1,32),e.qZA())}function Ws(n,i){1&n&&(e.TgZ(0,"div",9)(1,"label",33),e.SDv(2,34),e.qZA(),e.TgZ(3,"div",12)(4,"select",35)(5,"option",36),e.SDv(6,37),e.qZA(),e.TgZ(7,"option",38),e.SDv(8,39),e.qZA()()()())}function Us(n,i){1&n&&(e.TgZ(0,"span",29),e.SDv(1,43),e.qZA())}function $s(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",9)(1,"label",40),e.SDv(2,41),e.qZA(),e.TgZ(3,"div",12)(4,"input",42),e.NdJ("focus",function(c){e.CHM(t);const O=e.oxw();return e.KtG(O.labelFocus.next(c.target.value))})("click",function(c){e.CHM(t);const O=e.oxw();return e.KtG(O.labelClick.next(c.target.value))}),e.qZA(),e.YNc(5,Us,2,0,"span",14),e.qZA()()}if(2&n){const t=e.oxw(),o=e.MAs(5);e.xp6(4),e.Q6J("ngbTypeahead",t.searchLabels),e.xp6(1),e.Q6J("ngIf",t.importTokenForm.showError("label",o,"required"))}}function xs(n,i){if(1&n&&(e.TgZ(0,"div",9)(1,"label",44),e.SDv(2,45),e.qZA(),e.TgZ(3,"div",12),e._UZ(4,"cd-select-badges",46),e.qZA()()),2&n){const t=e.oxw();e.xp6(4),e.Q6J("data",t.importTokenForm.controls.hosts.value)("options",t.hosts.options)("messages",t.hosts.messages)}}function Zs(n,i){1&n&&(e.TgZ(0,"span",29),e.SDv(1,51),e.qZA())}function ks(n,i){1&n&&(e.TgZ(0,"span",29),e.SDv(1,52),e.qZA())}function Bs(n,i){if(1&n&&(e.TgZ(0,"div",9)(1,"label",47)(2,"span"),e.SDv(3,48),e.qZA(),e.TgZ(4,"cd-helper"),e.SDv(5,49),e.qZA()(),e.TgZ(6,"div",12),e._UZ(7,"input",50),e.YNc(8,Zs,2,0,"span",14),e.YNc(9,ks,2,0,"span",14),e.qZA()()),2&n){const t=e.oxw(),o=e.MAs(5);e.xp6(8),e.Q6J("ngIf",t.importTokenForm.showError("count",o,"min")),e.xp6(1),e.Q6J("ngIf",t.importTokenForm.showError("count",o,"pattern"))}}function zs(n,i){1&n&&(e.TgZ(0,"span",29),e.SDv(1,56),e.qZA())}function qs(n,i){1&n&&(e.TgZ(0,"span",29),e.SDv(1,57),e.qZA())}function Hs(n,i){1&n&&(e.TgZ(0,"span",29),e.SDv(1,58),e.qZA())}function Xs(n,i){if(1&n&&(e.ynx(0),e.TgZ(1,"div",9)(2,"label",53),e.SDv(3,54),e.qZA(),e.TgZ(4,"div",12),e._UZ(5,"input",55),e.YNc(6,zs,2,0,"span",14),e.YNc(7,qs,2,0,"span",14),e.YNc(8,Hs,2,0,"span",14),e.qZA()(),e.BQk()),2&n){const t=e.oxw(),o=e.MAs(5);e.xp6(6),e.Q6J("ngIf",t.importTokenForm.showError("rgw_frontend_port",o,"pattern")),e.xp6(1),e.Q6J("ngIf",t.importTokenForm.showError("rgw_frontend_port",o,"min")),e.xp6(1),e.Q6J("ngIf",t.importTokenForm.showError("rgw_frontend_port",o,"max"))}}let Ks=(()=>{class n{constructor(t,o,c,O,H){this.activeModal=t,this.hostService=o,this.rgwRealmService=c,this.actionLabels=O,this.notificationService=H,this.endpoints=/^((https?:\/\/)|(www.))(?:([a-zA-Z]+)|(\d+\.\d+.\d+.\d+)):\d{2,4}$/,this.ipv4Rgx=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i,this.ipv6Rgx=/^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}$/i,this.multisiteInfo=[],this.zoneList=[],this.labelClick=new In.xQ,this.labelFocus=new In.xQ,this.searchLabels=Q=>(0,bs.T)(Q.pipe((0,Is.b)(200),(0,Gs.x)()),this.labelFocus,this.labelClick.pipe((0,ys.h)(()=>!this.typeahead.isPopupOpen()))).pipe((0,Ls.U)(J=>this.labels.filter(j=>j.toLowerCase().indexOf(J.toLowerCase())>-1).slice(0,10))),this.hosts={options:[],messages:new Os.a({empty:"There are no hosts.",filter:"Filter hosts"})},this.createForm()}ngOnInit(){this.zoneList=void 0!==this.multisiteInfo[2]&&this.multisiteInfo[2].hasOwnProperty("zones")?this.multisiteInfo[2].zones:[],this.zoneNames=this.zoneList.map(o=>o.name);const t=new Ps.E(()=>{});this.hostService.list(t.toParams(),"false").subscribe(o=>{const c=[];v().forEach(o,O=>{if(v().get(O,"sources.orchestrator",!1)){const H=new As.$(!1,v().get(O,"hostname"),"");c.push(H)}}),this.hosts.options=[...c]}),this.hostService.getLabels().subscribe(o=>{this.labels=o})}createForm(){this.importTokenForm=new Xe.d({realmToken:new r.NI("",{validators:[r.kI.required]}),zoneName:new r.NI(null,{validators:[r.kI.required,z.h.custom("uniqueName",t=>this.zoneNames&&-1!==this.zoneNames.indexOf(t))]}),rgw_frontend_port:new r.NI(null,{validators:[r.kI.required,r.kI.pattern("^[0-9]*$")]}),placement:new r.NI("hosts"),label:new r.NI(null,[z.h.requiredIf({placement:"label",unmanaged:!1})]),hosts:new r.NI([]),count:new r.NI(null,[z.h.number(!1)]),unmanaged:new r.NI(!1)})}onSubmit(){const t=this.importTokenForm.value,o={placement:{}};if(!t.unmanaged){switch(t.placement){case"hosts":t.hosts.length>0&&(o.placement.hosts=t.hosts);break;case"label":o.placement.label=t.label}v().isNumber(t.count)&&t.count>0&&(o.placement.count=t.count)}this.rgwRealmService.importRealmToken(t.realmToken,t.zoneName,t.rgw_frontend_port,o).subscribe(()=>{this.notificationService.show(M.k.success,"Realm token import successfull"),this.activeModal.close()},()=>{this.importTokenForm.setErrors({cdSubmitButton:!0})})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(x.Kz),e.Y36(Ns.x),e.Y36(ot.y),e.Y36(l.p4),e.Y36(V.g))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-multisite-import"]],viewQuery:function(t,o){if(1&t&&e.Gf(x.dR,5),2&t){let c;e.iGM(c=e.CRH())&&(o.typeahead=c.first)}},decls:47,vars:12,consts:function(){let i,t,o,c,O,H,Q,J,j,oe,Te,Me,Fe,Pe,me,Ge,ye,Le,Ee,Ue,$e,xe,De,ve;return i="Import Multi-site Token",t="Zone Details",o="Token ",c="Secondary Zone Name",O="Service Details",H="Unmanaged",Q="If set to true, the orchestrator will not start nor stop any daemon associated with this service. Placement and all other properties will be ignored.",J="This field is required.",j="This field is required.",oe="The chosen zone name is already in use.",Te="Placement",Me="Serveurs",Fe="Label",Pe="Label",me="This field is required.",Ge="Serveurs",ye="Count",Le="Only that number of daemons will be created.",Ee="The value must be at least 1.",Ue="La valeur entr\xE9e doit \xEAtre un nombre.",$e="Port",xe="La valeur entr\xE9e doit \xEAtre un nombre.",De="The value must be at least 1.",ve="The value cannot exceed 65535.",[[3,"modalRef"],[1,"modal-title"],i,[1,"modal-content"],["name","importTokenForm",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],["type","info","spacingClass","mb-3"],t,[1,"form-group","row"],["for","realmToken",1,"cd-col-form-label","required"],o,[1,"cd-col-form-input"],["id","realmToken","name","realmToken","type","text","formControlName","realmToken",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","zoneName",1,"cd-col-form-label","required"],c,["type","text","placeholder","Zone name...","id","zoneName","name","zoneName","formControlName","zoneName",1,"form-control"],O,[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","unmanaged","type","checkbox","formControlName","unmanaged",1,"custom-control-input"],["for","unmanaged",1,"custom-control-label"],H,Q,["class","form-group row",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],[3,"submitText","form","submitActionEvent"],[1,"invalid-feedback"],J,j,oe,["for","placement",1,"cd-col-form-label"],Te,["id","placement","formControlName","placement",1,"form-select"],["value","hosts"],Me,["value","label"],Fe,["for","label",1,"cd-col-form-label"],Pe,["id","label","type","text","formControlName","label",1,"form-control",3,"ngbTypeahead","focus","click"],me,["for","hosts",1,"cd-col-form-label"],Ge,["id","hosts",3,"data","options","messages"],["for","count",1,"cd-col-form-label"],ye,Le,["id","count","type","number","formControlName","count","min","1",1,"form-control"],Ee,Ue,["for","rgw_frontend_port",1,"cd-col-form-label"],$e,["id","rgw_frontend_port","type","number","formControlName","rgw_frontend_port","min","1","max","65535",1,"form-control"],xe,De,ve]},template:function(t,o){if(1&t&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.BQk(),e.ynx(3,3),e.TgZ(4,"form",4,5)(6,"div",6)(7,"cd-alert-panel",7)(8,"ul")(9,"li"),e._uU(10,"This feature allows you to configure a connection between your primary and secondary Ceph clusters for data replication. By importing a token, you establish a link between the clusters, enabling data synchronization."),e.qZA(),e.TgZ(11,"li"),e._uU(12,"To obtain the token, generate it from your primary Ceph cluster. This token includes encoded information about the primary cluster's endpoint, access key, and secret key."),e.qZA(),e.TgZ(13,"li"),e._uU(14,"The secondary zone represents the destination cluster where your data will be replicated."),e.qZA()()(),e.TgZ(15,"legend"),e.SDv(16,8),e.qZA(),e.TgZ(17,"div",9)(18,"label",10),e.SDv(19,11),e.qZA(),e.TgZ(20,"div",12),e._UZ(21,"input",13),e.YNc(22,Ds,2,0,"span",14),e.qZA()(),e.TgZ(23,"div",9)(24,"label",15),e.SDv(25,16),e.qZA(),e.TgZ(26,"div",12),e._UZ(27,"input",17),e.YNc(28,vs,2,0,"span",14),e.YNc(29,ws,2,0,"span",14),e.qZA()(),e.TgZ(30,"legend"),e.SDv(31,18),e.qZA(),e.TgZ(32,"div",9)(33,"div",19)(34,"div",20),e._UZ(35,"input",21),e.TgZ(36,"label",22),e.SDv(37,23),e.qZA(),e.TgZ(38,"cd-helper"),e.SDv(39,24),e.qZA()()()(),e.YNc(40,Ws,9,0,"div",25),e.YNc(41,$s,6,2,"div",25),e.YNc(42,xs,5,3,"div",25),e.YNc(43,Bs,10,2,"div",25),e.YNc(44,Xs,9,3,"ng-container",26),e.qZA(),e.TgZ(45,"div",27)(46,"cd-form-button-panel",28),e.NdJ("submitActionEvent",function(){return o.onSubmit()}),e.qZA()()(),e.BQk(),e.qZA()),2&t){const c=e.MAs(5);e.Q6J("modalRef",o.activeModal),e.xp6(4),e.Q6J("formGroup",o.importTokenForm),e.xp6(18),e.Q6J("ngIf",o.importTokenForm.showError("realmToken",c,"required")),e.xp6(6),e.Q6J("ngIf",o.importTokenForm.showError("zoneName",c,"required")),e.xp6(1),e.Q6J("ngIf",o.importTokenForm.showError("zoneName",c,"uniqueName")),e.xp6(11),e.Q6J("ngIf",!o.importTokenForm.controls.unmanaged.value),e.xp6(1),e.Q6J("ngIf",!o.importTokenForm.controls.unmanaged.value&&"label"===o.importTokenForm.controls.placement.value),e.xp6(1),e.Q6J("ngIf",!o.importTokenForm.controls.unmanaged.value&&"hosts"===o.importTokenForm.controls.placement.value),e.xp6(1),e.Q6J("ngIf",!o.importTokenForm.controls.unmanaged.value),e.xp6(1),e.Q6J("ngIf",!o.importTokenForm.controls.unmanaged.value),e.xp6(2),e.Q6J("submitText",o.actionLabels.IMPORT)("form",o.importTokenForm)}},dependencies:[g.O5,fe.S,Gn.m,Ie.z,Ve.G,we.p,Oe.o,Ae.b,We.P,C.V,r._Y,r.YN,r.Kr,r.Fj,r.wV,r.Wl,r.EJ,r.JJ,r.JL,r.qQ,r.Fd,r.sg,r.u]}),n})();var Qs=d(72625);function Ys(n,i){1&n&&(e.TgZ(0,"span",20),e.SDv(1,21),e.qZA())}function Js(n,i){1&n&&(e.TgZ(0,"span",20),e.SDv(1,22),e.qZA())}function Vs(n,i){1&n&&(e.TgZ(0,"cd-helper")(1,"span"),e.SDv(2,23),e.qZA()())}function js(n,i){if(1&n&&(e.TgZ(0,"cd-helper")(1,"span"),e.tHW(2,24),e._UZ(3,"a",25),e.N_p(),e.qZA()()),2&n){const t=e.oxw();e.xp6(3),e.s9C("href",t.docUrl,e.LSH)}}function ea(n,i){1&n&&(e.TgZ(0,"cd-helper")(1,"span"),e.SDv(2,26),e.qZA()())}let ta=(()=>{class n{constructor(t,o,c,O,H){this.activeModal=t,this.actionLabels=o,this.rgwRealmService=c,this.notificationService=O,this.docService=H,this.editing=!1,this.multisiteInfo=[],this.realmList=[],this.zonegroupList=[],this.defaultRealmDisabled=!1,this.action=this.editing?this.actionLabels.EDIT+this.resource:this.actionLabels.CREATE+this.resource,this.createForm()}createForm(){this.multisiteRealmForm=new Xe.d({realmName:new r.p4(null,{validators:[r.kI.required,z.h.custom("uniqueName",t=>"create"===this.action&&this.realmNames&&-1!==this.realmNames.indexOf(t))]}),default_realm:new r.p4(!1)})}ngOnInit(){this.realmList=void 0!==this.multisiteInfo[0]&&this.multisiteInfo[0].hasOwnProperty("realms")?this.multisiteInfo[0].realms:[],this.realmNames=this.realmList.map(t=>t.name),"edit"===this.action&&(this.zonegroupList=void 0!==this.multisiteInfo[1]&&this.multisiteInfo[1].hasOwnProperty("zonegroups")?this.multisiteInfo[1].zonegroups:[],this.multisiteRealmForm.get("realmName").setValue(this.info.data.name),this.multisiteRealmForm.get("default_realm").setValue(this.info.data.is_default),this.info.data.is_default&&this.multisiteRealmForm.get("default_realm").disable()),this.zonegroupList.forEach(t=>{!0===t.is_master&&t.realm_id===this.info.data.id&&(this.isMaster=!0)}),this.defaultsInfo&&null!==this.defaultsInfo.defaultRealmName&&(this.multisiteRealmForm.get("default_realm").disable(),this.defaultRealmDisabled=!0),this.docUrl=this.docService.urlGenerator("rgw-multisite")}submit(){const t=this.multisiteRealmForm.getRawValue();this.realm=new ke.L6,"create"===this.action?(this.realm.name=t.realmName,this.rgwRealmService.create(this.realm,t.default_realm).subscribe(()=>{this.notificationService.show(M.k.success,"Realm: '" + t.realmName + "' created successfully"),this.activeModal.close()},()=>{this.multisiteRealmForm.setErrors({cdSubmitButton:!0})})):"edit"===this.action&&(this.realm.name=this.info.data.name,this.newRealmName=t.realmName,this.rgwRealmService.update(this.realm,t.default_realm,this.newRealmName).subscribe(()=>{this.notificationService.show(M.k.success,"Realm: '" + t.realmName + "' updated successfully"),this.activeModal.close()},()=>{this.multisiteRealmForm.setErrors({cdSubmitButton:!0})}))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(x.Kz),e.Y36(l.p4),e.Y36(ot.y),e.Y36(V.g),e.Y36(Qs.R))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-multisite-realm-form"]],decls:27,vars:20,consts:function(){let i,t,o,c,O,H,Q,J;return i="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",t="Realm Name",o="Default",c="This field is required.",O="The chosen realm name is already in use.",H="You cannot unset the default flag.",Q="Please consult the " + "\ufffd#3\ufffd" + "documentation" + "\ufffd/#3\ufffd" + " to follow the failover mechanism",J="Default realm already exists.",[[3,"modalRef"],[1,"modal-title"],i,[1,"modal-content"],["name","multisiteRealmForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","realmName",1,"cd-col-form-label","required"],t,[1,"cd-col-form-input"],["type","text","placeholder","Realm name...","id","realmName","name","realmName","formControlName","realmName",1,"form-control"],["class","invalid-feedback",4,"ngIf"],[1,"custom-control","custom-checkbox"],["id","default_realm","name","default_realm","formControlName","default_realm","type","checkbox",1,"form-check-input"],["for","default_realm",1,"form-check-label"],o,[4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],c,O,H,Q,[3,"href"],J]},template:function(t,o){if(1&t&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5)(8,"div",6)(9,"div",7)(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10),e._UZ(13,"input",11),e.YNc(14,Ys,2,0,"span",12),e.YNc(15,Js,2,0,"span",12),e.TgZ(16,"div",13),e._UZ(17,"input",14),e.TgZ(18,"label",15),e.SDv(19,16),e.qZA(),e.YNc(20,Vs,3,0,"cd-helper",17),e.YNc(21,js,4,1,"cd-helper",17),e.YNc(22,ea,3,0,"cd-helper",17),e.qZA()()()(),e.TgZ(23,"div",18)(24,"cd-form-button-panel",19),e.NdJ("submitActionEvent",function(){return o.submit()}),e.ALo(25,"titlecase"),e.ALo(26,"upperFirst"),e.qZA()()(),e.BQk(),e.qZA()),2&t){const c=e.MAs(7);e.Q6J("modalRef",o.activeModal),e.xp6(4),e.pQV(e.lcZ(3,12,o.action))(e.lcZ(4,14,o.resource)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",o.multisiteRealmForm),e.xp6(8),e.Q6J("ngIf",o.multisiteRealmForm.showError("realmName",c,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteRealmForm.showError("realmName",c,"uniqueName")),e.xp6(2),e.uIk("disabled","edit"===o.action||null),e.xp6(3),e.Q6J("ngIf","edit"===o.action&&o.info.data.is_default),e.xp6(1),e.Q6J("ngIf","edit"===o.action&&!o.info.data.is_default),e.xp6(1),e.Q6J("ngIf",o.defaultRealmDisabled&&"create"===o.action),e.xp6(2),e.Q6J("form",o.multisiteRealmForm)("submitText",e.lcZ(25,16,o.action)+" "+e.lcZ(26,18,o.resource))}},dependencies:[g.O5,fe.S,Ie.z,we.p,Oe.o,Ae.b,We.P,C.V,r._Y,r.Fj,r.Wl,r.JJ,r.JL,r.sg,r.u,g.rS,Ye.m]}),n})();function na(n,i){if(1&n&&(e.TgZ(0,"option",40),e._uU(1),e.qZA()),2&n){const t=i.$implicit,o=e.oxw();e.Q6J("value",t.name)("selected",t.name===o.multisiteZoneForm.getValue("selectedZonegroup")),e.xp6(1),e.hij(" ",t.name," ")}}function oa(n,i){1&n&&(e.TgZ(0,"span",41),e.SDv(1,42),e.qZA())}function ia(n,i){1&n&&(e.TgZ(0,"span",41),e.SDv(1,43),e.qZA())}function _a(n,i){1&n&&(e.TgZ(0,"span")(1,"cd-helper"),e.SDv(2,44),e.qZA()())}function ra(n,i){1&n&&(e.TgZ(0,"span")(1,"cd-helper"),e.SDv(2,45),e.qZA()())}function sa(n,i){if(1&n&&(e.TgZ(0,"cd-helper")(1,"span"),e.tHW(2,46),e._UZ(3,"a",47),e.N_p(),e.qZA()()),2&n){const t=e.oxw();e.xp6(3),e.s9C("href",t.docUrl,e.LSH)}}function aa(n,i){1&n&&(e.TgZ(0,"span")(1,"cd-helper"),e.SDv(2,48),e.qZA()())}function la(n,i){1&n&&(e.TgZ(0,"span")(1,"cd-helper"),e.SDv(2,49),e.qZA()())}function ca(n,i){if(1&n&&(e.TgZ(0,"cd-helper")(1,"span"),e.tHW(2,50),e._UZ(3,"a",47),e.N_p(),e.qZA()()),2&n){const t=e.oxw();e.xp6(3),e.s9C("href",t.docUrl,e.LSH)}}function ua(n,i){1&n&&(e.TgZ(0,"span",41),e.SDv(1,51),e.qZA())}function da(n,i){1&n&&(e.TgZ(0,"span",41),e.SDv(1,52),e.qZA())}function fa(n,i){if(1&n&&(e.TgZ(0,"option",40),e._uU(1),e.qZA()),2&n){const t=i.$implicit,o=e.oxw(3);e.Q6J("value",t.name)("selected",t.name===o.multisiteZoneForm.getValue("placementTarget")),e.xp6(1),e.hij(" ",t.name," ")}}function pa(n,i){if(1&n&&(e.TgZ(0,"option",40),e._uU(1),e.qZA()),2&n){const t=i.$implicit,o=e.oxw(3);e.Q6J("value",t.poolname)("selected",t.poolname===o.multisiteZoneForm.getValue("placementDataPool")),e.xp6(1),e.hij(" ",t.poolname," ")}}function ga(n,i){if(1&n&&(e.TgZ(0,"option",40),e._uU(1),e.qZA()),2&n){const t=i.$implicit,o=e.oxw(3);e.Q6J("value",t.poolname)("selected",t.poolname===o.multisiteZoneForm.getValue("placementIndexPool")),e.xp6(1),e.hij(" ",t.poolname," ")}}function Ta(n,i){if(1&n&&(e.TgZ(0,"option",40),e._uU(1),e.qZA()),2&n){const t=i.$implicit,o=e.oxw(3);e.Q6J("value",t.poolname)("selected",t.poolname===o.multisiteZoneForm.getValue("placementDataExtraPool")),e.xp6(1),e.hij(" ",t.poolname," ")}}function Ea(n,i){if(1&n&&(e.TgZ(0,"option",75),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t.value),e.xp6(1),e.hij(" ",t.value," ")}}function Ra(n,i){if(1&n&&(e.TgZ(0,"option",40),e._uU(1),e.qZA()),2&n){const t=i.$implicit,o=e.oxw(3);e.Q6J("value",t.poolname)("selected",t.poolname===o.multisiteZoneForm.getValue("storageDataPool")),e.xp6(1),e.hij(" ",t.poolname," ")}}function ma(n,i){if(1&n&&(e.TgZ(0,"option",75),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t," ")}}function ha(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"legend"),e._uU(2,"Placement Targets"),e.qZA(),e.TgZ(3,"div",7)(4,"label",53),e.SDv(5,54),e.qZA(),e.TgZ(6,"div",10)(7,"select",55),e.NdJ("change",function(c){e.CHM(t);const O=e.oxw(2);return e.KtG(O.getZonePlacementData(c.target.value))}),e.YNc(8,fa,2,3,"option",12),e.qZA()()(),e.TgZ(9,"div",7)(10,"label",56),e.SDv(11,57),e.qZA(),e.TgZ(12,"div",10)(13,"select",58),e.YNc(14,pa,2,3,"option",12),e.qZA()()(),e.TgZ(15,"div",7)(16,"label",59),e.SDv(17,60),e.qZA(),e.TgZ(18,"div",10)(19,"select",61),e.YNc(20,ga,2,3,"option",12),e.qZA()()(),e.TgZ(21,"div",7)(22,"label",62),e.SDv(23,63),e.qZA(),e.TgZ(24,"div",10)(25,"select",64),e.YNc(26,Ta,2,3,"option",12),e.qZA()()(),e.TgZ(27,"div")(28,"legend"),e._uU(29,"Storage Classes"),e.qZA(),e.TgZ(30,"div",7)(31,"label",65),e.SDv(32,66),e.qZA(),e.TgZ(33,"div",10)(34,"select",67),e.NdJ("change",function(c){e.CHM(t);const O=e.oxw(2);return e.KtG(O.getStorageClassData(c.target.value))}),e.YNc(35,Ea,2,2,"option",68),e.qZA()()(),e.TgZ(36,"div",7)(37,"label",69),e.SDv(38,70),e.qZA(),e.TgZ(39,"div",10)(40,"select",71),e.YNc(41,Ra,2,3,"option",12),e.qZA()()(),e.TgZ(42,"div",7)(43,"label",72),e.SDv(44,73),e.qZA(),e.TgZ(45,"div",10)(46,"select",74),e.YNc(47,ma,2,2,"option",68),e.qZA()()()()()}if(2&n){const t=e.oxw(2);e.xp6(8),e.Q6J("ngForOf",t.placementTargets),e.xp6(5),e.Q6J("value",t.placementDataPool),e.xp6(1),e.Q6J("ngForOf",t.poolList),e.xp6(6),e.Q6J("ngForOf",t.poolList),e.xp6(6),e.Q6J("ngForOf",t.poolList),e.xp6(9),e.Q6J("ngForOf",t.storageClassList),e.xp6(6),e.Q6J("ngForOf",t.poolList),e.xp6(6),e.Q6J("ngForOf",t.compressionTypes)}}function Ma(n,i){if(1&n&&(e.TgZ(0,"div",7),e.YNc(1,ha,48,8,"div",21),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf","edit"===t.action)}}let Sa=(()=>{class n{constructor(t,o,c,O,H,Q,J,j){this.activeModal=t,this.actionLabels=o,this.rgwMultisiteService=c,this.rgwZoneService=O,this.rgwZoneGroupService=H,this.notificationService=Q,this.rgwUserService=J,this.modalService=j,this.endpoints=/^((https?:\/\/)|(www.))(?:([a-zA-Z]+)|(\d+\.\d+.\d+.\d+)):\d{2,4}$/,this.ipv4Rgx=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i,this.ipv6Rgx=/^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}$/i,this.editing=!1,this.defaultsInfo=[],this.multisiteInfo=[],this.zonegroupList=[],this.zoneList=[],this.poolList=[],this.storageClassList=[],this.disableDefault=!1,this.disableMaster=!1,this.isMetadataSync=!1,this.syncStatusTimedOut=!1,this.createSystemUser=!1,this.compressionTypes=["lz4","zlib","snappy"],this.userListReady=!1,this.action=this.editing?this.actionLabels.EDIT+this.resource:this.actionLabels.CREATE+this.resource,this.createForm()}createForm(){this.multisiteZoneForm=new Xe.d({zoneName:new r.p4(null,{validators:[r.kI.required,z.h.custom("uniqueName",t=>"create"===this.action&&this.zoneNames&&-1!==this.zoneNames.indexOf(t))]}),default_zone:new r.p4(!1),master_zone:new r.p4(!1),selectedZonegroup:new r.p4(null),zone_endpoints:new r.p4(null,{validators:[z.h.custom("endpoint",t=>!(v().isEmpty(t)||(t.includes(",")?(t.split(",").forEach(o=>!this.endpoints.test(o)&&!this.ipv4Rgx.test(o)&&!this.ipv6Rgx.test(o)),1):this.endpoints.test(t)||this.ipv4Rgx.test(t)||this.ipv6Rgx.test(t)))),r.kI.required]}),access_key:new r.p4("",{}),secret_key:new r.p4("",{}),placementTarget:new r.p4(null),placementDataPool:new r.p4(""),placementIndexPool:new r.p4(null),placementDataExtraPool:new r.p4(null),storageClass:new r.p4(null),storageDataPool:new r.p4(null),storageCompression:new r.p4(null)})}onZoneGroupChange(t){let o=new ke.iG;o.name=t,this.rgwZoneGroupService.get(o).subscribe(c=>{v().isEmpty(c.master_zone)?(this.multisiteZoneForm.get("master_zone").setValue(!0),this.multisiteZoneForm.get("master_zone").disable(),this.disableMaster=!1):!v().isEmpty(c.master_zone)&&"create"===this.action&&(this.multisiteZoneForm.get("master_zone").setValue(!1),this.multisiteZoneForm.get("master_zone").disable(),this.disableMaster=!0)}),this.multisiteZoneForm.getValue("selectedZonegroup")!==this.defaultsInfo.defaultZonegroupName&&(this.disableDefault=!0,this.multisiteZoneForm.get("default_zone").disable())}ngOnInit(){this.zonegroupList=void 0!==this.multisiteInfo[1]&&this.multisiteInfo[1].hasOwnProperty("zonegroups")?this.multisiteInfo[1].zonegroups:[],this.zoneList=void 0!==this.multisiteInfo[2]&&this.multisiteInfo[2].hasOwnProperty("zones")?this.multisiteInfo[2].zones:[],this.zoneNames=this.zoneList.map(t=>t.name),"create"===this.action&&void 0!==this.defaultsInfo.defaultZonegroupName&&(this.multisiteZoneForm.get("selectedZonegroup").setValue(this.defaultsInfo.defaultZonegroupName),this.onZoneGroupChange(this.defaultsInfo.defaultZonegroupName)),"edit"===this.action&&(this.placementTargets=this.info.parent?this.info.parent.data.placement_targets:[],this.rgwZoneService.getPoolNames().subscribe(o=>{this.poolList=o}),this.multisiteZoneForm.get("zoneName").setValue(this.info.data.name),this.multisiteZoneForm.get("selectedZonegroup").setValue(this.info.data.parent),this.multisiteZoneForm.get("default_zone").setValue(this.info.data.is_default),this.multisiteZoneForm.get("master_zone").setValue(this.info.data.is_master),this.multisiteZoneForm.get("zone_endpoints").setValue(this.info.data.endpoints.toString()),this.multisiteZoneForm.get("access_key").setValue(this.info.data.access_key),this.multisiteZoneForm.get("secret_key").setValue(this.info.data.secret_key),this.multisiteZoneForm.get("placementTarget").setValue(this.info.parent.data.default_placement),this.getZonePlacementData(this.multisiteZoneForm.getValue("placementTarget")),this.info.data.is_default&&(this.isDefaultZone=!0,this.multisiteZoneForm.get("default_zone").disable()),this.info.data.is_master&&(this.isMasterZone=!0,this.multisiteZoneForm.get("master_zone").disable()),(new ke.jb).name=this.info.data.name,this.onZoneGroupChange(this.info.data.parent)),this.multisiteZoneForm.getValue("selectedZonegroup")!==this.defaultsInfo.defaultZonegroupName&&(this.disableDefault=!0,this.multisiteZoneForm.get("default_zone").disable())}getZonePlacementData(t){this.zone=new ke.jb,this.zone.name=this.info.data.name,this.placementTargets&&this.placementTargets.forEach(o=>{o.name===t&&(this.storageClassList=Object.entries(o.storage_classes).map(([O,H])=>({key:O,value:H})))}),this.rgwZoneService.get(this.zone).subscribe(o=>{this.zoneInfo=o,this.zoneInfo&&this.zoneInfo.placement_pools&&this.zoneInfo.placement_pools.forEach(c=>{if(c.key===t){let O=c.val.storage_classes,H=O.STANDARD?O.STANDARD.data_pool:"",Q=c.val.index_pool,J=c.val.data_extra_pool;this.poolList.push({poolname:H}),this.poolList.push({poolname:Q}),this.poolList.push({poolname:J}),this.multisiteZoneForm.get("storageClass").setValue(this.storageClassList[0].value),this.multisiteZoneForm.get("storageDataPool").setValue(H),this.multisiteZoneForm.get("storageCompression").setValue(this.compressionTypes[0]),this.multisiteZoneForm.get("placementDataPool").setValue(H),this.multisiteZoneForm.get("placementIndexPool").setValue(Q),this.multisiteZoneForm.get("placementDataExtraPool").setValue(J)}})})}getStorageClassData(t){let o=this.storageClassList.find(c=>c.value==t).value;this.poolList.push({poolname:o.data_pool}),this.multisiteZoneForm.get("storageDataPool").setValue(o.data_pool),this.multisiteZoneForm.get("storageCompression").setValue(o.compression_type)}submit(){const t=this.multisiteZoneForm.getRawValue();"create"===this.action?(this.zonegroup=new ke.iG,this.zonegroup.name=t.selectedZonegroup,this.zone=new ke.jb,this.zone.name=t.zoneName,this.zone.endpoints=t.zone_endpoints,this.zone.system_key=new ke.VY,this.zone.system_key.access_key=t.access_key,this.zone.system_key.secret_key=t.secret_key,this.rgwZoneService.create(this.zone,this.zonegroup,t.default_zone,t.master_zone,this.zone.endpoints).subscribe(()=>{this.notificationService.show(M.k.success,"Zone: '" + t.zoneName + "' created successfully"),this.activeModal.close()},()=>{this.multisiteZoneForm.setErrors({cdSubmitButton:!0})})):"edit"===this.action&&(this.zonegroup=new ke.iG,this.zonegroup.name=t.selectedZonegroup,this.zone=new ke.jb,this.zone.name=this.info.data.name,this.zone.endpoints=t.zone_endpoints,this.zone.system_key=new ke.VY,this.zone.system_key.access_key=t.access_key,this.zone.system_key.secret_key=t.secret_key,this.rgwZoneService.update(this.zone,this.zonegroup,t.zoneName,t.default_zone,t.master_zone,this.zone.endpoints,t.placementTarget,t.placementDataPool,t.placementIndexPool,t.placementDataExtraPool,t.storageClass,t.storageDataPool,t.storageCompression).subscribe(()=>{this.notificationService.show(M.k.success,"Zone: '" + t.zoneName + "' updated successfully"),this.activeModal.close()},()=>{this.multisiteZoneForm.setErrors({cdSubmitButton:!0})}))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(x.Kz),e.Y36(l.p4),e.Y36(an.o),e.Y36(it.g),e.Y36(_t.K),e.Y36(V.g),e.Y36(f),e.Y36(Qe.Z))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-multisite-zone-form"]],decls:75,vars:29,consts:function(){let i,t,o,c,O,H,Q,J,j,oe,Te,Me,Fe,Pe,me,Ge,ye,Le,Ee,Ue,$e,xe,De,ve,se;return i="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",t="Select Zone Group",o="Zone Name",c="Default",O="Master",H="Endpoints",Q="S3 access key " + "\ufffd#47\ufffd" + "" + "\ufffd#48\ufffd" + "To see or copy your S3 access key, go to " + "[\ufffd#49\ufffd|\ufffd#50\ufffd|\ufffd#51\ufffd|\ufffd#52\ufffd]" + "Object Gateway > Users" + "[\ufffd/#49\ufffd|\ufffd/#50\ufffd|\ufffd/#51\ufffd|\ufffd/#52\ufffd]" + " and click on your user name. In " + "[\ufffd#49\ufffd|\ufffd#50\ufffd|\ufffd#51\ufffd|\ufffd#52\ufffd]" + "Keys" + "[\ufffd/#49\ufffd|\ufffd/#50\ufffd|\ufffd/#51\ufffd|\ufffd/#52\ufffd]" + ", click " + "[\ufffd#49\ufffd|\ufffd#50\ufffd|\ufffd#51\ufffd|\ufffd#52\ufffd]" + "Show" + "[\ufffd/#49\ufffd|\ufffd/#50\ufffd|\ufffd/#51\ufffd|\ufffd/#52\ufffd]" + ". View the access key by clicking Show and copy the key by clicking " + "[\ufffd#49\ufffd|\ufffd#50\ufffd|\ufffd#51\ufffd|\ufffd#52\ufffd]" + "Copy to Clipboard" + "[\ufffd/#49\ufffd|\ufffd/#50\ufffd|\ufffd/#51\ufffd|\ufffd/#52\ufffd]" + "." + "\ufffd/#48\ufffd" + "" + "\ufffd/#47\ufffd" + "",Q=e.Zx4(Q),J="S3 secret key " + "\ufffd#60\ufffd" + "" + "\ufffd#61\ufffd" + "To see or copy your S3 access key, go to " + "[\ufffd#62\ufffd|\ufffd#63\ufffd|\ufffd#64\ufffd|\ufffd#65\ufffd]" + "Object Gateway > Users" + "[\ufffd/#62\ufffd|\ufffd/#63\ufffd|\ufffd/#64\ufffd|\ufffd/#65\ufffd]" + " and click on your user name. In " + "[\ufffd#62\ufffd|\ufffd#63\ufffd|\ufffd#64\ufffd|\ufffd#65\ufffd]" + "Keys" + "[\ufffd/#62\ufffd|\ufffd/#63\ufffd|\ufffd/#64\ufffd|\ufffd/#65\ufffd]" + ", click " + "[\ufffd#62\ufffd|\ufffd#63\ufffd|\ufffd#64\ufffd|\ufffd#65\ufffd]" + "Show" + "[\ufffd/#62\ufffd|\ufffd/#63\ufffd|\ufffd/#64\ufffd|\ufffd/#65\ufffd]" + ". View the secret key by clicking Show and copy the key by clicking " + "[\ufffd#62\ufffd|\ufffd#63\ufffd|\ufffd#64\ufffd|\ufffd#65\ufffd]" + "Copy to Clipboard" + "[\ufffd/#62\ufffd|\ufffd/#63\ufffd|\ufffd/#64\ufffd|\ufffd/#65\ufffd]" + "." + "\ufffd/#61\ufffd" + "" + "\ufffd/#60\ufffd" + "",J=e.Zx4(J),j="This field is required.",oe="The chosen zone name is already in use.",Te="Default zone can only exist in a default zone group. ",Me="You cannot unset the default flag. ",Fe="Please consult the " + "\ufffd#3\ufffd" + "documentation" + "\ufffd/#3\ufffd" + " to follow the failover mechanism",Pe="Master zone already exists for the selected zone group. ",me="You cannot unset the master flag. ",Ge="Please consult the " + "\ufffd#3\ufffd" + "documentation" + "\ufffd/#3\ufffd" + " to follow the failover mechanism",ye="This field is required.",Le="Please enter a valid IP address.",Ee="Placement target",Ue="R\xE9serve de donn\xE9es",$e="Index pool",xe="Data extra pool",De="Storage Class",ve="R\xE9serve de donn\xE9es",se="Compression",[[3,"modalRef"],[1,"modal-title"],i,[1,"modal-content"],["name","multisiteZoneForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","selectedZonegroup",1,"cd-col-form-label"],t,[1,"cd-col-form-input"],["id","selectedZonegroup","formControlName","selectedZonegroup","name","selectedZonegroup",1,"form-select",3,"change"],[3,"value","selected",4,"ngFor","ngForOf"],["for","zonegroupName",1,"cd-col-form-label","required"],o,["type","text","placeholder","Zone name...","id","zoneName","name","zoneName","formControlName","zoneName",1,"form-control"],["class","invalid-feedback",4,"ngIf"],[1,"custom-control","custom-checkbox"],["id","default_zone","name","default_zone","formControlName","default_zone","type","checkbox",1,"form-check-input"],["for","default_zone",1,"form-check-label"],c,[4,"ngIf"],["id","master_zone","name","master_zone","formControlName","master_zone","type","checkbox",1,"form-check-input"],["for","master_zone",1,"form-check-label"],O,["for","zone_endpoints",1,"cd-col-form-label","required"],H,["type","text","placeholder","e.g, http://ceph-node-00.com:80","id","zone_endpoints","name","zone_endpoints","formControlName","zone_endpoints",1,"form-control"],["for","access_key",1,"cd-col-form-label"],Q,[1,"input-group"],["type","password","placeholder","DiPt4V7WWvy2njL1z6aC","id","access_key","name","access_key","formControlName","access_key",1,"form-control"],["type","button","cdPasswordButton","access_key",1,"btn","btn-light"],["for","secret_key",1,"cd-col-form-label"],J,["type","password","placeholder","xSZUdYky0bTctAdCEEW8ikhfBVKsBV5LFYL82vvh","id","secret_key","name","secret_key","formControlName","secret_key",1,"form-control"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["class","form-group row",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[3,"value","selected"],[1,"invalid-feedback"],j,oe,Te,Me,Fe,[3,"href"],Pe,me,Ge,ye,Le,["for","placementTarget",1,"cd-col-form-label"],Ee,["id","placementTarget","formControlName","placementTarget","name","placementTarget",1,"form-select",3,"change"],["for","placementDataPool",1,"cd-col-form-label"],Ue,["id","placementDataPool","formControlName","placementDataPool","name","placementDataPool",1,"form-select",3,"value"],["for","placementIndexPool",1,"cd-col-form-label"],$e,["id","placementIndexPool","formControlName","placementIndexPool","name","placementIndexPool",1,"form-select"],["for","placementDataExtraPool",1,"cd-col-form-label"],xe,["id","placementDataExtraPool","formControlName","placementDataExtraPool","name","placementDataExtraPool",1,"form-select"],["for","storageClass",1,"cd-col-form-label"],De,["id","storageClass","formControlName","storageClass","name","storageClass",1,"form-select",3,"change"],[3,"value",4,"ngFor","ngForOf"],["for","storageDataPool",1,"cd-col-form-label"],ve,["id","storageDataPool","formControlName","storageDataPool","name","storageDataPool",1,"form-select"],["for","storageCompression",1,"cd-col-form-label"],se,["id","storageCompression","formControlName","storageCompression","name","storageCompression",1,"form-select"],[3,"value"]]},template:function(t,o){if(1&t&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.ALo(4,"upperFirst"),e.BQk(),e.ynx(5,3),e.TgZ(6,"form",4,5)(8,"div",6)(9,"div",7)(10,"label",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10)(13,"select",11),e.NdJ("change",function(O){return o.onZoneGroupChange(O.target.value)}),e.YNc(14,na,2,3,"option",12),e.qZA()()(),e.TgZ(15,"div",7)(16,"label",13),e.SDv(17,14),e.qZA(),e.TgZ(18,"div",10),e._UZ(19,"input",15),e.YNc(20,oa,2,0,"span",16),e.YNc(21,ia,2,0,"span",16),e.TgZ(22,"div",17),e._UZ(23,"input",18),e.TgZ(24,"label",19),e.SDv(25,20),e.qZA(),e.YNc(26,_a,3,0,"span",21),e.YNc(27,ra,3,0,"span",21),e.YNc(28,sa,4,1,"cd-helper",21),e._UZ(29,"br"),e.qZA(),e.TgZ(30,"div",17),e._UZ(31,"input",22),e.TgZ(32,"label",23),e.SDv(33,24),e.qZA(),e.YNc(34,aa,3,0,"span",21),e.YNc(35,la,3,0,"span",21),e.YNc(36,ca,4,1,"cd-helper",21),e.qZA()()(),e.TgZ(37,"div",7)(38,"label",25),e.SDv(39,26),e.qZA(),e.TgZ(40,"div",10),e._UZ(41,"input",27),e.YNc(42,ua,2,0,"span",16),e.YNc(43,da,2,0,"span",16),e.qZA()(),e.TgZ(44,"div",7)(45,"label",28),e.tHW(46,29),e.TgZ(47,"cd-helper")(48,"span"),e._UZ(49,"b")(50,"b")(51,"b")(52,"b"),e.qZA()(),e.N_p(),e.qZA(),e.TgZ(53,"div",10)(54,"div",30),e._UZ(55,"input",31)(56,"button",32),e.qZA()()(),e.TgZ(57,"div",7)(58,"label",33),e.tHW(59,34),e.TgZ(60,"cd-helper")(61,"span"),e._UZ(62,"b")(63,"b")(64,"b")(65,"b"),e.qZA()(),e.N_p(),e.qZA(),e.TgZ(66,"div",10)(67,"div",30),e._UZ(68,"input",35)(69,"button",36),e.qZA()()(),e.YNc(70,Ma,2,1,"div",37),e.qZA(),e.TgZ(71,"div",38)(72,"cd-form-button-panel",39),e.NdJ("submitActionEvent",function(){return o.submit()}),e.ALo(73,"titlecase"),e.ALo(74,"upperFirst"),e.qZA()()(),e.BQk(),e.qZA()),2&t){const c=e.MAs(7);e.Q6J("modalRef",o.activeModal),e.xp6(4),e.pQV(e.lcZ(3,21,o.action))(e.lcZ(4,23,o.resource)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",o.multisiteZoneForm),e.xp6(7),e.uIk("disabled","edit"===o.action||null),e.xp6(1),e.Q6J("ngForOf",o.zonegroupList),e.xp6(6),e.Q6J("ngIf",o.multisiteZoneForm.showError("zoneName",c,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteZoneForm.showError("zoneName",c,"uniqueName")),e.xp6(2),e.uIk("disabled","edit"===o.action||null),e.xp6(3),e.Q6J("ngIf",o.disableDefault&&"create"===o.action),e.xp6(1),e.Q6J("ngIf",o.isDefaultZone),e.xp6(1),e.Q6J("ngIf","edit"===o.action&&!o.isDefaultZone),e.xp6(3),e.uIk("disabled","edit"===o.action||null),e.xp6(3),e.Q6J("ngIf",o.disableMaster),e.xp6(1),e.Q6J("ngIf",o.isMasterZone),e.xp6(1),e.Q6J("ngIf","edit"===o.action&&!o.isMasterZone),e.xp6(6),e.Q6J("ngIf",o.multisiteZoneForm.showError("zone_endpoints",c,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteZoneForm.showError("zone_endpoints",c,"endpoint")),e.xp6(27),e.Q6J("ngIf","edit"===o.action),e.xp6(2),e.Q6J("form",o.multisiteZoneForm)("submitText",e.lcZ(73,25,o.action)+" "+e.lcZ(74,27,o.resource))}},dependencies:[g.sg,g.O5,fe.S,Ie.z,we.p,lt.C,Oe.o,Ae.b,We.P,C.V,r._Y,r.YN,r.Kr,r.Fj,r.Wl,r.EJ,r.JJ,r.JL,r.sg,r.u,g.rS,Ye.m]}),n})();var Ca=d(36569);function Fa(n,i){if(1&n&&(e.TgZ(0,"option",33),e._uU(1),e.qZA()),2&n){const t=i.$implicit,o=e.oxw();e.Q6J("value",t.name)("selected",t.name===o.multisiteZonegroupForm.getValue("selectedRealm")),e.xp6(1),e.hij(" ",t.name," ")}}function Oa(n,i){1&n&&(e.TgZ(0,"span",34),e.SDv(1,35),e.qZA())}function Na(n,i){1&n&&(e.TgZ(0,"span",34),e.SDv(1,36),e.qZA())}function Pa(n,i){1&n&&(e.TgZ(0,"span")(1,"cd-helper"),e.SDv(2,37),e.qZA()())}function Aa(n,i){if(1&n&&(e.TgZ(0,"cd-helper")(1,"span"),e.tHW(2,38),e._UZ(3,"a",39),e.N_p(),e.qZA()()),2&n){const t=e.oxw();e.xp6(3),e.s9C("href",t.docUrl,e.LSH)}}function ba(n,i){1&n&&(e.TgZ(0,"cd-helper")(1,"span"),e.SDv(2,40),e.qZA()())}function Ia(n,i){1&n&&(e.TgZ(0,"span")(1,"cd-helper"),e.SDv(2,41),e.qZA()())}function Ga(n,i){if(1&n&&(e.TgZ(0,"cd-helper")(1,"span"),e.tHW(2,42),e._UZ(3,"a",39),e.N_p(),e.qZA()()),2&n){const t=e.oxw();e.xp6(3),e.s9C("href",t.docUrl,e.LSH)}}function ya(n,i){1&n&&(e.TgZ(0,"cd-helper")(1,"span"),e.SDv(2,43),e.qZA()())}function La(n,i){1&n&&(e.TgZ(0,"span",34),e.SDv(1,44),e.qZA())}function Da(n,i){1&n&&(e.TgZ(0,"span",34),e.SDv(1,45),e.qZA())}function va(n,i){1&n&&(e.TgZ(0,"span",34),e.SDv(1,49),e.qZA())}function wa(n,i){if(1&n&&(e.TgZ(0,"div",7)(1,"label",46),e.SDv(2,47),e.qZA(),e.TgZ(3,"div",10),e._UZ(4,"cd-select-badges",48)(5,"br"),e.YNc(6,va,2,0,"span",18),e.qZA()()),2&n){const t=e.oxw();e.xp6(4),e.Q6J("data",t.zonegroupZoneNames)("options",t.labelsOption)("customBadges",!0),e.xp6(2),e.Q6J("ngIf",t.isRemoveMasterZone)}}function Wa(n,i){1&n&&(e.TgZ(0,"span"),e.SDv(1,68),e.qZA())}function Ua(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"div",55)(2,"div",56),e._uU(3),e.ALo(4,"ordinal"),e.TgZ(5,"span",57),e.NdJ("click",function(){const O=e.CHM(t).index,H=e.oxw(2);return e.KtG(H.removePlacementTarget(O))}),e._uU(6,"\xd7"),e.qZA()(),e.TgZ(7,"div",58)(8,"div",7)(9,"label",59),e.SDv(10,60),e.qZA(),e.TgZ(11,"div",10),e._UZ(12,"input",61),e.TgZ(13,"span",34),e.YNc(14,Wa,2,0,"span",23),e.qZA()()(),e.TgZ(15,"div",7)(16,"label",62),e.SDv(17,63),e.qZA(),e.TgZ(18,"div",10),e._UZ(19,"input",64),e.qZA()(),e.TgZ(20,"div",7)(21,"label",65),e.SDv(22,66),e.qZA(),e.TgZ(23,"div",10),e._UZ(24,"input",67),e.qZA()()()()()}if(2&n){const t=i.$implicit,o=i.index,c=e.oxw(2),O=e.MAs(6);e.xp6(1),e.Q6J("formGroup",t),e.xp6(2),e.hij(" ",e.lcZ(4,3,o+1)," "),e.xp6(11),e.Q6J("ngIf",c.showError(o,"placement_id",O,"required"))}}const $a=function(n){return[n]};function xa(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"legend"),e._uU(2,"Placement targets"),e.qZA(),e.ynx(3,50),e.YNc(4,Ua,25,5,"div",51),e.BQk(),e.TgZ(5,"button",52),e.NdJ("click",function(){e.CHM(t);const c=e.oxw();return e.KtG(c.addPlacementTarget())}),e._UZ(6,"i",53),e.ynx(7),e.SDv(8,54),e.BQk(),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(4),e.Q6J("ngForOf",t.placementTargets.controls)("ngForTrackBy",t.trackByFn),e.xp6(2),e.Q6J("ngClass",e.VKq(3,$a,t.icons.add))}}let Za=(()=>{class n{constructor(t,o,c,O,H){this.activeModal=t,this.actionLabels=o,this.rgwZonegroupService=c,this.notificationService=O,this.formBuilder=H,this.endpoints=/^((https?:\/\/)|(www.))(?:([a-zA-Z]+)|(\d+\.\d+.\d+.\d+)):\d{2,4}$/,this.ipv4Rgx=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i,this.ipv6Rgx=/^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}$/i,this.icons=$.P,this.editing=!1,this.defaultsInfo=[],this.multisiteInfo=[],this.realmList=[],this.zonegroupList=[],this.isMaster=!1,this.labelsOption=[],this.zoneList=[],this.isRemoveMasterZone=!1,this.disableDefault=!1,this.disableMaster=!1,this.action=this.editing?this.actionLabels.EDIT+this.resource:this.actionLabels.CREATE+this.resource,this.createForm()}createForm(){this.multisiteZonegroupForm=new Xe.d({default_zonegroup:new r.p4(!1),zonegroupName:new r.p4(null,{validators:[r.kI.required,z.h.custom("uniqueName",t=>"create"===this.action&&this.zonegroupNames&&-1!==this.zonegroupNames.indexOf(t))]}),master_zonegroup:new r.p4(!1),selectedRealm:new r.p4(null),zonegroup_endpoints:new r.p4(null,[z.h.custom("endpoint",t=>!(v().isEmpty(t)||(t.includes(",")?(t.split(",").forEach(o=>!this.endpoints.test(o)&&!this.ipv4Rgx.test(o)&&!this.ipv6Rgx.test(o)),1):this.endpoints.test(t)||this.ipv4Rgx.test(t)||this.ipv6Rgx.test(t)))),r.kI.required]),placementTargets:this.formBuilder.array([])})}ngOnInit(){v().forEach(this.multisiteZonegroupForm.get("placementTargets"),O=>{this.addPlacementTarget().patchValue(O)}),this.placementTargets=this.multisiteZonegroupForm.get("placementTargets"),this.realmList=void 0!==this.multisiteInfo[0]&&this.multisiteInfo[0].hasOwnProperty("realms")?this.multisiteInfo[0].realms:[],this.zonegroupList=void 0!==this.multisiteInfo[1]&&this.multisiteInfo[1].hasOwnProperty("zonegroups")?this.multisiteInfo[1].zonegroups:[],this.zonegroupList.forEach(O=>{!0===O.is_master&&!v().isEmpty(O.realm_id)&&(this.isMaster=!0,this.disableMaster=!0)}),this.isMaster||(this.multisiteZonegroupForm.get("master_zonegroup").setValue(!0),this.multisiteZonegroupForm.get("master_zonegroup").disable()),this.zoneList=void 0!==this.multisiteInfo[2]&&this.multisiteInfo[2].hasOwnProperty("zones")?this.multisiteInfo[2].zones:[],this.zonegroupNames=this.zonegroupList.map(O=>O.name);const c=this.zonegroupList.map(O=>O.zones).reduce((O,H)=>O.concat(H),[]).map(O=>O.name);if(this.allZoneNames=this.zoneList.map(O=>O.name),this.allZoneNames=v().difference(this.allZoneNames,c),"create"===this.action&&null!==this.defaultsInfo.defaultRealmName&&(this.multisiteZonegroupForm.get("selectedRealm").setValue(this.defaultsInfo.defaultRealmName),this.disableMaster&&this.multisiteZonegroupForm.get("master_zonegroup").disable()),"edit"===this.action){this.multisiteZonegroupForm.get("zonegroupName").setValue(this.info.data.name),this.multisiteZonegroupForm.get("selectedRealm").setValue(this.info.data.parent),this.multisiteZonegroupForm.get("default_zonegroup").setValue(this.info.data.is_default),this.multisiteZonegroupForm.get("master_zonegroup").setValue(this.info.data.is_master),this.multisiteZonegroupForm.get("zonegroup_endpoints").setValue(this.info.data.endpoints),this.info.data.is_default&&this.multisiteZonegroupForm.get("default_zonegroup").disable(),!this.info.data.is_default&&this.multisiteZonegroupForm.getValue("selectedRealm")!==this.defaultsInfo.defaultRealmName&&(this.multisiteZonegroupForm.get("default_zonegroup").disable(),this.disableDefault=!0),(this.info.data.is_master||this.disableMaster)&&this.multisiteZonegroupForm.get("master_zonegroup").disable(),this.zonegroupZoneNames=this.info.data.zones.map(H=>H.name),this.zgZoneNames=this.info.data.zones.map(H=>H.name),this.zgZoneIds=this.info.data.zones.map(H=>H.id);const O=new Set(this.allZoneNames);this.labelsOption=Array.from(O).map(H=>({enabled:!0,name:H,selected:!1,description:null})),this.info.data.placement_targets.forEach(H=>{const Q=this.addPlacementTarget();let J={placement_id:H.name,tags:H.tags.join(","),storage_class:"string"==typeof H.storage_classes?H.storage_classes:H.storage_classes.join(",")};Q.patchValue(J)})}}submit(){const t=this.multisiteZonegroupForm.getRawValue();if("create"===this.action)this.realm=new ke.L6,this.realm.name=t.selectedRealm,this.zonegroup=new ke.iG,this.zonegroup.name=t.zonegroupName,this.zonegroup.endpoints=t.zonegroup_endpoints,this.rgwZonegroupService.create(this.realm,this.zonegroup,t.default_zonegroup,t.master_zonegroup).subscribe(()=>{this.notificationService.show(M.k.success,"Zonegroup: '" + t.zonegroupName + "' created successfully"),this.activeModal.close()},()=>{this.multisiteZonegroupForm.setErrors({cdSubmitButton:!0})});else if("edit"===this.action){this.removedZones=v().difference(this.zgZoneNames,this.zonegroupZoneNames);const o=this.info.data.zones.filter(c=>c.id===this.info.data.master_zone);if(this.isRemoveMasterZone=this.removedZones.includes(o[0].name),this.isRemoveMasterZone)return void this.multisiteZonegroupForm.setErrors({cdSubmitButton:!0});this.addedZones=v().difference(this.zonegroupZoneNames,this.zgZoneNames),this.realm=new ke.L6,this.realm.name=t.selectedRealm,this.zonegroup=new ke.iG,this.zonegroup.name=this.info.data.name,this.newZonegroupName=t.zonegroupName,this.zonegroup.endpoints=t.zonegroup_endpoints.toString(),this.zonegroup.placement_targets=t.placementTargets,this.rgwZonegroupService.update(this.realm,this.zonegroup,this.newZonegroupName,t.default_zonegroup,t.master_zonegroup,this.removedZones,this.addedZones).subscribe(()=>{this.notificationService.show(M.k.success,"Zonegroup: '" + t.zonegroupName + "' updated successfully"),this.activeModal.close()},()=>{this.multisiteZonegroupForm.setErrors({cdSubmitButton:!0})})}}addPlacementTarget(){this.placementTargets=this.multisiteZonegroupForm.get("placementTargets");const t=new Xe.d({placement_id:new r.p4("",{validators:[r.kI.required]}),tags:new r.p4(""),storage_class:new r.p4([])});return this.placementTargets.push(t),t}trackByFn(t){return t}removePlacementTarget(t){this.placementTargets=this.multisiteZonegroupForm.get("placementTargets"),this.placementTargets.removeAt(t)}showError(t,o,c,O){return this.multisiteZonegroupForm.controls.placementTargets.controls[t].showError(o,c,O)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(x.Kz),e.Y36(l.p4),e.Y36(_t.K),e.Y36(V.g),e.Y36(r.QS))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-multisite-zonegroup-form"]],decls:49,vars:24,consts:function(){let i,t,o,c,O,H,Q,J,j,oe,Te,Me,Fe,Pe,me,Ge,ye,Le,Ee,Ue,$e,xe,De,ve;return i="" + "\ufffd0\ufffd" + " Zone Group",t="Select Realm",o="-- Select a realm --",c="Zone Group Name",O="Default",H="Master",Q="Endpoints",J="This field is required.",j="The chosen zone group name is already in use.",oe="Zone group doesn't belong to the default realm.",Te="Please consult the " + "\ufffd#3\ufffd" + "documentation" + "\ufffd/#3\ufffd" + " to follow the failover mechanism",Me="You cannot unset the default flag.",Fe="Multiple master zone groups can't be configured. If you want to create a new zone group and make it the master zone group, you must delete the default zone group.",Pe="Please consult the " + "\ufffd#3\ufffd" + "documentation" + "\ufffd/#3\ufffd" + " to follow the failover mechanism",me="You cannot unset the master flag.",Ge="This field is required.",ye="Please enter a valid IP address.",Le="Zones",Ee="Cannot remove master zone.",Ue="Add placement target",$e="Placement Id",xe="Balises",De="Storage Class",ve="This field is required.",[[3,"modalRef"],[1,"modal-title"],i,[1,"modal-content"],["name","multisiteZonegroupForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","selectedRealm",1,"cd-col-form-label"],t,[1,"cd-col-form-input"],["id","selectedRealm","formControlName","selectedRealm","name","selectedRealm",1,"form-select"],["ngValue",""],o,[3,"value","selected",4,"ngFor","ngForOf"],["for","zonegroupName",1,"cd-col-form-label","required"],c,["type","text","placeholder","Zone group name...","id","zonegroupName","name","zonegroupName","formControlName","zonegroupName",1,"form-control"],["class","invalid-feedback",4,"ngIf"],[1,"custom-control","custom-checkbox"],["id","default_zonegroup","name","default_zonegroup","formControlName","default_zonegroup","type","checkbox",1,"form-check-input"],["for","default_zonegroup",1,"form-check-label"],O,[4,"ngIf"],["id","master_zonegroup","name","master_zonegroup","formControlName","master_zonegroup","type","checkbox",1,"form-check-input"],["for","master_zonegroup",1,"form-check-label"],H,["for","zonegroup_endpoints",1,"cd-col-form-label","required"],Q,["type","text","placeholder","e.g, http://ceph-node-00.com:80","id","zonegroup_endpoints","name","zonegroup_endpoints","formControlName","zonegroup_endpoints",1,"form-control"],["class","form-group row",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[3,"value","selected"],[1,"invalid-feedback"],J,j,oe,Te,[3,"href"],Me,Fe,Pe,me,Ge,ye,["for","zones",1,"cd-col-form-label"],Le,["id","zones",3,"data","options","customBadges"],Ee,["formArrayName","placementTargets"],[4,"ngFor","ngForOf","ngForTrackBy"],["type","button","id","add-plc",1,"btn","btn-light","float-end","my-3",3,"click"],[3,"ngClass"],Ue,[1,"card",3,"formGroup"],[1,"card-header"],["name","remove_placement_target","ngbTooltip","Remove",1,"float-end","clickable",3,"click"],[1,"card-body"],["for","placement_id",1,"cd-col-form-label","required"],$e,["type","text","name","placement_id","id","placement_id","formControlName","placement_id","placeholder","eg. default-placement",1,"form-control"],["for","tags",1,"cd-col-form-label"],xe,["type","text","name","tags","id","tags","formControlName","tags","placeholder","comma separated tags, eg. default-placement, ssd",1,"form-control"],["for","storage_class",1,"cd-col-form-label"],De,["type","text","name","storage_class","id","storage_class","formControlName","storage_class","placeholder","eg. Standard-tier",1,"form-control"],ve]},template:function(t,o){if(1&t&&(e.TgZ(0,"cd-modal",0),e.ynx(1,1),e.SDv(2,2),e.ALo(3,"titlecase"),e.BQk(),e.ynx(4,3),e.TgZ(5,"form",4,5)(7,"div",6)(8,"div",7)(9,"label",8),e.SDv(10,9),e.qZA(),e.TgZ(11,"div",10)(12,"select",11)(13,"option",12),e.SDv(14,13),e.qZA(),e.YNc(15,Fa,2,3,"option",14),e.qZA()()(),e.TgZ(16,"div",7)(17,"label",15),e.SDv(18,16),e.qZA(),e.TgZ(19,"div",10),e._UZ(20,"input",17),e.YNc(21,Oa,2,0,"span",18),e.YNc(22,Na,2,0,"span",18),e.TgZ(23,"div",19),e._UZ(24,"input",20),e.TgZ(25,"label",21),e.SDv(26,22),e.qZA(),e.YNc(27,Pa,3,0,"span",23),e.YNc(28,Aa,4,1,"cd-helper",23),e.YNc(29,ba,3,0,"cd-helper",23),e._UZ(30,"br")(31,"input",24),e.TgZ(32,"label",25),e.SDv(33,26),e.qZA(),e.YNc(34,Ia,3,0,"span",23),e.YNc(35,Ga,4,1,"cd-helper",23),e.YNc(36,ya,3,0,"cd-helper",23),e.qZA()()(),e.TgZ(37,"div",7)(38,"label",27),e.SDv(39,28),e.qZA(),e.TgZ(40,"div",10),e._UZ(41,"input",29),e.YNc(42,La,2,0,"span",18),e.YNc(43,Da,2,0,"span",18),e.qZA()(),e.YNc(44,wa,7,4,"div",30),e.YNc(45,xa,9,5,"div",23),e.qZA(),e.TgZ(46,"div",31)(47,"cd-form-button-panel",32),e.NdJ("submitActionEvent",function(){return o.submit()}),e.ALo(48,"titlecase"),e.qZA()()(),e.BQk(),e.qZA()),2&t){const c=e.MAs(6);e.Q6J("modalRef",o.activeModal),e.xp6(3),e.pQV(e.lcZ(3,20,o.action)),e.QtT(2),e.xp6(2),e.Q6J("formGroup",o.multisiteZonegroupForm),e.xp6(10),e.Q6J("ngForOf",o.realmList),e.xp6(6),e.Q6J("ngIf",o.multisiteZonegroupForm.showError("zonegroupName",c,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteZonegroupForm.showError("zonegroupName",c,"uniqueName")),e.xp6(2),e.uIk("disabled","edit"===o.action||null),e.xp6(3),e.Q6J("ngIf",o.disableDefault&&"create"===o.action),e.xp6(1),e.Q6J("ngIf","edit"===o.action&&!o.info.data.is_default),e.xp6(1),e.Q6J("ngIf","edit"===o.action&&o.info.data.is_default),e.xp6(2),e.uIk("disabled","edit"===o.action||null),e.xp6(3),e.Q6J("ngIf",o.disableMaster&&"create"===o.action),e.xp6(1),e.Q6J("ngIf","edit"===o.action&&!o.info.data.is_master),e.xp6(1),e.Q6J("ngIf","edit"===o.action&&o.info.data.is_master),e.xp6(6),e.Q6J("ngIf",o.multisiteZonegroupForm.showError("zonegroup_endpoints",c,"required")),e.xp6(1),e.Q6J("ngIf",o.multisiteZonegroupForm.showError("zonegroup_endpoints",c,"endpoint")),e.xp6(1),e.Q6J("ngIf","edit"===o.action),e.xp6(1),e.Q6J("ngIf","edit"===o.action),e.xp6(2),e.Q6J("form",o.multisiteZonegroupForm)("submitText",e.lcZ(48,22,o.action)+" Zone Group")}},dependencies:[g.mk,g.sg,g.O5,fe.S,Gn.m,Ie.z,we.p,Oe.o,Ae.b,We.P,C.V,r._Y,r.YN,r.Kr,r.Fj,r.Wl,r.EJ,r.JJ,r.JL,r.sg,r.u,r.CE,x._L,g.rS,Ca.f]}),n})();var ka=d(61717),Ba=d(36848),za=d(7273);const qa=["tree"];function Ha(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"cd-alert-panel",17),e.tHW(1,18),e.TgZ(2,"button",19),e.NdJ("click",function(){e.CHM(t);const c=e.oxw();return e.KtG(c.enableRgwModule())}),e.qZA(),e.N_p(),e.qZA()}}function Xa(n,i){1&n&&(e.TgZ(0,"cd-alert-panel",20),e.tHW(1,21),e._UZ(2,"a",22),e.N_p(),e.qZA())}function Ka(n,i){if(1&n&&(e.TgZ(0,"span"),e._UZ(1,"cd-table-actions",23),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("permission",t.permission)("btnColor","light")("selection",t.selection)("tableActions",t.migrateTableAction)}}const Qa=function(n,i,t){return[n,i,t]};function Ya(n,i){if(1&n&&e._UZ(0,"i",24),2&n){const t=e.oxw();e.Q6J("ngClass",e.kEZ(1,Qa,t.icons.large,t.icons.spinner,t.icons.spin))}}function Ja(n,i){if(1&n&&(e.TgZ(0,"span"),e._UZ(1,"i",30),e.qZA()),2&n){const t=e.oxw(2).$implicit,o=e.oxw();e.xp6(1),e.Q6J("title",t.data.warning_message)("ngClass",o.icons.danger)}}function Va(n,i){if(1&n&&(e.TgZ(0,"span",29),e.YNc(1,Ja,2,2,"span",5),e._UZ(2,"i",24),e._uU(3),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",t.data.show_warning),e.xp6(1),e.Q6J("ngClass",t.data.icon),e.xp6(1),e.hij(" ",t.data.name," ")}}function ja(n,i){1&n&&(e.TgZ(0,"span",31),e._uU(1," default "),e.qZA())}function el(n,i){1&n&&(e.TgZ(0,"span",32),e._uU(1," master "),e.qZA())}function tl(n,i){1&n&&(e.TgZ(0,"span",32),e._uU(1," secondary-zone "),e.qZA())}const yn=function(n){return[n]};function nl(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",33)(1,"div",34)(2,"button",35),e.NdJ("click",function(){e.CHM(t);const c=e.oxw().$implicit,O=e.oxw();return e.KtG(O.openModal(c,!0))}),e._UZ(3,"i",24),e.qZA()(),e.TgZ(4,"div",34)(5,"button",36),e.NdJ("click",function(){e.CHM(t);const c=e.oxw().$implicit,O=e.oxw();return e.KtG(O.delete(c))}),e._UZ(6,"i",24),e.qZA()()()}if(2&n){const t=e.oxw().$implicit,o=e.oxw();e.xp6(1),e.Q6J("title",o.editTitle),e.xp6(1),e.Q6J("disabled",o.getDisable()||t.data.secondary_zone),e.xp6(1),e.Q6J("ngClass",e.VKq(6,yn,o.icons.edit)),e.xp6(1),e.Q6J("title",o.deleteTitle),e.xp6(1),e.Q6J("disabled",o.isDeleteDisabled(t)||t.data.secondary_zone),e.xp6(1),e.Q6J("ngClass",e.VKq(8,yn,o.icons.destroy))}}function ol(n,i){if(1&n&&(e.YNc(0,Va,4,3,"span",25),e.YNc(1,ja,2,0,"span",26),e.YNc(2,el,2,0,"span",27),e.YNc(3,tl,2,0,"span",27),e.YNc(4,nl,7,10,"div",28)),2&n){const t=i.$implicit;e.Q6J("ngIf",t.data.name),e.xp6(1),e.Q6J("ngIf",t.data.is_default),e.xp6(1),e.Q6J("ngIf",t.data.is_master),e.xp6(1),e.Q6J("ngIf",t.data.secondary_zone),e.xp6(1),e.Q6J("ngIf",t.isFocused)}}function il(n,i){if(1&n&&(e.TgZ(0,"div",37)(1,"legend"),e._uU(2),e.qZA(),e.TgZ(3,"div"),e._UZ(4,"cd-table-key-value",38),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.metadataTitle),e.xp6(2),e.Q6J("data",t.metadata)}}class rt{constructor(i,t,o,c,O,H,Q,J,j,oe,Te,Me){this.modalService=i,this.timerService=t,this.authStorageService=o,this.actionLabels=c,this.timerServiceVariable=O,this.router=H,this.rgwRealmService=Q,this.rgwZonegroupService=J,this.rgwZoneService=j,this.rgwDaemonService=oe,this.mgrModuleService=Te,this.notificationService=Me,this.sub=new An.w,this.messages={noDefaultRealm:"Please create a default realm first to enable this feature",noMasterZone:"Please create a master zone for each zone group to enable this feature",noRealmExists:"No realm exists",disableExport:"Please create master zone group and master zone for each of the realms"},this.icons=$.P,this.selection=new Vt.r,this.loadingIndicator=!0,this.nodes=[],this.treeOptions={useVirtualScroll:!0,nodeHeight:22,levelPadding:20,actionMapping:{mouse:{click:this.onNodeSelected.bind(this)}}},this.realms=[],this.zonegroups=[],this.zones=[],this.realmIds=[],this.zoneIds=[],this.defaultRealmId="",this.defaultZonegroupId="",this.defaultZoneId="",this.multisiteInfo=[],this.defaultsInfo=[],this.showMigrateAction=!1,this.editTitle="Edit",this.deleteTitle="Delete",this.disableExport=!0,this.restartGatewayMessage=!1,this.rgwModuleData=[],this.permission=this.authStorageService.getPermissions().rgw}openModal(i,t=!1){const o=t?i.data.type:i;this.bsModalRef=this.modalService.show("realm"===o?ta:"zonegroup"===o?Za:Sa,{resource:o,action:t?"edit":"create",info:i,defaultsInfo:this.defaultsInfo,multisiteInfo:this.multisiteInfo},{size:"lg"})}openMigrateModal(){this.bsModalRef=this.modalService.show(os,{multisiteInfo:this.multisiteInfo},{size:"lg"})}openImportModal(){this.bsModalRef=this.modalService.show(Ks,{multisiteInfo:this.multisiteInfo},{size:"lg"})}openExportModal(){this.bsModalRef=this.modalService.show(Fs,{defaultsInfo:this.defaultsInfo,multisiteInfo:this.multisiteInfo},{size:"lg"})}getDisableExport(){return this.realms.forEach(i=>{this.zonegroups.forEach(t=>{i.id===t.realm_id&&t.is_master&&""!==t.master_zone&&(this.disableExport=!1)})}),!this.rgwModuleStatus||(this.realms.length<1?this.messages.noRealmExists:!!this.disableExport&&this.messages.disableExport)}getDisableImport(){return!this.rgwModuleStatus}ngOnInit(){const c={permission:"read",icon:$.P.exchange,name:this.actionLabels.MIGRATE,click:()=>this.openMigrateModal()},O={permission:"read",icon:$.P.download,name:this.actionLabels.IMPORT,click:()=>this.openImportModal(),disable:()=>this.getDisableImport()},H={permission:"read",icon:$.P.upload,name:this.actionLabels.EXPORT,click:()=>this.openExportModal(),disable:()=>this.getDisableExport()};this.createTableActions=[{permission:"create",icon:$.P.add,name:this.actionLabels.CREATE+" Realm",click:()=>this.openModal("realm")},{permission:"create",icon:$.P.add,name:this.actionLabels.CREATE+" Zone Group",click:()=>this.openModal("zonegroup"),disable:()=>this.getDisable()},{permission:"create",icon:$.P.add,name:this.actionLabels.CREATE+" Zone",click:()=>this.openModal("zone")}],this.migrateTableAction=[c],this.importAction=[O],this.exportAction=[H];const Q=[this.rgwRealmService.getAllRealmsInfo(),this.rgwZonegroupService.getAllZonegroupsInfo(),this.rgwZoneService.getAllZonesInfo()];this.sub=this.timerService.get(()=>(0,k.D)(Q),2*this.timerServiceVariable.TIMER_SERVICE_PERIOD).subscribe(J=>{this.multisiteInfo=J,this.loadingIndicator=!1,this.nodes=this.abstractTreeData(J)},J=>{}),this.mgrModuleService.list().subscribe(J=>{this.rgwModuleData=J.filter(j=>"rgw"===j.name),this.rgwModuleData.length>0&&(this.rgwModuleStatus=this.rgwModuleData[0].enabled)})}ngOnDestroy(){this.sub.unsubscribe()}abstractTreeData(i){let t=[],o={},c={},O=[],H={},Q=[];if(this.realms=i[0].realms,this.zonegroups=i[1].zonegroups,this.zones=i[2].zones,this.defaultRealmId=i[0].default_realm,this.defaultZonegroupId=i[1].default_zonegroup,this.defaultZoneId=i[2].default_zone,this.defaultsInfo=this.getDefaultsEntities(this.defaultRealmId,this.defaultZonegroupId,this.defaultZoneId),this.realms.length>0)for(const J of this.realms){const j=this.rgwRealmService.getRealmTree(J,this.defaultRealmId);o=j.nodes,this.realmIds=this.realmIds.concat(j.realmIds);for(const oe of this.zonegroups)if(oe.realm_id===J.id){c=this.rgwZonegroupService.getZonegroupTree(oe,this.defaultZonegroupId,J);for(const Te of oe.zones){const Me=this.rgwZoneService.getZoneTree(Te,this.defaultZoneId,this.zones,oe,J);H=Me.nodes,this.zoneIds=this.zoneIds.concat(Me.zoneIds),Q.push(H),H={}}c.children=Q,Q=[],O.push(c),c={}}o.children=O,t.push(o),c={},H={},o={},O=[],Q=[]}if(this.zonegroups.length>0)for(const J of this.zonegroups)if(!this.realmIds.includes(J.realm_id)){o=this.rgwZonegroupService.getZonegroupTree(J,this.defaultZonegroupId);for(const j of J.zones){const oe=this.rgwZoneService.getZoneTree(j,this.defaultZoneId,this.zones,J);c=oe.nodes,this.zoneIds=this.zoneIds.concat(oe.zoneIds),O.push(c),c={}}o.children=O,t.push(o),c={},o={},O=[]}if(this.zones.length>0)for(const J of this.zones)this.zoneIds.length>0&&!this.zoneIds.includes(J.id)&&(o=this.rgwZoneService.getZoneTree(J,this.defaultZoneId,this.zones).nodes,t.push(o),o={});return this.realms.length<1&&this.zonegroups.length<1&&this.zones.length<1?[{name:"No nodes!"}]:(this.realmIds=[],this.zoneIds=[],this.getDisableMigrate(),this.rgwDaemonService.list().subscribe(J=>{const j=J.map(oe=>oe.realm_name);""!=this.defaultRealmId&&""!=this.defaultZonegroupId&&""!=this.defaultZoneId&&j.includes("")&&(this.restartGatewayMessage=!0)}),t)}getDefaultsEntities(i,t,o){const c=this.realms.find(oe=>oe.id===i),O=this.zonegroups.find(oe=>oe.id===t),H=this.zones.find(oe=>oe.id===o);return{defaultRealmName:void 0!==c?c.name:null,defaultZonegroupName:void 0!==O?O.name:null,defaultZoneName:void 0!==H?H.name:null}}onNodeSelected(i,t){sn.iM.ACTIVATE(i,t,!0),this.metadataTitle=t.data.name,this.metadata=t.data.info,t.data.show=!0}onUpdateData(){this.tree.treeModel.expandAll()}getDisable(){let i=!0;return""===this.defaultRealmId?this.messages.noDefaultRealm:(this.zonegroups.forEach(t=>{v().isEmpty(t.master_zone)&&(i=!1)}),i?(this.editTitle="Edit",!1):(this.editTitle="Please create a master zone for each existing zonegroup to enable this feature",this.messages.noMasterZone))}getDisableMigrate(){return this.showMigrateAction=0===this.realms.length&&1===this.zonegroups.length&&"default"===this.zonegroups[0].name&&1===this.zones.length&&"default"===this.zones[0].name,this.showMigrateAction}isDeleteDisabled(i){let t=!1,o=0;if("realm"===i.data.type&&i.data.is_default&&this.realms.length<2&&(t=!0),"zonegroup"===i.data.type)if(this.zonegroups.length<2)this.deleteTitle="You can not delete the only zonegroup available",t=!0;else if(i.data.is_default)this.deleteTitle="You can not delete the default zonegroup",t=!0;else if(i.data.is_master){for(let c of this.zonegroups)if(!0===c.is_master&&(o++,o>1))break;o<2&&(this.deleteTitle="You can not delete the only master zonegroup available",t=!0)}return"zone"===i.data.type&&(this.zones.length<2?(this.deleteTitle="You can not delete the only zone available",t=!0):i.data.is_default?(this.deleteTitle="You can not delete the default zone",t=!0):i.data.is_master&&i.data.zone_zonegroup.zones.length<2&&(this.deleteTitle="You can not delete the master zone as there are no more zones in this zonegroup",t=!0)),t||(this.deleteTitle="Delete"),t}delete(i){"realm"===i.data.type?this.modalRef=this.modalService.show(tn.M,{itemDescription:"" + i.data.type + " " + i.data.name + "",itemNames:[`${i.data.name}`],submitAction:()=>{this.rgwRealmService.delete(i.data.name).subscribe(()=>{this.modalRef.close(),this.notificationService.show(M.k.success,"Realm: '" + i.data.name + "' deleted successfully")},()=>{this.modalRef.componentInstance.stopLoadingSpinner()})}}):"zonegroup"===i.data.type?this.modalRef=this.modalService.show(Ts,{zonegroup:i.data}):"zone"===i.data.type&&(this.modalRef=this.modalService.show(ss,{zone:i.data}))}enableRgwModule(){let i;const t=()=>{(0,Hr.H)(2e3).subscribe(()=>{this.mgrModuleService.list().subscribe(()=>{this.notificationService.suspendToasties(!1),this.blockUI.stop(),this.notificationService.show(M.k.success,"Enabled RGW Module"),this.router.navigateByUrl("/",{skipLocationChange:!0}).then(()=>{this.router.navigate(["/rgw/multisite"])})},()=>{t()})})};this.rgwModuleStatus||(i=this.mgrModuleService.enable("rgw")),i.subscribe(()=>{},()=>{this.notificationService.suspendToasties(!0),this.blockUI.start("Reconnecting, please wait ..."),t()})}}rt.\u0275fac=function(i){return new(i||rt)(e.Y36(Qe.Z),e.Y36(Ba.f),e.Y36(nt.j),e.Y36(l.p4),e.Y36(l.eu),e.Y36(A.F0),e.Y36(ot.y),e.Y36(_t.K),e.Y36(it.g),e.Y36(u.b),e.Y36(za.N),e.Y36(V.g))},rt.\u0275cmp=e.Xpm({type:rt,selectors:[["cd-rgw-multisite-details"]],viewQuery:function(i,t){if(1&i&&e.Gf(qa,5),2&i){let o;e.iGM(o=e.CRH())&&(t.tree=o.first)}},decls:21,vars:18,consts:function(){let n,i,t;return n="Topology Viewer",i="In order to access the import/export feature, the rgw module must be enabled " + "\ufffd#2\ufffd" + "Enable" + "\ufffd/#2\ufffd" + "",t="Please restart all Ceph Object Gateway instances in all zones to ensure consistent multisite configuration updates. " + "\ufffd#2\ufffd" + " Cluster->Services" + "\ufffd/#2\ufffd" + "",[[1,"row"],[1,"col-sm-12","col-lg-12"],["type","info","spacingClass","mb-3","class","d-flex align-items-center",4,"ngIf"],["type","warning","spacingClass","mb-3",4,"ngIf"],[1,"btn-group","mb-4","me-2",3,"permission","selection","tableActions"],[4,"ngIf"],[1,"btn-group","mb-4","me-2",3,"permission","btnColor","selection","tableActions"],[1,"card"],[1,"card-header"],n,[1,"card-body"],[1,"col-sm-6","col-lg-6","tree-container"],[3,"ngClass",4,"ngIf"],[3,"nodes","options","updateData"],["tree",""],["treeNodeTemplate",""],["class","col-sm-6 col-lg-6 metadata",4,"ngIf"],["type","info","spacingClass","mb-3",1,"d-flex","align-items-center"],i,["type","button",1,"btn","btn-light","mx-2",3,"click"],["type","warning","spacingClass","mb-3"],t,["routerLink","/services",1,"text-decoration-underline"],[1,"btn-group","mb-4","me-2","secondary",3,"permission","btnColor","selection","tableActions"],[3,"ngClass"],["class","me-3",4,"ngIf"],["class","badge badge-success me-2",4,"ngIf"],["class","badge badge-warning me-2",4,"ngIf"],["class","btn-group align-inline-btns","role","group",4,"ngIf"],[1,"me-3"],[1,"text-danger",3,"title","ngClass"],[1,"badge","badge-success","me-2"],[1,"badge","badge-warning","me-2"],["role","group",1,"btn-group","align-inline-btns"],[3,"title"],["type","button",1,"btn","btn-light","dropdown-toggle-split","ms-1",3,"disabled","click"],["type","button",1,"btn","btn-light","ms-1",3,"disabled","click"],[1,"col-sm-6","col-lg-6","metadata"],["cdTableDetail","",3,"data"]]},template:function(i,t){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div"),e.YNc(3,Ha,3,0,"cd-alert-panel",2),e.YNc(4,Xa,3,0,"cd-alert-panel",3),e._UZ(5,"cd-table-actions",4),e.YNc(6,Ka,2,4,"span",5),e._UZ(7,"cd-table-actions",6)(8,"cd-table-actions",6),e.qZA(),e.TgZ(9,"div",7)(10,"div",8),e.SDv(11,9),e.qZA(),e.TgZ(12,"div",10)(13,"div",0)(14,"div",11),e.YNc(15,Ya,1,5,"i",12),e.TgZ(16,"tree-root",13,14),e.NdJ("updateData",function(){return t.onUpdateData()}),e.YNc(18,ol,5,5,"ng-template",null,15,e.W1O),e.qZA()(),e.YNc(20,il,5,2,"div",16),e.qZA()()()()()),2&i&&(e.xp6(3),e.Q6J("ngIf",!t.rgwModuleStatus),e.xp6(1),e.Q6J("ngIf",t.restartGatewayMessage),e.xp6(1),e.Q6J("permission",t.permission)("selection",t.selection)("tableActions",t.createTableActions),e.xp6(1),e.Q6J("ngIf",t.showMigrateAction),e.xp6(1),e.Q6J("permission",t.permission)("btnColor","light")("selection",t.selection)("tableActions",t.importAction),e.xp6(1),e.Q6J("permission",t.permission)("btnColor","light")("selection",t.selection)("tableActions",t.exportAction),e.xp6(7),e.Q6J("ngIf",t.loadingIndicator),e.xp6(1),e.Q6J("nodes",t.nodes)("options",t.treeOptions),e.xp6(4),e.Q6J("ngIf",t.metadata))},dependencies:[g.mk,g.O5,Ve.G,Rn.b,on.K,Oe.o,A.rH,sn.qr],styles:[".tree-container[_ngcontent-%COMP%]{height:calc(100vh - 200px)}.align-inline-btns[_ngcontent-%COMP%]{margin-left:5em}.btn[_ngcontent-%COMP%]:disabled{pointer-events:none}"]}),(0,G.gn)([(0,ka.bH)(),(0,G.w6)("design:type",Object)],rt.prototype,"blockUI",void 0);var _l=d(40267),rl=d(7357),sl=d(11656),al=d(4167),ll=d(43190),cl=d(68307),ul=d(47349),dl=d(79241),fl=d(98677),pl=d(30490),gl=d(9219),Tl=d(17401),El=d(9024),Rl=d(54740);const ct=function(n,i){return[n,i]};let ml=(()=>{class n{constructor(){this.icons=$.P}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-sync-primary-zone"]],inputs:{realm:"realm",zonegroup:"zonegroup",zone:"zone"},decls:17,vars:23,consts:[[1,"pb-5"],[1,"pt-2",3,"ngClass"],[1,"badge","badge-info","mt-2"],[1,"mt-2",3,"ngClass"]],template:function(t,o){1&t&&(e.TgZ(0,"ul",0)(1,"li"),e._UZ(2,"i",1),e.qZA(),e.TgZ(3,"li",2),e._uU(4),e.qZA(),e.TgZ(5,"li"),e._UZ(6,"i",3),e.qZA(),e.TgZ(7,"li"),e._UZ(8,"i",3),e.qZA(),e.TgZ(9,"p",2),e._uU(10),e.qZA(),e.TgZ(11,"li"),e._UZ(12,"i",3),e.qZA(),e.TgZ(13,"li"),e._UZ(14,"i",3),e.qZA(),e.TgZ(15,"li",2),e._uU(16),e.qZA()()),2&t&&(e.xp6(2),e.Q6J("ngClass",e.WLB(8,ct,o.icons.large2x,o.icons.reweight)),e.xp6(2),e.Oqu(o.realm),e.xp6(2),e.Q6J("ngClass",e.WLB(11,ct,o.icons.large2x,o.icons.down)),e.xp6(2),e.Q6J("ngClass",e.WLB(14,ct,o.icons.large2x,o.icons.cubes)),e.xp6(2),e.Oqu(o.zonegroup),e.xp6(2),e.Q6J("ngClass",e.WLB(17,ct,o.icons.large2x,o.icons.down)),e.xp6(2),e.Q6J("ngClass",e.WLB(20,ct,o.icons.large2x,o.icons.deploy)),e.xp6(2),e.Oqu(o.zone))},dependencies:[g.mk],styles:["ul[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;list-style-type:none}.align-primary-zone[_ngcontent-%COMP%]{padding-left:4em}"]}),n})();var Ln=d(90068);function hl(n,i){1&n&&(e.TgZ(0,"span")(1,"ul",1)(2,"li")(3,"b"),e._uU(4,"Status:"),e.qZA()(),e.TgZ(5,"li"),e._uU(6,"No Sync"),e.qZA()()())}function Ml(n,i){if(1&n&&(e.TgZ(0,"span")(1,"b"),e._uU(2),e.ALo(3,"titlecase"),e.qZA(),e._uU(4),e.ALo(5,"titlecase"),e.qZA()),2&n){const t=e.oxw(2).$implicit;e.xp6(2),e.Oqu(e.lcZ(3,2,t.split(":")[0])),e.xp6(2),e.hij(":",e.lcZ(5,4,t.split(":")[1])," ")}}function Sl(n,i){if(1&n&&(e.TgZ(0,"span")(1,"b"),e._uU(2),e.ALo(3,"titlecase"),e.qZA()()),2&n){const t=e.oxw(2).$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t))}}function Cl(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,Ml,6,6,"span",0),e.YNc(2,Sl,4,3,"span",0),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",null==t?null:t.includes(":")),e.xp6(1),e.Q6J("ngIf",!(null!=t&&t.includes(":")))}}function Fl(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"titlecase"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.lcZ(2,1,t)," ")}}function Ol(n,i){if(1&n&&(e.TgZ(0,"li"),e.YNc(1,Cl,3,2,"span",0),e.YNc(2,Fl,3,3,"span",0),e.qZA()),2&n){const t=i.$implicit,o=e.oxw(3);e.xp6(1),e.Q6J("ngIf",!(null!=t&&t.includes(o.metadataSyncInfo.syncstatus)||null!=t&&t.includes("failed")||null!=t&&t.includes("error"))),e.xp6(1),e.Q6J("ngIf",(null==t?null:t.includes("failed"))||(null==t?null:t.includes("error")))}}function Nl(n,i){if(1&n&&(e.TgZ(0,"ul",8)(1,"li")(2,"h5")(3,"b"),e._uU(4,"Metadata Sync Status:"),e.qZA()()(),e.YNc(5,Ol,3,2,"li",9),e.qZA()),2&n){const t=e.oxw(2);e.xp6(5),e.Q6J("ngForOf",t.metadataSyncInfo.fullSyncStatus)}}function Pl(n,i){1&n&&(e.TgZ(0,"li",10),e._uU(1,"Up to Date"),e.qZA())}function Al(n,i){if(1&n&&(e.TgZ(0,"a",12),e.SDv(1,13),e.ALo(2,"titlecase"),e.qZA()),2&n){e.oxw(2);const t=e.MAs(2),o=e.oxw();e.Q6J("ngbPopover",t),e.xp6(2),e.pQV(e.lcZ(2,2,o.metadataSyncInfo.syncstatus)),e.QtT(1)}}function bl(n,i){if(1&n&&(e.TgZ(0,"a",12),e.SDv(1,14),e.qZA()),2&n){e.oxw(2);const t=e.MAs(2);e.Q6J("ngbPopover",t)}}function Il(n,i){if(1&n&&(e.YNc(0,Al,3,4,"a",11),e.YNc(1,bl,2,1,"a",11)),2&n){const t=e.oxw(2);e.Q6J("ngIf","Not Syncing From Zone"!==t.metadataSyncInfo.syncstatus),e.xp6(1),e.Q6J("ngIf","Not Syncing From Zone"===t.metadataSyncInfo.syncstatus)}}const Gl=function(n){return[n]};function yl(n,i){if(1&n&&(e.TgZ(0,"li"),e._UZ(1,"i",15),e.TgZ(2,"a",16),e.SDv(3,17),e.qZA()()),2&n){e.oxw();const t=e.MAs(2),o=e.oxw();e.xp6(1),e.Q6J("ngClass",e.VKq(2,Gl,o.icons.danger)),e.xp6(1),e.Q6J("ngbPopover",t)}}function Ll(n,i){if(1&n&&(e.TgZ(0,"li",18),e._uU(1),e.ALo(2,"relativeDate"),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(e.lcZ(2,1,t.metadataSyncInfo.timestamp))}}function Dl(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,Nl,6,1,"ng-template",null,2,e.W1O),e.TgZ(3,"ul",1),e.YNc(4,Pl,2,0,"ng-template",null,3,e.W1O),e.YNc(6,Il,2,2,"ng-template",null,4,e.W1O),e.TgZ(8,"li")(9,"b"),e._uU(10,"Status:"),e.qZA()(),e.YNc(11,yl,4,4,"li",5),e.TgZ(12,"li",6),e._uU(13," Last Synced: "),e.qZA(),e.YNc(14,Ll,3,3,"li",7),e.qZA()()),2&n){const t=e.MAs(5),o=e.MAs(7),c=e.oxw();e.xp6(11),e.Q6J("ngIf",(null==c.metadataSyncInfo.syncstatus?null:c.metadataSyncInfo.syncstatus.includes("failed"))||(null==c.metadataSyncInfo.syncstatus?null:c.metadataSyncInfo.syncstatus.includes("error")))("ngIfElse",o),e.xp6(3),e.Q6J("ngIf",c.metadataSyncInfo.timestamp)("ngIfElse",t)}}let vl=(()=>{class n{constructor(){this.icons=$.P,this.metadataSyncInfo={}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-sync-metadata-info"]],inputs:{metadataSyncInfo:"metadataSyncInfo"},decls:2,vars:2,consts:function(){let i,t,o;return i="" + "\ufffd0\ufffd" + "",t="Not Syncing",o="Error",[[4,"ngIf"],[1,"me-2"],["metadataSyncPopover",""],["upToDateTpl",""],["showMetadataStatus",""],[4,"ngIf","ngIfElse"],[1,"mt-4","fw-bold"],["class","badge badge-info",4,"ngIf","ngIfElse"],[1,"text-center"],[4,"ngFor","ngForOf"],[1,"badge","badge-success"],["class","lead text-primary","placement","top","popoverClass","rgw-overview-card-popover",3,"ngbPopover",4,"ngIf"],["placement","top","popoverClass","rgw-overview-card-popover",1,"lead","text-primary",3,"ngbPopover"],i,t,[1,"text-danger",3,"ngClass"],["placement","top","popoverClass","rgw-overview-card-popover",1,"lead","text-danger",3,"ngbPopover"],o,[1,"badge","badge-info"]]},template:function(t,o){1&t&&(e.YNc(0,hl,7,0,"span",0),e.YNc(1,Dl,15,4,"span",0)),2&t&&(e.Q6J("ngIf","no sync (zone is master)"===o.metadataSyncInfo),e.xp6(1),e.Q6J("ngIf","no sync (zone is master)"!==o.metadataSyncInfo))},dependencies:[g.mk,g.sg,g.O5,x.o8,g.rS,Ln.h],styles:["ul[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;list-style-type:none}"]}),n})();function wl(n,i){if(1&n&&(e.TgZ(0,"span")(1,"b"),e._uU(2),e.ALo(3,"titlecase"),e.qZA(),e._uU(4),e.ALo(5,"titlecase"),e.qZA()),2&n){const t=e.oxw(2).$implicit;e.xp6(2),e.Oqu(e.lcZ(3,2,t.split(": ")[0])),e.xp6(2),e.hij(":",e.lcZ(5,4,t.split(": ")[1])," ")}}function Wl(n,i){if(1&n&&(e.TgZ(0,"span")(1,"b"),e._uU(2),e.ALo(3,"titlecase"),e.qZA()()),2&n){const t=e.oxw(2).$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t))}}function Ul(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,wl,6,6,"span",9),e.YNc(2,Wl,4,3,"span",9),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",null==t?null:t.includes(":")),e.xp6(1),e.Q6J("ngIf",!(null!=t&&t.includes(":")))}}function $l(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"titlecase"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",e.lcZ(2,1,t)," ")}}function xl(n,i){if(1&n&&(e.TgZ(0,"li"),e.YNc(1,Ul,3,2,"span",9),e.YNc(2,$l,3,3,"span",9),e.qZA()),2&n){const t=i.$implicit,o=e.oxw(2);e.xp6(1),e.Q6J("ngIf",!(null!=t&&t.includes(o.zone.name)||null!=t&&t.includes(o.zone.syncstatus)||null!=t&&t.includes("failed")||null!=t&&t.includes("error"))),e.xp6(1),e.Q6J("ngIf",(null==t?null:t.includes("failed"))||(null==t?null:t.includes("error")))}}function Zl(n,i){if(1&n&&(e.TgZ(0,"ul",7)(1,"li")(2,"h5")(3,"b"),e._uU(4,"Sync Status:"),e.qZA()()(),e.YNc(5,xl,3,2,"li",8),e.qZA()),2&n){const t=e.oxw();e.xp6(5),e.Q6J("ngForOf",t.zone.fullSyncStatus)}}function kl(n,i){1&n&&(e.TgZ(0,"li",10),e._uU(1,"Up to Date"),e.qZA())}function Bl(n,i){if(1&n&&(e.TgZ(0,"a",12),e.SDv(1,13),e.ALo(2,"titlecase"),e.qZA()),2&n){const t=e.oxw(2),o=e.MAs(1);e.Q6J("ngbPopover",o),e.xp6(2),e.pQV(e.lcZ(2,2,t.zone.syncstatus)),e.QtT(1)}}function zl(n,i){if(1&n&&(e.TgZ(0,"a",12),e.SDv(1,14),e.qZA()),2&n){e.oxw(2);const t=e.MAs(1);e.Q6J("ngbPopover",t)}}function ql(n,i){if(1&n&&(e.YNc(0,Bl,3,4,"a",11),e.YNc(1,zl,2,1,"a",11)),2&n){const t=e.oxw();e.Q6J("ngIf","Not Syncing From Zone"!==t.zone.syncstatus),e.xp6(1),e.Q6J("ngIf","Not Syncing From Zone"===t.zone.syncstatus)}}const Hl=function(n){return[n]};function Xl(n,i){if(1&n&&(e.TgZ(0,"li"),e._UZ(1,"i",15),e.TgZ(2,"a",16),e.SDv(3,17),e.qZA()()),2&n){const t=e.oxw(),o=e.MAs(1);e.xp6(1),e.Q6J("ngClass",e.VKq(2,Hl,t.icons.danger)),e.xp6(1),e.Q6J("ngbPopover",o)}}function Kl(n,i){if(1&n&&(e.TgZ(0,"li",18),e._uU(1),e.ALo(2,"relativeDate"),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(e.lcZ(2,1,t.zone.timestamp))}}let Ql=(()=>{class n{constructor(){this.icons=$.P,this.zone={}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-sync-data-info"]],inputs:{zone:"zone"},decls:14,vars:4,consts:function(){let i,t,o;return i="" + "\ufffd0\ufffd" + "",t="Not Syncing",o="Error",[["syncPopover",""],[1,"me-2"],["upToDateTpl",""],["showStatus",""],[4,"ngIf","ngIfElse"],[1,"mt-4","fw-bold"],["class","badge badge-info",4,"ngIf","ngIfElse"],[1,"text-center"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"badge","badge-success"],["class","lead text-primary","placement","top","popoverClass","rgw-overview-card-popover",3,"ngbPopover",4,"ngIf"],["placement","top","popoverClass","rgw-overview-card-popover",1,"lead","text-primary",3,"ngbPopover"],i,t,[1,"text-danger",3,"ngClass"],["placement","top","popoverClass","rgw-overview-card-popover",1,"lead","text-danger",3,"ngbPopover"],o,[1,"badge","badge-info"]]},template:function(t,o){if(1&t&&(e.YNc(0,Zl,6,1,"ng-template",null,0,e.W1O),e.TgZ(2,"ul",1),e.YNc(3,kl,2,0,"ng-template",null,2,e.W1O),e.YNc(5,ql,2,2,"ng-template",null,3,e.W1O),e.TgZ(7,"li")(8,"b"),e._uU(9,"Status:"),e.qZA()(),e.YNc(10,Xl,4,4,"li",4),e.TgZ(11,"li",5),e._uU(12," Last Synced: "),e.qZA(),e.YNc(13,Kl,3,3,"li",6),e.qZA()),2&t){const c=e.MAs(4),O=e.MAs(6);e.xp6(10),e.Q6J("ngIf",(null==o.zone.syncstatus?null:o.zone.syncstatus.includes("failed"))||(null==o.zone.syncstatus?null:o.zone.syncstatus.includes("error")))("ngIfElse",O),e.xp6(3),e.Q6J("ngIf",o.zone.timestamp)("ngIfElse",c)}},dependencies:[g.mk,g.sg,g.O5,x.o8,g.rS,Ln.h],styles:["ul[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;list-style-type:none}"]}),n})();function Yl(n,i){if(1&n&&e._UZ(0,"cd-card-row",25),2&n){const t=e.oxw();e.Q6J("data",t.rgwDaemonCount)}}function Jl(n,i){if(1&n&&e._UZ(0,"cd-card-row",26),2&n){const t=e.oxw();e.Q6J("data",t.rgwRealmCount)}}function Vl(n,i){if(1&n&&e._UZ(0,"cd-card-row",27),2&n){const t=e.oxw();e.Q6J("data",t.rgwZonegroupCount)}}function jl(n,i){if(1&n&&e._UZ(0,"cd-card-row",28),2&n){const t=e.oxw();e.Q6J("data",t.rgwZoneCount)}}function ec(n,i){if(1&n&&e._UZ(0,"cd-card-row",29),2&n){const t=e.oxw();e.Q6J("data",t.rgwBucketCount)}}function tc(n,i){if(1&n&&e._UZ(0,"cd-card-row",30),2&n){const t=e.oxw();e.Q6J("data",t.UserCount)}}function nc(n,i){if(1&n&&e._UZ(0,"cd-card-row",31),2&n){const t=e.oxw();e.Q6J("data",t.objectCount)}}function oc(n,i){1&n&&(e.TgZ(0,"span",32)(1,"cd-alert-panel",33),e.tHW(2,34),e._UZ(3,"cd-doc",35),e.N_p(),e.qZA()())}const ln=function(n,i,t){return[n,i,t]};function ic(n,i){if(1&n&&(e.TgZ(0,"span",36),e._UZ(1,"i",37),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngClass",e.kEZ(1,ln,t.icons.large3x,t.icons.spinner,t.icons.spin))}}function _c(n,i){if(1&n&&(e.TgZ(0,"span",36),e._UZ(1,"i",37),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("ngClass",e.kEZ(1,ln,t.icons.large3x,t.icons.spinner,t.icons.spin))}}function rc(n,i){if(1&n&&(e.TgZ(0,"span",36),e._UZ(1,"cd-rgw-sync-primary-zone",43),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("realm",t.realm)("zonegroup",t.zonegroup)("zone",t.zone)}}function sc(n,i){if(1&n&&(e.TgZ(0,"span",36),e._UZ(1,"i",37),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("ngClass",e.kEZ(1,ln,t.icons.large3x,t.icons.spinner,t.icons.spin))}}function ac(n,i){if(1&n&&(e.TgZ(0,"span",51),e._UZ(1,"cd-rgw-sync-metadata-info",52),e.qZA()),2&n){const t=e.oxw(6);e.xp6(1),e.Q6J("metadataSyncInfo",t.metadataSyncInfo)}}function lc(n,i){if(1&n&&(e.TgZ(0,"span",53),e._UZ(1,"cd-rgw-sync-data-info",54),e.qZA()),2&n){const t=e.oxw(2).$implicit;e.xp6(1),e.Q6J("zone",t)}}const cc=function(n){return{"border-left":n}};function uc(n,i){if(1&n&&(e.TgZ(0,"cd-card",48),e.YNc(1,ac,2,1,"span",49),e.YNc(2,lc,2,1,"span",50),e.qZA()),2&n){const t=i.$implicit;e.Q6J("cardTitle",t)("ngClass",e.VKq(6,cc,"Data Sync"===t))("alignItemsCenter",!0)("justifyContentCenter",!0),e.xp6(1),e.Q6J("ngIf","Metadata Sync"===t),e.xp6(1),e.Q6J("ngIf","Data Sync"===t)}}function dc(n,i){if(1&n&&(e.TgZ(0,"cd-card",45)(1,"div",46),e.YNc(2,uc,3,8,"cd-card",47),e.qZA()()),2&n){const t=i.$implicit,o=e.oxw(4);e.s9C("cardTitle",t.name),e.xp6(2),e.Q6J("ngForOf",o.chartTitles)}}function fc(n,i){if(1&n&&(e.TgZ(0,"div",1),e.YNc(1,dc,3,2,"cd-card",44),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.replicaZonesInfo)("ngForTrackBy",t.trackByFn)}}function pc(n,i){if(1&n&&(e.TgZ(0,"div",39)(1,"cd-card",40),e.YNc(2,_c,2,5,"span",23),e.YNc(3,rc,2,3,"span",23),e.qZA(),e.TgZ(4,"div",41)(5,"cd-card",42),e.YNc(6,sc,2,5,"span",23),e.YNc(7,fc,2,2,"div",24),e.qZA()()()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("alignItemsCenter",!0)("justifyContentCenter",!0),e.xp6(1),e.Q6J("ngIf",t.loading),e.xp6(1),e.Q6J("ngIf",!t.loading),e.xp6(3),e.Q6J("ngIf",t.loading),e.xp6(1),e.Q6J("ngIf",!t.loading)}}function gc(n,i){if(1&n&&(e.TgZ(0,"div",1),e.YNc(1,pc,8,6,"div",38),e.qZA()),2&n){const t=e.oxw(),o=e.MAs(30);e.xp6(1),e.Q6J("ngIf",t.showMultisiteCard)("ngIfElse",o)}}const Tc=function(){return["Requests/sec"]},Ec=function(n){return[n]},Dn=function(){return["GET","PUT"]},vn=function(n,i){return[n,i]};let Rc=(()=>{class n{constructor(t,o,c,O,H,Q,J,j,oe,Te){this.authStorageService=t,this.healthService=o,this.refreshIntervalService=c,this.rgwDaemonService=O,this.rgwRealmService=H,this.rgwZonegroupService=Q,this.rgwZoneService=J,this.rgwBucketService=j,this.prometheusService=oe,this.rgwMultisiteService=Te,this.icons=$.P,this.interval=new An.w,this.rgwDaemonCount=0,this.rgwRealmCount=0,this.rgwZonegroupCount=0,this.rgwZoneCount=0,this.rgwBucketCount=0,this.objectCount=0,this.UserCount=0,this.totalPoolUsedBytes=0,this.averageObjectSize=0,this.multisiteInfo=[],this.queriesResults={RGW_REQUEST_PER_SECOND:[],BANDWIDTH:[],AVG_GET_LATENCY:[],AVG_PUT_LATENCY:[]},this.chartTitles=["Metadata Sync","Data Sync"],this.replicaZonesInfo=[],this.showMultisiteCard=!0,this.loading=!0,this.subject=new rl.t,this.syncCardLoading=!0,this.permissions=this.authStorageService.getPermissions()}ngOnInit(){this.interval=this.refreshIntervalService.intervalData$.subscribe(()=>{this.daemonSub=this.rgwDaemonService.list().subscribe(t=>{this.rgwDaemonCount=t.length}),this.HealthSub=this.healthService.getClusterCapacity().subscribe(t=>{this.objectCount=t.total_objects,this.totalPoolUsedBytes=t.total_pool_bytes_used,this.averageObjectSize=t.average_object_size}),this.getSyncStatus()}),this.BucketSub=this.rgwBucketService.getTotalBucketsAndUsersLength().subscribe(t=>{this.rgwBucketCount=t.buckets_count,this.UserCount=t.users_count}),this.realmSub=this.rgwRealmService.list().subscribe(t=>{this.rgwRealmCount=t.realms.length}),this.ZonegroupSub=this.rgwZonegroupService.list().subscribe(t=>{this.rgwZonegroupCount=t.zonegroups.length}),this.ZoneSUb=this.rgwZoneService.list().subscribe(t=>{this.rgwZoneCount=t.zones.length}),this.getPrometheusData(this.prometheusService.lastHourDateObject),this.multisiteSyncStatus$=this.subject.pipe((0,ll.w)(()=>this.rgwMultisiteService.getSyncStatus().pipe((0,cl.b)(t=>{this.loading=!1,this.replicaZonesInfo=t.dataSyncInfo,this.metadataSyncInfo=t.metadataSyncInfo,0===this.replicaZonesInfo.length&&(this.showMultisiteCard=!1,this.syncCardLoading=!1,this.loading=!1),[this.realm,this.zonegroup,this.zone]=t.primaryZoneData}),(0,p.K)(t=>(this.showMultisiteCard=!1,this.syncCardLoading=!1,this.loading=!1,t.preventDefault(),(0,S.of)(!0))))),(0,ul.d)(1))}ngOnDestroy(){this.interval.unsubscribe(),this.daemonSub.unsubscribe(),this.realmSub.unsubscribe(),this.ZonegroupSub.unsubscribe(),this.ZoneSUb.unsubscribe(),this.BucketSub.unsubscribe(),this.HealthSub.unsubscribe(),this.prometheusService.unsubscribe()}getPrometheusData(t){this.queriesResults=this.prometheusService.getPrometheusQueriesData(t,al.p,this.queriesResults,!0)}getSyncStatus(){this.subject.next()}trackByFn(t){return t}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(nt.j),e.Y36(dl.z),e.Y36(fl.s),e.Y36(u.b),e.Y36(ot.y),e.Y36(_t.K),e.Y36(it.g),e.Y36(L.o),e.Y36(sl.Q),e.Y36(an.o))},n.\u0275cmp=e.Xpm({type:n,selectors:[["cd-rgw-overview-dashboard"]],decls:34,vars:38,consts:function(){let i;return i=" Multi-site needs to be configured in order to see the multi-site sync status. Please consult the " + "\ufffd#3\ufffd" + "" + "\ufffd/#3\ufffd" + " on how to configure and enable the multi-site functionality. ",[[1,"container-fluid"],[1,"row"],["cardTitle","Inventory","aria-label","Inventory card",1,"col-sm-3","px-3","d-flex"],["link","/rgw/daemon","title","Gateway","summaryType","simplified",3,"data",4,"ngIf"],["link","/rgw/multisite","title","Realm","summaryType","simplified",3,"data",4,"ngIf"],["link","/rgw/multisite","title","Zone Group","summaryType","simplified",3,"data",4,"ngIf"],["link","/rgw/multisite","title","Zone","summaryType","simplified",3,"data",4,"ngIf"],["link","/rgw/bucket","title","Bucket","summaryType","simplified",3,"data",4,"ngIf"],["link","/rgw/user","title","User","summaryType","simplified",3,"data",4,"ngIf"],["title","Object","summaryType","simplified",3,"data",4,"ngIf"],["cardTitle","Performance Statistics","ria-label","Performance Statistics card",1,"col-sm-6","d-flex"],[1,"ms-4","me-4","mt-0"],[3,"selectedTime"],["chartTitle","Requests/sec","dataUnits","",3,"labelsArray","dataArray"],["chartTitle","Latency","dataUnits","ms",3,"labelsArray","dataArray"],["chartTitle","Bandwidth","dataUnits","B",3,"labelsArray","dataArray"],[1,"col-lg-3"],["cardTitle","Used Capacity","aria-label","Used Capacity",1,"col-sm-2","d-flex","w-100","h-50","pb-3",3,"alignItemsCenter","justifyContentCenter"],[1,"ms-4","me-4","text-center"],["cardTitle","Average Object Size","aria-label","Avg Object Size",1,"col-sm-2","d-flex","w-100","h-50","pt-3",3,"alignItemsCenter","justifyContentCenter"],[1,"row","pt-4","pb-4"],["cardTitle","Multi-Site Sync Status"],["notConfigured",""],["class","d-flex justify-content-center",4,"ngIf"],["class","row",4,"ngIf"],["link","/rgw/daemon","title","Gateway","summaryType","simplified",3,"data"],["link","/rgw/multisite","title","Realm","summaryType","simplified",3,"data"],["link","/rgw/multisite","title","Zone Group","summaryType","simplified",3,"data"],["link","/rgw/multisite","title","Zone","summaryType","simplified",3,"data"],["link","/rgw/bucket","title","Bucket","summaryType","simplified",3,"data"],["link","/rgw/user","title","User","summaryType","simplified",3,"data"],["title","Object","summaryType","simplified",3,"data"],[1,"pe-5","ps-5"],["type","info"],i,["section","multisite"],[1,"d-flex","justify-content-center"],[3,"ngClass"],["class","row pt-2",4,"ngIf","ngIfElse"],[1,"row","pt-2"],["cardTitle","Primary Source Zone",1,"col-lg-3","d-flex","justify-content-center","align-primary-zone",3,"alignItemsCenter","justifyContentCenter"],[1,"col-lg-9"],["cardTitle","Source Zones",1,"d-flex","h-100"],[3,"realm","zonegroup","zone"],["cardType","zone","shadowClass","true","class","col-sm-9 col-lg-6 align-replica-zones d-flex pt-4","aria-label","Source Zones Card",3,"cardTitle",4,"ngFor","ngForOf","ngForTrackBy"],["cardType","zone","shadowClass","true","aria-label","Source Zones Card",1,"col-sm-9","col-lg-6","align-replica-zones","d-flex","pt-4",3,"cardTitle"],[1,"row","pb-4","ps-3","pe-3"],["cardType","syncCards","removeBorder","true","class","col-sm-9 col-lg-6","aria-label","Charts Card",3,"cardTitle","ngClass","alignItemsCenter","justifyContentCenter",4,"ngFor","ngForOf"],["cardType","syncCards","removeBorder","true","aria-label","Charts Card",1,"col-sm-9","col-lg-6",3,"cardTitle","ngClass","alignItemsCenter","justifyContentCenter"],["class","me-2 text-center",4,"ngIf"],["class","me-2",4,"ngIf"],[1,"me-2","text-center"],[3,"metadataSyncInfo"],[1,"me-2"],[3,"zone"]]},template:function(t,o){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"cd-card",2),e.YNc(3,Yl,1,1,"cd-card-row",3),e.YNc(4,Jl,1,1,"cd-card-row",4),e.YNc(5,Vl,1,1,"cd-card-row",5),e.YNc(6,jl,1,1,"cd-card-row",6),e.YNc(7,ec,1,1,"cd-card-row",7),e.YNc(8,tc,1,1,"cd-card-row",8),e.YNc(9,nc,1,1,"cd-card-row",9),e.qZA(),e.TgZ(10,"cd-card",10)(11,"div",11)(12,"cd-dashboard-time-selector",12),e.NdJ("selectedTime",function(O){return o.getPrometheusData(O)}),e.qZA(),e._UZ(13,"cd-dashboard-area-chart",13)(14,"cd-dashboard-area-chart",14)(15,"cd-dashboard-area-chart",15),e.qZA()(),e.TgZ(16,"div",16)(17,"cd-card",17)(18,"span",18)(19,"h1"),e._uU(20),e.ALo(21,"dimlessBinary"),e.qZA()()(),e.TgZ(22,"cd-card",19)(23,"span",18)(24,"h1"),e._uU(25),e.ALo(26,"dimlessBinary"),e.qZA()()()()(),e.TgZ(27,"div",20)(28,"cd-card",21),e.YNc(29,oc,4,0,"ng-template",null,22,e.W1O),e.YNc(31,ic,2,5,"span",23),e.YNc(32,gc,2,2,"div",24),e.ALo(33,"async"),e.qZA()()()),2&t&&(e.xp6(3),e.Q6J("ngIf",null!=o.rgwDaemonCount),e.xp6(1),e.Q6J("ngIf",null!=o.rgwRealmCount),e.xp6(1),e.Q6J("ngIf",null!=o.rgwZonegroupCount),e.xp6(1),e.Q6J("ngIf",null!=o.rgwZoneCount),e.xp6(1),e.Q6J("ngIf",null!=o.rgwBucketCount),e.xp6(1),e.Q6J("ngIf",null!=o.UserCount),e.xp6(1),e.Q6J("ngIf",null!=o.objectCount),e.xp6(4),e.Q6J("labelsArray",e.DdM(27,Tc))("dataArray",e.VKq(28,Ec,o.queriesResults.RGW_REQUEST_PER_SECOND)),e.xp6(1),e.Q6J("labelsArray",e.DdM(30,Dn))("dataArray",e.WLB(31,vn,o.queriesResults.AVG_GET_LATENCY,o.queriesResults.AVG_PUT_LATENCY)),e.xp6(1),e.Q6J("labelsArray",e.DdM(34,Dn))("dataArray",e.WLB(35,vn,o.queriesResults.GET_BANDWIDTH,o.queriesResults.PUT_BANDWIDTH)),e.xp6(2),e.Q6J("alignItemsCenter",!0)("justifyContentCenter",!0),e.xp6(3),e.Oqu(e.lcZ(21,21,o.totalPoolUsedBytes)),e.xp6(2),e.Q6J("alignItemsCenter",!0)("justifyContentCenter",!0),e.xp6(3),e.Oqu(e.lcZ(26,23,o.averageObjectSize)),e.xp6(6),e.Q6J("ngIf",o.loading),e.xp6(1),e.Q6J("ngIf",e.lcZ(33,25,o.multisiteSyncStatus$)))},dependencies:[g.mk,g.sg,g.O5,Ve.G,pl.K,gl.A,Tl.e,El.S,Rl.M,ml,vl,Ql,g.Ov,nn.$],styles:["hr[_ngcontent-%COMP%]{margin-bottom:2px;margin-top:2px}.list-group-item[_ngcontent-%COMP%]{border:0}.align-replica-zones[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto;padding-left:2em;padding-right:2em}ul[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;list-style-type:none}.align-primary-zone[_ngcontent-%COMP%]{padding-left:4em}.border-left[_ngcontent-%COMP%]{border-left:1px solid rgba(0,0,0,.1254901961)}"]}),n})();var mc=d(46767);let wn=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[g.ez,R.m,r.u5,r.UX,y.B,x.Oz,A.Bz,x.HK,x.dT,Z.b,sn.xc,_l.t,mc.d]}),n})();const hc=[{path:"",redirectTo:"rbd",pathMatch:"full"},{path:"daemon",component:yi,data:{breadcrumbs:"Gateways"}},{path:"user",data:{breadcrumbs:"Users"},children:[{path:"",component:qr},{path:l.MQ.CREATE,component:Fn,data:{breadcrumbs:l.Qn.CREATE}},{path:`${l.MQ.EDIT}/:uid`,component:Fn,data:{breadcrumbs:l.Qn.EDIT}}]},{path:"roles",data:{breadcrumbs:"Roles",resource:"api.rgw.roles@1.0",tabs:[{name:"Users",url:"/rgw/user"},{name:"Roles",url:"/rgw/roles"}]},children:[{path:"",component:h.c},{path:l.MQ.CREATE,component:Pn.U,data:{breadcrumbs:l.Qn.CREATE}},{path:l.MQ.EDIT,component:Pn.U,data:{breadcrumbs:l.Qn.EDIT}}]},{path:"bucket",data:{breadcrumbs:"Buckets"},children:[{path:"",component:Ri},{path:l.MQ.CREATE,component:un,data:{breadcrumbs:l.Qn.CREATE}},{path:`${l.MQ.EDIT}/:bid`,component:un,data:{breadcrumbs:l.Qn.EDIT}}]},{path:"overview",data:{breadcrumbs:"Overview"},children:[{path:"",component:Rc}]},{path:"multisite",data:{breadcrumbs:"Multi-site"},children:[{path:"",component:rt}]}];let Mc=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n}),n.\u0275inj=e.cJS({imports:[wn,A.Bz.forChild(hc)]}),n})()},1372:(K,Y,d)=>{"use strict";d.d(Y,{B:()=>h});var g=d(64537),r=d(88692),A=d(87925);const x=function(R){return{collapsed:R}},Z=function(R){return{show:R}},l=["*"];let h=(()=>{class R{constructor(){this.showAdvanced=!1}}return R.\u0275fac=function(N){return new(N||R)},R.\u0275cmp=g.Xpm({type:R,selectors:[["cd-form-advanced-fieldset"]],ngContentSelectors:l,decls:9,vars:6,consts:function(){let y;return y="Advanced ",[[1,"cd-header"],[1,"accordion","accordion-flush"],["type","button","id","advanced-fieldset","aria-label","toggle advanced mode",1,"accordion-button","cd-form-advanced-fieldset-buttton","p-0",3,"ngClass","click"],y,[1,"accordion-collapse","collapse",3,"ngClass"],[1,"accordion-body"],[1,"card-body"]]},template:function(N,v){1&N&&(g.F$t(),g.TgZ(0,"fieldset")(1,"legend",0)(2,"div",1)(3,"button",2),g.NdJ("click",function(){return v.showAdvanced=!v.showAdvanced}),g.SDv(4,3),g.qZA()()(),g.TgZ(5,"div",4)(6,"div",5)(7,"div",6),g.Hsn(8),g.qZA()()()()),2&N&&(g.xp6(3),g.Q6J("ngClass",g.VKq(2,x,!v.showAdvanced)),g.xp6(2),g.Q6J("ngClass",g.VKq(4,Z,v.showAdvanced)))},dependencies:[r.mk,A.o],styles:[".cd-form-advanced-fieldset-buttton[_ngcontent-%COMP%]{--bs-accordion-btn-active-icon: var(--bs-accordion-btn-icon);background-color:inherit;border:hidden;border-color:inherit;box-shadow:none;color:inherit;font-size:inherit;outline:0;text-decoration:none}"]}),R})()},69862:()=>{},40964:()=>{}}]);
\ No newline at end of file |