12 |
- (self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[2351],{17816:function(t,e,r){var n=r(96763);t.exports=function(){"use strict";function t(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}var e=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(e,r){var i;i=function(){return function e(r,n,i){function s(o,l){if(!n[o]){if(!r[o]){if(!l&&t)return t();if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var h=n[o]={exports:{}};r[o][0].call(h.exports,(function(t){return s(r[o][1][t]||t)}),h,h.exports,e,r,n,i)}return n[o].exports}for(var a=t,o=0;o<i.length;o++)s(i[o]);return s}({1:[function(t,e,r){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},{}],2:[function(t,e,r){var n=t("./utils").getSymbolSize;r.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,r=n(t),i=145===r?26:2*Math.ceil((r-13)/(2*e-2)),s=[r-7],a=1;a<e-1;a++)s[a]=s[a-1]-i;return s.push(6),s.reverse()},r.getPositions=function(t){for(var e=[],n=r.getRowColCoords(t),i=n.length,s=0;s<i;s++)for(var a=0;a<i;a++)0===s&&0===a||0===s&&a===i-1||s===i-1&&0===a||e.push([n[s],n[a]]);return e}},{"./utils":21}],3:[function(t,e,r){var n=t("./mode"),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function s(t){this.mode=n.ALPHANUMERIC,this.data=t}s.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(t){var e;for(e=0;e+2<=this.data.length;e+=2){var r=45*i.indexOf(this.data[e]);r+=i.indexOf(this.data[e+1]),t.put(r,11)}this.data.length%2&&t.put(i.indexOf(this.data[e]),6)},e.exports=s},{"./mode":14}],4:[function(t,e,r){function n(){this.buffer=[],this.length=0}n.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var r=0;r<e;r++)this.putBit(1==(t>>>e-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},e.exports=n},{}],5:[function(t,e,r){var n=t("../utils/buffer");function i(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=n.alloc(t*t),this.reservedBit=n.alloc(t*t)}i.prototype.set=function(t,e,r,n){var i=t*this.size+e;this.data[i]=r,n&&(this.reservedBit[i]=!0)},i.prototype.get=function(t,e){return this.data[t*this.size+e]},i.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r},i.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},e.exports=i},{"../utils/buffer":28}],6:[function(t,e,r){var n=t("../utils/buffer"),i=t("./mode");function s(t){this.mode=i.BYTE,this.data=n.from(t)}s.getBitsLength=function(t){return 8*t},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(t){for(var e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)},e.exports=s},{"../utils/buffer":28,"./mode":14}],7:[function(t,e,r){var n=t("./error-correction-level"),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],s=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];r.getBlocksCount=function(t,e){switch(e){case n.L:return i[4*(t-1)+0];case n.M:return i[4*(t-1)+1];case n.Q:return i[4*(t-1)+2];case n.H:return i[4*(t-1)+3];default:return}},r.getTotalCodewordsCount=function(t,e){switch(e){case n.L:return s[4*(t-1)+0];case n.M:return s[4*(t-1)+1];case n.Q:return s[4*(t-1)+2];case n.H:return s[4*(t-1)+3];default:return}}},{"./error-correction-level":8}],8:[function(t,e,r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2},r.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},r.from=function(t,e){if(r.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return e}}},{}],9:[function(t,e,r){var n=t("./utils").getSymbolSize;r.getPositions=function(t){var e=n(t);return[[0,0],[e-7,0],[0,e-7]]}},{"./utils":21}],10:[function(t,e,r){var n=t("./utils"),i=n.getBCHDigit(1335);r.getEncodedBits=function(t,e){for(var r=t.bit<<3|e,s=r<<10;n.getBCHDigit(s)-i>=0;)s^=1335<<n.getBCHDigit(s)-i;return 21522^(r<<10|s)}},{"./utils":21}],11:[function(t,e,r){var n=t("../utils/buffer"),i=n.alloc(512),s=n.alloc(256);!function(){for(var t=1,e=0;e<255;e++)i[e]=t,s[t]=e,256&(t<<=1)&&(t^=285);for(e=255;e<512;e++)i[e]=i[e-255]}(),r.log=function(t){if(t<1)throw new Error("log("+t+")");return s[t]},r.exp=function(t){return i[t]},r.mul=function(t,e){return 0===t||0===e?0:i[s[t]+s[e]]}},{"../utils/buffer":28}],12:[function(t,e,r){var n=t("./mode"),i=t("./utils");function s(t){this.mode=n.KANJI,this.data=t}s.getBitsLength=function(t){return 13*t},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(t){var e;for(e=0;e<this.data.length;e++){var r=i.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else{if(!(r>=57408&&r<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13)}},e.exports=s},{"./mode":14,"./utils":21}],13:[function(t,e,r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var n=3,i=3,s=40,a=10;function o(t,e,n){switch(t){case r.Patterns.PATTERN000:return(e+n)%2==0;case r.Patterns.PATTERN001:return e%2==0;case r.Patterns.PATTERN010:return n%3==0;case r.Patterns.PATTERN011:return(e+n)%3==0;case r.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case r.Patterns.PATTERN101:return e*n%2+e*n%3==0;case r.Patterns.PATTERN110:return(e*n%2+e*n%3)%2==0;case r.Patterns.PATTERN111:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}r.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},r.from=function(t){return r.isValid(t)?parseInt(t,10):void 0},r.getPenaltyN1=function(t){for(var e=t.size,r=0,i=0,s=0,a=null,o=null,l=0;l<e;l++){i=s=0,a=o=null;for(var c=0;c<e;c++){var h=t.get(l,c);h===a?i++:(i>=5&&(r+=n+(i-5)),a=h,i=1),(h=t.get(c,l))===o?s++:(s>=5&&(r+=n+(s-5)),o=h,s=1)}i>=5&&(r+=n+(i-5)),s>=5&&(r+=n+(s-5))}return r},r.getPenaltyN2=function(t){for(var e=t.size,r=0,n=0;n<e-1;n++)for(var s=0;s<e-1;s++){var a=t.get(n,s)+t.get(n,s+1)+t.get(n+1,s)+t.get(n+1,s+1);4!==a&&0!==a||r++}return r*i},r.getPenaltyN3=function(t){for(var e=t.size,r=0,n=0,i=0,a=0;a<e;a++){n=i=0;for(var o=0;o<e;o++)n=n<<1&2047|t.get(a,o),o>=10&&(1488===n||93===n)&&r++,i=i<<1&2047|t.get(o,a),o>=10&&(1488===i||93===i)&&r++}return r*s},r.getPenaltyN4=function(t){for(var e=0,r=t.data.length,n=0;n<r;n++)e+=t.data[n];return Math.abs(Math.ceil(100*e/r/5)-10)*a},r.applyMask=function(t,e){for(var r=e.size,n=0;n<r;n++)for(var i=0;i<r;i++)e.isReserved(i,n)||e.xor(i,n,o(t,i,n))},r.getBestMask=function(t,e){for(var n=Object.keys(r.Patterns).length,i=0,s=1/0,a=0;a<n;a++){e(a),r.applyMask(a,t);var o=r.getPenaltyN1(t)+r.getPenaltyN2(t)+r.getPenaltyN3(t)+r.getPenaltyN4(t);r.applyMask(a,t),o<s&&(s=o,i=a)}return i}},{}],14:[function(t,e,r){var n=t("./version-check"),i=t("./regex");r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!n.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},r.getBestModeForData=function(t){return i.testNumeric(t)?r.NUMERIC:i.testAlphanumeric(t)?r.ALPHANUMERIC:i.testKanji(t)?r.KANJI:r.BYTE},r.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},r.isValid=function(t){return t&&t.bit&&t.ccBits},r.from=function(t,e){if(r.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return e}}},{"./regex":19,"./version-check":22}],15:[function(t,e,r){var n=t("./mode");function i(t){this.mode=n.NUMERIC,this.data=t.toString()}i.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){var e,r,n;for(e=0;e+3<=this.data.length;e+=3)r=this.data.substr(e,3),n=parseInt(r,10),t.put(n,10);var i=this.data.length-e;i>0&&(r=this.data.substr(e),n=parseInt(r,10),t.put(n,3*i+1))},e.exports=i},{"./mode":14}],16:[function(t,e,r){var n=t("../utils/buffer"),i=t("./galois-field");r.mul=function(t,e){for(var r=n.alloc(t.length+e.length-1),s=0;s<t.length;s++)for(var a=0;a<e.length;a++)r[s+a]^=i.mul(t[s],e[a]);return r},r.mod=function(t,e){for(var r=n.from(t);r.length-e.length>=0;){for(var s=r[0],a=0;a<e.length;a++)r[a]^=i.mul(e[a],s);for(var o=0;o<r.length&&0===r[o];)o++;r=r.slice(o)}return r},r.generateECPolynomial=function(t){for(var e=n.from([1]),s=0;s<t;s++)e=r.mul(e,[1,i.exp(s)]);return e}},{"../utils/buffer":28,"./galois-field":11}],17:[function(t,e,r){var n=t("../utils/buffer"),i=t("./utils"),s=t("./error-correction-level"),a=t("./bit-buffer"),o=t("./bit-matrix"),l=t("./alignment-pattern"),c=t("./finder-pattern"),h=t("./mask-pattern"),u=t("./error-correction-code"),d=t("./reed-solomon-encoder"),p=t("./version"),f=t("./format-info"),g=t("./mode"),A=t("./segments"),m=t("isarray");function v(t,e,r){var n,i,s=t.size,a=f.getEncodedBits(e,r);for(n=0;n<15;n++)i=1==(a>>n&1),n<6?t.set(n,8,i,!0):n<8?t.set(n+1,8,i,!0):t.set(s-15+n,8,i,!0),n<8?t.set(8,s-n-1,i,!0):n<9?t.set(8,15-n-1+1,i,!0):t.set(8,15-n-1,i,!0);t.set(s-8,8,1,!0)}function y(t,e,r){var s=new a;r.forEach((function(e){s.put(e.mode.bit,4),s.put(e.getLength(),g.getCharCountIndicator(e.mode,t)),e.write(s)}));var o=8*(i.getSymbolTotalCodewords(t)-u.getTotalCodewordsCount(t,e));for(s.getLengthInBits()+4<=o&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(0);for(var l=(o-s.getLengthInBits())/8,c=0;c<l;c++)s.put(c%2?17:236,8);return function(t,e,r){for(var s=i.getSymbolTotalCodewords(e),a=s-u.getTotalCodewordsCount(e,r),o=u.getBlocksCount(e,r),l=o-s%o,c=Math.floor(s/o),h=Math.floor(a/o),p=h+1,f=c-h,g=new d(f),A=0,m=new Array(o),v=new Array(o),y=0,E=n.from(t.buffer),_=0;_<o;_++){var w=_<l?h:p;m[_]=E.slice(A,A+w),v[_]=g.encode(m[_]),A+=w,y=Math.max(y,w)}var C,b,S=n.alloc(s),x=0;for(C=0;C<y;C++)for(b=0;b<o;b++)C<m[b].length&&(S[x++]=m[b][C]);for(C=0;C<f;C++)for(b=0;b<o;b++)S[x++]=v[b][C];return S}(s,t,e)}function E(t,e,r,n){var s;if(m(t))s=A.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var a=e;if(!a){var u=A.rawSplit(t);a=p.getBestVersionForData(u,r)}s=A.fromString(t,a||40)}var d=p.getBestVersionForData(s,r);if(!d)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<d)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+d+".\n")}else e=d;var f=y(e,r,s),g=i.getSymbolSize(e),E=new o(g);return function(t,e){for(var r=t.size,n=c.getPositions(e),i=0;i<n.length;i++)for(var s=n[i][0],a=n[i][1],o=-1;o<=7;o++)if(!(s+o<=-1||r<=s+o))for(var l=-1;l<=7;l++)a+l<=-1||r<=a+l||(o>=0&&o<=6&&(0===l||6===l)||l>=0&&l<=6&&(0===o||6===o)||o>=2&&o<=4&&l>=2&&l<=4?t.set(s+o,a+l,!0,!0):t.set(s+o,a+l,!1,!0))}(E,e),function(t){for(var e=t.size,r=8;r<e-8;r++){var n=r%2==0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}(E),function(t,e){for(var r=l.getPositions(e),n=0;n<r.length;n++)for(var i=r[n][0],s=r[n][1],a=-2;a<=2;a++)for(var o=-2;o<=2;o++)-2===a||2===a||-2===o||2===o||0===a&&0===o?t.set(i+a,s+o,!0,!0):t.set(i+a,s+o,!1,!0)}(E,e),v(E,r,0),e>=7&&function(t,e){for(var r,n,i,s=t.size,a=p.getEncodedBits(e),o=0;o<18;o++)r=Math.floor(o/3),n=o%3+s-8-3,i=1==(a>>o&1),t.set(r,n,i,!0),t.set(n,r,i,!0)}(E,e),function(t,e){for(var r=t.size,n=-1,i=r-1,s=7,a=0,o=r-1;o>0;o-=2)for(6===o&&o--;;){for(var l=0;l<2;l++)if(!t.isReserved(i,o-l)){var c=!1;a<e.length&&(c=1==(e[a]>>>s&1)),t.set(i,o-l,c),-1==--s&&(a++,s=7)}if((i+=n)<0||r<=i){i-=n,n=-n;break}}}(E,f),isNaN(n)&&(n=h.getBestMask(E,v.bind(null,E,r))),h.applyMask(n,E),v(E,r,n),{modules:E,version:e,errorCorrectionLevel:r,maskPattern:n,segments:s}}r.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");var r,n,a=s.M;return void 0!==e&&(a=s.from(e.errorCorrectionLevel,s.M),r=p.from(e.version),n=h.from(e.maskPattern),e.toSJISFunc&&i.setToSJISFunction(e.toSJISFunc)),E(t,r,a,n)}},{"../utils/buffer":28,"./alignment-pattern":2,"./bit-buffer":4,"./bit-matrix":5,"./error-correction-code":7,"./error-correction-level":8,"./finder-pattern":9,"./format-info":10,"./mask-pattern":13,"./mode":14,"./reed-solomon-encoder":18,"./segments":20,"./utils":21,"./version":23,isarray:33}],18:[function(t,e,r){var n=t("../utils/buffer"),i=t("./polynomial"),s=t("buffer").Buffer;function a(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}a.prototype.initialize=function(t){this.degree=t,this.genPoly=i.generateECPolynomial(this.degree)},a.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var e=n.alloc(this.degree),r=s.concat([t,e],t.length+this.degree),a=i.mod(r,this.genPoly),o=this.degree-a.length;if(o>0){var l=n.alloc(this.degree);return a.copy(l,o),l}return a},e.exports=a},{"../utils/buffer":28,"./polynomial":16,buffer:30}],19:[function(t,e,r){var n="[0-9]+",i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",s="(?:(?![A-Z0-9 $%*+\\-./:]|"+(i=i.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";r.KANJI=new RegExp(i,"g"),r.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),r.BYTE=new RegExp(s,"g"),r.NUMERIC=new RegExp(n,"g"),r.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var a=new RegExp("^"+i+"$"),o=new RegExp("^"+n+"$"),l=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");r.testKanji=function(t){return a.test(t)},r.testNumeric=function(t){return o.test(t)},r.testAlphanumeric=function(t){return l.test(t)}},{}],20:[function(t,e,r){var n=t("./mode"),i=t("./numeric-data"),s=t("./alphanumeric-data"),a=t("./byte-data"),o=t("./kanji-data"),l=t("./regex"),c=t("./utils"),h=t("dijkstrajs");function u(t){return unescape(encodeURIComponent(t)).length}function d(t,e,r){for(var n,i=[];null!==(n=t.exec(r));)i.push({data:n[0],index:n.index,mode:e,length:n[0].length});return i}function p(t){var e,r,i=d(l.NUMERIC,n.NUMERIC,t),s=d(l.ALPHANUMERIC,n.ALPHANUMERIC,t);return c.isKanjiModeEnabled()?(e=d(l.BYTE,n.BYTE,t),r=d(l.KANJI,n.KANJI,t)):(e=d(l.BYTE_KANJI,n.BYTE,t),r=[]),i.concat(s,e,r).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function f(t,e){switch(e){case n.NUMERIC:return i.getBitsLength(t);case n.ALPHANUMERIC:return s.getBitsLength(t);case n.KANJI:return o.getBitsLength(t);case n.BYTE:return a.getBitsLength(t)}}function g(t,e){var r,l=n.getBestModeForData(t);if((r=n.from(e,l))!==n.BYTE&&r.bit<l.bit)throw new Error('"'+t+'" cannot be encoded with mode '+n.toString(r)+".\n Suggested mode is: "+n.toString(l));switch(r!==n.KANJI||c.isKanjiModeEnabled()||(r=n.BYTE),r){case n.NUMERIC:return new i(t);case n.ALPHANUMERIC:return new s(t);case n.KANJI:return new o(t);case n.BYTE:return new a(t)}}r.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(g(e,null)):e.data&&t.push(g(e.data,e.mode)),t}),[])},r.fromString=function(t,e){for(var i=function(t,e){for(var r={},i={start:{}},s=["start"],a=0;a<t.length;a++){for(var o=t[a],l=[],c=0;c<o.length;c++){var h=o[c],u=""+a+c;l.push(u),r[u]={node:h,lastCount:0},i[u]={};for(var d=0;d<s.length;d++){var p=s[d];r[p]&&r[p].node.mode===h.mode?(i[p][u]=f(r[p].lastCount+h.length,h.mode)-f(r[p].lastCount,h.mode),r[p].lastCount+=h.length):(r[p]&&(r[p].lastCount=h.length),i[p][u]=f(h.length,h.mode)+4+n.getCharCountIndicator(h.mode,e))}}s=l}for(d=0;d<s.length;d++)i[s[d]].end=0;return{map:i,table:r}}(function(t){for(var e=[],r=0;r<t.length;r++){var i=t[r];switch(i.mode){case n.NUMERIC:e.push([i,{data:i.data,mode:n.ALPHANUMERIC,length:i.length},{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.ALPHANUMERIC:e.push([i,{data:i.data,mode:n.BYTE,length:i.length}]);break;case n.KANJI:e.push([i,{data:i.data,mode:n.BYTE,length:u(i.data)}]);break;case n.BYTE:e.push([{data:i.data,mode:n.BYTE,length:u(i.data)}])}}return e}(p(t,c.isKanjiModeEnabled())),e),s=h.find_path(i.map,"start","end"),a=[],o=1;o<s.length-1;o++)a.push(i.table[s[o]].node);return r.fromArray(a.reduce((function(t,e){var r=t.length-1>=0?t[t.length-1]:null;return r&&r.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[]))},r.rawSplit=function(t){return r.fromArray(p(t,c.isKanjiModeEnabled()))}},{"./alphanumeric-data":3,"./byte-data":6,"./kanji-data":12,"./mode":14,"./numeric-data":15,"./regex":19,"./utils":21,dijkstrajs:31}],21:[function(t,e,r){var n,i=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];r.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},r.getSymbolTotalCodewords=function(t){return i[t]},r.getBCHDigit=function(t){for(var e=0;0!==t;)e++,t>>>=1;return e},r.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},r.isKanjiModeEnabled=function(){return void 0!==n},r.toSJIS=function(t){return n(t)}},{}],22:[function(t,e,r){r.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},{}],23:[function(t,e,r){var n=t("./utils"),i=t("./error-correction-code"),s=t("./error-correction-level"),a=t("./mode"),o=t("./version-check"),l=t("isarray"),c=n.getBCHDigit(7973);function h(t,e){return a.getCharCountIndicator(t,e)+4}function u(t,e){var r=0;return t.forEach((function(t){var n=h(t.mode,e);r+=n+t.getBitsLength()})),r}r.from=function(t,e){return o.isValid(t)?parseInt(t,10):e},r.getCapacity=function(t,e,r){if(!o.isValid(t))throw new Error("Invalid QR Code version");void 0===r&&(r=a.BYTE);var s=8*(n.getSymbolTotalCodewords(t)-i.getTotalCodewordsCount(t,e));if(r===a.MIXED)return s;var l=s-h(r,t);switch(r){case a.NUMERIC:return Math.floor(l/10*3);case a.ALPHANUMERIC:return Math.floor(l/11*2);case a.KANJI:return Math.floor(l/13);case a.BYTE:default:return Math.floor(l/8)}},r.getBestVersionForData=function(t,e){var n,i=s.from(e,s.M);if(l(t)){if(t.length>1)return function(t,e){for(var n=1;n<=40;n++)if(u(t,n)<=r.getCapacity(n,e,a.MIXED))return n}(t,i);if(0===t.length)return 1;n=t[0]}else n=t;return function(t,e,n){for(var i=1;i<=40;i++)if(e<=r.getCapacity(i,n,t))return i}(n.mode,n.getLength(),i)},r.getEncodedBits=function(t){if(!o.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;n.getBCHDigit(e)-c>=0;)e^=7973<<n.getBCHDigit(e)-c;return t<<12|e}},{"./error-correction-code":7,"./error-correction-level":8,"./mode":14,"./utils":21,"./version-check":22,isarray:33}],24:[function(t,e,r){var n=t("./can-promise"),i=t("./core/qrcode"),s=t("./renderer/canvas"),a=t("./renderer/svg-tag.js");function o(t,e,r,s,a){var o=[].slice.call(arguments,1),l=o.length,c="function"==typeof o[l-1];if(!c&&!n())throw new Error("Callback required as last argument");if(!c){if(l<1)throw new Error("Too few arguments provided");return 1===l?(r=e,e=s=void 0):2!==l||e.getContext||(s=r,r=e,e=void 0),new Promise((function(n,a){try{var o=i.create(r,s);n(t(o,e,s))}catch(t){a(t)}}))}if(l<2)throw new Error("Too few arguments provided");2===l?(a=r,r=e,e=s=void 0):3===l&&(e.getContext&&void 0===a?(a=s,s=void 0):(a=s,s=r,r=e,e=void 0));try{var h=i.create(r,s);a(null,t(h,e,s))}catch(t){a(t)}}r.create=i.create,r.toCanvas=o.bind(null,s.render),r.toDataURL=o.bind(null,s.renderToDataURL),r.toString=o.bind(null,(function(t,e,r){return a.render(t,r)}))},{"./can-promise":1,"./core/qrcode":17,"./renderer/canvas":25,"./renderer/svg-tag.js":26}],25:[function(t,e,r){var n=t("./utils");r.render=function(t,e,r){var i=r,s=e;void 0!==i||e&&e.getContext||(i=e,e=void 0),e||(s=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),i=n.getOptions(i);var a=n.getImageWidth(t.modules.size,i),o=s.getContext("2d"),l=o.createImageData(a,a);return n.qrToImageData(l.data,t,i),function(t,e,r){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=r,e.width=r,e.style.height=r+"px",e.style.width=r+"px"}(o,s,a),o.putImageData(l,0,0),s},r.renderToDataURL=function(t,e,n){var i=n;void 0!==i||e&&e.getContext||(i=e,e=void 0),i||(i={});var s=r.render(t,e,i),a=i.type||"image/png",o=i.rendererOpts||{};return s.toDataURL(a,o.quality)}},{"./utils":27}],26:[function(t,e,r){var n=t("./utils");function i(t,e){var r=t.a/255,n=e+'="'+t.hex+'"';return r<1?n+" "+e+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function s(t,e,r){var n=t+e;return void 0!==r&&(n+=" "+r),n}r.render=function(t,e,r){var a=n.getOptions(e),o=t.modules.size,l=t.modules.data,c=o+2*a.margin,h=a.color.light.a?"<path "+i(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",u="<path "+i(a.color.dark,"stroke")+' d="'+function(t,e,r){for(var n="",i=0,a=!1,o=0,l=0;l<t.length;l++){var c=Math.floor(l%e),h=Math.floor(l/e);c||a||(a=!0),t[l]?(o++,l>0&&c>0&&t[l-1]||(n+=a?s("M",c+r,.5+h+r):s("m",i,0),i=0,a=!1),c+1<e&&t[l+1]||(n+=s("h",o),o=0)):i++}return n}(l,o,a.margin)+'"/>',d='viewBox="0 0 '+c+" "+c+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+d+' shape-rendering="crispEdges">'+h+u+"</svg>\n";return"function"==typeof r&&r(null,p),p}},{"./utils":27}],27:[function(t,e,r){function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");var e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");var r=parseInt(e.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+e.slice(0,6).join("")}}r.getOptions=function(t){t||(t={}),t.color||(t.color={});var e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,i=t.scale||4;return{width:r,scale:r?4:i,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},r.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},r.getImageWidth=function(t,e){var n=r.getScale(t,e);return Math.floor((t+2*e.margin)*n)},r.qrToImageData=function(t,e,n){for(var i=e.modules.size,s=e.modules.data,a=r.getScale(i,n),o=Math.floor((i+2*n.margin)*a),l=n.margin*a,c=[n.color.light,n.color.dark],h=0;h<o;h++)for(var u=0;u<o;u++){var d=4*(h*o+u),p=n.color.light;h>=l&&u>=l&&h<o-l&&u<o-l&&(p=c[s[Math.floor((h-l)/a)*i+Math.floor((u-l)/a)]?1:0]),t[d++]=p.r,t[d++]=p.g,t[d++]=p.b,t[d]=p.a}}},{}],28:[function(t,e,r){var n=t("isarray");s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}();var i=s.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function s(t,e,r){return s.TYPED_ARRAY_SUPPORT||this instanceof s?"number"==typeof t?l(this,t):function(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");var i;return i=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),s.TYPED_ARRAY_SUPPORT?i.__proto__=s.prototype:i=c(t,i),i}(t,e,r,n):"string"==typeof e?function(t,e){var r=0|u(e),n=o(t,r),i=n.write(e);return i!==r&&(n=n.slice(0,i)),n}(t,e):function(t,e){if(s.isBuffer(e)){var r=0|a(e.length),n=o(t,r);return 0===n.length||e.copy(n,0,0,r),n}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(i=e.length)!=i?o(t,0):c(t,e);if("Buffer"===e.type&&Array.isArray(e.data))return c(t,e.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}(this,t,e,r):new s(t,e,r)}function a(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function o(t,e){var r;return s.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e)).__proto__=s.prototype:(null===(r=t)&&(r=new s(e)),r.length=e),r}function l(t,e){var r=o(t,e<0?0:0|a(e));if(!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)r[n]=0;return r}function c(t,e){for(var r=e.length<0?0:0|a(e.length),n=o(t,r),i=0;i<r;i+=1)n[i]=255&e[i];return n}function h(t,e){var r;e=e||1/0;for(var n=t.length,i=null,s=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function u(t){return s.isBuffer(t)?t.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!=typeof t&&(t=""+t),0===t.length?0:h(t).length)}s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),s.prototype.write=function(t,e,r){void 0===e||void 0===r&&"string"==typeof e?(r=this.length,e=0):isFinite(e)&&(e|=0,isFinite(r)?r|=0:r=void 0);var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,e,r,n){return function(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}(h(e,t.length-r),t,r,n)}(this,t,e,r)},s.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),s.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=s.prototype;else{var i=e-t;r=new s(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+t]}return r},s.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,a=n-r;if(this===t&&r<e&&e<n)for(i=a-1;i>=0;--i)t[i+e]=this[i+r];else if(a<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+a),e);return a},s.prototype.fill=function(t,e,r){if("string"==typeof t){if("string"==typeof e?(e=0,r=this.length):"string"==typeof r&&(r=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=s.isBuffer(t)?t:new s(t),o=a.length;for(i=0;i<r-e;++i)this[i+e]=a[i%o]}return this},s.concat=function(t,e){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return o(null,0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=l(null,e),a=0;for(r=0;r<t.length;++r){var c=t[r];if(!s.isBuffer(c))throw new TypeError('"list" argument must be an Array of Buffers');c.copy(i,a),a+=c.length}return i},s.byteLength=u,s.prototype._isBuffer=!0,s.isBuffer=function(t){return!(null==t||!t._isBuffer)},e.exports.alloc=function(t){var e=new s(t);return e.fill(0),e},e.exports.from=function(t){return new s(t)}},{isarray:33}],29:[function(t,e,r){r.byteLength=function(t){var e=l(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){var e,r,n=l(t),a=n[0],o=n[1],c=new s(function(t,e,r){return 3*(e+r)/4-r}(0,a,o)),h=0,u=o>0?a-4:a;for(r=0;r<u;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],c[h++]=e>>16&255,c[h++]=e>>8&255,c[h++]=255&e;return 2===o&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,c[h++]=255&e),1===o&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,c[h++]=e>>8&255,c[h++]=255&e),c},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,s=[],a=16383,o=0,l=r-i;o<l;o+=a)s.push(c(t,o,o+a>l?l:o+a));return 1===i?(e=t[r-1],s.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],s.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),s.join("")};for(var n=[],i=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=a[o],i[a.charCodeAt(o)]=o;function l(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,r){for(var i,s=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);var o;return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],30:[function(t,e,r){var i=t("base64-js"),s=t("ieee754"),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=c,r.SlowBuffer=function(t){return+t!=t&&(t=0),c.alloc(+t)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function l(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return d(t)}return h(t,e,r)}function h(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|g(t,e),n=l(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return p(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(F(t,ArrayBuffer)||t&&F(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,c.prototype),n}(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return c.from(n,e,r);var i=function(t){if(c.isBuffer(t)){var e=0|f(t.length),r=l(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||j(t.length)?l(0):p(t):"Buffer"===t.type&&Array.isArray(t.data)?p(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function d(t){return u(t),l(t<0?0:0|f(t))}function p(t){for(var e=t.length<0?0:0|f(t.length),r=l(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function f(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function g(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||F(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(i)return n?-1:H(t).length;e=(""+e).toLowerCase(),i=!0}}function A(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),j(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){var s,a=1,o=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,o/=2,l/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var h=-1;for(s=r;s<o;s++)if(c(t,s)===c(e,-1===h?0:s-h)){if(-1===h&&(h=s),s-h+1===l)return h*a}else-1!==h&&(s-=s-h),h=-1}else for(r+l>o&&(r=o-l),s=r;s>=0;s--){for(var u=!0,d=0;d<l;d++)if(c(t,s+d)!==c(e,d)){u=!1;break}if(u)return s}return-1}function E(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=e.length;n>s/2&&(n=s/2);for(var a=0;a<n;++a){var o=parseInt(e.substr(2*a,2),16);if(j(o))return a;t[r+a]=o}return a}function _(t,e,r,n){return $(H(e,t.length-r),t,r,n)}function w(t,e,r,n){return $(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function C(t,e,r,n){return w(t,e,r,n)}function b(t,e,r,n){return $(Y(e),t,r,n)}function S(t,e,r,n){return $(function(t,e){for(var r,n,i,s=[],a=0;a<t.length&&!((e-=2)<0);++a)n=(r=t.charCodeAt(a))>>8,i=r%256,s.push(i),s.push(n);return s}(e,t.length-r),t,r,n)}function x(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var s,a,o,l,c=t[i],h=null,u=c>239?4:c>223?3:c>191?2:1;if(i+u<=r)switch(u){case 1:c<128&&(h=c);break;case 2:128==(192&(s=t[i+1]))&&(l=(31&c)<<6|63&s)>127&&(h=l);break;case 3:s=t[i+1],a=t[i+2],128==(192&s)&&128==(192&a)&&(l=(15&c)<<12|(63&s)<<6|63&a)>2047&&(l<55296||l>57343)&&(h=l);break;case 4:s=t[i+1],a=t[i+2],o=t[i+3],128==(192&s)&&128==(192&a)&&128==(192&o)&&(l=(15&c)<<18|(63&s)<<12|(63&a)<<6|63&o)>65535&&l<1114112&&(h=l)}null===h?(h=65533,u=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=u}return function(t){var e=t.length;if(e<=P)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=P));return r}(n)}r.kMaxLength=o,c.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),c.TYPED_ARRAY_SUPPORT||void 0===n||"function"!=typeof n.error||n.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),c.poolSize=8192,c.from=function(t,e,r){return h(t,e,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(t,e,r){return function(t,e,r){return u(t),t<=0?l(t):void 0!==e?"string"==typeof r?l(t).fill(e,r):l(t).fill(e):l(t)}(t,e,r)},c.allocUnsafe=function(t){return d(t)},c.allocUnsafeSlow=function(t){return d(t)},c.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==c.prototype},c.compare=function(t,e){if(F(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),F(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,s=Math.min(r,n);i<s;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=c.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(F(s,Uint8Array)&&(s=c.from(s)),!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},c.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):A.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(t,e,r,n,i){if(F(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var s=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),o=Math.min(s,a),l=this.slice(n,i),h=t.slice(e,r),u=0;u<o;++u)if(l[u]!==h[u]){s=l[u],a=h[u];break}return s<a?-1:a<s?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return E(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return C(this,t,e,r);case"base64":return b(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function I(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function k(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=e;s<r;++s)i+=V[t[s]];return i}function N(t,e,r){for(var n=t.slice(e,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}function D(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,n,i,s){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function O(t,e,r,n,i,s){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,0,r,4),s.write(t,e,r,n,23,4),r+4}function M(t,e,r,n,i){return e=+e,r>>>=0,i||O(t,0,r,8),s.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||D(t,e,this.length);for(var n=this[t],i=1,s=0;++s<e&&(i*=256);)n+=this[t+s]*i;return n},c.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||D(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUInt8=function(t,e){return t>>>=0,e||D(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||D(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||D(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||D(t,e,this.length);for(var n=this[t],i=1,s=0;++s<e&&(i*=256);)n+=this[t+s]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||D(t,e,this.length);for(var n=e,i=1,s=this[t+--n];n>0&&(i*=256);)s+=this[t+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*e)),s},c.prototype.readInt8=function(t,e){return t>>>=0,e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||D(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||D(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return t>>>=0,e||D(t,4,this.length),s.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||D(t,4,this.length),s.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||D(t,8,this.length),s.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||D(t,8,this.length),s.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,s=0;for(this[e]=255&t;++s<r&&(i*=256);)this[e+s]=t/i&255;return e+r},c.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,s=1;for(this[e+i]=255&t;--i>=0&&(s*=256);)this[e+i]=t/s&255;return e+r},c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var s=0,a=1,o=0;for(this[e]=255&t;++s<r&&(a*=256);)t<0&&0===o&&0!==this[e+s-1]&&(o=1),this[e+s]=(t/a>>0)-o&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var s=r-1,a=1,o=0;for(this[e+s]=255&t;--s>=0&&(a*=256);)t<0&&0===o&&0!==this[e+s+1]&&(o=1),this[e+s]=(t/a>>0)-o&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return M(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var s=i-1;s>=0;--s)t[s+e]=this[s+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var s;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(s=e;s<r;++s)this[s]=t;else{var a=c.isBuffer(t)?t:c.from(t,n),o=a.length;if(0===o)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(s=0;s<r-e;++s)this[s+e]=a[s%o]}return this};var U=/[^+/0-9A-Za-z-_]/g;function H(t,e){var r;e=e||1/0;for(var n=t.length,i=null,s=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function Y(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function $(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function F(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function j(t){return t!=t}var V=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()},{"base64-js":29,ieee754:32}],31:[function(t,e,r){var n={single_source_shortest_paths:function(t,e,r){var i={},s={};s[e]=0;var a,o,l,c,h,u,d,p=n.PriorityQueue.make();for(p.push(e,0);!p.empty();)for(l in o=(a=p.pop()).value,c=a.cost,h=t[o]||{})h.hasOwnProperty(l)&&(u=c+h[l],d=s[l],(void 0===s[l]||d>u)&&(s[l]=u,p.push(l,u),i[l]=o));if(void 0!==r&&void 0===s[r]){var f=["Could not find a path from ",e," to ",r,"."].join("");throw new Error(f)}return i},extract_shortest_path_from_predecessor_list:function(t,e){for(var r=[],n=e;n;)r.push(n),t[n],n=t[n];return r.reverse(),r},find_path:function(t,e,r){var i=n.single_source_shortest_paths(t,e,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(t){var e,r=n.PriorityQueue,i={};for(e in t=t||{},r)r.hasOwnProperty(e)&&(i[e]=r[e]);return i.queue=[],i.sorter=t.sorter||r.default_sorter,i},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var r={value:t,cost:e};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};void 0!==e&&(e.exports=n)},{}],32:[function(t,e,r){r.read=function(t,e,r,n,i){var s,a,o=8*i-n-1,l=(1<<o)-1,c=l>>1,h=-7,u=r?i-1:0,d=r?-1:1,p=t[e+u];for(u+=d,s=p&(1<<-h)-1,p>>=-h,h+=o;h>0;s=256*s+t[e+u],u+=d,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=n;h>0;a=256*a+t[e+u],u+=d,h-=8);if(0===s)s=1-c;else{if(s===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),s-=c}return(p?-1:1)*a*Math.pow(2,s-n)},r.write=function(t,e,r,n,i,s){var a,o,l,c=8*s-i-1,h=(1<<c)-1,u=h>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:s-1,f=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+u>=1?d/l:d*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=h?(o=0,a=h):a+u>=1?(o=(e*l-1)*Math.pow(2,i),a+=u):(o=e*Math.pow(2,u-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&o,p+=f,o/=256,i-=8);for(a=a<<i|o,c+=i;c>0;t[r+p]=255&a,p+=f,a/=256,c-=8);t[r+p-f]|=128*g}},{}],33:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}]},{},[24])(24)},e.exports=i()}));return{name:"qrcode",props:{value:null,options:Object,tag:{type:String,default:"canvas"}},render:function(t){return t(this.tag,this.$slots.default)},watch:{$props:{deep:!0,immediate:!0,handler:function(){this.$el&&this.generate()}}},methods:{generate:function(){var t=this,r=this.options,n=this.tag,i=String(this.value);"canvas"===n?e.toCanvas(this.$el,i,r,(function(t){if(t)throw t})):"img"===n?e.toDataURL(i,r,(function(e,r){if(e)throw e;t.$el.src=r})):e.toString(i,r,(function(e,r){if(e)throw e;t.$el.innerHTML=r}))}},mounted:function(){this.generate()}}}()},86243:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(71354),i=r.n(n),s=r(76314),a=r.n(s)()(i());a.push([t.id,".fade-enter-active[data-v-8e58e0a5],\n.fade-leave-active[data-v-8e58e0a5] {\n transition: opacity .3s ease;\n}\n.fade-enter[data-v-8e58e0a5],\n.fade-leave-to[data-v-8e58e0a5] {\n opacity: 0;\n}\n.linked-icons[data-v-8e58e0a5] {\n display: flex;\n}\n.linked-icons img[data-v-8e58e0a5] {\n padding: 12px;\n height: 44px;\n display: block;\n background-repeat: no-repeat;\n background-position: center;\n opacity: .7;\n}\n.linked-icons img[data-v-8e58e0a5]:hover {\n opacity: 1;\n}\n.popovermenu[data-v-8e58e0a5] {\n display: none;\n}\n.popovermenu.open[data-v-8e58e0a5] {\n display: block;\n}\nli.collection-list-item[data-v-8e58e0a5] {\n flex-wrap: wrap;\n height: auto;\n cursor: pointer;\n margin-bottom: 0 !important;\n}\nli.collection-list-item .collection-avatar[data-v-8e58e0a5] {\n margin-top: 6px;\n}\nli.collection-list-item form[data-v-8e58e0a5],\nli.collection-list-item .collection-item-name[data-v-8e58e0a5] {\n flex-basis: 10%;\n flex-grow: 1;\n display: flex;\n}\nli.collection-list-item .collection-item-name[data-v-8e58e0a5] {\n padding: 12px 9px;\n}\nli.collection-list-item input[data-v-8e58e0a5] {\n margin-top: 4px;\n border-color: var(--color-border-maxcontrast);\n}\nli.collection-list-item input[type=text][data-v-8e58e0a5] {\n flex-grow: 1;\n}\nli.collection-list-item .error[data-v-8e58e0a5],\nli.collection-list-item .resource-list-details[data-v-8e58e0a5] {\n flex-basis: 100%;\n width: 100%;\n}\nli.collection-list-item .resource-list-details li[data-v-8e58e0a5] {\n display: flex;\n margin-left: 44px;\n border-radius: 3px;\n cursor: pointer;\n}\nli.collection-list-item .resource-list-details li[data-v-8e58e0a5]:hover {\n background-color: var(--color-background-dark);\n}\nli.collection-list-item .resource-list-details li a[data-v-8e58e0a5] {\n flex-grow: 1;\n padding: 3px;\n max-width: calc(100% - 30px);\n display: flex;\n}\nli.collection-list-item .resource-list-details span[data-v-8e58e0a5] {\n display: inline-block;\n vertical-align: top;\n margin-right: 10px;\n}\nli.collection-list-item .resource-list-details span.resource-name[data-v-8e58e0a5] {\n text-overflow: ellipsis;\n overflow: hidden;\n position: relative;\n vertical-align: top;\n white-space: nowrap;\n flex-grow: 1;\n padding: 4px;\n}\nli.collection-list-item .resource-list-details img[data-v-8e58e0a5] {\n width: 24px;\n height: 24px;\n}\nli.collection-list-item .resource-list-details .icon-close[data-v-8e58e0a5] {\n opacity: .7;\n}\nli.collection-list-item .resource-list-details .icon-close[data-v-8e58e0a5]:hover,\nli.collection-list-item .resource-list-details .icon-close[data-v-8e58e0a5]:focus {\n opacity: 1;\n}\n.shouldshake[data-v-8e58e0a5] {\n animation: shake-8e58e0a5 .6s 1 linear;\n}\n@keyframes shake-8e58e0a5 {\n 0% {\n transform: translate(15px);\n }\n 20% {\n transform: translate(-15px);\n }\n 40% {\n transform: translate(7px);\n }\n 60% {\n transform: translate(-7px);\n }\n 80% {\n transform: translate(3px);\n }\n to {\n transform: translate(0);\n }\n}\n.collection-list *[data-v-75a4370b] {\n box-sizing: border-box;\n}\n.collection-list > li[data-v-75a4370b] {\n display: flex;\n align-items: start;\n gap: 12px;\n}\n.collection-list > li > .avatar[data-v-75a4370b] {\n margin-top: auto;\n}\n#collection-select-container[data-v-75a4370b] {\n display: flex;\n flex-direction: column;\n}\n.v-select span.avatar[data-v-75a4370b] {\n display: block;\n padding: 16px;\n opacity: .7;\n background-repeat: no-repeat;\n background-position: center;\n}\n.v-select span.avatar[data-v-75a4370b]:hover {\n opacity: 1;\n}\np.hint[data-v-75a4370b] {\n z-index: 1;\n margin-top: -16px;\n padding: 8px;\n color: var(--color-text-maxcontrast);\n line-height: normal;\n}\ndiv.avatar[data-v-75a4370b] {\n width: 32px;\n height: 32px;\n margin: 30px 0 0;\n padding: 8px;\n background-color: var(--color-background-dark);\n}\n.icon-projects[data-v-75a4370b] {\n display: block;\n padding: 8px;\n background-repeat: no-repeat;\n background-position: center;\n}\n.option__wrapper[data-v-75a4370b] {\n display: flex;\n}\n.option__wrapper .avatar[data-v-75a4370b] {\n display: block;\n background-color: var(--color-background-darker) !important;\n}\n.option__wrapper .option__title[data-v-75a4370b] {\n padding: 4px;\n}\n.fade-enter-active[data-v-75a4370b],\n.fade-leave-active[data-v-75a4370b] {\n transition: opacity .5s;\n}\n.fade-enter[data-v-75a4370b],\n.fade-leave-to[data-v-75a4370b] {\n opacity: 0;\n}\n","",{version:3,sources:["webpack://./node_modules/nextcloud-vue-collections/dist/assets/index-Au1Gr_G6.css"],names:[],mappings:"AAAA;;EAEE,4BAA4B;AAC9B;AACA;;EAEE,UAAU;AACZ;AACA;EACE,aAAa;AACf;AACA;EACE,aAAa;EACb,YAAY;EACZ,cAAc;EACd,4BAA4B;EAC5B,2BAA2B;EAC3B,WAAW;AACb;AACA;EACE,UAAU;AACZ;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;EACE,eAAe;EACf,YAAY;EACZ,eAAe;EACf,2BAA2B;AAC7B;AACA;EACE,eAAe;AACjB;AACA;;EAEE,eAAe;EACf,YAAY;EACZ,aAAa;AACf;AACA;EACE,iBAAiB;AACnB;AACA;EACE,eAAe;EACf,6CAA6C;AAC/C;AACA;EACE,YAAY;AACd;AACA;;EAEE,gBAAgB;EAChB,WAAW;AACb;AACA;EACE,aAAa;EACb,iBAAiB;EACjB,kBAAkB;EAClB,eAAe;AACjB;AACA;EACE,8CAA8C;AAChD;AACA;EACE,YAAY;EACZ,YAAY;EACZ,4BAA4B;EAC5B,aAAa;AACf;AACA;EACE,qBAAqB;EACrB,mBAAmB;EACnB,kBAAkB;AACpB;AACA;EACE,uBAAuB;EACvB,gBAAgB;EAChB,kBAAkB;EAClB,mBAAmB;EACnB,mBAAmB;EACnB,YAAY;EACZ,YAAY;AACd;AACA;EACE,WAAW;EACX,YAAY;AACd;AACA;EACE,WAAW;AACb;AACA;;EAEE,UAAU;AACZ;AACA;EACE,sCAAsC;AACxC;AACA;EACE;IACE,0BAA0B;EAC5B;EACA;IACE,2BAA2B;EAC7B;EACA;IACE,yBAAyB;EAC3B;EACA;IACE,0BAA0B;EAC5B;EACA;IACE,yBAAyB;EAC3B;EACA;IACE,uBAAuB;EACzB;AACF;AACA;EACE,sBAAsB;AACxB;AACA;EACE,aAAa;EACb,kBAAkB;EAClB,SAAS;AACX;AACA;EACE,gBAAgB;AAClB;AACA;EACE,aAAa;EACb,sBAAsB;AACxB;AACA;EACE,cAAc;EACd,aAAa;EACb,WAAW;EACX,4BAA4B;EAC5B,2BAA2B;AAC7B;AACA;EACE,UAAU;AACZ;AACA;EACE,UAAU;EACV,iBAAiB;EACjB,YAAY;EACZ,oCAAoC;EACpC,mBAAmB;AACrB;AACA;EACE,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,YAAY;EACZ,8CAA8C;AAChD;AACA;EACE,cAAc;EACd,YAAY;EACZ,4BAA4B;EAC5B,2BAA2B;AAC7B;AACA;EACE,aAAa;AACf;AACA;EACE,cAAc;EACd,2DAA2D;AAC7D;AACA;EACE,YAAY;AACd;AACA;;EAEE,uBAAuB;AACzB;AACA;;EAEE,UAAU;AACZ",sourcesContent:[".fade-enter-active[data-v-8e58e0a5],\n.fade-leave-active[data-v-8e58e0a5] {\n transition: opacity .3s ease;\n}\n.fade-enter[data-v-8e58e0a5],\n.fade-leave-to[data-v-8e58e0a5] {\n opacity: 0;\n}\n.linked-icons[data-v-8e58e0a5] {\n display: flex;\n}\n.linked-icons img[data-v-8e58e0a5] {\n padding: 12px;\n height: 44px;\n display: block;\n background-repeat: no-repeat;\n background-position: center;\n opacity: .7;\n}\n.linked-icons img[data-v-8e58e0a5]:hover {\n opacity: 1;\n}\n.popovermenu[data-v-8e58e0a5] {\n display: none;\n}\n.popovermenu.open[data-v-8e58e0a5] {\n display: block;\n}\nli.collection-list-item[data-v-8e58e0a5] {\n flex-wrap: wrap;\n height: auto;\n cursor: pointer;\n margin-bottom: 0 !important;\n}\nli.collection-list-item .collection-avatar[data-v-8e58e0a5] {\n margin-top: 6px;\n}\nli.collection-list-item form[data-v-8e58e0a5],\nli.collection-list-item .collection-item-name[data-v-8e58e0a5] {\n flex-basis: 10%;\n flex-grow: 1;\n display: flex;\n}\nli.collection-list-item .collection-item-name[data-v-8e58e0a5] {\n padding: 12px 9px;\n}\nli.collection-list-item input[data-v-8e58e0a5] {\n margin-top: 4px;\n border-color: var(--color-border-maxcontrast);\n}\nli.collection-list-item input[type=text][data-v-8e58e0a5] {\n flex-grow: 1;\n}\nli.collection-list-item .error[data-v-8e58e0a5],\nli.collection-list-item .resource-list-details[data-v-8e58e0a5] {\n flex-basis: 100%;\n width: 100%;\n}\nli.collection-list-item .resource-list-details li[data-v-8e58e0a5] {\n display: flex;\n margin-left: 44px;\n border-radius: 3px;\n cursor: pointer;\n}\nli.collection-list-item .resource-list-details li[data-v-8e58e0a5]:hover {\n background-color: var(--color-background-dark);\n}\nli.collection-list-item .resource-list-details li a[data-v-8e58e0a5] {\n flex-grow: 1;\n padding: 3px;\n max-width: calc(100% - 30px);\n display: flex;\n}\nli.collection-list-item .resource-list-details span[data-v-8e58e0a5] {\n display: inline-block;\n vertical-align: top;\n margin-right: 10px;\n}\nli.collection-list-item .resource-list-details span.resource-name[data-v-8e58e0a5] {\n text-overflow: ellipsis;\n overflow: hidden;\n position: relative;\n vertical-align: top;\n white-space: nowrap;\n flex-grow: 1;\n padding: 4px;\n}\nli.collection-list-item .resource-list-details img[data-v-8e58e0a5] {\n width: 24px;\n height: 24px;\n}\nli.collection-list-item .resource-list-details .icon-close[data-v-8e58e0a5] {\n opacity: .7;\n}\nli.collection-list-item .resource-list-details .icon-close[data-v-8e58e0a5]:hover,\nli.collection-list-item .resource-list-details .icon-close[data-v-8e58e0a5]:focus {\n opacity: 1;\n}\n.shouldshake[data-v-8e58e0a5] {\n animation: shake-8e58e0a5 .6s 1 linear;\n}\n@keyframes shake-8e58e0a5 {\n 0% {\n transform: translate(15px);\n }\n 20% {\n transform: translate(-15px);\n }\n 40% {\n transform: translate(7px);\n }\n 60% {\n transform: translate(-7px);\n }\n 80% {\n transform: translate(3px);\n }\n to {\n transform: translate(0);\n }\n}\n.collection-list *[data-v-75a4370b] {\n box-sizing: border-box;\n}\n.collection-list > li[data-v-75a4370b] {\n display: flex;\n align-items: start;\n gap: 12px;\n}\n.collection-list > li > .avatar[data-v-75a4370b] {\n margin-top: auto;\n}\n#collection-select-container[data-v-75a4370b] {\n display: flex;\n flex-direction: column;\n}\n.v-select span.avatar[data-v-75a4370b] {\n display: block;\n padding: 16px;\n opacity: .7;\n background-repeat: no-repeat;\n background-position: center;\n}\n.v-select span.avatar[data-v-75a4370b]:hover {\n opacity: 1;\n}\np.hint[data-v-75a4370b] {\n z-index: 1;\n margin-top: -16px;\n padding: 8px;\n color: var(--color-text-maxcontrast);\n line-height: normal;\n}\ndiv.avatar[data-v-75a4370b] {\n width: 32px;\n height: 32px;\n margin: 30px 0 0;\n padding: 8px;\n background-color: var(--color-background-dark);\n}\n.icon-projects[data-v-75a4370b] {\n display: block;\n padding: 8px;\n background-repeat: no-repeat;\n background-position: center;\n}\n.option__wrapper[data-v-75a4370b] {\n display: flex;\n}\n.option__wrapper .avatar[data-v-75a4370b] {\n display: block;\n background-color: var(--color-background-darker) !important;\n}\n.option__wrapper .option__title[data-v-75a4370b] {\n padding: 4px;\n}\n.fade-enter-active[data-v-75a4370b],\n.fade-leave-active[data-v-75a4370b] {\n transition: opacity .5s;\n}\n.fade-enter[data-v-75a4370b],\n.fade-leave-to[data-v-75a4370b] {\n opacity: 0;\n}\n"],sourceRoot:""}]);const o=a},353:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(71354),i=r.n(n),s=r(76314),a=r.n(s)()(i());a.push([t.id,".sharing-entry[data-v-756f491a]{display:flex;align-items:center;height:44px}.sharing-entry__summary[data-v-756f491a]{padding:8px;padding-left:10px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;flex:1 0;min-width:0}.sharing-entry__summary__desc[data-v-756f491a]{display:inline-block;padding-bottom:0;line-height:1.2em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sharing-entry__summary__desc p[data-v-756f491a],.sharing-entry__summary__desc small[data-v-756f491a]{color:var(--color-text-maxcontrast)}.sharing-entry__summary__desc-unique[data-v-756f491a]{color:var(--color-text-maxcontrast)}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntry.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,WAAA,CACA,yCACC,WAAA,CACA,iBAAA,CACA,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,sBAAA,CACA,QAAA,CACA,WAAA,CAEA,+CACC,oBAAA,CACA,gBAAA,CACA,iBAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CAEA,sGAEC,mCAAA,CAGD,sDACC,mCAAA",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\theight: 44px;\n\t&__summary {\n\t\tpadding: 8px;\n\t\tpadding-left: 10px;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\talign-items: flex-start;\n\t\tflex: 1 0;\n\t\tmin-width: 0;\n\n\t\t&__desc {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding-bottom: 0;\n\t\t\tline-height: 1.2em;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\n\t\t\tp,\n\t\t\tsmall {\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t}\n\n\t\t\t&-unique {\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t}\n\t\t}\n\t}\n\n}\n"],sourceRoot:""}]);const o=a},32260:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(71354),i=r.n(n),s=r(76314),a=r.n(s)()(i());a.push([t.id,".sharing-entry[data-v-859a420e]{display:flex;align-items:center;height:44px}.sharing-entry__desc[data-v-859a420e]{display:flex;flex-direction:column;justify-content:space-between;padding:8px;padding-left:10px;line-height:1.2em}.sharing-entry__desc p[data-v-859a420e]{color:var(--color-text-maxcontrast)}.sharing-entry__actions[data-v-859a420e]{margin-left:auto}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryInherited.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,WAAA,CACA,sCACC,YAAA,CACA,qBAAA,CACA,6BAAA,CACA,WAAA,CACA,iBAAA,CACA,iBAAA,CACA,wCACC,mCAAA,CAGF,yCACC,gBAAA",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\theight: 44px;\n\t&__desc {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: space-between;\n\t\tpadding: 8px;\n\t\tpadding-left: 10px;\n\t\tline-height: 1.2em;\n\t\tp {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\t&__actions {\n\t\tmargin-left: auto;\n\t}\n}\n"],sourceRoot:""}]);const o=a},23815:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(71354),i=r.n(n),s=r(76314),a=r.n(s)()(i());a.push([t.id,".sharing-entry__internal .avatar-external[data-v-1d9a7cfa]{width:32px;height:32px;line-height:32px;font-size:18px;background-color:var(--color-text-maxcontrast);border-radius:50%;flex-shrink:0}.sharing-entry__internal .icon-checkmark-color[data-v-1d9a7cfa]{opacity:1;color:var(--color-success)}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryInternal.vue"],names:[],mappings:"AAEC,2DACC,UAAA,CACA,WAAA,CACA,gBAAA,CACA,cAAA,CACA,8CAAA,CACA,iBAAA,CACA,aAAA,CAED,gEACC,SAAA,CACA,0BAAA",sourcesContent:["\n.sharing-entry__internal {\n\t.avatar-external {\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tline-height: 32px;\n\t\tfont-size: 18px;\n\t\tbackground-color: var(--color-text-maxcontrast);\n\t\tborder-radius: 50%;\n\t\tflex-shrink: 0;\n\t}\n\t.icon-checkmark-color {\n\t\topacity: 1;\n\t\tcolor: var(--color-success);\n\t}\n}\n"],sourceRoot:""}]);const o=a},97786:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(71354),i=r.n(n),s=r(76314),a=r.n(s)()(i());a.push([t.id,".sharing-entry[data-v-6b6e01ec]{display:flex;align-items:center;min-height:44px}.sharing-entry__summary[data-v-6b6e01ec]{padding:8px;padding-left:10px;display:flex;justify-content:space-between;flex:1 0;min-width:0}.sharing-entry__desc[data-v-6b6e01ec]{display:flex;flex-direction:column;line-height:1.2em}.sharing-entry__desc p[data-v-6b6e01ec]{color:var(--color-text-maxcontrast)}.sharing-entry__desc__title[data-v-6b6e01ec]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.sharing-entry:not(.sharing-entry--share) .sharing-entry__actions .new-share-link[data-v-6b6e01ec]{border-top:1px solid var(--color-border)}.sharing-entry[data-v-6b6e01ec] .avatar-link-share{background-color:var(--color-primary-element)}.sharing-entry .sharing-entry__action--public-upload[data-v-6b6e01ec]{border-bottom:1px solid var(--color-border)}.sharing-entry__loading[data-v-6b6e01ec]{width:44px;height:44px;margin:0;padding:14px;margin-left:auto}.sharing-entry .action-item~.action-item[data-v-6b6e01ec],.sharing-entry .action-item~.sharing-entry__loading[data-v-6b6e01ec]{margin-left:0}.sharing-entry .icon-checkmark-color[data-v-6b6e01ec]{opacity:1;color:var(--color-success)}.qr-code-dialog[data-v-6b6e01ec]{display:flex;width:100%;justify-content:center}.qr-code-dialog__img[data-v-6b6e01ec]{width:100%;height:auto}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryLink.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAEA,yCACC,WAAA,CACA,iBAAA,CACA,YAAA,CACA,6BAAA,CACA,QAAA,CACA,WAAA,CAGA,sCACC,YAAA,CACA,qBAAA,CACA,iBAAA,CAEA,wCACC,mCAAA,CAGD,6CACC,sBAAA,CACA,eAAA,CACA,kBAAA,CAKF,mGACC,wCAAA,CAIF,mDACC,6CAAA,CAGD,sEACC,2CAAA,CAGD,yCACC,UAAA,CACA,WAAA,CACA,QAAA,CACA,YAAA,CACA,gBAAA,CAOA,+HAEC,aAAA,CAIF,sDACC,SAAA,CACA,0BAAA,CAKF,iCACC,YAAA,CACA,UAAA,CACA,sBAAA,CAEA,sCACC,UAAA,CACA,WAAA",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\tmin-height: 44px;\n\n\t&__summary {\n\t\tpadding: 8px;\n\t\tpadding-left: 10px;\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tflex: 1 0;\n\t\tmin-width: 0;\n\t}\n\n\t\t&__desc {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tline-height: 1.2em;\n\n\t\t\tp {\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t}\n\n\t\t\t&__title {\n\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\toverflow: hidden;\n\t\t\t\twhite-space: nowrap;\n\t\t\t}\n\t\t}\n\n\t&:not(.sharing-entry--share) &__actions {\n\t\t.new-share-link {\n\t\t\tborder-top: 1px solid var(--color-border);\n\t\t}\n\t}\n\n\t::v-deep .avatar-link-share {\n\t\tbackground-color: var(--color-primary-element);\n\t}\n\n\t.sharing-entry__action--public-upload {\n\t\tborder-bottom: 1px solid var(--color-border);\n\t}\n\n\t&__loading {\n\t\twidth: 44px;\n\t\theight: 44px;\n\t\tmargin: 0;\n\t\tpadding: 14px;\n\t\tmargin-left: auto;\n\t}\n\n\t// put menus to the left\n\t// but only the first one\n\t.action-item {\n\n\t\t~.action-item,\n\t\t~.sharing-entry__loading {\n\t\t\tmargin-left: 0;\n\t\t}\n\t}\n\n\t.icon-checkmark-color {\n\t\topacity: 1;\n\t\tcolor: var(--color-success);\n\t}\n}\n\n// styling for the qr-code container\n.qr-code-dialog {\n\tdisplay: flex;\n\twidth: 100%;\n\tjustify-content: center;\n\n\t&__img {\n\t\twidth: 100%;\n\t\theight: auto;\n\t}\n}\n"],sourceRoot:""}]);const o=a},88809:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(71354),i=r.n(n),s=r(76314),a=r.n(s)()(i());a.push([t.id,".share-select[data-v-60eea424]{display:block}.share-select[data-v-60eea424] .action-item__menutoggle{color:var(--color-primary-element) !important;font-size:12.5px !important;height:auto !important;min-height:auto !important}.share-select[data-v-60eea424] .action-item__menutoggle .button-vue__text{font-weight:normal !important}.share-select[data-v-60eea424] .action-item__menutoggle .button-vue__icon{height:24px !important;min-height:24px !important;width:24px !important;min-width:24px !important}.share-select[data-v-60eea424] .action-item__menutoggle .button-vue__wrapper{flex-direction:row-reverse !important}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryQuickShareSelect.vue"],names:[],mappings:"AACA,+BACC,aAAA,CAIA,wDACC,6CAAA,CACA,2BAAA,CACA,sBAAA,CACA,0BAAA,CAEA,0EACC,6BAAA,CAGD,0EACC,sBAAA,CACA,0BAAA,CACA,qBAAA,CACA,yBAAA,CAGD,6EAEC,qCAAA",sourcesContent:["\n.share-select {\n\tdisplay: block;\n\n\t// TODO: NcActions should have a slot for custom trigger button like NcPopover\n\t// Overrider NcActionms button to make it small\n\t:deep(.action-item__menutoggle) {\n\t\tcolor: var(--color-primary-element) !important;\n\t\tfont-size: 12.5px !important;\n\t\theight: auto !important;\n\t\tmin-height: auto !important;\n\n\t\t.button-vue__text {\n\t\t\tfont-weight: normal !important;\n\t\t}\n\n\t\t.button-vue__icon {\n\t\t\theight: 24px !important;\n\t\t\tmin-height: 24px !important;\n\t\t\twidth: 24px !important;\n\t\t\tmin-width: 24px !important;\n\t\t}\n\n\t\t.button-vue__wrapper {\n\t\t\t// Emulate NcButton's alignment=center-reverse\n\t\t\tflex-direction: row-reverse !important;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const o=a},59826:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(71354),i=r.n(n),s=r(76314),a=r.n(s)()(i());a.push([t.id,".sharing-entry[data-v-3bc1ac54]{display:flex;align-items:center;min-height:44px}.sharing-entry__desc[data-v-3bc1ac54]{padding:8px;padding-left:10px;line-height:1.2em;position:relative;flex:1 1;min-width:0}.sharing-entry__desc p[data-v-3bc1ac54]{color:var(--color-text-maxcontrast)}.sharing-entry__title[data-v-3bc1ac54]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:inherit}.sharing-entry__actions[data-v-3bc1ac54]{margin-left:auto !important}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntrySimple.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,eAAA,CACA,sCACC,WAAA,CACA,iBAAA,CACA,iBAAA,CACA,iBAAA,CACA,QAAA,CACA,WAAA,CACA,wCACC,mCAAA,CAGF,uCACC,kBAAA,CACA,sBAAA,CACA,eAAA,CACA,iBAAA,CAED,yCACC,2BAAA",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\tmin-height: 44px;\n\t&__desc {\n\t\tpadding: 8px;\n\t\tpadding-left: 10px;\n\t\tline-height: 1.2em;\n\t\tposition: relative;\n\t\tflex: 1 1;\n\t\tmin-width: 0;\n\t\tp {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\t&__title {\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\toverflow: hidden;\n\t\tmax-width: inherit;\n\t}\n\t&__actions {\n\t\tmargin-left: auto !important;\n\t}\n}\n"],sourceRoot:""}]);const o=a},13594:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(71354),i=r.n(n),s=r(76314),a=r.n(s)()(i());a.push([t.id,".sharing-search{display:flex;flex-direction:column;margin-bottom:4px}.sharing-search label[for=sharing-search-input]{margin-bottom:2px}.sharing-search__input{width:100%;margin:10px 0}.vs__dropdown-menu span[lookup] .avatardiv{background-image:var(--icon-search-white);background-repeat:no-repeat;background-position:center;background-color:var(--color-text-maxcontrast) !important}.vs__dropdown-menu span[lookup] .avatardiv .avatardiv__initials-wrapper{display:none}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingInput.vue"],names:[],mappings:"AACA,gBACC,YAAA,CACA,qBAAA,CACA,iBAAA,CAEA,gDACC,iBAAA,CAGD,uBACC,UAAA,CACA,aAAA,CAOA,2CACC,yCAAA,CACA,2BAAA,CACA,0BAAA,CACA,yDAAA,CACA,wEACC,YAAA",sourcesContent:['\n.sharing-search {\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin-bottom: 4px;\n\n\tlabel[for="sharing-search-input"] {\n\t\tmargin-bottom: 2px;\n\t}\n\n\t&__input {\n\t\twidth: 100%;\n\t\tmargin: 10px 0;\n\t}\n}\n\n.vs__dropdown-menu {\n\t// properly style the lookup entry\n\tspan[lookup] {\n\t\t.avatardiv {\n\t\t\tbackground-image: var(--icon-search-white);\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-position: center;\n\t\t\tbackground-color: var(--color-text-maxcontrast) !important;\n\t\t\t.avatardiv__initials-wrapper {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const o=a},9766:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(71354),i=r.n(n),s=r(76314),a=r.n(s)()(i());a.push([t.id,".sharingTabDetailsView[data-v-1653f581]{display:flex;flex-direction:column;width:100%;margin:0 auto;position:relative;height:100%;overflow:hidden}.sharingTabDetailsView__header[data-v-1653f581]{display:flex;align-items:center;box-sizing:border-box;margin:.2em}.sharingTabDetailsView__header span[data-v-1653f581]{display:flex;align-items:center}.sharingTabDetailsView__header span h1[data-v-1653f581]{font-size:15px;padding-left:.3em}.sharingTabDetailsView__wrapper[data-v-1653f581]{position:relative;overflow:scroll;flex-shrink:1;padding:4px;padding-right:12px}.sharingTabDetailsView__quick-permissions[data-v-1653f581]{display:flex;justify-content:center;width:100%;margin:0 auto;border-radius:0}.sharingTabDetailsView__quick-permissions div[data-v-1653f581]{width:100%}.sharingTabDetailsView__quick-permissions div span[data-v-1653f581]{width:100%}.sharingTabDetailsView__quick-permissions div span span[data-v-1653f581]:nth-child(1){align-items:center;justify-content:center;padding:.1em}.sharingTabDetailsView__quick-permissions div span[data-v-1653f581] label span{display:flex;flex-direction:column}.sharingTabDetailsView__quick-permissions div span[data-v-1653f581] span.checkbox-content__text.checkbox-radio-switch__text{flex-wrap:wrap}.sharingTabDetailsView__quick-permissions div span[data-v-1653f581] span.checkbox-content__text.checkbox-radio-switch__text .subline{display:block;flex-basis:100%}.sharingTabDetailsView__advanced-control[data-v-1653f581]{width:100%}.sharingTabDetailsView__advanced-control button[data-v-1653f581]{margin-top:.5em}.sharingTabDetailsView__advanced[data-v-1653f581]{width:100%;margin-bottom:.5em;text-align:left;padding-left:0}.sharingTabDetailsView__advanced section textarea[data-v-1653f581],.sharingTabDetailsView__advanced section div.mx-datepicker[data-v-1653f581]{width:100%}.sharingTabDetailsView__advanced section textarea[data-v-1653f581]{height:80px;margin:0}.sharingTabDetailsView__advanced section span[data-v-1653f581] label{padding-left:0 !important;background-color:initial !important;border:none !important}.sharingTabDetailsView__advanced section section.custom-permissions-group[data-v-1653f581]{padding-left:1.5em}.sharingTabDetailsView__delete>button[data-v-1653f581]:first-child{color:#df0707}.sharingTabDetailsView__footer[data-v-1653f581]{width:100%;display:flex;position:sticky;bottom:0;flex-direction:column;justify-content:space-between;align-items:flex-start;background:linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background))}.sharingTabDetailsView__footer .button-group[data-v-1653f581]{display:flex;justify-content:space-between;width:100%;margin-top:16px}.sharingTabDetailsView__footer .button-group button[data-v-1653f581]{margin-left:16px}.sharingTabDetailsView__footer .button-group button[data-v-1653f581]:first-child{margin-left:0}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingDetailsTab.vue"],names:[],mappings:"AACA,wCACC,YAAA,CACA,qBAAA,CACA,UAAA,CACA,aAAA,CACA,iBAAA,CACA,WAAA,CACA,eAAA,CAEA,gDACC,YAAA,CACA,kBAAA,CACA,qBAAA,CACA,WAAA,CAEA,qDACC,YAAA,CACA,kBAAA,CAEA,wDACC,cAAA,CACA,iBAAA,CAMH,iDACC,iBAAA,CACA,eAAA,CACA,aAAA,CACA,WAAA,CACA,kBAAA,CAGD,2DACC,YAAA,CACA,sBAAA,CACA,UAAA,CACA,aAAA,CACA,eAAA,CAEA,+DACC,UAAA,CAEA,oEACC,UAAA,CAEA,sFACC,kBAAA,CACA,sBAAA,CACA,YAAA,CAKA,+EACC,YAAA,CACA,qBAAA,CAKF,4HACC,cAAA,CAEA,qIACC,aAAA,CACA,eAAA,CAQL,0DACC,UAAA,CAEA,iEACC,eAAA,CAKF,kDACC,UAAA,CACA,kBAAA,CACA,eAAA,CACA,cAAA,CAIC,+IAEC,UAAA,CAGD,mEACC,WAAA,CACA,QAAA,CAaA,qEACC,yBAAA,CACA,mCAAA,CACA,sBAAA,CAIF,2FACC,kBAAA,CAMF,mEACC,aAAA,CAIF,gDACC,UAAA,CACA,YAAA,CACA,eAAA,CACA,QAAA,CACA,qBAAA,CACA,6BAAA,CACA,sBAAA,CACA,2FAAA,CAEA,8DACC,YAAA,CACA,6BAAA,CACA,UAAA,CACA,eAAA,CAEA,qEACC,gBAAA,CAEA,iFACC,aAAA",sourcesContent:["\n.sharingTabDetailsView {\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n\tmargin: 0 auto;\n\tposition: relative;\n\theight: 100%;\n\toverflow: hidden;\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tbox-sizing: border-box;\n\t\tmargin: 0.2em;\n\n\t\tspan {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\n\t\t\th1 {\n\t\t\t\tfont-size: 15px;\n\t\t\t\tpadding-left: 0.3em;\n\t\t\t}\n\n\t\t}\n\t}\n\n\t&__wrapper {\n\t\tposition: relative;\n\t\toverflow: scroll;\n\t\tflex-shrink: 1;\n\t\tpadding: 4px;\n\t\tpadding-right: 12px;\n\t}\n\n\t&__quick-permissions {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\tmargin: 0 auto;\n\t\tborder-radius: 0;\n\n\t\tdiv {\n\t\t\twidth: 100%;\n\n\t\t\tspan {\n\t\t\t\twidth: 100%;\n\n\t\t\t\tspan:nth-child(1) {\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t\tpadding: 0.1em;\n\t\t\t\t}\n\n\t\t\t\t::v-deep label {\n\n\t\t\t\t\tspan {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Target component based style in NcCheckboxRadioSwitch slot content*/\n\t\t\t\t:deep(span.checkbox-content__text.checkbox-radio-switch__text) {\n\t\t\t\t\tflex-wrap: wrap;\n\n\t\t\t\t\t.subline {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tflex-basis: 100%;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\n\t&__advanced-control {\n\t\twidth: 100%;\n\n\t\tbutton {\n\t\t\tmargin-top: 0.5em;\n\t\t}\n\n\t}\n\n\t&__advanced {\n\t\twidth: 100%;\n\t\tmargin-bottom: 0.5em;\n\t\ttext-align: left;\n\t\tpadding-left: 0;\n\n\t\tsection {\n\n\t\t\ttextarea,\n\t\t\tdiv.mx-datepicker {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\ttextarea {\n\t\t\t\theight: 80px;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t/*\n The following style is applied out of the component's scope\n to remove padding from the label.checkbox-radio-switch__label,\n which is used to group radio checkbox items. The use of ::v-deep\n ensures that the padding is modified without being affected by\n the component's scoping.\n Without this achieving left alignment for the checkboxes would not\n be possible.\n */\n\t\t\tspan {\n\t\t\t\t::v-deep label {\n\t\t\t\t\tpadding-left: 0 !important;\n\t\t\t\t\tbackground-color: initial !important;\n\t\t\t\t\tborder: none !important;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsection.custom-permissions-group {\n\t\t\t\tpadding-left: 1.5em;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__delete {\n\t\t>button:first-child {\n\t\t\tcolor: rgb(223, 7, 7);\n\t\t}\n\t}\n\n\t&__footer {\n\t\twidth: 100%;\n\t\tdisplay: flex;\n\t\tposition: sticky;\n\t\tbottom: 0;\n\t\tflex-direction: column;\n\t\tjustify-content: space-between;\n\t\talign-items: flex-start;\n\t\tbackground: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));\n\n\t\t.button-group {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: space-between;\n\t\t\twidth: 100%;\n\t\t\tmargin-top: 16px;\n\n\t\t\tbutton {\n\t\t\t\tmargin-left: 16px;\n\n\t\t\t\t&:first-child {\n\t\t\t\t\tmargin-left: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const o=a},44377:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(71354),i=r.n(n),s=r(76314),a=r.n(s)()(i());a.push([t.id,".sharing-entry__inherited .avatar-shared[data-v-33849ae4]{width:32px;height:32px;line-height:32px;font-size:18px;background-color:var(--color-text-maxcontrast);border-radius:50%;flex-shrink:0}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingInherited.vue"],names:[],mappings:"AAEC,0DACC,UAAA,CACA,WAAA,CACA,gBAAA,CACA,cAAA,CACA,8CAAA,CACA,iBAAA,CACA,aAAA",sourcesContent:["\n.sharing-entry__inherited {\n\t.avatar-shared {\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tline-height: 32px;\n\t\tfont-size: 18px;\n\t\tbackground-color: var(--color-text-maxcontrast);\n\t\tborder-radius: 50%;\n\t\tflex-shrink: 0;\n\t}\n}\n"],sourceRoot:""}]);const o=a},85285:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(71354),i=r.n(n),s=r(76314),a=r.n(s)()(i());a.push([t.id,".emptyContentWithSections[data-v-19197a19]{margin:1rem auto}.sharingTab[data-v-19197a19]{position:relative;height:100%}.sharingTab__content[data-v-19197a19]{padding:0 6px}.sharingTab__additionalContent[data-v-19197a19]{margin:44px 0}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingTab.vue"],names:[],mappings:"AACA,2CACC,gBAAA,CAGD,6BACC,iBAAA,CACA,WAAA,CAEA,sCACC,aAAA,CAGD,gDACC,aAAA",sourcesContent:["\n.emptyContentWithSections {\n\tmargin: 1rem auto;\n}\n\n.sharingTab {\n\tposition: relative;\n\theight: 100%;\n\n\t&__content {\n\t\tpadding: 0 6px;\n\t}\n\n\t&__additionalContent {\n\t\tmargin: 44px 0;\n\t}\n}\n"],sourceRoot:""}]);const o=a},37023:(t,e,r)=>{"use strict";e.KT=void 0,r(25440),e.KT=(t,e,r)=>{const s=1===Object.assign({ocsVersion:2},r||{}).ocsVersion?1:2;return window.location.protocol+"//"+window.location.host+i()+"/ocs/v"+s+".php"+n(t,e,r)};const n=(t,e,r)=>{const n=Object.assign({escape:!0},r||{});return"/"!==t.charAt(0)&&(t="/"+t),i=(i=e||{})||{},t.replace(/{([^{}]*)}/g,(function(t,e){var r=i[e];return n.escape?"string"==typeof r||"number"==typeof r?encodeURIComponent(r.toString()):encodeURIComponent(t):"string"==typeof r||"number"==typeof r?r.toString():t}));var i};function i(){let t=window._oc_webroot;if(void 0===t){t=location.pathname;const e=t.indexOf("/index.php/");t=-1!==e?t.substr(0,e):t.substr(0,t.lastIndexOf("/"))}return t}},48318:function(t,e,r){!function(t){"use strict";var e,r=function(){try{if(t.URLSearchParams&&"bar"===new t.URLSearchParams("foo=bar").get("foo"))return t.URLSearchParams}catch(t){}return null}(),n=r&&"a=1"===new r({a:1}).toString(),i=r&&"+"===new r("s=%2B").get("s"),s=r&&"size"in r.prototype,a="__URLSearchParams__",o=!r||((e=new r).append("s"," &"),"s=+%26"===e.toString()),l=p.prototype,c=!(!t.Symbol||!t.Symbol.iterator);if(!(r&&n&&i&&o&&s)){l.append=function(t,e){v(this[a],t,e)},l.delete=function(t){delete this[a][t]},l.get=function(t){var e=this[a];return this.has(t)?e[t][0]:null},l.getAll=function(t){var e=this[a];return this.has(t)?e[t].slice(0):[]},l.has=function(t){return E(this[a],t)},l.set=function(t,e){this[a][t]=[""+e]},l.toString=function(){var t,e,r,n,i=this[a],s=[];for(e in i)for(r=f(e),t=0,n=i[e];t<n.length;t++)s.push(r+"="+f(n[t]));return s.join("&")};var h,u=t.Proxy&&r&&(!i||!o||!n||!s);u?(h=new Proxy(r,{construct:function(t,e){return new t(new p(e[0]).toString())}})).toString=Function.prototype.toString.bind(p):h=p,Object.defineProperty(t,"URLSearchParams",{value:h});var d=t.URLSearchParams.prototype;d.polyfill=!0,!u&&t.Symbol&&(d[t.Symbol.toStringTag]="URLSearchParams"),"forEach"in d||(d.forEach=function(t,e){var r=m(this.toString());Object.getOwnPropertyNames(r).forEach((function(n){r[n].forEach((function(r){t.call(e,r,n,this)}),this)}),this)}),"sort"in d||(d.sort=function(){var t,e,r,n=m(this.toString()),i=[];for(t in n)i.push(t);for(i.sort(),e=0;e<i.length;e++)this.delete(i[e]);for(e=0;e<i.length;e++){var s=i[e],a=n[s];for(r=0;r<a.length;r++)this.append(s,a[r])}}),"keys"in d||(d.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),A(t)}),"values"in d||(d.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),A(t)}),"entries"in d||(d.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),A(t)}),c&&(d[t.Symbol.iterator]=d[t.Symbol.iterator]||d.entries),"size"in d||Object.defineProperty(d,"size",{get:function(){var t=m(this.toString());if(d===this)throw new TypeError("Illegal invocation at URLSearchParams.invokeGetter");return Object.keys(t).reduce((function(e,r){return e+t[r].length}),0)}})}function p(t){((t=t||"")instanceof URLSearchParams||t instanceof p)&&(t=t.toString()),this[a]=m(t)}function f(t){var e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'\(\)~]|%20|%00/g,(function(t){return e[t]}))}function g(t){return t.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/gi,(function(t){return decodeURIComponent(t)}))}function A(e){var r={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return c&&(r[t.Symbol.iterator]=function(){return r}),r}function m(t){var e={};if("object"==typeof t)if(y(t))for(var r=0;r<t.length;r++){var n=t[r];if(!y(n)||2!==n.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");v(e,n[0],n[1])}else for(var i in t)t.hasOwnProperty(i)&&v(e,i,t[i]);else{0===t.indexOf("?")&&(t=t.slice(1));for(var s=t.split("&"),a=0;a<s.length;a++){var o=s[a],l=o.indexOf("=");-1<l?v(e,g(o.slice(0,l)),g(o.slice(l+1))):o&&v(e,g(o),"")}}return e}function v(t,e,r){var n="string"==typeof r?r:null!=r&&"function"==typeof r.toString?r.toString():JSON.stringify(r);E(t,e)?t[e].push(n):t[e]=[n]}function y(t){return!!t&&"[object Array]"===Object.prototype.toString.call(t)}function E(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(void 0!==r.g?r.g:"undefined"!=typeof window?window:this)},72561:(e,r,n)=>{"use strict";n.r(r),n.d(r,{default:()=>kr});var i=n(85072),s=n.n(i),a=n(97825),o=n.n(a),l=n(77659),c=n.n(l),h=n(55056),u=n.n(h),d=n(10540),p=n.n(d),f=n(41113),g=n.n(f),A=n(86243),m={};m.styleTagTransform=g(),m.setAttributes=u(),m.insert=c().bind(null,"head"),m.domAPI=o(),m.insertStyleElement=p(),s()(A.A,m),A.A&&A.A.locals&&A.A.locals;var v=n(41944),y=n(67607);const E=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},_="object"==typeof global&&global&&global.Object===Object&&global;var w="object"==typeof self&&self&&self.Object===Object&&self;const C=_||w||Function("return this")(),b=function(){return C.Date.now()};var S=/\s/;var x=/^\s+/;const T=function(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&S.test(t.charAt(e)););return e}(t)+1).replace(x,""):t},P=C.Symbol;var R=Object.prototype,I=R.hasOwnProperty,k=R.toString,N=P?P.toStringTag:void 0;var D=Object.prototype.toString;var L=P?P.toStringTag:void 0;const O=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":L&&L in Object(t)?function(t){var e=I.call(t,N),r=t[N];try{t[N]=void 0;var n=!0}catch(t){}var i=k.call(t);return n&&(e?t[N]=r:delete t[N]),i}(t):function(t){return D.call(t)}(t)};var B=/^[-+]0x[0-9a-f]+$/i,M=/^0b[01]+$/i,U=/^0o[0-7]+$/i,H=parseInt;const Y=function(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&"[object Symbol]"==O(t)}(t))return NaN;if(E(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=E(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=T(t);var r=M.test(t);return r||U.test(t)?H(t.slice(2),r?2:8):B.test(t)?NaN:+t};var $=Math.max,F=Math.min;var j=n(24764),V=n(89257),z=n(85471),q=n(65043),W=n(37023),G=n(96763);const K=new class{constructor(){this.http=q.Ay}listCollection(t){return this.http.get((0,W.KT)("collaboration/resources/collections/{collectionId}",{collectionId:t}))}renameCollection(t,e){return this.http.put((0,W.KT)("collaboration/resources/collections/{collectionId}",{collectionId:t}),{collectionName:e}).then((t=>t.data.ocs.data))}getCollectionsByResource(t,e){return this.http.get((0,W.KT)("collaboration/resources/{resourceType}/{resourceId}",{resourceType:t,resourceId:e})).then((t=>t.data.ocs.data))}createCollection(t,e,r){return this.http.post((0,W.KT)("collaboration/resources/{resourceType}/{resourceId}",{resourceType:t,resourceId:e}),{name:r}).then((t=>t.data.ocs.data))}addResource(t,e,r){return r=""+r,this.http.post((0,W.KT)("collaboration/resources/collections/{collectionId}",{collectionId:t}),{resourceType:e,resourceId:r}).then((t=>t.data.ocs.data))}removeResource(t,e,r){return this.http.delete((0,W.KT)("collaboration/resources/collections/{collectionId}",{collectionId:t}),{params:{resourceType:e,resourceId:r}}).then((t=>t.data.ocs.data))}search(t){return this.http.get((0,W.KT)("collaboration/resources/collections/search/{query}",{query:t})).then((t=>t.data.ocs.data))}},X=z.Ay.observable({collections:[]}),Z={addCollections(t){(0,z.hZ)(X,"collections",t)},addCollection(t){X.collections.push(t)},removeCollection(t){(0,z.hZ)(X,"collections",X.collections.filter((e=>e.id!==t)))},updateCollection(t){const e=X.collections.findIndex((e=>e.id===t.id));-1!==e?(0,z.hZ)(X.collections,e,t):X.collections.push(t)}},Q={fetchCollectionsByResource:({resourceType:t,resourceId:e})=>K.getCollectionsByResource(t,e).then((t=>(Z.addCollections(t),t))),createCollection:({baseResourceType:t,baseResourceId:e,resourceType:r,resourceId:n,name:i})=>K.createCollection(t,e,i).then((t=>{Z.addCollection(t),Q.addResourceToCollection({collectionId:t.id,resourceType:r,resourceId:n})})),renameCollection:({collectionId:t,name:e})=>K.renameCollection(t,e).then((t=>(Z.updateCollection(t),t))),addResourceToCollection:({collectionId:t,resourceType:e,resourceId:r})=>K.addResource(t,e,r).then((t=>(Z.updateCollection(t),t))),removeResource:({collectionId:t,resourceType:e,resourceId:r})=>K.removeResource(t,e,r).then((t=>{t.resources.length>0?Z.updateCollection(t):Z.removeCollection(t)})),search:t=>K.search(t)};function J(t,e,r,n,i,s,a,o){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=r,c._compiled=!0),n&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),a?(l=function(t){!(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)&&typeof __VUE_SSR_CONTEXT__<"u"&&(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=l):i&&(l=o?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var h=c.render;c.render=function(t,e){return l.call(e),h(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:c}}const tt=J({name:"CollectionListItem",components:{NcAvatar:v.A,NcActions:j.A,NcActionButton:V.A},props:{collection:{type:Object,default:null}},data:()=>({detailsOpen:!1,newName:null,error:{}}),computed:{getIcon:()=>t=>[t.iconClass],typeClass:()=>t=>"resource-type-"+t.type,limitedResources:()=>t=>t.resources?t.resources.slice(0,2):[],iconUrl:()=>t=>t.mimetype?OC.MimeType.getIconUrl(t.mimetype):t.iconUrl?t.iconUrl:""},methods:{toggleDetails(){this.detailsOpen=!this.detailsOpen},showDetails(){this.detailsOpen=!0},hideDetails(){this.detailsOpen=!1},removeResource(t,e){Q.removeResource({collectionId:t.id,resourceType:e.type,resourceId:e.id})},openRename(){this.newName=this.collection.name},renameCollection(){""!==this.newName?Q.renameCollection({collectionId:this.collection.id,name:this.newName}).then((t=>{this.newName=null})).catch((e=>{this.$set(this.error,"rename",t("core","Failed to rename the project")),G.error(e),setTimeout((()=>{(0,z.hZ)(this.error,"rename",null)}),3e3)})):this.newName=null}}},(function(){var t=this,e=t._self._c;return e("li",{staticClass:"collection-list-item"},[e("NcAvatar",{staticClass:"collection-avatar",attrs:{"display-name":t.collection.name,"allow-placeholder":""}}),null===t.newName?e("span",{staticClass:"collection-item-name",attrs:{title:""},on:{click:t.showDetails}},[t._v(t._s(t.collection.name))]):e("form",{class:{shouldshake:t.error.rename},on:{submit:function(e){return e.preventDefault(),t.renameCollection.apply(null,arguments)}}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.newName,expression:"newName"}],attrs:{type:"text",autocomplete:"off",autocapitalize:"off"},domProps:{value:t.newName},on:{input:function(e){e.target.composing||(t.newName=e.target.value)}}}),e("input",{staticClass:"icon-confirm",attrs:{type:"submit",value:""}})]),t.detailsOpen||null!==t.newName?t._e():e("div",{staticClass:"linked-icons"},t._l(t.limitedResources(t.collection),(function(r){return e("a",{key:r.type+"|"+r.id,class:t.typeClass(r),attrs:{title:r.name,href:r.link}},[e("img",{attrs:{src:t.iconUrl(r)}})])})),0),null===t.newName?e("span",{staticClass:"sharingOptionsGroup"},[e("NcActions",[e("NcActionButton",{attrs:{icon:"icon-info"},on:{click:function(e){return e.preventDefault(),t.toggleDetails.apply(null,arguments)}}},[t._v(" "+t._s(t.detailsOpen?t.t("core","Hide details"):t.t("core","Show details"))+" ")]),e("NcActionButton",{attrs:{icon:"icon-rename"},on:{click:function(e){return e.preventDefault(),t.openRename.apply(null,arguments)}}},[t._v(" "+t._s(t.t("core","Rename project"))+" ")])],1)],1):t._e(),e("transition",{attrs:{name:"fade"}},[t.error.rename?e("div",{staticClass:"error"},[t._v(" "+t._s(t.error.rename)+" ")]):t._e()]),e("transition",{attrs:{name:"fade"}},[t.detailsOpen?e("ul",{staticClass:"resource-list-details"},t._l(t.collection.resources,(function(r){return e("li",{key:r.type+"|"+r.id,class:t.typeClass(r)},[e("a",{attrs:{href:r.link}},[e("img",{attrs:{src:t.iconUrl(r)}}),e("span",{staticClass:"resource-name"},[t._v(t._s(r.name||""))])]),e("span",{staticClass:"icon-close",on:{click:function(e){return t.removeResource(t.collection,r)}}})])})),0):t._e()])],1)}),[],!1,null,"8e58e0a5",null,null).exports,et=function(t,e,r){var n,i,s,a,o,l,c=0,h=!1,u=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(e){var r=n,s=i;return n=i=void 0,c=e,a=t.apply(s,r)}function f(t){var r=t-l;return void 0===l||r>=e||r<0||u&&t-c>=s}function g(){var t=b();if(f(t))return A(t);o=setTimeout(g,function(t){var r=e-(t-l);return u?F(r,s-(t-c)):r}(t))}function A(t){return o=void 0,d&&n?p(t):(n=i=void 0,a)}function m(){var t=b(),r=f(t);if(n=arguments,i=this,l=t,r){if(void 0===o)return function(t){return c=t,o=setTimeout(g,e),h?p(t):a}(l);if(u)return clearTimeout(o),o=setTimeout(g,e),p(l)}return void 0===o&&(o=setTimeout(g,e)),a}return e=Y(e)||0,E(r)&&(h=!!r.leading,s=(u="maxWait"in r)?$(Y(r.maxWait)||0,e):s,d="trailing"in r?!!r.trailing:d),m.cancel=function(){void 0!==o&&clearTimeout(o),c=0,n=l=i=o=void 0},m.flush=function(){return void 0===o?a:A(b())},m}((function(t,e){""!==t&&(e(!0),Q.search(t).then((t=>{this.searchCollections=t})).catch((t=>{G.error("Failed to search for collections",t)})).finally((()=>{e(!1)})))}),500,{}),rt=J({name:"CollectionList",components:{CollectionListItem:tt,NcAvatar:v.A,NcSelect:y.A},props:{type:{type:String,default:null},id:{type:String,default:null},name:{type:String,default:""},isActive:{type:Boolean,default:!0}},data:()=>({selectIsOpen:!1,generatingCodes:!1,codes:void 0,value:null,model:{},searchCollections:[],error:null,state:X,isSelectOpen:!1}),computed:{collections(){return this.state.collections.filter((t=>typeof t.resources.find((t=>t&&t.id===""+this.id&&t.type===this.type))<"u"))},placeholder(){return this.isSelectOpen?t("core","Type to search for existing projects"):t("core","Add to a project")},options(){const t=[];window.OCP.Collaboration.getTypes().sort().forEach((e=>{t.push({method:0,type:e,title:window.OCP.Collaboration.getLabel(e),class:window.OCP.Collaboration.getIcon(e),action:()=>window.OCP.Collaboration.trigger(e)})}));for(const e in this.searchCollections)-1===this.collections.findIndex((t=>t.id===this.searchCollections[e].id))&&t.push({method:1,title:this.searchCollections[e].name,collectionId:this.searchCollections[e].id});return t}},watch:{type(){this.isActive&&Q.fetchCollectionsByResource({resourceType:this.type,resourceId:this.id})},id(){this.isActive&&Q.fetchCollectionsByResource({resourceType:this.type,resourceId:this.id})},isActive(t){t&&Q.fetchCollectionsByResource({resourceType:this.type,resourceId:this.id})}},mounted(){Q.fetchCollectionsByResource({resourceType:this.type,resourceId:this.id})},methods:{select(e,r){0===e.method&&e.action().then((r=>{Q.createCollection({baseResourceType:this.type,baseResourceId:this.id,resourceType:e.type,resourceId:r,name:this.name}).catch((e=>{this.setError(t("core","Failed to create a project"),e)}))})).catch((t=>{G.error("No resource selected",t)})),1===e.method&&Q.addResourceToCollection({collectionId:e.collectionId,resourceType:this.type,resourceId:this.id}).catch((e=>{this.setError(t("core","Failed to add the item to the project"),e)}))},search(t,e){et.bind(this)(t,e)},showSelect(){this.selectIsOpen=!0,this.$refs.select.$el.focus()},hideSelect(){this.selectIsOpen=!1},isVueComponent:t=>t._isVue,setError(t,e){G.error(t,e),this.error=t,setTimeout((()=>{this.error=null}),5e3)}}},(function(){var t=this,e=t._self._c;return t.collections&&t.type&&t.id?e("ul",{staticClass:"collection-list",attrs:{id:"collection-list"}},[e("li",{on:{click:t.showSelect}},[t._m(0),e("div",{attrs:{id:"collection-select-container"}},[e("NcSelect",{ref:"select",attrs:{"aria-label-combobox":t.t("core","Add to a project"),options:t.options,placeholder:t.placeholder,label:"title",limit:5},on:{close:function(e){t.isSelectOpen=!1},open:function(e){t.isSelectOpen=!0},"option:selected":t.select,search:t.search},scopedSlots:t._u([{key:"selected-option",fn:function(r){return[e("span",{staticClass:"option__desc"},[e("span",{staticClass:"option__title"},[t._v(t._s(r.title))])])]}},{key:"option",fn:function(r){return[e("span",{staticClass:"option__wrapper"},[r.class?e("span",{staticClass:"avatar",class:r.class}):2!==r.method?e("NcAvatar",{attrs:{"allow-placeholder":"","display-name":r.title}}):t._e(),e("span",{staticClass:"option__title"},[t._v(t._s(r.title))])],1)]}}],null,!1,2397208459),model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},[e("p",{staticClass:"hint"},[t._v(" "+t._s(t.t("core","Connect items to a project to make them easier to find"))+" ")])])],1)]),e("transition",{attrs:{name:"fade"}},[t.error?e("li",{staticClass:"error"},[t._v(" "+t._s(t.error)+" ")]):t._e()]),t._l(t.collections,(function(t){return e("CollectionListItem",{key:t.id,attrs:{collection:t}})}))],2):t._e()}),[function(){var t=this._self._c;return t("div",{staticClass:"avatar"},[t("span",{staticClass:"icon-projects"})])}],!1,null,"75a4370b",null,null).exports;var nt=n(63814),it=n(32981),st=n(87485);class at{constructor(){(function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r})(this,"_capabilities",void 0),this._capabilities=(0,st.F)()}get defaultPermissions(){var t;return null===(t=this._capabilities.files_sharing)||void 0===t?void 0:t.default_permissions}get isPublicUploadEnabled(){var t;return!0===(null===(t=this._capabilities.files_sharing)||void 0===t||null===(t=t.public)||void 0===t?void 0:t.upload)}get federatedShareDocLink(){return window.OC.appConfig.core.federatedCloudShareDoc}get defaultExpirationDate(){return this.isDefaultExpireDateEnabled&&null!==this.defaultExpireDate?new Date((new Date).setDate((new Date).getDate()+this.defaultExpireDate)):null}get defaultInternalExpirationDate(){return this.isDefaultInternalExpireDateEnabled&&null!==this.defaultInternalExpireDate?new Date((new Date).setDate((new Date).getDate()+this.defaultInternalExpireDate)):null}get defaultRemoteExpirationDateString(){return this.isDefaultRemoteExpireDateEnabled&&null!==this.defaultRemoteExpireDate?new Date((new Date).setDate((new Date).getDate()+this.defaultRemoteExpireDate)):null}get enforcePasswordForPublicLink(){return!0===window.OC.appConfig.core.enforcePasswordForPublicLink}get enableLinkPasswordByDefault(){return!0===window.OC.appConfig.core.enableLinkPasswordByDefault}get isDefaultExpireDateEnforced(){return!0===window.OC.appConfig.core.defaultExpireDateEnforced}get isDefaultExpireDateEnabled(){return!0===window.OC.appConfig.core.defaultExpireDateEnabled}get isDefaultInternalExpireDateEnforced(){return!0===window.OC.appConfig.core.defaultInternalExpireDateEnforced}get isDefaultInternalExpireDateEnabled(){return!0===window.OC.appConfig.core.defaultInternalExpireDateEnabled}get isDefaultRemoteExpireDateEnforced(){return!0===window.OC.appConfig.core.defaultRemoteExpireDateEnforced}get isDefaultRemoteExpireDateEnabled(){return!0===window.OC.appConfig.core.defaultRemoteExpireDateEnabled}get isRemoteShareAllowed(){return!0===window.OC.appConfig.core.remoteShareAllowed}get isPublicShareAllowed(){var t;return!0===(null===(t=this._capabilities)||void 0===t||null===(t=t.files_sharing)||void 0===t||null===(t=t.public)||void 0===t?void 0:t.enabled)}get isMailShareAllowed(){var t;return!0===(null===(t=this._capabilities)||void 0===t||null===(t=t.files_sharing)||void 0===t||null===(t=t.sharebymail)||void 0===t?void 0:t.enabled)&&!0===this.isPublicShareAllowed}get defaultExpireDate(){return window.OC.appConfig.core.defaultExpireDate}get defaultInternalExpireDate(){return window.OC.appConfig.core.defaultInternalExpireDate}get defaultRemoteExpireDate(){return window.OC.appConfig.core.defaultRemoteExpireDate}get isResharingAllowed(){return!0===window.OC.appConfig.core.resharingAllowed}get isPasswordForMailSharesRequired(){var t;return!0===(null===(t=this._capabilities.files_sharing)||void 0===t||null===(t=t.sharebymail)||void 0===t||null===(t=t.password)||void 0===t?void 0:t.enforced)}get shouldAlwaysShowUnique(){var t;return!0===(null===(t=this._capabilities.files_sharing)||void 0===t||null===(t=t.sharee)||void 0===t?void 0:t.always_show_unique)}get allowGroupSharing(){return!0===window.OC.appConfig.core.allowGroupSharing}get maxAutocompleteResults(){return parseInt(window.OC.config["sharing.maxAutocompleteResults"],10)||25}get minSearchStringLength(){return parseInt(window.OC.config["sharing.minSearchStringLength"],10)||0}get passwordPolicy(){var t;return(null===(t=this._capabilities)||void 0===t?void 0:t.password_policy)||{}}}var ot=n(77905),lt=n(35810),ct=n(21777),ht=n(35947);const ut=(0,ht.YK)().setApp("files_sharing").detectUser().build();var dt;"/files/".concat(null===(dt=(0,ct.HW)())||void 0===dt?void 0:dt.uid);var pt=n(96763);class ft{constructor(t){var e;if(function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(this,"_share",void 0),t.ocs&&t.ocs.data&&t.ocs.data[0]&&(t=t.ocs.data[0]),t.hide_download=!!t.hide_download,t.mail_send=!!t.mail_send,t.attributes&&"string"==typeof t.attributes)try{t.attributes=JSON.parse(t.attributes)}catch(e){pt.warn("Could not parse share attributes returned by server",t.attributes)}t.attributes=null!==(e=t.attributes)&&void 0!==e?e:[],this._share=t}get state(){return this._share}get id(){return this._share.id}get type(){return this._share.share_type}get permissions(){return this._share.permissions}get attributes(){return this._share.attributes}set permissions(t){this._share.permissions=t}get owner(){return this._share.uid_owner}get ownerDisplayName(){return this._share.displayname_owner}get shareWith(){return this._share.share_with}get shareWithDisplayName(){return this._share.share_with_displayname||this._share.share_with}get shareWithDisplayNameUnique(){return this._share.share_with_displayname_unique||this._share.share_with}get shareWithLink(){return this._share.share_with_link}get shareWithAvatar(){return this._share.share_with_avatar}get uidFileOwner(){return this._share.uid_file_owner}get displaynameFileOwner(){return this._share.displayname_file_owner||this._share.uid_file_owner}get createdTime(){return this._share.stime}get expireDate(){return this._share.expiration}set expireDate(t){this._share.expiration=t}get token(){return this._share.token}get note(){return this._share.note}set note(t){this._share.note=t}get label(){var t;return null!==(t=this._share.label)&&void 0!==t?t:""}set label(t){this._share.label=t}get mailSend(){return!0===this._share.mail_send}get hideDownload(){return!0===this._share.hide_download}set hideDownload(t){this._share.hide_download=!0===t}get password(){return this._share.password}set password(t){this._share.password=t}get passwordExpirationTime(){return this._share.password_expiration_time}set passwordExpirationTime(t){this._share.password_expiration_time=t}get sendPasswordByTalk(){return this._share.send_password_by_talk}set sendPasswordByTalk(t){this._share.send_password_by_talk=t}get path(){return this._share.path}get itemType(){return this._share.item_type}get mimetype(){return this._share.mimetype}get fileSource(){return this._share.file_source}get fileTarget(){return this._share.file_target}get fileParent(){return this._share.file_parent}get hasReadPermission(){return!!(this.permissions&window.OC.PERMISSION_READ)}get hasCreatePermission(){return!!(this.permissions&window.OC.PERMISSION_CREATE)}get hasDeletePermission(){return!!(this.permissions&window.OC.PERMISSION_DELETE)}get hasUpdatePermission(){return!!(this.permissions&window.OC.PERMISSION_UPDATE)}get hasSharePermission(){return!!(this.permissions&window.OC.PERMISSION_SHARE)}get hasDownloadPermission(){return this.attributes.some((t=>"permissions"===t.scope&&"download"===t.key&&!1===t.value))}get isFileRequest(){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[]";const e=t=>"fileRequest"===t.scope&&"enabled"===t.key&&!0===t.value;try{return JSON.parse(t).some(e)}catch(t){return ut.error("Error while parsing share attributes",{error:t}),!1}}(JSON.stringify(this.attributes))}set hasDownloadPermission(t){this.setAttribute("permissions","download",!!t)}setAttribute(t,e,r){const n={scope:t,key:e,value:r};for(const t in this._share.attributes){const e=this._share.attributes[t];if(e.scope===n.scope&&e.key===n.key)return void this._share.attributes.splice(t,1,n)}this._share.attributes.push(n)}get canEdit(){return!0===this._share.can_edit}get canDelete(){return!0===this._share.can_delete}get viaFileid(){return this._share.via_fileid}get viaPath(){return this._share.via_path}get parent(){return this._share.parent}get storageId(){return this._share.storage_id}get storage(){return this._share.storage}get itemSource(){return this._share.item_source}get status(){return this._share.status}}const gt={data:()=>({SHARE_TYPES:ot.Z})};var At=n(85168),mt=n(85338),vt=n(35111);const yt={name:"SharingEntrySimple",components:{NcActions:j.A},props:{title:{type:String,default:"",required:!0},subtitle:{type:String,default:""},isUnique:{type:Boolean,default:!0},ariaExpanded:{type:Boolean,default:null}},computed:{ariaExpandedValue(){return null===this.ariaExpanded?this.ariaExpanded:this.ariaExpanded?"true":"false"}}};var Et=n(59826),_t={};_t.styleTagTransform=g(),_t.setAttributes=u(),_t.insert=c().bind(null,"head"),_t.domAPI=o(),_t.insertStyleElement=p(),s()(Et.A,_t),Et.A&&Et.A.locals&&Et.A.locals;var wt=n(14486);const Ct=(0,wt.A)(yt,(function(){var t=this,e=t._self._c;return e("li",{staticClass:"sharing-entry"},[t._t("avatar"),t._v(" "),e("div",{staticClass:"sharing-entry__desc"},[e("span",{staticClass:"sharing-entry__title"},[t._v(t._s(t.title))]),t._v(" "),t.subtitle?e("p",[t._v("\n\t\t\t"+t._s(t.subtitle)+"\n\t\t")]):t._e()]),t._v(" "),t.$slots.default?e("NcActions",{ref:"actionsComponent",staticClass:"sharing-entry__actions",attrs:{"menu-align":"right","aria-expanded":t.ariaExpandedValue}},[t._t("default")],2):t._e()],2)}),[],!1,null,"3bc1ac54",null).exports;var bt=n(96763);const St={name:"SharingEntryInternal",components:{NcActionButton:V.A,SharingEntrySimple:Ct,CheckIcon:mt.A,ClipboardIcon:vt.A},props:{fileInfo:{type:Object,default:()=>{},required:!0}},data:()=>({copied:!1,copySuccess:!1}),computed:{internalLink(){return window.location.protocol+"//"+window.location.host+(0,nt.Jv)("/f/")+this.fileInfo.id},copyLinkTooltip(){return this.copied?this.copySuccess?"":t("files_sharing","Cannot copy, please copy the link manually"):t("files_sharing","Copy internal link to clipboard")},internalLinkSubtitle(){return"dir"===this.fileInfo.type?t("files_sharing","Only works for people with access to this folder"):t("files_sharing","Only works for people with access to this file")}},methods:{async copyLink(){try{await navigator.clipboard.writeText(this.internalLink),(0,At.Te)(t("files_sharing","Link copied")),this.$refs.shareEntrySimple.$refs.actionsComponent.$el.focus(),this.copySuccess=!0,this.copied=!0}catch(t){this.copySuccess=!1,this.copied=!0,bt.error(t)}finally{setTimeout((()=>{this.copySuccess=!1,this.copied=!1}),4e3)}}}};var xt=n(23815),Tt={};Tt.styleTagTransform=g(),Tt.setAttributes=u(),Tt.insert=c().bind(null,"head"),Tt.domAPI=o(),Tt.insertStyleElement=p(),s()(xt.A,Tt),xt.A&&xt.A.locals&&xt.A.locals;const Pt=(0,wt.A)(St,(function(){var t=this,e=t._self._c;return e("ul",[e("SharingEntrySimple",{ref:"shareEntrySimple",staticClass:"sharing-entry__internal",attrs:{title:t.t("files_sharing","Internal link"),subtitle:t.internalLinkSubtitle},scopedSlots:t._u([{key:"avatar",fn:function(){return[e("div",{staticClass:"avatar-external icon-external-white"})]},proxy:!0}])},[t._v(" "),e("NcActionButton",{attrs:{title:t.copyLinkTooltip,"aria-label":t.copyLinkTooltip},on:{click:t.copyLink},scopedSlots:t._u([{key:"icon",fn:function(){return[t.copied&&t.copySuccess?e("CheckIcon",{staticClass:"icon-checkmark-color",attrs:{size:20}}):e("ClipboardIcon",{attrs:{size:20}})]},proxy:!0}])})],1)],1)}),[],!1,null,"1d9a7cfa",null).exports;var Rt=n(17334),It=n.n(Rt),kt=(n(48318),n(61338)),Nt=n(96763);const Dt=(0,nt.KT)("apps/files_sharing/api/v1/shares"),Lt={methods:{async createShare(e){let{path:r,permissions:n,shareType:i,shareWith:s,publicUpload:a,password:o,sendPasswordByTalk:l,expireDate:c,label:h,note:u,attributes:d}=e;try{var p;const t=await q.Ay.post(Dt,{path:r,permissions:n,shareType:i,shareWith:s,publicUpload:a,password:o,sendPasswordByTalk:l,expireDate:c,label:h,note:u,attributes:d});if(null==t||null===(p=t.data)||void 0===p||!p.ocs)throw t;const e=new ft(t.data.ocs.data);return(0,kt.Ic)("files_sharing:share:created",{share:e}),e}catch(e){var f;Nt.error("Error while creating share",e);const r=null==e||null===(f=e.response)||void 0===f||null===(f=f.data)||void 0===f||null===(f=f.ocs)||void 0===f||null===(f=f.meta)||void 0===f?void 0:f.message;throw OC.Notification.showTemporary(r?t("files_sharing","Error creating the share: {errorMessage}",{errorMessage:r}):t("files_sharing","Error creating the share"),{type:"error"}),e}},async deleteShare(e){try{var r;const t=await q.Ay.delete(Dt+"/".concat(e));if(null==t||null===(r=t.data)||void 0===r||!r.ocs)throw t;return(0,kt.Ic)("files_sharing:share:deleted",{id:e}),!0}catch(e){var n;Nt.error("Error while deleting share",e);const r=null==e||null===(n=e.response)||void 0===n||null===(n=n.data)||void 0===n||null===(n=n.ocs)||void 0===n||null===(n=n.meta)||void 0===n?void 0:n.message;throw OC.Notification.showTemporary(r?t("files_sharing","Error deleting the share: {errorMessage}",{errorMessage:r}):t("files_sharing","Error deleting the share"),{type:"error"}),e}},async updateShare(e,r){try{var n;const t=await q.Ay.put(Dt+"/".concat(e),r);if((0,kt.Ic)("files_sharing:share:updated",{id:e}),null!=t&&null!==(n=t.data)&&void 0!==n&&n.ocs)return t.data.ocs.data;throw t}catch(e){if(Nt.error("Error while updating share",e),400!==e.response.status){var i;const r=null==e||null===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i||null===(i=i.ocs)||void 0===i||null===(i=i.meta)||void 0===i?void 0:i.message;OC.Notification.showTemporary(r?t("files_sharing","Error updating the share: {errorMessage}",{errorMessage:r}):t("files_sharing","Error updating the share"),{type:"error"})}const r=e.response.data.ocs.meta.message;throw new Error(r)}}}},Ot={methods:{async openSharingDetails(t){let e={};if(t.handler){const r={};this.suggestions&&(r.suggestions=this.suggestions,r.fileInfo=this.fileInfo,r.query=this.query);const n=await t.handler(r);e=this.mapShareRequestToShareObject(n)}else e=this.mapShareRequestToShareObject(t);const r={fileInfo:this.fileInfo,share:e};this.$emit("open-sharing-details",r)},openShareDetailsForCustomSettings(t){t.setCustomPermissions=!0,this.openSharingDetails(t)},mapShareRequestToShareObject(t){var e;if(t.id)return t;const r={attributes:[{value:!0,key:"download",scope:"permissions"}],share_type:t.shareType,share_with:t.shareWith,is_no_user:t.isNoUser,user:t.shareWith,share_with_displayname:t.displayName,subtitle:t.subtitle,permissions:null!==(e=t.permissions)&&void 0!==e?e:(new at).defaultPermissions,expiration:""};return new ft(r)}}};var Bt=n(96763);const Mt={name:"SharingInput",components:{NcSelect:y.A},mixins:[gt,Lt,Ot],props:{shares:{type:Array,default:()=>[],required:!0},linkShares:{type:Array,default:()=>[],required:!0},fileInfo:{type:Object,default:()=>{},required:!0},reshare:{type:ft,default:null},canReshare:{type:Boolean,required:!0}},data:()=>({config:new at,loading:!1,query:"",recommendations:[],ShareSearch:OCA.Sharing.ShareSearch.state,suggestions:[],value:null}),computed:{externalResults(){return this.ShareSearch.results},inputPlaceholder(){const e=this.config.isRemoteShareAllowed;return this.canReshare?e?t("files_sharing","Name, email, or Federated Cloud ID …"):t("files_sharing","Name or email …"):t("files_sharing","Resharing is not allowed")},isValidQuery(){return this.query&&""!==this.query.trim()&&this.query.length>this.config.minSearchStringLength},options(){return this.isValidQuery?this.suggestions:this.recommendations},noResultText(){return this.loading?t("files_sharing","Searching …"):t("files_sharing","No elements found.")}},mounted(){this.getRecommendations()},methods:{onSelected(t){this.value=null,this.openSharingDetails(t)},async asyncFind(t){this.query=t.trim(),this.isValidQuery&&(this.loading=!0,await this.debounceGetSuggestions(t))},async getSuggestions(e){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.loading=!0,!0===(0,st.F)().files_sharing.sharee.query_lookup_default&&(r=!0);const n=[this.SHARE_TYPES.SHARE_TYPE_USER,this.SHARE_TYPES.SHARE_TYPE_GROUP,this.SHARE_TYPES.SHARE_TYPE_REMOTE,this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP,this.SHARE_TYPES.SHARE_TYPE_CIRCLE,this.SHARE_TYPES.SHARE_TYPE_ROOM,this.SHARE_TYPES.SHARE_TYPE_GUEST,this.SHARE_TYPES.SHARE_TYPE_DECK,this.SHARE_TYPES.SHARE_TYPE_SCIENCEMESH];!0===(0,st.F)().files_sharing.public.enabled&&n.push(this.SHARE_TYPES.SHARE_TYPE_EMAIL);let i=null;try{i=await q.Ay.get((0,nt.KT)("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"dir"===this.fileInfo.type?"folder":"file",search:e,lookup:r,perPage:this.config.maxAutocompleteResults,shareType:n}})}catch(t){return void Bt.error("Error fetching suggestions",t)}const s=i.data.ocs.data,a=i.data.ocs.data.exact;s.exact=[];const o=Object.values(a).reduce(((t,e)=>t.concat(e)),[]),l=Object.values(s).reduce(((t,e)=>t.concat(e)),[]),c=this.filterOutExistingShares(o).map((t=>this.formatForMultiselect(t))).sort(((t,e)=>t.shareType-e.shareType)),h=this.filterOutExistingShares(l).map((t=>this.formatForMultiselect(t))).sort(((t,e)=>t.shareType-e.shareType)),u=[];s.lookupEnabled&&!r&&u.push({id:"global-lookup",isNoUser:!0,displayName:t("files_sharing","Search globally"),lookup:!0});const d=this.externalResults.filter((t=>!t.condition||t.condition(this))),p=c.concat(h).concat(d).concat(u),f=p.reduce(((t,e)=>e.displayName?(t[e.displayName]||(t[e.displayName]=0),t[e.displayName]++,t):t),{});this.suggestions=p.map((t=>f[t.displayName]>1&&!t.desc?{...t,desc:t.shareWithDisplayNameUnique}:t)),this.loading=!1,Bt.info("suggestions",this.suggestions)},debounceGetSuggestions:It()((function(){this.getSuggestions(...arguments)}),300),async getRecommendations(){this.loading=!0;let t=null;try{t=await q.Ay.get((0,nt.KT)("apps/files_sharing/api/v1/sharees_recommended"),{params:{format:"json",itemType:this.fileInfo.type}})}catch(t){return void Bt.error("Error fetching recommendations",t)}const e=this.externalResults.filter((t=>!t.condition||t.condition(this))),r=Object.values(t.data.ocs.data.exact).reduce(((t,e)=>t.concat(e)),[]);this.recommendations=this.filterOutExistingShares(r).map((t=>this.formatForMultiselect(t))).concat(e),this.loading=!1,Bt.info("recommendations",this.recommendations)},filterOutExistingShares(t){return t.reduce(((t,e)=>{if("object"!=typeof e)return t;try{if(e.value.shareType===this.SHARE_TYPES.SHARE_TYPE_USER){if(e.value.shareWith===(0,ct.HW)().uid)return t;if(this.reshare&&e.value.shareWith===this.reshare.owner)return t}if(e.value.shareType===this.SHARE_TYPES.SHARE_TYPE_EMAIL){if(-1!==this.linkShares.map((t=>t.shareWith)).indexOf(e.value.shareWith.trim()))return t}else{const r=this.shares.reduce(((t,e)=>(t[e.shareWith]=e.type,t)),{}),n=e.value.shareWith.trim();if(n in r&&r[n]===e.value.shareType)return t}t.push(e)}catch{return t}return t}),[])},shareTypeToIcon(e){switch(e){case this.SHARE_TYPES.SHARE_TYPE_GUEST:return{icon:"icon-user",iconTitle:t("files_sharing","Guest")};case this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP:case this.SHARE_TYPES.SHARE_TYPE_GROUP:return{icon:"icon-group",iconTitle:t("files_sharing","Group")};case this.SHARE_TYPES.SHARE_TYPE_EMAIL:return{icon:"icon-mail",iconTitle:t("files_sharing","Email")};case this.SHARE_TYPES.SHARE_TYPE_CIRCLE:return{icon:"icon-teams",iconTitle:t("files_sharing","Team")};case this.SHARE_TYPES.SHARE_TYPE_ROOM:return{icon:"icon-room",iconTitle:t("files_sharing","Talk conversation")};case this.SHARE_TYPES.SHARE_TYPE_DECK:return{icon:"icon-deck",iconTitle:t("files_sharing","Deck board")};case this.SHARE_TYPES.SHARE_TYPE_SCIENCEMESH:return{icon:"icon-sciencemesh",iconTitle:t("files_sharing","ScienceMesh")};default:return{}}},formatForMultiselect(e){let r;var n;if(e.value.shareType===this.SHARE_TYPES.SHARE_TYPE_USER&&this.config.shouldAlwaysShowUnique)r=null!==(n=e.shareWithDisplayNameUnique)&&void 0!==n?n:"";else if(e.value.shareType!==this.SHARE_TYPES.SHARE_TYPE_REMOTE&&e.value.shareType!==this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP||!e.value.server)if(e.value.shareType===this.SHARE_TYPES.SHARE_TYPE_EMAIL)r=e.value.shareWith;else{var i;r=null!==(i=e.shareWithDescription)&&void 0!==i?i:""}else r=t("files_sharing","on {server}",{server:e.value.server});return{shareWith:e.value.shareWith,shareType:e.value.shareType,user:e.uuid||e.value.shareWith,isNoUser:e.value.shareType!==this.SHARE_TYPES.SHARE_TYPE_USER,displayName:e.name||e.label,subtitle:r,shareWithDisplayNameUnique:e.shareWithDisplayNameUnique||"",...this.shareTypeToIcon(e.value.shareType)}}}};var Ut=n(13594),Ht={};Ht.styleTagTransform=g(),Ht.setAttributes=u(),Ht.insert=c().bind(null,"head"),Ht.domAPI=o(),Ht.insertStyleElement=p(),s()(Ut.A,Ht),Ut.A&&Ut.A.locals&&Ut.A.locals;const Yt=(0,wt.A)(Mt,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"sharing-search"},[e("label",{attrs:{for:"sharing-search-input"}},[t._v(t._s(t.t("files_sharing","Search for share recipients")))]),t._v(" "),e("NcSelect",{ref:"select",staticClass:"sharing-search__input",attrs:{"input-id":"sharing-search-input",disabled:!t.canReshare,loading:t.loading,filterable:!1,placeholder:t.inputPlaceholder,"clear-search-on-blur":()=>!1,"user-select":!0,options:t.options},on:{search:t.asyncFind,"option:selected":t.onSelected},scopedSlots:t._u([{key:"no-options",fn:function(e){let{search:r}=e;return[t._v("\n\t\t\t"+t._s(r?t.noResultText:t.t("files_sharing","No recommendations. Start typing."))+"\n\t\t")]}}]),model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)}),[],!1,null,null,null).exports;var $t=n(71225),Ft=n(73267),jt=n(32831);const Vt=(0,lt.H4)();var zt=n(49264);const qt={NONE:0,READ:1,UPDATE:2,CREATE:4,DELETE:8,SHARE:16},Wt={READ_ONLY:qt.READ,UPLOAD_AND_UPDATE:qt.READ|qt.UPDATE|qt.CREATE|qt.DELETE,FILE_DROP:qt.CREATE,ALL:qt.UPDATE|qt.CREATE|qt.READ|qt.DELETE|qt.SHARE,ALL_FILE:qt.UPDATE|qt.READ|qt.SHARE};var Gt=n(96763);const Kt={mixins:[Lt,gt],props:{fileInfo:{type:Object,default:()=>{},required:!0},share:{type:ft,default:null},isUnique:{type:Boolean,default:!0}},data(){var t;return{config:new at,node:null,errors:{},loading:!1,saving:!1,open:!1,updateQueue:new zt.A({concurrency:1}),reactiveState:null===(t=this.share)||void 0===t?void 0:t.state}},computed:{path(){return(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/")},hasNote:{get(){return""!==this.share.note},set(t){this.share.note=t?null:""}},dateTomorrow:()=>new Date((new Date).setDate((new Date).getDate()+1)),lang(){const t=window.dayNamesShort?window.dayNamesShort:["Sun.","Mon.","Tue.","Wed.","Thu.","Fri.","Sat."],e=window.monthNamesShort?window.monthNamesShort:["Jan.","Feb.","Mar.","Apr.","May.","Jun.","Jul.","Aug.","Sep.","Oct.","Nov.","Dec."];return{formatLocale:{firstDayOfWeek:window.firstDay?window.firstDay:0,monthsShort:e,weekdaysMin:t,weekdaysShort:t},monthFormat:"MMM"}},isFolder(){return"dir"===this.fileInfo.type},isPublicShare(){var t;const e=null!==(t=this.share.shareType)&&void 0!==t?t:this.share.type;return[this.SHARE_TYPES.SHARE_TYPE_LINK,this.SHARE_TYPES.SHARE_TYPE_EMAIL].includes(e)},isRemoteShare(){return this.share.type===this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP||this.share.type===this.SHARE_TYPES.SHARE_TYPE_REMOTE},isShareOwner(){return this.share&&this.share.owner===(0,ct.HW)().uid},isExpiryDateEnforced(){return this.isPublicShare?this.config.isDefaultExpireDateEnforced:this.isRemoteShare?this.config.isDefaultRemoteExpireDateEnforced:this.config.isDefaultInternalExpireDateEnforced},hasCustomPermissions(){return![Wt.ALL,Wt.READ_ONLY,Wt.FILE_DROP].includes(this.share.permissions)},maxExpirationDateEnforced(){return this.isExpiryDateEnforced?this.isPublicShare?this.config.defaultExpirationDate:this.isRemoteShare?this.config.defaultRemoteExpirationDateString:this.config.defaultInternalExpirationDate:null}},methods:{async getNode(){const t={path:this.path};try{this.node=await(async t=>{const e=(0,lt.VL)(),r=await Vt.stat("".concat(lt.lJ).concat(t.path),{details:!0,data:e});return(0,lt.Al)(r.data)})(t),ut.info("Fetched node:",{node:this.node})}catch(t){ut.error("Error:",t)}},checkShare:t=>(!t.password||"string"==typeof t.password&&""!==t.password.trim())&&!(t.expirationDate&&!t.expirationDate.isValid()),parseDateString(t){var e;if(t)return new Date(null===(e=t.match(/([0-9]{4}-[0-9]{2}-[0-9]{2})/i))||void 0===e?void 0:e.pop())},formatDateToString:t=>new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())).toISOString().split("T")[0],onExpirationChange:It()((function(t){this.share.expireDate=this.formatDateToString(new Date(t))}),500),onExpirationDisable(){this.share.expireDate=""},onNoteChange(t){this.$set(this.share,"newNote",t.trim())},onNoteSubmit(){this.share.newNote&&(this.share.note=this.share.newNote,this.$delete(this.share,"newNote"),this.queueUpdate("note"))},async onDelete(){try{this.loading=!0,this.open=!1,await this.deleteShare(this.share.id),Gt.debug("Share deleted",this.share.id);const e="file"===this.share.itemType?t("files_sharing",'File "{path}" has been unshared',{path:this.share.path}):t("files_sharing",'Folder "{path}" has been unshared',{path:this.share.path});(0,At.Te)(e),this.$emit("remove:share",this.share),await this.getNode(),(0,kt.Ic)("files:node:updated",this.node)}catch(t){this.open=!0}finally{this.loading=!1}},queueUpdate(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(0!==r.length){if(this.share.id){const e={};return r.forEach((t=>{"object"==typeof this.share[t]?e[t]=JSON.stringify(this.share[t]):e[t]=this.share[t].toString()})),void this.updateQueue.add((async()=>{this.saving=!0,this.errors={};try{const n=await this.updateShare(this.share.id,e);r.indexOf("password")>=0&&(this.$delete(this.share,"newPassword"),this.share.passwordExpirationTime=n.password_expiration_time),this.$delete(this.errors,r[0]),(0,At.Te)(t("files_sharing","Share {propertyName} saved",{propertyName:r[0]}))}catch({message:e}){e&&""!==e&&(this.onSyncError(r[0],e),(0,At.Qg)(t("files_sharing",e)))}finally{this.saving=!1}}))}Gt.debug("Updated local share",this.share)}},onSyncError(t,e){switch(this.open=!0,t){case"password":case"pending":case"expireDate":case"label":case"note":{this.$set(this.errors,t,e);let r=this.$refs[t];if(r){r.$el&&(r=r.$el);const t=r.querySelector(".focusable");t&&t.focus()}break}case"sendPasswordByTalk":this.$set(this.errors,t,e),this.share.sendPasswordByTalk=!this.share.sendPasswordByTalk}},debounceQueueUpdate:It()((function(t){this.queueUpdate(t)}),500)}},Xt={name:"SharingEntryInherited",components:{NcActionButton:V.A,NcActionLink:Ft.A,NcActionText:jt.A,NcAvatar:v.A,SharingEntrySimple:Ct},mixins:[Kt],props:{share:{type:ft,required:!0}},computed:{viaFileTargetUrl(){return(0,nt.Jv)("/f/{fileid}",{fileid:this.share.viaFileid})},viaFolderName(){return(0,$t.P8)(this.share.viaPath)}}};var Zt=n(32260),Qt={};Qt.styleTagTransform=g(),Qt.setAttributes=u(),Qt.insert=c().bind(null,"head"),Qt.domAPI=o(),Qt.insertStyleElement=p(),s()(Zt.A,Qt),Zt.A&&Zt.A.locals&&Zt.A.locals;const Jt=(0,wt.A)(Xt,(function(){var t=this,e=t._self._c;return e("SharingEntrySimple",{key:t.share.id,staticClass:"sharing-entry__inherited",attrs:{title:t.share.shareWithDisplayName},scopedSlots:t._u([{key:"avatar",fn:function(){return[e("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{user:t.share.shareWith,"display-name":t.share.shareWithDisplayName}})]},proxy:!0}])},[t._v(" "),e("NcActionText",{attrs:{icon:"icon-user"}},[t._v("\n\t\t"+t._s(t.t("files_sharing","Added by {initiator}",{initiator:t.share.ownerDisplayName}))+"\n\t")]),t._v(" "),t.share.viaPath&&t.share.viaFileid?e("NcActionLink",{attrs:{icon:"icon-folder",href:t.viaFileTargetUrl}},[t._v("\n\t\t"+t._s(t.t("files_sharing","Via “{folder}”",{folder:t.viaFolderName}))+"\n\t")]):t._e(),t._v(" "),t.share.canDelete?e("NcActionButton",{attrs:{icon:"icon-close"},on:{click:function(e){return e.preventDefault(),t.onDelete.apply(null,arguments)}}},[t._v("\n\t\t"+t._s(t.t("files_sharing","Unshare"))+"\n\t")]):t._e()],1)}),[],!1,null,"859a420e",null).exports;var te=n(96763);const ee={name:"SharingInherited",components:{NcActionButton:V.A,SharingEntryInherited:Jt,SharingEntrySimple:Ct},props:{fileInfo:{type:Object,default:()=>{},required:!0}},data:()=>({loaded:!1,loading:!1,showInheritedShares:!1,shares:[]}),computed:{showInheritedSharesIcon(){return this.loading?"icon-loading-small":this.showInheritedShares?"icon-triangle-n":"icon-triangle-s"},mainTitle:()=>t("files_sharing","Others with access"),subTitle(){return this.showInheritedShares&&0===this.shares.length?t("files_sharing","No other accounts with access found"):""},toggleTooltip(){return"dir"===this.fileInfo.type?t("files_sharing","Toggle list of others with access to this directory"):t("files_sharing","Toggle list of others with access to this file")},fullPath(){return"".concat(this.fileInfo.path,"/").concat(this.fileInfo.name).replace("//","/")}},watch:{fileInfo(){this.resetState()}},methods:{toggleInheritedShares(){this.showInheritedShares=!this.showInheritedShares,this.showInheritedShares?this.fetchInheritedShares():this.resetState()},async fetchInheritedShares(){this.loading=!0;try{const t=(0,nt.KT)("apps/files_sharing/api/v1/shares/inherited?format=json&path={path}",{path:this.fullPath}),e=await q.Ay.get(t);this.shares=e.data.ocs.data.map((t=>new ft(t))).sort(((t,e)=>e.createdTime-t.createdTime)),te.info(this.shares),this.loaded=!0}catch(e){OC.Notification.showTemporary(t("files_sharing","Unable to fetch inherited shares"),{type:"error"})}finally{this.loading=!1}},resetState(){this.loaded=!1,this.loading=!1,this.showInheritedShares=!1,this.shares=[]},removeShare(t){const e=this.shares.findIndex((e=>e===t));this.shares.splice(e,1)}}};var re=n(44377),ne={};ne.styleTagTransform=g(),ne.setAttributes=u(),ne.insert=c().bind(null,"head"),ne.domAPI=o(),ne.insertStyleElement=p(),s()(re.A,ne),re.A&&re.A.locals&&re.A.locals;const ie=(0,wt.A)(ee,(function(){var t=this,e=t._self._c;return e("ul",{attrs:{id:"sharing-inherited-shares"}},[e("SharingEntrySimple",{staticClass:"sharing-entry__inherited",attrs:{title:t.mainTitle,subtitle:t.subTitle,"aria-expanded":t.showInheritedShares},scopedSlots:t._u([{key:"avatar",fn:function(){return[e("div",{staticClass:"avatar-shared icon-more-white"})]},proxy:!0}])},[t._v(" "),e("NcActionButton",{attrs:{icon:t.showInheritedSharesIcon,"aria-label":t.toggleTooltip,title:t.toggleTooltip},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.toggleInheritedShares.apply(null,arguments)}}})],1),t._v(" "),t._l(t.shares,(function(r){return e("SharingEntryInherited",{key:r.id,attrs:{"file-info":t.fileInfo,share:r},on:{"remove:share":t.removeShare}})}))],2)}),[],!1,null,"33849ae4",null).exports;var se=n(17816),ae=n.n(se),oe=n(44131),le=n(80114),ce=n(94219);const he={name:"TuneIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ue=(0,wt.A)(he,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon tune-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,de={name:"QrcodeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},pe=(0,wt.A)(de,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon qrcode-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M3,11H5V13H3V11M11,5H13V9H11V5M9,11H13V15H11V13H9V11M15,11H17V13H19V11H21V13H19V15H21V19H19V21H17V19H13V21H11V17H15V15H17V13H15V11M19,19V15H17V19H19M15,3H21V9H15V3M17,5V7H19V5H17M3,3H9V9H3V3M5,5V7H7V5H5M3,15H9V21H3V15M5,17V19H7V17H5Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,fe={name:"ExclamationIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ge=(0,wt.A)(fe,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon exclamation-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M 11,4L 13,4L 13,15L 11,15L 11,4 Z M 13,18L 13,20L 11,20L 11,18L 13,18 Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,Ae={name:"LockIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},me=(0,wt.A)(Ae,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon lock-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,ve={name:"CheckBoldIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ye=(0,wt.A)(ve,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon check-bold-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var Ee=n(24325),_e=n(27577);const we={name:"TriangleSmallDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ce=(0,wt.A)(we,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon triangle-small-down-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M8 9H16L12 16"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,be={name:"EyeOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Se=(0,wt.A)(be,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon eye-outline-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var xe=n(93919);const Te={name:"FileUploadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Pe=(0,wt.A)(Te,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon file-upload-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M13.5,16V19H10.5V16H8L12,12L16,16H13.5M13,9V3.5L18.5,9H13Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,Re={name:"SharingEntryQuickShareSelect",components:{DropdownIcon:Ce,NcActions:j.A,NcActionButton:V.A},mixins:[Kt,Ot,gt],props:{share:{type:Object,required:!0}},emits:["open-sharing-details"],data:()=>({selectedOption:""}),computed:{ariaLabel(){return t("files_sharing",'Quick share options, the current selected is "{selectedOption}"',{selectedOption:this.selectedOption})},canViewText:()=>t("files_sharing","View only"),canEditText:()=>t("files_sharing","Can edit"),fileDropText:()=>t("files_sharing","File request"),customPermissionsText:()=>t("files_sharing","Custom permissions"),preSelectedOption(){return(this.share.permissions&~qt.SHARE)===Wt.READ_ONLY?this.canViewText:this.share.permissions===Wt.ALL||this.share.permissions===Wt.ALL_FILE?this.canEditText:(this.share.permissions&~qt.SHARE)===Wt.FILE_DROP?this.fileDropText:this.customPermissionsText},options(){const t=[{label:this.canViewText,icon:Se},{label:this.canEditText,icon:xe.A}];return this.supportsFileDrop&&t.push({label:this.fileDropText,icon:Pe}),t.push({label:this.customPermissionsText,icon:ue}),t},supportsFileDrop(){if(this.isFolder&&this.config.isPublicUploadEnabled){var t;const e=null!==(t=this.share.type)&&void 0!==t?t:this.share.shareType;return[this.SHARE_TYPES.SHARE_TYPE_LINK,this.SHARE_TYPES.SHARE_TYPE_EMAIL].includes(e)}return!1},dropDownPermissionValue(){switch(this.selectedOption){case this.canEditText:return this.isFolder?Wt.ALL:Wt.ALL_FILE;case this.fileDropText:return Wt.FILE_DROP;case this.customPermissionsText:return"custom";case this.canViewText:default:return Wt.READ_ONLY}}},created(){this.selectedOption=this.preSelectedOption},methods:{selectOption(t){this.selectedOption=t,t===this.customPermissionsText?this.$emit("open-sharing-details"):(this.share.permissions=this.dropDownPermissionValue,this.queueUpdate("permissions"),this.$refs.quickShareActions.$refs.menuButton.$el.focus())}}},Ie=Re;var ke=n(88809),Ne={};Ne.styleTagTransform=g(),Ne.setAttributes=u(),Ne.insert=c().bind(null,"head"),Ne.domAPI=o(),Ne.insertStyleElement=p(),s()(ke.A,Ne),ke.A&&ke.A.locals&&ke.A.locals;const De=(0,wt.A)(Ie,(function(){var t=this,e=t._self._c;return e("NcActions",{ref:"quickShareActions",staticClass:"share-select",attrs:{"menu-name":t.selectedOption,"aria-label":t.ariaLabel,type:"tertiary-no-background","force-name":""},scopedSlots:t._u([{key:"icon",fn:function(){return[e("DropdownIcon",{attrs:{size:15}})]},proxy:!0}])},[t._v(" "),t._l(t.options,(function(r){return e("NcActionButton",{key:r.label,attrs:{type:"radio","model-value":r.label===t.selectedOption,"close-after-click":""},on:{click:function(e){return t.selectOption(r.label)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(r.icon,{tag:"component"})]},proxy:!0}],null,!0)},[t._v("\n\t\t"+t._s(r.label)+"\n\t")])}))],2)}),[],!1,null,"60eea424",null).exports,Le={name:"ExternalShareAction",props:{id:{type:String,required:!0},action:{type:Object,default:()=>({})},fileInfo:{type:Object,default:()=>{},required:!0},share:{type:ft,default:null}},computed:{data(){return this.action.data(this)}}},Oe=(0,wt.A)(Le,(function(){var t=this;return(0,t._self._c)(t.data.is,t._g(t._b({tag:"Component"},"Component",t.data,!1),t.action.handlers),[t._v("\n\t"+t._s(t.data.text)+"\n")])}),[],!1,null,null,null).exports;var Be=n(53334),Me=n(96763);const Ue=new at;async function He(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(Ue.passwordPolicy.api&&Ue.passwordPolicy.api.generate)try{const e=await q.Ay.get(Ue.passwordPolicy.api.generate);if(e.data.ocs.data.password)return t&&(0,At.Te)((0,Be.Tl)("files_sharing","Password created successfully")),e.data.ocs.data.password}catch(e){Me.info("Error generating password from password_policy",e),t&&(0,At.Qg)((0,Be.Tl)("files_sharing","Error generating password from password policy"))}const e=new Uint8Array(10);self.crypto.getRandomValues(e);let r="";for(let t=0;t<e.length;t++)r+="abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789".charAt(.20392156862745098*e[t]);return r}var Ye=n(96763);const $e={name:"SharingEntryLink",components:{ExternalShareAction:Oe,NcActions:j.A,NcActionButton:V.A,NcActionInput:oe.A,NcActionLink:Ft.A,NcActionText:jt.A,NcActionSeparator:le.A,NcAvatar:v.A,NcDialog:ce.A,VueQrcode:ae(),Tune:ue,IconQr:pe,ErrorIcon:ge,LockIcon:me,CheckIcon:ye,ClipboardIcon:vt.A,CloseIcon:Ee.A,PlusIcon:_e.A,SharingEntryQuickShareSelect:De},mixins:[Kt,Ot],props:{canReshare:{type:Boolean,default:!0},index:{type:Number,default:null}},data:()=>({shareCreationComplete:!1,copySuccess:!0,copied:!1,pending:!1,ExternalLegacyLinkActions:OCA.Sharing.ExternalLinkActions.state,ExternalShareActions:OCA.Sharing.ExternalShareActions.state,logger:(0,ht.YK)().setApp("files_sharing").detectUser().build(),showQRCode:!1}),computed:{title(){if(this.share&&this.share.id){if(!this.isShareOwner&&this.share.ownerDisplayName)return this.isEmailShareType?t("files_sharing","{shareWith} by {initiator}",{shareWith:this.share.shareWith,initiator:this.share.ownerDisplayName}):t("files_sharing","Shared via link by {initiator}",{initiator:this.share.ownerDisplayName});if(this.share.label&&""!==this.share.label.trim())return this.isEmailShareType?this.isFileRequest?t("files_sharing","File request ({label})",{label:this.share.label.trim()}):t("files_sharing","Mail share ({label})",{label:this.share.label.trim()}):t("files_sharing","Share link ({label})",{label:this.share.label.trim()});if(this.isEmailShareType)return this.share.shareWith&&""!==this.share.shareWith.trim()?this.share.shareWith:this.isFileRequest?t("files_sharing","File request"):t("files_sharing","Mail share")}return this.index>1?t("files_sharing","Share link ({index})",{index:this.index}):t("files_sharing","Share link")},subtitle(){return this.isEmailShareType&&this.title!==this.share.shareWith?this.share.shareWith:null},isPasswordProtected:{get(){return this.config.enforcePasswordForPublicLink||!!this.share.password},async set(t){z.Ay.set(this.share,"password",t?await He(!0):""),z.Ay.set(this.share,"newPassword",this.share.password)}},passwordExpirationTime(){if(null===this.share.passwordExpirationTime)return null;const t=moment(this.share.passwordExpirationTime);return!(t.diff(moment())<0)&&t.fromNow()},isTalkEnabled:()=>void 0!==OC.appswebroots.spreed,isPasswordProtectedByTalkAvailable(){return this.isPasswordProtected&&this.isTalkEnabled},isPasswordProtectedByTalk:{get(){return this.share.sendPasswordByTalk},async set(t){this.share.sendPasswordByTalk=t}},isEmailShareType(){return!!this.share&&this.share.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL},canTogglePasswordProtectedByTalkAvailable(){return!(!this.isPasswordProtected||this.isEmailShareType&&!this.hasUnsavedPassword)},pendingPassword(){return this.config.enableLinkPasswordByDefault&&this.share&&!this.share.id},pendingEnforcedPassword(){return this.config.enforcePasswordForPublicLink&&this.share&&!this.share.id},pendingExpirationDate(){return this.config.isDefaultExpireDateEnforced&&this.share&&!this.share.id},sharePolicyHasRequiredProperties(){return this.config.enforcePasswordForPublicLink||this.config.isDefaultExpireDateEnforced},requiredPropertiesMissing(){if(!this.sharePolicyHasRequiredProperties)return!1;if(!this.share)return!0;if(this.share.id)return!0;const t=this.config.enforcePasswordForPublicLink&&!this.share.password,e=this.config.isDefaultExpireDateEnforced&&!this.share.expireDate;return t||e},hasUnsavedPassword(){return void 0!==this.share.newPassword},shareLink(){return window.location.protocol+"//"+window.location.host+(0,nt.Jv)("/s/")+this.share.token},actionsTooltip(){return t("files_sharing",'Actions for "{title}"',{title:this.title})},copyLinkTooltip(){return this.copied?this.copySuccess?"":t("files_sharing","Cannot copy, please copy the link manually"):t("files_sharing",'Copy public link of "{title}" to clipboard',{title:this.title})},externalLegacyLinkActions(){return this.ExternalLegacyLinkActions.actions},externalLinkActions(){return this.ExternalShareActions.actions.filter((t=>(t.shareType.includes(ot.Z.SHARE_TYPE_LINK)||t.shareType.includes(ot.Z.SHARE_TYPE_EMAIL))&&!t.advanced))},isPasswordPolicyEnabled(){return"object"==typeof this.config.passwordPolicy},canChangeHideDownload(){return this.fileInfo.shareAttributes.some((t=>"permissions"===t.scope&&"download"===t.key&&!1===t.value))},isFileRequest(){return this.share.isFileRequest}},methods:{async onNewLinkShare(){if(this.logger.debug("onNewLinkShare called (with this.share)",this.share),this.loading)return;const e={share_type:ot.Z.SHARE_TYPE_LINK};if(this.config.isDefaultExpireDateEnforced&&(e.expiration=this.formatDateToString(this.config.defaultExpirationDate)),this.logger.debug("Missing required properties?",this.requiredPropertiesMissing),this.sharePolicyHasRequiredProperties&&this.requiredPropertiesMissing){this.pending=!0,this.shareCreationComplete=!1,this.logger.info("Share policy requires mandated properties (password)..."),(this.config.enableLinkPasswordByDefault||this.config.enforcePasswordForPublicLink)&&(e.password=await He(!0));const t=new ft(e),r=await new Promise((e=>{this.$emit("add:share",t,e)}));this.open=!1,this.pending=!1,r.open=!0}else{if(this.share&&!this.share.id){if(this.checkShare(this.share)){try{this.logger.info("Sending existing share to server",this.share),await this.pushNewLinkShare(this.share,!0),this.shareCreationComplete=!0,this.logger.info("Share created on server",this.share)}catch(t){return this.pending=!1,this.logger.error("Error creating share",t),!1}return!0}return this.open=!0,(0,At.Qg)(t("files_sharing","Error, please enter proper password and/or expiration date")),!1}const r=new ft(e);await this.pushNewLinkShare(r),this.shareCreationComplete=!0}},async pushNewLinkShare(e,r){try{if(this.loading)return!0;this.loading=!0,this.errors={};const n={path:(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/"),shareType:ot.Z.SHARE_TYPE_LINK,password:e.password,expireDate:e.expireDate,attributes:JSON.stringify(this.fileInfo.shareAttributes)};Ye.debug("Creating link share with options",n);const i=await this.createShare(n);let s;this.open=!1,this.shareCreationComplete=!0,Ye.debug("Link share created",i),s=r?await new Promise((t=>{this.$emit("update:share",i,t)})):await new Promise((t=>{this.$emit("add:share",i,t)})),await this.getNode(),(0,kt.Ic)("files:node:updated",this.node),this.config.enforcePasswordForPublicLink||s.copyLink(),(0,At.Te)(t("files_sharing","Link share created"))}catch(e){var n;const r=null==e||null===(n=e.response)||void 0===n||null===(n=n.data)||void 0===n||null===(n=n.ocs)||void 0===n||null===(n=n.meta)||void 0===n?void 0:n.message;if(!r)return(0,At.Qg)(t("files_sharing","Error while creating the share")),void Ye.error(e);throw r.match(/password/i)?this.onSyncError("password",r):r.match(/date/i)?this.onSyncError("expireDate",r):this.onSyncError("pending",r),e}finally{this.loading=!1,this.shareCreationComplete=!0}},async copyLink(){try{await navigator.clipboard.writeText(this.shareLink),(0,At.Te)(t("files_sharing","Link copied")),this.$refs.copyButton.$el.focus(),this.copySuccess=!0,this.copied=!0}catch(t){this.copySuccess=!1,this.copied=!0,Ye.error(t)}finally{setTimeout((()=>{this.copySuccess=!1,this.copied=!1}),4e3)}},onPasswordChange(t){this.$set(this.share,"newPassword",t)},onPasswordDisable(){this.share.password="",this.$delete(this.share,"newPassword"),this.share.id&&this.queueUpdate("password")},onPasswordSubmit(){this.hasUnsavedPassword&&(this.share.password=this.share.newPassword.trim(),this.queueUpdate("password"))},onPasswordProtectedByTalkChange(){this.hasUnsavedPassword&&(this.share.password=this.share.newPassword.trim()),this.queueUpdate("sendPasswordByTalk","password")},onMenuClose(){this.onPasswordSubmit(),this.onNoteSubmit()},onCancel(){this.shareCreationComplete||this.$emit("remove:share",this.share)}}},Fe=$e;var je=n(97786),Ve={};Ve.styleTagTransform=g(),Ve.setAttributes=u(),Ve.insert=c().bind(null,"head"),Ve.domAPI=o(),Ve.insertStyleElement=p(),s()(je.A,Ve),je.A&&je.A.locals&&je.A.locals;const ze={name:"SharingLinkList",components:{SharingEntryLink:(0,wt.A)(Fe,(function(){var t=this,e=t._self._c;return e("li",{staticClass:"sharing-entry sharing-entry__link",class:{"sharing-entry--share":t.share}},[e("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":!0,"icon-class":t.isEmailShareType?"avatar-link-share icon-mail-white":"avatar-link-share icon-public-white"}}),t._v(" "),e("div",{staticClass:"sharing-entry__summary"},[e("div",{staticClass:"sharing-entry__desc"},[e("span",{staticClass:"sharing-entry__title",attrs:{title:t.title}},[t._v("\n\t\t\t\t"+t._s(t.title)+"\n\t\t\t")]),t._v(" "),t.subtitle?e("p",[t._v("\n\t\t\t\t"+t._s(t.subtitle)+"\n\t\t\t")]):t._e(),t._v(" "),t.share&&void 0!==t.share.permissions?e("SharingEntryQuickShareSelect",{attrs:{share:t.share,"file-info":t.fileInfo},on:{"open-sharing-details":function(e){return t.openShareDetailsForCustomSettings(t.share)}}}):t._e()],1),t._v(" "),t.share&&(!t.isEmailShareType||t.isFileRequest)&&t.share.token?e("NcActions",{ref:"copyButton",staticClass:"sharing-entry__copy"},[e("NcActionButton",{attrs:{title:t.copyLinkTooltip,"aria-label":t.copyLinkTooltip},on:{click:function(e){return e.preventDefault(),t.copyLink.apply(null,arguments)}},scopedSlots:t._u([{key:"icon",fn:function(){return[t.copied&&t.copySuccess?e("CheckIcon",{staticClass:"icon-checkmark-color",attrs:{size:20}}):e("ClipboardIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,4269614823)})],1):t._e()],1),t._v(" "),!t.pending&&(t.pendingPassword||t.pendingEnforcedPassword||t.pendingExpirationDate)?e("NcActions",{staticClass:"sharing-entry__actions",attrs:{"aria-label":t.actionsTooltip,"menu-align":"right",open:t.open},on:{"update:open":function(e){t.open=e},close:t.onCancel}},[t.errors.pending?e("NcActionText",{staticClass:"error",scopedSlots:t._u([{key:"icon",fn:function(){return[e("ErrorIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,1966124155)},[t._v("\n\t\t\t"+t._s(t.errors.pending)+"\n\t\t")]):e("NcActionText",{attrs:{icon:"icon-info"}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Please enter the following required information before creating the share"))+"\n\t\t")]),t._v(" "),t.pendingEnforcedPassword?e("NcActionText",{scopedSlots:t._u([{key:"icon",fn:function(){return[e("LockIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2056568168)},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Password protection (enforced)"))+"\n\t\t")]):t.pendingPassword?e("NcActionCheckbox",{staticClass:"share-link-password-checkbox",attrs:{checked:t.isPasswordProtected,disabled:t.config.enforcePasswordForPublicLink||t.saving},on:{"update:checked":function(e){t.isPasswordProtected=e},uncheck:t.onPasswordDisable}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Password protection"))+"\n\t\t")]):t._e(),t._v(" "),t.pendingEnforcedPassword||t.share.password?e("NcActionInput",{staticClass:"share-link-password",attrs:{value:t.share.password,disabled:t.saving,required:t.config.enableLinkPasswordByDefault||t.config.enforcePasswordForPublicLink,minlength:t.isPasswordPolicyEnabled&&t.config.passwordPolicy.minLength,icon:"",autocomplete:"new-password"},on:{"update:value":function(e){return t.$set(t.share,"password",e)},submit:t.onNewLinkShare}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Enter a password"))+"\n\t\t")]):t._e(),t._v(" "),t.pendingExpirationDate?e("NcActionText",{attrs:{icon:"icon-calendar-dark"}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Expiration date (enforced)"))+"\n\t\t")]):t._e(),t._v(" "),t.pendingExpirationDate?e("NcActionInput",{staticClass:"share-link-expire-date",attrs:{disabled:t.saving,"is-native-picker":!0,"hide-label":!0,value:new Date(t.share.expireDate),type:"date",min:t.dateTomorrow,max:t.maxExpirationDateEnforced},on:{input:t.onExpirationChange}},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Enter a date"))+"\n\t\t")]):t._e(),t._v(" "),e("NcActionButton",{on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.onNewLinkShare.apply(null,arguments)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("CheckIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2630571749)},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Create share"))+"\n\t\t")]),t._v(" "),e("NcActionButton",{on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.onCancel.apply(null,arguments)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("CloseIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2428343285)},[t._v("\n\t\t\t"+t._s(t.t("files_sharing","Cancel"))+"\n\t\t")])],1):t.loading?e("div",{staticClass:"icon-loading-small sharing-entry__loading"}):e("NcActions",{staticClass:"sharing-entry__actions",attrs:{"aria-label":t.actionsTooltip,"menu-align":"right",open:t.open},on:{"update:open":function(e){t.open=e},close:t.onMenuClose}},[t.share?[t.share.canEdit&&t.canReshare?[e("NcActionButton",{attrs:{disabled:t.saving,"close-after-click":!0},on:{click:function(e){return e.preventDefault(),t.openSharingDetails.apply(null,arguments)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Tune",{attrs:{size:20}})]},proxy:!0}],null,!1,1300586850)},[t._v("\n\t\t\t\t\t"+t._s(t.t("files_sharing","Customize link"))+"\n\t\t\t\t")])]:t._e(),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(e){e.preventDefault(),t.showQRCode=!0}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconQr",{attrs:{size:20}})]},proxy:!0}],null,!1,1082198240)},[t._v("\n\t\t\t\t"+t._s(t.t("files_sharing","Generate QR code"))+"\n\t\t\t")]),t._v(" "),e("NcActionSeparator"),t._v(" "),t._l(t.externalLinkActions,(function(r){return e("ExternalShareAction",{key:r.id,attrs:{id:r.id,action:r,"file-info":t.fileInfo,share:t.share}})})),t._v(" "),t._l(t.externalLegacyLinkActions,(function(r,n){let{icon:i,url:s,name:a}=r;return e("NcActionLink",{key:n,attrs:{href:s(t.shareLink),icon:i,target:"_blank"}},[t._v("\n\t\t\t\t"+t._s(a)+"\n\t\t\t")])})),t._v(" "),!t.isEmailShareType&&t.canReshare?e("NcActionButton",{staticClass:"new-share-link",on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.onNewLinkShare.apply(null,arguments)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("PlusIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2953566425)},[t._v("\n\t\t\t\t"+t._s(t.t("files_sharing","Add another link"))+"\n\t\t\t")]):t._e(),t._v(" "),t.share.canDelete?e("NcActionButton",{attrs:{disabled:t.saving},on:{click:function(e){return e.preventDefault(),t.onDelete.apply(null,arguments)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("CloseIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2428343285)},[t._v("\n\t\t\t\t"+t._s(t.t("files_sharing","Unshare"))+"\n\t\t\t")]):t._e()]:t.canReshare?e("NcActionButton",{staticClass:"new-share-link",attrs:{title:t.t("files_sharing","Create a new share link"),"aria-label":t.t("files_sharing","Create a new share link"),icon:t.loading?"icon-loading-small":"icon-add"},on:{click:function(e){return e.preventDefault(),e.stopPropagation(),t.onNewLinkShare.apply(null,arguments)}}}):t._e()],2),t._v(" "),t.showQRCode?e("NcDialog",{attrs:{size:"normal",open:t.showQRCode,name:t.title,"close-on-click-outside":!0},on:{"update:open":function(e){t.showQRCode=e},close:function(e){t.showQRCode=!1}}},[e("div",{staticClass:"qr-code-dialog"},[e("VueQrcode",{staticClass:"qr-code-dialog__img",attrs:{tag:"img",value:t.shareLink}})],1)]):t._e()],1)}),[],!1,null,"6b6e01ec",null).exports},mixins:[gt,Ot],props:{fileInfo:{type:Object,default:()=>{},required:!0},shares:{type:Array,default:()=>[],required:!0},canReshare:{type:Boolean,required:!0}},data:()=>({canLinkShare:(0,st.F)().files_sharing.public.enabled}),computed:{hasLinkShares(){return this.shares.filter((t=>t.type===this.SHARE_TYPES.SHARE_TYPE_LINK)).length>0},hasShares(){return this.shares.length>0}},methods:{addShare(t,e){this.shares.unshift(t),this.awaitForShare(t,e)},awaitForShare(t,e){this.$nextTick((()=>{const r=this.$children.find((e=>e.share===t));r&&e(r)}))},removeShare(t){const e=this.shares.findIndex((e=>e===t));this.shares.splice(e,1)}}},qe=(0,wt.A)(ze,(function(){var t=this,e=t._self._c;return t.canLinkShare?e("ul",{staticClass:"sharing-link-list"},[!t.hasLinkShares&&t.canReshare?e("SharingEntryLink",{attrs:{"can-reshare":t.canReshare,"file-info":t.fileInfo},on:{"add:share":t.addShare}}):t._e(),t._v(" "),t.hasShares?t._l(t.shares,(function(r,n){return e("SharingEntryLink",{key:r.id,attrs:{index:t.shares.length>1?n+1:null,"can-reshare":t.canReshare,share:t.shares[n],"file-info":t.fileInfo},on:{"update:share":[function(e){return t.$set(t.shares,n,e)},function(e){return t.awaitForShare(...arguments)}],"add:share":function(e){return t.addShare(...arguments)},"remove:share":t.removeShare,"open-sharing-details":function(e){return t.openSharingDetails(r)}}})})):t._e()],2):t._e()}),[],!1,null,null,null).exports;var We=n(54332);const Ge={name:"DotsHorizontalIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ke=(0,wt.A)(Ge,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon dots-horizontal-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,Xe={name:"SharingEntry",components:{NcButton:We.A,NcAvatar:v.A,DotsHorizontalIcon:Ke,NcSelect:y.A,SharingEntryQuickShareSelect:De},mixins:[Kt,Ot],computed:{title(){let e=this.share.shareWithDisplayName;return this.share.type===this.SHARE_TYPES.SHARE_TYPE_GROUP?e+=" (".concat(t("files_sharing","group"),")"):this.share.type===this.SHARE_TYPES.SHARE_TYPE_ROOM?e+=" (".concat(t("files_sharing","conversation"),")"):this.share.type===this.SHARE_TYPES.SHARE_TYPE_REMOTE?e+=" (".concat(t("files_sharing","remote"),")"):this.share.type===this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP?e+=" (".concat(t("files_sharing","remote group"),")"):this.share.type===this.SHARE_TYPES.SHARE_TYPE_GUEST&&(e+=" (".concat(t("files_sharing","guest"),")")),e},tooltip(){if(this.share.owner!==this.share.uidFileOwner){const e={user:this.share.shareWithDisplayName,owner:this.share.ownerDisplayName};return this.share.type===this.SHARE_TYPES.SHARE_TYPE_GROUP?t("files_sharing","Shared with the group {user} by {owner}",e):this.share.type===this.SHARE_TYPES.SHARE_TYPE_ROOM?t("files_sharing","Shared with the conversation {user} by {owner}",e):t("files_sharing","Shared with {user} by {owner}",e)}return null},hasStatus(){return this.share.type===this.SHARE_TYPES.SHARE_TYPE_USER&&"object"==typeof this.share.status&&!Array.isArray(this.share.status)}},methods:{onMenuClose(){this.onNoteSubmit()}}};var Ze=n(353),Qe={};Qe.styleTagTransform=g(),Qe.setAttributes=u(),Qe.insert=c().bind(null,"head"),Qe.domAPI=o(),Qe.insertStyleElement=p(),s()(Ze.A,Qe),Ze.A&&Ze.A.locals&&Ze.A.locals;const Je={name:"SharingList",components:{SharingEntry:(0,wt.A)(Xe,(function(){var t=this,e=t._self._c;return e("li",{staticClass:"sharing-entry"},[e("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":t.share.type!==t.SHARE_TYPES.SHARE_TYPE_USER,user:t.share.shareWith,"display-name":t.share.shareWithDisplayName,"menu-position":"left",url:t.share.shareWithAvatar}}),t._v(" "),e("div",{staticClass:"sharing-entry__summary"},[e(t.share.shareWithLink?"a":"div",{tag:"component",staticClass:"sharing-entry__summary__desc",attrs:{title:t.tooltip,"aria-label":t.tooltip,href:t.share.shareWithLink}},[e("span",[t._v(t._s(t.title)+"\n\t\t\t\t"),t.isUnique?t._e():e("span",{staticClass:"sharing-entry__summary__desc-unique"},[t._v(" ("+t._s(t.share.shareWithDisplayNameUnique)+")")]),t._v(" "),t.hasStatus&&t.share.status.message?e("small",[t._v("("+t._s(t.share.status.message)+")")]):t._e()])]),t._v(" "),e("SharingEntryQuickShareSelect",{attrs:{share:t.share,"file-info":t.fileInfo},on:{"open-sharing-details":function(e){return t.openShareDetailsForCustomSettings(t.share)}}})],1),t._v(" "),e("NcButton",{staticClass:"sharing-entry__action",attrs:{"data-cy-files-sharing-share-actions":"","aria-label":t.t("files_sharing","Open Sharing Details"),type:"tertiary"},on:{click:function(e){return t.openSharingDetails(t.share)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("DotsHorizontalIcon",{attrs:{size:20}})]},proxy:!0}])})],1)}),[],!1,null,"756f491a",null).exports},mixins:[gt,Ot],props:{fileInfo:{type:Object,default:()=>{},required:!0},shares:{type:Array,default:()=>[],required:!0}},computed:{hasShares(){return 0===this.shares.length},isUnique(){return t=>[...this.shares].filter((e=>t.type===this.SHARE_TYPES.SHARE_TYPE_USER&&t.shareWithDisplayName===e.shareWithDisplayName)).length<=1}}},tr=(0,wt.A)(Je,(function(){var t=this,e=t._self._c;return e("ul",{staticClass:"sharing-sharee-list"},t._l(t.shares,(function(r){return e("SharingEntry",{key:r.id,attrs:{"file-info":t.fileInfo,share:r,"is-unique":t.isUnique(r)},on:{"open-sharing-details":function(e){return t.openSharingDetails(r)}}})})),1)}),[],!1,null,null,null).exports;var er=n(32073),rr=n(31126),nr=n(27433),ir=n(84237),sr=n(16044),ar=n(42740);const or={name:"CircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},lr=(0,wt.A)(or,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon circle-outline-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,cr={name:"EmailIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},hr=(0,wt.A)(cr,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon email-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M20,8L12,13L4,8V6L12,11L20,6M20,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6C22,4.89 21.1,4 20,4Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var ur=n(89979),dr=n(72755);const pr={name:"ShareCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},fr=(0,wt.A)(pr,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon share-circle-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M14 16V13C10.39 13 7.81 14.43 6 17C6.72 13.33 8.94 9.73 14 9V6L19 11L14 16Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,gr={name:"AccountCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ar=(0,wt.A)(gr,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon account-circle-outline-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7.07,18.28C7.5,17.38 10.12,16.5 12,16.5C13.88,16.5 16.5,17.38 16.93,18.28C15.57,19.36 13.86,20 12,20C10.14,20 8.43,19.36 7.07,18.28M18.36,16.83C16.93,15.09 13.46,14.5 12,14.5C10.54,14.5 7.07,15.09 5.64,16.83C4.62,15.5 4,13.82 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,13.82 19.38,15.5 18.36,16.83M12,6C10.06,6 8.5,7.56 8.5,9.5C8.5,11.44 10.06,13 12,13C13.94,13 15.5,11.44 15.5,9.5C15.5,7.56 13.94,6 12,6M12,11A1.5,1.5 0 0,1 10.5,9.5A1.5,1.5 0 0,1 12,8A1.5,1.5 0 0,1 13.5,9.5A1.5,1.5 0 0,1 12,11Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,mr={name:"EyeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},vr=(0,wt.A)(mr,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon eye-icon",attrs:{"aria-hidden":!t.title||null,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var yr=n(45821),Er=n(1795),_r=n(33017);const wr={name:"SharingDetailsTab",components:{NcAvatar:v.A,NcButton:We.A,NcCheckboxRadioSwitch:er.A,NcDateTimePickerNative:rr.A,NcInputField:nr.A,NcLoadingIcon:ir.A,NcPasswordField:sr.A,NcTextArea:ar.A,CloseIcon:Ee.A,CircleIcon:lr,EditIcon:xe.A,ExternalShareAction:Oe,LinkIcon:ur.A,GroupIcon:dr.A,ShareIcon:fr,UserIcon:Ar,UploadIcon:yr.A,ViewIcon:vr,MenuDownIcon:Er.A,MenuUpIcon:_r.A,DotsHorizontalIcon:Ke},mixins:[gt,Lt,Kt],props:{shareRequestValue:{type:Object,required:!1},fileInfo:{type:Object,required:!0},share:{type:Object,required:!0}},data:()=>({writeNoteToRecipientIsChecked:!1,sharingPermission:Wt.ALL.toString(),revertSharingPermission:Wt.ALL.toString(),setCustomPermissions:!1,passwordError:!1,advancedSectionAccordionExpanded:!1,bundledPermissions:Wt,isFirstComponentLoad:!0,test:!1,creating:!1,ExternalShareActions:OCA.Sharing.ExternalShareActions.state}),computed:{title(){switch(this.share.type){case this.SHARE_TYPES.SHARE_TYPE_USER:return t("files_sharing","Share with {userName}",{userName:this.share.shareWithDisplayName});case this.SHARE_TYPES.SHARE_TYPE_EMAIL:return t("files_sharing","Share with email {email}",{email:this.share.shareWith});case this.SHARE_TYPES.SHARE_TYPE_LINK:return t("files_sharing","Share link");case this.SHARE_TYPES.SHARE_TYPE_GROUP:return t("files_sharing","Share with group");case this.SHARE_TYPES.SHARE_TYPE_ROOM:return t("files_sharing","Share in conversation");case this.SHARE_TYPES.SHARE_TYPE_REMOTE:{const[e,r]=this.share.shareWith.split("@");return t("files_sharing","Share with {user} on remote server {server}",{user:e,server:r})}case this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP:return t("files_sharing","Share with remote group");case this.SHARE_TYPES.SHARE_TYPE_GUEST:return t("files_sharing","Share with guest");default:return this.share.id?t("files_sharing","Update share"):t("files_sharing","Create share")}},canEdit:{get(){return this.share.hasUpdatePermission},set(t){this.updateAtomicPermissions({isEditChecked:t})}},canCreate:{get(){return this.share.hasCreatePermission},set(t){this.updateAtomicPermissions({isCreateChecked:t})}},canDelete:{get(){return this.share.hasDeletePermission},set(t){this.updateAtomicPermissions({isDeleteChecked:t})}},canReshare:{get(){return this.share.hasSharePermission},set(t){this.updateAtomicPermissions({isReshareChecked:t})}},canDownload:{get(){var t;return(null===(t=this.share.attributes.find((t=>"download"===t.key)))||void 0===t?void 0:t.value)||!1},set(t){const e=this.share.attributes.find((t=>"download"===t.key));e&&(e.value=t)}},hasRead:{get(){return this.share.hasReadPermission},set(t){this.updateAtomicPermissions({isReadChecked:t})}},hasExpirationDate:{get(){return this.isValidShareAttribute(this.share.expireDate)},set(t){this.share.expireDate=t?this.formatDateToString(this.defaultExpiryDate):""}},isPasswordProtected:{get(){return this.config.enforcePasswordForPublicLink||!!this.share.password},async set(t){t?(this.share.password=await He(!0),this.$set(this.share,"newPassword",this.share.password)):(this.share.password="",this.$delete(this.share,"newPassword"))}},isFolder(){return"dir"===this.fileInfo.type},isSetDownloadButtonVisible(){return this.isFolder||["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation"].includes(this.fileInfo.mimetype)},isPasswordEnforced(){return this.isPublicShare&&this.config.enforcePasswordForPublicLink},defaultExpiryDate(){return(this.isGroupShare||this.isUserShare)&&this.config.isDefaultInternalExpireDateEnabled?new Date(this.config.defaultInternalExpirationDate):this.isRemoteShare&&this.config.isDefaultRemoteExpireDateEnabled?new Date(this.config.defaultRemoteExpireDateEnabled):this.isPublicShare&&this.config.isDefaultExpireDateEnabled?new Date(this.config.defaultExpirationDate):new Date((new Date).setDate((new Date).getDate()+1))},isUserShare(){return this.share.type===this.SHARE_TYPES.SHARE_TYPE_USER},isGroupShare(){return this.share.type===this.SHARE_TYPES.SHARE_TYPE_GROUP},isNewShare(){return!this.share.id},allowsFileDrop(){return!(!this.isFolder||!this.config.isPublicUploadEnabled||this.share.type!==this.SHARE_TYPES.SHARE_TYPE_LINK&&this.share.type!==this.SHARE_TYPES.SHARE_TYPE_EMAIL)},hasFileDropPermissions(){return this.share.permissions===this.bundledPermissions.FILE_DROP},shareButtonText(){return this.isNewShare?t("files_sharing","Save share"):t("files_sharing","Update share")},canSetEdit(){return this.fileInfo.sharePermissions&OC.PERMISSION_UPDATE||this.canEdit},canSetCreate(){return this.fileInfo.sharePermissions&OC.PERMISSION_CREATE||this.canCreate},canSetDelete(){return this.fileInfo.sharePermissions&OC.PERMISSION_DELETE||this.canDelete},canSetReshare(){return this.fileInfo.sharePermissions&OC.PERMISSION_SHARE||this.canReshare},canSetDownload(){return this.fileInfo.canDownload()||this.canDownload},canRemoveReadPermission(){return this.allowsFileDrop&&(this.share.type===this.SHARE_TYPES.SHARE_TYPE_LINK||this.share.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL)},hasUnsavedPassword(){return void 0!==this.share.newPassword},passwordExpirationTime(){if(!this.isValidShareAttribute(this.share.passwordExpirationTime))return null;const t=moment(this.share.passwordExpirationTime);return!(t.diff(moment())<0)&&t.fromNow()},isTalkEnabled:()=>void 0!==OC.appswebroots.spreed,isPasswordProtectedByTalkAvailable(){return this.isPasswordProtected&&this.isTalkEnabled},isPasswordProtectedByTalk:{get(){return this.share.sendPasswordByTalk},async set(t){this.share.sendPasswordByTalk=t}},isEmailShareType(){return!!this.share&&this.share.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL},canTogglePasswordProtectedByTalkAvailable(){return!(!this.isPublicShare||!this.isPasswordProtected||this.isEmailShareType&&!this.hasUnsavedPassword||void 0===OC.appswebroots.spreed)},canChangeHideDownload(){return this.fileInfo.shareAttributes.some((t=>"download"===t.key&&"permissions"===t.scope&&!1===t.value))},customPermissionsList(){const t={[qt.READ]:this.t("files_sharing","Read"),[qt.CREATE]:this.t("files_sharing","Create"),[qt.UPDATE]:this.t("files_sharing","Edit"),[qt.SHARE]:this.t("files_sharing","Share"),[qt.DELETE]:this.t("files_sharing","Delete")};return[qt.READ,qt.CREATE,qt.UPDATE,qt.SHARE,qt.DELETE].filter((t=>{return e=this.share.permissions,r=t,e!==qt.NONE&&(e&r)===r;var e,r})).map(((e,r)=>0===r?t[e]:t[e].toLocaleLowerCase((0,Be.Z0)()))).join(", ")},advancedControlExpandedValue(){return this.advancedSectionAccordionExpanded?"true":"false"},errorPasswordLabel(){if(this.passwordError)return t("files_sharing","Password field can't be empty")},externalLinkActions(){return this.ExternalShareActions.actions.filter((t=>(t.shareType.includes(ot.I.Link)||t.shareType.includes(ot.I.Email))&&t.advanced))}},watch:{setCustomPermissions(t){this.sharingPermission=t?"custom":this.revertSharingPermission}},beforeMount(){this.initializePermissions(),this.initializeAttributes(),ut.debug("Share object received",{share:this.share}),ut.debug("Configuration object received",{config:this.config})},mounted(){var t;null===(t=this.$refs.quickPermissions)||void 0===t||null===(t=t.querySelector("input:checked"))||void 0===t||t.focus()},methods:{updateAtomicPermissions(){let{isReadChecked:t=this.hasRead,isEditChecked:e=this.canEdit,isCreateChecked:r=this.canCreate,isDeleteChecked:n=this.canDelete,isReshareChecked:i=this.canReshare}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=0|(t?qt.READ:0)|(r?qt.CREATE:0)|(n?qt.DELETE:0)|(e?qt.UPDATE:0)|(i?qt.SHARE:0);this.share.permissions=s},expandCustomPermissions(){this.advancedSectionAccordionExpanded||(this.advancedSectionAccordionExpanded=!0),this.toggleCustomPermissions()},toggleCustomPermissions(t){const e="custom"===this.sharingPermission;this.revertSharingPermission=e?"custom":t,this.setCustomPermissions=e},async initializeAttributes(){if(this.isNewShare)return this.isPasswordEnforced&&this.isPublicShare&&(this.$set(this.share,"newPassword",await He(!0)),this.advancedSectionAccordionExpanded=!0),this.isPublicShare&&this.config.isDefaultExpireDateEnabled?this.share.expireDate=this.config.defaultExpirationDate.toDateString():this.isRemoteShare&&this.config.isDefaultRemoteExpireDateEnabled?this.share.expireDate=this.config.defaultRemoteExpirationDateString.toDateString():this.config.isDefaultInternalExpireDateEnabled&&(this.share.expireDate=this.config.defaultInternalExpirationDate.toDateString()),void(this.isValidShareAttribute(this.share.expireDate)&&(this.advancedSectionAccordionExpanded=!0));!this.isValidShareAttribute(this.share.expireDate)&&this.isExpiryDateEnforced&&(this.hasExpirationDate=!0),(this.isValidShareAttribute(this.share.password)||this.isValidShareAttribute(this.share.expireDate)||this.isValidShareAttribute(this.share.label))&&(this.advancedSectionAccordionExpanded=!0),this.share.note&&(this.writeNoteToRecipientIsChecked=!0)},handleShareType(){"shareType"in this.share?this.share.type=this.share.shareType:this.share.share_type&&(this.share.type=this.share.share_type)},handleDefaultPermissions(){if(this.isNewShare){const t=this.config.defaultPermissions;t===Wt.READ_ONLY||t===Wt.ALL?this.sharingPermission=t.toString():(this.sharingPermission="custom",this.share.permissions=t,this.advancedSectionAccordionExpanded=!0,this.setCustomPermissions=!0)}this.canRemoveReadPermission||(this.hasRead=!0)},handleCustomPermissions(){this.isNewShare||!this.hasCustomPermissions&&!this.share.setCustomPermissions?this.share.permissions&&(this.sharingPermission=this.share.permissions.toString()):(this.sharingPermission="custom",this.advancedSectionAccordionExpanded=!0,this.setCustomPermissions=!0)},initializePermissions(){this.handleShareType(),this.handleDefaultPermissions(),this.handleCustomPermissions()},async saveShare(){var t;const e=["permissions","attributes","note","expireDate"];this.isPublicShare&&e.push("label","password","hideDownload");const r=parseInt(this.sharingPermission);if(this.setCustomPermissions?this.updateAtomicPermissions():this.share.permissions=r,this.isFolder||this.share.permissions!==Wt.ALL||(this.share.permissions=Wt.ALL_FILE),this.writeNoteToRecipientIsChecked||(this.share.note=""),this.isPasswordProtected?this.hasUnsavedPassword&&this.isValidShareAttribute(this.share.newPassword)?(this.share.password=this.share.newPassword,this.$delete(this.share,"newPassword")):this.isPasswordEnforced&&!this.isValidShareAttribute(this.share.password)&&(this.passwordError=!0):this.share.password="",this.hasExpirationDate||(this.share.expireDate=""),this.isNewShare){const t={permissions:this.share.permissions,shareType:this.share.type,shareWith:this.share.shareWith,attributes:this.share.attributes,note:this.share.note,fileInfo:this.fileInfo};t.expireDate=this.hasExpirationDate?this.share.expireDate:"",this.isPasswordProtected&&(t.password=this.share.password),this.creating=!0;const e=await this.addShare(t);this.creating=!1,this.share=e,this.$emit("add:share",this.share)}else this.$emit("update:share",this.share),this.queueUpdate(...e);await this.getNode(),(0,kt.Ic)("files:node:updated",this.node),(null===(t=this.$refs.externalLinkActions)||void 0===t?void 0:t.length)>0&&await Promise.allSettled(this.$refs.externalLinkActions.map((t=>{var e,r,n;return"function"!=typeof(null===(e=t.$children.at(0))||void 0===e?void 0:e.onSave)?Promise.resolve():null===(r=t.$children.at(0))||void 0===r||null===(n=r.onSave)||void 0===n?void 0:n.call(r)}))),this.$emit("close-sharing-details")},async addShare(t){ut.debug("Adding a new share from the input for",{share:t});const e=this.path;try{return await this.createShare({path:e,shareType:t.shareType,shareWith:t.shareWith,permissions:t.permissions,expireDate:t.expireDate,attributes:JSON.stringify(t.attributes),...t.note?{note:t.note}:{},...t.password?{password:t.password}:{}})}catch(t){ut.error("Error while adding new share",{error:t})}},async removeShare(){await this.onDelete(),await this.getNode(),(0,kt.Ic)("files:node:updated",this.node),this.$emit("close-sharing-details")},onPasswordChange(t){this.passwordError=!this.isValidShareAttribute(t),this.$set(this.share,"newPassword",t)},onPasswordProtectedByTalkChange(){this.hasUnsavedPassword&&(this.share.password=this.share.newPassword.trim()),this.queueUpdate("sendPasswordByTalk","password")},isValidShareAttribute:t=>![null,void 0].includes(t)&&t.trim().length>0,getShareTypeIcon(t){switch(t){case this.SHARE_TYPES.SHARE_TYPE_LINK:return ur.A;case this.SHARE_TYPES.SHARE_TYPE_GUEST:return Ar;case this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP:case this.SHARE_TYPES.SHARE_TYPE_GROUP:return dr.A;case this.SHARE_TYPES.SHARE_TYPE_EMAIL:return hr;case this.SHARE_TYPES.SHARE_TYPE_CIRCLE:return lr;case this.SHARE_TYPES.SHARE_TYPE_ROOM:case this.SHARE_TYPES.SHARE_TYPE_DECK:case this.SHARE_TYPES.SHARE_TYPE_SCIENCEMESH:return fr;default:return null}}}};var Cr=n(9766),br={};br.styleTagTransform=g(),br.setAttributes=u(),br.insert=c().bind(null,"head"),br.domAPI=o(),br.insertStyleElement=p(),s()(Cr.A,br),Cr.A&&Cr.A.locals&&Cr.A.locals;const Sr=(0,wt.A)(wr,(function(){var t,e=this,r=e._self._c;return r("div",{staticClass:"sharingTabDetailsView"},[r("div",{staticClass:"sharingTabDetailsView__header"},[r("span",[e.isUserShare?r("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":e.share.shareType!==e.SHARE_TYPES.SHARE_TYPE_USER,user:e.share.shareWith,"display-name":e.share.shareWithDisplayName,"menu-position":"left",url:e.share.shareWithAvatar}}):e._e(),e._v(" "),r(e.getShareTypeIcon(e.share.type),{tag:"component",attrs:{size:32}})],1),e._v(" "),r("span",[r("h1",[e._v(e._s(e.title))])])]),e._v(" "),r("div",{staticClass:"sharingTabDetailsView__wrapper"},[r("div",{ref:"quickPermissions",staticClass:"sharingTabDetailsView__quick-permissions"},[r("div",[r("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,"data-cy-files-sharing-share-permissions-bundle":"read-only",checked:e.sharingPermission,value:e.bundledPermissions.READ_ONLY.toString(),name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:checked":[function(t){e.sharingPermission=t},e.toggleCustomPermissions]},scopedSlots:e._u([{key:"icon",fn:function(){return[r("ViewIcon",{attrs:{size:20}})]},proxy:!0}])},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","View only"))+"\n\t\t\t\t\t")]),e._v(" "),r("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,"data-cy-files-sharing-share-permissions-bundle":"upload-edit",checked:e.sharingPermission,value:e.bundledPermissions.ALL.toString(),name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:checked":[function(t){e.sharingPermission=t},e.toggleCustomPermissions]},scopedSlots:e._u([{key:"icon",fn:function(){return[r("EditIcon",{attrs:{size:20}})]},proxy:!0}])},[e.allowsFileDrop?[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Allow upload and editing"))+"\n\t\t\t\t\t")]:[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Allow editing"))+"\n\t\t\t\t\t")]],2),e._v(" "),e.allowsFileDrop?r("NcCheckboxRadioSwitch",{attrs:{"data-cy-files-sharing-share-permissions-bundle":"file-drop","button-variant":!0,checked:e.sharingPermission,value:e.bundledPermissions.FILE_DROP.toString(),name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:checked":[function(t){e.sharingPermission=t},e.toggleCustomPermissions]},scopedSlots:e._u([{key:"icon",fn:function(){return[r("UploadIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,1083194048)},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","File request"))+"\n\t\t\t\t\t"),r("small",{staticClass:"subline"},[e._v(e._s(e.t("files_sharing","Upload only")))])]):e._e(),e._v(" "),r("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,"data-cy-files-sharing-share-permissions-bundle":"custom",checked:e.sharingPermission,value:"custom",name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:checked":[function(t){e.sharingPermission=t},e.expandCustomPermissions]},scopedSlots:e._u([{key:"icon",fn:function(){return[r("DotsHorizontalIcon",{attrs:{size:20}})]},proxy:!0}])},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Custom permissions"))+"\n\t\t\t\t\t"),r("small",{staticClass:"subline"},[e._v(e._s(e.customPermissionsList))])])],1)]),e._v(" "),r("div",{staticClass:"sharingTabDetailsView__advanced-control"},[r("NcButton",{attrs:{id:"advancedSectionAccordionAdvancedControl",type:"tertiary",alignment:"end-reverse","aria-controls":"advancedSectionAccordionAdvanced","aria-expanded":e.advancedControlExpandedValue},on:{click:function(t){e.advancedSectionAccordionExpanded=!e.advancedSectionAccordionExpanded}},scopedSlots:e._u([{key:"icon",fn:function(){return[e.advancedSectionAccordionExpanded?r("MenuUpIcon"):r("MenuDownIcon")]},proxy:!0}])},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Advanced settings"))+"\n\t\t\t\t")])],1),e._v(" "),e.advancedSectionAccordionExpanded?r("div",{staticClass:"sharingTabDetailsView__advanced",attrs:{id:"advancedSectionAccordionAdvanced","aria-labelledby":"advancedSectionAccordionAdvancedControl",role:"region"}},[r("section",[e.isPublicShare?r("NcInputField",{attrs:{autocomplete:"off",label:e.t("files_sharing","Share label"),value:e.share.label},on:{"update:value":function(t){return e.$set(e.share,"label",t)}}}):e._e(),e._v(" "),e.isPublicShare?[r("NcCheckboxRadioSwitch",{attrs:{checked:e.isPasswordProtected,disabled:e.isPasswordEnforced},on:{"update:checked":function(t){e.isPasswordProtected=t}}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Set password"))+"\n\t\t\t\t\t")]),e._v(" "),e.isPasswordProtected?r("NcPasswordField",{attrs:{autocomplete:"new-password",value:e.hasUnsavedPassword?e.share.newPassword:"",error:e.passwordError,"helper-text":e.errorPasswordLabel,required:e.isPasswordEnforced,label:e.t("files_sharing","Password")},on:{"update:value":e.onPasswordChange}}):e._e(),e._v(" "),e.isEmailShareType&&e.passwordExpirationTime?r("span",{attrs:{icon:"icon-info"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Password expires {passwordExpirationTime}",{passwordExpirationTime:e.passwordExpirationTime}))+"\n\t\t\t\t\t")]):e.isEmailShareType&&null!==e.passwordExpirationTime?r("span",{attrs:{icon:"icon-error"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Password expired"))+"\n\t\t\t\t\t")]):e._e()]:e._e(),e._v(" "),e.canTogglePasswordProtectedByTalkAvailable?r("NcCheckboxRadioSwitch",{attrs:{checked:e.isPasswordProtectedByTalk},on:{"update:checked":[function(t){e.isPasswordProtectedByTalk=t},e.onPasswordProtectedByTalkChange]}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Video verification"))+"\n\t\t\t\t")]):e._e(),e._v(" "),r("NcCheckboxRadioSwitch",{attrs:{checked:e.hasExpirationDate,disabled:e.isExpiryDateEnforced},on:{"update:checked":function(t){e.hasExpirationDate=t}}},[e._v("\n\t\t\t\t\t"+e._s(e.isExpiryDateEnforced?e.t("files_sharing","Expiration date (enforced)"):e.t("files_sharing","Set expiration date"))+"\n\t\t\t\t")]),e._v(" "),e.hasExpirationDate?r("NcDateTimePickerNative",{attrs:{id:"share-date-picker",value:new Date(null!==(t=e.share.expireDate)&&void 0!==t?t:e.dateTomorrow),min:e.dateTomorrow,max:e.maxExpirationDateEnforced,"hide-label":!0,placeholder:e.t("files_sharing","Expiration date"),type:"date"},on:{input:e.onExpirationChange}}):e._e(),e._v(" "),e.isPublicShare?r("NcCheckboxRadioSwitch",{attrs:{disabled:e.canChangeHideDownload,checked:e.share.hideDownload},on:{"update:checked":[function(t){return e.$set(e.share,"hideDownload",t)},function(t){return e.queueUpdate("hideDownload")}]}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Hide download"))+"\n\t\t\t\t")]):e._e(),e._v(" "),e.isPublicShare?e._e():r("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetDownload,checked:e.canDownload,"data-cy-files-sharing-share-permissions-checkbox":"download"},on:{"update:checked":function(t){e.canDownload=t}}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Allow download"))+"\n\t\t\t\t")]),e._v(" "),r("NcCheckboxRadioSwitch",{attrs:{checked:e.writeNoteToRecipientIsChecked},on:{"update:checked":function(t){e.writeNoteToRecipientIsChecked=t}}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Note to recipient"))+"\n\t\t\t\t")]),e._v(" "),e.writeNoteToRecipientIsChecked?[r("NcTextArea",{attrs:{label:e.t("files_sharing","Note to recipient"),placeholder:e.t("files_sharing","Enter a note for the share recipient"),value:e.share.note},on:{"update:value":function(t){return e.$set(e.share,"note",t)}}})]:e._e(),e._v(" "),e._l(e.externalLinkActions,(function(t){return r("ExternalShareAction",{key:t.id,ref:"externalLinkActions",refInFor:!0,attrs:{id:t.id,action:t,"file-info":e.fileInfo,share:e.share}})})),e._v(" "),r("NcCheckboxRadioSwitch",{attrs:{checked:e.setCustomPermissions},on:{"update:checked":function(t){e.setCustomPermissions=t}}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Custom permissions"))+"\n\t\t\t\t")]),e._v(" "),e.setCustomPermissions?r("section",{staticClass:"custom-permissions-group"},[r("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canRemoveReadPermission,checked:e.hasRead,"data-cy-files-sharing-share-permissions-checkbox":"read"},on:{"update:checked":function(t){e.hasRead=t}}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Read"))+"\n\t\t\t\t\t")]),e._v(" "),e.isFolder?r("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetCreate,checked:e.canCreate,"data-cy-files-sharing-share-permissions-checkbox":"create"},on:{"update:checked":function(t){e.canCreate=t}}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Create"))+"\n\t\t\t\t\t")]):e._e(),e._v(" "),r("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetEdit,checked:e.canEdit,"data-cy-files-sharing-share-permissions-checkbox":"update"},on:{"update:checked":function(t){e.canEdit=t}}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Edit"))+"\n\t\t\t\t\t")]),e._v(" "),e.config.isResharingAllowed&&e.share.type!==e.SHARE_TYPES.SHARE_TYPE_LINK?r("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetReshare,checked:e.canReshare,"data-cy-files-sharing-share-permissions-checkbox":"share"},on:{"update:checked":function(t){e.canReshare=t}}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Share"))+"\n\t\t\t\t\t")]):e._e(),e._v(" "),r("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetDelete,checked:e.canDelete,"data-cy-files-sharing-share-permissions-checkbox":"delete"},on:{"update:checked":function(t){e.canDelete=t}}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Delete"))+"\n\t\t\t\t\t")])],1):e._e(),e._v(" "),r("div",{staticClass:"sharingTabDetailsView__delete"},[e.isNewShare?e._e():r("NcButton",{attrs:{"aria-label":e.t("files_sharing","Delete share"),disabled:!1,readonly:!1,type:"tertiary"},on:{click:function(t){return t.preventDefault(),e.removeShare.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[r("CloseIcon",{attrs:{size:16}})]},proxy:!0}],null,!1,2746485232)},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Delete share"))+"\n\t\t\t\t\t")])],1)],2)]):e._e()]),e._v(" "),r("div",{staticClass:"sharingTabDetailsView__footer"},[r("div",{staticClass:"button-group"},[r("NcButton",{attrs:{"data-cy-files-sharing-share-editor-action":"cancel"},on:{click:function(t){return e.$emit("close-sharing-details")}}},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Cancel"))+"\n\t\t\t")]),e._v(" "),r("NcButton",{attrs:{type:"primary","data-cy-files-sharing-share-editor-action":"save"},on:{click:e.saveShare},scopedSlots:e._u([e.creating?{key:"icon",fn:function(){return[r("NcLoadingIcon")]},proxy:!0}:null],null,!0)},[e._v("\n\t\t\t\t"+e._s(e.shareButtonText)+"\n\t\t\t\t")])],1)])])}),[],!1,null,"1653f581",null).exports;var xr=n(96763);const Tr={name:"SharingTab",components:{NcAvatar:v.A,CollectionList:rt,SharingEntryInternal:Pt,SharingEntrySimple:Ct,SharingInherited:ie,SharingInput:Yt,SharingLinkList:qe,SharingList:tr,SharingDetailsTab:Sr},mixins:[gt],data:()=>({config:new at,deleteEvent:null,error:"",expirationInterval:null,loading:!0,fileInfo:null,reshare:null,sharedWithMe:{},shares:[],linkShares:[],sections:OCA.Sharing.ShareTabSections.getSections(),projectsEnabled:(0,it.C)("core","projects_enabled",!1),showSharingDetailsView:!1,shareDetailsData:{},returnFocusElement:null}),computed:{isSharedWithMe(){return Object.keys(this.sharedWithMe).length>0},canReshare(){return!!(this.fileInfo.permissions&OC.PERMISSION_SHARE)||!!(this.reshare&&this.reshare.hasSharePermission&&this.config.isResharingAllowed)}},methods:{async update(t){this.fileInfo=t,this.resetState(),this.getShares()},async getShares(){try{this.loading=!0;const t=(0,nt.KT)("apps/files_sharing/api/v1/shares"),e="json",r=(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/"),n=q.Ay.get(t,{params:{format:e,path:r,reshares:!0}}),i=q.Ay.get(t,{params:{format:e,path:r,shared_with_me:!0}}),[s,a]=await Promise.all([n,i]);this.loading=!1,this.processSharedWithMe(a),this.processShares(s)}catch(r){var e;null!==(e=r.response.data)&&void 0!==e&&null!==(e=e.ocs)&&void 0!==e&&null!==(e=e.meta)&&void 0!==e&&e.message?this.error=r.response.data.ocs.meta.message:this.error=t("files_sharing","Unable to load the shares list"),this.loading=!1,xr.error("Error loading the shares list",r)}},resetState(){clearInterval(this.expirationInterval),this.loading=!0,this.error="",this.sharedWithMe={},this.shares=[],this.linkShares=[],this.showSharingDetailsView=!1,this.shareDetailsData={}},updateExpirationSubtitle(e){const r=moment(e.expireDate).unix();this.$set(this.sharedWithMe,"subtitle",t("files_sharing","Expires {relativetime}",{relativetime:OC.Util.relativeModifiedDate(1e3*r)})),moment().unix()>r&&(clearInterval(this.expirationInterval),this.$set(this.sharedWithMe,"subtitle",t("files_sharing","this share just expired.")))},processShares(t){let{data:e}=t;if(e.ocs&&e.ocs.data&&e.ocs.data.length>0){const t=e.ocs.data.map((t=>new ft(t))).sort(((t,e)=>e.createdTime-t.createdTime));this.linkShares=t.filter((t=>t.type===this.SHARE_TYPES.SHARE_TYPE_LINK||t.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL)),this.shares=t.filter((t=>t.type!==this.SHARE_TYPES.SHARE_TYPE_LINK&&t.type!==this.SHARE_TYPES.SHARE_TYPE_EMAIL)),xr.debug("Processed",this.linkShares.length,"link share(s)"),xr.debug("Processed",this.shares.length,"share(s)")}},processSharedWithMe(e){let{data:r}=e;if(r.ocs&&r.ocs.data&&r.ocs.data[0]){const e=new ft(r),n=function(e){return e.type===ot.Z.SHARE_TYPE_GROUP?t("files_sharing","Shared with you and the group {group} by {owner}",{group:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):e.type===ot.Z.SHARE_TYPE_CIRCLE?t("files_sharing","Shared with you and {circle} by {owner}",{circle:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):e.type===ot.Z.SHARE_TYPE_ROOM?e.shareWithDisplayName?t("files_sharing","Shared with you and the conversation {conversation} by {owner}",{conversation:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):t("files_sharing","Shared with you in a conversation by {owner}",{owner:e.ownerDisplayName},void 0,{escape:!1}):t("files_sharing","Shared with you by {owner}",{owner:e.ownerDisplayName},void 0,{escape:!1})}(e),i=e.ownerDisplayName,s=e.owner;this.sharedWithMe={displayName:i,title:n,user:s},this.reshare=e,e.expireDate&&moment(e.expireDate).unix()>moment().unix()&&(this.updateExpirationSubtitle(e),this.expirationInterval=setInterval(this.updateExpirationSubtitle,1e4,e))}else this.fileInfo&&void 0!==this.fileInfo.shareOwnerId&&this.fileInfo.shareOwnerId!==OC.currentUser&&(this.sharedWithMe={displayName:this.fileInfo.shareOwner,title:t("files_sharing","Shared with you by {owner}",{owner:this.fileInfo.shareOwner},void 0,{escape:!1}),user:this.fileInfo.shareOwnerId})},addShare(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};t.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL?this.linkShares.unshift(t):this.shares.unshift(t),this.awaitForShare(t,e)},removeShare(t){const e=t.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL||t.type===this.SHARE_TYPES.SHARE_TYPE_LINK?this.linkShares:this.shares,r=e.findIndex((e=>e.id===t.id));-1!==r&&e.splice(r,1)},awaitForShare(t,e){this.$nextTick((()=>{let r=this.$refs.shareList;t.type===this.SHARE_TYPES.SHARE_TYPE_EMAIL&&(r=this.$refs.linkShareList);const n=r.$children.find((e=>e.share===t));n&&e(n)}))},toggleShareDetailsView(t){if(!this.showSharingDetailsView)if(Array.from(document.activeElement.classList).some((t=>t.startsWith("action-")))){var e;const t=null===(e=document.activeElement.closest('[role="menu"]'))||void 0===e?void 0:e.id;this.returnFocusElement=document.querySelector('[aria-controls="'.concat(t,'"]'))}else this.returnFocusElement=document.activeElement;t&&(this.shareDetailsData=t),this.showSharingDetailsView=!this.showSharingDetailsView,this.showSharingDetailsView||this.$nextTick((()=>{var t;null===(t=this.returnFocusElement)||void 0===t||t.focus(),this.returnFocusElement=null}))}}},Pr=Tr;var Rr=n(85285),Ir={};Ir.styleTagTransform=g(),Ir.setAttributes=u(),Ir.insert=c().bind(null,"head"),Ir.domAPI=o(),Ir.insertStyleElement=p(),s()(Rr.A,Ir),Rr.A&&Rr.A.locals&&Rr.A.locals;const kr=(0,wt.A)(Pr,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"sharingTab",class:{"icon-loading":t.loading}},[t.error?e("div",{staticClass:"emptycontent",class:{emptyContentWithSections:t.sections.length>0}},[e("div",{staticClass:"icon icon-error"}),t._v(" "),e("h2",[t._v(t._s(t.error))])]):t._e(),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.showSharingDetailsView,expression:"!showSharingDetailsView"}],staticClass:"sharingTab__content"},[e("ul",[t.isSharedWithMe?e("SharingEntrySimple",t._b({staticClass:"sharing-entry__reshare",scopedSlots:t._u([{key:"avatar",fn:function(){return[e("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{user:t.sharedWithMe.user,"display-name":t.sharedWithMe.displayName}})]},proxy:!0}],null,!1,3197855346)},"SharingEntrySimple",t.sharedWithMe,!1)):t._e()],1),t._v(" "),t.loading?t._e():e("SharingInput",{attrs:{"can-reshare":t.canReshare,"file-info":t.fileInfo,"link-shares":t.linkShares,reshare:t.reshare,shares:t.shares},on:{"open-sharing-details":t.toggleShareDetailsView}}),t._v(" "),t.loading?t._e():e("SharingLinkList",{ref:"linkShareList",attrs:{"can-reshare":t.canReshare,"file-info":t.fileInfo,shares:t.linkShares},on:{"open-sharing-details":t.toggleShareDetailsView}}),t._v(" "),t.loading?t._e():e("SharingList",{ref:"shareList",attrs:{shares:t.shares,"file-info":t.fileInfo},on:{"open-sharing-details":t.toggleShareDetailsView}}),t._v(" "),t.canReshare&&!t.loading?e("SharingInherited",{attrs:{"file-info":t.fileInfo}}):t._e(),t._v(" "),e("SharingEntryInternal",{attrs:{"file-info":t.fileInfo}}),t._v(" "),t.projectsEnabled&&t.fileInfo?e("CollectionList",{attrs:{id:"".concat(t.fileInfo.id),type:"file",name:t.fileInfo.name}}):t._e()],1),t._v(" "),t._l(t.sections,(function(r,n){return e("div",{directives:[{name:"show",rawName:"v-show",value:!t.showSharingDetailsView,expression:"!showSharingDetailsView"}],key:n,ref:"section-"+n,refInFor:!0,staticClass:"sharingTab__additionalContent"},[e(r(t.$refs["section-"+n],t.fileInfo),{tag:"component",attrs:{"file-info":t.fileInfo}})],1)})),t._v(" "),t.showSharingDetailsView?e("SharingDetailsTab",{attrs:{"file-info":t.shareDetailsData.fileInfo,share:t.shareDetailsData.share},on:{"close-sharing-details":t.toggleShareDetailsView,"add:share":t.addShare,"remove:share":t.removeShare}}):t._e()],2)}),[],!1,null,"19197a19",null).exports},27518:t=>{"use strict";t.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:t=>{"use strict";t.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:t=>{"use strict";t.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:t=>{"use strict";t.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"},79306:(t,e,r)=>{"use strict";var n=r(94901),i=r(16823),s=TypeError;t.exports=function(t){if(n(t))return t;throw new s(i(t)+" is not a function")}},57829:(t,e,r)=>{"use strict";var n=r(68183).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},28551:(t,e,r)=>{"use strict";var n=r(20034),i=String,s=TypeError;t.exports=function(t){if(n(t))return t;throw new s(i(t)+" is not an object")}},19617:(t,e,r)=>{"use strict";var n=r(25397),i=r(35610),s=r(26198),a=function(t){return function(e,r,a){var o=n(e),l=s(o);if(0===l)return!t&&-1;var c,h=i(a,l);if(t&&r!=r){for(;l>h;)if((c=o[h++])!=c)return!0}else for(;l>h;h++)if((t||h in o)&&o[h]===r)return t||h||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},44576:(t,e,r)=>{"use strict";var n=r(79504),i=n({}.toString),s=n("".slice);t.exports=function(t){return s(i(t),8,-1)}},36955:(t,e,r)=>{"use strict";var n=r(92140),i=r(94901),s=r(44576),a=r(78227)("toStringTag"),o=Object,l="Arguments"===s(function(){return arguments}());t.exports=n?s:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=o(t),a))?r:l?s(e):"Object"===(n=s(e))&&i(e.callee)?"Arguments":n}},77740:(t,e,r)=>{"use strict";var n=r(39297),i=r(35031),s=r(77347),a=r(24913);t.exports=function(t,e,r){for(var o=i(e),l=a.f,c=s.f,h=0;h<o.length;h++){var u=o[h];n(t,u)||r&&n(r,u)||l(t,u,c(e,u))}}},66699:(t,e,r)=>{"use strict";var n=r(43724),i=r(24913),s=r(6980);t.exports=n?function(t,e,r){return i.f(t,e,s(1,r))}:function(t,e,r){return t[e]=r,t}},6980:t=>{"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},36840:(t,e,r)=>{"use strict";var n=r(94901),i=r(24913),s=r(50283),a=r(39433);t.exports=function(t,e,r,o){o||(o={});var l=o.enumerable,c=void 0!==o.name?o.name:e;if(n(r)&&s(r,c,o),o.global)l?t[e]=r:a(e,r);else{try{o.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return t}},39433:(t,e,r)=>{"use strict";var n=r(24475),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},43724:(t,e,r)=>{"use strict";var n=r(79039);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4055:(t,e,r)=>{"use strict";var n=r(24475),i=r(20034),s=n.document,a=i(s)&&i(s.createElement);t.exports=function(t){return a?s.createElement(t):{}}},79392:t=>{"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},77388:(t,e,r)=>{"use strict";var n,i,s=r(24475),a=r(79392),o=s.process,l=s.Deno,c=o&&o.versions||l&&l.version,h=c&&c.v8;h&&(i=(n=h.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(i=+n[1]),t.exports=i},88727:t=>{"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},46518:(t,e,r)=>{"use strict";var n=r(24475),i=r(77347).f,s=r(66699),a=r(36840),o=r(39433),l=r(77740),c=r(92796);t.exports=function(t,e){var r,h,u,d,p,f=t.target,g=t.global,A=t.stat;if(r=g?n:A?n[f]||o(f,{}):n[f]&&n[f].prototype)for(h in e){if(d=e[h],u=t.dontCallGetSet?(p=i(r,h))&&p.value:r[h],!c(g?h:f+(A?".":"#")+h,t.forced)&&void 0!==u){if(typeof d==typeof u)continue;l(d,u)}(t.sham||u&&u.sham)&&s(d,"sham",!0),a(r,h,d,t)}}},79039:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},89228:(t,e,r)=>{"use strict";r(27495);var n=r(69565),i=r(36840),s=r(57323),a=r(79039),o=r(78227),l=r(66699),c=o("species"),h=RegExp.prototype;t.exports=function(t,e,r,u){var d=o(t),p=!a((function(){var e={};return e[d]=function(){return 7},7!==""[t](e)})),f=p&&!a((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[c]=function(){return r},r.flags="",r[d]=/./[d]),r.exec=function(){return e=!0,null},r[d](""),!e}));if(!p||!f||r){var g=/./[d],A=e(d,""[t],(function(t,e,r,i,a){var o=e.exec;return o===s||o===h.exec?p&&!a?{done:!0,value:n(g,e,r,i)}:{done:!0,value:n(t,r,e,i)}:{done:!1}}));i(String.prototype,t,A[0]),i(h,d,A[1])}u&&l(h[d],"sham",!0)}},18745:(t,e,r)=>{"use strict";var n=r(40616),i=Function.prototype,s=i.apply,a=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(s):function(){return a.apply(s,arguments)})},40616:(t,e,r)=>{"use strict";var n=r(79039);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},69565:(t,e,r)=>{"use strict";var n=r(40616),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},10350:(t,e,r)=>{"use strict";var n=r(43724),i=r(39297),s=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,o=i(s,"name"),l=o&&"something"===function(){}.name,c=o&&(!n||n&&a(s,"name").configurable);t.exports={EXISTS:o,PROPER:l,CONFIGURABLE:c}},79504:(t,e,r)=>{"use strict";var n=r(40616),i=Function.prototype,s=i.call,a=n&&i.bind.bind(s,s);t.exports=n?a:function(t){return function(){return s.apply(t,arguments)}}},97751:(t,e,r)=>{"use strict";var n=r(24475),i=r(94901);t.exports=function(t,e){return arguments.length<2?(r=n[t],i(r)?r:void 0):n[t]&&n[t][e];var r}},55966:(t,e,r)=>{"use strict";var n=r(79306),i=r(64117);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},2478:(t,e,r)=>{"use strict";var n=r(79504),i=r(48981),s=Math.floor,a=n("".charAt),o=n("".replace),l=n("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,h=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,n,u,d){var p=r+t.length,f=n.length,g=h;return void 0!==u&&(u=i(u),g=c),o(d,g,(function(i,o){var c;switch(a(o,0)){case"$":return"$";case"&":return t;case"`":return l(e,0,r);case"'":return l(e,p);case"<":c=u[l(o,1,-1)];break;default:var h=+o;if(0===h)return i;if(h>f){var d=s(h/10);return 0===d?i:d<=f?void 0===n[d-1]?a(o,1):n[d-1]+a(o,1):i}c=n[h-1]}return void 0===c?"":c}))}},24475:function(t,e,r){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},39297:(t,e,r)=>{"use strict";var n=r(79504),i=r(48981),s=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return s(i(t),e)}},30421:t=>{"use strict";t.exports={}},20397:(t,e,r)=>{"use strict";var n=r(97751);t.exports=n("document","documentElement")},35917:(t,e,r)=>{"use strict";var n=r(43724),i=r(79039),s=r(4055);t.exports=!n&&!i((function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},47055:(t,e,r)=>{"use strict";var n=r(79504),i=r(79039),s=r(44576),a=Object,o=n("".split);t.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===s(t)?o(t,""):a(t)}:a},33706:(t,e,r)=>{"use strict";var n=r(79504),i=r(94901),s=r(77629),a=n(Function.toString);i(s.inspectSource)||(s.inspectSource=function(t){return a(t)}),t.exports=s.inspectSource},91181:(t,e,r)=>{"use strict";var n,i,s,a=r(58622),o=r(24475),l=r(20034),c=r(66699),h=r(39297),u=r(77629),d=r(66119),p=r(30421),f="Object already initialized",g=o.TypeError,A=o.WeakMap;if(a||u.state){var m=u.state||(u.state=new A);m.get=m.get,m.has=m.has,m.set=m.set,n=function(t,e){if(m.has(t))throw new g(f);return e.facade=t,m.set(t,e),e},i=function(t){return m.get(t)||{}},s=function(t){return m.has(t)}}else{var v=d("state");p[v]=!0,n=function(t,e){if(h(t,v))throw new g(f);return e.facade=t,c(t,v,e),e},i=function(t){return h(t,v)?t[v]:{}},s=function(t){return h(t,v)}}t.exports={set:n,get:i,has:s,enforce:function(t){return s(t)?i(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!l(e)||(r=i(e)).type!==t)throw new g("Incompatible receiver, "+t+" required");return r}}}},94901:t=>{"use strict";var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},92796:(t,e,r)=>{"use strict";var n=r(79039),i=r(94901),s=/#|\.prototype\./,a=function(t,e){var r=l[o(t)];return r===h||r!==c&&(i(e)?n(e):!!e)},o=a.normalize=function(t){return String(t).replace(s,".").toLowerCase()},l=a.data={},c=a.NATIVE="N",h=a.POLYFILL="P";t.exports=a},64117:t=>{"use strict";t.exports=function(t){return null==t}},20034:(t,e,r)=>{"use strict";var n=r(94901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},96395:t=>{"use strict";t.exports=!1},10757:(t,e,r)=>{"use strict";var n=r(97751),i=r(94901),s=r(1625),a=r(7040),o=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&s(e.prototype,o(t))}},26198:(t,e,r)=>{"use strict";var n=r(18014);t.exports=function(t){return n(t.length)}},50283:(t,e,r)=>{"use strict";var n=r(79504),i=r(79039),s=r(94901),a=r(39297),o=r(43724),l=r(10350).CONFIGURABLE,c=r(33706),h=r(91181),u=h.enforce,d=h.get,p=String,f=Object.defineProperty,g=n("".slice),A=n("".replace),m=n([].join),v=o&&!i((function(){return 8!==f((function(){}),"length",{value:8}).length})),y=String(String).split("String"),E=t.exports=function(t,e,r){"Symbol("===g(p(e),0,7)&&(e="["+A(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!a(t,"name")||l&&t.name!==e)&&(o?f(t,"name",{value:e,configurable:!0}):t.name=e),v&&r&&a(r,"arity")&&t.length!==r.arity&&f(t,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?o&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=u(t);return a(n,"source")||(n.source=m(y,"string"==typeof e?e:"")),t};Function.prototype.toString=E((function(){return s(this)&&d(this).source||c(this)}),"toString")},80741:t=>{"use strict";var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},2360:(t,e,r)=>{"use strict";var n,i=r(28551),s=r(96801),a=r(88727),o=r(30421),l=r(20397),c=r(4055),h=r(66119),u="prototype",d="script",p=h("IE_PROTO"),f=function(){},g=function(t){return"<"+d+">"+t+"</"+d+">"},A=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;m="undefined"!=typeof document?document.domain&&n?A(n):(e=c("iframe"),r="java"+d+":",e.style.display="none",l.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(g("document.F=Object")),t.close(),t.F):A(n);for(var i=a.length;i--;)delete m[u][a[i]];return m()};o[p]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(f[u]=i(t),r=new f,f[u]=null,r[p]=t):r=m(),void 0===e?r:s.f(r,e)}},96801:(t,e,r)=>{"use strict";var n=r(43724),i=r(48686),s=r(24913),a=r(28551),o=r(25397),l=r(71072);e.f=n&&!i?Object.defineProperties:function(t,e){a(t);for(var r,n=o(e),i=l(e),c=i.length,h=0;c>h;)s.f(t,r=i[h++],n[r]);return t}},24913:(t,e,r)=>{"use strict";var n=r(43724),i=r(35917),s=r(48686),a=r(28551),o=r(56969),l=TypeError,c=Object.defineProperty,h=Object.getOwnPropertyDescriptor,u="enumerable",d="configurable",p="writable";e.f=n?s?function(t,e,r){if(a(t),e=o(e),a(r),"function"==typeof t&&"prototype"===e&&"value"in r&&p in r&&!r[p]){var n=h(t,e);n&&n[p]&&(t[e]=r.value,r={configurable:d in r?r[d]:n[d],enumerable:u in r?r[u]:n[u],writable:!1})}return c(t,e,r)}:c:function(t,e,r){if(a(t),e=o(e),a(r),i)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new l("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},77347:(t,e,r)=>{"use strict";var n=r(43724),i=r(69565),s=r(48773),a=r(6980),o=r(25397),l=r(56969),c=r(39297),h=r(35917),u=Object.getOwnPropertyDescriptor;e.f=n?u:function(t,e){if(t=o(t),e=l(e),h)try{return u(t,e)}catch(t){}if(c(t,e))return a(!i(s.f,t,e),t[e])}},38480:(t,e,r)=>{"use strict";var n=r(61828),i=r(88727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,i)}},33717:(t,e)=>{"use strict";e.f=Object.getOwnPropertySymbols},1625:(t,e,r)=>{"use strict";var n=r(79504);t.exports=n({}.isPrototypeOf)},61828:(t,e,r)=>{"use strict";var n=r(79504),i=r(39297),s=r(25397),a=r(19617).indexOf,o=r(30421),l=n([].push);t.exports=function(t,e){var r,n=s(t),c=0,h=[];for(r in n)!i(o,r)&&i(n,r)&&l(h,r);for(;e.length>c;)i(n,r=e[c++])&&(~a(h,r)||l(h,r));return h}},71072:(t,e,r)=>{"use strict";var n=r(61828),i=r(88727);t.exports=Object.keys||function(t){return n(t,i)}},48773:(t,e)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},84270:(t,e,r)=>{"use strict";var n=r(69565),i=r(94901),s=r(20034),a=TypeError;t.exports=function(t,e){var r,o;if("string"===e&&i(r=t.toString)&&!s(o=n(r,t)))return o;if(i(r=t.valueOf)&&!s(o=n(r,t)))return o;if("string"!==e&&i(r=t.toString)&&!s(o=n(r,t)))return o;throw new a("Can't convert object to primitive value")}},35031:(t,e,r)=>{"use strict";var n=r(97751),i=r(79504),s=r(38480),a=r(33717),o=r(28551),l=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=s.f(o(t)),r=a.f;return r?l(e,r(t)):e}},56682:(t,e,r)=>{"use strict";var n=r(69565),i=r(28551),s=r(94901),a=r(44576),o=r(57323),l=TypeError;t.exports=function(t,e){var r=t.exec;if(s(r)){var c=n(r,t,e);return null!==c&&i(c),c}if("RegExp"===a(t))return n(o,t,e);throw new l("RegExp#exec called on incompatible receiver")}},57323:(t,e,r)=>{"use strict";var n,i,s=r(69565),a=r(79504),o=r(655),l=r(67979),c=r(58429),h=r(25745),u=r(2360),d=r(91181).get,p=r(83635),f=r(18814),g=h("native-string-replace",String.prototype.replace),A=RegExp.prototype.exec,m=A,v=a("".charAt),y=a("".indexOf),E=a("".replace),_=a("".slice),w=(i=/b*/g,s(A,n=/a/,"a"),s(A,i,"a"),0!==n.lastIndex||0!==i.lastIndex),C=c.BROKEN_CARET,b=void 0!==/()??/.exec("")[1];(w||b||C||p||f)&&(m=function(t){var e,r,n,i,a,c,h,p=this,f=d(p),S=o(t),x=f.raw;if(x)return x.lastIndex=p.lastIndex,e=s(m,x,S),p.lastIndex=x.lastIndex,e;var T=f.groups,P=C&&p.sticky,R=s(l,p),I=p.source,k=0,N=S;if(P&&(R=E(R,"y",""),-1===y(R,"g")&&(R+="g"),N=_(S,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==v(S,p.lastIndex-1))&&(I="(?: "+I+")",N=" "+N,k++),r=new RegExp("^(?:"+I+")",R)),b&&(r=new RegExp("^"+I+"$(?!\\s)",R)),w&&(n=p.lastIndex),i=s(A,P?r:p,N),P?i?(i.input=_(i.input,k),i[0]=_(i[0],k),i.index=p.lastIndex,p.lastIndex+=i[0].length):p.lastIndex=0:w&&i&&(p.lastIndex=p.global?i.index+i[0].length:n),b&&i&&i.length>1&&s(g,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&T)for(i.groups=c=u(null),a=0;a<T.length;a++)c[(h=T[a])[0]]=i[h[1]];return i}),t.exports=m},67979:(t,e,r)=>{"use strict";var n=r(28551);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},58429:(t,e,r)=>{"use strict";var n=r(79039),i=r(24475).RegExp,s=n((function(){var t=i("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),a=s||n((function(){return!i("a","y").sticky})),o=s||n((function(){var t=i("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:o,MISSED_STICKY:a,UNSUPPORTED_Y:s}},83635:(t,e,r)=>{"use strict";var n=r(79039),i=r(24475).RegExp;t.exports=n((function(){var t=i(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))},18814:(t,e,r)=>{"use strict";var n=r(79039),i=r(24475).RegExp;t.exports=n((function(){var t=i("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},67750:(t,e,r)=>{"use strict";var n=r(64117),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},66119:(t,e,r)=>{"use strict";var n=r(25745),i=r(33392),s=n("keys");t.exports=function(t){return s[t]||(s[t]=i(t))}},77629:(t,e,r)=>{"use strict";var n=r(96395),i=r(24475),s=r(39433),a="__core-js_shared__",o=t.exports=i[a]||s(a,{});(o.versions||(o.versions=[])).push({version:"3.37.1",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},25745:(t,e,r)=>{"use strict";var n=r(77629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},68183:(t,e,r)=>{"use strict";var n=r(79504),i=r(91291),s=r(655),a=r(67750),o=n("".charAt),l=n("".charCodeAt),c=n("".slice),h=function(t){return function(e,r){var n,h,u=s(a(e)),d=i(r),p=u.length;return d<0||d>=p?t?"":void 0:(n=l(u,d))<55296||n>56319||d+1===p||(h=l(u,d+1))<56320||h>57343?t?o(u,d):n:t?c(u,d,d+2):h-56320+(n-55296<<10)+65536}};t.exports={codeAt:h(!1),charAt:h(!0)}},4495:(t,e,r)=>{"use strict";var n=r(77388),i=r(79039),s=r(24475).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!s(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},35610:(t,e,r)=>{"use strict";var n=r(91291),i=Math.max,s=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):s(r,e)}},25397:(t,e,r)=>{"use strict";var n=r(47055),i=r(67750);t.exports=function(t){return n(i(t))}},91291:(t,e,r)=>{"use strict";var n=r(80741);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},18014:(t,e,r)=>{"use strict";var n=r(91291),i=Math.min;t.exports=function(t){var e=n(t);return e>0?i(e,9007199254740991):0}},48981:(t,e,r)=>{"use strict";var n=r(67750),i=Object;t.exports=function(t){return i(n(t))}},72777:(t,e,r)=>{"use strict";var n=r(69565),i=r(20034),s=r(10757),a=r(55966),o=r(84270),l=r(78227),c=TypeError,h=l("toPrimitive");t.exports=function(t,e){if(!i(t)||s(t))return t;var r,l=a(t,h);if(l){if(void 0===e&&(e="default"),r=n(l,t,e),!i(r)||s(r))return r;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),o(t,e)}},56969:(t,e,r)=>{"use strict";var n=r(72777),i=r(10757);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},92140:(t,e,r)=>{"use strict";var n={};n[r(78227)("toStringTag")]="z",t.exports="[object z]"===String(n)},655:(t,e,r)=>{"use strict";var n=r(36955),i=String;t.exports=function(t){if("Symbol"===n(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},16823:t=>{"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},33392:(t,e,r)=>{"use strict";var n=r(79504),i=0,s=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++i+s,36)}},7040:(t,e,r)=>{"use strict";var n=r(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},48686:(t,e,r)=>{"use strict";var n=r(43724),i=r(79039);t.exports=n&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},58622:(t,e,r)=>{"use strict";var n=r(24475),i=r(94901),s=n.WeakMap;t.exports=i(s)&&/native code/.test(String(s))},78227:(t,e,r)=>{"use strict";var n=r(24475),i=r(25745),s=r(39297),a=r(33392),o=r(4495),l=r(7040),c=n.Symbol,h=i("wks"),u=l?c.for||c:c&&c.withoutSetter||a;t.exports=function(t){return s(h,t)||(h[t]=o&&s(c,t)?c[t]:u("Symbol."+t)),h[t]}},27495:(t,e,r)=>{"use strict";var n=r(46518),i=r(57323);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},25440:(t,e,r)=>{"use strict";var n=r(18745),i=r(69565),s=r(79504),a=r(89228),o=r(79039),l=r(28551),c=r(94901),h=r(64117),u=r(91291),d=r(18014),p=r(655),f=r(67750),g=r(57829),A=r(55966),m=r(2478),v=r(56682),y=r(78227)("replace"),E=Math.max,_=Math.min,w=s([].concat),C=s([].push),b=s("".indexOf),S=s("".slice),x="$0"==="a".replace(/./,"$0"),T=!!/./[y]&&""===/./[y]("a","$0");a("replace",(function(t,e,r){var s=T?"$":"$0";return[function(t,r){var n=f(this),s=h(t)?void 0:A(t,y);return s?i(s,t,n,r):i(e,p(n),t,r)},function(t,i){var a=l(this),o=p(t);if("string"==typeof i&&-1===b(i,s)&&-1===b(i,"$<")){var h=r(e,a,o,i);if(h.done)return h.value}var f=c(i);f||(i=p(i));var A,y=a.global;y&&(A=a.unicode,a.lastIndex=0);for(var x,T=[];null!==(x=v(a,o))&&(C(T,x),y);)""===p(x[0])&&(a.lastIndex=g(o,d(a.lastIndex),A));for(var P,R="",I=0,k=0;k<T.length;k++){for(var N,D=p((x=T[k])[0]),L=E(_(u(x.index),o.length),0),O=[],B=1;B<x.length;B++)C(O,void 0===(P=x[B])?P:String(P));var M=x.groups;if(f){var U=w([D],O,L,o);void 0!==M&&C(U,M),N=p(n(i,void 0,U))}else N=m(D,o,L,O,M,i);L>=I&&(R+=S(o,I,L)+N,I=L+D.length)}return R+S(o,I)}]}),!!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!x||T)},35810:(t,e,r)=>{"use strict";r.d(e,{Al:()=>L,H4:()=>N,Q$:()=>D,R3:()=>w,VL:()=>_,lJ:()=>I,pt:()=>C,ur:()=>H,v7:()=>M});var n=r(35947),i=r(21777),s=r(43627),a=r(71225),o=r(63814),l=r(36117),c=r(44719),h=r(82680),u=(r(87485),r(53334)),d=r(380),p=r(65606),f=r(96763);const g=(0,n.YK)().setApp("@nextcloud/files").detectUser().build();var A=(t=>(t[t.NONE=0]="NONE",t[t.CREATE=4]="CREATE",t[t.READ=1]="READ",t[t.UPDATE=2]="UPDATE",t[t.DELETE=8]="DELETE",t[t.SHARE=16]="SHARE",t[t.ALL=31]="ALL",t))(A||{});const m=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:creationdate","d:displayname","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],v={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},y=function(){return void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...m]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},E=function(){return void 0===window._nc_dav_namespaces&&(window._nc_dav_namespaces={...v}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},_=function(){return`<?xml version="1.0"?>\n\t\t<d:propfind ${E()}>\n\t\t\t<d:prop>\n\t\t\t\t${y()}\n\t\t\t</d:prop>\n\t\t</d:propfind>`},w=function(t){return`<?xml version="1.0" encoding="UTF-8"?>\n<d:searchrequest ${E()}\n\txmlns:ns="https://github.com/icewind1991/SearchDAV/ns">\n\t<d:basicsearch>\n\t\t<d:select>\n\t\t\t<d:prop>\n\t\t\t\t${y()}\n\t\t\t</d:prop>\n\t\t</d:select>\n\t\t<d:from>\n\t\t\t<d:scope>\n\t\t\t\t<d:href>/files/${(0,i.HW)()?.uid}/</d:href>\n\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t</d:scope>\n\t\t</d:from>\n\t\t<d:where>\n\t\t\t<d:and>\n\t\t\t\t<d:or>\n\t\t\t\t\t<d:not>\n\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t<d:getcontenttype/>\n\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t<d:literal>httpd/unix-directory</d:literal>\n\t\t\t\t\t\t</d:eq>\n\t\t\t\t\t</d:not>\n\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t<oc:size/>\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t<d:literal>0</d:literal>\n\t\t\t\t\t</d:eq>\n\t\t\t\t</d:or>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${t}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t</d:and>\n\t\t</d:where>\n\t\t<d:orderby>\n\t\t\t<d:order>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<d:getlastmodified/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:descending/>\n\t\t\t</d:order>\n\t\t</d:orderby>\n\t\t<d:limit>\n\t\t\t<d:nresults>100</d:nresults>\n\t\t\t<ns:firstresult>0</ns:firstresult>\n\t\t</d:limit>\n\t</d:basicsearch>\n</d:searchrequest>`};var C=(t=>(t.Folder="folder",t.File="file",t))(C||{});const b=function(t,e){return null!==t.match(e)},S=(t,e)=>{if(t.id&&"number"!=typeof t.id)throw new Error("Invalid id type of value");if(!t.source)throw new Error("Missing mandatory source");try{new URL(t.source)}catch(t){throw new Error("Invalid source format, source must be a valid URL")}if(!t.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(t.displayname&&"string"!=typeof t.displayname)throw new Error("Invalid displayname type");if(t.mtime&&!(t.mtime instanceof Date))throw new Error("Invalid mtime type");if(t.crtime&&!(t.crtime instanceof Date))throw new Error("Invalid crtime type");if(!t.mime||"string"!=typeof t.mime||!t.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in t&&"number"!=typeof t.size&&void 0!==t.size)throw new Error("Invalid size type");if("permissions"in t&&void 0!==t.permissions&&!("number"==typeof t.permissions&&t.permissions>=A.NONE&&t.permissions<=A.ALL))throw new Error("Invalid permissions");if(t.owner&&null!==t.owner&&"string"!=typeof t.owner)throw new Error("Invalid owner type");if(t.attributes&&"object"!=typeof t.attributes)throw new Error("Invalid attributes type");if(t.root&&"string"!=typeof t.root)throw new Error("Invalid root type");if(t.root&&!t.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(t.root&&!t.source.includes(t.root))throw new Error("Root must be part of the source");if(t.root&&b(t.source,e)){const r=t.source.match(e)[0];if(!t.source.includes((0,s.join)(r,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(x).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var x=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(x||{});class T{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(T.prototype)).filter((t=>"function"==typeof t[1].get&&"__proto__"!==t[0])).map((t=>t[0]));handler={set:(t,e,r)=>!this.readonlyAttributes.includes(e)&&Reflect.set(t,e,r),deleteProperty:(t,e)=>!this.readonlyAttributes.includes(e)&&Reflect.deleteProperty(t,e),get:(t,e,r)=>this.readonlyAttributes.includes(e)?(g.warn(`Accessing "Node.attributes.${e}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,e)):Reflect.get(t,e,r)};constructor(t,e){S(t,e||this._knownDavService),this._data={displayname:t.attributes?.displayname,...t,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(t.attributes??{}),e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+(0,a.O0)(this.source.slice(t.length))}get basename(){return(0,s.basename)(this.source)}get displayname(){return this._data.displayname||this.basename}set displayname(t){this._data.displayname=t}get extension(){return(0,s.extname)(this.source)}get dirname(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),r=this.root.replace(/\/$/,"");return(0,s.dirname)(t.slice(e+r.length)||"/")}const t=new URL(this.source);return(0,s.dirname)(t.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}set mtime(t){this._data.mtime=t}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(t){this.updateMtime(),this._data.size=t}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:A.NONE:A.READ}set permissions(t){this.updateMtime(),this._data.permissions=t}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return b(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,s.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),r=this.root.replace(/\/$/,"");return t.slice(e+r.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id}get status(){return this._data?.status}set status(t){this._data.status=t}move(t){S({...this._data,source:t},this._knownDavService);const e=this.basename;this._data.source=t,this.displayname===e&&this.basename!==e&&(this.displayname=this.basename),this.updateMtime()}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move((0,s.dirname)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(t){for(const[e,r]of Object.entries(t))try{void 0===r?delete this.attributes[e]:this.attributes[e]=r}catch(t){if(t instanceof TypeError)continue;throw t}}}class P extends T{get type(){return C.File}}class R extends T{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return C.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const I=(0,h.f)()?`/files/${(0,h.G)()}`:`/files/${(0,i.HW)()?.uid}`,k=function(){const t=(0,o.dC)("dav");return(0,h.f)()?t.replace("remote.php","public.php"):t}(),N=function(t=k,e={}){const r=(0,c.UU)(t,{headers:e});function n(t){r.setHeaders({...e,"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return(0,i.zo)(n),n((0,i.do)()),(0,c.Gu)().patch("fetch",((t,e)=>{const r=e.headers;return r?.method&&(e.method=r.method,delete r.method),fetch(t,e)})),r},D=(t,e="/",r=I)=>{const n=new AbortController;return new l.CancelablePromise((async(i,s,a)=>{a((()=>n.abort()));try{i((await t.getDirectoryContents(`${r}${e}`,{signal:n.signal,details:!0,data:`<?xml version="1.0"?>\n\t\t<oc:filter-files ${E()}>\n\t\t\t<d:prop>\n\t\t\t\t${y()}\n\t\t\t</d:prop>\n\t\t\t<oc:filter-rules>\n\t\t\t\t<oc:favorite>1</oc:favorite>\n\t\t\t</oc:filter-rules>\n\t\t</oc:filter-files>`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((t=>t.filename!==e)).map((t=>L(t,r))))}catch(t){s(t)}}))},L=function(t,e=I,r=k){let n=(0,i.HW)()?.uid;if((0,h.f)())n=n??"anonymous";else if(!n)throw new Error("No user id found");const s=t.props,a=function(t=""){let e=A.NONE;return t?((t.includes("C")||t.includes("K"))&&(e|=A.CREATE),t.includes("G")&&(e|=A.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=A.UPDATE),t.includes("D")&&(e|=A.DELETE),t.includes("R")&&(e|=A.SHARE),e):e}(s?.permissions),o=String(s?.["owner-id"]||n),l=s.fileid||0,c={id:l,source:`${r}${t.filename}`,mtime:new Date(Date.parse(t.lastmod)),mime:t.mime||"application/octet-stream",displayname:void 0!==s.displayname?String(s.displayname):void 0,size:s?.size||Number.parseInt(s.getcontentlength||"0"),status:l<0?x.FAILED:void 0,permissions:a,owner:o,root:e,attributes:{...t,...s,hasPreview:s?.["has-preview"]}};return delete c.attributes?.props,"file"===t.type?new P(c):new R(c)};Error;const O=["B","KB","MB","GB","TB","PB"],B=["B","KiB","MiB","GiB","TiB","PiB"];function M(t,e=!1,r=!1,n=!1){r=r&&!n,"string"==typeof t&&(t=Number(t));let i=t>0?Math.floor(Math.log(t)/Math.log(n?1e3:1024)):0;i=Math.min((r?B.length:O.length)-1,i);const s=r?B[i]:O[i];let a=(t/Math.pow(n?1e3:1024,i)).toFixed(1);return!0===e&&0===i?("0.0"!==a?"< 1 ":"0 ")+(r?B[1]:O[1]):(a=i<2?parseFloat(a).toFixed(0):parseFloat(a).toLocaleString((0,u.lO)()),a+" "+s)}function U(t){return t instanceof Date?t.toISOString():String(t)}function H(t,e={}){const r={sortingMode:"basename",sortingOrder:"asc",...e};return function(t,e,r){r=r??[];const n=(e=e??[t=>t]).map(((t,e)=>"asc"===(r[e]??"asc")?1:-1)),i=Intl.Collator([(0,u.Z0)(),(0,u.lO)()],{numeric:!0,usage:"sort"});return[...t].sort(((t,r)=>{for(const[s,a]of e.entries()){const e=i.compare(U(a(t)),U(a(r)));if(0!==e)return e*n[s]}return 0}))}(t,[...r.sortFavoritesFirst?[t=>1!==t.attributes?.favorite]:[],...r.sortFoldersFirst?[t=>"folder"!==t.type]:[],..."basename"!==r.sortingMode?[t=>t[r.sortingMode]]:[],t=>{return(e=t.attributes?.displayname||t.basename).lastIndexOf(".")>0?e.slice(0,e.lastIndexOf(".")):e;var e},t=>t.basename],[...r.sortFavoritesFirst?["asc"]:[],...r.sortFoldersFirst?["asc"]:[],..."mtime"===r.sortingMode?["asc"===r.sortingOrder?"desc":"asc"]:[],..."mtime"!==r.sortingMode&&"basename"!==r.sortingMode?[r.sortingOrder]:[],r.sortingOrder,r.sortingOrder])}var Y={};!function(t){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+r+"$");t.isExist=function(t){return void 0!==t},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,r){if(e){const n=Object.keys(e),i=n.length;for(let s=0;s<i;s++)t[n[s]]="strict"===r?[e[n[s]]]:e[n[s]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(t){return!(null==n.exec(t))},t.getAllMatches=function(t,e){const r=[];let n=e.exec(t);for(;n;){const i=[];i.startIndex=e.lastIndex-n[0].length;const s=n.length;for(let t=0;t<s;t++)i.push(n[t]);r.push(i),n=e.exec(t)}return r},t.nameRegexp=r}(Y);new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");var $={};const F={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t}};$.buildOptions=function(t){return Object.assign({},F,t)},$.defaultOptions=F,!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat),new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");var j={};function V(t,e,r){let n;const i={};for(let s=0;s<t.length;s++){const a=t[s],o=z(a);let l="";if(l=void 0===r?o:r+"."+o,o===e.textNodeName)void 0===n?n=a[o]:n+=""+a[o];else{if(void 0===o)continue;if(a[o]){let t=V(a[o],e,l);const r=W(t,e);a[":@"]?q(t,a[":@"],l,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==i[o]&&i.hasOwnProperty(o)?(Array.isArray(i[o])||(i[o]=[i[o]]),i[o].push(t)):e.isArray(o,l,r)?i[o]=[t]:i[o]=t}}}return"string"==typeof n?n.length>0&&(i[e.textNodeName]=n):void 0!==n&&(i[e.textNodeName]=n),i}function z(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const r=e[t];if(":@"!==r)return r}}function q(t,e,r,n){if(e){const i=Object.keys(e),s=i.length;for(let a=0;a<s;a++){const s=i[a];n.isArray(s,r+"."+s,!0,!0)?t[s]=[e[s]]:t[s]=e[s]}}}function W(t,e){const{textNodeName:r}=e,n=Object.keys(t).length;return 0===n||!(1!==n||!t[r]&&"boolean"!=typeof t[r]&&0!==t[r])}j.prettify=function(t,e){return V(t,e)};const{buildOptions:G}=$,{prettify:K}=j;function X(t,e,r,n){let i="",s=!1;for(let a=0;a<t.length;a++){const o=t[a],l=Z(o);if(void 0===l)continue;let c="";if(c=0===r.length?l:`${r}.${l}`,l===e.textNodeName){let t=o[l];J(c,e)||(t=e.tagValueProcessor(l,t),t=tt(t,e)),s&&(i+=n),i+=t,s=!1;continue}if(l===e.cdataPropName){s&&(i+=n),i+=`<![CDATA[${o[l][0][e.textNodeName]}]]>`,s=!1;continue}if(l===e.commentPropName){i+=n+`\x3c!--${o[l][0][e.textNodeName]}--\x3e`,s=!0;continue}if("?"===l[0]){const t=Q(o[":@"],e),r="?xml"===l?"":n;let a=o[l][0][e.textNodeName];a=0!==a.length?" "+a:"",i+=r+`<${l}${a}${t}?>`,s=!0;continue}let h=n;""!==h&&(h+=e.indentBy);const u=n+`<${l}${Q(o[":@"],e)}`,d=X(o[l],e,c,h);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?i+=u+">":i+=u+"/>":d&&0!==d.length||!e.suppressEmptyNode?d&&d.endsWith(">")?i+=u+`>${d}${n}</${l}>`:(i+=u+">",d&&""!==n&&(d.includes("/>")||d.includes("</"))?i+=n+e.indentBy+d+n:i+=d,i+=`</${l}>`):i+=u+"/>",s=!0}return i}function Z(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];if(t.hasOwnProperty(n)&&":@"!==n)return n}}function Q(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let i=e.attributeValueProcessor(n,t[n]);i=tt(i,e),!0===i&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${i}"`}return r}function J(t,e){let r=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+r)return!0;return!1}function tt(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){const n=e.entities[r];t=t.replace(n.regex,n.val)}return t}const et=function(t,e){let r="";return e.format&&e.indentBy.length>0&&(r="\n"),X(t,e,"",r)},rt={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function nt(t){this.options=Object.assign({},rt,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=at),this.processTextOrObjNode=it,this.options.format?(this.indentate=st,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function it(t,e,r){const n=this.j2x(t,r+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,n.attrStr,r):this.buildObjectNode(n.val,e,n.attrStr,r)}function st(t){return this.options.indentBy.repeat(t)}function at(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}nt.prototype.build=function(t){return this.options.preserveOrder?et(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},nt.prototype.j2x=function(t,e){let r="",n="";for(let i in t)if(Object.prototype.hasOwnProperty.call(t,i))if(void 0===t[i])this.isAttribute(i)&&(n+="");else if(null===t[i])this.isAttribute(i)?n+="":"?"===i[0]?n+=this.indentate(e)+"<"+i+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+i+"/"+this.tagEndChar;else if(t[i]instanceof Date)n+=this.buildTextValNode(t[i],i,"",e);else if("object"!=typeof t[i]){const s=this.isAttribute(i);if(s)r+=this.buildAttrPairStr(s,""+t[i]);else if(i===this.options.textNodeName){let e=this.options.tagValueProcessor(i,""+t[i]);n+=this.replaceEntitiesValue(e)}else n+=this.buildTextValNode(t[i],i,"",e)}else if(Array.isArray(t[i])){const r=t[i].length;let s="";for(let a=0;a<r;a++){const r=t[i][a];void 0===r||(null===r?"?"===i[0]?n+=this.indentate(e)+"<"+i+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+i+"/"+this.tagEndChar:"object"==typeof r?this.options.oneListGroup?s+=this.j2x(r,e+1).val:s+=this.processTextOrObjNode(r,i,e):s+=this.buildTextValNode(r,i,"",e))}this.options.oneListGroup&&(s=this.buildObjectNode(s,i,"",e)),n+=s}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const e=Object.keys(t[i]),n=e.length;for(let s=0;s<n;s++)r+=this.buildAttrPairStr(e[s],""+t[i][e[s]])}else n+=this.processTextOrObjNode(t[i],i,e);return{attrStr:r,val:n}},nt.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},nt.prototype.buildObjectNode=function(t,e,r,n){if(""===t)return"?"===e[0]?this.indentate(n)+"<"+e+r+"?"+this.tagEndChar:this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar;{let i="</"+e+this.tagEndChar,s="";return"?"===e[0]&&(s="?",i=""),!r&&""!==r||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===s.length?this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(n)+"<"+e+r+s+this.tagEndChar+t+this.indentate(n)+i:this.indentate(n)+"<"+e+r+s+">"+t+i}},nt.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},nt.prototype.buildTextValNode=function(t,e,r,n){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(e,t);return i=this.replaceEntitiesValue(i),""===i?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+i+"</"+e+this.tagEndChar}},nt.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const r=this.options.entities[e];t=t.replace(r.regex,r.val)}return t};var ot="object"==typeof p&&p.env&&p.env.NODE_DEBUG&&/\bsemver\b/i.test(p.env.NODE_DEBUG)?(...t)=>f.error("SEMVER",...t):()=>{},lt={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},ct={exports:{}};!function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=lt,s=ot,a=(e=t.exports={}).re=[],o=e.safeRe=[],l=e.src=[],c=e.t={};let h=0;const u="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",i],[u,n]],p=(t,e,r)=>{const n=(t=>{for(const[e,r]of d)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t})(e),i=h++;s(t,i,e),c[t]=i,l[i]=e,a[i]=new RegExp(e,r?"g":void 0),o[i]=new RegExp(n,r?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u}*`),p("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${u}+`),p("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),p("FULL",`^${l[c.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),p("LOOSE",`^${l[c.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),p("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),p("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[c.COERCE],!0),p("COERCERTLFULL",l[c.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",p("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",p("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(ct,ct.exports);var ht=ct.exports;Object.freeze({loose:!0}),Object.freeze({});const ut=/^[0-9]+$/,dt=(t,e)=>{const r=ut.test(t),n=ut.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1};var pt={compareIdentifiers:dt,rcompareIdentifiers:(t,e)=>dt(e,t)};const{MAX_LENGTH:ft,MAX_SAFE_INTEGER:gt}=lt,{safeRe:At,t:mt}=ht,{compareIdentifiers:vt}=pt;d.m}}]);
- //# sourceMappingURL=2351-2351.js.map?v=1cda44e8834cae7fbcc8
|