/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); } return a; }; var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { __markAsModule(target); for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __reExport = (target, module2, desc) => { if (module2 && typeof module2 === "object" || typeof module2 === "function") { for (let key of __getOwnPropNames(module2)) if (!__hasOwnProp.call(target, key) && key !== "default") __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); } return target; }; var __toModule = (module2) => { return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); }; var __async = (__this, __arguments, generator) => { return new Promise((resolve, reject) => { var fulfilled = (value) => { try { step(generator.next(value)); } catch (e) { reject(e); } }; var rejected = (value) => { try { step(generator.throw(value)); } catch (e) { reject(e); } }; var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); step((generator = generator.apply(__this, __arguments)).next()); }); }; // node_modules/underscore/underscore.js var require_underscore = __commonJS({ "node_modules/underscore/underscore.js"(exports, module2) { (function() { var root = this; var previousUnderscore = root._; var breaker = {}; var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; var slice = ArrayProto.slice, unshift = ArrayProto.unshift, toString = ObjProto.toString, hasOwnProperty = ObjProto.hasOwnProperty; var nativeForEach = ArrayProto.forEach, nativeMap = ArrayProto.map, nativeReduce = ArrayProto.reduce, nativeReduceRight = ArrayProto.reduceRight, nativeFilter = ArrayProto.filter, nativeEvery = ArrayProto.every, nativeSome = ArrayProto.some, nativeIndexOf = ArrayProto.indexOf, nativeLastIndexOf = ArrayProto.lastIndexOf, nativeIsArray = Array.isArray, nativeKeys = Object.keys, nativeBind = FuncProto.bind; var _ = function(obj) { return new wrapper(obj); }; if (typeof exports !== "undefined") { if (typeof module2 !== "undefined" && module2.exports) { exports = module2.exports = _; } exports._ = _; } else { root["_"] = _; } _.VERSION = "1.3.3"; var each = _.each = _.forEach = function(obj, iterator, context) { if (obj == null) return; if (nativeForEach && obj.forEach === nativeForEach) { obj.forEach(iterator, context); } else if (obj.length === +obj.length) { for (var i = 0, l = obj.length; i < l; i++) { if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) return; } } else { for (var key in obj) { if (_.has(obj, key)) { if (iterator.call(context, obj[key], key, obj) === breaker) return; } } } }; _.map = _.collect = function(obj, iterator, context) { var results = []; if (obj == null) return results; if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context); each(obj, function(value, index, list) { results[results.length] = iterator.call(context, value, index, list); }); if (obj.length === +obj.length) results.length = obj.length; return results; }; _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) { var initial = arguments.length > 2; if (obj == null) obj = []; if (nativeReduce && obj.reduce === nativeReduce) { if (context) iterator = _.bind(iterator, context); return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator); } each(obj, function(value, index, list) { if (!initial) { memo = value; initial = true; } else { memo = iterator.call(context, memo, value, index, list); } }); if (!initial) throw new TypeError("Reduce of empty array with no initial value"); return memo; }; _.reduceRight = _.foldr = function(obj, iterator, memo, context) { var initial = arguments.length > 2; if (obj == null) obj = []; if (nativeReduceRight && obj.reduceRight === nativeReduceRight) { if (context) iterator = _.bind(iterator, context); return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator); } var reversed = _.toArray(obj).reverse(); if (context && !initial) iterator = _.bind(iterator, context); return initial ? _.reduce(reversed, iterator, memo, context) : _.reduce(reversed, iterator); }; _.find = _.detect = function(obj, iterator, context) { var result2; any(obj, function(value, index, list) { if (iterator.call(context, value, index, list)) { result2 = value; return true; } }); return result2; }; _.filter = _.select = function(obj, iterator, context) { var results = []; if (obj == null) return results; if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context); each(obj, function(value, index, list) { if (iterator.call(context, value, index, list)) results[results.length] = value; }); return results; }; _.reject = function(obj, iterator, context) { var results = []; if (obj == null) return results; each(obj, function(value, index, list) { if (!iterator.call(context, value, index, list)) results[results.length] = value; }); return results; }; _.every = _.all = function(obj, iterator, context) { var result2 = true; if (obj == null) return result2; if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context); each(obj, function(value, index, list) { if (!(result2 = result2 && iterator.call(context, value, index, list))) return breaker; }); return !!result2; }; var any = _.some = _.any = function(obj, iterator, context) { iterator || (iterator = _.identity); var result2 = false; if (obj == null) return result2; if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context); each(obj, function(value, index, list) { if (result2 || (result2 = iterator.call(context, value, index, list))) return breaker; }); return !!result2; }; _.include = _.contains = function(obj, target) { var found = false; if (obj == null) return found; if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1; found = any(obj, function(value) { return value === target; }); return found; }; _.invoke = function(obj, method) { var args = slice.call(arguments, 2); return _.map(obj, function(value) { return (_.isFunction(method) ? method || value : value[method]).apply(value, args); }); }; _.pluck = function(obj, key) { return _.map(obj, function(value) { return value[key]; }); }; _.max = function(obj, iterator, context) { if (!iterator && _.isArray(obj) && obj[0] === +obj[0]) return Math.max.apply(Math, obj); if (!iterator && _.isEmpty(obj)) return -Infinity; var result2 = { computed: -Infinity }; each(obj, function(value, index, list) { var computed = iterator ? iterator.call(context, value, index, list) : value; computed >= result2.computed && (result2 = { value, computed }); }); return result2.value; }; _.min = function(obj, iterator, context) { if (!iterator && _.isArray(obj) && obj[0] === +obj[0]) return Math.min.apply(Math, obj); if (!iterator && _.isEmpty(obj)) return Infinity; var result2 = { computed: Infinity }; each(obj, function(value, index, list) { var computed = iterator ? iterator.call(context, value, index, list) : value; computed < result2.computed && (result2 = { value, computed }); }); return result2.value; }; _.shuffle = function(obj) { var shuffled = [], rand; each(obj, function(value, index, list) { rand = Math.floor(Math.random() * (index + 1)); shuffled[index] = shuffled[rand]; shuffled[rand] = value; }); return shuffled; }; _.sortBy = function(obj, val, context) { var iterator = _.isFunction(val) ? val : function(obj2) { return obj2[val]; }; return _.pluck(_.map(obj, function(value, index, list) { return { value, criteria: iterator.call(context, value, index, list) }; }).sort(function(left, right) { var a = left.criteria, b = right.criteria; if (a === void 0) return 1; if (b === void 0) return -1; return a < b ? -1 : a > b ? 1 : 0; }), "value"); }; _.groupBy = function(obj, val) { var result2 = {}; var iterator = _.isFunction(val) ? val : function(obj2) { return obj2[val]; }; each(obj, function(value, index) { var key = iterator(value, index); (result2[key] || (result2[key] = [])).push(value); }); return result2; }; _.sortedIndex = function(array, obj, iterator) { iterator || (iterator = _.identity); var low = 0, high = array.length; while (low < high) { var mid = low + high >> 1; iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid; } return low; }; _.toArray = function(obj) { if (!obj) return []; if (_.isArray(obj)) return slice.call(obj); if (_.isArguments(obj)) return slice.call(obj); if (obj.toArray && _.isFunction(obj.toArray)) return obj.toArray(); return _.values(obj); }; _.size = function(obj) { return _.isArray(obj) ? obj.length : _.keys(obj).length; }; _.first = _.head = _.take = function(array, n, guard) { return n != null && !guard ? slice.call(array, 0, n) : array[0]; }; _.initial = function(array, n, guard) { return slice.call(array, 0, array.length - (n == null || guard ? 1 : n)); }; _.last = function(array, n, guard) { if (n != null && !guard) { return slice.call(array, Math.max(array.length - n, 0)); } else { return array[array.length - 1]; } }; _.rest = _.tail = function(array, index, guard) { return slice.call(array, index == null || guard ? 1 : index); }; _.compact = function(array) { return _.filter(array, function(value) { return !!value; }); }; _.flatten = function(array, shallow) { return _.reduce(array, function(memo, value) { if (_.isArray(value)) return memo.concat(shallow ? value : _.flatten(value)); memo[memo.length] = value; return memo; }, []); }; _.without = function(array) { return _.difference(array, slice.call(arguments, 1)); }; _.uniq = _.unique = function(array, isSorted, iterator) { var initial = iterator ? _.map(array, iterator) : array; var results = []; if (array.length < 3) isSorted = true; _.reduce(initial, function(memo, value, index) { if (isSorted ? _.last(memo) !== value || !memo.length : !_.include(memo, value)) { memo.push(value); results.push(array[index]); } return memo; }, []); return results; }; _.union = function() { return _.uniq(_.flatten(arguments, true)); }; _.intersection = _.intersect = function(array) { var rest = slice.call(arguments, 1); return _.filter(_.uniq(array), function(item) { return _.every(rest, function(other) { return _.indexOf(other, item) >= 0; }); }); }; _.difference = function(array) { var rest = _.flatten(slice.call(arguments, 1), true); return _.filter(array, function(value) { return !_.include(rest, value); }); }; _.zip = function() { var args = slice.call(arguments); var length = _.max(_.pluck(args, "length")); var results = new Array(length); for (var i = 0; i < length; i++) results[i] = _.pluck(args, "" + i); return results; }; _.indexOf = function(array, item, isSorted) { if (array == null) return -1; var i, l; if (isSorted) { i = _.sortedIndex(array, item); return array[i] === item ? i : -1; } if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item); for (i = 0, l = array.length; i < l; i++) if (i in array && array[i] === item) return i; return -1; }; _.lastIndexOf = function(array, item) { if (array == null) return -1; if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) return array.lastIndexOf(item); var i = array.length; while (i--) if (i in array && array[i] === item) return i; return -1; }; _.range = function(start, stop, step) { if (arguments.length <= 1) { stop = start || 0; start = 0; } step = arguments[2] || 1; var len = Math.max(Math.ceil((stop - start) / step), 0); var idx = 0; var range = new Array(len); while (idx < len) { range[idx++] = start; start += step; } return range; }; var ctor = function() { }; _.bind = function bind(func, context) { var bound, args; if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); if (!_.isFunction(func)) throw new TypeError(); args = slice.call(arguments, 2); return bound = function() { if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments))); ctor.prototype = func.prototype; var self = new ctor(); var result2 = func.apply(self, args.concat(slice.call(arguments))); if (Object(result2) === result2) return result2; return self; }; }; _.bindAll = function(obj) { var funcs = slice.call(arguments, 1); if (funcs.length == 0) funcs = _.functions(obj); each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); }); return obj; }; _.memoize = function(func, hasher) { var memo = {}; hasher || (hasher = _.identity); return function() { var key = hasher.apply(this, arguments); return _.has(memo, key) ? memo[key] : memo[key] = func.apply(this, arguments); }; }; _.delay = function(func, wait) { var args = slice.call(arguments, 2); return setTimeout(function() { return func.apply(null, args); }, wait); }; _.defer = function(func) { return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1))); }; _.throttle = function(func, wait) { var context, args, timeout, throttling, more, result2; var whenDone = _.debounce(function() { more = throttling = false; }, wait); return function() { context = this; args = arguments; var later = function() { timeout = null; if (more) func.apply(context, args); whenDone(); }; if (!timeout) timeout = setTimeout(later, wait); if (throttling) { more = true; } else { result2 = func.apply(context, args); } whenDone(); throttling = true; return result2; }; }; _.debounce = function(func, wait, immediate) { var timeout; return function() { var context = this, args = arguments; var later = function() { timeout = null; if (!immediate) func.apply(context, args); }; if (immediate && !timeout) func.apply(context, args); clearTimeout(timeout); timeout = setTimeout(later, wait); }; }; _.once = function(func) { var ran = false, memo; return function() { if (ran) return memo; ran = true; return memo = func.apply(this, arguments); }; }; _.wrap = function(func, wrapper2) { return function() { var args = [func].concat(slice.call(arguments, 0)); return wrapper2.apply(this, args); }; }; _.compose = function() { var funcs = arguments; return function() { var args = arguments; for (var i = funcs.length - 1; i >= 0; i--) { args = [funcs[i].apply(this, args)]; } return args[0]; }; }; _.after = function(times, func) { if (times <= 0) return func(); return function() { if (--times < 1) { return func.apply(this, arguments); } }; }; _.keys = nativeKeys || function(obj) { if (obj !== Object(obj)) throw new TypeError("Invalid object"); var keys = []; for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key; return keys; }; _.values = function(obj) { return _.map(obj, _.identity); }; _.functions = _.methods = function(obj) { var names = []; for (var key in obj) { if (_.isFunction(obj[key])) names.push(key); } return names.sort(); }; _.extend = function(obj) { each(slice.call(arguments, 1), function(source) { for (var prop in source) { obj[prop] = source[prop]; } }); return obj; }; _.pick = function(obj) { var result2 = {}; each(_.flatten(slice.call(arguments, 1)), function(key) { if (key in obj) result2[key] = obj[key]; }); return result2; }; _.defaults = function(obj) { each(slice.call(arguments, 1), function(source) { for (var prop in source) { if (obj[prop] == null) obj[prop] = source[prop]; } }); return obj; }; _.clone = function(obj) { if (!_.isObject(obj)) return obj; return _.isArray(obj) ? obj.slice() : _.extend({}, obj); }; _.tap = function(obj, interceptor) { interceptor(obj); return obj; }; function eq(a, b, stack) { if (a === b) return a !== 0 || 1 / a == 1 / b; if (a == null || b == null) return a === b; if (a._chain) a = a._wrapped; if (b._chain) b = b._wrapped; if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b); if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a); var className = toString.call(a); if (className != toString.call(b)) return false; switch (className) { case "[object String]": return a == String(b); case "[object Number]": return a != +a ? b != +b : a == 0 ? 1 / a == 1 / b : a == +b; case "[object Date]": case "[object Boolean]": return +a == +b; case "[object RegExp]": return a.source == b.source && a.global == b.global && a.multiline == b.multiline && a.ignoreCase == b.ignoreCase; } if (typeof a != "object" || typeof b != "object") return false; var length = stack.length; while (length--) { if (stack[length] == a) return true; } stack.push(a); var size = 0, result2 = true; if (className == "[object Array]") { size = a.length; result2 = size == b.length; if (result2) { while (size--) { if (!(result2 = size in a == size in b && eq(a[size], b[size], stack))) break; } } } else { if ("constructor" in a != "constructor" in b || a.constructor != b.constructor) return false; for (var key in a) { if (_.has(a, key)) { size++; if (!(result2 = _.has(b, key) && eq(a[key], b[key], stack))) break; } } if (result2) { for (key in b) { if (_.has(b, key) && !size--) break; } result2 = !size; } } stack.pop(); return result2; } _.isEqual = function(a, b) { return eq(a, b, []); }; _.isEmpty = function(obj) { if (obj == null) return true; if (_.isArray(obj) || _.isString(obj)) return obj.length === 0; for (var key in obj) if (_.has(obj, key)) return false; return true; }; _.isElement = function(obj) { return !!(obj && obj.nodeType == 1); }; _.isArray = nativeIsArray || function(obj) { return toString.call(obj) == "[object Array]"; }; _.isObject = function(obj) { return obj === Object(obj); }; _.isArguments = function(obj) { return toString.call(obj) == "[object Arguments]"; }; if (!_.isArguments(arguments)) { _.isArguments = function(obj) { return !!(obj && _.has(obj, "callee")); }; } _.isFunction = function(obj) { return toString.call(obj) == "[object Function]"; }; _.isString = function(obj) { return toString.call(obj) == "[object String]"; }; _.isNumber = function(obj) { return toString.call(obj) == "[object Number]"; }; _.isFinite = function(obj) { return _.isNumber(obj) && isFinite(obj); }; _.isNaN = function(obj) { return obj !== obj; }; _.isBoolean = function(obj) { return obj === true || obj === false || toString.call(obj) == "[object Boolean]"; }; _.isDate = function(obj) { return toString.call(obj) == "[object Date]"; }; _.isRegExp = function(obj) { return toString.call(obj) == "[object RegExp]"; }; _.isNull = function(obj) { return obj === null; }; _.isUndefined = function(obj) { return obj === void 0; }; _.has = function(obj, key) { return hasOwnProperty.call(obj, key); }; _.noConflict = function() { root._ = previousUnderscore; return this; }; _.identity = function(value) { return value; }; _.times = function(n, iterator, context) { for (var i = 0; i < n; i++) iterator.call(context, i); }; _.escape = function(string) { return ("" + string).replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/"); }; _.result = function(object, property) { if (object == null) return null; var value = object[property]; return _.isFunction(value) ? value.call(object) : value; }; _.mixin = function(obj) { each(_.functions(obj), function(name) { addToWrapper(name, _[name] = obj[name]); }); }; var idCounter = 0; _.uniqueId = function(prefix) { var id = idCounter++; return prefix ? prefix + id : id; }; _.templateSettings = { evaluate: /<%([\s\S]+?)%>/g, interpolate: /<%=([\s\S]+?)%>/g, escape: /<%-([\s\S]+?)%>/g }; var noMatch = /.^/; var escapes = { "\\": "\\", "'": "'", "r": "\r", "n": "\n", "t": " ", "u2028": "\u2028", "u2029": "\u2029" }; for (var p in escapes) escapes[escapes[p]] = p; var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; var unescaper = /\\(\\|'|r|n|t|u2028|u2029)/g; var unescape = function(code) { return code.replace(unescaper, function(match, escape) { return escapes[escape]; }); }; _.template = function(text, data, settings) { settings = _.defaults(settings || {}, _.templateSettings); var source = "__p+='" + text.replace(escaper, function(match) { return "\\" + escapes[match]; }).replace(settings.escape || noMatch, function(match, code) { return "'+\n_.escape(" + unescape(code) + ")+\n'"; }).replace(settings.interpolate || noMatch, function(match, code) { return "'+\n(" + unescape(code) + ")+\n'"; }).replace(settings.evaluate || noMatch, function(match, code) { return "';\n" + unescape(code) + "\n;__p+='"; }) + "';\n"; if (!settings.variable) source = "with(obj||{}){\n" + source + "}\n"; source = "var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n" + source + "return __p;\n"; var render = new Function(settings.variable || "obj", "_", source); if (data) return render(data, _); var template = function(data2) { return render.call(this, data2, _); }; template.source = "function(" + (settings.variable || "obj") + "){\n" + source + "}"; return template; }; _.chain = function(obj) { return _(obj).chain(); }; var wrapper = function(obj) { this._wrapped = obj; }; _.prototype = wrapper.prototype; var result = function(obj, chain) { return chain ? _(obj).chain() : obj; }; var addToWrapper = function(name, func) { wrapper.prototype[name] = function() { var args = slice.call(arguments); unshift.call(args, this._wrapped); return result(func.apply(_, args), this._chain); }; }; _.mixin(_); each(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function(name) { var method = ArrayProto[name]; wrapper.prototype[name] = function() { var wrapped = this._wrapped; method.apply(wrapped, arguments); var length = wrapped.length; if ((name == "shift" || name == "splice") && length === 0) delete wrapped[0]; return result(wrapped, this._chain); }; }); each(["concat", "join", "slice"], function(name) { var method = ArrayProto[name]; wrapper.prototype[name] = function() { return result(method.apply(this._wrapped, arguments), this._chain); }; }); wrapper.prototype.chain = function() { this._chain = true; return this; }; wrapper.prototype.value = function() { return this._wrapped; }; }).call(exports); } }); // node_modules/etherpad-lite-client/main.js var require_main = __commonJS({ "node_modules/etherpad-lite-client/main.js"(exports) { (function() { var _, http, https, querystring, retriever, url; http = require("http"); https = require("https"); url = require("url"); querystring = require("querystring"); _ = require_underscore(); retriever = null; exports.connect = function(options) { var api, apiFunctions, base, base1, fn, functionName, i, len; if (options == null) { options = {}; } if (!("apikey" in options)) { throw new Error("You must specify etherpad-lite apikey"); } api = {}; api.options = _.extend({}, options); (base = api.options).host || (base.host = "localhost"); (base1 = api.options).port || (base1.port = 9001); retriever = http; if (api.options.port === 443 || api.options.ssl) { retriever = https; } api.call = function(functionName2, functionArgs, callback) { var apiOptions, chunks, httpOptions, req, rootPath; rootPath = api.options.rootPath || "/api/1.2.12/"; apiOptions = _.extend({ "apikey": this.options.apikey }, functionArgs); httpOptions = _.extend(this.options, { path: rootPath + functionName2 + "?" + querystring.stringify(apiOptions) }); chunks = []; req = retriever.get(httpOptions, function(res) { res.on("data", function(data) { return chunks.push(data); }); return res.on("end", function() { var error, error1, response; try { response = JSON.parse(chunks.join("")); } catch (error12) { error = error12; callback({ code: -1, message: "cannot parse the API response" }, null); return; } if (response.code === 0 && response.message === "ok") { if (response.data) { return callback(null, response.data); } else { return callback(null, response); } } else { return callback({ code: response.code, message: response.message }, null); } }); }); return req.on("error", function(error) { return callback({ code: -1, message: error.message || error }, null); }); }; apiFunctions = ["createGroup", "createGroupIfNotExistsFor", "deleteGroup", "listPads", "listAllPads", "createDiffHTML", "createPad", "createGroupPad", "createAuthor", "createAuthorIfNotExistsFor", "listPadsOfAuthor", "createSession", "deleteSession", "getSessionInfo", "listSessionsOfGroup", "listSessionsOfAuthor", "getText", "setText", "getHTML", "setHTML", "getAttributePool", "getRevisionsCount", "getSavedRevisionsCount", "listSavedRevisions", "saveRevision", "getRevisionChangeset", "getLastEdited", "deletePad", "copyPad", "movePad", "getReadOnlyID", "getPadID", "setPublicStatus", "getPublicStatus", "setPassword", "isPasswordProtected", "listAuthorsOfPad", "padUsersCount", "getAuthorName", "padUsers", "sendClientsMessage", "listAllGroups", "checkToken", "appendChatMessage", "getChatHistory", "getChatHistory", "getChatHead", "restoreRevision"]; fn = function(functionName2) { return api[functionName2] = function(args, callback) { if (arguments.length === 1 && _.isFunction(args)) { callback = args; args = {}; } if (callback == null) { callback = function() { }; } api.call(functionName2, args, callback); return null; }; }; for (i = 0, len = apiFunctions.length; i < len; i++) { functionName = apiFunctions[i]; fn(functionName); } return api; }; }).call(exports); } }); // node_modules/turndown/lib/turndown.browser.cjs.js var require_turndown_browser_cjs = __commonJS({ "node_modules/turndown/lib/turndown.browser.cjs.js"(exports, module2) { "use strict"; function extend(destination) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (source.hasOwnProperty(key)) destination[key] = source[key]; } } return destination; } function repeat(character, count) { return Array(count + 1).join(character); } function trimLeadingNewlines(string) { return string.replace(/^\n*/, ""); } function trimTrailingNewlines(string) { var indexEnd = string.length; while (indexEnd > 0 && string[indexEnd - 1] === "\n") indexEnd--; return string.substring(0, indexEnd); } var blockElements = [ "ADDRESS", "ARTICLE", "ASIDE", "AUDIO", "BLOCKQUOTE", "BODY", "CANVAS", "CENTER", "DD", "DIR", "DIV", "DL", "DT", "FIELDSET", "FIGCAPTION", "FIGURE", "FOOTER", "FORM", "FRAMESET", "H1", "H2", "H3", "H4", "H5", "H6", "HEADER", "HGROUP", "HR", "HTML", "ISINDEX", "LI", "MAIN", "MENU", "NAV", "NOFRAMES", "NOSCRIPT", "OL", "OUTPUT", "P", "PRE", "SECTION", "TABLE", "TBODY", "TD", "TFOOT", "TH", "THEAD", "TR", "UL" ]; function isBlock(node) { return is(node, blockElements); } var voidElements = [ "AREA", "BASE", "BR", "COL", "COMMAND", "EMBED", "HR", "IMG", "INPUT", "KEYGEN", "LINK", "META", "PARAM", "SOURCE", "TRACK", "WBR" ]; function isVoid(node) { return is(node, voidElements); } function hasVoid(node) { return has(node, voidElements); } var meaningfulWhenBlankElements = [ "A", "TABLE", "THEAD", "TBODY", "TFOOT", "TH", "TD", "IFRAME", "SCRIPT", "AUDIO", "VIDEO" ]; function isMeaningfulWhenBlank(node) { return is(node, meaningfulWhenBlankElements); } function hasMeaningfulWhenBlank(node) { return has(node, meaningfulWhenBlankElements); } function is(node, tagNames) { return tagNames.indexOf(node.nodeName) >= 0; } function has(node, tagNames) { return node.getElementsByTagName && tagNames.some(function(tagName) { return node.getElementsByTagName(tagName).length; }); } var rules = {}; rules.paragraph = { filter: "p", replacement: function(content) { return "\n\n" + content + "\n\n"; } }; rules.lineBreak = { filter: "br", replacement: function(content, node, options) { return options.br + "\n"; } }; rules.heading = { filter: ["h1", "h2", "h3", "h4", "h5", "h6"], replacement: function(content, node, options) { var hLevel = Number(node.nodeName.charAt(1)); if (options.headingStyle === "setext" && hLevel < 3) { var underline = repeat(hLevel === 1 ? "=" : "-", content.length); return "\n\n" + content + "\n" + underline + "\n\n"; } else { return "\n\n" + repeat("#", hLevel) + " " + content + "\n\n"; } } }; rules.blockquote = { filter: "blockquote", replacement: function(content) { content = content.replace(/^\n+|\n+$/g, ""); content = content.replace(/^/gm, "> "); return "\n\n" + content + "\n\n"; } }; rules.list = { filter: ["ul", "ol"], replacement: function(content, node) { var parent = node.parentNode; if (parent.nodeName === "LI" && parent.lastElementChild === node) { return "\n" + content; } else { return "\n\n" + content + "\n\n"; } } }; rules.listItem = { filter: "li", replacement: function(content, node, options) { content = content.replace(/^\n+/, "").replace(/\n+$/, "\n").replace(/\n/gm, "\n "); var prefix = options.bulletListMarker + " "; var parent = node.parentNode; if (parent.nodeName === "OL") { var start = parent.getAttribute("start"); var index = Array.prototype.indexOf.call(parent.children, node); prefix = (start ? Number(start) + index : index + 1) + ". "; } return prefix + content + (node.nextSibling && !/\n$/.test(content) ? "\n" : ""); } }; rules.indentedCodeBlock = { filter: function(node, options) { return options.codeBlockStyle === "indented" && node.nodeName === "PRE" && node.firstChild && node.firstChild.nodeName === "CODE"; }, replacement: function(content, node, options) { return "\n\n " + node.firstChild.textContent.replace(/\n/g, "\n ") + "\n\n"; } }; rules.fencedCodeBlock = { filter: function(node, options) { return options.codeBlockStyle === "fenced" && node.nodeName === "PRE" && node.firstChild && node.firstChild.nodeName === "CODE"; }, replacement: function(content, node, options) { var className = node.firstChild.getAttribute("class") || ""; var language = (className.match(/language-(\S+)/) || [null, ""])[1]; var code = node.firstChild.textContent; var fenceChar = options.fence.charAt(0); var fenceSize = 3; var fenceInCodeRegex = new RegExp("^" + fenceChar + "{3,}", "gm"); var match; while (match = fenceInCodeRegex.exec(code)) { if (match[0].length >= fenceSize) { fenceSize = match[0].length + 1; } } var fence = repeat(fenceChar, fenceSize); return "\n\n" + fence + language + "\n" + code.replace(/\n$/, "") + "\n" + fence + "\n\n"; } }; rules.horizontalRule = { filter: "hr", replacement: function(content, node, options) { return "\n\n" + options.hr + "\n\n"; } }; rules.inlineLink = { filter: function(node, options) { return options.linkStyle === "inlined" && node.nodeName === "A" && node.getAttribute("href"); }, replacement: function(content, node) { var href = node.getAttribute("href"); var title = cleanAttribute(node.getAttribute("title")); if (title) title = ' "' + title + '"'; return "[" + content + "](" + href + title + ")"; } }; rules.referenceLink = { filter: function(node, options) { return options.linkStyle === "referenced" && node.nodeName === "A" && node.getAttribute("href"); }, replacement: function(content, node, options) { var href = node.getAttribute("href"); var title = cleanAttribute(node.getAttribute("title")); if (title) title = ' "' + title + '"'; var replacement; var reference; switch (options.linkReferenceStyle) { case "collapsed": replacement = "[" + content + "][]"; reference = "[" + content + "]: " + href + title; break; case "shortcut": replacement = "[" + content + "]"; reference = "[" + content + "]: " + href + title; break; default: var id = this.references.length + 1; replacement = "[" + content + "][" + id + "]"; reference = "[" + id + "]: " + href + title; } this.references.push(reference); return replacement; }, references: [], append: function(options) { var references = ""; if (this.references.length) { references = "\n\n" + this.references.join("\n") + "\n\n"; this.references = []; } return references; } }; rules.emphasis = { filter: ["em", "i"], replacement: function(content, node, options) { if (!content.trim()) return ""; return options.emDelimiter + content + options.emDelimiter; } }; rules.strong = { filter: ["strong", "b"], replacement: function(content, node, options) { if (!content.trim()) return ""; return options.strongDelimiter + content + options.strongDelimiter; } }; rules.code = { filter: function(node) { var hasSiblings = node.previousSibling || node.nextSibling; var isCodeBlock = node.parentNode.nodeName === "PRE" && !hasSiblings; return node.nodeName === "CODE" && !isCodeBlock; }, replacement: function(content) { if (!content) return ""; content = content.replace(/\r?\n|\r/g, " "); var extraSpace = /^`|^ .*?[^ ].* $|`$/.test(content) ? " " : ""; var delimiter = "`"; var matches = content.match(/`+/gm) || []; while (matches.indexOf(delimiter) !== -1) delimiter = delimiter + "`"; return delimiter + extraSpace + content + extraSpace + delimiter; } }; rules.image = { filter: "img", replacement: function(content, node) { var alt = cleanAttribute(node.getAttribute("alt")); var src = node.getAttribute("src") || ""; var title = cleanAttribute(node.getAttribute("title")); var titlePart = title ? ' "' + title + '"' : ""; return src ? "![" + alt + "](" + src + titlePart + ")" : ""; } }; function cleanAttribute(attribute) { return attribute ? attribute.replace(/(\n+\s*)+/g, "\n") : ""; } function Rules(options) { this.options = options; this._keep = []; this._remove = []; this.blankRule = { replacement: options.blankReplacement }; this.keepReplacement = options.keepReplacement; this.defaultRule = { replacement: options.defaultReplacement }; this.array = []; for (var key in options.rules) this.array.push(options.rules[key]); } Rules.prototype = { add: function(key, rule) { this.array.unshift(rule); }, keep: function(filter) { this._keep.unshift({ filter, replacement: this.keepReplacement }); }, remove: function(filter) { this._remove.unshift({ filter, replacement: function() { return ""; } }); }, forNode: function(node) { if (node.isBlank) return this.blankRule; var rule; if (rule = findRule(this.array, node, this.options)) return rule; if (rule = findRule(this._keep, node, this.options)) return rule; if (rule = findRule(this._remove, node, this.options)) return rule; return this.defaultRule; }, forEach: function(fn) { for (var i = 0; i < this.array.length; i++) fn(this.array[i], i); } }; function findRule(rules2, node, options) { for (var i = 0; i < rules2.length; i++) { var rule = rules2[i]; if (filterValue(rule, node, options)) return rule; } return void 0; } function filterValue(rule, node, options) { var filter = rule.filter; if (typeof filter === "string") { if (filter === node.nodeName.toLowerCase()) return true; } else if (Array.isArray(filter)) { if (filter.indexOf(node.nodeName.toLowerCase()) > -1) return true; } else if (typeof filter === "function") { if (filter.call(rule, node, options)) return true; } else { throw new TypeError("`filter` needs to be a string, array, or function"); } } function collapseWhitespace(options) { var element = options.element; var isBlock2 = options.isBlock; var isVoid2 = options.isVoid; var isPre = options.isPre || function(node2) { return node2.nodeName === "PRE"; }; if (!element.firstChild || isPre(element)) return; var prevText = null; var keepLeadingWs = false; var prev = null; var node = next(prev, element, isPre); while (node !== element) { if (node.nodeType === 3 || node.nodeType === 4) { var text = node.data.replace(/[ \r\n\t]+/g, " "); if ((!prevText || / $/.test(prevText.data)) && !keepLeadingWs && text[0] === " ") { text = text.substr(1); } if (!text) { node = remove(node); continue; } node.data = text; prevText = node; } else if (node.nodeType === 1) { if (isBlock2(node) || node.nodeName === "BR") { if (prevText) { prevText.data = prevText.data.replace(/ $/, ""); } prevText = null; keepLeadingWs = false; } else if (isVoid2(node) || isPre(node)) { prevText = null; keepLeadingWs = true; } else if (prevText) { keepLeadingWs = false; } } else { node = remove(node); continue; } var nextNode = next(prev, node, isPre); prev = node; node = nextNode; } if (prevText) { prevText.data = prevText.data.replace(/ $/, ""); if (!prevText.data) { remove(prevText); } } } function remove(node) { var next2 = node.nextSibling || node.parentNode; node.parentNode.removeChild(node); return next2; } function next(prev, current, isPre) { if (prev && prev.parentNode === current || isPre(current)) { return current.nextSibling || current.parentNode; } return current.firstChild || current.nextSibling || current.parentNode; } var root = typeof window !== "undefined" ? window : {}; function canParseHTMLNatively() { var Parser = root.DOMParser; var canParse = false; try { if (new Parser().parseFromString("", "text/html")) { canParse = true; } } catch (e) { } return canParse; } function createHTMLParser() { var Parser = function() { }; { if (shouldUseActiveX()) { Parser.prototype.parseFromString = function(string) { var doc = new window.ActiveXObject("htmlfile"); doc.designMode = "on"; doc.open(); doc.write(string); doc.close(); return doc; }; } else { Parser.prototype.parseFromString = function(string) { var doc = document.implementation.createHTMLDocument(""); doc.open(); doc.write(string); doc.close(); return doc; }; } } return Parser; } function shouldUseActiveX() { var useActiveX = false; try { document.implementation.createHTMLDocument("").open(); } catch (e) { if (window.ActiveXObject) useActiveX = true; } return useActiveX; } var HTMLParser = canParseHTMLNatively() ? root.DOMParser : createHTMLParser(); function RootNode(input, options) { var root2; if (typeof input === "string") { var doc = htmlParser().parseFromString('' + input + "", "text/html"); root2 = doc.getElementById("turndown-root"); } else { root2 = input.cloneNode(true); } collapseWhitespace({ element: root2, isBlock, isVoid, isPre: options.preformattedCode ? isPreOrCode : null }); return root2; } var _htmlParser; function htmlParser() { _htmlParser = _htmlParser || new HTMLParser(); return _htmlParser; } function isPreOrCode(node) { return node.nodeName === "PRE" || node.nodeName === "CODE"; } function Node(node, options) { node.isBlock = isBlock(node); node.isCode = node.nodeName === "CODE" || node.parentNode.isCode; node.isBlank = isBlank(node); node.flankingWhitespace = flankingWhitespace(node, options); return node; } function isBlank(node) { return !isVoid(node) && !isMeaningfulWhenBlank(node) && /^\s*$/i.test(node.textContent) && !hasVoid(node) && !hasMeaningfulWhenBlank(node); } function flankingWhitespace(node, options) { if (node.isBlock || options.preformattedCode && node.isCode) { return { leading: "", trailing: "" }; } var edges = edgeWhitespace(node.textContent); if (edges.leadingAscii && isFlankedByWhitespace("left", node, options)) { edges.leading = edges.leadingNonAscii; } if (edges.trailingAscii && isFlankedByWhitespace("right", node, options)) { edges.trailing = edges.trailingNonAscii; } return { leading: edges.leading, trailing: edges.trailing }; } function edgeWhitespace(string) { var m = string.match(/^(([ \t\r\n]*)(\s*))[\s\S]*?((\s*?)([ \t\r\n]*))$/); return { leading: m[1], leadingAscii: m[2], leadingNonAscii: m[3], trailing: m[4], trailingNonAscii: m[5], trailingAscii: m[6] }; } function isFlankedByWhitespace(side, node, options) { var sibling; var regExp; var isFlanked; if (side === "left") { sibling = node.previousSibling; regExp = / $/; } else { sibling = node.nextSibling; regExp = /^ /; } if (sibling) { if (sibling.nodeType === 3) { isFlanked = regExp.test(sibling.nodeValue); } else if (options.preformattedCode && sibling.nodeName === "CODE") { isFlanked = false; } else if (sibling.nodeType === 1 && !isBlock(sibling)) { isFlanked = regExp.test(sibling.textContent); } } return isFlanked; } var reduce = Array.prototype.reduce; var escapes = [ [/\\/g, "\\\\"], [/\*/g, "\\*"], [/^-/g, "\\-"], [/^\+ /g, "\\+ "], [/^(=+)/g, "\\$1"], [/^(#{1,6}) /g, "\\$1 "], [/`/g, "\\`"], [/^~~~/g, "\\~~~"], [/\[/g, "\\["], [/\]/g, "\\]"], [/^>/g, "\\>"], [/_/g, "\\_"], [/^(\d+)\. /g, "$1\\. "] ]; function TurndownService2(options) { if (!(this instanceof TurndownService2)) return new TurndownService2(options); var defaults = { rules, headingStyle: "setext", hr: "* * *", bulletListMarker: "*", codeBlockStyle: "indented", fence: "```", emDelimiter: "_", strongDelimiter: "**", linkStyle: "inlined", linkReferenceStyle: "full", br: " ", preformattedCode: false, blankReplacement: function(content, node) { return node.isBlock ? "\n\n" : ""; }, keepReplacement: function(content, node) { return node.isBlock ? "\n\n" + node.outerHTML + "\n\n" : node.outerHTML; }, defaultReplacement: function(content, node) { return node.isBlock ? "\n\n" + content + "\n\n" : content; } }; this.options = extend({}, defaults, options); this.rules = new Rules(this.options); } TurndownService2.prototype = { turndown: function(input) { if (!canConvert(input)) { throw new TypeError(input + " is not a string, or an element/document/fragment node."); } if (input === "") return ""; var output = process.call(this, new RootNode(input, this.options)); return postProcess.call(this, output); }, use: function(plugin) { if (Array.isArray(plugin)) { for (var i = 0; i < plugin.length; i++) this.use(plugin[i]); } else if (typeof plugin === "function") { plugin(this); } else { throw new TypeError("plugin must be a Function or an Array of Functions"); } return this; }, addRule: function(key, rule) { this.rules.add(key, rule); return this; }, keep: function(filter) { this.rules.keep(filter); return this; }, remove: function(filter) { this.rules.remove(filter); return this; }, escape: function(string) { return escapes.reduce(function(accumulator, escape) { return accumulator.replace(escape[0], escape[1]); }, string); } }; function process(parentNode) { var self = this; return reduce.call(parentNode.childNodes, function(output, node) { node = new Node(node, self.options); var replacement = ""; if (node.nodeType === 3) { replacement = node.isCode ? node.nodeValue : self.escape(node.nodeValue); } else if (node.nodeType === 1) { replacement = replacementForNode.call(self, node); } return join(output, replacement); }, ""); } function postProcess(output) { var self = this; this.rules.forEach(function(rule) { if (typeof rule.append === "function") { output = join(output, rule.append(self.options)); } }); return output.replace(/^[\t\r\n]+/, "").replace(/[\t\r\n\s]+$/, ""); } function replacementForNode(node) { var rule = this.rules.forNode(node); var content = process.call(this, node); var whitespace = node.flankingWhitespace; if (whitespace.leading || whitespace.trailing) content = content.trim(); return whitespace.leading + rule.replacement(content, node, this.options) + whitespace.trailing; } function join(output, replacement) { var s1 = trimTrailingNewlines(output); var s2 = trimLeadingNewlines(replacement); var nls = Math.max(output.length - s1.length, replacement.length - s2.length); var separator = "\n\n".substring(0, nls); return s1 + separator + s2; } function canConvert(input) { return input != null && (typeof input === "string" || input.nodeType && (input.nodeType === 1 || input.nodeType === 9 || input.nodeType === 11)); } module2.exports = TurndownService2; } }); // main.ts __export(exports, { default: () => Etherpad }); var import_obsidian = __toModule(require("obsidian")); var import_obsidian2 = __toModule(require("obsidian")); var etherpad = require_main(); var TurndownService = require_turndown_browser_cjs(); TurndownService.prototype.escape = (text) => text; function makeid(length) { let result = ""; let characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; let charactersLength = characters.length; for (let i = 0; i < length; i++) { result += characters.charAt(Math.floor(Math.random() * charactersLength)); } return result; } var td = new TurndownService().addRule("strikethrough", { filter: ["s"], replacement: function(content) { return "~~" + content + "~~"; } }).addRule("underline", { filter: ["u"], replacement: function(content) { return "==" + content + "=="; } }).addRule("a", { filter: ["a"], replacement: function(content, node, options) { return node.getAttribute("href"); } }); var DEFAULT_SETTINGS = { host: "localhost", port: 9001, apikey: "", random_pad_id: true }; var Etherpad = class extends import_obsidian.Plugin { get etherpad() { return etherpad.connect({ apikey: this.settings.apikey, host: this.settings.host, port: this.settings.port }); } onload() { return __async(this, null, function* () { yield this.loadSettings(); this.registerEvent(this.app.workspace.on("file-open", (note) => __async(this, null, function* () { this.replace_note_from_etherpad(note); }))); this.addCommand({ id: "etherpad-create-pad", name: "Convert current document to Etherpad", editorCallback: (editor, view) => __async(this, null, function* () { const note = view.file; if (!note.name) return; let note_text = editor.getValue(); let note_text_without_frontmatter = yield this.get_text_without_frontmatter(note_text, note); let pad_id = this.settings.random_pad_id ? makeid(12) : note.basename; this.etherpad.createPad({ padID: pad_id, text: note_text_without_frontmatter }, (error, data) => { if (error) { new import_obsidian.Notice(`Error creating pad ${pad_id}: ${error.message}`); } else { this.update_frontmatter(note_text, note, { etherpad_id: pad_id }); } }); }) }); this.addCommand({ id: "etherpad-get-pad", name: "Replace note content from Etherpad", editorCallback: (editor, view) => __async(this, null, function* () { const note = view.file; this.replace_note_from_etherpad(note); }) }); this.addCommand({ id: "etherpad-visit-pad", name: "Visit note in Etherpad in system browser", editorCallback: (editor, view) => __async(this, null, function* () { let note = view.file; if (!note.name) return; let frontmatter = this.get_frontmatter(note); if (frontmatter == null ? void 0 : frontmatter.etherpad_id) { let url = this.get_url_for_pad_id(frontmatter.etherpad_id); window.open(url); } }) }); this.addSettingTab(new EtherpadSettingTab(this.app, this)); }); } onunload() { } loadSettings() { return __async(this, null, function* () { this.settings = Object.assign({}, DEFAULT_SETTINGS, yield this.loadData()); }); } saveSettings() { return __async(this, null, function* () { yield this.saveData(this.settings); }); } get_frontmatter(note) { var _a; return __spreadValues({}, (_a = this.app.metadataCache.getFileCache(note)) == null ? void 0 : _a.frontmatter); } get_text_without_frontmatter(note_text, note) { return __async(this, null, function* () { var _a; let fmc = (_a = app.metadataCache.getFileCache(note)) == null ? void 0 : _a.frontmatter; if (!fmc) { return note_text; } let end = fmc.position.end.line + 1; return note_text.split("\n").slice(end).join("\n"); }); } update_frontmatter(note_text, note, d) { return __async(this, null, function* () { let frontmatter = this.get_frontmatter(note); let updated_frontmatter; if (!frontmatter) { updated_frontmatter = d; } else { updated_frontmatter = __spreadValues(__spreadValues({}, frontmatter), d); } delete updated_frontmatter.position; let frontmatter_text = `--- ${(0, import_obsidian2.stringifyYaml)(updated_frontmatter)}--- `; this.app.vault.modify(note, frontmatter_text + note_text); }); } get_url_for_pad_id(pad_id) { pad_id = pad_id.replace(" ", "_"); return `http://${this.settings.host}:${this.settings.port}/p/${pad_id}`; } replace_note_from_etherpad(note) { return __async(this, null, function* () { if (note == null) return; let frontmatter = this.get_frontmatter(note); if (!frontmatter) return; if (!frontmatter.etherpad_id) return; this.etherpad.getHTML({ padID: frontmatter.etherpad_id }, (err, data) => { if (err) { console.log("err", err); new import_obsidian.Notice("error: " + err); } else { delete frontmatter.position; let now = new Date(); frontmatter.etherpad_get_at = now.toLocaleString(); let frontmatter_text = `--- ${(0, import_obsidian2.stringifyYaml)(frontmatter)}--- `; let note_html = data.html; let note_text = td.turndown(note_html); this.app.vault.modify(note, frontmatter_text + note_text); let url = this.get_url_for_pad_id(frontmatter.etherpad_id); new import_obsidian.Notice(`Note was reloaded from ${url}. Local edits will be discarded!`); } }); }); } }; var EtherpadSettingTab = class extends import_obsidian.PluginSettingTab { constructor(app2, plugin) { super(app2, plugin); this.plugin = plugin; } display() { const { containerEl } = this; containerEl.empty(); containerEl.createEl("h2", { text: "Etherpad Settings" }); new import_obsidian.Setting(containerEl).setName("Server host").setDesc("Server host").addText((text) => text.setPlaceholder("localhost").setValue(this.plugin.settings.host).onChange((value) => __async(this, null, function* () { this.plugin.settings.host = value; yield this.plugin.saveSettings(); }))); new import_obsidian.Setting(containerEl).setName("Server port").setDesc("Server port").addText((text) => text.setPlaceholder("9001").setValue(this.plugin.settings.port.toString()).onChange((value) => __async(this, null, function* () { this.plugin.settings.port = parseInt(value); yield this.plugin.saveSettings(); }))); new import_obsidian.Setting(containerEl).setName("API key").setDesc("API key").addText((text) => text.setPlaceholder("").setValue(this.plugin.settings.apikey).onChange((value) => __async(this, null, function* () { this.plugin.settings.apikey = value; yield this.plugin.saveSettings(); }))); new import_obsidian.Setting(containerEl).setName("Random pad ID").setDesc("Use a random pad id, or current file name").addToggle((b) => b.setValue(this.plugin.settings.random_pad_id).onChange((value) => __async(this, null, function* () { this.plugin.settings.random_pad_id = value; yield this.plugin.saveSettings(); }))); } }; //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsibm9kZV9tb2R1bGVzL3VuZGVyc2NvcmUvdW5kZXJzY29yZS5qcyIsICJub2RlX21vZHVsZXMvZXRoZXJwYWQtbGl0ZS1jbGllbnQvbWFpbi5qcyIsICJub2RlX21vZHVsZXMvdHVybmRvd24vbGliL3R1cm5kb3duLmJyb3dzZXIuY2pzLmpzIiwgIm1haW4udHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIi8vICAgICBVbmRlcnNjb3JlLmpzIDEuMy4zXG4vLyAgICAgKGMpIDIwMDktMjAxMiBKZXJlbXkgQXNoa2VuYXMsIERvY3VtZW50Q2xvdWQgSW5jLlxuLy8gICAgIFVuZGVyc2NvcmUgaXMgZnJlZWx5IGRpc3RyaWJ1dGFibGUgdW5kZXIgdGhlIE1JVCBsaWNlbnNlLlxuLy8gICAgIFBvcnRpb25zIG9mIFVuZGVyc2NvcmUgYXJlIGluc3BpcmVkIG9yIGJvcnJvd2VkIGZyb20gUHJvdG90eXBlLFxuLy8gICAgIE9saXZlciBTdGVlbGUncyBGdW5jdGlvbmFsLCBhbmQgSm9obiBSZXNpZyd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nNlKGNodW5rcy5qb2luKCcnKSk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyb3IxKSB7XG4gICAgICAgICAgICBlcnJvciA9IGVycm9yMTtcbiAgICAgICAgICAgIGNhbGxiYWNrKHtcbiAgICAgICAgICAgICAgY29kZTogLTEsXG4gICAgICAgICAgICAgIG1lc3NhZ2U6ICdjYW5ub3QgcGFyc2UgdGhlIEFQSSByZXNwb25zZSdcbiAgICAgICAgICAgIH0sIG51bGwpO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAocmVzcG9uc2UuY29kZSA9PT0gMCAmJiByZXNwb25zZS5tZXNzYWdlID09PSAnb2snKSB7XG4gICAgICAgICAgICBpZiAocmVzcG9uc2UuZGF0YSkge1xuICAgICAgICAgICAgICByZXR1cm4gY2FsbGJhY2sobnVsbCwgcmVzcG9uc2UuZGF0YSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXR1cm4gY2FsbGJhY2sobnVsbCwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gY2FsbGJhY2soe1xuICAgICAgICAgICAgICBjb2RlOiByZXNwb25zZS5jb2RlLFxuICAgICAgICAgICAgICBtZXNzYWdlOiByZXNwb25zZS5tZXNzYWdlXG4gICAgICAgICAgICB9LCBudWxsKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfSk7XG4gICAgICByZXR1cm4gcmVxLm9uKCdlcnJvcicsIGZ1bmN0aW9uKGVycm9yKSB7XG4gICAgICAgIHJldHVybiBjYWxsYmFjayh7XG4gICAgICAgICAgY29kZTogLTEsXG4gICAgICAgICAgbWVzc2FnZTogZXJyb3IubWVzc2FnZSB8fCBlcnJvclxuICAgICAgICB9LCBudWxsKTtcbiAgICAgIH0pO1xuICAgIH07XG4gICAgYXBpRnVuY3Rpb25zID0gWydjcmVh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