1
2
|
(()=>{"use strict";var t,e={43275:(t,e,i)=>{var n=i(85072),r=i.n(n),s=i(97825),o=i.n(s),a=i(77659),l=i.n(a),u=i(55056),c=i.n(u),h=i(10540),d=i.n(h),p=i(41113),f=i.n(p),g=i(98290),E={};E.styleTagTransform=f(),E.setAttributes=c(),E.insert=l().bind(null,"head"),E.domAPI=o(),E.insertStyleElement=d(),r()(g.A,E),g.A&&g.A.locals&&g.A.locals;var m=i(53334),N=i(68251),b=(i(87485),i(43627),i(380)),w=i(65606),v=i(96763),I=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(I||{});Error;class x extends b.m{_views=[];_currentView=null;register(t){if(this._views.find((e=>e.id===t.id)))throw new Error(`View id ${t.id} is already registered`);this._views.push(t),this.dispatchTypedEvent("update",new CustomEvent("update"))}remove(t){const e=this._views.findIndex((e=>e.id===t));-1!==e&&(this._views.splice(e,1),this.dispatchTypedEvent("update",new CustomEvent("update")))}setActive(t){this._currentView=t;const e=new CustomEvent("updateActive",{detail:t});this.dispatchTypedEvent("updateActive",e)}get active(){return this._currentView}get views(){return this._views}}class A{_column;constructor(t){y(t),this._column=t}get id(){return this._column.id}get title(){return this._column.title}get render(){return this._column.render}get sort(){return this._column.sort}get summary(){return this._column.summary}}const y=function(t){if(!t.id||"string"!=typeof t.id)throw new Error("A column id is required");if(!t.title||"string"!=typeof t.title)throw new Error("A column title is required");if(!t.render||"function"!=typeof t.render)throw new Error("A render function is required");if(t.sort&&"function"!=typeof t.sort)throw new Error("Column sortFunction must be a function");if(t.summary&&"function"!=typeof t.summary)throw new Error("Column summary must be a function");return!0};var T,O,L={},R={};function $(){return T||(T=1,function(t){const e=":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",i="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+i+"$");t.isExist=function(t){return void 0!==t},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,i){if(e){const n=Object.keys(e),r=n.length;for(let s=0;s<r;s++)t[n[s]]="strict"===i?[e[n[s]]]:e[n[s]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(t){return!(null==n.exec(t))},t.getAllMatches=function(t,e){const i=[];let n=e.exec(t);for(;n;){const r=[];r.startIndex=e.lastIndex-n[0].length;const s=n.length;for(let t=0;t<s;t++)r.push(n[t]);i.push(r),n=e.exec(t)}return i},t.nameRegexp=i}(R)),R}function _(){if(O)return L;O=1;const t=$(),e={allowBooleanAttributes:!1,unpairedTags:[]};function i(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function n(t,e){const i=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const n=t.substr(i,e-i);if(e>5&&"xml"===n)return h("InvalidXml","XML declaration allowed only at the start of the document.",p(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function r(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let i=1;for(e+=8;e<t.length;e++)if("<"===t[e])i++;else if(">"===t[e]&&(i--,0===i))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}L.validate=function(s,o){o=Object.assign({},e,o);const l=[];let d=!1,f=!1;"\ufeff"===s[0]&&(s=s.substr(1));for(let e=0;e<s.length;e++)if("<"===s[e]&&"?"===s[e+1]){if(e+=2,e=n(s,e),e.err)return e}else{if("<"!==s[e]){if(i(s[e]))continue;return h("InvalidChar","char '"+s[e]+"' is not expected.",p(s,e))}{let E=e;if(e++,"!"===s[e]){e=r(s,e);continue}{let m=!1;"/"===s[e]&&(m=!0,e++);let N="";for(;e<s.length&&">"!==s[e]&&" "!==s[e]&&"\t"!==s[e]&&"\n"!==s[e]&&"\r"!==s[e];e++)N+=s[e];if(N=N.trim(),"/"===N[N.length-1]&&(N=N.substring(0,N.length-1),e--),g=N,!t.isName(g)){let t;return t=0===N.trim().length?"Invalid space after '<'.":"Tag '"+N+"' is an invalid name.",h("InvalidTag",t,p(s,e))}const b=a(s,e);if(!1===b)return h("InvalidAttr","Attributes for '"+N+"' have open quote.",p(s,e));let w=b.value;if(e=b.index,"/"===w[w.length-1]){const t=e-w.length;w=w.substring(0,w.length-1);const i=u(w,o);if(!0!==i)return h(i.err.code,i.err.msg,p(s,t+i.err.line));d=!0}else if(m){if(!b.tagClosed)return h("InvalidTag","Closing tag '"+N+"' doesn't have proper closing.",p(s,e));if(w.trim().length>0)return h("InvalidTag","Closing tag '"+N+"' can't have attributes or invalid starting.",p(s,E));if(0===l.length)return h("InvalidTag","Closing tag '"+N+"' has not been opened.",p(s,E));{const t=l.pop();if(N!==t.tagName){let e=p(s,t.tagStartPos);return h("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+e.line+", col "+e.col+") instead of closing tag '"+N+"'.",p(s,E))}0==l.length&&(f=!0)}}else{const t=u(w,o);if(!0!==t)return h(t.err.code,t.err.msg,p(s,e-w.length+t.err.line));if(!0===f)return h("InvalidXml","Multiple possible root nodes found.",p(s,e));-1!==o.unpairedTags.indexOf(N)||l.push({tagName:N,tagStartPos:E}),d=!0}for(e++;e<s.length;e++)if("<"===s[e]){if("!"===s[e+1]){e++,e=r(s,e);continue}if("?"!==s[e+1])break;if(e=n(s,++e),e.err)return e}else if("&"===s[e]){const t=c(s,e);if(-1==t)return h("InvalidChar","char '&' is not expected.",p(s,e));e=t}else if(!0===f&&!i(s[e]))return h("InvalidXml","Extra text at the end",p(s,e));"<"===s[e]&&e--}}}var g;return d?1==l.length?h("InvalidTag","Unclosed tag '"+l[0].tagName+"'.",p(s,l[0].tagStartPos)):!(l.length>0)||h("InvalidXml","Invalid '"+JSON.stringify(l.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):h("InvalidXml","Start tag expected.",1)};const s='"',o="'";function a(t,e){let i="",n="",r=!1;for(;e<t.length;e++){if(t[e]===s||t[e]===o)""===n?n=t[e]:n!==t[e]||(n="");else if(">"===t[e]&&""===n){r=!0;break}i+=t[e]}return""===n&&{value:i,index:e,tagClosed:r}}const l=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function u(e,i){const n=t.getAllMatches(e,l),r={};for(let t=0;t<n.length;t++){if(0===n[t][1].length)return h("InvalidAttr","Attribute '"+n[t][2]+"' has no space in starting.",f(n[t]));if(void 0!==n[t][3]&&void 0===n[t][4])return h("InvalidAttr","Attribute '"+n[t][2]+"' is without value.",f(n[t]));if(void 0===n[t][3]&&!i.allowBooleanAttributes)return h("InvalidAttr","boolean attribute '"+n[t][2]+"' is not allowed.",f(n[t]));const e=n[t][2];if(!d(e))return h("InvalidAttr","Attribute '"+e+"' is an invalid name.",f(n[t]));if(r.hasOwnProperty(e))return h("InvalidAttr","Attribute '"+e+"' is repeated.",f(n[t]));r[e]=1}return!0}function c(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let i=/\d/;for("x"===t[e]&&(e++,i=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(i))break}return-1}(t,++e);let i=0;for(;e<t.length;e++,i++)if(!(t[e].match(/\w/)&&i<20)){if(";"===t[e])break;return-1}return e}function h(t,e,i){return{err:{code:t,msg:e,line:i.line||i,col:i.col}}}function d(e){return t.isName(e)}function p(t,e){const i=t.substring(0,e).split(/\r?\n/);return{line:i.length,col:i[i.length-1].length+1}}function f(t){return t.startIndex+t[1].length}return L}var P,C,S,D,F,V,j,M,G,k,U,X={};function B(){return G?M:(G=1,M=function(t){return"function"==typeof t?t:Array.isArray(t)?e=>{for(const i of t){if("string"==typeof i&&e===i)return!0;if(i instanceof RegExp&&i.test(e))return!0}}:()=>!1})}var H,q,Y,z,Z,K,W,J,Q,tt={};function et(){if(H)return tt;function t(r,s,o){let a;const l={};for(let u=0;u<r.length;u++){const c=r[u],h=e(c);let d="";if(d=void 0===o?h:o+"."+h,h===s.textNodeName)void 0===a?a=c[h]:a+=""+c[h];else{if(void 0===h)continue;if(c[h]){let e=t(c[h],s,d);const r=n(e,s);c[":@"]?i(e,c[":@"],d,s):1!==Object.keys(e).length||void 0===e[s.textNodeName]||s.alwaysCreateTextNode?0===Object.keys(e).length&&(s.alwaysCreateTextNode?e[s.textNodeName]="":e=""):e=e[s.textNodeName],void 0!==l[h]&&l.hasOwnProperty(h)?(Array.isArray(l[h])||(l[h]=[l[h]]),l[h].push(e)):s.isArray(h,d,r)?l[h]=[e]:l[h]=e}}}return"string"==typeof a?a.length>0&&(l[s.textNodeName]=a):void 0!==a&&(l[s.textNodeName]=a),l}function e(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const i=e[t];if(":@"!==i)return i}}function i(t,e,i,n){if(e){const r=Object.keys(e),s=r.length;for(let o=0;o<s;o++){const s=r[o];n.isArray(s,i+"."+s,!0,!0)?t[s]=[e[s]]:t[s]=e[s]}}}function n(t,e){const{textNodeName:i}=e,n=Object.keys(t).length;return 0===n||!(1!==n||!t[i]&&"boolean"!=typeof t[i]&&0!==t[i])}return H=1,tt.prettify=function(e,i){return t(e,i)},tt}function it(){if(Y)return q;Y=1;const{buildOptions:t}=function(){if(P)return X;P=1;const t={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,i){return t}};return X.buildOptions=function(e){return Object.assign({},t,e)},X.defaultOptions=t,X}(),e=function(){if(U)return k;U=1;const t=$(),e=S?C:(S=1,C=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}),i=function(){if(F)return D;F=1;const t=$();function e(t,e){let i="";for(;e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)i+=t[e];if(i=i.trim(),-1!==i.indexOf(" "))throw new Error("External entites are not supported");const n=t[e++];let r="";for(;e<t.length&&t[e]!==n;e++)r+=t[e];return[i,r,e]}function i(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"N"===t[e+3]&&"T"===t[e+4]&&"I"===t[e+5]&&"T"===t[e+6]&&"Y"===t[e+7]}function n(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"L"===t[e+3]&&"E"===t[e+4]&&"M"===t[e+5]&&"E"===t[e+6]&&"N"===t[e+7]&&"T"===t[e+8]}function r(t,e){return"!"===t[e+1]&&"A"===t[e+2]&&"T"===t[e+3]&&"T"===t[e+4]&&"L"===t[e+5]&&"I"===t[e+6]&&"S"===t[e+7]&&"T"===t[e+8]}function s(t,e){return"!"===t[e+1]&&"N"===t[e+2]&&"O"===t[e+3]&&"T"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"I"===t[e+7]&&"O"===t[e+8]&&"N"===t[e+9]}function o(e){if(t.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}return D=function(t,a){const l={};if("O"!==t[a+3]||"C"!==t[a+4]||"T"!==t[a+5]||"Y"!==t[a+6]||"P"!==t[a+7]||"E"!==t[a+8])throw new Error("Invalid Tag instead of DOCTYPE");{a+=9;let u=1,c=!1,h=!1,d="";for(;a<t.length;a++)if("<"!==t[a]||h)if(">"===t[a]){if(h?"-"===t[a-1]&&"-"===t[a-2]&&(h=!1,u--):u--,0===u)break}else"["===t[a]?c=!0:d+=t[a];else{if(c&&i(t,a)){let i,n;a+=7,[i,n,a]=e(t,a+1),-1===n.indexOf("&")&&(l[o(i)]={regx:RegExp(`&${i};`,"g"),val:n})}else c&&n(t,a)||c&&r(t,a)?a+=8:c&&s(t,a)?a+=9:h=!0;u++,d=""}if(0!==u)throw new Error("Unclosed DOCTYPE")}return{entities:l,i:a}}}(),n=function(){if(j)return V;j=1;const t=/^[-+]?0x[a-fA-F0-9]+$/,e=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const i={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};return V=function(n,r={}){if(r=Object.assign({},i,r),!n||"string"!=typeof n)return n;let s=n.trim();if(void 0!==r.skipLike&&r.skipLike.test(s))return n;if(r.hex&&t.test(s))return Number.parseInt(s,16);{const t=e.exec(s);if(t){const e=t[1],i=t[2];let a=(o=t[3])&&-1!==o.indexOf(".")?("."===(o=o.replace(/0+$/,""))?o="0":"."===o[0]?o="0"+o:"."===o[o.length-1]&&(o=o.substr(0,o.length-1)),o):o;const l=t[4]||t[6];if(!r.leadingZeros&&i.length>0&&e&&"."!==s[2])return n;if(!r.leadingZeros&&i.length>0&&!e&&"."!==s[1])return n;{const t=Number(s),o=""+t;return-1!==o.search(/[eE]/)||l?r.eNotation?t:n:-1!==s.indexOf(".")?"0"===o&&""===a||o===a||e&&o==="-"+a?t:n:i?a===o||e+a===o?t:n:s===o||s===e+o?t:n}}return n}var o},V}(),r=B();function s(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const n=e[i];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:t[n]}}}function o(t,e,i,n,r,s,o){if(void 0!==t&&(this.options.trimValues&&!n&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const n=this.options.tagValueProcessor(e,t,i,r,s);return null==n?t:typeof n!=typeof t||n!==t?n:this.options.trimValues||t.trim()===t?N(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function a(t){if(this.options.removeNSPrefix){const e=t.split(":"),i="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=i+e[1])}return t}const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function u(e,i,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){const n=t.getAllMatches(e,l),r=n.length,s={};for(let t=0;t<r;t++){const e=this.resolveNameSpace(n[t][1]);if(this.ignoreAttributesFn(e,i))continue;let r=n[t][4],o=this.options.attributeNamePrefix+e;if(e.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==r){this.options.trimValues&&(r=r.trim()),r=this.replaceEntitiesValue(r);const t=this.options.attributeValueProcessor(e,r,i);s[o]=null==t?r:typeof t!=typeof r||t!==r?t:N(r,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(s[o]=!0)}if(!Object.keys(s).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=s,t}return s}}const c=function(t){t=t.replace(/\r\n?/g,"\n");const n=new e("!xml");let r=n,s="",o="";for(let a=0;a<t.length;a++)if("<"===t[a])if("/"===t[a+1]){const e=g(t,">",a,"Closing Tag is not closed.");let i=t.substring(a+2,e).trim();if(this.options.removeNSPrefix){const t=i.indexOf(":");-1!==t&&(i=i.substr(t+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),r&&(s=this.saveTextToParentTag(s,r,o));const n=o.substring(o.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let l=0;n&&-1!==this.options.unpairedTags.indexOf(n)?(l=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=o.lastIndexOf("."),o=o.substring(0,l),r=this.tagsNodeStack.pop(),s="",a=e}else if("?"===t[a+1]){let i=E(t,a,!1,"?>");if(!i)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,r,o),this.options.ignoreDeclaration&&"?xml"===i.tagName||this.options.ignorePiTags);else{const t=new e(i.tagName);t.add(this.options.textNodeName,""),i.tagName!==i.tagExp&&i.attrExpPresent&&(t[":@"]=this.buildAttributesMap(i.tagExp,o,i.tagName)),this.addChild(r,t,o)}a=i.closeIndex+1}else if("!--"===t.substr(a+1,3)){const e=g(t,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const i=t.substring(a+4,e-2);s=this.saveTextToParentTag(s,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}a=e}else if("!D"===t.substr(a+1,2)){const e=i(t,a);this.docTypeEntities=e.entities,a=e.i}else if("!["===t.substr(a+1,2)){const e=g(t,"]]>",a,"CDATA is not closed.")-2,i=t.substring(a+9,e);s=this.saveTextToParentTag(s,r,o);let n=this.parseTextData(i,r.tagname,o,!0,!1,!0,!0);null==n&&(n=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):r.add(this.options.textNodeName,n),a=e+2}else{let i=E(t,a,this.options.removeNSPrefix),l=i.tagName;const u=i.rawTagName;let c=i.tagExp,h=i.attrExpPresent,d=i.closeIndex;this.options.transformTagName&&(l=this.options.transformTagName(l)),r&&s&&"!xml"!==r.tagname&&(s=this.saveTextToParentTag(s,r,o,!1));const p=r;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(r=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),l!==n.tagname&&(o+=o?"."+l:l),this.isItStopNode(this.options.stopNodes,o,l)){let n="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)"/"===l[l.length-1]?(l=l.substr(0,l.length-1),o=o.substr(0,o.length-1),c=l):c=c.substr(0,c.length-1),a=i.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(l))a=i.closeIndex;else{const e=this.readStopNodeData(t,u,d+1);if(!e)throw new Error(`Unexpected end of ${u}`);a=e.i,n=e.tagContent}const s=new e(l);l!==c&&h&&(s[":@"]=this.buildAttributesMap(c,o,l)),n&&(n=this.parseTextData(n,l,o,!0,h,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),s.add(this.options.textNodeName,n),this.addChild(r,s,o)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){"/"===l[l.length-1]?(l=l.substr(0,l.length-1),o=o.substr(0,o.length-1),c=l):c=c.substr(0,c.length-1),this.options.transformTagName&&(l=this.options.transformTagName(l));const t=new e(l);l!==c&&h&&(t[":@"]=this.buildAttributesMap(c,o,l)),this.addChild(r,t,o),o=o.substr(0,o.lastIndexOf("."))}else{const t=new e(l);this.tagsNodeStack.push(r),l!==c&&h&&(t[":@"]=this.buildAttributesMap(c,o,l)),this.addChild(r,t,o),r=t}s="",a=d}}else s+=t[a];return n.child};function h(t,e,i){const n=this.options.updateTag(e.tagname,i,e[":@"]);!1===n||("string"==typeof n?(e.tagname=n,t.addChild(e)):t.addChild(e))}const d=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const i=this.docTypeEntities[e];t=t.replace(i.regx,i.val)}for(let e in this.lastEntities){const i=this.lastEntities[e];t=t.replace(i.regex,i.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const i=this.htmlEntities[e];t=t.replace(i.regex,i.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function p(t,e,i,n){return t&&(void 0===n&&(n=0===Object.keys(e.child).length),void 0!==(t=this.parseTextData(t,e.tagname,i,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function f(t,e,i){const n="*."+i;for(const i in t){const r=t[i];if(n===r||e===r)return!0}return!1}function g(t,e,i,n){const r=t.indexOf(e,i);if(-1===r)throw new Error(n);return r+e.length-1}function E(t,e,i,n=">"){const r=function(t,e,i=">"){let n,r="";for(let s=e;s<t.length;s++){let e=t[s];if(n)e===n&&(n="");else if('"'===e||"'"===e)n=e;else if(e===i[0]){if(!i[1])return{data:r,index:s};if(t[s+1]===i[1])return{data:r,index:s}}else"\t"===e&&(e=" ");r+=e}}(t,e+1,n);if(!r)return;let s=r.data;const o=r.index,a=s.search(/\s/);let l=s,u=!0;-1!==a&&(l=s.substring(0,a),s=s.substring(a+1).trimStart());const c=l;if(i){const t=l.indexOf(":");-1!==t&&(l=l.substr(t+1),u=l!==r.data.substr(t+1))}return{tagName:l,tagExp:s,closeIndex:o,attrExpPresent:u,rawTagName:c}}function m(t,e,i){const n=i;let r=1;for(;i<t.length;i++)if("<"===t[i])if("/"===t[i+1]){const s=g(t,">",i,`${e} is not closed`);if(t.substring(i+2,s).trim()===e&&(r--,0===r))return{tagContent:t.substring(n,i),i:s};i=s}else if("?"===t[i+1])i=g(t,"?>",i+1,"StopNode is not closed.");else if("!--"===t.substr(i+1,3))i=g(t,"--\x3e",i+3,"StopNode is not closed.");else if("!["===t.substr(i+1,2))i=g(t,"]]>",i,"StopNode is not closed.")-2;else{const n=E(t,i,">");n&&((n&&n.tagName)===e&&"/"!==n.tagExp[n.tagExp.length-1]&&r++,i=n.closeIndex)}}function N(e,i,r){if(i&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&n(e,r)}return t.isExist(e)?e:""}return k=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=s,this.parseXml=c,this.parseTextData=o,this.resolveNameSpace=a,this.buildAttributesMap=u,this.isItStopNode=f,this.replaceEntitiesValue=d,this.readStopNodeData=m,this.saveTextToParentTag=p,this.addChild=h,this.ignoreAttributesFn=r(this.options.ignoreAttributes)}},k}(),{prettify:i}=et(),n=_();return q=class{constructor(e){this.externalEntities={},this.options=t(e)}parse(t,r){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(r){!0===r&&(r={});const e=n.validate(t,r);if(!0!==e)throw Error(`${e.err.msg}:${e.err.line}:${e.err.col}`)}const s=new e(this.options);s.addExternalEntities(this.externalEntities);const o=s.parseXml(t);return this.options.preserveOrder||void 0===o?o:i(o,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}},q}function nt(){if(Z)return z;function t(s,o,a,l){let u="",c=!1;for(let h=0;h<s.length;h++){const d=s[h],p=e(d);if(void 0===p)continue;let f="";if(f=0===a.length?p:`${a}.${p}`,p===o.textNodeName){let t=d[p];n(f,o)||(t=o.tagValueProcessor(p,t),t=r(t,o)),c&&(u+=l),u+=t,c=!1;continue}if(p===o.cdataPropName){c&&(u+=l),u+=`<![CDATA[${d[p][0][o.textNodeName]}]]>`,c=!1;continue}if(p===o.commentPropName){u+=l+`\x3c!--${d[p][0][o.textNodeName]}--\x3e`,c=!0;continue}if("?"===p[0]){const t=i(d[":@"],o),e="?xml"===p?"":l;let n=d[p][0][o.textNodeName];n=0!==n.length?" "+n:"",u+=e+`<${p}${n}${t}?>`,c=!0;continue}let g=l;""!==g&&(g+=o.indentBy);const E=l+`<${p}${i(d[":@"],o)}`,m=t(d[p],o,f,g);-1!==o.unpairedTags.indexOf(p)?o.suppressUnpairedNode?u+=E+">":u+=E+"/>":m&&0!==m.length||!o.suppressEmptyNode?m&&m.endsWith(">")?u+=E+`>${m}${l}</${p}>`:(u+=E+">",m&&""!==l&&(m.includes("/>")||m.includes("</"))?u+=l+o.indentBy+m+l:u+=m,u+=`</${p}>`):u+=E+"/>",c=!0}return u}function e(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const n=e[i];if(t.hasOwnProperty(n)&&":@"!==n)return n}}function i(t,e){let i="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let s=e.attributeValueProcessor(n,t[n]);s=r(s,e),!0===s&&e.suppressBooleanAttributes?i+=` ${n.substr(e.attributeNamePrefix.length)}`:i+=` ${n.substr(e.attributeNamePrefix.length)}="${s}"`}return i}function n(t,e){let i=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+i)return!0;return!1}function r(t,e){if(t&&t.length>0&&e.processEntities)for(let i=0;i<e.entities.length;i++){const n=e.entities[i];t=t.replace(n.regex,n.val)}return t}return Z=1,z=function(e,i){let n="";return i.format&&i.indentBy.length>0&&(n="\n"),t(e,i,"",n)},z}var rt=function(){if(Q)return J;Q=1;const t=_(),e=it(),i=function(){if(W)return K;W=1;const t=nt(),e=B(),i={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function n(t){this.options=Object.assign({},i,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=e(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=o),this.processTextOrObjNode=r,this.options.format?(this.indentate=s,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function r(t,e,i,n){const r=this.j2x(t,i+1,n.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,r.attrStr,i):this.buildObjectNode(r.val,e,r.attrStr,i)}function s(t){return this.options.indentBy.repeat(t)}function o(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}return n.prototype.build=function(e){return this.options.preserveOrder?t(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},n.prototype.j2x=function(t,e,i){let n="",r="";const s=i.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(void 0===t[o])this.isAttribute(o)&&(r+="");else if(null===t[o])this.isAttribute(o)?r+="":"?"===o[0]?r+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)r+=this.buildTextValNode(t[o],o,"",e);else if("object"!=typeof t[o]){const i=this.isAttribute(o);if(i&&!this.ignoreAttributesFn(i,s))n+=this.buildAttrPairStr(i,""+t[o]);else if(!i)if(o===this.options.textNodeName){let e=this.options.tagValueProcessor(o,""+t[o]);r+=this.replaceEntitiesValue(e)}else r+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const n=t[o].length;let s="",a="";for(let l=0;l<n;l++){const n=t[o][l];if(void 0===n);else if(null===n)"?"===o[0]?r+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){const t=this.j2x(n,e+1,i.concat(o));s+=t.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(a+=t.attrStr)}else s+=this.processTextOrObjNode(n,o,e,i);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(o,n);t=this.replaceEntitiesValue(t),s+=t}else s+=this.buildTextValNode(n,o,"",e)}this.options.oneListGroup&&(s=this.buildObjectNode(s,o,a,e)),r+=s}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const e=Object.keys(t[o]),i=e.length;for(let r=0;r<i;r++)n+=this.buildAttrPairStr(e[r],""+t[o][e[r]])}else r+=this.processTextOrObjNode(t[o],o,e,i);return{attrStr:n,val:r}},n.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},n.prototype.buildObjectNode=function(t,e,i,n){if(""===t)return"?"===e[0]?this.indentate(n)+"<"+e+i+"?"+this.tagEndChar:this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar;{let r="</"+e+this.tagEndChar,s="";return"?"===e[0]&&(s="?",r=""),!i&&""!==i||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===s.length?this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(n)+"<"+e+i+s+this.tagEndChar+t+this.indentate(n)+r:this.indentate(n)+"<"+e+i+s+">"+t+r}},n.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},n.prototype.buildTextValNode=function(t,e,i,n){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+i+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(e,t);return r=this.replaceEntitiesValue(r),""===r?this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+i+">"+r+"</"+e+this.tagEndChar}},n.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const i=this.options.entities[e];t=t.replace(i.regex,i.val)}return t},K=n}();return J={XMLParser:e,XMLValidator:t,XMLBuilder:i}}();var st,ot,at,lt;function ut(){if(ot)return st;ot=1;const t="object"==typeof w&&w.env&&w.env.NODE_DEBUG&&/\bsemver\b/i.test(w.env.NODE_DEBUG)?(...t)=>v.error("SEMVER",...t):()=>{};return st=t}function ct(){if(lt)return at;lt=1;const t=Number.MAX_SAFE_INTEGER||9007199254740991;return at={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}var ht,dt,pt,ft,gt,Et,mt,Nt,bt,wt,vt,It,xt,At={exports:{}};function yt(){if(mt)return Et;mt=1;const t=ut(),{MAX_LENGTH:e,MAX_SAFE_INTEGER:i}=ct(),{safeRe:n,t:r}=(ht||(ht=1,function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:r}=ct(),s=ut(),o=(e=t.exports={}).re=[],a=e.safeRe=[],l=e.src=[],u=e.t={};let c=0;const h="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",r],[h,n]],p=(t,e,i)=>{const n=(t=>{for(const[e,i]of d)t=t.split(`${e}*`).join(`${e}{0,${i}}`).split(`${e}+`).join(`${e}{1,${i}}`);return t})(e),r=c++;s(t,r,e),u[t]=r,l[r]=e,o[r]=new RegExp(e,i?"g":void 0),a[r]=new RegExp(n,i?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),p("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[u.NUMERICIDENTIFIER]}|${l[u.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NUMERICIDENTIFIERLOOSE]}|${l[u.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${h}+`),p("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),p("FULL",`^${l[u.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),p("LOOSE",`^${l[u.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),p("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),p("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[u.COERCE],!0),p("COERCERTLFULL",l[u.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",p("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",p("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(At,At.exports)),At.exports),s=function(){if(pt)return dt;pt=1;const t=Object.freeze({loose:!0}),e=Object.freeze({});return dt=i=>i?"object"!=typeof i?t:i:e,dt}(),{compareIdentifiers:o}=function(){if(gt)return ft;gt=1;const t=/^[0-9]+$/,e=(e,i)=>{const n=t.test(e),r=t.test(i);return n&&r&&(e=+e,i=+i),e===i?0:n&&!r?-1:r&&!n?1:e<i?-1:1};return ft={compareIdentifiers:e,rcompareIdentifiers:(t,i)=>e(i,t)}}();class a{constructor(o,l){if(l=s(l),o instanceof a){if(o.loose===!!l.loose&&o.includePrerelease===!!l.includePrerelease)return o;o=o.version}else if("string"!=typeof o)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof o}".`);if(o.length>e)throw new TypeError(`version is longer than ${e} characters`);t("SemVer",o,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const u=o.trim().match(l.loose?n[r.LOOSE]:n[r.FULL]);if(!u)throw new TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&e<i)return e}return t})):this.prerelease=[],this.build=u[5]?u[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(t("SemVer.compare",this.version,this.options,e),!(e instanceof a)){if("string"==typeof e&&e===this.version)return 0;e=new a(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(t){return t instanceof a||(t=new a(t,this.options)),o(this.major,t.major)||o(this.minor,t.minor)||o(this.patch,t.patch)}comparePre(e){if(e instanceof a||(e=new a(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let i=0;do{const n=this.prerelease[i],r=e.prerelease[i];if(t("prerelease compare",i,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return o(n,r)}while(++i)}compareBuild(e){e instanceof a||(e=new a(e,this.options));let i=0;do{const n=this.build[i],r=e.build[i];if(t("build compare",i,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return o(n,r)}while(++i)}inc(t,e,i){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e,i),this.inc("pre",e,i);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e,i),this.inc("pre",e,i);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const t=Number(i)?1:0;if(!e&&!1===i)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[t];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(e===this.prerelease.join(".")&&!1===i)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(t)}}if(e){let n=[e,t];!1===i&&(n=[e]),0===o(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Et=a}!function(){if(vt)return wt;vt=1;const t=function(){if(bt)return Nt;bt=1;const t=yt();return Nt=(e,i,n=!1)=>{if(e instanceof t)return e;try{return new t(e,i)}catch(t){if(!n)return null;throw t}},Nt}();wt=(e,i)=>{const n=t(e,i);return n?n.version:null}}(),function(){if(xt)return It;xt=1;const t=yt();It=(e,i)=>new t(e,i).major}(),b.m;var Tt=i(21777);const Ot=`/trashbin/${(0,Tt.HW)()?.uid}/trash`,Lt=(0,N.c)();var Rt=i(63814);const $t=`<?xml version="1.0"?>\n<d:propfind ${(0,N.k)()}>\n\t<d:prop>\n\t\t<nc:trashbin-deletion-time />\n\t\t<nc:trashbin-original-location />\n\t\t<nc:trashbin-title />\n\t\t<nc:trashbin-deleted-by-id />\n\t\t<nc:trashbin-deleted-by-display-name />\n\t\t${(0,N.j)()}\n\t</d:prop>\n</d:propfind>`,_t=t=>{const e=(0,N.r)(t,Ot);return e.attributes.previewUrl=(0,Rt.Jv)("/apps/files_trashbin/preview?fileId={fileid}&x=32&y=32",{fileid:e.fileid}),e};var Pt=i(19231),Ct=i(71225),St=i(85471),Dt=i(52997);const Ft=t=>{const e=void 0!==t.attributes?.["trashbin-original-location"]?String(t.attributes?.["trashbin-original-location"]):null;if(!e)return(0,m.Tl)("files_trashbin","Unknown");const i=(0,Ct.pD)(e);return i===e?(0,m.Tl)("files_trashbin","All files"):i.replace(/^\//,"")},Vt=t=>{const e=void 0!==t.attributes?.["trashbin-deleted-by-id"]?String(t.attributes?.["trashbin-deleted-by-id"]):null,i=void 0!==t.attributes?.["trashbin-deleted-by-display-name"]?String(t.attributes?.["trashbin-deleted-by-display-name"]):null,n=((t,e)=>{const i=(0,Tt.HW)()?.uid;return t===i?(0,m.Tl)("files_trashbin","You"):t||e?null:(0,m.Tl)("files_trashbin","Unknown")})(e,i);return{userId:e,displayName:i,label:n}},jt=[new A({id:"original-location",title:(0,m.Tl)("files_trashbin","Original location"),render(t){const e=Ft(t),i=document.createElement("span");return i.title=e,i.textContent=e,i},sort(t,e){const i=Ft(t),n=Ft(e);return i.localeCompare(n)}}),new A({id:"deleted-by",title:(0,m.Tl)("files_trashbin","Deleted by"),render(t){const{userId:e,displayName:i,label:n}=Vt(t);if(n){const t=document.createElement("span");return t.textContent=n,t}return new(St.Ay.extend(Dt.N))({propsData:{size:32,user:e??void 0,displayName:i??(0,m.Tl)("files_trashbin","Unknown")}}).$mount().$el},sort(t,e){const i=Vt(t).label??Vt(t).displayName??(0,m.Tl)("files_trashbin","Unknown"),n=Vt(e).label??Vt(e).displayName??(0,m.Tl)("files_trashbin","Unknown");return i.localeCompare(n)}}),new A({id:"deleted",title:(0,m.Tl)("files_trashbin","Deleted"),render(t){const e=t.attributes?.["trashbin-deletion-time"],i=document.createElement("span");return e?(i.title=Pt.A.unix(e).format("LLL"),i.textContent=Pt.A.unix(e).fromNow(),i):(i.textContent=(0,m.Tl)("files_trashbin","A long time ago"),i)},sort(t,e){const i=t.attributes?.["trashbin-deletion-time"]||t?.mtime||0;return(e.attributes?.["trashbin-deletion-time"]||e?.mtime||0)-i}})];var Mt=i(61338),Gt=i(65043);const kt=(0,i(35947).YK)().setApp("files").detectUser().build();var Ut;Ut=new class{_action;constructor(t){this.validateAction(t),this._action=t}get id(){return this._action.id}get displayName(){return this._action.displayName}get title(){return this._action.title}get iconSvgInline(){return this._action.iconSvgInline}get enabled(){return this._action.enabled}get exec(){return this._action.exec}get execBatch(){return this._action.execBatch}get order(){return this._action.order}get parent(){return this._action.parent}get default(){return this._action.default}get destructive(){return this._action.destructive}get inline(){return this._action.inline}get renderInline(){return this._action.renderInline}validateAction(t){if(!t.id||"string"!=typeof t.id)throw new Error("Invalid id");if(!t.displayName||"function"!=typeof t.displayName)throw new Error("Invalid displayName function");if("title"in t&&"function"!=typeof t.title)throw new Error("Invalid title function");if(!t.iconSvgInline||"function"!=typeof t.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!t.exec||"function"!=typeof t.exec)throw new Error("Invalid exec function");if("enabled"in t&&"function"!=typeof t.enabled)throw new Error("Invalid enabled function");if("execBatch"in t&&"function"!=typeof t.execBatch)throw new Error("Invalid execBatch function");if("order"in t&&"number"!=typeof t.order)throw new Error("Invalid order");if(void 0!==t.destructive&&"boolean"!=typeof t.destructive)throw new Error("Invalid destructive flag");if("parent"in t&&"string"!=typeof t.parent)throw new Error("Invalid parent");if(t.default&&!Object.values(I).includes(t.default))throw new Error("Invalid default");if("inline"in t&&"function"!=typeof t.inline)throw new Error("Invalid inline function");if("renderInline"in t&&"function"!=typeof t.renderInline)throw new Error("Invalid renderInline function")}}({id:"restore",displayName:()=>(0,m.Tl)("files_trashbin","Restore"),iconSvgInline:()=>'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-history" viewBox="0 0 24 24"><path d="M13.5,8H12V13L16.28,15.54L17,14.33L13.5,12.25V8M13,3A9,9 0 0,0 4,12H1L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3" /></svg>',enabled:(t,e)=>"trashbin"===e.id&&t.length>0&&t.map((t=>t.permissions)).every((t=>!!(t&N.P.READ))),async exec(t){try{const e=(0,Rt.dC)((0,Ct.O0)(`dav/trashbin/${(0,Tt.HW)()?.uid}/restore/${t.basename}`));return await(0,Gt.Ay)({method:"MOVE",url:t.encodedSource,headers:{destination:e}}),(0,Mt.Ic)("files:node:deleted",t),!0}catch(t){return kt.error(t),!1}},async execBatch(t,e,i){return Promise.all(t.map((t=>this.exec(t,e,i))))},order:1,inline:()=>!0}),void 0===window._nc_fileactions&&(window._nc_fileactions=[],N.o.debug("FileActions initialized")),window._nc_fileactions.find((t=>t.id===Ut.id))?N.o.error(`FileAction ${Ut.id} already registered`,{action:Ut}):window._nc_fileactions.push(Ut),(void 0===window._nc_navigation&&(window._nc_navigation=new x,N.o.debug("Navigation service initialized")),window._nc_navigation).register(new class{_view;constructor(t){(function(t){if(!t.id||"string"!=typeof t.id)throw new Error("View id is required and must be a string");if(!t.name||"string"!=typeof t.name)throw new Error("View name is required and must be a string");if("caption"in t&&"string"!=typeof t.caption)throw new Error("View caption must be a string");if(!t.getContents||"function"!=typeof t.getContents)throw new Error("View getContents is required and must be a function");if(!t.icon||"string"!=typeof t.icon||!function(t){if("string"!=typeof t)throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);if(0===(t=t.trim()).length)return!1;if(!0!==rt.XMLValidator.validate(t))return!1;let e;const i=new rt.XMLParser;try{e=i.parse(t)}catch{return!1}return!!e&&!!Object.keys(e).some((t=>"svg"===t.toLowerCase()))}(t.icon))throw new Error("View icon is required and must be a valid svg string");if("order"in t&&"number"!=typeof t.order)throw new Error("View order must be a number");if(t.columns&&t.columns.forEach((t=>{if(!(t instanceof A))throw new Error("View columns must be an array of Column. Invalid column found")})),t.emptyView&&"function"!=typeof t.emptyView)throw new Error("View emptyView must be a function");if(t.parent&&"string"!=typeof t.parent)throw new Error("View parent must be a string");if("sticky"in t&&"boolean"!=typeof t.sticky)throw new Error("View sticky must be a boolean");if("expanded"in t&&"boolean"!=typeof t.expanded)throw new Error("View expanded must be a boolean");if(t.defaultSortKey&&"string"!=typeof t.defaultSortKey)throw new Error("View defaultSortKey must be a string");if(t.loadChildViews&&"function"!=typeof t.loadChildViews)throw new Error("View loadChildViews must be a function")})(t),this._view=t}get id(){return this._view.id}get name(){return this._view.name}get caption(){return this._view.caption}get emptyTitle(){return this._view.emptyTitle}get emptyCaption(){return this._view.emptyCaption}get getContents(){return this._view.getContents}get icon(){return this._view.icon}set icon(t){this._view.icon=t}get order(){return this._view.order}set order(t){this._view.order=t}get params(){return this._view.params}set params(t){this._view.params=t}get columns(){return this._view.columns}get emptyView(){return this._view.emptyView}get parent(){return this._view.parent}get sticky(){return this._view.sticky}get expanded(){return this._view.expanded}set expanded(t){this._view.expanded=t}get defaultSortKey(){return this._view.defaultSortKey}get loadChildViews(){return this._view.loadChildViews}}({id:"trashbin",name:(0,m.Tl)("files_trashbin","Deleted files"),caption:(0,m.Tl)("files_trashbin","List of files that have been deleted."),emptyTitle:(0,m.Tl)("files_trashbin","No deleted files"),emptyCaption:(0,m.Tl)("files_trashbin","Files and folders you have deleted will show up here"),icon:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-delete" viewBox="0 0 24 24"><path d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" /></svg>',order:50,sticky:!0,defaultSortKey:"deleted",columns:jt,getContents:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const e=(await Lt.getDirectoryContents(`${Ot}${t}`,{details:!0,data:$t,includeSelf:!0})).data.map(_t),[i]=e.splice(e.findIndex((e=>e.path===t)),1);return{folder:i,contents:e}}}))},98290:(t,e,i)=>{i.d(e,{A:()=>a});var n=i(71354),r=i.n(n),s=i(76314),o=i.n(s)()(r());o.push([t.id,"/*!\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */.files-list__row-trashbin-original-location{width:150px !important}","",{version:3,sources:["webpack://./apps/files_trashbin/src/trashbin.scss"],names:[],mappings:"AAAA;;;EAAA,CAIA,4CACE,sBAAA",sourcesContent:["/*!\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n.files-list__row-trashbin-original-location {\n width: 150px !important;\n}\n"],sourceRoot:""}]);const a=o}},i={};function n(t){var r=i[t];if(void 0!==r)return r.exports;var s=i[t]={id:t,loaded:!1,exports:{}};return e[t].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.m=e,t=[],n.O=(e,i,r,s)=>{if(!i){var o=1/0;for(c=0;c<t.length;c++){i=t[c][0],r=t[c][1],s=t[c][2];for(var a=!0,l=0;l<i.length;l++)(!1&s||o>=s)&&Object.keys(n.O).every((t=>n.O[t](i[l])))?i.splice(l--,1):(a=!1,s<o&&(o=s));if(a){t.splice(c--,1);var u=r();void 0!==u&&(e=u)}}return e}s=s||0;for(var c=t.length;c>0&&t[c-1][2]>s;c--)t[c]=t[c-1];t[c]=[i,r,s]},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.e=()=>Promise.resolve(),n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n.j=2573,(()=>{n.b=document.baseURI||self.location.href;var t={2573:0};n.O.j=e=>0===t[e];var e=(e,i)=>{var r,s,o=i[0],a=i[1],l=i[2],u=0;if(o.some((e=>0!==t[e]))){for(r in a)n.o(a,r)&&(n.m[r]=a[r]);if(l)var c=l(n)}for(e&&e(i);u<o.length;u++)s=o[u],n.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return n.O(c)},i=self.webpackChunknextcloud=self.webpackChunknextcloud||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})(),n.nc=void 0;var r=n.O(void 0,[4208],(()=>n(43275)));r=n.O(r)})();
//# sourceMappingURL=files_trashbin-init.js.map?v=07580d16127bd1a140a7
|