nextcloud/dist/dav-settings-example-content.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

2 lines
198 KiB
JavaScript
Raw Normal View History

(()=>{"use strict";var e,n,a,i={12236:(e,t,n)=>{n.d(t,{N:()=>Yt}),n(15327);var a=n(85471),i=n(93646),r=n(43921),o=n(19051),l=n(97635),s=n(21777),c=n(63814),d=n(51431),u=n(77333),p=n(47970),A=n(64546),v=n(33239),f=n(86241),m=n(8019),h=n(87798),g=n(76643),b=n(3288),C=n(19998),y=n(86435),x=n(43819),E=n(40173);const _={name:"NcReferenceList",components:{NcReferenceWidget:i.N},props:{text:{type:String,default:""},referenceData:{type:Array,default:null},limit:{type:Number,default:1},displayFallback:{type:Boolean,default:!1},interactive:{type:Boolean,default:!0},interactiveOptIn:{type:Boolean,default:!1}},data:()=>({references:null,loading:!0}),computed:{isVisible(){return this.loading||0!==this.displayedReferences.length},values(){return this.referenceData?this.referenceData:!this.displayFallback||this.loading||this.references?this.references?Object.values(this.references):[]:[this.fallbackReference]},firstReference(){return this.values[0]??null},displayedReferences(){return this.values.slice(0,this.limit)},fallbackReference(){return{accessible:!0,openGraphObject:{id:this.text,link:this.text,name:this.text},richObjectType:"open-graph"}}},watch:{text:"fetch"},mounted(){this.fetch()},methods:{fetch(){return this.loading=!0,this.referenceData?(this.references=null,void(this.loading=!1)):new RegExp(r.U).exec(this.text)?void this.resolve().then(e=>{this.references=e.data.ocs.data.references,this.loading=!1,this.$emit("loaded")}).catch(e=>{console.error("Failed to extract references",e),this.loading=!1,this.$emit("loaded")}):(this.references=null,void(this.loading=!1))},resolve(){const e=new RegExp(r.U).exec(this.text.trim()),t=null===(0,s.HW)();return 1===this.limit&&e?t?o.Ay.get((0,c.KT)("references/resolvePublic")+`?reference=${encodeURIComponent(e[0])}&sharingToken=${(0,l.G)()}`):o.Ay.get((0,c.KT)("references/resolve")+`?reference=${encodeURIComponent(e[0])}`):t?o.Ay.post((0,c.KT)("references/extractPublic"),{text:this.text,resolve:!0,limit:this.limit,sharingToken:(0,l.G)()}):o.Ay.post((0,c.KT)("references/extract"),{text:this.text,resolve:!0,limit:this.limit})}}};var k=function(){var e=this,t=e._self._c;return e.isVisible?t("div",{staticClass:"widgets--list",class:{"icon-loading":e.loading}},e._l(e.displayedReferences,function(n){return t("NcReferenceWidget",{key:n?.openGraphObject?.id,attrs:{reference:n,interactive:e.interactive,"interactive-opt-in":e.interactiveOptIn}})}),1):e._e()},B=[];const w=(0,d.n)(_,k,B,!1,null,"ffdba753").exports,S=function(){return function(e){(0,p.YR)(e,e=>"text"===e.type,function(e,t,n){const a=e.value.split(/(\{[a-z\-_.0-9]+\})/gi).map((e,t,n)=>{const a=e.match(/^\{([a-z\-_.0-9]+)\}$/i);if(!a)return(0,v.u)("text",e);const[,i]=a;return(0,v.u)("element",{tagName:`#${i}`})});n.children.splice(t,1,...a)})}},I=function(){return function(e){(0,p.YR)(e,e=>["text","code","inlineCode"].includes(e.type),(e,t,n)=>(n.children.splice(t,1,{...e,value:e.value.replace(/&lt;/gim,"<").replace(/&gt;/gim,">")}),[A._Z,t+1]))}};function N(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let a=0,i=n.indexOf(t);for(;-1!==i;)a++,i=n.indexOf(t,i+t.length);return a}const P=R(/[A-Za-z]/),D=R(/[\dA-Za-z]/);function L(e){return null!==e&&e<-2}function T(e){return null!==e&&(e<0||32===e)}function j(e){return-2===e||-1===e||32===e}const F=R(new RegExp("\\p{P}|\\p{S}","u")),G=R(/\s/);function R(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}const O=function(e){if(null==e)return X;if("function"==typeof e)return z(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=O(e[n]);return z(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):function(e){const t=e;return z(function(n){const a=n;let i;for(i in e)if(a[i]!==t[i])return!1;return!0})}(e);if("string"==typeof e)return t=e,z(function(e){return e&&e.type===t});var t;throw new Error("Expected function, string, or object as test")};function z(e){return function(t,n,a){return Boolean(function(e){return null!==e&&"object"==typeof e&
//# sourceMappingURL=dav-settings-example-content.js.map?v=ebf85be999eb3abd5efa