mirror of
https://github.com/nextcloud/server.git
synced 2025-01-30 22:37:01 +00:00
7a7aec142e
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2 lines
No EOL
47 KiB
JavaScript
2 lines
No EOL
47 KiB
JavaScript
(()=>{"use strict";var e,t,i,r={80841:(e,t,i)=>{var r=i(35947),a=i(21777),s=i(53334),n=i(65899),o=i(85471),l=i(61338),c=i(13073),d=i(70995),u=i(61443),A=i(63814),h=i(65043);async function p(){try{const{data:e}=await h.Ay.get((0,A.KT)("search/providers"),{params:{from:window.location.pathname.replace("/index.php","")+window.location.search}});if("ocs"in e&&"data"in e.ocs&&Array.isArray(e.ocs.data)&&e.ocs.data.length>0)return e.ocs.data}catch(e){console.error(e)}return[]}async function f(e){let{searchTerm:t}=e;const{data:{contacts:i}}=await h.Ay.post((0,A.Jv)("/contactsmenu/contacts"),{filter:t});if(!t){let e=(0,a.HW)();return e={id:e.uid,fullName:e.displayName,emailAddresses:[]},i.unshift(e),i}return i}const C=(0,n.nY)({id:"search",state:()=>({externalFilters:[]}),actions:{registerExternalFilter(e){let{id:t,appId:i,label:r,callback:a,icon:s}=e;this.externalFilters.push({id:t,appId:i,name:r,callback:a,icon:s,isPluginFilter:!0})}}});var m=i(17334),v=i.n(m);const g=null===(y=(0,a.HW)())?(0,r.YK)().setApp("core").build():(0,r.YK)().setApp("core").setUid(y.uid).build();var y;const b=(0,r.YK)().setApp("unified-search").detectUser().build();var _=i(33691),x=i(43261);const w={name:"CalendarRangeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var S=i(14486);const k=(0,S.A)(w,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon calendar-range-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M9,10H7V12H9V10M13,10H11V12H13V10M17,10H15V12H17V10M19,3H18V1H16V3H8V1H6V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M19,19H5V8H19V19Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports;var N=i(26690);const F={name:"FilterIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},I=(0,S.A)(F,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon filter-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M14,12V19.88C14.04,20.18 13.94,20.5 13.71,20.71C13.32,21.1 12.69,21.1 12.3,20.71L10.29,18.7C10.06,18.47 9.96,18.16 10,17.87V12H9.97L4.21,4.62C3.87,4.19 3.95,3.56 4.38,3.22C4.57,3.08 4.78,3 5,3V3H19V3C19.22,3 19.43,3.08 19.62,3.22C20.05,3.56 20.13,4.19 19.79,4.62L14.03,12H14Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,B={name:"ListBoxIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},D=(0,S.A)(B,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon list-box-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3M7 7H9V9H7V7M7 11H9V13H7V11M7 15H9V17H7V15M17 17H11V15H17V17M17 13H11V11H17V13M17 9H11V7H17V9Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports;var L=i(24764),T=i(57505),E=i(41944),P=i(28326),M=i(16879),U=i(94219),R=i(18319),q=i(70082);const O={name:"CustomDateRangeModal",components:{NcButton:d.A,NcModal:q.A,CalendarRangeIcon:k,NcDateTimePicker:R.A},props:{isOpen:{type:Boolean,required:!0}},data:()=>({dateFilter:{startFrom:null,endAt:null}}),computed:{isModalOpen:{get(){return this.isOpen},set(e){this.$emit("update:is-open",e)}}},methods:{closeModal(){this.isModalOpen=!1},applyCustomRange(){this.$emit("set:custom-date-range",this.dateFilter),this.closeModal()}}};var H=i(85072),z=i.n(H),V=i(97825),G=i.n(V),$=i(77659),Y=i.n($),Q=i(55056),j=i.n(Q),W=i(10540),K=i.n(W),X=i(41113),Z=i.n(X),J=i(69663),ee={};ee.styleTagTransform=Z(),ee.setAttributes=j(),ee.insert=Y().bind(null,"head"),ee.domAPI=G(),ee.insertStyleElement=K(),z()(J.A,ee),J.A&&J.A.locals&&J.A.locals;const te=(0,S.A)(O,(function(){var e=this,t=e._self._c;return e.isModalOpen?t("NcModal",{attrs:{id:"unified-search",name:e.t("core","Custom date range"),show:e.isModalOpen,size:"small","clear-view-delay":0,title:e.t("core","Custom date range")},on:{"update:show":function(t){e.isModalOpen=t},close:e.closeModal}},[t("div",{staticClass:"unified-search-custom-date-modal"},[t("h1",[e._v(e._s(e.t("core","Custom date range")))]),e._v(" "),t("div",{staticClass:"unified-search-custom-date-modal__pickers"},[t("NcDateTimePicker",{attrs:{id:"unifiedsearch-custom-date-range-start",label:e.t("core","Pick start date"),type:"date"},model:{value:e.dateFilter.startFrom,callback:function(t){e.$set(e.dateFilter,"startFrom",t)},expression:"dateFilter.startFrom"}}),e._v(" "),t("NcDateTimePicker",{attrs:{id:"unifiedsearch-custom-date-range-end",label:e.t("core","Pick end date"),type:"date"},model:{value:e.dateFilter.endAt,callback:function(t){e.$set(e.dateFilter,"endAt",t)},expression:"dateFilter.endAt"}})],1),e._v(" "),t("div",{staticClass:"unified-search-custom-date-modal__footer"},[t("NcButton",{on:{click:e.applyCustomRange},scopedSlots:e._u([{key:"icon",fn:function(){return[t("CalendarRangeIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,3084610734)},[e._v("\n\t\t\t\t"+e._s(e.t("core","Search in date range"))+"\n\t\t\t\t")])],1)])]):e._e()}),[],!1,null,"54c43949",null).exports,ie={name:"SearchFilterChip",components:{CloseIcon:i(66001).A},props:{text:{type:String,required:!0},pretext:{type:String,required:!0}},methods:{deleteChip(){this.$emit("delete",this.filter)}}};var re=i(91229),ae={};ae.styleTagTransform=Z(),ae.setAttributes=j(),ae.insert=Y().bind(null,"head"),ae.domAPI=G(),ae.insertStyleElement=K(),z()(re.A,ae),re.A&&re.A.locals&&re.A.locals;const se=(0,S.A)(ie,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"chip"},[t("span",{staticClass:"icon"},[e._t("icon"),e._v(" "),e.pretext.length?t("span",[e._v(" "+e._s(e.pretext)+" : ")]):e._e()],2),e._v(" "),t("span",{staticClass:"text"},[e._v(e._s(e.text))]),e._v(" "),t("span",{staticClass:"close-icon",on:{click:e.deleteChip}},[t("CloseIcon",{attrs:{size:18}})],1)])}),[],!1,null,"fa9a85d4",null).exports;var ne=i(16657),oe=i(76730),le=i(75625),ce=i(1641),de=i(72854),ue=i(36647),Ae=i(32327),he=i(12865),pe=i(30094),fe=i(15502),Ce=i(21261),me=i(97217),ve=i(70170),ge=i(47611),ye=i(10363),be=i(91337),_e=i(83085),xe=i(25535),we=i(39766),Se=i(27345),ke=i(41907),Ne=i(9535),Fe=i(74246),Ie=i(74473),Be=i(542),De=i(42520),Le=i(14727),Te=i(68855),Ee=i(18608),Pe=i(49660),Me=i(29360),Ue=i(79309),Re=i(39946),qe=i(92817),Oe=i(72278),He=i(49487),ze=i(29302),Ve=i(2113),Ge=i(14782),$e=i(24827),Ye=i(74708),Qe=i(41455),je=i(31270),We=i(25521),Ke=i(84559),Xe=i(94427),Ze=i(85087),Je=i(65027),et=i(26517),tt=i(14490),it=i(37899),rt=i(24262),at=i(87720),st=i(59892),nt=i(40083),ot=i(36804),lt=i(8385),ct=i(74484),dt=i(41549),ut=i(45032),At=i(17351),ht=i(40935),pt=(i(73933),i(34301),i(18935)),ft=i(19185),Ct=i(94632),mt=i(30835),vt=i(8481),gt=i(42290),yt=i(2411),bt=i(30709),_t=i(54062),xt=i(9621),wt=i(854),St=i(23610),kt=(i(23020),i(53429)),Nt=(i(94205),i(95462),i(16343),i(29928),i(23739),i(55228),i(42892)),Ft=i(65842),It=(i(94849),i(75105),i(92471),i(16406),i(2508));ne.N,oe.N,le.A,ce.N,de.N,ue.A,Ae.N,he.A,fe.A,Ce.A,me.N,pe.N,ve.N,ge.A,ye.A,be.N,_e.N,xe.A,we.N,Se.A,ke.A,Ne.N,Fe.N,Ie.N,Be.A,De.N,Le.A,Te.N,Ee.A,At.N,Pe.N,Me.N,Ue.N,d.A,Re.N,qe.N,Oe.N,He.N,ze.N,Ve.N,Ge.N,$e.N,Ye.A,R.A,Qe.N,je.N,We.A,Ke.N,P.A,Xe.A,Ze.A,Je.N,et.N,tt.N,it.N,rt.N,at.N,st.A,ut.N,q.A,nt.A,ot.N,lt.N,ct.N,dt.N,At.a,ht.N,Ct.N,pt.N,mt.N,vt.N,gt.N,yt.N,bt.N,ft.N,_t.N,xt.N,wt.N,St.A,Symbol.toStringTag,Nt.u,Ft.u,It.yw,Symbol.toStringTag;var Bt=i(57578);const Dt={name:"SearchableList",components:{NcPopover:lt.N,NcTextField:ft.N,Magnify:u.A,AlertCircleOutline:Bt.A,NcAvatar:Pe.N,NcEmptyContent:P.A,NcButton:d.A},props:{labelText:{type:String,default:"this is a label"},searchList:{type:Array,required:!0},emptyContentText:{type:String,required:!0}},data:()=>({opened:!1,error:!1,searchTerm:""}),computed:{filteredList(){return this.searchList.filter((e=>!this.searchTerm.toLowerCase().length||["displayName"].some((t=>e[t].toLowerCase().includes(this.searchTerm.toLowerCase())))))}},methods:{clearSearch(){this.searchTerm=""},itemSelected(e){this.$emit("item-selected",e),this.clearSearch(),this.opened=!1},searchTermChanged(e){this.$emit("search-term-change",e)}}};var Lt=i(51568),Tt={};Tt.styleTagTransform=Z(),Tt.setAttributes=j(),Tt.insert=Y().bind(null,"head"),Tt.domAPI=G(),Tt.insertStyleElement=K(),z()(Lt.A,Tt),Lt.A&&Lt.A.locals&&Lt.A.locals;const Et=(0,S.A)(Dt,(function(){var e=this,t=e._self._c;return t("NcPopover",{attrs:{shown:e.opened},on:{show:function(t){e.opened=!0},hide:function(t){e.opened=!1}},scopedSlots:e._u([{key:"trigger",fn:function(){return[e._t("trigger")]},proxy:!0}],null,!0)},[e._v(" "),t("div",{staticClass:"searchable-list__wrapper"},[t("NcTextField",{attrs:{value:e.searchTerm,label:e.labelText,"trailing-button-icon":"close","show-trailing-button":""!==e.searchTerm},on:{"update:value":[function(t){e.searchTerm=t},e.searchTermChanged],"trailing-button-click":e.clearSearch}},[t("Magnify",{attrs:{size:20}})],1),e._v(" "),e.filteredList.length>0?t("ul",{staticClass:"searchable-list__list"},e._l(e.filteredList,(function(i){return t("li",{key:i.id,attrs:{title:i.displayName,role:"button"}},[t("NcButton",{attrs:{alignment:"start",type:"tertiary",wide:!0},on:{click:function(t){return e.itemSelected(i)}},scopedSlots:e._u([{key:"icon",fn:function(){return[i.isUser?t("NcAvatar",{attrs:{user:i.user,"show-user-status":!1}}):t("NcAvatar",{attrs:{"is-no-user":!0,"display-name":i.displayName,"show-user-status":!1}})]},proxy:!0}],null,!0)},[e._v("\n\t\t\t\t\t"+e._s(i.displayName)+"\n\t\t\t\t")])],1)})),0):t("div",{staticClass:"searchable-list__empty-content"},[t("NcEmptyContent",{attrs:{name:e.emptyContentText},scopedSlots:e._u([{key:"icon",fn:function(){return[t("AlertCircleOutline")]},proxy:!0}])})],1)],1)])}),[],!1,null,"62560aa0",null).exports,Pt={name:"SearchResult",components:{NcListItem:i(1522).A},props:{thumbnailUrl:{type:String,default:null},title:{type:String,required:!0},subline:{type:String,default:null},resourceUrl:{type:String,default:null},icon:{type:String,default:""},rounded:{type:Boolean,default:!1},query:{type:String,default:""},focused:{type:Boolean,default:!1}},data:()=>({thumbnailHasError:!1}),watch:{thumbnailUrl(){this.thumbnailHasError=!1}},methods:{isValidIconOrPreviewUrl:e=>/^https?:\/\//.test(e)||e.startsWith("/"),thumbnailErrorHandler(){this.thumbnailHasError=!0}}};var Mt=i(4446),Ut={};Ut.styleTagTransform=Z(),Ut.setAttributes=j(),Ut.insert=Y().bind(null,"head"),Ut.domAPI=G(),Ut.insertStyleElement=K(),z()(Mt.A,Ut),Mt.A&&Mt.A.locals&&Mt.A.locals;const Rt=(0,S.A)(Pt,(function(){var e=this,t=e._self._c;return t("NcListItem",{staticClass:"result-item",attrs:{name:e.title,bold:!1,href:e.resourceUrl,target:"_self"},scopedSlots:e._u([{key:"icon",fn:function(){return[t("div",{staticClass:"result-item__icon",class:{"result-item__icon--rounded":e.rounded,"result-item__icon--no-preview":!e.isValidIconOrPreviewUrl(e.thumbnailUrl),"result-item__icon--with-thumbnail":e.isValidIconOrPreviewUrl(e.thumbnailUrl),[e.icon]:!e.isValidIconOrPreviewUrl(e.icon)},style:{backgroundImage:e.isValidIconOrPreviewUrl(e.icon)?`url(${e.icon})`:""},attrs:{"aria-hidden":"true"}},[e.isValidIconOrPreviewUrl(e.thumbnailUrl)&&!e.thumbnailHasError?t("img",{attrs:{src:e.thumbnailUrl},on:{error:e.thumbnailErrorHandler}}):e._e()])]},proxy:!0},{key:"subname",fn:function(){return[e._v("\n\t\t"+e._s(e.subline)+"\n\t")]},proxy:!0}])})}),[],!1,null,"6d5757aa",null).exports,qt=(0,o.pM)({name:"UnifiedSearchModal",components:{IconArrowRight:_.A,IconAccountGroup:x.A,IconCalendarRange:k,IconDotsHorizontal:N.A,IconFilter:I,IconListBox:D,IconMagnify:u.A,CustomDateRangeModal:te,FilterChip:se,NcActions:L.A,NcActionButton:T.A,NcAvatar:E.A,NcButton:d.A,NcEmptyContent:P.A,NcDialog:U.A,NcInputField:M.A,SearchableList:Et,SearchResult:Rt},props:{open:{type:Boolean,required:!0},query:{type:String,default:""},localSearch:{type:Boolean,default:!1}},emits:["update:open","update:query"],setup(){const e=(0,c.ZDG)(),t=C();return{t:s.Tl,currentLocation:e,externalFilters:t.externalFilters}},data(){return{providers:[],providerActionMenuIsOpen:!1,dateActionMenuIsOpen:!1,providerResultLimit:5,dateFilter:{id:"date",type:"date",text:"",startFrom:null,endAt:null},personFilter:{id:"person",type:"person",name:""},dateFilterIsApplied:!1,personFilterIsApplied:!1,filteredProviders:[],searching:!1,searchQuery:"",placessearchTerm:"",dateTimeFilter:null,filters:[],results:[],contacts:[],showDateRangeModal:!1,internalIsVisible:this.open,initialized:!1}},computed:{isEmptySearch(){return 0===this.searchQuery.length},hasNoResults(){return!this.isEmptySearch&&0===this.results.length},showEmptyContentInfo(){return this.isEmptySearch||this.hasNoResults},emptyContentMessage(){return this.searching&&this.hasNoResults?(0,s.Tl)("core","Searching …"):this.isEmptySearch?(0,s.Tl)("core","Start typing to search"):(0,s.Tl)("core","No matching results")},userContacts(){return this.contacts},debouncedFind(){return v()(this.find,300)},debouncedFilterContacts(){return v()(this.filterContacts,300)}},watch:{open(){this.open&&(this.focusInput(),this.initialized||Promise.all([p(),f({searchTerm:""})]).then((e=>{let[t,i]=e;this.providers=this.groupProvidersByApp([...t,...this.externalFilters]),this.contacts=this.mapContacts(i),b.debug("Search providers and contacts initialized:",{providers:this.providers,contacts:this.contacts}),this.initialized=!0})).catch((e=>{b.error(e)})),this.searchQuery&&this.find(this.searchQuery))},query:{immediate:!0,handler(){this.searchQuery=this.query.trim()}}},mounted(){(0,l.B1)("nextcloud:unified-search:add-filter",this.handlePluginFilter)},methods:{onUpdateOpen(e){e||(this.$emit("update:open",!1),this.$emit("update:query",""))},searchLocally(){this.$emit("update:query",this.searchQuery),this.$emit("update:open",!1)},focusInput(){this.$nextTick((()=>{this.$refs.searchInput?.focus()}))},find(e){if(0===e.length)return this.results=[],void(this.searching=!1);this.searching=!0;const t=[],i=this.filteredProviders.length>0?this.filteredProviders:this.providers,r=(i,r)=>{const a={type:i.id,query:e,cursor:null,extraQueries:i.extraParams};r.dateFilterIsApplied&&i.filters?.since&&i.filters?.until&&(a.since=this.dateFilter.startFrom,a.until=this.dateFilter.endAt),r.personFilterIsApplied&&i.filters?.person&&(a.person=this.personFilter.user),this.providerResultLimit>5&&(a.limit=this.providerResultLimit),(0,function(e){let{type:t,query:i,cursor:r,since:a,until:s,limit:n,person:o,extraQueries:l={}}=e;const c=h.Ay.CancelToken.source();return{request:async()=>h.Ay.get((0,A.KT)("search/providers/{type}/search",{type:t}),{cancelToken:c.token,params:{term:i,cursor:r,since:a,until:s,limit:n,person:o,from:window.location.pathname.replace("/index.php","")+window.location.search,...l}}),cancel:c.cancel}}(a).request)().then((e=>{t.push({id:i.id,provider:i.name,inAppSearch:i.inAppSearch,results:e.data.ocs.data.entries}),b.debug("Unified search results:",{results:this.results,newResults:t}),this.updateResults(t),this.searching=!1}))};i.forEach((e=>{const t=this.dateFilterIsApplied,i=this.personFilterIsApplied;r(e,{dateFilterIsApplied:t,personFilterIsApplied:i})}))},updateResults(e){let t=[...this.results];this.filters.length>0&&(t=t.filter((e=>this.filters.some((t=>t.id===e.id))))),e.forEach((e=>{const i=t.findIndex((t=>t.id===e.id));-1!==i?0===e.results.length?t.splice(i,1):t.splice(i,1,e):e.results.length>0&&t.push(e)}));const i=t.slice(0);i.sort(((e,t)=>{const i=this.providers.find((t=>t.id===e.id)),r=this.providers.find((e=>e.id===t.id));return(i?i.order:0)-(r?r.order:0)})),this.results=i},mapContacts:e=>e.map((e=>({displayName:e.fullName,isNoUser:!1,subname:e.emailAddresses[0]?e.emailAddresses[0]:"",icon:"",user:e.id,isUser:e.isUser}))),filterContacts(e){f({searchTerm:e}).then((t=>{this.contacts=this.mapContacts(t),b.debug(`Contacts filtered by ${e}`,{contacts:this.contacts})}))},applyPersonFilter(e){this.personFilterIsApplied=!0;const t=this.filters.findIndex((t=>t.id===e.id));-1===t?(this.personFilter.id=e.id,this.personFilter.user=e.user,this.personFilter.name=e.displayName,this.filters.push(this.personFilter)):(this.filters[t].id=e.id,this.filters[t].user=e.user,this.filters[t].name=e.displayName),this.providers.forEach((async(e,t)=>{this.providers[t].disabled=!await this.providerIsCompatibleWithFilters(e,["person"])})),this.debouncedFind(this.searchQuery),b.debug("Person filter applied",{person:e})},loadMoreResultsForProvider(e){this.providerResultLimit+=5,this.filters=this.filters.filter((e=>"provider"!==e.type));const t=this.providers.find((t=>t.id===e));this.addProviderFilter(t,!0)},addProviderFilter(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e.id)return;e.isPluginFilter&&e.callback(),this.providerResultLimit=t?this.providerResultLimit:5,this.providerActionMenuIsOpen=!1;const i=this.filteredProviders.findIndex((t=>t.id===e.id));i>-1&&(this.filteredProviders.splice(i,1),this.filters=this.syncProviderFilters(this.filters,this.filteredProviders)),this.filteredProviders.push({id:e.id,name:e.name,icon:e.icon,type:e.type||"provider",filters:e.filters,isPluginFilter:e.isPluginFilter||!1}),this.filters=this.syncProviderFilters(this.filters,this.filteredProviders),b.debug("Search filters (newly added)",{filters:this.filters}),this.debouncedFind(this.searchQuery)},removeFilter(e){if("provider"===e.type){for(let t=0;t<this.filteredProviders.length;t++)if(this.filteredProviders[t].id===e.id){this.filteredProviders.splice(t,1);break}this.filters=this.syncProviderFilters(this.filters,this.filteredProviders),b.debug("Search filters (recently removed)",{filters:this.filters})}else for(let t=0;t<this.filters.length;t++)if("date"===this.filters[t].id||this.filters[t].id===e.id){this.dateFilterIsApplied=!1,this.filters.splice(t,1),"person"===e.type&&(this.personFilterIsApplied=!1),this.enableAllProviders();break}this.debouncedFind(this.searchQuery)},syncProviderFilters(e,t){const i=e.slice();return i.forEach(((e,r)=>{const a=e.id;"provider"===e.type&&(t.some((e=>e.id===a))||i.splice(r,1))})),t.forEach((e=>{const t=e.id;"provider"===e.type&&(i.some((e=>e.id===t))||i.push(e))})),i},updateDateFilter(){const e=this.filters.findIndex((e=>"date"===e.id));-1!==e?this.filters[e]=this.dateFilter:this.filters.push(this.dateFilter),this.dateFilterIsApplied=!0,this.providers.forEach((async(e,t)=>{this.providers[t].disabled=!await this.providerIsCompatibleWithFilters(e,["since","until"])})),this.debouncedFind(this.searchQuery)},applyQuickDateRange(e){this.dateActionMenuIsOpen=!1;const t=new Date;let i,r;switch(e){case"today":i=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0),r=new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59,999),this.dateFilter.text=(0,s.Tl)("core","Today");break;case"7days":i=new Date(t.getFullYear(),t.getMonth(),t.getDate()-6,0,0,0,0),this.dateFilter.text=(0,s.Tl)("core","Last 7 days");break;case"30days":i=new Date(t.getFullYear(),t.getMonth(),t.getDate()-29,0,0,0,0),this.dateFilter.text=(0,s.Tl)("core","Last 30 days");break;case"thisyear":i=new Date(t.getFullYear(),0,1,0,0,0,0),r=new Date(t.getFullYear(),11,31,23,59,59,999),this.dateFilter.text=(0,s.Tl)("core","This year");break;case"lastyear":i=new Date(t.getFullYear()-1,0,1,0,0,0,0),r=new Date(t.getFullYear()-1,11,31,23,59,59,999),this.dateFilter.text=(0,s.Tl)("core","Last year");break;case"custom":return void(this.showDateRangeModal=!0);default:return}this.dateFilter.startFrom=i,this.dateFilter.endAt=r,this.updateDateFilter()},setCustomDateRange(e){b.debug("Custom date range",{range:e}),this.dateFilter.startFrom=e.startFrom,this.dateFilter.endAt=e.endAt,this.dateFilter.text=(0,s.Tl)("core",`Between ${this.dateFilter.startFrom.toLocaleDateString()} and ${this.dateFilter.endAt.toLocaleDateString()}`),this.updateDateFilter()},handlePluginFilter(e){for(let t=0;t<this.filteredProviders.length;t++){const i=this.filteredProviders[t];if(i.id===e.id){i.name=e.filterUpdateText;const r=this.providers.findIndex((t=>t.id===e.id));r>-1&&(i.extraParams=e.filterParams,this.filteredProviders[t]=i);break}}this.debouncedFind(this.searchQuery)},groupProvidersByApp(e){const t={};e.forEach((e=>{const i=e.appId?e.appId:"general";t[i]||(t[i]=[]),t[i].push(e)}));const i=[];return Object.values(t).forEach((e=>{i.push(...e)})),i},providerIsCompatibleWithFilters:async(e,t)=>t.every((t=>void 0!==e.filters?.[t])),async enableAllProviders(){this.providers.forEach((async(e,t)=>{this.providers[t].disabled=!1}))}}});var Ot=i(8495),Ht={};Ht.styleTagTransform=Z(),Ht.setAttributes=j(),Ht.insert=Y().bind(null,"head"),Ht.domAPI=G(),Ht.insertStyleElement=K(),z()(Ot.A,Ht),Ot.A&&Ot.A.locals&&Ot.A.locals;const zt=(0,S.A)(qt,(function(){var e=this,t=e._self._c;return e._self._setupProxy,t("NcDialog",{ref:"unifiedSearchModal",attrs:{id:"unified-search","content-classes":"unified-search-modal__content","dialog-classes":"unified-search-modal",name:e.t("core","Unified search"),open:e.open,size:"normal"},on:{"update:open":e.onUpdateOpen}},[t("CustomDateRangeModal",{staticClass:"unified-search__date-range",attrs:{"is-open":e.showDateRangeModal},on:{"set:custom-date-range":e.setCustomDateRange,"update:is-open":function(t){e.showDateRangeModal=t}}}),e._v(" "),t("div",{staticClass:"unified-search-modal__header"},[t("NcInputField",{ref:"searchInput",attrs:{"data-cy-unified-search-input":"",value:e.searchQuery,type:"text",label:e.t("core","Search apps, files, tags, messages")+"..."},on:{"update:value":[function(t){e.searchQuery=t},e.debouncedFind]}}),e._v(" "),t("div",{staticClass:"unified-search-modal__filters",attrs:{"data-cy-unified-search-filters":""}},[t("NcActions",{attrs:{"menu-name":e.t("core","Places"),open:e.providerActionMenuIsOpen,"data-cy-unified-search-filter":"places"},on:{"update:open":function(t){e.providerActionMenuIsOpen=t}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconListBox",{attrs:{size:20}})]},proxy:!0}])},[e._v(" "),e._l(e.providers,(function(i){return t("NcActionButton",{key:`${i.id}-${i.name.replace(/\s/g,"")}`,attrs:{disabled:i.disabled},on:{click:function(t){return e.addProviderFilter(i)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("img",{staticClass:"filter-button__icon",attrs:{src:i.icon,alt:""}})]},proxy:!0}],null,!0)},[e._v("\n\t\t\t\t\t"+e._s(i.name)+"\n\t\t\t\t")])}))],2),e._v(" "),t("NcActions",{attrs:{"menu-name":e.t("core","Date"),open:e.dateActionMenuIsOpen,"data-cy-unified-search-filter":"date"},on:{"update:open":function(t){e.dateActionMenuIsOpen=t}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconCalendarRange",{attrs:{size:20}})]},proxy:!0}])},[e._v(" "),t("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(t){return e.applyQuickDateRange("today")}}},[e._v("\n\t\t\t\t\t"+e._s(e.t("core","Today"))+"\n\t\t\t\t")]),e._v(" "),t("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(t){return e.applyQuickDateRange("7days")}}},[e._v("\n\t\t\t\t\t"+e._s(e.t("core","Last 7 days"))+"\n\t\t\t\t")]),e._v(" "),t("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(t){return e.applyQuickDateRange("30days")}}},[e._v("\n\t\t\t\t\t"+e._s(e.t("core","Last 30 days"))+"\n\t\t\t\t")]),e._v(" "),t("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(t){return e.applyQuickDateRange("thisyear")}}},[e._v("\n\t\t\t\t\t"+e._s(e.t("core","This year"))+"\n\t\t\t\t")]),e._v(" "),t("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(t){return e.applyQuickDateRange("lastyear")}}},[e._v("\n\t\t\t\t\t"+e._s(e.t("core","Last year"))+"\n\t\t\t\t")]),e._v(" "),t("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(t){return e.applyQuickDateRange("custom")}}},[e._v("\n\t\t\t\t\t"+e._s(e.t("core","Custom date range"))+"\n\t\t\t\t")])],1),e._v(" "),t("SearchableList",{attrs:{"label-text":e.t("core","Search people"),"search-list":e.userContacts,"empty-content-text":e.t("core","Not found"),"data-cy-unified-search-filter":"people"},on:{"search-term-change":e.debouncedFilterContacts,"item-selected":e.applyPersonFilter},scopedSlots:e._u([{key:"trigger",fn:function(){return[t("NcButton",{scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconAccountGroup",{attrs:{size:20}})]},proxy:!0}])},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("core","People"))+"\n\t\t\t\t\t")])]},proxy:!0}])}),e._v(" "),e.localSearch?t("NcButton",{attrs:{"data-cy-unified-search-filter":"current-view"},on:{click:e.searchLocally},scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconFilter",{attrs:{size:20}})]},proxy:!0}],null,!1,4275912387)},[e._v("\n\t\t\t\t"+e._s(e.t("core","Filter in current view"))+"\n\t\t\t\t")]):e._e()],1),e._v(" "),t("div",{staticClass:"unified-search-modal__filters-applied"},e._l(e.filters,(function(i){return t("FilterChip",{key:i.id,attrs:{text:i.name??i.text,pretext:""},on:{delete:function(t){return e.removeFilter(i)}},scopedSlots:e._u([{key:"icon",fn:function(){return["person"===i.type?t("NcAvatar",{attrs:{user:i.user,size:24,"disable-menu":!0,"show-user-status":!1,"hide-favorite":!1}}):"date"===i.type?t("IconCalendarRange"):t("img",{attrs:{src:i.icon,alt:""}})]},proxy:!0}],null,!0)})})),1)],1),e._v(" "),e.showEmptyContentInfo?t("div",{staticClass:"unified-search-modal__no-content"},[t("NcEmptyContent",{attrs:{name:e.emptyContentMessage},scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconMagnify",{attrs:{size:64}})]},proxy:!0}],null,!1,125778896)})],1):t("div",{staticClass:"unified-search-modal__results"},[t("h3",{staticClass:"hidden-visually"},[e._v("\n\t\t\t"+e._s(e.t("core","Results"))+"\n\t\t")]),e._v(" "),e._l(e.results,(function(i){return t("div",{key:i.id,staticClass:"result"},[t("h4",{staticClass:"result-title",attrs:{id:`unified-search-result-${i.id}`}},[e._v("\n\t\t\t\t"+e._s(i.provider)+"\n\t\t\t")]),e._v(" "),t("ul",{staticClass:"result-items",attrs:{"aria-labelledby":`unified-search-result-${i.id}`}},e._l(i.results,(function(i,r){return t("SearchResult",e._b({key:r},"SearchResult",i,!1))})),1),e._v(" "),t("div",{staticClass:"result-footer"},[t("NcButton",{attrs:{type:"tertiary-no-background"},on:{click:function(t){return e.loadMoreResultsForProvider(i.id)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconDotsHorizontal",{attrs:{size:20}})]},proxy:!0}],null,!0)},[e._v("\n\t\t\t\t\t"+e._s(e.t("core","Load more results"))+"\n\t\t\t\t\t")]),e._v(" "),i.inAppSearch?t("NcButton",{attrs:{alignment:"end-reverse",type:"tertiary-no-background"},scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconArrowRight",{attrs:{size:20}})]},proxy:!0}],null,!0)},[e._v("\n\t\t\t\t\t"+e._s(e.t("core","Search in"))+" "+e._s(i.provider)+"\n\t\t\t\t\t")]):e._e()],1)])}))],2)],1)}),[],!1,null,"708a4081",null).exports;var Vt=i(6695);const Gt=(0,o.pM)({__name:"UnifiedSearchLocalSearchBar",props:{query:null,open:{type:Boolean}},emits:["update:open","update:query","global-search"],setup(e,t){let{emit:i}=t;const r=e;(0,o.$9)(((e,t)=>({"727a3434":t.searchGlobalButtonCSSWidth,57776443:t.searchGlobalButtonWidth})));const a=(0,o.KR)();(0,o.nT)((()=>{r.open&&a.value&&a.value.focus()}));const n=(0,kt.al)(),l=(0,o.KR)(),{width:u}=(0,c.Lhy)(l),A=(0,o.EW)((()=>u.value?`${u.value}px`:"var(--default-clickable-area)"));return{__sfc:!0,props:r,emit:i,searchInput:a,isMobile:n,searchGlobalButton:l,searchGlobalButtonWidth:u,searchGlobalButtonCSSWidth:A,clearAndCloseSearch:function(){i("update:query",""),i("update:open",!1)},mdiCloudSearch:"M21.86 12.5C21.1 11.63 20.15 11.13 19 11C19 9.05 18.32 7.4 16.96 6.04C15.6 4.68 13.95 4 12 4C10.42 4 9 4.47 7.75 5.43S5.67 7.62 5.25 9.15C4 9.43 2.96 10.08 2.17 11.1S1 13.28 1 14.58C1 16.09 1.54 17.38 2.61 18.43C3.69 19.5 5 20 6.5 20H18.5C19.75 20 20.81 19.56 21.69 18.69C22.56 17.81 23 16.75 23 15.5C23 14.35 22.62 13.35 21.86 12.5M16.57 18L14 15.43C13.43 15.79 12.74 16 12 16C9.79 16 8 14.21 8 12S9.79 8 12 8 16 9.79 16 12C16 12.74 15.79 13.43 15.43 14L18 16.57L16.57 18M14 12C14 13.11 13.11 14 12 14S10 13.11 10 12 10.9 10 12 10 14 10.9 14 12Z",mdiClose:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",t:s.Tl,NcButton:d.A,NcIconSvgWrapper:Vt.A,NcInputField:M.A}}});var $t=i(43335),Yt={};Yt.styleTagTransform=Z(),Yt.setAttributes=j(),Yt.insert=Y().bind(null,"head"),Yt.domAPI=G(),Yt.insertStyleElement=K(),z()($t.A,Yt),$t.A&&$t.A.locals&&$t.A.locals;const Qt=(0,S.A)(Gt,(function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t("Transition",[e.open?t("div",{staticClass:"local-unified-search animated-width",class:{"local-unified-search--open":e.open}},[t(i.NcInputField,{ref:"searchInput",staticClass:"local-unified-search__input animated-width",attrs:{"aria-label":i.t("core","Search in current app"),placeholder:i.t("core","Search in current app"),"show-trailing-button":"","trailing-button-label":i.t("core","Clear search"),value:e.query},on:{"update:value":function(t){return e.$emit("update:query",t)},"trailing-button-click":i.clearAndCloseSearch},scopedSlots:e._u([{key:"trailing-button-icon",fn:function(){return[t(i.NcIconSvgWrapper,{attrs:{path:i.mdiClose}})]},proxy:!0}],null,!1,3585538455)}),e._v(" "),t(i.NcButton,{ref:"searchGlobalButton",staticClass:"local-unified-search__global-search",attrs:{"aria-label":i.t("core","Search everywhere"),title:i.t("core","Search everywhere"),type:"tertiary-no-background"},on:{click:function(t){return e.$emit("global-search")}},scopedSlots:e._u([i.isMobile?null:{key:"default",fn:function(){return[e._v("\n\t\t\t\t"+e._s(i.t("core","Search everywhere"))+"\n\t\t\t")]},proxy:!0},{key:"icon",fn:function(){return[t(i.NcIconSvgWrapper,{attrs:{path:i.mdiCloudSearch}})]},proxy:!0}],null,!0)})],1):e._e()])}),[],!1,null,"7d9cfa64",null).exports,jt=(0,o.pM)({name:"UnifiedSearch",components:{NcButton:d.A,Magnify:u.A,UnifiedSearchModal:zt,UnifiedSearchLocalSearchBar:Qt},setup:()=>({currentLocation:(0,c.ZDG)(),t:s.Tl}),data:()=>({queryText:"",showUnifiedSearch:!1,showLocalSearch:!1}),computed:{debouncedQueryUpdate(){return v()(this.emitUpdatedQuery,250)},supportsLocalSearch(){return["/settings/users","/apps/deck","/settings/apps"].some((e=>this.currentLocation.pathname?.includes?.(e)))}},watch:{queryText(){this.debouncedQueryUpdate()}},mounted(){!1===window.OCP.Accessibility.disableKeyboardShortcuts()&&window.addEventListener("keydown",this.onKeyDown),(0,l.B1)("nextcloud:unified-search:reset",(()=>{this.showLocalSearch=!1,this.queryText=""})),(0,l.B1)("nextcloud:unified-search:reset",(()=>{(0,l.Ic)("nextcloud:unified-search.reset",{query:""})})),(0,l.B1)("nextcloud:unified-search:search",(e=>{let{query:t}=e;(0,l.Ic)("nextcloud:unified-search.search",{query:t})})),g.debug("Unified search initialized!")},beforeDestroy(){window.removeEventListener("keydown",this.onKeyDown)},methods:{onKeyDown(e){e.ctrlKey&&"KeyF"===e.code&&(this.showLocalSearch||this.showUnifiedSearch||e.preventDefault(),this.toggleUnifiedSearch())},toggleUnifiedSearch(){this.supportsLocalSearch?this.showLocalSearch=!this.showLocalSearch:(this.showUnifiedSearch=!this.showUnifiedSearch,this.showLocalSearch=!1)},openModal(){this.showUnifiedSearch=!0,this.showLocalSearch=!1},emitUpdatedQuery(){""===this.queryText?(0,l.Ic)("nextcloud:unified-search:reset"):(0,l.Ic)("nextcloud:unified-search:search",{query:this.queryText})}}});var Wt=i(60654),Kt={};Kt.styleTagTransform=Z(),Kt.setAttributes=j(),Kt.insert=Y().bind(null,"head"),Kt.domAPI=G(),Kt.insertStyleElement=K(),z()(Wt.A,Kt),Wt.A&&Wt.A.locals&&Wt.A.locals;const Xt=(0,S.A)(jt,(function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"header-menu unified-search-menu"},[t("NcButton",{directives:[{name:"show",rawName:"v-show",value:!e.showLocalSearch,expression:"!showLocalSearch"}],staticClass:"header-menu__trigger",attrs:{"aria-label":e.t("core","Unified search"),type:"tertiary-no-background"},on:{click:e.toggleUnifiedSearch},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Magnify",{staticClass:"header-menu__trigger-icon",attrs:{size:20}})]},proxy:!0}])}),e._v(" "),e.supportsLocalSearch?t("UnifiedSearchLocalSearchBar",{attrs:{open:e.showLocalSearch,query:e.queryText},on:{"update:open":function(t){e.showLocalSearch=t},"update:query":function(t){e.queryText=t},"global-search":e.openModal}}):e._e(),e._v(" "),t("UnifiedSearchModal",{attrs:{"local-search":e.supportsLocalSearch,query:e.queryText,open:e.showUnifiedSearch},on:{"update:query":function(t){e.queryText=t},"update:open":function(t){e.showUnifiedSearch=t}}})],1)}),[],!1,null,"3d64b166",null).exports;i.nc=(0,a.aV)();const Zt=(0,r.YK)().setApp("unified-search").detectUser().build();o.Ay.mixin({data:()=>({logger:Zt}),methods:{t:s.Tl,n:s.zw}}),window.OCA=window.OCA||{},window.OCA.UnifiedSearch={registerFilterAction:e=>{let{id:t,appId:i,label:r,callback:a,icon:s}=e;C().registerExternalFilter({id:t,appId:i,label:r,callback:a,icon:s})}},o.Ay.use(n.R2);const Jt=(0,n.Ey)();new o.Ay({el:"#unified-search",pinia:Jt,name:"UnifiedSearchRoot",render:e=>e(Xt)})},69663:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(71354),a=i.n(r),s=i(76314),n=i.n(s)()(a());n.push([e.id,".unified-search-custom-date-modal[data-v-54c43949]{padding:10px 20px 10px 20px}.unified-search-custom-date-modal h1[data-v-54c43949]{font-size:16px;font-weight:bolder;line-height:2em}.unified-search-custom-date-modal__pickers[data-v-54c43949]{display:flex;flex-direction:column}.unified-search-custom-date-modal__footer[data-v-54c43949]{display:flex;justify-content:end}","",{version:3,sources:["webpack://./core/src/components/UnifiedSearch/CustomDateRangeModal.vue"],names:[],mappings:"AACA,mDACC,2BAAA,CAEA,sDACC,cAAA,CACA,kBAAA,CACA,eAAA,CAGD,4DACC,YAAA,CACA,qBAAA,CAGD,2DACC,YAAA,CACA,mBAAA",sourceRoot:""}]);const o=n},91229:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(71354),a=i.n(r),s=i(76314),n=i.n(s)()(a());n.push([e.id,".chip[data-v-fa9a85d4]{display:flex;align-items:center;padding:2px 4px;border:1px solid var(--color-primary-element-light);border-radius:20px;background-color:var(--color-primary-element-light);margin:2px}.chip .icon[data-v-fa9a85d4]{display:flex;align-items:center;padding-inline-end:5px}.chip .icon img[data-v-fa9a85d4]{width:20px;padding:2px;border-radius:20px;filter:var(--background-invert-if-bright)}.chip .text[data-v-fa9a85d4]{margin:0 2px}.chip .close-icon[data-v-fa9a85d4]{cursor:pointer}.chip .close-icon[data-v-fa9a85d4] :hover{filter:invert(20%)}","",{version:3,sources:["webpack://./core/src/components/UnifiedSearch/SearchFilterChip.vue"],names:[],mappings:"AACA,uBACI,YAAA,CACA,kBAAA,CACA,eAAA,CACA,mDAAA,CACA,kBAAA,CACA,mDAAA,CACA,UAAA,CAEA,6BACI,YAAA,CACA,kBAAA,CACA,sBAAA,CAEA,iCACI,UAAA,CACA,WAAA,CACA,kBAAA,CACA,yCAAA,CAIR,6BACI,YAAA,CAGJ,mCACI,cAAA,CAEA,0CACI,kBAAA",sourceRoot:""}]);const o=n},4446:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(71354),a=i.n(r),s=i(76314),n=i.n(s)()(a());n.push([e.id,".result-item[data-v-6d5757aa] a{border:2px solid rgba(0,0,0,0);border-radius:var(--border-radius-large) !important}.result-item[data-v-6d5757aa] a:active,.result-item[data-v-6d5757aa] a:hover,.result-item[data-v-6d5757aa] a:focus{background-color:var(--color-background-hover);border:2px solid var(--color-border-maxcontrast)}.result-item[data-v-6d5757aa] a *{cursor:pointer}.result-item__icon[data-v-6d5757aa]{overflow:hidden;width:var(--default-clickable-area);height:var(--default-clickable-area);border-radius:var(--border-radius);background-repeat:no-repeat;background-position:center center;background-size:32px}.result-item__icon--rounded[data-v-6d5757aa]{border-radius:calc(var(--default-clickable-area)/2)}.result-item__icon--no-preview[data-v-6d5757aa]{background-size:32px}.result-item__icon--with-thumbnail[data-v-6d5757aa]{background-size:cover}.result-item__icon--with-thumbnail[data-v-6d5757aa]:not(.result-item__icon--rounded){border:1px solid var(--color-border);max-height:calc(var(--default-clickable-area) - 2px);max-width:calc(var(--default-clickable-area) - 2px)}.result-item__icon img[data-v-6d5757aa]{width:100%;height:100%;object-fit:cover;object-position:center}","",{version:3,sources:["webpack://./core/src/components/UnifiedSearch/SearchResult.vue"],names:[],mappings:"AAEC,gCACC,8BAAA,CACA,mDAAA,CAEA,mHAGC,8CAAA,CACA,gDAAA,CAGD,kCACC,cAAA,CAIF,oCACC,eAAA,CACA,mCAAA,CACA,oCAAA,CACA,kCAAA,CACA,2BAAA,CACA,iCAAA,CACA,oBAAA,CAEA,6CACC,mDAAA,CAGD,gDACC,oBAAA,CAGD,oDACC,qBAAA,CAGD,qFACC,oCAAA,CAEA,oDAAA,CACA,mDAAA,CAGD,wCAEC,UAAA,CACA,WAAA,CAEA,gBAAA,CACA,sBAAA",sourceRoot:""}]);const o=n},51568:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(71354),a=i.n(r),s=i(76314),n=i.n(s)()(a());n.push([e.id,".searchable-list__wrapper[data-v-62560aa0]{padding:calc(var(--default-grid-baseline)*3);display:flex;flex-direction:column;align-items:center;width:250px}.searchable-list__list[data-v-62560aa0]{width:100%;max-height:284px;overflow-y:auto;margin-top:var(--default-grid-baseline);padding:var(--default-grid-baseline)}.searchable-list__list[data-v-62560aa0] .button-vue{border-radius:var(--border-radius-large) !important}.searchable-list__list[data-v-62560aa0] .button-vue span{font-weight:initial}.searchable-list__empty-content[data-v-62560aa0]{margin-top:calc(var(--default-grid-baseline)*3)}","",{version:3,sources:["webpack://./core/src/components/UnifiedSearch/SearchableList.vue"],names:[],mappings:"AAEC,2CACC,4CAAA,CACA,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,WAAA,CAGD,wCACC,UAAA,CACA,gBAAA,CACA,eAAA,CACA,uCAAA,CACA,oCAAA,CAEA,oDACC,mDAAA,CACA,yDACC,mBAAA,CAKH,iDACC,+CAAA",sourceRoot:""}]);const o=n},43335:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(71354),a=i.n(r),s=i(76314),n=i.n(s)()(a());n.push([e.id,".local-unified-search[data-v-7d9cfa64]{--local-search-width: min(calc(250px + var(--727a3434)), 95vw);box-sizing:border-box;position:relative;height:var(--header-height);width:var(--local-search-width);display:flex;align-items:center;z-index:10;padding-inline:var(--border-width-input-focused);overflow:hidden;inset-inline-end:0}.local-unified-search .local-unified-search__global-search[data-v-7d9cfa64]{position:absolute;inset-inline-end:var(--default-clickable-area)}.local-unified-search .local-unified-search__input[data-v-7d9cfa64]{box-sizing:border-box;margin:0;width:var(--local-search-width)}.local-unified-search .local-unified-search__input[data-v-7d9cfa64] input{padding-inline-end:calc(var(--57776443) + var(--default-clickable-area))}.animated-width[data-v-7d9cfa64]{transition:width var(--animation-quick) linear}.v-leave-active[data-v-7d9cfa64]{position:absolute !important}.v-enter.local-unified-search[data-v-7d9cfa64],.v-leave-to.local-unified-search[data-v-7d9cfa64]{--local-search-width: var(--clickable-area-large)}@media screen and (max-width: 500px){.local-unified-search.local-unified-search--open[data-v-7d9cfa64]{--local-search-width: 100vw;padding-inline:var(--default-grid-baseline)}.unified-search-menu:has(.local-unified-search--open){position:absolute !important;inset-inline:0}.header-end:has(.local-unified-search--open) > :not(.unified-search-menu){display:none}}","",{version:3,sources:["webpack://./core/src/components/UnifiedSearch/UnifiedSearchLocalSearchBar.vue"],names:[],mappings:"AACA,uCACC,8DAAA,CACA,qBAAA,CACA,iBAAA,CACA,2BAAA,CACA,+BAAA,CACA,YAAA,CACA,kBAAA,CAEA,UAAA,CAEA,gDAAA,CAEA,eAAA,CAEA,kBAAA,CAEA,4EACC,iBAAA,CACA,8CAAA,CAGD,oEACC,qBAAA,CAEA,QAAA,CACA,+BAAA,CAIA,0EAEC,wEAAA,CAKH,iCACC,8CAAA,CAKD,iCACC,4BAAA,CAKA,iGAEC,iDAAA,CAIF,qCACC,kEAEC,2BAAA,CACA,2CAAA,CAID,sDACC,4BAAA,CACA,cAAA,CAGD,0EACC,YAAA,CAAA",sourceRoot:""}]);const o=n},8495:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(71354),a=i.n(r),s=i(76314),n=i.n(s)()(a());n.push([e.id,"[data-v-708a4081] .unified-search-modal .unified-search-modal__content{--dialog-height: min(80vh, 800px);box-sizing:border-box;height:var(--dialog-height);max-height:var(--dialog-height);min-height:var(--dialog-height);display:flex;flex-direction:column;padding-inline:0}.unified-search-modal__header[data-v-708a4081]{background-color:var(--color-main-background);padding-inline-end:12px;padding-block-end:12px;position:sticky;top:6px}.unified-search-modal__filters[data-v-708a4081]{display:flex;flex-wrap:wrap;gap:4px;justify-content:start;padding-top:4px}.unified-search-modal__filters-applied[data-v-708a4081]{padding-top:4px;display:flex;flex-wrap:wrap}.unified-search-modal__no-content[data-v-708a4081]{display:flex;align-items:center;margin-top:.5em;height:70%}.unified-search-modal__results[data-v-708a4081]{overflow:hidden scroll;padding-inline:0 12px;padding-block:0 12px}.unified-search-modal__results .result-title[data-v-708a4081]{color:var(--color-primary-element);font-size:16px;margin-block:8px 4px}.unified-search-modal__results .result-footer[data-v-708a4081]{justify-content:space-between;align-items:center;display:flex}.filter-button__icon[data-v-708a4081]{height:20px;width:20px;object-fit:contain;filter:var(--background-invert-if-bright);padding:11px}@media only screen and (max-height: 400px){.unified-search-modal__results[data-v-708a4081]{overflow:unset}}","",{version:3,sources:["webpack://./core/src/components/UnifiedSearch/UnifiedSearchModal.vue"],names:[],mappings:"AACA,uEACC,iCAAA,CACA,qBAAA,CACA,2BAAA,CACA,+BAAA,CACA,+BAAA,CAEA,YAAA,CACA,qBAAA,CAEA,gBAAA,CAIA,+CAEC,6CAAA,CAEA,uBAAA,CAEA,sBAAA,CAEA,eAAA,CACA,OAAA,CAGD,gDACC,YAAA,CACA,cAAA,CACA,OAAA,CACA,qBAAA,CACA,eAAA,CAGD,wDACC,eAAA,CACA,YAAA,CACA,cAAA,CAGD,mDACC,YAAA,CACA,kBAAA,CACA,eAAA,CACA,UAAA,CAGD,gDACC,sBAAA,CAEA,qBAAA,CACA,oBAAA,CAGC,8DACC,kCAAA,CACA,cAAA,CACA,oBAAA,CAGD,+DACC,6BAAA,CACA,kBAAA,CACA,YAAA,CAOJ,sCACC,WAAA,CACA,UAAA,CACA,kBAAA,CACA,yCAAA,CACA,YAAA,CAID,2CACC,gDACC,cAAA,CAAA",sourceRoot:""}]);const o=n},60654:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(71354),a=i.n(r),s=i(76314),n=i.n(s)()(a());n.push([e.id,"#header .header-menu[data-v-3d64b166]{display:flex;align-items:center;justify-content:center}#header .header-menu__trigger[data-v-3d64b166]{height:var(--header-height);width:var(--header-height) !important}#header .header-menu__trigger[data-v-3d64b166]:focus-visible{outline:none !important;box-shadow:none !important}#header .header-menu__trigger[data-v-3d64b166]:not(:hover,:focus,:focus-visible){opacity:.85}#header .header-menu__trigger-icon[data-v-3d64b166]{color:var(--color-background-plain-text) !important}","",{version:3,sources:["webpack://./core/src/views/UnifiedSearch.vue"],names:[],mappings:"AAGC,sCACC,YAAA,CACA,kBAAA,CACA,sBAAA,CAEA,+CACC,2BAAA,CACA,qCAAA,CAEA,6DAEC,uBAAA,CACA,0BAAA,CAGD,iFACC,WAAA,CAGD,oDAEC,mDAAA",sourceRoot:""}]);const o=n},27518:e=>{e.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M15.4%2016.6L10.8%2012l4.6-4.6L14%206l-6%206%206%206%201.4-1.4z%27/%3e%3c/svg%3e"},27514:e=>{e.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M18.4%207.4L17%206l-6%206%206%206%201.4-1.4-4.6-4.6%204.6-4.6m-6%200L11%206l-6%206%206%206%201.4-1.4L7.8%2012l4.6-4.6z%27/%3e%3c/svg%3e"},79722:e=>{e.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M5.6%207.4L7%206l6%206-6%206-1.4-1.4%204.6-4.6-4.6-4.6m6%200L13%206l6%206-6%206-1.4-1.4%204.6-4.6-4.6-4.6z%27/%3e%3c/svg%3e"},86886:e=>{e.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M8.6%2016.6l4.6-4.6-4.6-4.6L10%206l6%206-6%206-1.4-1.4z%27/%3e%3c/svg%3e"}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var i=a[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,s),i.loaded=!0,i.exports}s.m=r,e=[],s.O=(t,i,r,a)=>{if(!i){var n=1/0;for(d=0;d<e.length;d++){i=e[d][0],r=e[d][1],a=e[d][2];for(var o=!0,l=0;l<i.length;l++)(!1&a||n>=a)&&Object.keys(s.O).every((e=>s.O[e](i[l])))?i.splice(l--,1):(o=!1,a<n&&(n=a));if(o){e.splice(d--,1);var c=r();void 0!==c&&(t=c)}}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[i,r,a]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,i)=>(s.f[i](e,t),t)),[])),s.u=e=>e+"-"+e+".js?v=7b9b02dc0a1b898066ef",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},i="nextcloud:",s.l=(e,r,a,n)=>{if(t[e])t[e].push(r);else{var o,l;if(void 0!==a)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==i+a){o=u;break}}o||(l=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-webpack",i+a),o.src=e),t[e]=[r];var A=(i,r)=>{o.onerror=o.onload=null,clearTimeout(h);var a=t[e];if(delete t[e],o.parentNode&&o.parentNode.removeChild(o),a&&a.forEach((e=>e(r))),i)return i(r)},h=setTimeout(A.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=A.bind(null,o.onerror),o.onload=A.bind(null,o.onload),l&&document.head.appendChild(o)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.j=6776,(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var r=i.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=i[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{s.b=document.baseURI||self.location.href;var e={6776:0};s.f.j=(t,i)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)i.push(r[2]);else{var a=new Promise(((i,a)=>r=e[t]=[i,a]));i.push(r[2]=a);var n=s.p+s.u(t),o=new Error;s.l(n,(i=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var a=i&&("load"===i.type?"missing":i.type),n=i&&i.target&&i.target.src;o.message="Loading chunk "+t+" failed.\n("+a+": "+n+")",o.name="ChunkLoadError",o.type=a,o.request=n,r[1](o)}}),"chunk-"+t,t)}},s.O.j=t=>0===e[t];var t=(t,i)=>{var r,a,n=i[0],o=i[1],l=i[2],c=0;if(n.some((t=>0!==e[t]))){for(r in o)s.o(o,r)&&(s.m[r]=o[r]);if(l)var d=l(s)}for(t&&t(i);c<n.length;c++)a=n[c],s.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return s.O(d)},i=self.webpackChunknextcloud=self.webpackChunknextcloud||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})(),s.nc=void 0;var n=s.O(void 0,[4208],(()=>s(80841)));n=s.O(n)})();
|
|
//# sourceMappingURL=core-unified-search.js.map?v=04d546f175f969640d85
|