/*! For license information please see comments-comments.js.LICENSE.txt */
!function(){var t,e={4921:function(){OCA.Comments.ActivityTabViewPlugin={prepareModelForDisplay:function(t,e,n){if("comments"===t.get("app")&&"comments"===t.get("type")&&"ActivityTabView"===n&&(e.addClass("comment"),t.get("message")&&this._isLong(t.get("message")))){e.addClass("collapsed");var r=$("
").addClass("message-overlay");e.find(".activitymessage").after(r),e.on("click",this._onClickCollapsedComment)}},_onClickCollapsedComment:function(t){var e=$(t.target);e.is(".comment")||(e=e.closest(".comment")),e.removeClass("collapsed")},_isLong:function(t){return t.length>250||(t.match(/\n/g)||[]).length>1}},OC.Plugins.register("OCA.Activity.RenderingPlugins",OCA.Comments.ActivityTabViewPlugin)},75387:function(){OCA.Comments||(OCA.Comments={})},63607:function(t,e,n){"use strict";n(75387),n(4543),n(4921);var r=n(77958),o=n(17499),i=n(31352),a=(n(62520),n(79753));n(14596),n(26721);const s=null===(u=(0,r.ts)())?(0,o.IY)().setApp("files").build():(0,o.IY)().setApp("files").setUid(u.uid).build();var u,c=(t=>(t.DEFAULT="default",t.HIDDEN="hidden",t))(c||{}),l=(t=>(t[t.NONE=0]="NONE",t[t.CREATE=4]="CREATE",t[t.READ=1]="READ",t[t.UPDATE=2]="UPDATE",t[t.DELETE=8]="DELETE",t[t.SHARE=16]="SHARE",t[t.ALL=31]="ALL",t))(l||{}),f=(t=>(t.Folder="folder",t.File="file",t))(f||{}),h=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(h||{});(0,a.generateRemoteUrl)("dav");var d={};!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",n="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",r=new RegExp("^"+n+"$");t.isExist=function(t){return typeof t<"u"},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,n){if(e){const r=Object.keys(e),o=r.length;for(let i=0;i
"u")},t.getAllMatches=function(t,e){const n=[];let r=e.exec(t);for(;r;){const o=[];o.startIndex=e.lastIndex-r[0].length;const i=r.length;for(let t=0;t!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t}};p.buildOptions=function(t){return Object.assign({},m,t)},p.defaultOptions=m,!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,d.nameRegexp),new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");var g={};function y(t,e,n){let r;const o={};for(let i=0;i0&&(o[e.textNodeName]=r):void 0!==r&&(o[e.textNodeName]=r),o}function v(t){const e=Object.keys(t);for(let t=0;t`,i=!1;continue}if(u===e.commentPropName){o+=r+`\x3c!--${s[u][0][e.textNodeName]}--\x3e`,i=!0;continue}if("?"===u[0]){const t=O(s[":@"],e),n="?xml"===u?"":r;let a=s[u][0][e.textNodeName];a=0!==a.length?" "+a:"",o+=n+`<${u}${a}${t}?>`,i=!0;continue}let l=r;""!==l&&(l+=e.indentBy);const f=r+`<${u}${O(s[":@"],e)}`,h=E(s[u],e,c,l);-1!==e.unpairedTags.indexOf(u)?e.suppressUnpairedNode?o+=f+">":o+=f+"/>":h&&0!==h.length||!e.suppressEmptyNode?h&&h.endsWith(">")?o+=f+`>${h}${r}${u}>`:(o+=f+">",h&&""!==r&&(h.includes("/>")||h.includes(""))?o+=r+e.indentBy+h+r:o+=h,o+=`${u}>`):o+=f+"/>",i=!0}return o}function A(t){const e=Object.keys(t);for(let t=0;t0&&e.processEntities)for(let n=0;n0&&(n="\n"),E(t,e,"",n)},j={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 T(t){this.options=Object.assign({},j,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=S),this.processTextOrObjNode=_,this.options.format?(this.indentate=F,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function _(t,e,n){const r=this.j2x(t,n+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,r.attrStr,n):this.buildObjectNode(r.val,e,r.attrStr,n)}function F(t){return this.options.indentBy.repeat(t)}function S(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}T.prototype.build=function(t){return this.options.preserveOrder?L(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},T.prototype.j2x=function(t,e){let n="",r="";for(let o in t)if(typeof t[o]>"u")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)n+=this.buildAttrPairStr(i,""+t[o]);else 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 i="";for(let a=0;a"u"||(null===n?"?"===o[0]?r+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+o+"/"+this.tagEndChar:"object"==typeof n?this.options.oneListGroup?i+=this.j2x(n,e+1).val:i+=this.processTextOrObjNode(n,o,e):i+=this.buildTextValNode(n,o,"",e))}this.options.oneListGroup&&(i=this.buildObjectNode(i,o,"",e)),r+=i}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const e=Object.keys(t[o]),r=e.length;for(let i=0;i"+t+o}},T.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>${t}`,e},T.prototype.buildTextValNode=function(t,e,n,r){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(r)+``+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(r)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(r)+"<"+e+n+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(e,t);return o=this.replaceEntitiesValue(o),""===o?this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(r)+"<"+e+n+">"+o+""+e+this.tagEndChar}},T.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function D(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}var $=new class{_action;constructor(t){this.validateAction(t),this._action=t}get id(){return this._action.id}get displayName(){return this._action.displayName}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 default(){return this._action.default}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(!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(t.default&&!Object.values(c).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:"comments-unread",displayName:function(t){var e=t[0].attributes["comments-unread"];return e>=0?(0,i.uN)("comments","1 new comment","{unread} new comments",e,{unread:e}):(0,i.Iu)("comments","Comment")},iconSvgInline:function(){return''},enabled:function(t){var e=t[0].attributes["comments-unread"];return"number"==typeof e&&e>0},exec:function(t){return(e=k().mark((function e(){return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,window.OCA.Files.Sidebar.setActiveTab("comments"),e.next=4,window.OCA.Files.Sidebar.open(t.path);case 4:return e.abrupt("return",null);case 7:return e.prev=7,e.t0=e.catch(0),I.error("Error while opening sidebar",{error:e.t0}),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(t){D(i,r,o,a,s,"next",t)}function s(t){D(i,r,o,a,s,"throw",t)}a(void 0)}))})();var e},inline:function(){return!0},order:-140});!function(t){typeof window._nc_fileactions>"u"&&(window._nc_fileactions=[],s.debug("FileActions initialized")),window._nc_fileactions.find((e=>e.id===t.id))?s.error(`FileAction ${t.id} already registered`,{action:t}):window._nc_fileactions.push(t)}($),window.OCA.Comments=OCA.Comments},4543:function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}var e;e=Handlebars.template,(OCA.Comments.Templates=OCA.Comments.Templates||{}).filesplugin=e({compiler:[8,">= 4.3.0"],main:function(e,n,r,o,i){var a,s=null!=n?n:e.nullContext||{},u=e.hooks.helperMissing,c="function",l=e.escapeExpression,f=e.lookupProperty||function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]};return'\n'},useData:!0})},24654:function(){},52361:function(){},94616:function(){}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={id:t,loaded:!1,exports:{}};return e[t].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=e,t=[],r.O=function(e,n,o,i){if(!n){var a=1/0;for(l=0;l=i)&&Object.keys(r.O).every((function(t){return r.O[t](n[u])}))?n.splice(u--,1):(s=!1,i0&&t[l-1][2]>i;l--)t[l]=t[l-1];t[l]=[n,o,i]},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.e=function(){return Promise.resolve()},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},r.j=5258,function(){r.b=document.baseURI||self.location.href;var t={5258:0};r.O.j=function(e){return 0===t[e]};var e=function(e,n){var o,i,a=n[0],s=n[1],u=n[2],c=0;if(a.some((function(e){return 0!==t[e]}))){for(o in s)r.o(s,o)&&(r.m[o]=s[o]);if(u)var l=u(r)}for(e&&e(n);c