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

systemtags.js 62KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=102)}([function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n(12))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";t.__esModule=!0,t.extend=s,t.indexOf=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},t.escapeExpression=function(e){if("string"!=typeof e){if(e&&e.toHTML)return e.toHTML();if(null==e)return"";if(!e)return e+"";e=""+e}if(!i.test(e))return e;return e.replace(o,a)},t.isEmpty=function(e){return!e&&0!==e||!(!u(e)||0!==e.length)},t.createFrame=function(e){var t=s({},e);return t._parent=e,t},t.blockParams=function(e,t){return e.path=t,e},t.appendContextPath=function(e,t){return(e?e+".":"")+t};var r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},o=/[&<>"'`=]/g,i=/[&<>"'`=]/;function a(e){return r[e]}function s(e){for(var t=1;t<arguments.length;t++)for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}var l=Object.prototype.toString;t.toString=l;var c=function(e){return"function"==typeof e};c(/x/)&&(t.isFunction=c=function(e){return"function"==typeof e&&"[object Function]"===l.call(e)}),t.isFunction=c;var u=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===l.call(e)};t.isArray=u},function(e,t,n){"use strict";t.__esModule=!0;var r=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function o(e,t){var n=t&&t.loc,i=void 0,a=void 0,s=void 0,l=void 0;n&&(i=n.start.line,a=n.end.line,s=n.start.column,l=n.end.column,e+=" - "+i+":"+s);for(var c=Error.prototype.constructor.call(this,e),u=0;u<r.length;u++)this[r[u]]=c[r[u]];Error.captureStackTrace&&Error.captureStackTrace(this,o);try{n&&(this.lineNumber=i,this.endLineNumber=a,Object.defineProperty?(Object.defineProperty(this,"column",{value:s,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:l,enumerable:!0})):(this.column=s,this.endColumn=l))}catch(e){}}o.prototype=new Error,t.default=o,e.exports=t.default},function(e,t,n){var r=n(32),o={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return o.call(r(e),t)}},function(e,t,n){var r=n(7);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){var r=n(1);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(0),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e]):r[e]&&r[e][t]}},function(e,t,n){var r=n(6),o=n(19),i=n(27);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(60),o=n(8);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(9),o=n(30);e.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return"function"==typeof t&&Object(e)instanceof t}},function(e,t,n){var r=n(0),o=n(16),i=n(4),a=n(33),s=n(31),l=n(30),c=o("wks"),u=r.Symbol,f=l?u:u&&u.withoutSetter||a;e.exports=function(e){return i(c,e)&&(s||"string"==typeof c[e])||(s&&i(u,e)?c[e]=u[e]:c[e]=f("Symbol."+e)),c[e]}},function(e,t,n){var r=n(65),o=n(17);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.17.3",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(0),o=n(18),i=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},function(e,t,n){var r=n(0);e.exports=function(e,t){try{Object.defineProperty(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(6),o=n(34),i=n(5),a=n(29),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(i(e),t=a(t),i(n),o)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t){e.exports={}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){"use strict";var r,o,i=n(23),a=n(74),s=n(75),l=n(16),c=n(76),u=n(38).get,f=n(80),p=n(81),d=RegExp.prototype.exec,h=l("native-string-replace",String.prototype.replace),m=d,g=(r=/a/,o=/b*/g,d.call(r,"a"),d.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),v=s.UNSUPPORTED_Y||s.BROKEN_CARET,y=void 0!==/()??/.exec("")[1];(g||y||v||f||p)&&(m=function(e){var t,n,r,o,s,l,f,p=this,b=u(p),A=i(e),x=b.raw;if(x)return x.lastIndex=p.lastIndex,t=m.call(x,A),p.lastIndex=x.lastIndex,t;var _=b.groups,w=v&&p.sticky,C=a.call(p),O=p.source,S=0,k=A;if(w&&(-1===(C=C.replace("y","")).indexOf("g")&&(C+="g"),k=A.slice(p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==A.charAt(p.lastIndex-1))&&(O="(?: "+O+")",k=" "+k,S++),n=new RegExp("^(?:"+O+")",C)),y&&(n=new RegExp("^"+O+"$(?!\\s)",C)),g&&(r=p.lastIndex),o=d.call(w?n:p,k),w?o?(o.input=o.input.slice(S),o[0]=o[0].slice(S),o.index=p.lastIndex,p.lastIndex+=o[0].length):p.lastIndex=0:g&&o&&(p.lastIndex=p.global?o.index+o[0].length:r),y&&o&&o.length>1&&h.call(o[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(o[s]=void 0)})),o&&_)for(o.groups=l=c(null),s=0;s<_.length;s++)l[(f=_[s])[0]]=o[f[1]];return o}),e.exports=m},function(e,t,n){var r=n(14);e.exports=function(e){if(r(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)}},function(e,t,n){e.exports=n(87).default},function(e,t,n){"use strict";var r=n(52),o=n.n(r),i=n(53),a=n.n(i)()(o.a);a.push([e.i,".systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemTagsInfoView,.systemtags-select2-container{width:100%}.systemTagsInfoView .select2-choices,.systemtags-select2-container .select2-choices{flex-wrap:nowrap !important;max-height:44px}.systemTagsInfoView .select2-choices .select2-search-choice.select2-locked .label,.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}","",{version:3,sources:["webpack://./core/css/systemtags.scss"],names:[],mappings:"AAcE,8DACC,iBAAA,CACA,gBAAA,CACA,gBAAA,CACA,WAAA,CAED,iFACC,YAAA,CAGF,gFACC,kBAAA,CAED,yDACC,oBAAA,CACA,UAAA,CACA,gEACC,WAAA,CAGF,iDACC,iBAAA,CACA,SAAA,CAED,qDACC,oBAAA,CACA,uBAAA,CACA,QAAA,CACA,iBAAA,CACA,2DACC,oBAAA,CACA,WAAA,CACA,uBAAA,CAGF,oCACC,SAAA,CACA,oBAAA,CACA,eAAA,CACA,sBAAA,CACA,2CACC,YAAA,CAGF,kCACC,gBAAA,CAED,8CACC,oBAAA,CACA,WAAA,CACA,UAAA,CAED,mDACC,WAAA,CAIF,kDAEC,UAAA,CAEA,oFACC,2BAAA,CACA,eAAA,CAGD,8KACC,UAAA,CAIF,6EACC,WAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2016, John Molakvoæ <skjnldsv@protonmail.com>\n * @copyright Copyright (c) 2016, Robin Appelman <robin@icewind.nl>\n * @copyright Copyright (c) 2016, Jan-Christoph Borchardt <hey@jancborchardt.net>\n * @copyright Copyright (c) 2016, Vincent Petry <pvince81@owncloud.com>\n * @copyright Copyright (c) 2016, Erik Pellikka <erik@pellikka.org>\n * @copyright Copyright (c) 2015, Vincent Petry <pvince81@owncloud.com>\n *\n * @license GNU AGPL version 3 or any later version\n *\n */\n\n.systemtags-select2-dropdown {\n\t.select2-result-label {\n\t\t.checkmark {\n\t\t\tvisibility: hidden;\n\t\t\tmargin-left: -5px;\n\t\t\tmargin-right: 5px;\n\t\t\tpadding: 4px;\n\t\t}\n\t\t.new-item .systemtags-actions {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\t.select2-selected .select2-result-label .checkmark {\n\t\tvisibility: visible;\n\t}\n\t.select2-result-label .icon {\n\t\tdisplay: inline-block;\n\t\topacity: .5;\n\t\t&.rename {\n\t\t\tpadding: 4px;\n\t\t}\n\t}\n\t.systemtags-actions {\n\t\tposition: absolute;\n\t\tright: 5px;\n\t}\n\t.systemtags-rename-form {\n\t\tdisplay: inline-block;\n\t\twidth: calc(100% - 20px);\n\t\ttop: -6px;\n\t\tposition: relative;\n\t\tinput {\n\t\t\tdisplay: inline-block;\n\t\t\theight: 30px;\n\t\t\twidth: calc(100% - 40px);\n\t\t}\n\t}\n\t.label {\n\t\twidth: 85%;\n\t\tdisplay: inline-block;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\t&.hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\tspan {\n\t\tline-height: 25px;\n\t}\n\t.systemtags-item {\n\t\tdisplay: inline-block;\n\t\theight: 25px;\n\t\twidth: 100%;\n\t}\n\t.select2-result-label {\n\t\theight: 25px;\n\t}\n}\n\n.systemTagsInfoView,\n.systemtags-select2-container {\n\twidth: 100%;\n\n\t.select2-choices {\n\t\tflex-wrap: nowrap !important;\n\t\tmax-height: 44px;\n\t}\n\n\t.select2-choices .select2-search-choice.select2-locked .label {\n\t\topacity: 0.5;\n\t}\n}\n\n#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result {\n\tpadding: 5px;\n}\n"],sourceRoot:""}]),t.a=a},function(e,t,n){var r=n(6),o=n(59),i=n(27),a=n(13),s=n(29),l=n(4),c=n(34),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=a(e),t=s(t),c)try{return u(e,t)}catch(e){}if(l(e,t))return i(!o.f.call(e,t),e[t])}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(61),o=n(14);e.exports=function(e){var t=r(e,"string");return o(t)?t:String(t)}},function(e,t,n){var r=n(31);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(62),o=n(1);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(e,t,n){var r=n(8);e.exports=function(e){return Object(r(e))}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){var r=n(6),o=n(1),i=n(35);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(0),o=n(7),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var r=n(0),o=n(10),i=n(4),a=n(18),s=n(37),l=n(38),c=l.get,u=l.enforce,f=String(String).split("String");(e.exports=function(e,t,n,s){var l,c=!!s&&!!s.unsafe,p=!!s&&!!s.enumerable,d=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||i(n,"name")||o(n,"name",t),(l=u(n)).source||(l.source=f.join("string"==typeof t?t:""))),e!==r?(c?!d&&e[t]&&(p=!0):delete e[t],p?e[t]=n:o(e,t,n)):p?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||s(this)}))},function(e,t,n){var r=n(17),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return o.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r,o,i,a=n(66),s=n(0),l=n(7),c=n(10),u=n(4),f=n(17),p=n(39),d=n(20),h=s.WeakMap;if(a||f.state){var m=f.state||(f.state=new h),g=m.get,v=m.has,y=m.set;r=function(e,t){if(v.call(m,e))throw new TypeError("Object already initialized");return t.facade=e,y.call(m,e,t),t},o=function(e){return g.call(m,e)||{}},i=function(e){return v.call(m,e)}}else{var b=p("state");d[b]=!0,r=function(e,t){if(u(e,b))throw new TypeError("Object already initialized");return t.facade=e,c(e,b,t),t},o=function(e){return u(e,b)?e[b]:{}},i=function(e){return u(e,b)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(16),o=n(33),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t,n){var r=n(4),o=n(13),i=n(70).indexOf,a=n(20);e.exports=function(e,t){var n,s=o(e),l=0,c=[];for(n in s)!r(a,n)&&r(s,n)&&c.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~i(c,n)||c.push(n));return c}},function(e,t,n){var r=n(11),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.HandlebarsEnvironment=u;var o=n(2),i=r(n(3)),a=n(43),s=n(95),l=r(n(44)),c=n(45);t.VERSION="4.7.7";t.COMPILER_REVISION=8;t.LAST_COMPATIBLE_COMPILER_REVISION=7;t.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};function u(e,t,n){this.helpers=e||{},this.partials=t||{},this.decorators=n||{},a.registerDefaultHelpers(this),s.registerDefaultDecorators(this)}u.prototype={constructor:u,logger:l.default,log:l.default.log,registerHelper:function(e,t){if("[object Object]"===o.toString.call(e)){if(t)throw new i.default("Arg not supported with multiple helpers");o.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if("[object Object]"===o.toString.call(e))o.extend(this.partials,e);else{if(void 0===t)throw new i.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if("[object Object]"===o.toString.call(e)){if(t)throw new i.default("Arg not supported with multiple decorators");o.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){c.resetLoggedProperties()}};var f=l.default.log;t.log=f,t.createFrame=o.createFrame,t.logger=l.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.registerDefaultHelpers=function(e){o.default(e),i.default(e),a.default(e),s.default(e),l.default(e),c.default(e),u.default(e)},t.moveHelperToHooks=function(e,t,n){e.helpers[t]&&(e.hooks[t]=e.helpers[t],n||delete e.helpers[t])};var o=r(n(88)),i=r(n(89)),a=r(n(90)),s=r(n(91)),l=r(n(92)),c=r(n(93)),u=r(n(94))},function(e,t,n){"use strict";t.__esModule=!0;var r=n(2),o={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if("string"==typeof e){var t=r.indexOf(o.methodMap,e.toLowerCase());e=t>=0?t:parseInt(e,10)}return e},log:function(e){if(e=o.lookupLevel(e),"undefined"!=typeof console&&o.lookupLevel(o.level)<=e){var t=o.methodMap[e];console[t]||(t="log");for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];console[t].apply(console,r)}}};t.default=o,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.createProtoAccessControl=function(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var n=Object.create(null);return n.__proto__=!1,{properties:{whitelist:r.createNewLookupObject(n,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:r.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}},t.resultIsAllowed=function(e,t,n){return a("function"==typeof e?t.methods:t.properties,n)},t.resetLoggedProperties=function(){Object.keys(i).forEach((function(e){delete i[e]}))};var r=n(97),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(44)),i=Object.create(null);function a(e,t){return void 0!==e.whitelist[t]?!0===e.whitelist[t]:void 0!==e.defaultValue?e.defaultValue:(function(e){!0!==i[e]&&(i[e]=!0,o.log("error",'Handlebars: Access has been denied to resolve the property "'+e+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}(t),!1)}},function(e,t,n){"use strict";
  2. /*!
  3. * escape-html
  4. * Copyright(c) 2012-2013 TJ Holowaychuk
  5. * Copyright(c) 2015 Andreas Lubbe
  6. * Copyright(c) 2015 Tiancheng "Timothy" Gu
  7. * MIT Licensed
  8. */var r=/["'&<>]/;e.exports=function(e){var t,n=""+e,o=r.exec(n);if(!o)return n;var i="",a=0,s=0;for(a=o.index;a<n.length;a++){switch(n.charCodeAt(a)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#39;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}s!==a&&(i+=n.substring(s,a)),s=a+1,i+=t}return s!==a?i+n.substring(s,a):i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRootUrl=t.generateFilePath=t.imagePath=t.generateUrl=t.generateOcsUrl=t.generateRemoteUrl=t.linkTo=void 0,n(55);t.linkTo=(e,t)=>o(e,"",t);t.generateRemoteUrl=e=>window.location.protocol+"//"+window.location.host+(e=>i()+"/remote.php/"+e)(e);t.generateOcsUrl=(e,t,n)=>{const o=1===Object.assign({ocsVersion:2},n||{}).ocsVersion?1:2;return window.location.protocol+"//"+window.location.host+i()+"/ocs/v"+o+".php"+r(e,t,n)};const r=(e,t,n)=>{const r=Object.assign({escape:!0},n||{});return"/"!==e.charAt(0)&&(e="/"+e),o=(o=t||{})||{},e.replace(/{([^{}]*)}/g,(function(e,t){var n=o[t];return r.escape?"string"==typeof n||"number"==typeof n?encodeURIComponent(n.toString()):encodeURIComponent(e):"string"==typeof n||"number"==typeof n?n.toString():e}));var o};t.generateUrl=(e,t,n)=>{const o=Object.assign({noRewrite:!1},n||{});return!0!==OC.config.modRewriteWorking||o.noRewrite?i()+"/index.php"+r(e,t,n):i()+r(e,t,n)};t.imagePath=(e,t)=>-1===t.indexOf(".")?o(e,"img",t+".svg"):o(e,"img",t);const o=(e,t,n)=>{const r=-1!==OC.coreApps.indexOf(e);let o=i();return"php"!==n.substring(n.length-3)||r?"php"===n.substring(n.length-3)||r?(o+="settings"!==e&&"core"!==e&&"search"!==e||"ajax"!==t?"/":"/index.php/",r||(o+="apps/"),""!==e&&(o+=e+="/"),t&&(o+=t+"/"),o+=n):(o=OC.appswebroots[e],t&&(o+="/"+t+"/"),"/"!==o.substring(o.length-1)&&(o+="/"),o+=n):(o+="/index.php/apps/"+e,"index.php"!==n&&(o+="/",t&&(o+=encodeURI(t+"/")),o+=n)),o};t.generateFilePath=o;const i=()=>OC.webroot;t.getRootUrl=i},function(e,t,n){var r=n(24);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return" new-item"},3:function(e,t,n,r,o){var i,a,s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t<span class="label">'+(null!=(i="function"==typeof(a=null!=(a=s(n,"tagMarkup")||(null!=t?s(t,"tagMarkup"):t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"tagMarkup",hash:{},data:o,loc:{start:{line:4,column:22},end:{line:4,column:37}}}):a)?i:"")+"</span>\n"},5:function(e,t,n,r,o){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t<span class="label">'+e.escapeExpression("function"==typeof(i=null!=(i=a(n,"name")||(null!=t?a(t,"name"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o,loc:{start:{line:6,column:22},end:{line:6,column:30}}}):i)+"</span>\n"},7:function(e,t,n,r,o){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t<span class="systemtags-actions">\n\t\t\t<a href="#" class="rename icon icon-rename" title="'+e.escapeExpression("function"==typeof(i=null!=(i=a(n,"renameTooltip")||(null!=t?a(t,"renameTooltip"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"renameTooltip",hash:{},data:o,loc:{start:{line:10,column:54},end:{line:10,column:71}}}):i)+'"></a>\n\t\t</span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i,a,s,l=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,u=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},f='<span class="systemtags-item'+(null!=(i=u(n,"if").call(l,null!=t?u(t,"isNew"):t,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:28},end:{line:1,column:57}}}))?i:"")+'" data-id="'+e.escapeExpression("function"==typeof(a=null!=(a=u(n,"id")||(null!=t?u(t,"id"):t))?a:c)?a.call(l,{name:"id",hash:{},data:o,loc:{start:{line:1,column:68},end:{line:1,column:74}}}):a)+'">\n<span class="checkmark icon icon-checkmark"></span>\n'+(null!=(i=u(n,"if").call(l,null!=t?u(t,"isAdmin"):t,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.program(5,o,0),data:o,loc:{start:{line:3,column:1},end:{line:7,column:8}}}))?i:"");return a=null!=(a=u(n,"allowActions")||(null!=t?u(t,"allowActions"):t))?a:c,s={name:"allowActions",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:8,column:1},end:{line:12,column:18}}},i="function"==typeof a?a.call(l,s):a,u(n,"allowActions")||(i=e.hooks.blockHelperMissing.call(t,i,s)),null!=i&&(f+=i),f+"</span>\n"},useData:!0})},function(e,t,n){var r=n(24);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t<a href="#" class="delete icon icon-delete" title="'+e.escapeExpression("function"==typeof(i=null!=(i=a(n,"deleteTooltip")||(null!=t?a(t,"deleteTooltip"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"deleteTooltip",hash:{},data:o,loc:{start:{line:5,column:53},end:{line:5,column:70}}}):i)+'"></a>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i,a,s=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,c=e.escapeExpression,u=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'<form class="systemtags-rename-form">\n\t <label class="hidden-visually" for="'+c("function"==typeof(a=null!=(a=u(n,"cid")||(null!=t?u(t,"cid"):t))?a:l)?a.call(s,{name:"cid",hash:{},data:o,loc:{start:{line:2,column:38},end:{line:2,column:45}}}):a)+'-rename-input">'+c("function"==typeof(a=null!=(a=u(n,"renameLabel")||(null!=t?u(t,"renameLabel"):t))?a:l)?a.call(s,{name:"renameLabel",hash:{},data:o,loc:{start:{line:2,column:60},end:{line:2,column:75}}}):a)+'</label>\n\t<input id="'+c("function"==typeof(a=null!=(a=u(n,"cid")||(null!=t?u(t,"cid"):t))?a:l)?a.call(s,{name:"cid",hash:{},data:o,loc:{start:{line:3,column:12},end:{line:3,column:19}}}):a)+'-rename-input" type="text" value="'+c("function"==typeof(a=null!=(a=u(n,"name")||(null!=t?u(t,"name"):t))?a:l)?a.call(s,{name:"name",hash:{},data:o,loc:{start:{line:3,column:53},end:{line:3,column:61}}}):a)+'">\n'+(null!=(i=u(n,"if").call(s,null!=t?u(t,"isAdmin"):t,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:4,column:1},end:{line:6,column:8}}}))?i:"")+"</form>\n"},useData:!0})},function(e,t,n){var r=n(24);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i,a,s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t<span class="label">'+(null!=(i="function"==typeof(a=null!=(a=s(n,"tagMarkup")||(null!=t?s(t,"tagMarkup"):t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"tagMarkup",hash:{},data:o,loc:{start:{line:2,column:21},end:{line:2,column:36}}}):a)?i:"")+"</span>\n"},3:function(e,t,n,r,o){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t<span class="label">'+e.escapeExpression("function"==typeof(i=null!=(i=a(n,"name")||(null!=t?a(t,"name"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o,loc:{start:{line:4,column:21},end:{line:4,column:29}}}):i)+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(i=a(n,"if").call(null!=t?t:e.nullContext||{},null!=t?a(t,"isAdmin"):t,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?i:""},useData:!0})},function(e,t,n){"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function s(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},r=[],o=0;o<e.length;o++){var i=e[o],l=t.base?i[0]+t.base:i[0],c=n[l]||0,u="".concat(l," ").concat(c);n[l]=c+1;var f=s(u),p={css:i[1],media:i[2],sourceMap:i[3]};-1!==f?(a[f].references++,a[f].updater(p)):a.push({identifier:u,updater:g(p,t),references:1}),r.push(u)}return r}function c(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var u,f=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function p(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=f(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function d(e,t,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var h=null,m=0;function g(e,t){var n,r,o;if(t.singleton){var i=m++;n=h||(h=c(t)),r=p.bind(null,n,i,!1),o=p.bind(null,n,i,!0)}else n=c(t),r=d.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=s(n[r]);a[o].references--}for(var i=l(e,t),c=0;c<n.length;c++){var u=s(n[c]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}n=i}}}},function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}e.exports=function(e){var t=r(e,4),n=t[1],o=t[3];if(!o)return n;if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),a="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),s="/*# ".concat(a," */"),l=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[n].concat(l).concat([s]).join("\n")}return[n].join("\n")}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);r&&o[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t){
  9. /**
  10. * Copyright (c) 2015
  11. *
  12. * @author John Molakvoæ <skjnldsv@protonmail.com>
  13. * @author Michael Jobst <mjobst+github@tecratech.de>
  14. * @author Roeland Jago Douma <roeland@famdouma.nl>
  15. * @author Vincent Petry <vincent@nextcloud.com>
  16. *
  17. * @license GNU AGPL version 3 or any later version
  18. *
  19. * This program is free software: you can redistribute it and/or modify
  20. * it under the terms of the GNU Affero General Public License as
  21. * published by the Free Software Foundation, either version 3 of the
  22. * License, or (at your option) any later version.
  23. *
  24. * This program is distributed in the hope that it will be useful,
  25. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  26. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  27. * GNU Affero General Public License for more details.
  28. *
  29. * You should have received a copy of the GNU Affero General Public License
  30. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  31. *
  32. */
  33. !function(e){_.extend(e.Files.Client,{PROPERTY_FILEID:"{"+e.Files.Client.NS_OWNCLOUD+"}id",PROPERTY_CAN_ASSIGN:"{"+e.Files.Client.NS_OWNCLOUD+"}can-assign",PROPERTY_DISPLAYNAME:"{"+e.Files.Client.NS_OWNCLOUD+"}display-name",PROPERTY_USERVISIBLE:"{"+e.Files.Client.NS_OWNCLOUD+"}user-visible",PROPERTY_USERASSIGNABLE:"{"+e.Files.Client.NS_OWNCLOUD+"}user-assignable"});var t=e.Backbone.Model.extend({sync:e.Backbone.davSync,defaults:{userVisible:!0,userAssignable:!0,canAssign:!0},davProperties:{id:e.Files.Client.PROPERTY_FILEID,name:e.Files.Client.PROPERTY_DISPLAYNAME,userVisible:e.Files.Client.PROPERTY_USERVISIBLE,userAssignable:e.Files.Client.PROPERTY_USERASSIGNABLE,canAssign:e.Files.Client.PROPERTY_CAN_ASSIGN},parse:function(e){return{id:e.id,name:e.name,userVisible:!0===e.userVisible||"true"===e.userVisible,userAssignable:!0===e.userAssignable||"true"===e.userAssignable,canAssign:!0===e.canAssign||"true"===e.canAssign}}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagModel=t}(OC)},function(e,t,n){"use strict";var r=n(56),o=n(1),i=n(5),a=n(11),s=n(41),l=n(23),c=n(8),u=n(82),f=n(84),p=n(85),d=n(15)("replace"),h=Math.max,m=Math.min,g="$0"==="a".replace(/./,"$0"),v=!!/./[d]&&""===/./[d]("a","$0");r("replace",(function(e,t,n){var r=v?"$":"$0";return[function(e,n){var r=c(this),o=null==e?void 0:e[d];return void 0!==o?o.call(e,r,n):t.call(l(r),e,n)},function(e,o){var c=i(this),d=l(e);if("string"==typeof o&&-1===o.indexOf(r)&&-1===o.indexOf("$<")){var g=n(t,c,d,o);if(g.done)return g.value}var v="function"==typeof o;v||(o=l(o));var y=c.global;if(y){var b=c.unicode;c.lastIndex=0}for(var A=[];;){var x=p(c,d);if(null===x)break;if(A.push(x),!y)break;""===l(x[0])&&(c.lastIndex=u(d,s(c.lastIndex),b))}for(var _,w="",C=0,O=0;O<A.length;O++){x=A[O];for(var S=l(x[0]),k=h(m(a(x.index),d.length),0),T=[],P=1;P<x.length;P++)T.push(void 0===(_=x[P])?_:String(_));var j=x.groups;if(v){var E=[S].concat(T,k,d);void 0!==j&&E.push(j);var M=l(o.apply(void 0,E))}else M=f(S,d,k,T,j,o);k>=C&&(w+=d.slice(C,k)+M,C=k+S.length)}return w+d.slice(C)}]}),!!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!g||v)},function(e,t,n){"use strict";n(57);var r=n(36),o=n(22),i=n(1),a=n(15),s=n(10),l=a("species"),c=RegExp.prototype;e.exports=function(e,t,n,u){var f=a(e),p=!i((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),d=p&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return t=!0,null},n[f](""),!t}));if(!p||!d||n){var h=/./[f],m=t(f,""[e],(function(e,t,n,r,i){var a=t.exec;return a===o||a===c.exec?p&&!i?{done:!0,value:h.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}));r(String.prototype,e,m[0]),r(c,f,m[1])}u&&s(c[f],"sham",!0)}},function(e,t,n){"use strict";var r=n(58),o=n(22);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(e,t,n){var r=n(0),o=n(26).f,i=n(10),a=n(36),s=n(18),l=n(67),c=n(73);e.exports=function(e,t){var n,u,f,p,d,h=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[h]||s(h,{}):(r[h]||{}).prototype)for(u in t){if(p=t[u],f=e.noTargetGet?(d=o(n,u))&&d.value:n[u],!c(m?u:h+(g?".":"#")+u,e.forced)&&void 0!==f){if(typeof p==typeof f)continue;l(p,f)}(e.sham||f&&f.sham)&&i(p,"sham",!0),a(n,u,p,e)}}},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(1),o=n(28),i="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},function(e,t,n){var r=n(7),o=n(14),i=n(64),a=n(15)("toPrimitive");e.exports=function(e,t){if(!r(e)||o(e))return e;var n,s=e[a];if(void 0!==s){if(void 0===t&&(t="default"),n=s.call(e,t),!r(n)||o(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),i(e,t)}},function(e,t,n){var r,o,i=n(0),a=n(63),s=i.process,l=i.Deno,c=s&&s.versions||l&&l.version,u=c&&c.v8;u?o=(r=u.split("."))[0]<4?1:r[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},function(e,t,n){var r=n(9);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(7);e.exports=function(e,t){var n,o;if("string"===t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if("string"!==t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=!1},function(e,t,n){var r=n(0),o=n(37),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},function(e,t,n){var r=n(4),o=n(68),i=n(26),a=n(19);e.exports=function(e,t){for(var n=o(t),s=a.f,l=i.f,c=0;c<n.length;c++){var u=n[c];r(e,u)||s(e,u,l(t,u))}}},function(e,t,n){var r=n(9),o=n(69),i=n(72),a=n(5);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(40),o=n(21).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(13),o=n(41),i=n(71),a=function(e){return function(t,n,a){var s,l=r(t),c=o(l.length),u=i(a,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){var r=n(11),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(1),o=/#|\.prototype\./,i=function(e,t){var n=s[a(e)];return n==c||n!=l&&("function"==typeof t?r(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},s=i.data={},l=i.NATIVE="N",c=i.POLYFILL="P";e.exports=i},function(e,t,n){"use strict";var r=n(5);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(1),o=n(0).RegExp;t.UNSUPPORTED_Y=r((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){var r,o=n(5),i=n(77),a=n(21),s=n(20),l=n(79),c=n(35),u=n(39),f=u("IE_PROTO"),p=function(){},d=function(e){return"<script>"+e+"<\/script>"},h=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t;m="undefined"!=typeof document?document.domain&&r?h(r):((t=c("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F):h(r);for(var n=a.length;n--;)delete m.prototype[a[n]];return m()};s[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p.prototype=o(e),n=new p,p.prototype=null,n[f]=e):n=m(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(6),o=n(19),i=n(5),a=n(78);e.exports=r?Object.defineProperties:function(e,t){i(e);for(var n,r=a(t),s=r.length,l=0;s>l;)o.f(e,n=r[l++],t[n]);return e}},function(e,t,n){var r=n(40),o=n(21);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(9);e.exports=r("document","documentElement")},function(e,t,n){var r=n(1),o=n(0).RegExp;e.exports=r((function(){var e=o(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},function(e,t,n){var r=n(1),o=n(0).RegExp;e.exports=r((function(){var e=o("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},function(e,t,n){"use strict";var r=n(83).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r=n(11),o=n(23),i=n(8),a=function(e){return function(t,n){var a,s,l=o(i(t)),c=r(n),u=l.length;return c<0||c>=u?e?"":void 0:(a=l.charCodeAt(c))<55296||a>56319||c+1===u||(s=l.charCodeAt(c+1))<56320||s>57343?e?l.charAt(c):a:e?l.slice(c,c+2):s-56320+(a-55296<<10)+65536}};e.exports={codeAt:a(!1),charAt:a(!0)}},function(e,t,n){var r=n(32),o=Math.floor,i="".replace,a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,l,c,u){var f=n+e.length,p=l.length,d=s;return void 0!==c&&(c=r(c),d=a),i.call(u,d,(function(r,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(f);case"<":a=c[i.slice(1,-1)];break;default:var s=+i;if(0===s)return r;if(s>p){var u=o(s/10);return 0===u?r:u<=p?void 0===l[u-1]?i.charAt(1):l[u-1]+i.charAt(1):r}a=l[s-1]}return void 0===a?"":a}))}},function(e,t,n){var r=n(28),o=n(22);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t){
  34. /**
  35. * Copyright (c) 2015
  36. *
  37. * @author John Molakvoæ <skjnldsv@protonmail.com>
  38. * @author Vincent Petry <vincent@nextcloud.com>
  39. *
  40. * @license GNU AGPL version 3 or any later version
  41. *
  42. * This program is free software: you can redistribute it and/or modify
  43. * it under the terms of the GNU Affero General Public License as
  44. * published by the Free Software Foundation, either version 3 of the
  45. * License, or (at your option) any later version.
  46. *
  47. * This program is distributed in the hope that it will be useful,
  48. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  49. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  50. * GNU Affero General Public License for more details.
  51. *
  52. * You should have received a copy of the GNU Affero General Public License
  53. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  54. *
  55. */
  56. !function(e){var t=e.Backbone.Collection.extend({sync:e.Backbone.davSync,model:e.SystemTags.SystemTagModel,url:function(){return e.linkToRemote("dav")+"/systemtags/"},filterByName:function(e){return this.filter((function(t){return function(e,t){return e.get("name").substr(0,t.length).toLowerCase()===t.toLowerCase()}(t,e)}))},reset:function(){return this.fetched=!1,e.Backbone.Collection.prototype.reset.apply(this,arguments)},fetch:function(t){var n=this;if(t=t||{},this.fetched||t.force)return t.success&&t.success(this,null,t),this.trigger("sync",this,null,t),Promise.resolve();var r=t.success;return(t=_.extend({},t)).success=function(){if(n.fetched=!0,r)return r.apply(this,arguments)},e.Backbone.Collection.prototype.fetch.call(this,t)}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsCollection=t,e.SystemTags.collection=new e.SystemTags.SystemTagsCollection}(OC)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}t.__esModule=!0;var i=o(n(42)),a=r(n(98)),s=r(n(3)),l=o(n(2)),c=o(n(99)),u=r(n(101));function f(){var e=new i.HandlebarsEnvironment;return l.extend(e,i),e.SafeString=a.default,e.Exception=s.default,e.Utils=l,e.escapeExpression=l.escapeExpression,e.VM=c,e.template=function(t){return c.template(t,e)},e}var p=f();p.create=f,u.default(p),p.default=p,t.default=p,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r=n(2);t.default=function(e){e.registerHelper("blockHelperMissing",(function(t,n){var o=n.inverse,i=n.fn;if(!0===t)return i(this);if(!1===t||null==t)return o(this);if(r.isArray(t))return t.length>0?(n.ids&&(n.ids=[n.name]),e.helpers.each(t,n)):o(this);if(n.data&&n.ids){var a=r.createFrame(n.data);a.contextPath=r.appendContextPath(n.data.contextPath,n.name),n={data:a}}return i(t,n)}))},e.exports=t.default},function(e,t,n){"use strict";(function(r){t.__esModule=!0;var o,i=n(2),a=n(3),s=(o=a)&&o.__esModule?o:{default:o};t.default=function(e){e.registerHelper("each",(function(e,t){if(!t)throw new s.default("Must pass iterator to #each");var n,o=t.fn,a=t.inverse,l=0,c="",u=void 0,f=void 0;function p(t,n,r){u&&(u.key=t,u.index=n,u.first=0===n,u.last=!!r,f&&(u.contextPath=f+t)),c+=o(e[t],{data:u,blockParams:i.blockParams([e[t],t],[f+t,null])})}if(t.data&&t.ids&&(f=i.appendContextPath(t.data.contextPath,t.ids[0])+"."),i.isFunction(e)&&(e=e.call(this)),t.data&&(u=i.createFrame(t.data)),e&&"object"==typeof e)if(i.isArray(e))for(var d=e.length;l<d;l++)l in e&&p(l,l,l===e.length-1);else if(r.Symbol&&e[r.Symbol.iterator]){for(var h=[],m=e[r.Symbol.iterator](),g=m.next();!g.done;g=m.next())h.push(g.value);for(d=(e=h).length;l<d;l++)p(l,l,l===e.length-1)}else n=void 0,Object.keys(e).forEach((function(e){void 0!==n&&p(n,l-1),n=e,l++})),void 0!==n&&p(n,l-1,!0);return 0===l&&(c=a(this)),c}))},e.exports=t.default}).call(this,n(12))},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(3),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(e){e.registerHelper("helperMissing",(function(){if(1!==arguments.length)throw new i.default('Missing helper: "'+arguments[arguments.length-1].name+'"')}))},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(2),i=n(3),a=(r=i)&&r.__esModule?r:{default:r};t.default=function(e){e.registerHelper("if",(function(e,t){if(2!=arguments.length)throw new a.default("#if requires exactly one argument");return o.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||o.isEmpty(e)?t.inverse(this):t.fn(this)})),e.registerHelper("unless",(function(t,n){if(2!=arguments.length)throw new a.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})}))},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){e.registerHelper("log",(function(){for(var t=[void 0],n=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)t.push(arguments[r]);var o=1;null!=n.hash.level?o=n.hash.level:n.data&&null!=n.data.level&&(o=n.data.level),t[0]=o,e.log.apply(e,t)}))},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){e.registerHelper("lookup",(function(e,t,n){return e?n.lookupProperty(e,t):e}))},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(2),i=n(3),a=(r=i)&&r.__esModule?r:{default:r};t.default=function(e){e.registerHelper("with",(function(e,t){if(2!=arguments.length)throw new a.default("#with requires exactly one argument");o.isFunction(e)&&(e=e.call(this));var n=t.fn;if(o.isEmpty(e))return t.inverse(this);var r=t.data;return t.data&&t.ids&&((r=o.createFrame(t.data)).contextPath=o.appendContextPath(t.data.contextPath,t.ids[0])),n(e,{data:r,blockParams:o.blockParams([e],[r&&r.contextPath])})}))},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.registerDefaultDecorators=function(e){i.default(e)};var r,o=n(96),i=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(2);t.default=function(e){e.registerDecorator("inline",(function(e,t,n,o){var i=e;return t.partials||(t.partials={},i=function(o,i){var a=n.partials;n.partials=r.extend({},a,t.partials);var s=e(o,i);return n.partials=a,s}),t.partials[o.args[0]]=o.fn,i}))},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.createNewLookupObject=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.extend.apply(void 0,[Object.create(null)].concat(t))};var r=n(2)},function(e,t,n){"use strict";function r(e){this.string=e}t.__esModule=!0,r.prototype.toString=r.prototype.toHTML=function(){return""+this.string},t.default=r,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.checkRevision=function(e){var t=e&&e[0]||1,n=s.COMPILER_REVISION;if(t>=s.LAST_COMPATIBLE_COMPILER_REVISION&&t<=s.COMPILER_REVISION)return;if(t<s.LAST_COMPATIBLE_COMPILER_REVISION){var r=s.REVISION_CHANGES[n],o=s.REVISION_CHANGES[t];throw new a.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+o+").")}throw new a.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")},t.template=function(e,t){if(!t)throw new a.default("No environment passed to template");if(!e||!e.main)throw new a.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var n=e.compiler&&7===e.compiler[0];var r={strict:function(e,t,n){if(!e||!(t in e))throw new a.default('"'+t+'" not defined in '+e,{loc:n});return r.lookupProperty(e,t)},lookupProperty:function(e,t){var n=e[t];return null==n||Object.prototype.hasOwnProperty.call(e,t)||u.resultIsAllowed(n,r.protoAccessControl,t)?n:void 0},lookup:function(e,t){for(var n=e.length,o=0;o<n;o++){if(null!=(e[o]&&r.lookupProperty(e[o],t)))return e[o][t]}},lambda:function(e,t){return"function"==typeof e?e.call(t):e},escapeExpression:o.escapeExpression,invokePartial:function(n,r,i){i.hash&&(r=o.extend({},r,i.hash),i.ids&&(i.ids[0]=!0)),n=t.VM.resolvePartial.call(this,n,r,i);var s=o.extend({},i,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),l=t.VM.invokePartial.call(this,n,r,s);if(null==l&&t.compile&&(i.partials[i.name]=t.compile(n,e.compilerOptions,t),l=i.partials[i.name](r,s)),null!=l){if(i.indent){for(var c=l.split("\n"),u=0,f=c.length;u<f&&(c[u]||u+1!==f);u++)c[u]=i.indent+c[u];l=c.join("\n")}return l}throw new a.default("The partial "+i.name+" could not be compiled when running in runtime-only mode")},fn:function(t){var n=e[t];return n.decorator=e[t+"_d"],n},programs:[],program:function(e,t,n,r,o){var i=this.programs[e],a=this.fn(e);return t||o||r||n?i=f(this,e,a,t,n,r,o):i||(i=this.programs[e]=f(this,e,a)),i},data:function(e,t){for(;e&&t--;)e=e._parent;return e},mergeIfNeeded:function(e,t){var n=e||t;return e&&t&&e!==t&&(n=o.extend({},t,e)),n},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function i(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=n.data;i._setup(n),!n.partial&&e.useData&&(o=d(t,o));var a=void 0,s=e.useBlockParams?[]:void 0;function l(t){return""+e.main(r,t,r.helpers,r.partials,o,s,a)}return e.useDepths&&(a=n.depths?t!=n.depths[0]?[t].concat(n.depths):n.depths:[t]),(l=h(e.main,l,r,n.depths||[],o,s))(t,n)}return i.isTop=!0,i._setup=function(i){if(i.partial)r.protoAccessControl=i.protoAccessControl,r.helpers=i.helpers,r.partials=i.partials,r.decorators=i.decorators,r.hooks=i.hooks;else{var a=o.extend({},t.helpers,i.helpers);!function(e,t){Object.keys(e).forEach((function(n){var r=e[n];e[n]=function(e,t){var n=t.lookupProperty;return c.wrapHelper(e,(function(e){return o.extend({lookupProperty:n},e)}))}(r,t)}))}(a,r),r.helpers=a,e.usePartial&&(r.partials=r.mergeIfNeeded(i.partials,t.partials)),(e.usePartial||e.useDecorators)&&(r.decorators=o.extend({},t.decorators,i.decorators)),r.hooks={},r.protoAccessControl=u.createProtoAccessControl(i);var s=i.allowCallsToHelperMissing||n;l.moveHelperToHooks(r,"helperMissing",s),l.moveHelperToHooks(r,"blockHelperMissing",s)}},i._child=function(t,n,o,i){if(e.useBlockParams&&!o)throw new a.default("must pass block params");if(e.useDepths&&!i)throw new a.default("must pass parent depths");return f(r,t,e[t],n,0,o,i)},i},t.wrapProgram=f,t.resolvePartial=function(e,t,n){e?e.call||n.name||(n.name=e,e=n.partials[e]):e="@partial-block"===n.name?n.data["partial-block"]:n.partials[n.name];return e},t.invokePartial=function(e,t,n){var r=n.data&&n.data["partial-block"];n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var i=void 0;n.fn&&n.fn!==p&&function(){n.data=s.createFrame(n.data);var e=n.fn;i=n.data["partial-block"]=function(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return n.data=s.createFrame(n.data),n.data["partial-block"]=r,e(t,n)},e.partials&&(n.partials=o.extend({},n.partials,e.partials))}();void 0===e&&i&&(e=i);if(void 0===e)throw new a.default("The partial "+n.name+" could not be found");if(e instanceof Function)return e(t,n)},t.noop=p;var r,o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(2)),i=n(3),a=(r=i)&&r.__esModule?r:{default:r},s=n(42),l=n(43),c=n(100),u=n(45);function f(e,t,n,r,o,i,a){function s(t){var o=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=a;return!a||t==a[0]||t===e.nullContext&&null===a[0]||(s=[t].concat(a)),n(e,t,e.helpers,e.partials,o.data||r,i&&[o.blockParams].concat(i),s)}return(s=h(n,s,e,a,r,i)).program=t,s.depth=a?a.length:0,s.blockParams=o||0,s}function p(){return""}function d(e,t){return t&&"root"in t||((t=t?s.createFrame(t):{}).root=e),t}function h(e,t,n,r,i,a){if(e.decorator){var s={};t=e.decorator(t,s,n,r&&r[0],i,a,r),o.extend(t,s)}return t}},function(e,t,n){"use strict";t.__esModule=!0,t.wrapHelper=function(e,t){if("function"!=typeof e)return e;return function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=t(n),e.apply(this,arguments)}}},function(e,t,n){"use strict";(function(n){t.__esModule=!0,t.default=function(e){var t=void 0!==n?n:window,r=t.Handlebars;e.noConflict=function(){return t.Handlebars===e&&(t.Handlebars=r),e}},e.exports=t.default}).call(this,n(12))},function(e,n,r){"use strict";r.r(n);var o=r(46),i=r.n(o);
  57. /**
  58. * Copyright (c) 2016
  59. *
  60. * @author Gary Kim <gary@garykim.dev>
  61. * @author Joas Schilling <coding@schilljs.com>
  62. * @author John Molakvoæ <skjnldsv@protonmail.com>
  63. * @author Roeland Jago Douma <roeland@famdouma.nl>
  64. * @author Vincent Petry <vincent@nextcloud.com>
  65. *
  66. * @license GNU AGPL version 3 or any later version
  67. *
  68. * This program is free software: you can redistribute it and/or modify
  69. * it under the terms of the GNU Affero General Public License as
  70. * published by the Free Software Foundation, either version 3 of the
  71. * License, or (at your option) any later version.
  72. *
  73. * This program is distributed in the hope that it will be useful,
  74. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  75. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  76. * GNU Affero General Public License for more details.
  77. *
  78. * You should have received a copy of the GNU Affero General Public License
  79. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  80. *
  81. */
  82. !function(e){e.SystemTags={getDescriptiveTag:function(e){if(_.isUndefined(e.name)&&!_.isUndefined(e.toJSON)&&(e=e.toJSON()),_.isUndefined(e.name))return $("<span>").addClass("non-existing-tag").text(t("core","Non-existing tag #{tag}",{tag:e}));var n,r=$("<span>");return r.append(i()(e.name)),e.userAssignable||(n=t("core","restricted")),e.userVisible||(n=t("core","invisible")),n&&r.append($("<em>").text(" ("+n+")")),r}}}(OC);r(54);var a=r(47);
  83. /**
  84. * Copyright (c) 2015
  85. *
  86. * @author John Molakvoæ <skjnldsv@protonmail.com>
  87. * @author Roeland Jago Douma <roeland@famdouma.nl>
  88. * @author Vincent Petry <vincent@nextcloud.com>
  89. *
  90. * @license GNU AGPL version 3 or any later version
  91. *
  92. * This program is free software: you can redistribute it and/or modify
  93. * it under the terms of the GNU Affero General Public License as
  94. * published by the Free Software Foundation, either version 3 of the
  95. * License, or (at your option) any later version.
  96. *
  97. * This program is distributed in the hope that it will be useful,
  98. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  99. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  100. * GNU Affero General Public License for more details.
  101. *
  102. * You should have received a copy of the GNU Affero General Public License
  103. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  104. *
  105. */
  106. !function(e){var t=e.Backbone.Collection.extend({sync:e.Backbone.davSync,usePUT:!0,_objectId:null,_objectType:"files",model:e.SystemTags.SystemTagModel,url:function(){return Object(a.generateRemoteUrl)("dav")+"/systemtags-relations/"+this._objectType+"/"+this._objectId},setObjectId:function(e){this._objectId=e},setObjectType:function(e){this._objectType=e},initialize:function(e,t){t=t||{},_.isUndefined(t.objectId)||(this._objectId=t.objectId),_.isUndefined(t.objectType)||(this._objectType=t.objectType)},getTagIds:function(){return this.map((function(e){return e.id}))}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsMappingCollection=t}(OC);r(86);var s=r(48),l=r.n(s),c=r(49),u=r.n(c),f=r(50),p=r.n(f);
  107. /**
  108. * Copyright (c) 2015
  109. *
  110. * @author Joas Schilling <coding@schilljs.com>
  111. * @author John Molakvoæ <skjnldsv@protonmail.com>
  112. * @author Roeland Jago Douma <roeland@famdouma.nl>
  113. * @author Vincent Petry <vincent@nextcloud.com>
  114. *
  115. * @license GNU AGPL version 3 or any later version
  116. *
  117. * This program is free software: you can redistribute it and/or modify
  118. * it under the terms of the GNU Affero General Public License as
  119. * published by the Free Software Foundation, either version 3 of the
  120. * License, or (at your option) any later version.
  121. *
  122. * This program is distributed in the hope that it will be useful,
  123. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  124. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  125. * GNU Affero General Public License for more details.
  126. *
  127. * You should have received a copy of the GNU Affero General Public License
  128. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  129. *
  130. */
  131. !function(e){var n=e.Backbone.View.extend({_rendered:!1,_newTag:null,_lastUsedTags:[],className:"systemTagsInputFieldContainer",template:function(e){return'<input class="systemTagsInputField" type="hidden" name="tags" value=""/>'},initialize:function(t){t=t||{},this._multiple=!!t.multiple,this._allowActions=_.isUndefined(t.allowActions)||!!t.allowActions,this._allowCreate=_.isUndefined(t.allowCreate)||!!t.allowCreate,this._isAdmin=!!t.isAdmin,_.isFunction(t.initSelection)&&(this._initSelection=t.initSelection),this.collection=t.collection||e.SystemTags.collection;var n=this;this.collection.on("change:name remove",(function(){_.defer(n._refreshSelection)})),_.defer(_.bind(this._getLastUsedTags,this)),_.bindAll(this,"_refreshSelection","_onClickRenameTag","_onClickDeleteTag","_onSelectTag","_onDeselectTag","_onSubmitRenameTag")},_getLastUsedTags:function(){var t=this;$.ajax({type:"GET",url:e.generateUrl("/apps/systemtags/lastused"),success:function(e){t._lastUsedTags=e}})},_refreshSelection:function(){this.$tagsField.select2("val",this.$tagsField.val())},_onClickRenameTag:function(e){var n=$(e.target).closest(".systemtags-item"),r=n.attr("data-id"),o=this.collection.get(r).get("name"),i=$(u()({cid:this.cid,name:o,deleteTooltip:t("core","Delete"),renameLabel:t("core","Rename"),isAdmin:this._isAdmin}));return n.find(".label").after(i),n.find(".label, .systemtags-actions").addClass("hidden"),n.closest(".select2-result").addClass("has-form"),i.find("[title]").tooltip({placement:"bottom",container:"body"}),i.find("input").focus().selectRange(0,o.length),!1},_onSubmitRenameTag:function(e){e.preventDefault();var t=$(e.target),n=t.closest(".systemtags-item"),r=n.attr("data-id"),o=this.collection.get(r),i=$(e.target).find("input").val().trim();i&&i!==o.get("name")&&(o.save({name:i}),n.find(".label").text(i)),n.find(".label, .systemtags-actions").removeClass("hidden"),t.remove(),n.closest(".select2-result").removeClass("has-form")},_onClickDeleteTag:function(e){var t=$(e.target).closest(".systemtags-item"),n=t.attr("data-id");return this.collection.get(n).destroy(),$(e.target).tooltip("hide"),t.closest(".select2-result").remove(),!1},_addToSelect2Selection:function(e){var t=this.$tagsField.select2("data");t.push(e),this.$tagsField.select2("data",t)},_onSelectTag:function(e){var t,n=this;if(e.object&&e.object.isNew)return t=this.collection.create({name:e.object.name.trim(),userVisible:!0,userAssignable:!0,canAssign:!0},{success:function(e){n._addToSelect2Selection(e.toJSON()),n._lastUsedTags.unshift(e.id),n.trigger("select",e)},error:function(t,r){409===r.status&&(n.collection.reset(),n.collection.fetch({success:function(t){var r=t.where({name:e.object.name.trim(),userVisible:!0,userAssignable:!0});r.length&&(r=r[0],n._addToSelect2Selection(r.toJSON()),n.trigger("select",r))}}))}}),this.$tagsField.select2("close"),e.preventDefault(),!1;t=this.collection.get(e.object.id),this._lastUsedTags.unshift(t.id),this._newTag=null,this.trigger("select",t)},_onDeselectTag:function(e){this.trigger("deselect",e.choice.id)},_queryTagsAutocomplete:function(e){var t=this;this.collection.fetch({success:function(n){var r=n.filterByName(e.term.trim());t._isAdmin||(r=_.filter(r,(function(e){return e.get("canAssign")}))),e.callback({results:_.invoke(r,"toJSON")})}})},_preventDefault:function(e){e.stopPropagation()},_formatDropDownResult:function(n){return l()(_.extend({renameTooltip:t("core","Rename"),allowActions:this._allowActions,tagMarkup:this._isAdmin?e.SystemTags.getDescriptiveTag(n)[0].innerHTML:null,isAdmin:this._isAdmin},n))},_formatSelection:function(t){return p()(_.extend({tagMarkup:this._isAdmin?e.SystemTags.getDescriptiveTag(t)[0].innerHTML:null,isAdmin:this._isAdmin},t))},_createSearchChoice:function(e){if(e=e.trim(),!this.collection.filter((function(t){return t.get("name")===e})).length)return this._newTag?this._newTag.name=e:this._newTag={id:-1,name:e,userAssignable:!0,userVisible:!0,canAssign:!0,isNew:!0},this._newTag},_initSelection:function(e,t){var n=this,r=$(e).val().split(",");function o(e){var t=e.toJSON();return n._isAdmin||t.canAssign||(t.locked=!0),t}this.collection.fetch({success:function(){t(function(e){var t=n.collection.filter((function(t){return e.indexOf(t.id)>=0&&(n._isAdmin||t.get("userVisible"))}));return _.map(t,o)}(r))}})},render:function(){var n=this;this.$el.html(this.template()),this.$el.find("[title]").tooltip({placement:"bottom"}),this.$tagsField=this.$el.find("[name=tags]"),this.$tagsField.select2({placeholder:t("core","Collaborative tags"),containerCssClass:"systemtags-select2-container",dropdownCssClass:"systemtags-select2-dropdown",closeOnSelect:!1,allowClear:!1,multiple:this._multiple,toggleSelect:this._multiple,query:_.bind(this._queryTagsAutocomplete,this),id:function(e){return e.id},initSelection:_.bind(this._initSelection,this),formatResult:_.bind(this._formatDropDownResult,this),formatSelection:_.bind(this._formatSelection,this),createSearchChoice:this._allowCreate?_.bind(this._createSearchChoice,this):void 0,sortResults:function(t){var r=_.pluck(n.$tagsField.select2("data"),"id");return t.sort((function(t,o){var i=r.indexOf(t.id)>=0,a=r.indexOf(o.id)>=0;if(i===a){var s=n._lastUsedTags.indexOf(t.id),l=n._lastUsedTags.indexOf(o.id);return s!==l?-1===l?-1:-1===s?1:s<l?-1:1:e.Util.naturalSortCompare(t.name,o.name)}return i&&!a?-1:1})),t},formatNoMatches:function(){return t("core","No tags found")}}).on("select2-selecting",this._onSelectTag).on("select2-removing",this._onDeselectTag);var r=this.$tagsField.select2("dropdown");r.on("mouseup",".rename",this._onClickRenameTag),r.on("mouseup",".delete",this._onClickDeleteTag),r.on("mouseup",".select2-result-selectable.has-form",this._preventDefault),r.on("submit",".systemtags-rename-form",this._onSubmitRenameTag),this.delegateEvents()},remove:function(){this.$tagsField&&this.$tagsField.select2("destroy")},getValues:function(){this.$tagsField.select2("val")},setValues:function(e){this.$tagsField.select2("val",e)},setData:function(e){this.$tagsField.select2("data",e)}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsInputField=n}(OC);var d=r(51),h=r.n(d),m=r(25),g={insert:"head",singleton:!1};h()(m.a,g),m.a.locals}]);
  132. //# sourceMappingURL=systemtags.js.map