You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

core-unified-search.js 50KB

123
  1. /*! For license information please see core-unified-search.js.LICENSE.txt */
  2. !function(){"use strict";var e,r,i,o={36932:function(e,r,i){var o=i(17499),a=i(77958),c=i(31352),s=i(20144),u=i(20296),l=i.n(u),d=i(69183),f=i(64024),h=i(20212),p=i(3349),A=i(86514),v=i(93815),m=i(9062),g=i(21146),y=i(51900),b=(0,y.Z)(g.Z,m.s,m.x,!1,null,null,null).exports;function C(t){return C="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},C(t)}var _={name:"SearchResult",components:{NcHighlight:i(40873).N},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:function(){return{hasValidThumbnail:this.thumbnailUrl&&""!==this.thumbnailUrl.trim(),loaded:!1}},computed:{isIconUrl:function(){if(this.icon.startsWith("/"))return!0;try{new URL(this.icon)}catch(t){return!1}return!0}},watch:{thumbnailUrl:function(){this.hasValidThumbnail=this.thumbnailUrl&&""!==this.thumbnailUrl.trim(),this.loaded=!1}},methods:{reEmitEvent:function(t){this.$emit(t.type,t)},onError:function(){this.hasValidThumbnail=!1},onLoad:function(){this.loaded=!0}}},w=i(93379),x=i.n(w),k=i(7795),S=i.n(k),E=i(90569),L=i.n(E),j=i(3565),D=i.n(j),I=i(19216),O=i.n(I),$=i(44589),B=i.n($),P=i(20427),q={};q.styleTagTransform=B(),q.setAttributes=D(),q.insert=L().bind(null,"head"),q.domAPI=S(),q.insertStyleElement=O(),x()(P.Z,q),P.Z&&P.Z.locals&&P.Z.locals;var N=(0,y.Z)(_,(function(){var t,e,r,n=this,i=n._self._c;return i("a",{staticClass:"unified-search__result",class:{"unified-search__result--focused":n.focused},attrs:{href:n.resourceUrl||"#"},on:{click:n.reEmitEvent,focus:n.reEmitEvent}},[i("div",{staticClass:"unified-search__result-icon",class:(t={"unified-search__result-icon--rounded":n.rounded,"unified-search__result-icon--no-preview":!n.hasValidThumbnail&&!n.loaded,"unified-search__result-icon--with-thumbnail":n.hasValidThumbnail&&n.loaded},e=n.icon,r=!n.loaded&&!n.isIconUrl,(e=function(t){var e=function(t,e){if("object"!==C(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===C(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t),style:{backgroundImage:n.isIconUrl?"url(".concat(n.icon,")"):""}},[n.hasValidThumbnail?i("img",{directives:[{name:"show",rawName:"v-show",value:n.loaded,expression:"loaded"}],attrs:{src:n.thumbnailUrl,alt:""},on:{error:n.onError,load:n.onLoad}}):n._e()]),n._v(" "),i("span",{staticClass:"unified-search__result-content"},[i("span",{staticClass:"unified-search__result-line-one",attrs:{title:n.title}},[i("NcHighlight",{attrs:{text:n.title,search:n.query}})],1),n._v(" "),n.subline?i("span",{staticClass:"unified-search__result-line-two",attrs:{title:n.subline}},[n._v(n._s(n.subline))]):n._e()])])}),[],!1,null,"0ec7b18f",null).exports,U={name:"SearchResultPlaceholders",data:function(){return{light:null,dark:null}},mounted:function(){var t=getComputedStyle(document.documentElement);this.dark=t.getPropertyValue("--color-placeholder-dark"),this.light=t.getPropertyValue("--color-placeholder-light")},methods:{randWidth:function(){return Math.floor(20*Math.random())+30}}},F=i(78033),T={};T.styleTagTransform=B(),T.setAttributes=D(),T.insert=L().bind(null,"head"),T.domAPI=S(),T.insertStyleElement=O(),x()(F.Z,T),F.Z&&F.Z.locals&&F.Z.locals;var G=(0,y.Z)(U,(function(){var t=this,e=t._self._c;return e("ul",[e("svg",{staticClass:"unified-search__result-placeholder-gradient"},[e("defs",[e("linearGradient",{attrs:{id:"unified-search__result-placeholder-gradient"}},[e("stop",{attrs:{offset:"0%","stop-color":t.light}},[e("animate",{attrs:{attributeName:"stop-color",values:"".concat(t.light,"; ").concat(t.light,"; ").concat(t.dark,"; ").concat(t.dark,"; ").concat(t.light),dur:"2s",repeatCount:"indefinite"}})]),t._v(" "),e("stop",{attrs:{offset:"100%","stop-color":t.dark}},[e("animate",{attrs:{attributeName:"stop-color",values:"".concat(t.dark,"; ").concat(t.light,"; ").concat(t.light,"; ").concat(t.dark,"; ").concat(t.dark),dur:"2s",repeatCount:"indefinite"}})])],1)],1)]),t._v(" "),t._l([1,2,3],(function(r){return e("li",{key:r},[e("svg",{staticClass:"unified-search__result-placeholder",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"url(#unified-search__result-placeholder-gradient)"}},[e("rect",{staticClass:"unified-search__result-placeholder-icon"}),t._v(" "),e("rect",{staticClass:"unified-search__result-placeholder-line-one"}),t._v(" "),e("rect",{staticClass:"unified-search__result-placeholder-line-two",style:{width:"calc(".concat(t.randWidth(),"%)")}})])])}))],2)}),[],!1,null,"9ed03c40",null).exports,R=i(79753),Z=i(43554),z=i(93664),M=i(25108);function W(t){return W="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},W(t)}function Q(){Q=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,i){var o=e&&e.prototype instanceof f?e:f,a=Object.create(o.prototype),c=new k(i||[]);return n(a,"_invoke",{value:C(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function f(){}function h(){}function p(){}var A={};s(A,o,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==e&&r.call(m,o)&&(A=m);var g=p.prototype=f.prototype=Object.create(A);function y(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,a,c){var s=l(t[n],t,o);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==W(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){i("next",t,a,c)}),(function(t){i("throw",t,a,c)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return i("throw",t,a,c)}))}c(s.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function C(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var c=_(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=l(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function _(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=l(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return h.prototype=p,n(g,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:h,configurable:!0}),h.displayName=s(p,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,c,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},y(b.prototype),s(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new b(u(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},y(g),s(g,c,"Generator"),s(g,o,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=S,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;x(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function Y(t,e,r,n,i,o,a){try{var c=t[o](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,i)}function H(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Y(o,n,i,a,c,"next",t)}function c(t){Y(o,n,i,a,c,"throw",t)}a(void 0)}))}}var V=(0,Z.j)("unified-search","limit-default"),K=(0,Z.j)("unified-search","min-search-length",1),X=(0,Z.j)("unified-search","live-search",!0),J=/(^|\s)in:([a-z_-]+)/gi,tt=/(^|\s)-in:([a-z_-]+)/gi;function et(){return rt.apply(this,arguments)}function rt(){return(rt=H(Q().mark((function t(){var e,r;return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,z.Z.get((0,R.generateOcsUrl)("search/providers"),{params:{from:window.location.pathname.replace("/index.php","")+window.location.search}});case 3:if(e=t.sent,!("ocs"in(r=e.data)&&"data"in r.ocs&&Array.isArray(r.ocs.data)&&r.ocs.data.length>0)){t.next=7;break}return t.abrupt("return",r.ocs.data);case 7:t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),M.error(t.t0);case 12:return t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,null,[[0,9]])})))).apply(this,arguments)}function nt(t){var e=t.type,r=t.query,n=t.cursor,i=z.Z.CancelToken.source(),o=function(){var t=H(Q().mark((function t(){return Q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",z.Z.get((0,R.generateOcsUrl)("search/providers/{type}/search",{type:e}),{cancelToken:i.token,params:{term:r,cursor:n,from:window.location.pathname.replace("/index.php","")+window.location.search}}));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return{request:o,cancel:i.cancel}}function it(t){return it="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},it(t)}function ot(t){return function(t){if(Array.isArray(t))return st(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ct(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function at(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=ct(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw o}}}}function ct(t,e){if(t){if("string"==typeof t)return st(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?st(t,e):void 0}}function st(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ut(){ut=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,i){var o=e&&e.prototype instanceof f?e:f,a=Object.create(o.prototype),c=new k(i||[]);return n(a,"_invoke",{value:C(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function f(){}function h(){}function p(){}var A={};s(A,o,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==e&&r.call(m,o)&&(A=m);var g=p.prototype=f.prototype=Object.create(A);function y(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,a,c){var s=l(t[n],t,o);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==it(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){i("next",t,a,c)}),(function(t){i("throw",t,a,c)})):e.resolve(d).then((function(t){u.value=t,a(u)}),(function(t){return i("throw",t,a,c)}))}c(s.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function C(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var c=_(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=l(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function _(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=l(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return h.prototype=p,n(g,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:h,configurable:!0}),h.displayName=s(p,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,c,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},y(b.prototype),s(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new b(u(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},y(g),s(g,c,"Generator"),s(g,o,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=S,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;x(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function lt(t,e,r,n,i,o,a){try{var c=t[o](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,i)}function dt(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){lt(o,n,i,a,c,"next",t)}function c(t){lt(o,n,i,a,c,"throw",t)}a(void 0)}))}}var ft={name:"UnifiedSearch",components:{Magnify:b,NcActionButton:h.Z,NcActions:p.Z,NcEmptyContent:A.Z,NcHeaderMenu:v.Z,SearchResult:N,SearchResultPlaceholders:G},data:function(){return{types:[],cursors:{},limits:{},loading:{},reached:{},requests:[],results:{},query:"",focused:null,triggered:!1,defaultLimit:V,minSearchLength:K,enableLiveSearch:X,open:!1}},computed:{typesIDs:function(){return this.types.map((function(t){return t.id}))},typesNames:function(){return this.types.map((function(t){return t.name}))},typesMap:function(){return this.types.reduce((function(t,e){return t[e.id]=e.name,t}),{})},ariaLabel:function(){return t("core","Search")},hasResults:function(){return 0!==Object.keys(this.results).length},orderedResults:function(){var t=this;return this.typesIDs.filter((function(e){return e in t.results})).map((function(e){return{type:e,list:t.results[e]}}))},availableFilters:function(){return Object.keys(this.results)},usedFiltersIn:function(){for(var t,e=[];null!==(t=J.exec(this.query));)e.push(t[2]);return e},usedFiltersNot:function(){for(var t,e=[];null!==(t=tt.exec(this.query));)e.push(t[2]);return e},validQueryTitle:function(){return this.triggered?t("core","No results for {query}",{query:this.query}):t("core","Press Enter to start searching")},shortQueryDescription:function(){return this.isShortQuery?n("core","Please enter {minSearchLength} character or more to search","Please enter {minSearchLength} characters or more to search",this.minSearchLength,{minSearchLength:this.minSearchLength}):""},isShortQuery:function(){return this.query&&this.query.trim().length<K},isValidQuery:function(){return this.query&&""!==this.query.trim()&&!this.isShortQuery},isDoneSearching:function(){return Object.values(this.reached).every((function(t){return!1===t}))},isLoading:function(){return Object.values(this.loading).some((function(t){return!0===t}))}},created:function(){var t=this;return dt(ut().mark((function e(){return ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,d.Ld)("files:navigation:changed",t.onNavigationChange),e.next=3,et();case 3:t.types=e.sent,t.logger.debug("Unified Search initialized with the following providers",t.types);case 5:case"end":return e.stop()}}),e)})))()},beforeDestroy:function(){(0,d.r1)("files:navigation:changed",this.onNavigationChange)},mounted:function(){var t=this;OCP.Accessibility.disableKeyboardShortcuts()||document.addEventListener("keydown",(function(e){e.ctrlKey&&"KeyF"===e.code&&!t.open?(e.preventDefault(),t.open=!0):e.ctrlKey&&"f"===e.key&&t.open&&(t.open=!1),t.open&&("ArrowDown"===e.key&&t.focusNext(e),"ArrowUp"===e.key&&t.focusPrev(e))}))},methods:{onOpen:function(){var t=this;return dt(ut().mark((function e(){return ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,et();case 2:t.types=e.sent;case 3:case"end":return e.stop()}}),e)})))()},onClose:function(){(0,d.j8)("nextcloud:unified-search.close")},onNavigationChange:function(){this.$el.querySelector('form[role="search"]').reset()},onReset:function(){(0,d.j8)("nextcloud:unified-search.reset"),this.logger.debug("Search reset"),this.query="",this.resetState(),this.focusInput()},resetState:function(){var t=this;return dt(ut().mark((function e(){return ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.cursors={},t.limits={},t.reached={},t.results={},t.focused=null,t.triggered=!1,e.next=8,t.cancelPendingRequests();case 8:case"end":return e.stop()}}),e)})))()},cancelPendingRequests:function(){var t=this;return dt(ut().mark((function e(){var r;return ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.requests.slice(0),t.requests=[],e.next=4,Promise.all(r.map((function(t){return t()})));case 4:case"end":return e.stop()}}),e)})))()},focusInput:function(){var t=this;this.$nextTick((function(){t.$refs.input.focus(),t.$refs.input.select()}))},onInputEnter:function(){this.hasResults?this.getResultsList()[0].click():this.onInput()},onInput:function(){var t=this;return dt(ut().mark((function e(){var r,n,i,o,a;return ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,d.j8)("nextcloud:unified-search.search",{query:t.query}),""!==t.query.trim()&&!t.isShortQuery){e.next=5;break}r=at(t.typesIDs);try{for(r.s();!(n=r.n()).done;)i=n.value,t.$delete(t.results,i)}catch(t){r.e(t)}finally{r.f()}return e.abrupt("return");case 5:return o=t.typesIDs,a=t.query,t.usedFiltersNot.length>0&&(o=t.typesIDs.filter((function(e){return-1===t.usedFiltersNot.indexOf(e)}))),t.usedFiltersIn.length>0&&(o=t.typesIDs.filter((function(e){return t.usedFiltersIn.indexOf(e)>-1}))),a=a.replace(J,"").replace(tt,""),e.next=12,t.resetState();case 12:if(t.triggered=!0,o.length){e.next=16;break}return t.logger.error("No types to search in"),e.abrupt("return");case 16:t.$set(t.loading,"all",!0),t.logger.debug("Searching ".concat(a," in"),o),Promise.all(o.map(function(){var e=dt(ut().mark((function e(r){var n,i,o,c,s;return ut().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=nt({type:r,query:a}),i=n.request,o=n.cancel,t.requests.push(o),e.next=5,i();case 5:return c=e.sent,(s=c.data).ocs.data.entries.length>0?t.$set(t.results,r,s.ocs.data.entries):t.$delete(t.results,r),s.ocs.data.cursor?t.$set(t.cursors,r,s.ocs.data.cursor):s.ocs.data.isPaginated||t.$set(t.limits,r,t.defaultLimit),s.ocs.data.entries.length<t.defaultLimit&&t.$set(t.reached,r,!0),null===t.focused&&(t.focused=0),e.abrupt("return",1);case 14:if(e.prev=14,e.t0=e.catch(0),t.$delete(t.results,r),!e.t0.response||!e.t0.response.status){e.next=21;break}return t.logger.error("Error searching for ".concat(t.typesMap[r]),e.t0),(0,f.x2)(t.t("core","An error occurred while searching for {type}",{type:t.typesMap[r]})),e.abrupt("return",0);case 21:return e.abrupt("return",2);case 22:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(t){return e.apply(this,arguments)}}())).then((function(e){e.some((function(t){return 2===t}))||(t.loading={})}));case 19:case"end":return e.stop()}}),e)})))()},onInputDebounced:X?l()((function(t){this.onInput(t)}),500):function(){this.triggered=!1},loadMore:function(t){var e=this;return dt(ut().mark((function r(){var n,i,o,a,c,s;return ut().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e.loading[t]){r.next=2;break}return r.abrupt("return");case 2:if(!e.cursors[t]){r.next=14;break}return n=nt({type:t,query:e.query,cursor:e.cursors[t]}),i=n.request,o=n.cancel,e.requests.push(o),r.next=7,i();case 7:a=r.sent,(c=a.data).ocs.data.cursor&&e.$set(e.cursors,t,c.ocs.data.cursor),c.ocs.data.entries.length>0&&(s=e.results[t]).push.apply(s,ot(c.ocs.data.entries)),c.ocs.data.entries.length<e.defaultLimit&&e.$set(e.reached,t,!0),r.next=15;break;case 14:e.limits[t]&&e.limits[t]>=0&&(e.limits[t]+=e.defaultLimit,e.limits[t]>=e.results[t].length&&e.$set(e.reached,t,!0));case 15:null!==e.focused&&e.$nextTick((function(){e.focusIndex(e.focused)}));case 16:case"end":return r.stop()}}),r)})))()},limitIfAny:function(t,e){return e in this.limits?t.slice(0,this.limits[e]):t},getResultsList:function(){return this.$el.querySelectorAll(".unified-search__results .unified-search__result")},focusFirst:function(t){var e=this.getResultsList();e&&e.length>0&&(t&&t.preventDefault(),this.focused=0,this.focusIndex(this.focused))},focusNext:function(t){if(null!==this.focused){var e=this.getResultsList();e&&e.length>0&&this.focused+1<e.length&&(t.preventDefault(),this.focused++,this.focusIndex(this.focused))}else this.focusFirst(t)},focusPrev:function(t){if(null!==this.focused){var e=this.getResultsList();e&&e.length>0&&this.focused>0&&(t.preventDefault(),this.focused--,this.focusIndex(this.focused))}else this.focusFirst(t)},focusIndex:function(t){var e=this.getResultsList();e&&e[t]&&e[t].focus()},setFocusedIndex:function(t){var e=t.target,r=ot(this.getResultsList()).findIndex((function(t){return t===e}));r>-1&&(this.focused=r)},onClickFilter:function(t){this.query="".concat(this.query," ").concat(t).replace(/ {2}/g," ").trim(),this.onInput()}}},ht=ft,pt=i(79746),At={};At.styleTagTransform=B(),At.setAttributes=D(),At.insert=L().bind(null,"head"),At.domAPI=S(),At.insertStyleElement=O(),x()(pt.Z,At),pt.Z&&pt.Z.locals&&pt.Z.locals;var vt=(0,y.Z)(ht,(function(){var t=this,e=t._self._c;return e("NcHeaderMenu",{staticClass:"unified-search",attrs:{id:"unified-search","exclude-click-outside-selectors":[".popover"],open:t.open,"aria-label":t.ariaLabel},on:{"update:open":function(e){t.open=e},open:t.onOpen,close:t.onClose},scopedSlots:t._u([{key:"trigger",fn:function(){return[e("Magnify",{staticClass:"unified-search__trigger",attrs:{size:22}})]},proxy:!0}])},[t._v(" "),e("div",{staticClass:"unified-search__input-wrapper"},[e("label",{attrs:{for:"unified-search__input"}},[t._v(t._s(t.ariaLabel))]),t._v(" "),e("div",{staticClass:"unified-search__input-row"},[e("form",{staticClass:"unified-search__form",class:{"icon-loading-small":t.isLoading},attrs:{role:"search"},on:{submit:function(e){return e.preventDefault(),e.stopPropagation(),t.onInputEnter.apply(null,arguments)},reset:function(e){return e.preventDefault(),e.stopPropagation(),t.onReset.apply(null,arguments)}}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.query,expression:"query"}],ref:"input",staticClass:"unified-search__form-input",class:{"unified-search__form-input--with-reset":!!t.query},attrs:{id:"unified-search__input",type:"search",placeholder:t.t("core","Search {types} …",{types:t.typesNames.join(", ")}),"aria-describedby":"unified-search-desc"},domProps:{value:t.query},on:{input:[function(e){e.target.composing||(t.query=e.target.value)},t.onInputDebounced],keypress:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),e.stopPropagation(),t.onInputEnter.apply(null,arguments))}}}),t._v(" "),e("p",{staticClass:"hidden-visually",attrs:{id:"unified-search-desc"}},[t._v("\n\t\t\t\t\t"+t._s(t.t("core","Search starts once you start typing and results may be reached with the arrow keys"))+"\n\t\t\t\t")]),t._v(" "),t.query&&!t.isLoading?e("input",{staticClass:"unified-search__form-reset icon-close",attrs:{type:"reset","aria-label":t.t("core","Reset search"),value:""}}):t._e(),t._v(" "),!t.query||t.isLoading||t.enableLiveSearch?t._e():e("input",{staticClass:"unified-search__form-submit icon-confirm",attrs:{type:"submit","aria-label":t.t("core","Start search"),value:""}})]),t._v(" "),t.availableFilters.length>1?e("NcActions",{staticClass:"unified-search__filters",attrs:{placement:"bottom",container:".unified-search__input-wrapper"}},t._l(t.availableFilters,(function(r){return e("NcActionButton",{key:r,attrs:{icon:"icon-filter",title:t.t("core","Search for {name} only",{name:t.typesMap[r]})},on:{click:function(e){return e.stopPropagation(),t.onClickFilter("in:".concat(r))}}},[t._v("\n\t\t\t\t\t"+t._s("in:".concat(r))+"\n\t\t\t\t")])})),1):t._e()],1)]),t._v(" "),t.hasResults?t._l(t.orderedResults,(function(r,n){var i=r.list,o=r.type;return e("ul",{key:o,staticClass:"unified-search__results",class:"unified-search__results-".concat(o),attrs:{"aria-label":t.typesMap[o]}},[e("h2",{staticClass:"unified-search__results-header"},[t._v("\n\t\t\t\t"+t._s(t.typesMap[o])+"\n\t\t\t")]),t._v(" "),t._l(t.limitIfAny(i,o),(function(r,i){return e("li",{key:r.resourceUrl},[e("SearchResult",t._b({attrs:{query:t.query,focused:0===t.focused&&0===n&&0===i},on:{focus:t.setFocusedIndex}},"SearchResult",r,!1))],1)})),t._v(" "),e("li",[t.reached[o]?t._e():e("SearchResult",{staticClass:"unified-search__result-more",attrs:{title:t.loading[o]?t.t("core","Loading more results …"):t.t("core","Load more results"),"icon-class":t.loading[o]?"icon-loading-small":""},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.loadMore(o)},focus:t.setFocusedIndex}})],1)],2)})):[t.isLoading?e("SearchResultPlaceholders"):t.isValidQuery?e("NcEmptyContent",{attrs:{title:t.validQueryTitle},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Magnify")]},proxy:!0}],null,!1,931131664)}):!t.isLoading||t.isShortQuery?e("NcEmptyContent",{attrs:{title:t.t("core","Start typing to search"),description:t.shortQueryDescription},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Magnify")]},proxy:!0}],null,!1,931131664)}):t._e()]],2)}),[],!1,null,"34091dcc",null),mt=vt.exports;i.nc=btoa((0,a.IH)());var gt=(0,o.IY)().setApp("unified-search").detectUser().build();s.default.mixin({data:function(){return{logger:gt}},methods:{t:c.Iu,n:c.uN}}),new s.default({el:"#unified-search",name:"UnifiedSearchRoot",render:function(t){return t(mt)}})},20427:function(t,e,r){var n=r(87537),i=r.n(n),o=r(23645),a=r.n(o)()(i());a.push([t.id,".unified-search__result[data-v-0ec7b18f]{display:flex;align-items:center;height:44px;padding:10px;border:2px solid rgba(0,0,0,0);border-radius:var(--border-radius-large) !important}.unified-search__result--focused[data-v-0ec7b18f]{background-color:var(--color-background-hover)}.unified-search__result[data-v-0ec7b18f]:active,.unified-search__result[data-v-0ec7b18f]:hover,.unified-search__result[data-v-0ec7b18f]:focus{background-color:var(--color-background-hover);border:2px solid var(--color-border-maxcontrast)}.unified-search__result *[data-v-0ec7b18f]{cursor:pointer}.unified-search__result-icon[data-v-0ec7b18f]{overflow:hidden;width:44px;height:44px;border-radius:var(--border-radius);background-repeat:no-repeat;background-position:center center;background-size:32px}.unified-search__result-icon--rounded[data-v-0ec7b18f]{border-radius:22px}.unified-search__result-icon--no-preview[data-v-0ec7b18f]{background-size:32px}.unified-search__result-icon--with-thumbnail[data-v-0ec7b18f]{background-size:cover}.unified-search__result-icon--with-thumbnail[data-v-0ec7b18f]:not(.unified-search__result-icon--rounded){max-width:42px;max-height:42px;border:1px solid var(--color-border)}.unified-search__result-icon img[data-v-0ec7b18f]{width:100%;height:100%;object-fit:cover;object-position:center}.unified-search__result-icon[data-v-0ec7b18f],.unified-search__result-actions[data-v-0ec7b18f]{flex:0 0 44px}.unified-search__result-content[data-v-0ec7b18f]{display:flex;align-items:center;flex:1 1 100%;flex-wrap:wrap;min-width:0;padding-left:10px}.unified-search__result-line-one[data-v-0ec7b18f],.unified-search__result-line-two[data-v-0ec7b18f]{overflow:hidden;flex:1 1 100%;margin:1px 0;white-space:nowrap;text-overflow:ellipsis;color:inherit;font-size:inherit}.unified-search__result-line-two[data-v-0ec7b18f]{opacity:.7;font-size:var(--default-font-size)}","",{version:3,sources:["webpack://./core/src/components/UnifiedSearch/SearchResult.vue"],names:[],mappings:"AAMA,yCACC,YAAA,CACA,kBAAA,CACA,WANgB,CAOhB,YANQ,CAOR,8BAAA,CACA,mDAAA,CAEA,kDACC,8CAAA,CAGD,8IAGC,8CAAA,CACA,gDAAA,CAGD,2CACC,cAAA,CAGD,8CACC,eAAA,CACA,UA5Be,CA6Bf,WA7Be,CA8Bf,kCAAA,CACA,2BAAA,CACA,iCAAA,CACA,oBAAA,CACA,uDACC,kBAAA,CAED,0DACC,oBAAA,CAED,8DACC,qBAAA,CAED,yGAEC,cAAA,CACA,eAAA,CACA,oCAAA,CAGD,kDAEC,UAAA,CACA,WAAA,CAEA,gBAAA,CACA,sBAAA,CAIF,+FAEC,aAAA,CAGD,iDACC,YAAA,CACA,kBAAA,CACA,aAAA,CACA,cAAA,CAEA,WAAA,CACA,iBAvEO,CA0ER,oGAEC,eAAA,CACA,aAAA,CACA,YAAA,CACA,kBAAA,CACA,sBAAA,CAEA,aAAA,CACA,iBAAA,CAED,kDACC,UAAA,CACA,kCAAA",sourcesContent:['\n@use "sass:math";\n\n$clickable-area: 44px;\n$margin: 10px;\n\n.unified-search__result {\n\tdisplay: flex;\n\talign-items: center;\n\theight: $clickable-area;\n\tpadding: $margin;\n\tborder: 2px solid transparent;\n\tborder-radius: var(--border-radius-large) !important;\n\n\t&--focused {\n\t\tbackground-color: var(--color-background-hover);\n\t}\n\n\t&:active,\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder: 2px solid var(--color-border-maxcontrast);\n\t}\n\n\t* {\n\t\tcursor: pointer;\n\t}\n\n\t&-icon {\n\t\toverflow: hidden;\n\t\twidth: $clickable-area;\n\t\theight: $clickable-area;\n\t\tborder-radius: var(--border-radius);\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center center;\n\t\tbackground-size: 32px;\n\t\t&--rounded {\n\t\t\tborder-radius: math.div($clickable-area, 2);\n\t\t}\n\t\t&--no-preview {\n\t\t\tbackground-size: 32px;\n\t\t}\n\t\t&--with-thumbnail {\n\t\t\tbackground-size: cover;\n\t\t}\n\t\t&--with-thumbnail:not(&--rounded) {\n\t\t\t// compensate for border\n\t\t\tmax-width: $clickable-area - 2px;\n\t\t\tmax-height: $clickable-area - 2px;\n\t\t\tborder: 1px solid var(--color-border);\n\t\t}\n\n\t\timg {\n\t\t\t// Make sure to keep ratio\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\n\t\t\tobject-fit: cover;\n\t\t\tobject-position: center;\n\t\t}\n\t}\n\n\t&-icon,\n\t&-actions {\n\t\tflex: 0 0 $clickable-area;\n\t}\n\n\t&-content {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tflex: 1 1 100%;\n\t\tflex-wrap: wrap;\n\t\t// Set to minimum and gro from it\n\t\tmin-width: 0;\n\t\tpadding-left: $margin;\n\t}\n\n\t&-line-one,\n\t&-line-two {\n\t\toverflow: hidden;\n\t\tflex: 1 1 100%;\n\t\tmargin: 1px 0;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\t// Use the same color as the `a`\n\t\tcolor: inherit;\n\t\tfont-size: inherit;\n\t}\n\t&-line-two {\n\t\topacity: .7;\n\t\tfont-size: var(--default-font-size);\n\t}\n}\n\n'],sourceRoot:""}]),e.Z=a},78033:function(t,e,r){var n=r(87537),i=r.n(n),o=r(23645),a=r.n(o)()(i());a.push([t.id,".unified-search__result-placeholder-gradient[data-v-9ed03c40]{position:fixed;height:0;width:0;z-index:-1}.unified-search__result-placeholder[data-v-9ed03c40]{width:calc(100% - 2 * 10px);height:44px;margin:10px}.unified-search__result-placeholder-icon[data-v-9ed03c40]{width:44px;height:44px;rx:var(--border-radius);ry:var(--border-radius)}.unified-search__result-placeholder-line-one[data-v-9ed03c40],.unified-search__result-placeholder-line-two[data-v-9ed03c40]{width:calc(100% - 54px);height:1em;x:54px}.unified-search__result-placeholder-line-one[data-v-9ed03c40]{y:5px}.unified-search__result-placeholder-line-two[data-v-9ed03c40]{y:25px}","",{version:3,sources:["webpack://./core/src/components/UnifiedSearch/SearchResultPlaceholders.vue"],names:[],mappings:"AAIA,8DACC,cAAA,CACA,QAAA,CACA,OAAA,CACA,UAAA,CAGD,qDACC,2BAAA,CACA,WAZgB,CAahB,WAZQ,CAcR,0DACC,UAhBe,CAiBf,WAjBe,CAkBf,uBAAA,CACA,uBAAA,CAGD,4HAEC,uBAAA,CACA,UAAA,CACA,MAAA,CAGD,8DACC,KAAA,CAGD,8DACC,MAAA",sourcesContent:["\n$clickable-area: 44px;\n$margin: 10px;\n\n.unified-search__result-placeholder-gradient {\n\tposition: fixed;\n\theight: 0;\n\twidth: 0;\n\tz-index: -1;\n}\n\n.unified-search__result-placeholder {\n\twidth: calc(100% - 2 * #{$margin});\n\theight: $clickable-area;\n\tmargin: $margin;\n\n\t&-icon {\n\t\twidth: $clickable-area;\n\t\theight: $clickable-area;\n\t\trx: var(--border-radius);\n\t\try: var(--border-radius);\n\t}\n\n\t&-line-one,\n\t&-line-two {\n\t\twidth: calc(100% - #{$margin + $clickable-area});\n\t\theight: 1em;\n\t\tx: $margin + $clickable-area;\n\t}\n\n\t&-line-one {\n\t\ty: 5px;\n\t}\n\n\t&-line-two {\n\t\ty: 25px;\n\t}\n}\n\n"],sourceRoot:""}]),e.Z=a},79746:function(t,e,r){var n=r(87537),i=r.n(n),o=r(23645),a=r.n(o)()(i());a.push([t.id,".unified-search__input-wrapper[data-v-34091dcc]{position:sticky;z-index:2;top:0;display:inline-flex;flex-direction:column;align-items:center;width:100%;background-color:var(--color-main-background)}.unified-search__input-wrapper label[for=unified-search__input][data-v-34091dcc]{align-self:flex-start;font-weight:bold;font-size:19px;margin-left:13px}.unified-search__form-input[data-v-34091dcc]{margin:0 !important}.unified-search__input-row[data-v-34091dcc]{display:flex;width:100%;align-items:center}.unified-search__filters[data-v-34091dcc]{margin:10px 0 10px 5px}.unified-search__filters ul[data-v-34091dcc]{display:inline-flex;justify-content:space-between}.unified-search__form[data-v-34091dcc]{position:relative;width:100%;margin:10px 0}.unified-search__form[data-v-34091dcc]::after{right:6px;left:auto}.unified-search__form-input[data-v-34091dcc],.unified-search__form-reset[data-v-34091dcc]{margin:3px}.unified-search__form-input[data-v-34091dcc]{width:100%;height:34px;padding:6px}.unified-search__form-input[data-v-34091dcc],.unified-search__form-input[placeholder][data-v-34091dcc],.unified-search__form-input[data-v-34091dcc]::placeholder{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.unified-search__form-input[data-v-34091dcc]::-webkit-search-decoration,.unified-search__form-input[data-v-34091dcc]::-webkit-search-cancel-button,.unified-search__form-input[data-v-34091dcc]::-webkit-search-results-button,.unified-search__form-input[data-v-34091dcc]::-webkit-search-results-decoration{-webkit-appearance:none}.icon-loading-small .unified-search__form-input[data-v-34091dcc],.unified-search__form-input--with-reset[data-v-34091dcc]{padding-right:34px}.unified-search__form-reset[data-v-34091dcc],.unified-search__form-submit[data-v-34091dcc]{position:absolute;top:0;right:4px;width:28px;height:28px;min-height:30px;padding:0;opacity:.5;border:none;background-color:rgba(0,0,0,0);margin-right:0}.unified-search__form-reset[data-v-34091dcc]:hover,.unified-search__form-reset[data-v-34091dcc]:focus,.unified-search__form-reset[data-v-34091dcc]:active,.unified-search__form-submit[data-v-34091dcc]:hover,.unified-search__form-submit[data-v-34091dcc]:focus,.unified-search__form-submit[data-v-34091dcc]:active{opacity:1}.unified-search__form-submit[data-v-34091dcc]{right:28px}.unified-search__results[data-v-34091dcc]{display:flex;flex-direction:column;gap:4px}.unified-search__results-header[data-v-34091dcc]{display:block;margin:10px;margin-bottom:6px;margin-left:13px;color:var(--color-primary-element);font-size:19px;font-weight:bold}.unified-search .unified-search__result-more[data-v-34091dcc]{color:var(--color-text-maxcontrast)}.unified-search .empty-content[data-v-34091dcc]{margin:10vh 0}.unified-search .empty-content[data-v-34091dcc] .empty-content__title{font-weight:normal;font-size:var(--default-font-size);text-align:center}","",{version:3,sources:["webpack://./core/src/views/UnifiedSearch.vue"],names:[],mappings:"AAQC,gDACC,eAAA,CAEA,SAAA,CACA,KAAA,CACA,mBAAA,CACA,qBAAA,CACA,kBAAA,CACA,UAAA,CACA,6CAAA,CAEA,iFACC,qBAAA,CACA,gBAAA,CACA,cAAA,CACA,gBAAA,CAIF,6CACC,mBAAA,CAGD,4CACC,YAAA,CACA,UAAA,CACA,kBAAA,CAGD,0CACC,sBAAA,CACA,6CACC,mBAAA,CACA,6BAAA,CAIF,uCACC,iBAAA,CACA,UAAA,CACA,aAAA,CAGA,8CACC,SA/Ca,CAgDb,SAAA,CAGD,0FAEC,UAAA,CAGD,6CACC,UAAA,CACA,WA3DY,CA4DZ,WA3Da,CA6Db,iKAGC,eAAA,CACA,kBAAA,CACA,sBAAA,CAID,+SAIC,uBAAA,CAID,0HAEC,kBAjFW,CAqFb,2FACC,iBAAA,CACA,KAAA,CACA,SAAA,CACA,UAAA,CACA,WAAA,CACA,eAAA,CACA,SAAA,CACA,UAAA,CACA,WAAA,CACA,8BAAA,CACA,cAAA,CAEA,uTAGC,SAAA,CAIF,8CACC,UAAA,CAIF,0CAUC,YAAA,CACA,qBAAA,CACA,OAAA,CAXA,iDACC,aAAA,CACA,WAlHM,CAmHN,iBAAA,CACA,gBAAA,CACA,kCAAA,CACA,cAAA,CACA,gBAAA,CAOF,8DACC,mCAAA,CAGD,gDACC,aAAA,CAEA,sEACC,kBAAA,CACS,kCAAA,CACT,iBAAA",sourcesContent:['\n@use "sass:math";\n\n$margin: 10px;\n$input-height: 34px;\n$input-padding: 6px;\n\n.unified-search {\n\t&__input-wrapper {\n\t\tposition: sticky;\n\t\t// above search results\n\t\tz-index: 2;\n\t\ttop: 0;\n\t\tdisplay: inline-flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\twidth: 100%;\n\t\tbackground-color: var(--color-main-background);\n\n\t\tlabel[for="unified-search__input"] {\n\t\t\talign-self: flex-start;\n\t\t\tfont-weight: bold;\n\t\t\tfont-size: 19px;\n\t\t\tmargin-left: 13px;\n\t\t}\n\t}\n\n\t&__form-input {\n\t\tmargin: 0 !important;\n\t}\n\n\t&__input-row {\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\talign-items: center;\n\t}\n\n\t&__filters {\n\t\tmargin: $margin 0 $margin math.div($margin, 2);\n\t\tul {\n\t\t\tdisplay: inline-flex;\n\t\t\tjustify-content: space-between;\n\t\t}\n\t}\n\n\t&__form {\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\tmargin: $margin 0;\n\n\t\t// Loading spinner\n\t\t&::after {\n\t\t\tright: $input-padding;\n\t\t\tleft: auto;\n\t\t}\n\n\t\t&-input,\n\t\t&-reset {\n\t\t\tmargin: math.div($input-padding, 2);\n\t\t}\n\n\t\t&-input {\n\t\t\twidth: 100%;\n\t\t\theight: $input-height;\n\t\t\tpadding: $input-padding;\n\n\t\t\t&,\n\t\t\t&[placeholder],\n\t\t\t&::placeholder {\n\t\t\t\toverflow: hidden;\n\t\t\t\twhite-space: nowrap;\n\t\t\t\ttext-overflow: ellipsis;\n\t\t\t}\n\n\t\t\t// Hide webkit clear search\n\t\t\t&::-webkit-search-decoration,\n\t\t\t&::-webkit-search-cancel-button,\n\t\t\t&::-webkit-search-results-button,\n\t\t\t&::-webkit-search-results-decoration {\n\t\t\t\t-webkit-appearance: none;\n\t\t\t}\n\n\t\t\t// Ellipsis earlier if reset button is here\n\t\t\t.icon-loading-small &,\n\t\t\t&--with-reset {\n\t\t\t\tpadding-right: $input-height;\n\t\t\t}\n\t\t}\n\n\t\t&-reset, &-submit {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tright: 4px;\n\t\t\twidth: $input-height - $input-padding;\n\t\t\theight: $input-height - $input-padding;\n\t\t\tmin-height: 30px;\n\t\t\tpadding: 0;\n\t\t\topacity: .5;\n\t\t\tborder: none;\n\t\t\tbackground-color: transparent;\n\t\t\tmargin-right: 0;\n\n\t\t\t&:hover,\n\t\t\t&:focus,\n\t\t\t&:active {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\n\t\t&-submit {\n\t\t\tright: 28px;\n\t\t}\n\t}\n\n\t&__results {\n\t\t&-header {\n\t\t\tdisplay: block;\n\t\t\tmargin: $margin;\n\t\t\tmargin-bottom: $margin - 4px;\n\t\t\tmargin-left: 13px;\n\t\t\tcolor: var(--color-primary-element);\n\t\t\tfont-size: 19px;\n\t\t\tfont-weight: bold;\n\t\t}\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 4px;\n\t}\n\n\t.unified-search__result-more::v-deep {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t.empty-content {\n\t\tmargin: 10vh 0;\n\n\t\t::v-deep .empty-content__title {\n\t\t\tfont-weight: normal;\n font-size: var(--default-font-size);\n\t\t\ttext-align: center;\n\t\t}\n\t}\n}\n\n'],sourceRoot:""}]),e.Z=a}},a={};function c(t){var e=a[t];if(void 0!==e)return e.exports;var r=a[t]={id:t,loaded:!1,exports:{}};return o[t].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.m=o,e=[],c.O=function(t,r,n,i){if(!r){var o=1/0;for(l=0;l<e.length;l++){r=e[l][0],n=e[l][1],i=e[l][2];for(var a=!0,s=0;s<r.length;s++)(!1&i||o>=i)&&Object.keys(c.O).every((function(t){return c.O[t](r[s])}))?r.splice(s--,1):(a=!1,i<o&&(o=i));if(a){e.splice(l--,1);var u=n();void 0!==u&&(t=u)}}return t}i=i||0;for(var l=e.length;l>0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[r,n,i]},c.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return c.d(e,{a:e}),e},c.d=function(t,e){for(var r in e)c.o(e,r)&&!c.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},c.f={},c.e=function(t){return Promise.all(Object.keys(c.f).reduce((function(e,r){return c.f[r](t,e),e}),[]))},c.u=function(t){return t+"-"+t+".js?v="+{2250:"9c98ca37abd9ee1927b3",7996:"39e55a09e2da8534cf16"}[t]},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r={},i="nextcloud:",c.l=function(t,e,n,o){if(r[t])r[t].push(e);else{var a,s;if(void 0!==n)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var d=u[l];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==i+n){a=d;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,c.nc&&a.setAttribute("nonce",c.nc),a.setAttribute("data-webpack",i+n),a.src=t),r[t]=[e];var f=function(e,n){a.onerror=a.onload=null,clearTimeout(h);var i=r[t];if(delete r[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((function(t){return t(n)})),e)return e(n)},h=setTimeout(f.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=f.bind(null,a.onerror),a.onload=f.bind(null,a.onload),s&&document.head.appendChild(a)}},c.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},c.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},c.j=9671,function(){var t;c.g.importScripts&&(t=c.g.location+"");var e=c.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&!t;)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=t}(),function(){c.b=document.baseURI||self.location.href;var t={9671:0};c.f.j=function(e,r){var n=c.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise((function(r,i){n=t[e]=[r,i]}));r.push(n[2]=i);var o=c.p+c.u(e),a=new Error;c.l(o,(function(r){if(c.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;a.message="Loading chunk "+e+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,n[1](a)}}),"chunk-"+e,e)}},c.O.j=function(e){return 0===t[e]};var e=function(e,r){var n,i,o=r[0],a=r[1],s=r[2],u=0;if(o.some((function(e){return 0!==t[e]}))){for(n in a)c.o(a,n)&&(c.m[n]=a[n]);if(s)var l=s(c)}for(e&&e(r);u<o.length;u++)i=o[u],c.o(t,i)&&t[i]&&t[i][0](),t[i]=0;return c.O(l)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))}(),c.nc=void 0;var s=c.O(void 0,[7874],(function(){return c(36932)}));s=c.O(s)}();
  3. //# sourceMappingURL=core-unified-search.js.map?v=23ce5ceaf8864a19f552