2026-02-28 16:09:50 -05:00
|
|
|
(()=>{var t,e,r,n={96689(t,e,r){"use strict";r.d(e,{A:()=>n});const n=(0,r(35947).YK)().setApp("comments").detectUser().build()},35550(t,e,r){"use strict";r.d(e,{A:()=>u});var n=r(21777),o=r(82415),i=r(17003);const a=(0,o.UU)((0,i.e)());function s(t){a.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}(0,n.zo)(s),s((0,n.do)());const u=a},17003(t,e,r){"use strict";r.d(e,{e:()=>o});var n=r(63814);function o(){return(0,n.dC)("dav/comments")}},80609(t,e,r){"use strict";var n=r(21777),o=r(35810),i=r(53334),a=r(26422),s=r(10810),u=r(85471),l=r(51651),c=r(96689),p=r(35906);let f,h;u.Ay.use(s.R2);var d=r(81222);r.nc=(0,n.aV)();const y="comments_files-sidebar-tab";(0,d.C)("comments","activityEnabled",!1)&&void 0!==window.OCA?.Activity?.registerSidebarAction?window.addEventListener("DOMContentLoaded",function(){window.OCA.Activity.registerSidebarAction({mount:async(t,{node:e,reload:n})=>{const o=(0,s.Ey)();if(!f){const{default:t}=await Promise.all([r.e(4208),r.e(3556),r.e(4906)]).then(r.bind(r,44906));f=u.Ay.extend(t)}h=new f({el:t,pinia:o,propsData:{reloadCallback:n,resourceId:e.fileid}}),c.A.info("Comments plugin mounted in Activity sidebar action",{node:e})},unmount:()=>{h&&h.$destroy()}}),window.OCA.Activity.registerSidebarEntries(async({node:t,limit:e,offset:n})=>{const{data:o}=await(0,p.v)({resourceType:"files",resourceId:t.fileid},{limit:e,offset:n??0});c.A.debug("Loaded comments",{node:t,comments:o});const{default:i}=await Promise.all([r.e(4208),r.e(3556),r.e(7039)]).then(r.bind(r,57039)),a=u.Ay.extend(i);return o.map(e=>({_CommentsViewInstance:void 0,timestamp:(0,l.A)(e.props?.creationDateTime).toDate().getTime(),mount(r,{reload:n}){this._CommentsViewInstance=new a({el:r,propsData:{comment:e,resourceId:t.fileid,reloadCallback:n}})},unmount(){this._CommentsViewInstance?.$destroy()}}))}),window.OCA.Activity.registerSidebarFilter(t=>"comments"!==t.type),c.A.info("Comments plugin registered for Activity sidebar action")}):(0,o.rS)({id:"comments",displayName:(0,i.t)("comments","Comments"),iconSvgInline:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-message-reply-text" viewBox="0 0 24 24"><path d="M18,8H6V6H18V8M18,11H6V9H18V11M18,14H6V12H18V14M22,4A2,2 0 0,0 20,2H4A2,2 0 0,0 2,4V16A2,2 0 0,0 4,18H18L22,22V4Z" /></svg>',order:50,tagName:y,async onInit(){const{default:t}=await Promise.all([r.e(4208),r.e(3556),r.e(8124)]).then(r.bind(r,38124));u.Ay.use(s.R2),u.Ay.mixin({pinia:(0,s.Ey)()});const e=(0,a.A)(u.Ay,t);Object.defineProperty(e.prototype,"attachShadow",{value(){return this}}),Object.defineProperty(e.prototype,"shadowRoot",{get(){return this}}),window.customElements.define(y,e)}})},35906(t,e,r){"use strict";r.d(e,{e:()=>s,v:()=>u});var n=r(82415),o=r(5e3),i=r(90176),a=r(35550);const s=20;async function u({resourceType:t,resourceId:e},r){const u=["",t,e].join("/"),l=r.datetime?`<oc:datetime>${r.datetime.toISOString()}</oc:datetime>`:"",c=await a.A.customRequest(u,{method:"REPORT",data:`<?xml version="1.0"?>\n\t\t\t<oc:filter-comments\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns"\n\t\t\t\txmlns:nc="http://nextcloud.org/ns"\n\t\t\t\txmlns:ocs="http://open-collaboration-services.org/ns">\n\t\t\t\t<oc:limit>${r.limit??s}</oc:limit>\n\t\t\t\t<oc:offset>${r.offset||0}</oc:offset>\n\t\t\t\t${l}\n\t\t\t</oc:filter-comments>`,...r}),p=await c.text(),f=function(t,e=!1){const{multistatus:{response:r}}=t;return r.map(t=>{const r=t.propstat.prop;return(0,i.ch)(r,r.id.toString(),e)})}(await(0,n.h4)(p),!0);return(0,o.hq)(c,f,!0)}},8505(t){"use strict";function e(t,e,o){t instanceof RegExp&&(t=r(t,o)),e instanceof RegExp&&(e=r(e,o));var i=n(t,e,o);return i&&{start:i[0],end:i[1],pre:o.slice(0,i[0]),body:o.slice(i[0]+t.length,i[1]),post:o.slice(i[1]+e.length)}}function r(t,e){var r=e.match(t);return r?r[0]:null}function n(t,e,r){var n,o,i,a,s,u=r.indexOf(t),l=r.indexOf(e,u+1),c=u;if(u>=0&&l>0){if(t===e)return[u,l];for(n=[],i=r.length;c>=0&&!s;)c==u?(n.push(c),u=r.indexOf(t,c+1)):1==n.length?s=[n.pop(),l]:((o=n.pop())<i&&(i=o,a=l),l=r.indexOf(e,c+1)),c=u<l&&u>=0?u:l;n.length&&(s=[i,a])}return s}t.exp
|