1
2
|
"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[5810],{35810:(e,t,i)=>{i.d(t,{Al:()=>r.r,By:()=>Z,CP:()=>r.k,E6:()=>_e,Gg:()=>p,H4:()=>r.c,KT:()=>Ie,L3:()=>H,My:()=>Oe,PY:()=>r.b,Q$:()=>r.e,R3:()=>r.n,Ss:()=>ue,Up:()=>K,VI:()=>h,VL:()=>r.l,VP:()=>te,VX:()=>r.j,Y9:()=>Q,Yc:()=>r.i,ZH:()=>r.q,a7:()=>Ee,aX:()=>r.P,bP:()=>r.N,bh:()=>ee,cZ:()=>W,di:()=>we,g5:()=>g,gj:()=>me,hY:()=>E,lJ:()=>r.d,lT:()=>ye,m1:()=>ge,m9:()=>d,nF:()=>Te,pt:()=>r.F,qK:()=>f,sR:()=>z,ur:()=>Re,v7:()=>Ae,vd:()=>r.s,yC:()=>m,zI:()=>r.t,zj:()=>he});var r=i(68896),n=i(380),o=i(83141),a=i(87485),s=i(43627),c=i(53334),l=i(65606),u=i(62045).hp,d=(e=>(e.DEFAULT="default",e.HIDDEN="hidden",e))(d||{});class E{_action;constructor(e){this.validateAction(e),this._action=e}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 hotkey(){return this._action.hotkey}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(e){if(!e.id||"string"!=typeof e.id)throw new Error("Invalid id");if(!e.displayName||"function"!=typeof e.displayName)throw new Error("Invalid displayName function");if("title"in e&&"function"!=typeof e.title)throw new Error("Invalid title function");if(!e.iconSvgInline||"function"!=typeof e.iconSvgInline)throw new Error("Invalid iconSvgInline function");if(!e.exec||"function"!=typeof e.exec)throw new Error("Invalid exec function");if("enabled"in e&&"function"!=typeof e.enabled)throw new Error("Invalid enabled function");if("execBatch"in e&&"function"!=typeof e.execBatch)throw new Error("Invalid execBatch function");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order");if(void 0!==e.destructive&&"boolean"!=typeof e.destructive)throw new Error("Invalid destructive flag");if("parent"in e&&"string"!=typeof e.parent)throw new Error("Invalid parent");if(e.default&&!Object.values(d).includes(e.default))throw new Error("Invalid default");if("inline"in e&&"function"!=typeof e.inline)throw new Error("Invalid inline function");if("renderInline"in e&&"function"!=typeof e.renderInline)throw new Error("Invalid renderInline function");if("hotkey"in e&&void 0!==e.hotkey){if("object"!=typeof e.hotkey)throw new Error("Invalid hotkey configuration");if("string"!=typeof e.hotkey.key||!e.hotkey.key)throw new Error("Missing or invalid hotkey key");if("string"!=typeof e.hotkey.description||!e.hotkey.description)throw new Error("Missing or invalid hotkey description")}}}const p=function(e){void 0===window._nc_fileactions&&(window._nc_fileactions=[],r.o.debug("FileActions initialized")),window._nc_fileactions.find((t=>t.id===e.id))?r.o.error(`FileAction ${e.id} already registered`,{action:e}):window._nc_fileactions.push(e)},f=function(){return void 0===window._nc_fileactions&&(window._nc_fileactions=[],r.o.debug("FileActions initialized")),window._nc_fileactions};class h{_action;constructor(e){this.validateAction(e),this._action=e}get id(){return this._action.id}get displayName(){return this._action.displayName}get iconSvgInline(){return this._action.iconSvgInline}get order(){return this._action.order}get enabled(){return this._action.enabled}get exec(){return this._action.exec}validateAction(e){if(!e.id||"string"!=typeof e.id)throw new Error("Invalid id");if(!e.displayName||"function"!=typeof e.displayName)throw new Error("Invalid displayName function");if("iconSvgInline"in e&&"function"!=typeof e.iconSvgInline)throw new Error("Invalid iconSvgInline function");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order");if("enabled"in e&&"function"!=typeof e.enabled)throw new Error("Invalid enabled function");if(!e.exec||"function"!=typeof e.exec)throw new Error("Invalid exec function")}}const m=e=>{void 0===window._nc_filelistactions&&(window._nc_filelistactions=[]),window._nc_filelistactions.find((t=>t.id===e.id))?r.o.error(`FileListAction with id "${e.id}" is already registered`,{action:e}):window._nc_filelistactions.push(e)},g=()=>(void 0===window._nc_filelistactions&&(window._nc_filelistactions=[]),window._nc_filelistactions);function T(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var w,I,_,N;function v(){if(I)return w;I=1;const e="object"==typeof l&&l.env&&l.env.NODE_DEBUG&&/\bsemver\b/i.test(l.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return w=e}function A(){if(N)return _;N=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return _={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}var y,b,O,R,L,C,D,S,F,P,x,$={exports:{}};function M(){if(D)return C;D=1;const e=v(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:i}=A(),{safeRe:r,t:n}=(y||(y=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:n}=A(),o=v(),a=(t=e.exports={}).re=[],s=t.safeRe=[],c=t.src=[],l=t.t={};let u=0;const d="[a-zA-Z0-9-]",E=[["\\s",1],["\\d",n],[d,r]],p=(e,t,i)=>{const r=(e=>{for(const[t,i]of E)e=e.split(`${t}*`).join(`${t}{0,${i}}`).split(`${t}+`).join(`${t}{1,${i}}`);return e})(t),n=u++;o(e,n,t),l[e]=n,c[n]=t,a[n]=new RegExp(t,i?"g":void 0),s[n]=new RegExp(r,i?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),p("FULL",`^${c[l.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),p("LOOSE",`^${c[l.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),p("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),p("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",c[l.COERCE],!0),p("COERCERTLFULL",c[l.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}($,$.exports)),$.exports),o=function(){if(O)return b;O=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return b=i=>i?"object"!=typeof i?e:i:t}(),{compareIdentifiers:a}=function(){if(L)return R;L=1;const e=/^[0-9]+$/,t=(t,i)=>{const r=e.test(t),n=e.test(i);return r&&n&&(t=+t,i=+i),t===i?0:r&&!n?-1:n&&!r?1:t<i?-1:1};return R={compareIdentifiers:t,rcompareIdentifiers:(e,i)=>t(i,e)}}();class s{constructor(a,c){if(c=o(c),a instanceof s){if(a.loose===!!c.loose&&a.includePrerelease===!!c.includePrerelease)return a;a=a.version}else if("string"!=typeof a)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof a}".`);if(a.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",a,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;const l=a.trim().match(c.loose?r[n.LOOSE]:r[n.FULL]);if(!l)throw new TypeError(`Invalid Version: ${a}`);if(this.raw=a,this.major=+l[1],this.minor=+l[2],this.patch=+l[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");l[4]?this.prerelease=l[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=l[5]?l[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(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof s)){if("string"==typeof t&&t===this.version)return 0;t=new s(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof s||(e=new s(e,this.options)),a(this.major,e.major)||a(this.minor,e.minor)||a(this.patch,e.patch)}comparePre(t){if(t instanceof s||(t=new s(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let i=0;do{const r=this.prerelease[i],n=t.prerelease[i];if(e("prerelease compare",i,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return a(r,n)}while(++i)}compareBuild(t){t instanceof s||(t=new s(t,this.options));let i=0;do{const r=this.build[i],n=t.build[i];if(e("build compare",i,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return a(r,n)}while(++i)}inc(e,t,i){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,i),this.inc("pre",t,i);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,i),this.inc("pre",t,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 e=Number(i)?1:0;if(!t&&!1===i)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===i)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===i&&(r=[t]),0===a(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return C=s}var U=function(){if(x)return P;x=1;const e=function(){if(F)return S;F=1;const e=M();return S=(t,i,r=!1)=>{if(t instanceof e)return t;try{return new e(t,i)}catch(e){if(!r)return null;throw e}}}();return P=(t,i)=>{const r=e(t,i);return r?r.version:null}}();const G=/^(1171|5928)$/.test(i.j)?T(U):null;var B,V,X=function(){if(V)return B;V=1;const e=M();return B=(t,i)=>new e(t,i).major}();const k=/^(1171|5928)$/.test(i.j)?T(X):null;class j{bus;constructor(e){"function"==typeof e.getVersion&&G(e.getVersion())?k(e.getVersion())!==k(this.getVersion())&&console.warn("Proxying an event bus of version "+e.getVersion()+" with "+this.getVersion()):console.warn("Proxying an event bus with an unknown or invalid version"),this.bus=e}getVersion(){return"3.3.2"}subscribe(e,t){this.bus.subscribe(e,t)}unsubscribe(e,t){this.bus.unsubscribe(e,t)}emit(e,...t){this.bus.emit(e,...t)}}class Y{handlers=new Map;getVersion(){return"3.3.2"}subscribe(e,t){this.handlers.set(e,(this.handlers.get(e)||[]).concat(t))}unsubscribe(e,t){this.handlers.set(e,(this.handlers.get(e)||[]).filter((e=>e!==t)))}emit(e,...t){(this.handlers.get(e)||[]).forEach((e=>{try{e(t[0])}catch(e){console.error("could not invoke event listener",e)}}))}}let q=null;class H extends n.m{id;order;constructor(e,t=100){super(),this.id=e,this.order=t}filter(e){throw new Error("Not implemented")}updateChips(e){this.dispatchTypedEvent("update:chips",new CustomEvent("update:chips",{detail:e}))}filterUpdated(){this.dispatchTypedEvent("update:filter",new CustomEvent("update:filter"))}}function W(e){if(window._nc_filelist_filters||(window._nc_filelist_filters=new Map),window._nc_filelist_filters.has(e.id))throw new Error(`File list filter "${e.id}" already registered`);window._nc_filelist_filters.set(e.id,e),function(e,...t){(null!==q?q:"undefined"==typeof window?new Proxy({},{get:()=>()=>console.error("Window not available, EventBus can not be established!")}):(window.OC?._eventBus&&void 0===window._nc_event_bus&&(console.warn("found old event bus instance at OC._eventBus. Update your version!"),window._nc_event_bus=window.OC._eventBus),q=void 0!==window?._nc_event_bus?new j(window._nc_event_bus):window._nc_event_bus=new Y,q)).emit(e,...t)}("files:filter:added",e)}function z(){return window._nc_filelist_filters?[...window._nc_filelist_filters.values()]:[]}class Q{_header;constructor(e){this.validateHeader(e),this._header=e}get id(){return this._header.id}get order(){return this._header.order}get enabled(){return this._header.enabled}get render(){return this._header.render}get updated(){return this._header.updated}validateHeader(e){if(!e.id||!e.render||!e.updated)throw new Error("Invalid header: id, render and updated are required");if("string"!=typeof e.id)throw new Error("Invalid id property");if(void 0!==e.enabled&&"function"!=typeof e.enabled)throw new Error("Invalid enabled property");if(e.render&&"function"!=typeof e.render)throw new Error("Invalid render property");if(e.updated&&"function"!=typeof e.updated)throw new Error("Invalid updated property")}}const K=function(e){void 0===window._nc_filelistheader&&(window._nc_filelistheader=[],r.o.debug("FileListHeaders initialized")),window._nc_filelistheader.find((t=>t.id===e.id))?r.o.error(`Header ${e.id} already registered`,{header:e}):window._nc_filelistheader.push(e)},Z=function(){return void 0===window._nc_filelistheader&&(window._nc_filelistheader=[],r.o.debug("FileListHeaders initialized")),window._nc_filelistheader};class J extends(/^(2(573|766|882)|1171|1873|5102|5928)$/.test(i.j)?n.m:null){_views=[];_currentView=null;register(e){if(this._views.find((t=>t.id===e.id)))throw new Error(`View id ${e.id} is already registered`);this._views.push(e),this.dispatchTypedEvent("update",new CustomEvent("update"))}remove(e){const t=this._views.findIndex((t=>t.id===e));-1!==t&&(this._views.splice(t,1),this.dispatchTypedEvent("update",new CustomEvent("update")))}setActive(e){this._currentView=e;const t=new CustomEvent("updateActive",{detail:e});this.dispatchTypedEvent("updateActive",t)}get active(){return this._currentView}get views(){return this._views}}const ee=function(){return void 0===window._nc_navigation&&(window._nc_navigation=new J,r.o.debug("Navigation service initialized")),window._nc_navigation};class te{_column;constructor(e){ie(e),this._column=e}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 ie=function(e){if(!e.id||"string"!=typeof e.id)throw new Error("A column id is required");if(!e.title||"string"!=typeof e.title)throw new Error("A column title is required");if(!e.render||"function"!=typeof e.render)throw new Error("A render function is required");if(e.sort&&"function"!=typeof e.sort)throw new Error("Column sortFunction must be a function");if(e.summary&&"function"!=typeof e.summary)throw new Error("Column summary must be a function");return!0};var re,ne={},oe=(re||(re=1,function(e){e.parser=function(e,t){return new r(e,t)},e.SAXParser=r,e.SAXStream=a,e.createStream=function(e,t){return new a(e,t)},e.MAX_BUFFER_LENGTH=65536;var t,i=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function r(t,n){if(!(this instanceof r))return new r(t,n);var o=this;!function(e){for(var t=0,r=i.length;t<r;t++)e[i[t]]=""}(o),o.q=o.c="",o.bufferCheckPosition=e.MAX_BUFFER_LENGTH,o.opt=n||{},o.opt.lowercase=o.opt.lowercase||o.opt.lowercasetags,o.looseCase=o.opt.lowercase?"toLowerCase":"toUpperCase",o.tags=[],o.closed=o.closedRoot=o.sawRoot=!1,o.tag=o.error=null,o.strict=!!t,o.noscript=!(!t&&!o.opt.noscript),o.state=y.BEGIN,o.strictEntities=o.opt.strictEntities,o.ENTITIES=o.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),o.attribList=[],o.opt.xmlns&&(o.ns=Object.create(E)),void 0===o.opt.unquotedAttributeValues&&(o.opt.unquotedAttributeValues=!t),o.trackPosition=!1!==o.opt.position,o.trackPosition&&(o.position=o.line=o.column=0),O(o,"onready")}e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}return t.prototype=e,new t}),Object.keys||(Object.keys=function(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i);return t}),r.prototype={end:function(){S(this)},write:function(t){var r=this;if(this.error)throw this.error;if(r.closed)return D(r,"Cannot write after close. Assign an onready handler.");if(null===t)return S(r);"object"==typeof t&&(t=t.toString());for(var n=0,o="";o=V(t,n++),r.c=o,o;)switch(r.trackPosition&&(r.position++,"\n"===o?(r.line++,r.column=0):r.column++),r.state){case y.BEGIN:if(r.state=y.BEGIN_WHITESPACE,"\ufeff"===o)continue;B(r,o);continue;case y.BEGIN_WHITESPACE:B(r,o);continue;case y.TEXT:if(r.sawRoot&&!r.closedRoot){for(var a=n-1;o&&"<"!==o&&"&"!==o;)(o=V(t,n++))&&r.trackPosition&&(r.position++,"\n"===o?(r.line++,r.column=0):r.column++);r.textNode+=t.substring(a,n-1)}"<"!==o||r.sawRoot&&r.closedRoot&&!r.strict?(g(o)||r.sawRoot&&!r.closedRoot||F(r,"Text data outside of root node."),"&"===o?r.state=y.TEXT_ENTITY:r.textNode+=o):(r.state=y.OPEN_WAKA,r.startTagPosition=r.position);continue;case y.SCRIPT:"<"===o?r.state=y.SCRIPT_ENDING:r.script+=o;continue;case y.SCRIPT_ENDING:"/"===o?r.state=y.CLOSE_TAG:(r.script+="<"+o,r.state=y.SCRIPT);continue;case y.OPEN_WAKA:if("!"===o)r.state=y.SGML_DECL,r.sgmlDecl="";else if(g(o));else if(I(p,o))r.state=y.OPEN_TAG,r.tagName=o;else if("/"===o)r.state=y.CLOSE_TAG,r.tagName="";else if("?"===o)r.state=y.PROC_INST,r.procInstName=r.procInstBody="";else{if(F(r,"Unencoded <"),r.startTagPosition+1<r.position){var l=r.position-r.startTagPosition;o=new Array(l).join(" ")+o}r.textNode+="<"+o,r.state=y.TEXT}continue;case y.SGML_DECL:if(r.sgmlDecl+o==="--"){r.state=y.COMMENT,r.comment="",r.sgmlDecl="";continue}r.doctype&&!0!==r.doctype&&r.sgmlDecl?(r.state=y.DOCTYPE_DTD,r.doctype+="<!"+r.sgmlDecl+o,r.sgmlDecl=""):(r.sgmlDecl+o).toUpperCase()===s?(R(r,"onopencdata"),r.state=y.CDATA,r.sgmlDecl="",r.cdata=""):(r.sgmlDecl+o).toUpperCase()===c?(r.state=y.DOCTYPE,(r.doctype||r.sawRoot)&&F(r,"Inappropriately located doctype declaration"),r.doctype="",r.sgmlDecl=""):">"===o?(R(r,"onsgmldeclaration",r.sgmlDecl),r.sgmlDecl="",r.state=y.TEXT):T(o)?(r.state=y.SGML_DECL_QUOTED,r.sgmlDecl+=o):r.sgmlDecl+=o;continue;case y.SGML_DECL_QUOTED:o===r.q&&(r.state=y.SGML_DECL,r.q=""),r.sgmlDecl+=o;continue;case y.DOCTYPE:">"===o?(r.state=y.TEXT,R(r,"ondoctype",r.doctype),r.doctype=!0):(r.doctype+=o,"["===o?r.state=y.DOCTYPE_DTD:T(o)&&(r.state=y.DOCTYPE_QUOTED,r.q=o));continue;case y.DOCTYPE_QUOTED:r.doctype+=o,o===r.q&&(r.q="",r.state=y.DOCTYPE);continue;case y.DOCTYPE_DTD:"]"===o?(r.doctype+=o,r.state=y.DOCTYPE):"<"===o?(r.state=y.OPEN_WAKA,r.startTagPosition=r.position):T(o)?(r.doctype+=o,r.state=y.DOCTYPE_DTD_QUOTED,r.q=o):r.doctype+=o;continue;case y.DOCTYPE_DTD_QUOTED:r.doctype+=o,o===r.q&&(r.state=y.DOCTYPE_DTD,r.q="");continue;case y.COMMENT:"-"===o?r.state=y.COMMENT_ENDING:r.comment+=o;continue;case y.COMMENT_ENDING:"-"===o?(r.state=y.COMMENT_ENDED,r.comment=C(r.opt,r.comment),r.comment&&R(r,"oncomment",r.comment),r.comment=""):(r.comment+="-"+o,r.state=y.COMMENT);continue;case y.COMMENT_ENDED:">"!==o?(F(r,"Malformed comment"),r.comment+="--"+o,r.state=y.COMMENT):r.doctype&&!0!==r.doctype?r.state=y.DOCTYPE_DTD:r.state=y.TEXT;continue;case y.CDATA:"]"===o?r.state=y.CDATA_ENDING:r.cdata+=o;continue;case y.CDATA_ENDING:"]"===o?r.state=y.CDATA_ENDING_2:(r.cdata+="]"+o,r.state=y.CDATA);continue;case y.CDATA_ENDING_2:">"===o?(r.cdata&&R(r,"oncdata",r.cdata),R(r,"onclosecdata"),r.cdata="",r.state=y.TEXT):"]"===o?r.cdata+="]":(r.cdata+="]]"+o,r.state=y.CDATA);continue;case y.PROC_INST:"?"===o?r.state=y.PROC_INST_ENDING:g(o)?r.state=y.PROC_INST_BODY:r.procInstName+=o;continue;case y.PROC_INST_BODY:if(!r.procInstBody&&g(o))continue;"?"===o?r.state=y.PROC_INST_ENDING:r.procInstBody+=o;continue;case y.PROC_INST_ENDING:">"===o?(R(r,"onprocessinginstruction",{name:r.procInstName,body:r.procInstBody}),r.procInstName=r.procInstBody="",r.state=y.TEXT):(r.procInstBody+="?"+o,r.state=y.PROC_INST_BODY);continue;case y.OPEN_TAG:I(f,o)?r.tagName+=o:(P(r),">"===o?M(r):"/"===o?r.state=y.OPEN_TAG_SLASH:(g(o)||F(r,"Invalid character in tag name"),r.state=y.ATTRIB));continue;case y.OPEN_TAG_SLASH:">"===o?(M(r,!0),U(r)):(F(r,"Forward-slash in opening tag not followed by >"),r.state=y.ATTRIB);continue;case y.ATTRIB:if(g(o))continue;">"===o?M(r):"/"===o?r.state=y.OPEN_TAG_SLASH:I(p,o)?(r.attribName=o,r.attribValue="",r.state=y.ATTRIB_NAME):F(r,"Invalid attribute name");continue;case y.ATTRIB_NAME:"="===o?r.state=y.ATTRIB_VALUE:">"===o?(F(r,"Attribute without value"),r.attribValue=r.attribName,$(r),M(r)):g(o)?r.state=y.ATTRIB_NAME_SAW_WHITE:I(f,o)?r.attribName+=o:F(r,"Invalid attribute name");continue;case y.ATTRIB_NAME_SAW_WHITE:if("="===o)r.state=y.ATTRIB_VALUE;else{if(g(o))continue;F(r,"Attribute without value"),r.tag.attributes[r.attribName]="",r.attribValue="",R(r,"onattribute",{name:r.attribName,value:""}),r.attribName="",">"===o?M(r):I(p,o)?(r.attribName=o,r.state=y.ATTRIB_NAME):(F(r,"Invalid attribute name"),r.state=y.ATTRIB)}continue;case y.ATTRIB_VALUE:if(g(o))continue;T(o)?(r.q=o,r.state=y.ATTRIB_VALUE_QUOTED):(r.opt.unquotedAttributeValues||D(r,"Unquoted attribute value"),r.state=y.ATTRIB_VALUE_UNQUOTED,r.attribValue=o);continue;case y.ATTRIB_VALUE_QUOTED:if(o!==r.q){"&"===o?r.state=y.ATTRIB_VALUE_ENTITY_Q:r.attribValue+=o;continue}$(r),r.q="",r.state=y.ATTRIB_VALUE_CLOSED;continue;case y.ATTRIB_VALUE_CLOSED:g(o)?r.state=y.ATTRIB:">"===o?M(r):"/"===o?r.state=y.OPEN_TAG_SLASH:I(p,o)?(F(r,"No whitespace between attributes"),r.attribName=o,r.attribValue="",r.state=y.ATTRIB_NAME):F(r,"Invalid attribute name");continue;case y.ATTRIB_VALUE_UNQUOTED:if(!w(o)){"&"===o?r.state=y.ATTRIB_VALUE_ENTITY_U:r.attribValue+=o;continue}$(r),">"===o?M(r):r.state=y.ATTRIB;continue;case y.CLOSE_TAG:if(r.tagName)">"===o?U(r):I(f,o)?r.tagName+=o:r.script?(r.script+="</"+r.tagName,r.tagName="",r.state=y.SCRIPT):(g(o)||F(r,"Invalid tagname in closing tag"),r.state=y.CLOSE_TAG_SAW_WHITE);else{if(g(o))continue;_(p,o)?r.script?(r.script+="</"+o,r.state=y.SCRIPT):F(r,"Invalid tagname in closing tag."):r.tagName=o}continue;case y.CLOSE_TAG_SAW_WHITE:if(g(o))continue;">"===o?U(r):F(r,"Invalid characters in closing tag");continue;case y.TEXT_ENTITY:case y.ATTRIB_VALUE_ENTITY_Q:case y.ATTRIB_VALUE_ENTITY_U:var u,d;switch(r.state){case y.TEXT_ENTITY:u=y.TEXT,d="textNode";break;case y.ATTRIB_VALUE_ENTITY_Q:u=y.ATTRIB_VALUE_QUOTED,d="attribValue";break;case y.ATTRIB_VALUE_ENTITY_U:u=y.ATTRIB_VALUE_UNQUOTED,d="attribValue"}if(";"===o){var E=G(r);r.opt.unparsedEntities&&!Object.values(e.XML_ENTITIES).includes(E)?(r.entity="",r.state=u,r.write(E)):(r[d]+=E,r.entity="",r.state=u)}else I(r.entity.length?m:h,o)?r.entity+=o:(F(r,"Invalid character in entity name"),r[d]+="&"+r.entity+o,r.entity="",r.state=u);continue;default:throw new Error(r,"Unknown state: "+r.state)}return r.position>=r.bufferCheckPosition&&function(t){for(var r=Math.max(e.MAX_BUFFER_LENGTH,10),n=0,o=0,a=i.length;o<a;o++){var s=t[i[o]].length;if(s>r)switch(i[o]){case"textNode":L(t);break;case"cdata":R(t,"oncdata",t.cdata),t.cdata="";break;case"script":R(t,"onscript",t.script),t.script="";break;default:D(t,"Max buffer length exceeded: "+i[o])}n=Math.max(n,s)}var c=e.MAX_BUFFER_LENGTH-n;t.bufferCheckPosition=c+t.position}(r),r},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;L(e=this),""!==e.cdata&&(R(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(R(e,"onscript",e.script),e.script="")}};try{t=require("stream").Stream}catch(e){t=function(){}}t||(t=function(){});var n=e.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));function a(e,i){if(!(this instanceof a))return new a(e,i);t.apply(this),this._parser=new r(e,i),this.writable=!0,this.readable=!0;var o=this;this._parser.onend=function(){o.emit("end")},this._parser.onerror=function(e){o.emit("error",e),o._parser.error=null},this._decoder=null,n.forEach((function(e){Object.defineProperty(o,"on"+e,{get:function(){return o._parser["on"+e]},set:function(t){if(!t)return o.removeAllListeners(e),o._parser["on"+e]=t,t;o.on(e,t)},enumerable:!0,configurable:!1})}))}a.prototype=Object.create(t.prototype,{constructor:{value:a}}),a.prototype.write=function(e){if("function"==typeof u&&"function"==typeof u.isBuffer&&u.isBuffer(e)){if(!this._decoder){var t=o.I;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},a.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},a.prototype.on=function(e,i){var r=this;return r._parser["on"+e]||-1===n.indexOf(e)||(r._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),r.emit.apply(r,t)}),t.prototype.on.call(r,e,i)};var s="[CDATA[",c="DOCTYPE",l="http://www.w3.org/XML/1998/namespace",d="http://www.w3.org/2000/xmlns/",E={xml:l,xmlns:d},p=/[:_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]/,f=/[:_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-]/,h=/[#:_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]/,m=/[#:_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 g(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function T(e){return'"'===e||"'"===e}function w(e){return">"===e||g(e)}function I(e,t){return e.test(t)}function _(e,t){return!I(e,t)}var N,v,A,y=0;for(var b in e.STATE={BEGIN:y++,BEGIN_WHITESPACE:y++,TEXT:y++,TEXT_ENTITY:y++,OPEN_WAKA:y++,SGML_DECL:y++,SGML_DECL_QUOTED:y++,DOCTYPE:y++,DOCTYPE_QUOTED:y++,DOCTYPE_DTD:y++,DOCTYPE_DTD_QUOTED:y++,COMMENT_STARTING:y++,COMMENT:y++,COMMENT_ENDING:y++,COMMENT_ENDED:y++,CDATA:y++,CDATA_ENDING:y++,CDATA_ENDING_2:y++,PROC_INST:y++,PROC_INST_BODY:y++,PROC_INST_ENDING:y++,OPEN_TAG:y++,OPEN_TAG_SLASH:y++,ATTRIB:y++,ATTRIB_NAME:y++,ATTRIB_NAME_SAW_WHITE:y++,ATTRIB_VALUE:y++,ATTRIB_VALUE_QUOTED:y++,ATTRIB_VALUE_CLOSED:y++,ATTRIB_VALUE_UNQUOTED:y++,ATTRIB_VALUE_ENTITY_Q:y++,ATTRIB_VALUE_ENTITY_U:y++,CLOSE_TAG:y++,CLOSE_TAG_SAW_WHITE:y++,SCRIPT:y++,SCRIPT_ENDING:y++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.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(e.ENTITIES).forEach((function(t){var i=e.ENTITIES[t],r="number"==typeof i?String.fromCharCode(i):i;e.ENTITIES[t]=r})),e.STATE)e.STATE[e.STATE[b]]=b;function O(e,t,i){e[t]&&e[t](i)}function R(e,t,i){e.textNode&&L(e),O(e,t,i)}function L(e){e.textNode=C(e.opt,e.textNode),e.textNode&&O(e,"ontext",e.textNode),e.textNode=""}function C(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function D(e,t){return L(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,O(e,"onerror",t),e}function S(e){return e.sawRoot&&!e.closedRoot&&F(e,"Unclosed root tag"),e.state!==y.BEGIN&&e.state!==y.BEGIN_WHITESPACE&&e.state!==y.TEXT&&D(e,"Unexpected end"),L(e),e.c="",e.closed=!0,O(e,"onend"),r.call(e,e.strict,e.opt),e}function F(e,t){if("object"!=typeof e||!(e instanceof r))throw new Error("bad call to strictFail");e.strict&&D(e,t)}function P(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,i=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(i.ns=t.ns),e.attribList.length=0,R(e,"onopentagstart",i)}function x(e,t){var i=e.indexOf(":")<0?["",e]:e.split(":"),r=i[0],n=i[1];return t&&"xmlns"===e&&(r="xmlns",n=""),{prefix:r,local:n}}function $(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=x(e.attribName,!0),i=t.prefix,r=t.local;if("xmlns"===i)if("xml"===r&&e.attribValue!==l)F(e,"xml: prefix must be bound to "+l+"\nActual: "+e.attribValue);else if("xmlns"===r&&e.attribValue!==d)F(e,"xmlns: prefix must be bound to "+d+"\nActual: "+e.attribValue);else{var n=e.tag,o=e.tags[e.tags.length-1]||e;n.ns===o.ns&&(n.ns=Object.create(o.ns)),n.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,R(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function M(e,t){if(e.opt.xmlns){var i=e.tag,r=x(e.tagName);i.prefix=r.prefix,i.local=r.local,i.uri=i.ns[r.prefix]||"",i.prefix&&!i.uri&&(F(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),i.uri=r.prefix);var n=e.tags[e.tags.length-1]||e;i.ns&&n.ns!==i.ns&&Object.keys(i.ns).forEach((function(t){R(e,"onopennamespace",{prefix:t,uri:i.ns[t]})}));for(var o=0,a=e.attribList.length;o<a;o++){var s=e.attribList[o],c=s[0],l=s[1],u=x(c,!0),d=u.prefix,E=u.local,p=""===d?"":i.ns[d]||"",f={name:c,value:l,prefix:d,local:E,uri:p};d&&"xmlns"!==d&&!p&&(F(e,"Unbound namespace prefix: "+JSON.stringify(d)),f.uri=d),e.tag.attributes[c]=f,R(e,"onattribute",f)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),R(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=y.TEXT:e.state=y.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function U(e){if(!e.tagName)return F(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=y.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=y.SCRIPT);R(e,"onscript",e.script),e.script=""}var t=e.tags.length,i=e.tagName;e.strict||(i=i[e.looseCase]());for(var r=i;t--&&e.tags[t].name!==r;)F(e,"Unexpected close tag");if(t<0)return F(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=y.TEXT);e.tagName=i;for(var n=e.tags.length;n-- >t;){var o=e.tag=e.tags.pop();e.tagName=e.tag.name,R(e,"onclosetag",e.tagName);var a={};for(var s in o.ns)a[s]=o.ns[s];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&o.ns!==c.ns&&Object.keys(o.ns).forEach((function(t){var i=o.ns[t];R(e,"onclosenamespace",{prefix:t,uri:i})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=y.TEXT}function G(e){var t,i=e.entity,r=i.toLowerCase(),n="";return e.ENTITIES[i]?e.ENTITIES[i]:e.ENTITIES[r]?e.ENTITIES[r]:("#"===(i=r).charAt(0)&&("x"===i.charAt(1)?(i=i.slice(2),n=(t=parseInt(i,16)).toString(16)):(i=i.slice(1),n=(t=parseInt(i,10)).toString(10))),i=i.replace(/^0+/,""),isNaN(t)||n.toLowerCase()!==i?(F(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function B(e,t){"<"===t?(e.state=y.OPEN_WAKA,e.startTagPosition=e.position):g(t)||(F(e,"Non-whitespace before first tag."),e.textNode=t,e.state=y.TEXT)}function V(e,t){var i="";return t<e.length&&(i=e.charAt(t)),i}y=e.STATE,String.fromCodePoint||(N=String.fromCharCode,v=Math.floor,A=function(){var e,t,i=[],r=-1,n=arguments.length;if(!n)return"";for(var o="";++r<n;){var a=Number(arguments[r]);if(!isFinite(a)||a<0||a>1114111||v(a)!==a)throw RangeError("Invalid code point: "+a);a<=65535?i.push(a):(e=55296+((a-=65536)>>10),t=a%1024+56320,i.push(e,t)),(r+1===n||i.length>16384)&&(o+=N.apply(null,i),i.length=0)}return o},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:A,configurable:!0,writable:!0}):String.fromCodePoint=A)}(ne)),ne);const ae=/^(2(573|766|882)|1171|1873|5102|5928)$/.test(i.j)?T(oe):null,se={"http://www.w3.org/2000/svg":{ext:"svg",mime:"image/svg+xml"},"http://www.w3.org/1999/xhtml":{ext:"xhtml",mime:"application/xhtml+xml"},"http://www.opengis.net/kml/2.2":{ext:"kml",mime:"application/vnd.google-earth.kml+xml"},"http://www.opengis.net/gml":{ext:"gml",mime:"application/gml+xml"}},ce={rss:{ext:"rss",mime:"application/rss+xml"},"score-partwise":{ext:"musicxml",mime:"application/vnd.recordare.musicxml+xml"},svg:{ext:"svg",mime:"image/svg+xml"}};class le{constructor(e){this.options=e??{},this.firstTag=!0,this.onEnd=!1,this.parser=ae.parser(!0,{xmlns:!0}),this.nesting=0,this.parser.onerror=e=>{e.message.startsWith("Invalid character entity")||(this.fileType=void 0,this.onEnd=!0)},this.parser.onopentag=e=>{++this.nesting,this.firstTag&&!this.onEnd&&(this.firstTag=!1,e.uri?this.fileType=se[e.uri]:e.name&&(this.fileType=ce[e.name.toLowerCase()]),this.fileType&&!this.options.fullScan&&(this.onEnd=!0))},this.parser.onclosetag=()=>{--this.nesting}}write(e){this.parser.write(e)}close(){this.parser.close(),this.onEnd=!0}isValid(){return 0===this.nesting}}class ue{_view;constructor(e){de(e),this._view=e}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 hidden(){return this._view.hidden}get icon(){return this._view.icon}set icon(e){this._view.icon=e}get order(){return this._view.order}set order(e){this._view.order=e}get params(){return this._view.params}set params(e){this._view.params=e}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(e){this._view.expanded=e}get defaultSortKey(){return this._view.defaultSortKey}get loadChildViews(){return this._view.loadChildViews}}const de=function(e){if(!e.id||"string"!=typeof e.id)throw new Error("View id is required and must be a string");if(!e.name||"string"!=typeof e.name)throw new Error("View name is required and must be a string");if("caption"in e&&"string"!=typeof e.caption)throw new Error("View caption must be a string");if(!e.getContents||"function"!=typeof e.getContents)throw new Error("View getContents is required and must be a function");if("hidden"in e&&"boolean"!=typeof e.hidden)throw new Error("View hidden must be a boolean");if(!e.icon||"string"!=typeof e.icon||!function(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);if(0===(e=e.trim()).length)return!1;const t=new le;return t.write(e),t.isValid()&&"svg"===t.fileType?.ext}(e.icon))throw new Error("View icon is required and must be a valid svg string");if("order"in e&&"number"!=typeof e.order)throw new Error("View order must be a number");if(e.columns&&e.columns.forEach((e=>{if(!(e instanceof te))throw new Error("View columns must be an array of Column. Invalid column found")})),e.emptyView&&"function"!=typeof e.emptyView)throw new Error("View emptyView must be a function");if(e.parent&&"string"!=typeof e.parent)throw new Error("View parent must be a string");if("sticky"in e&&"boolean"!=typeof e.sticky)throw new Error("View sticky must be a boolean");if("expanded"in e&&"boolean"!=typeof e.expanded)throw new Error("View expanded must be a boolean");if(e.defaultSortKey&&"string"!=typeof e.defaultSortKey)throw new Error("View defaultSortKey must be a string");if(e.loadChildViews&&"function"!=typeof e.loadChildViews)throw new Error("View loadChildViews must be a function");return!0};var Ee=(e=>(e[e.UploadFromDevice=0]="UploadFromDevice",e[e.CreateNew=1]="CreateNew",e[e.Other=2]="Other",e))(Ee||{});class pe{_entries=[];registerEntry(e){this.validateEntry(e),e.category=e.category??1,this._entries.push(e)}unregisterEntry(e){const t="string"==typeof e?this.getEntryIndex(e):this.getEntryIndex(e.id);-1!==t?this._entries.splice(t,1):r.o.warn("Entry not found, nothing removed",{entry:e,entries:this.getEntries()})}getEntries(e){return e?this._entries.filter((t=>"function"!=typeof t.enabled||t.enabled(e))):this._entries}getEntryIndex(e){return this._entries.findIndex((t=>t.id===e))}validateEntry(e){if(!e.id||!e.displayName||!e.iconSvgInline&&!e.iconClass||!e.handler)throw new Error("Invalid entry");if("string"!=typeof e.id||"string"!=typeof e.displayName)throw new Error("Invalid id or displayName property");if(e.iconClass&&"string"!=typeof e.iconClass||e.iconSvgInline&&"string"!=typeof e.iconSvgInline)throw new Error("Invalid icon provided");if(void 0!==e.enabled&&"function"!=typeof e.enabled)throw new Error("Invalid enabled property");if("function"!=typeof e.handler)throw new Error("Invalid handler property");if("order"in e&&"number"!=typeof e.order)throw new Error("Invalid order property");if(-1!==this.getEntryIndex(e.id))throw new Error("Duplicate entry")}}function fe(){return void 0===window._nc_newfilemenu&&(window._nc_newfilemenu=new pe,r.o.debug("NewFileMenu initialized")),window._nc_newfilemenu}function he(e){return fe().registerEntry(e)}function me(e){return fe().unregisterEntry(e)}function ge(e){return fe().getEntries(e).sort(((e,t)=>void 0!==e.order&&void 0!==t.order&&e.order!==t.order?e.order-t.order:e.displayName.localeCompare(t.displayName,void 0,{numeric:!0,sensitivity:"base"})))}var Te=(e=>(e.ReservedName="reserved name",e.Character="character",e.Extension="extension",e))(Te||{});class we extends Error{constructor(e){super(`Invalid ${e.reason} '${e.segment}' in filename '${e.filename}'`,{cause:e})}get filename(){return this.cause.filename}get reason(){return this.cause.reason}get segment(){return this.cause.segment}}function Ie(e){const t=(0,a.F)().files,i=t.forbidden_filename_characters??window._oc_config?.forbidden_filenames_characters??["/","\\"];for(const t of i)if(e.includes(t))throw new we({segment:t,reason:"character",filename:e});if(e=e.toLocaleLowerCase(),(t.forbidden_filenames??[".htaccess"]).includes(e))throw new we({filename:e,segment:e,reason:"reserved name"});const r=e.indexOf(".",1),n=e.substring(0,-1===r?void 0:r);if((t.forbidden_filename_basenames??[]).includes(n))throw new we({filename:e,segment:n,reason:"reserved name"});const o=t.forbidden_filename_extensions??[".part",".filepart"];for(const t of o)if(e.length>t.length&&e.endsWith(t))throw new we({segment:t,reason:"extension",filename:e})}function _e(e,t,i){const r={suffix:e=>`(${e})`,ignoreFileExtension:!1,...i};let n=e,o=1;for(;t.includes(n);){const t=r.ignoreFileExtension?"":(0,s.extname)(e);n=`${(0,s.basename)(e,t)} ${r.suffix(o++)}${t}`}return n}const Ne=["B","KB","MB","GB","TB","PB"],ve=["B","KiB","MiB","GiB","TiB","PiB"];function Ae(e,t=!1,i=!1,r=!1){i=i&&!r,"string"==typeof e&&(e=Number(e));let n=e>0?Math.floor(Math.log(e)/Math.log(r?1e3:1024)):0;n=Math.min((i?ve.length:Ne.length)-1,n);const o=i?ve[n]:Ne[n];let a=(e/Math.pow(r?1e3:1024,n)).toFixed(1);return!0===t&&0===n?("0.0"!==a?"< 1 ":"0 ")+(i?ve[1]:Ne[1]):(a=n<2?parseFloat(a).toFixed(0):parseFloat(a).toLocaleString((0,c.lO)()),a+" "+o)}function ye(e,t=!1){try{e=`${e}`.toLocaleLowerCase().replaceAll(/\s+/g,"").replaceAll(",",".")}catch(e){return null}const i=e.match(/^([0-9]*(\.[0-9]*)?)([kmgtp]?)(i?)b?$/);if(null===i||"."===i[1]||""===i[1])return null;const r=`${i[1]}`,n="i"===i[4]||t?1024:1e3;return Math.round(Number.parseFloat(r)*n**{"":0,k:1,m:2,g:3,t:4,p:5,e:6}[i[3]])}function be(e){return e instanceof Date?e.toISOString():String(e)}function Oe(e,t,i){i=i??[];const r=(t=t??[e=>e]).map(((e,t)=>"asc"===(i[t]??"asc")?1:-1)),n=Intl.Collator([(0,c.Z0)(),(0,c.lO)()],{numeric:!0,usage:"sort"});return[...e].sort(((e,i)=>{for(const[o,a]of t.entries()){const t=n.compare(be(a(e)),be(a(i)));if(0!==t)return t*r[o]}return 0}))}function Re(e,t={}){const i={sortingMode:"basename",sortingOrder:"asc",...t};return Oe(e,[...i.sortFavoritesFirst?[e=>1!==e.attributes?.favorite]:[],...i.sortFoldersFirst?[e=>"folder"!==e.type]:[],..."basename"!==i.sortingMode?[e=>e[i.sortingMode]??e.attributes[i.sortingMode]]:[],e=>{return(t=e.displayname||e.attributes?.displayname||e.basename||"").lastIndexOf(".")>0?t.slice(0,t.lastIndexOf(".")):t;var t},e=>e.basename],[...i.sortFavoritesFirst?["asc"]:[],...i.sortFoldersFirst?["asc"]:[],..."mtime"===i.sortingMode?["asc"===i.sortingOrder?"desc":"asc"]:[],..."mtime"!==i.sortingMode&&"basename"!==i.sortingMode?[i.sortingOrder]:[],i.sortingOrder,i.sortingOrder])}}}]);
//# sourceMappingURL=5810-5810.js.map?v=e0ecfcd31fb108c51bfd
|