retold-content-system 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +130 -68
- package/package.json +3 -3
- package/source/cli/ContentSystem-Server-Setup.js +7 -3
- package/web-application/js/pict.min.js +2 -2
- package/web-application/retold-content-system.compatible.js +50 -7
- package/web-application/retold-content-system.compatible.js.map +1 -1
- package/web-application/retold-content-system.compatible.min.js +5 -5
- package/web-application/retold-content-system.compatible.min.js.map +1 -1
- package/web-application/retold-content-system.js +49 -6
- package/web-application/retold-content-system.js.map +1 -1
- package/web-application/retold-content-system.min.js +1 -1
- package/web-application/retold-content-system.min.js.map +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _createForOfIteratorHelper(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=_unsupportedIterableToArray(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,r=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function _superPropGet(t,e,n,i){var o=_get(_getPrototypeOf(1&i?t.prototype:t),e,n);return 2&i&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=_superPropBase(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},_get.apply(null,arguments)}function _superPropBase(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=_getPrototypeOf(t)););return t}function _callSuper(t,e,n){return e=_getPrototypeOf(e),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(e,n||[],_getPrototypeOf(t).constructor):e.apply(t,n))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function _defineProperty(t,e,n){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}!function(t){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).RetoldContentSystem=t()}}(function(){return function t(e,n,i){function o(a,s){if(!n[a]){if(!e[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var d=n[a]={exports:{}};e[a][0].call(d.exports,function(t){return o(e[a][1][t]||t)},d,d.exports,t,e,n,i)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,e,n){},{}],2:[function(t,e,n){arguments[4][1][0].apply(n,arguments)},{dup:1}],3:[function(t,e,n){var i=t("function-bind"),o=t("./functionApply"),r=t("./functionCall"),a=t("./reflectApply");e.exports=a||i.call(r,o)},{"./functionApply":4,"./functionCall":5,"./reflectApply":7,"function-bind":22}],4:[function(t,e,n){e.exports=Function.prototype.apply},{}],5:[function(t,e,n){e.exports=Function.prototype.call},{}],6:[function(t,e,n){var i=t("function-bind"),o=t("es-errors/type"),r=t("./functionCall"),a=t("./actualApply");e.exports=function(t){if(t.length<1||"function"!=typeof t[0])throw new o("a function is required");return a(i,r,t)}},{"./actualApply":3,"./functionCall":5,"es-errors/type":16,"function-bind":22}],7:[function(t,e,n){e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},{}],8:[function(t,e,n){var i=t("get-intrinsic"),o=t("call-bind-apply-helpers"),r=o([i("%String.prototype.indexOf%")]);e.exports=function(t,e){var n=i(t,!!e);return"function"==typeof n&&r(t,".prototype.")>-1?o([n]):n}},{"call-bind-apply-helpers":6,"get-intrinsic":23}],9:[function(t,e,n){var i,o=t("call-bind-apply-helpers"),r=t("gopd");try{i=[].__proto__===Array.prototype}catch(t){if(!t||"object"!==_typeof(t)||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var a=!!i&&r&&r(Object.prototype,"__proto__"),s=Object,c=s.getPrototypeOf;e.exports=a&&"function"==typeof a.get?o([a.get]):"function"==typeof c&&function(t){return c(null==t?t:s(t))}},{"call-bind-apply-helpers":6,gopd:28}],10:[function(t,e,n){var i=Object.defineProperty||!1;if(i)try{i({},"a",{value:1})}catch(t){i=!1}e.exports=i},{}],11:[function(t,e,n){e.exports=EvalError},{}],12:[function(t,e,n){e.exports=Error},{}],13:[function(t,e,n){e.exports=RangeError},{}],14:[function(t,e,n){e.exports=ReferenceError},{}],15:[function(t,e,n){e.exports=SyntaxError},{}],16:[function(t,e,n){e.exports=TypeError},{}],17:[function(t,e,n){e.exports=URIError},{}],18:[function(t,e,n){e.exports=Object},{}],19:[function(t,e,n){e.exports={name:"fable-serviceproviderbase",version:"3.0.19",description:"Simple base classes for fable services.",main:"source/Fable-ServiceProviderBase.js",scripts:{start:"node source/Fable-ServiceProviderBase.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build",types:"tsc -p ./tsconfig.build.json",check:"tsc -p . --noEmit"},types:"types/source/Fable-ServiceProviderBase.d.ts",mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"https://github.com/stevenvelozo/fable-serviceproviderbase.git"},keywords:["entity","behavior"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable-serviceproviderbase/issues"},homepage:"https://github.com/stevenvelozo/fable-serviceproviderbase",devDependencies:{"@types/mocha":"^10.0.10",fable:"^3.1.62",quackage:"^1.0.58",typescript:"^5.9.3"}}},{}],20:[function(t,e,n){var i=t("../package.json"),o=function(){return _createClass(function t(e,n,o){_classCallCheck(this,t),this.fable,this.UUID,this.options,this.services,this.servicesMap,"object"===_typeof(e)&&e.isFable?this.connectFable(e):this.fable=!1,this._PackageFableServiceProvider=i,this.fable?(this.UUID=e.getUUID(),this.options="object"===_typeof(n)?n:{}):(this.options="object"!==_typeof(e)||e.isFable?"object"===_typeof(n)?n:{}:e,this.UUID="CORE-SVC-".concat(Math.floor(89999*Math.random()+1e4))),this.serviceType="Unknown-".concat(this.UUID),this.Hash="string"==typeof o?o:this.fable||"string"!=typeof n?"".concat(this.UUID):n},[{key:"connectFable",value:function(t){if("object"!==_typeof(t)||!t.isFable){var e="Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [".concat(_typeof(t),"].}");return console.log(e),new Error(e)}return this.fable||(this.fable=t),this.log||(this.log=this.fable.Logging),this.services||(this.services=this.fable.services),this.servicesMap||(this.servicesMap=this.fable.servicesMap),!0}}])}();_defineProperty(o,"isFableService",!0),e.exports=o,e.exports.CoreServiceProviderBase=o},{"../package.json":19}],21:[function(t,e,n){var i=Object.prototype.toString,o=Math.max,r=function(t,e){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var o=0;o<e.length;o+=1)n[o+t.length]=e[o];return n};e.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==i.apply(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n,a=function(t,e){for(var n=[],i=e||0,o=0;i<t.length;i+=1,o+=1)n[o]=t[i];return n}(arguments,1),s=o(0,e.length-a.length),c=[],l=0;l<s;l++)c[l]="$"+l;if(n=Function("binder","return function ("+function(t,e){for(var n="",i=0;i<t.length;i+=1)n+=t[i],i+1<t.length&&(n+=e);return n}(c,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof n){var i=e.apply(this,r(a,arguments));return Object(i)===i?i:this}return e.apply(t,r(a,arguments))}),e.prototype){var d=function(){};d.prototype=e.prototype,n.prototype=new d,d.prototype=null}return n}},{}],22:[function(t,e,n){var i=t("./implementation");e.exports=Function.prototype.bind||i},{"./implementation":21}],23:[function(t,e,n){var i,o=t("es-object-atoms"),r=t("es-errors"),a=t("es-errors/eval"),s=t("es-errors/range"),c=t("es-errors/ref"),l=t("es-errors/syntax"),d=t("es-errors/type"),p=t("es-errors/uri"),u=t("math-intrinsics/abs"),h=t("math-intrinsics/floor"),f=t("math-intrinsics/max"),v=t("math-intrinsics/min"),g=t("math-intrinsics/pow"),m=t("math-intrinsics/round"),y=t("math-intrinsics/sign"),b=Function,w=function(t){try{return b('"use strict"; return ('+t+").constructor;")()}catch(t){}},C=t("gopd"),x=t("es-define-property"),A=function(){throw new d},D=C?function(){try{return A}catch(t){try{return C(arguments,"callee").get}catch(t){return A}}}():A,k=t("has-symbols")(),E=t("get-proto"),S=t("get-proto/Object.getPrototypeOf"),P=t("get-proto/Reflect.getPrototypeOf"),T=t("call-bind-apply-helpers/functionApply"),I=t("call-bind-apply-helpers/functionCall"),_={},F="undefined"!=typeof Uint8Array&&E?E(Uint8Array):i,L={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":k&&E?E([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":_,"%AsyncGenerator%":_,"%AsyncGeneratorFunction%":_,"%AsyncIteratorPrototype%":_,"%Atomics%":"undefined"==typeof Atomics?i:Atomics,"%BigInt%":"undefined"==typeof BigInt?i:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"undefined"==typeof Float16Array?i:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":_,"%Int8Array%":"undefined"==typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":k&&E?E(E([][Symbol.iterator]())):i,"%JSON%":"object"===("undefined"==typeof JSON?"undefined":_typeof(JSON))?JSON:i,"%Map%":"undefined"==typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&k&&E?E((new Map)[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":C,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?i:Promise,"%Proxy%":"undefined"==typeof Proxy?i:Proxy,"%RangeError%":s,"%ReferenceError%":c,"%Reflect%":"undefined"==typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&k&&E?E((new Set)[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":k&&E?E(""[Symbol.iterator]()):i,"%Symbol%":k?Symbol:i,"%SyntaxError%":l,"%ThrowTypeError%":D,"%TypedArray%":F,"%TypeError%":d,"%Uint8Array%":"undefined"==typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?i:Uint32Array,"%URIError%":p,"%WeakMap%":"undefined"==typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?i:WeakSet,"%Function.prototype.call%":I,"%Function.prototype.apply%":T,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":S,"%Math.abs%":u,"%Math.floor%":h,"%Math.max%":f,"%Math.min%":v,"%Math.pow%":g,"%Math.round%":m,"%Math.sign%":y,"%Reflect.getPrototypeOf%":P};if(E)try{null.error}catch(t){var M=E(E(t));L["%Error.prototype%"]=M}var R=function t(e){var n;if("%AsyncFunction%"===e)n=w("async function () {}");else if("%GeneratorFunction%"===e)n=w("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=w("async function* () {}");else if("%AsyncGenerator%"===e){var i=t("%AsyncGeneratorFunction%");i&&(n=i.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&E&&(n=E(o.prototype))}return L[e]=n,n},B={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},H=t("function-bind"),V=t("hasown"),j=H.call(I,Array.prototype.concat),O=H.call(T,Array.prototype.splice),N=H.call(I,String.prototype.replace),U=H.call(I,String.prototype.slice),z=H.call(I,RegExp.prototype.exec),W=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,q=/\\(\\)?/g,Q=function(t,e){var n,i=t;if(V(B,i)&&(i="%"+(n=B[i])[0]+"%"),V(L,i)){var o=L[i];if(o===_&&(o=R(i)),void 0===o&&!e)throw new d("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:o}}throw new l("intrinsic "+t+" does not exist!")};e.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new d("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new d('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,t))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(t){var e=U(t,0,1),n=U(t,-1);if("%"===e&&"%"!==n)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new l("invalid intrinsic syntax, expected opening `%`");var i=[];return N(t,W,function(t,e,n,o){i[i.length]=n?N(o,q,"$1"):e||t}),i}(t),i=n.length>0?n[0]:"",o=Q("%"+i+"%",e),r=o.name,a=o.value,s=!1,c=o.alias;c&&(i=c[0],O(n,j([0,1],c)));for(var p=1,u=!0;p<n.length;p+=1){var h=n[p],f=U(h,0,1),v=U(h,-1);if(('"'===f||"'"===f||"`"===f||'"'===v||"'"===v||"`"===v)&&f!==v)throw new l("property names with quotes must have matching quotes");if("constructor"!==h&&u||(s=!0),V(L,r="%"+(i+="."+h)+"%"))a=L[r];else if(null!=a){if(!(h in a)){if(!e)throw new d("base intrinsic for "+t+" exists, but the property is not available.");return}if(C&&p+1>=n.length){var g=C(a,h);a=(u=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[h]}else u=V(a,h),a=a[h];u&&!s&&(L[r]=a)}}return a}},{"call-bind-apply-helpers/functionApply":4,"call-bind-apply-helpers/functionCall":5,"es-define-property":10,"es-errors":12,"es-errors/eval":11,"es-errors/range":13,"es-errors/ref":14,"es-errors/syntax":15,"es-errors/type":16,"es-errors/uri":17,"es-object-atoms":18,"function-bind":22,"get-proto":26,"get-proto/Object.getPrototypeOf":24,"get-proto/Reflect.getPrototypeOf":25,gopd:28,"has-symbols":29,hasown:31,"math-intrinsics/abs":33,"math-intrinsics/floor":34,"math-intrinsics/max":36,"math-intrinsics/min":37,"math-intrinsics/pow":38,"math-intrinsics/round":39,"math-intrinsics/sign":40}],24:[function(t,e,n){var i=t("es-object-atoms");e.exports=i.getPrototypeOf||null},{"es-object-atoms":18}],25:[function(t,e,n){e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},{}],26:[function(t,e,n){var i=t("./Reflect.getPrototypeOf"),o=t("./Object.getPrototypeOf"),r=t("dunder-proto/get");e.exports=i?function(t){return i(t)}:o?function(t){if(!t||"object"!==_typeof(t)&&"function"!=typeof t)throw new TypeError("getProto: not an object");return o(t)}:r?function(t){return r(t)}:null},{"./Object.getPrototypeOf":24,"./Reflect.getPrototypeOf":25,"dunder-proto/get":9}],27:[function(t,e,n){e.exports=Object.getOwnPropertyDescriptor},{}],28:[function(t,e,n){var i=t("./gOPD");if(i)try{i([],"length")}catch(t){i=null}e.exports=i},{"./gOPD":27}],29:[function(t,e,n){var i="undefined"!=typeof Symbol&&Symbol,o=t("./shams");e.exports=function(){return"function"==typeof i&&("function"==typeof Symbol&&("symbol"===_typeof(i("foo"))&&("symbol"===_typeof(Symbol("bar"))&&o())))}},{"./shams":30}],30:[function(t,e,n){e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"===_typeof(Symbol.iterator))return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var i in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var r=Object.getOwnPropertyDescriptor(t,e);if(42!==r.value||!0!==r.enumerable)return!1}return!0}},{}],31:[function(t,e,n){var i=Function.prototype.call,o=Object.prototype.hasOwnProperty,r=t("function-bind");e.exports=r.call(i,o)},{"function-bind":22}],32:[function(t,e,n){!function(){var t,i,o,r,a,s,c,l,d,p,u,h,f,v,g,m,y,b,w,C,x,A,D,k,E,S,P,T,I,_,F,L=function(t){var e=new L.Builder;return e.pipeline.add(L.trimmer,L.stopWordFilter,L.stemmer),e.searchPipeline.add(L.stemmer),t.call(e,e),e.build()};L.version="2.3.9",
|
|
1
|
+
"use strict";function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _createForOfIteratorHelper(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=_unsupportedIterableToArray(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,r=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function _superPropGet(t,e,n,i){var o=_get(_getPrototypeOf(1&i?t.prototype:t),e,n);return 2&i&&"function"==typeof o?function(t){return o.apply(n,t)}:o}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=_superPropBase(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},_get.apply(null,arguments)}function _superPropBase(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=_getPrototypeOf(t)););return t}function _callSuper(t,e,n){return e=_getPrototypeOf(e),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(e,n||[],_getPrototypeOf(t).constructor):e.apply(t,n))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function _defineProperty(t,e,n){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}!function(t){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).RetoldContentSystem=t()}}(function(){return function t(e,n,i){function o(a,s){if(!n[a]){if(!e[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var d=n[a]={exports:{}};e[a][0].call(d.exports,function(t){return o(e[a][1][t]||t)},d,d.exports,t,e,n,i)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,e,n){},{}],2:[function(t,e,n){arguments[4][1][0].apply(n,arguments)},{dup:1}],3:[function(t,e,n){var i=t("function-bind"),o=t("./functionApply"),r=t("./functionCall"),a=t("./reflectApply");e.exports=a||i.call(r,o)},{"./functionApply":4,"./functionCall":5,"./reflectApply":7,"function-bind":22}],4:[function(t,e,n){e.exports=Function.prototype.apply},{}],5:[function(t,e,n){e.exports=Function.prototype.call},{}],6:[function(t,e,n){var i=t("function-bind"),o=t("es-errors/type"),r=t("./functionCall"),a=t("./actualApply");e.exports=function(t){if(t.length<1||"function"!=typeof t[0])throw new o("a function is required");return a(i,r,t)}},{"./actualApply":3,"./functionCall":5,"es-errors/type":16,"function-bind":22}],7:[function(t,e,n){e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},{}],8:[function(t,e,n){var i=t("get-intrinsic"),o=t("call-bind-apply-helpers"),r=o([i("%String.prototype.indexOf%")]);e.exports=function(t,e){var n=i(t,!!e);return"function"==typeof n&&r(t,".prototype.")>-1?o([n]):n}},{"call-bind-apply-helpers":6,"get-intrinsic":23}],9:[function(t,e,n){var i,o=t("call-bind-apply-helpers"),r=t("gopd");try{i=[].__proto__===Array.prototype}catch(t){if(!t||"object"!==_typeof(t)||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var a=!!i&&r&&r(Object.prototype,"__proto__"),s=Object,c=s.getPrototypeOf;e.exports=a&&"function"==typeof a.get?o([a.get]):"function"==typeof c&&function(t){return c(null==t?t:s(t))}},{"call-bind-apply-helpers":6,gopd:28}],10:[function(t,e,n){var i=Object.defineProperty||!1;if(i)try{i({},"a",{value:1})}catch(t){i=!1}e.exports=i},{}],11:[function(t,e,n){e.exports=EvalError},{}],12:[function(t,e,n){e.exports=Error},{}],13:[function(t,e,n){e.exports=RangeError},{}],14:[function(t,e,n){e.exports=ReferenceError},{}],15:[function(t,e,n){e.exports=SyntaxError},{}],16:[function(t,e,n){e.exports=TypeError},{}],17:[function(t,e,n){e.exports=URIError},{}],18:[function(t,e,n){e.exports=Object},{}],19:[function(t,e,n){e.exports={name:"fable-serviceproviderbase",version:"3.0.19",description:"Simple base classes for fable services.",main:"source/Fable-ServiceProviderBase.js",scripts:{start:"node source/Fable-ServiceProviderBase.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build",types:"tsc -p ./tsconfig.build.json",check:"tsc -p . --noEmit"},types:"types/source/Fable-ServiceProviderBase.d.ts",mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},repository:{type:"git",url:"https://github.com/stevenvelozo/fable-serviceproviderbase.git"},keywords:["entity","behavior"],author:"Steven Velozo <steven@velozo.com> (http://velozo.com/)",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/fable-serviceproviderbase/issues"},homepage:"https://github.com/stevenvelozo/fable-serviceproviderbase",devDependencies:{"@types/mocha":"^10.0.10",fable:"^3.1.62",quackage:"^1.0.58",typescript:"^5.9.3"}}},{}],20:[function(t,e,n){var i=t("../package.json"),o=function(){return _createClass(function t(e,n,o){_classCallCheck(this,t),this.fable,this.UUID,this.options,this.services,this.servicesMap,"object"===_typeof(e)&&e.isFable?this.connectFable(e):this.fable=!1,this._PackageFableServiceProvider=i,this.fable?(this.UUID=e.getUUID(),this.options="object"===_typeof(n)?n:{}):(this.options="object"!==_typeof(e)||e.isFable?"object"===_typeof(n)?n:{}:e,this.UUID="CORE-SVC-".concat(Math.floor(89999*Math.random()+1e4))),this.serviceType="Unknown-".concat(this.UUID),this.Hash="string"==typeof o?o:this.fable||"string"!=typeof n?"".concat(this.UUID):n},[{key:"connectFable",value:function(t){if("object"!==_typeof(t)||!t.isFable){var e="Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [".concat(_typeof(t),"].}");return console.log(e),new Error(e)}return this.fable||(this.fable=t),this.log||(this.log=this.fable.Logging),this.services||(this.services=this.fable.services),this.servicesMap||(this.servicesMap=this.fable.servicesMap),!0}}])}();_defineProperty(o,"isFableService",!0),e.exports=o,e.exports.CoreServiceProviderBase=o},{"../package.json":19}],21:[function(t,e,n){var i=Object.prototype.toString,o=Math.max,r=function(t,e){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var o=0;o<e.length;o+=1)n[o+t.length]=e[o];return n};e.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==i.apply(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n,a=function(t,e){for(var n=[],i=e||0,o=0;i<t.length;i+=1,o+=1)n[o]=t[i];return n}(arguments,1),s=o(0,e.length-a.length),c=[],l=0;l<s;l++)c[l]="$"+l;if(n=Function("binder","return function ("+function(t,e){for(var n="",i=0;i<t.length;i+=1)n+=t[i],i+1<t.length&&(n+=e);return n}(c,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof n){var i=e.apply(this,r(a,arguments));return Object(i)===i?i:this}return e.apply(t,r(a,arguments))}),e.prototype){var d=function(){};d.prototype=e.prototype,n.prototype=new d,d.prototype=null}return n}},{}],22:[function(t,e,n){var i=t("./implementation");e.exports=Function.prototype.bind||i},{"./implementation":21}],23:[function(t,e,n){var i,o=t("es-object-atoms"),r=t("es-errors"),a=t("es-errors/eval"),s=t("es-errors/range"),c=t("es-errors/ref"),l=t("es-errors/syntax"),d=t("es-errors/type"),p=t("es-errors/uri"),u=t("math-intrinsics/abs"),h=t("math-intrinsics/floor"),f=t("math-intrinsics/max"),v=t("math-intrinsics/min"),g=t("math-intrinsics/pow"),m=t("math-intrinsics/round"),y=t("math-intrinsics/sign"),b=Function,w=function(t){try{return b('"use strict"; return ('+t+").constructor;")()}catch(t){}},C=t("gopd"),x=t("es-define-property"),A=function(){throw new d},D=C?function(){try{return A}catch(t){try{return C(arguments,"callee").get}catch(t){return A}}}():A,k=t("has-symbols")(),E=t("get-proto"),S=t("get-proto/Object.getPrototypeOf"),P=t("get-proto/Reflect.getPrototypeOf"),T=t("call-bind-apply-helpers/functionApply"),_=t("call-bind-apply-helpers/functionCall"),F={},I="undefined"!=typeof Uint8Array&&E?E(Uint8Array):i,L={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":k&&E?E([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":F,"%AsyncGenerator%":F,"%AsyncGeneratorFunction%":F,"%AsyncIteratorPrototype%":F,"%Atomics%":"undefined"==typeof Atomics?i:Atomics,"%BigInt%":"undefined"==typeof BigInt?i:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"undefined"==typeof Float16Array?i:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":F,"%Int8Array%":"undefined"==typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":k&&E?E(E([][Symbol.iterator]())):i,"%JSON%":"object"===("undefined"==typeof JSON?"undefined":_typeof(JSON))?JSON:i,"%Map%":"undefined"==typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&k&&E?E((new Map)[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":C,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?i:Promise,"%Proxy%":"undefined"==typeof Proxy?i:Proxy,"%RangeError%":s,"%ReferenceError%":c,"%Reflect%":"undefined"==typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&k&&E?E((new Set)[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":k&&E?E(""[Symbol.iterator]()):i,"%Symbol%":k?Symbol:i,"%SyntaxError%":l,"%ThrowTypeError%":D,"%TypedArray%":I,"%TypeError%":d,"%Uint8Array%":"undefined"==typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?i:Uint32Array,"%URIError%":p,"%WeakMap%":"undefined"==typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?i:WeakSet,"%Function.prototype.call%":_,"%Function.prototype.apply%":T,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":S,"%Math.abs%":u,"%Math.floor%":h,"%Math.max%":f,"%Math.min%":v,"%Math.pow%":g,"%Math.round%":m,"%Math.sign%":y,"%Reflect.getPrototypeOf%":P};if(E)try{null.error}catch(t){var M=E(E(t));L["%Error.prototype%"]=M}var R=function t(e){var n;if("%AsyncFunction%"===e)n=w("async function () {}");else if("%GeneratorFunction%"===e)n=w("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=w("async function* () {}");else if("%AsyncGenerator%"===e){var i=t("%AsyncGeneratorFunction%");i&&(n=i.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&E&&(n=E(o.prototype))}return L[e]=n,n},B={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},H=t("function-bind"),V=t("hasown"),j=H.call(_,Array.prototype.concat),O=H.call(T,Array.prototype.splice),N=H.call(_,String.prototype.replace),U=H.call(_,String.prototype.slice),z=H.call(_,RegExp.prototype.exec),W=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,q=/\\(\\)?/g,Q=function(t,e){var n,i=t;if(V(B,i)&&(i="%"+(n=B[i])[0]+"%"),V(L,i)){var o=L[i];if(o===F&&(o=R(i)),void 0===o&&!e)throw new d("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:o}}throw new l("intrinsic "+t+" does not exist!")};e.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new d("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new d('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,t))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(t){var e=U(t,0,1),n=U(t,-1);if("%"===e&&"%"!==n)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new l("invalid intrinsic syntax, expected opening `%`");var i=[];return N(t,W,function(t,e,n,o){i[i.length]=n?N(o,q,"$1"):e||t}),i}(t),i=n.length>0?n[0]:"",o=Q("%"+i+"%",e),r=o.name,a=o.value,s=!1,c=o.alias;c&&(i=c[0],O(n,j([0,1],c)));for(var p=1,u=!0;p<n.length;p+=1){var h=n[p],f=U(h,0,1),v=U(h,-1);if(('"'===f||"'"===f||"`"===f||'"'===v||"'"===v||"`"===v)&&f!==v)throw new l("property names with quotes must have matching quotes");if("constructor"!==h&&u||(s=!0),V(L,r="%"+(i+="."+h)+"%"))a=L[r];else if(null!=a){if(!(h in a)){if(!e)throw new d("base intrinsic for "+t+" exists, but the property is not available.");return}if(C&&p+1>=n.length){var g=C(a,h);a=(u=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[h]}else u=V(a,h),a=a[h];u&&!s&&(L[r]=a)}}return a}},{"call-bind-apply-helpers/functionApply":4,"call-bind-apply-helpers/functionCall":5,"es-define-property":10,"es-errors":12,"es-errors/eval":11,"es-errors/range":13,"es-errors/ref":14,"es-errors/syntax":15,"es-errors/type":16,"es-errors/uri":17,"es-object-atoms":18,"function-bind":22,"get-proto":26,"get-proto/Object.getPrototypeOf":24,"get-proto/Reflect.getPrototypeOf":25,gopd:28,"has-symbols":29,hasown:31,"math-intrinsics/abs":33,"math-intrinsics/floor":34,"math-intrinsics/max":36,"math-intrinsics/min":37,"math-intrinsics/pow":38,"math-intrinsics/round":39,"math-intrinsics/sign":40}],24:[function(t,e,n){var i=t("es-object-atoms");e.exports=i.getPrototypeOf||null},{"es-object-atoms":18}],25:[function(t,e,n){e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},{}],26:[function(t,e,n){var i=t("./Reflect.getPrototypeOf"),o=t("./Object.getPrototypeOf"),r=t("dunder-proto/get");e.exports=i?function(t){return i(t)}:o?function(t){if(!t||"object"!==_typeof(t)&&"function"!=typeof t)throw new TypeError("getProto: not an object");return o(t)}:r?function(t){return r(t)}:null},{"./Object.getPrototypeOf":24,"./Reflect.getPrototypeOf":25,"dunder-proto/get":9}],27:[function(t,e,n){e.exports=Object.getOwnPropertyDescriptor},{}],28:[function(t,e,n){var i=t("./gOPD");if(i)try{i([],"length")}catch(t){i=null}e.exports=i},{"./gOPD":27}],29:[function(t,e,n){var i="undefined"!=typeof Symbol&&Symbol,o=t("./shams");e.exports=function(){return"function"==typeof i&&("function"==typeof Symbol&&("symbol"===_typeof(i("foo"))&&("symbol"===_typeof(Symbol("bar"))&&o())))}},{"./shams":30}],30:[function(t,e,n){e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"===_typeof(Symbol.iterator))return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var i in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var r=Object.getOwnPropertyDescriptor(t,e);if(42!==r.value||!0!==r.enumerable)return!1}return!0}},{}],31:[function(t,e,n){var i=Function.prototype.call,o=Object.prototype.hasOwnProperty,r=t("function-bind");e.exports=r.call(i,o)},{"function-bind":22}],32:[function(t,e,n){!function(){var t,i,o,r,a,s,c,l,d,p,u,h,f,v,g,m,y,b,w,C,x,A,D,k,E,S,P,T,_,F,I,L=function(t){var e=new L.Builder;return e.pipeline.add(L.trimmer,L.stopWordFilter,L.stemmer),e.searchPipeline.add(L.stemmer),t.call(e,e),e.build()};L.version="2.3.9",
|
|
2
2
|
/*!
|
|
3
3
|
* lunr.utils
|
|
4
4
|
* Copyright (C) 2020 Oliver Nightingale
|
|
@@ -29,7 +29,7 @@ L.Vector=function(t){this._magnitude=0,this.elements=t||[]},L.Vector.prototype.p
|
|
|
29
29
|
* Copyright (C) 2020 Oliver Nightingale
|
|
30
30
|
* Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt
|
|
31
31
|
*/
|
|
32
|
-
L.stemmer=(t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},i={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},s="^("+(r="[^aeiou][^aeiouy]*")+")?"+(a=(o="[aeiouy]")+"[aeiou]*")+r+"("+a+")?$",c="^("+r+")?"+a+r+a+r,l="^("+r+")?"+o,d=new RegExp("^("+r+")?"+a+r),p=new RegExp(c),u=new RegExp(s),h=new RegExp(l),f=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,g=/^(.+?)eed$/,m=/^(.+?)(ed|ing)$/,y=/.$/,b=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),C=new RegExp("^"+r+o+"[^aeiouwxy]$"),x=/^(.+?[^aeiou])y$/,A=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,D=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,k=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,E=/^(.+?)(s|t)(ion)$/,S=/^(.+?)e$/,P=/ll$/,T=new RegExp("^"+r+o+"[^aeiouwxy]$"),
|
|
32
|
+
L.stemmer=(t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},i={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},s="^("+(r="[^aeiou][^aeiouy]*")+")?"+(a=(o="[aeiouy]")+"[aeiou]*")+r+"("+a+")?$",c="^("+r+")?"+a+r+a+r,l="^("+r+")?"+o,d=new RegExp("^("+r+")?"+a+r),p=new RegExp(c),u=new RegExp(s),h=new RegExp(l),f=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,g=/^(.+?)eed$/,m=/^(.+?)(ed|ing)$/,y=/.$/,b=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),C=new RegExp("^"+r+o+"[^aeiouwxy]$"),x=/^(.+?[^aeiou])y$/,A=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,D=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,k=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,E=/^(.+?)(s|t)(ion)$/,S=/^(.+?)e$/,P=/ll$/,T=new RegExp("^"+r+o+"[^aeiouwxy]$"),_=function(e){var n,o,r,a,s,c,l;if(e.length<3)return e;if("y"==(r=e.substr(0,1))&&(e=r.toUpperCase()+e.substr(1)),s=v,(a=f).test(e)?e=e.replace(a,"$1$2"):s.test(e)&&(e=e.replace(s,"$1$2")),s=m,(a=g).test(e)){var _=a.exec(e);(a=d).test(_[1])&&(a=y,e=e.replace(a,""))}else s.test(e)&&(n=(_=s.exec(e))[1],(s=h).test(n)&&(c=w,l=C,(s=b).test(e=n)?e+="e":c.test(e)?(a=y,e=e.replace(a,"")):l.test(e)&&(e+="e")));return(a=x).test(e)&&(e=(n=(_=a.exec(e))[1])+"i"),(a=A).test(e)&&(n=(_=a.exec(e))[1],o=_[2],(a=d).test(n)&&(e=n+t[o])),(a=D).test(e)&&(n=(_=a.exec(e))[1],o=_[2],(a=d).test(n)&&(e=n+i[o])),s=E,(a=k).test(e)?(n=(_=a.exec(e))[1],(a=p).test(n)&&(e=n)):s.test(e)&&(n=(_=s.exec(e))[1]+_[2],(s=p).test(n)&&(e=n)),(a=S).test(e)&&(n=(_=a.exec(e))[1],s=u,c=T,((a=p).test(n)||s.test(n)&&!c.test(n))&&(e=n)),s=p,(a=P).test(e)&&s.test(e)&&(a=y,e=e.replace(a,"")),"y"==r&&(e=r.toLowerCase()+e.substr(1)),e},function(t){return t.update(_)}),L.Pipeline.registerFunction(L.stemmer,"stemmer"),
|
|
33
33
|
/*!
|
|
34
34
|
* lunr.stopWordFilter
|
|
35
35
|
* Copyright (C) 2020 Oliver Nightingale
|
|
@@ -49,12 +49,12 @@ L.TokenSet=function(){this.final=!1,this.edges={},this.id=L.TokenSet._nextId,L.T
|
|
|
49
49
|
* lunr.Index
|
|
50
50
|
* Copyright (C) 2020 Oliver Nightingale
|
|
51
51
|
*/
|
|
52
|
-
L.Index=function(t){this.invertedIndex=t.invertedIndex,this.fieldVectors=t.fieldVectors,this.tokenSet=t.tokenSet,this.fields=t.fields,this.pipeline=t.pipeline},L.Index.prototype.search=function(t){return this.query(function(e){new L.QueryParser(t,e).parse()})},L.Index.prototype.query=function(t){for(var e=new L.Query(this.fields),n=Object.create(null),i=Object.create(null),o=Object.create(null),r=Object.create(null),a=Object.create(null),s=0;s<this.fields.length;s++)i[this.fields[s]]=new L.Vector;t.call(e,e);for(s=0;s<e.clauses.length;s++){var c=e.clauses[s],l=null,d=L.Set.empty;l=c.usePipeline?this.pipeline.runString(c.term,{fields:c.fields}):[c.term];for(var p=0;p<l.length;p++){var u=l[p];c.term=u;var h=L.TokenSet.fromClause(c),f=this.tokenSet.intersect(h).toArray();if(0===f.length&&c.presence===L.Query.presence.REQUIRED){for(var v=0;v<c.fields.length;v++){r[
|
|
52
|
+
L.Index=function(t){this.invertedIndex=t.invertedIndex,this.fieldVectors=t.fieldVectors,this.tokenSet=t.tokenSet,this.fields=t.fields,this.pipeline=t.pipeline},L.Index.prototype.search=function(t){return this.query(function(e){new L.QueryParser(t,e).parse()})},L.Index.prototype.query=function(t){for(var e=new L.Query(this.fields),n=Object.create(null),i=Object.create(null),o=Object.create(null),r=Object.create(null),a=Object.create(null),s=0;s<this.fields.length;s++)i[this.fields[s]]=new L.Vector;t.call(e,e);for(s=0;s<e.clauses.length;s++){var c=e.clauses[s],l=null,d=L.Set.empty;l=c.usePipeline?this.pipeline.runString(c.term,{fields:c.fields}):[c.term];for(var p=0;p<l.length;p++){var u=l[p];c.term=u;var h=L.TokenSet.fromClause(c),f=this.tokenSet.intersect(h).toArray();if(0===f.length&&c.presence===L.Query.presence.REQUIRED){for(var v=0;v<c.fields.length;v++){r[F=c.fields[v]]=L.Set.empty}break}for(var g=0;g<f.length;g++){var m=f[g],y=this.invertedIndex[m],b=y._index;for(v=0;v<c.fields.length;v++){var w=y[F=c.fields[v]],C=Object.keys(w),x=m+"/"+F,A=new L.Set(C);if(c.presence==L.Query.presence.REQUIRED&&(d=d.union(A),void 0===r[F]&&(r[F]=L.Set.complete)),c.presence!=L.Query.presence.PROHIBITED){if(i[F].upsert(b,c.boost,function(t,e){return t+e}),!o[x]){for(var D=0;D<C.length;D++){var k,E=C[D],S=new L.FieldRef(E,F),P=w[E];void 0===(k=n[S])?n[S]=new L.MatchData(m,F,P):k.add(m,F,P)}o[x]=!0}}else void 0===a[F]&&(a[F]=L.Set.empty),a[F]=a[F].union(A)}}}if(c.presence===L.Query.presence.REQUIRED)for(v=0;v<c.fields.length;v++){r[F=c.fields[v]]=r[F].intersect(d)}}var T=L.Set.complete,_=L.Set.empty;for(s=0;s<this.fields.length;s++){var F;r[F=this.fields[s]]&&(T=T.intersect(r[F])),a[F]&&(_=_.union(a[F]))}var I=Object.keys(n),M=[],R=Object.create(null);if(e.isNegated()){I=Object.keys(this.fieldVectors);for(s=0;s<I.length;s++){S=I[s];var B=L.FieldRef.fromString(S);n[S]=new L.MatchData}}for(s=0;s<I.length;s++){var H=(B=L.FieldRef.fromString(I[s])).docRef;if(T.contains(H)&&!_.contains(H)){var V,j=this.fieldVectors[B],O=i[B.fieldName].similarity(j);if(void 0!==(V=R[H]))V.score+=O,V.matchData.combine(n[B]);else{var N={ref:H,score:O,matchData:n[B]};R[H]=N,M.push(N)}}}return M.sort(function(t,e){return e.score-t.score})},L.Index.prototype.toJSON=function(){var t=Object.keys(this.invertedIndex).sort().map(function(t){return[t,this.invertedIndex[t]]},this),e=Object.keys(this.fieldVectors).map(function(t){return[t,this.fieldVectors[t].toJSON()]},this);return{version:L.version,fields:this.fields,fieldVectors:e,invertedIndex:t,pipeline:this.pipeline.toJSON()}},L.Index.load=function(t){var e={},n={},i=t.fieldVectors,o=Object.create(null),r=t.invertedIndex,a=new L.TokenSet.Builder,s=L.Pipeline.load(t.pipeline);t.version!=L.version&&L.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+L.version+"' does not match serialized index '"+t.version+"'");for(var c=0;c<i.length;c++){var l=(p=i[c])[0],d=p[1];n[l]=new L.Vector(d)}for(c=0;c<r.length;c++){var p,u=(p=r[c])[0],h=p[1];a.insert(u),o[u]=h}return a.finish(),e.fields=t.fields,e.fieldVectors=n,e.invertedIndex=o,e.tokenSet=a.root,e.pipeline=s,new L.Index(e)},
|
|
53
53
|
/*!
|
|
54
54
|
* lunr.Builder
|
|
55
55
|
* Copyright (C) 2020 Oliver Nightingale
|
|
56
56
|
*/
|
|
57
|
-
L.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=L.tokenizer,this.pipeline=new L.Pipeline,this.searchPipeline=new L.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},L.Builder.prototype.ref=function(t){this._ref=t},L.Builder.prototype.field=function(t,e){if(/\//.test(t))throw new RangeError("Field '"+t+"' contains illegal character '/'");this._fields[t]=e||{}},L.Builder.prototype.b=function(t){this._b=t<0?0:t>1?1:t},L.Builder.prototype.k1=function(t){this._k1=t},L.Builder.prototype.add=function(t,e){var n=t[this._ref],i=Object.keys(this._fields);this._documents[n]=e||{},this.documentCount+=1;for(var o=0;o<i.length;o++){var r=i[o],a=this._fields[r].extractor,s=a?a(t):t[r],c=this.tokenizer(s,{fields:[r]}),l=this.pipeline.run(c),d=new L.FieldRef(n,r),p=Object.create(null);this.fieldTermFrequencies[d]=p,this.fieldLengths[d]=0,this.fieldLengths[d]+=l.length;for(var u=0;u<l.length;u++){var h=l[u];if(null==p[h]&&(p[h]=0),p[h]+=1,null==this.invertedIndex[h]){var f=Object.create(null);f._index=this.termIndex,this.termIndex+=1;for(var v=0;v<i.length;v++)f[i[v]]=Object.create(null);this.invertedIndex[h]=f}null==this.invertedIndex[h][r][n]&&(this.invertedIndex[h][r][n]=Object.create(null));for(var g=0;g<this.metadataWhitelist.length;g++){var m=this.metadataWhitelist[g],y=h.metadata[m];null==this.invertedIndex[h][r][n][m]&&(this.invertedIndex[h][r][n][m]=[]),this.invertedIndex[h][r][n][m].push(y)}}}},L.Builder.prototype.calculateAverageFieldLengths=function(){for(var t=Object.keys(this.fieldLengths),e=t.length,n={},i={},o=0;o<e;o++){var r=L.FieldRef.fromString(t[o]),a=r.fieldName;i[a]||(i[a]=0),i[a]+=1,n[a]||(n[a]=0),n[a]+=this.fieldLengths[r]}var s=Object.keys(this._fields);for(o=0;o<s.length;o++){var c=s[o];n[c]=n[c]/i[c]}this.averageFieldLength=n},L.Builder.prototype.createFieldVectors=function(){for(var t={},e=Object.keys(this.fieldTermFrequencies),n=e.length,i=Object.create(null),o=0;o<n;o++){for(var r=L.FieldRef.fromString(e[o]),a=r.fieldName,s=this.fieldLengths[r],c=new L.Vector,l=this.fieldTermFrequencies[r],d=Object.keys(l),p=d.length,u=this._fields[a].boost||1,h=this._documents[r.docRef].boost||1,f=0;f<p;f++){var v,g,m,y=d[f],b=l[y],w=this.invertedIndex[y]._index;void 0===i[y]?(v=L.idf(this.invertedIndex[y],this.documentCount),i[y]=v):v=i[y],g=v*((this._k1+1)*b)/(this._k1*(1-this._b+this._b*(s/this.averageFieldLength[a]))+b),g*=u,g*=h,m=Math.round(1e3*g)/1e3,c.insert(w,m)}t[r]=c}this.fieldVectors=t},L.Builder.prototype.createTokenSet=function(){this.tokenSet=L.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},L.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new L.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},L.Builder.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},L.MatchData=function(t,e,n){for(var i=Object.create(null),o=Object.keys(n||{}),r=0;r<o.length;r++){var a=o[r];i[a]=n[a].slice()}this.metadata=Object.create(null),void 0!==t&&(this.metadata[t]=Object.create(null),this.metadata[t][e]=i)},L.MatchData.prototype.combine=function(t){for(var e=Object.keys(t.metadata),n=0;n<e.length;n++){var i=e[n],o=Object.keys(t.metadata[i]);null==this.metadata[i]&&(this.metadata[i]=Object.create(null));for(var r=0;r<o.length;r++){var a=o[r],s=Object.keys(t.metadata[i][a]);null==this.metadata[i][a]&&(this.metadata[i][a]=Object.create(null));for(var c=0;c<s.length;c++){var l=s[c];null==this.metadata[i][a][l]?this.metadata[i][a][l]=t.metadata[i][a][l]:this.metadata[i][a][l]=this.metadata[i][a][l].concat(t.metadata[i][a][l])}}}},L.MatchData.prototype.add=function(t,e,n){if(!(t in this.metadata))return this.metadata[t]=Object.create(null),void(this.metadata[t][e]=n);if(e in this.metadata[t])for(var i=Object.keys(n),o=0;o<i.length;o++){var r=i[o];r in this.metadata[t][e]?this.metadata[t][e][r]=this.metadata[t][e][r].concat(n[r]):this.metadata[t][e][r]=n[r]}else this.metadata[t][e]=n},L.Query=function(t){this.clauses=[],this.allFields=t},L.Query.wildcard=new String("*"),L.Query.wildcard.NONE=0,L.Query.wildcard.LEADING=1,L.Query.wildcard.TRAILING=2,L.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},L.Query.prototype.clause=function(t){return"fields"in t||(t.fields=this.allFields),"boost"in t||(t.boost=1),"usePipeline"in t||(t.usePipeline=!0),"wildcard"in t||(t.wildcard=L.Query.wildcard.NONE),t.wildcard&L.Query.wildcard.LEADING&&t.term.charAt(0)!=L.Query.wildcard&&(t.term="*"+t.term),t.wildcard&L.Query.wildcard.TRAILING&&t.term.slice(-1)!=L.Query.wildcard&&(t.term=t.term+"*"),"presence"in t||(t.presence=L.Query.presence.OPTIONAL),this.clauses.push(t),this},L.Query.prototype.isNegated=function(){for(var t=0;t<this.clauses.length;t++)if(this.clauses[t].presence!=L.Query.presence.PROHIBITED)return!1;return!0},L.Query.prototype.term=function(t,e){if(Array.isArray(t))return t.forEach(function(t){this.term(t,L.utils.clone(e))},this),this;var n=e||{};return n.term=t.toString(),this.clause(n),this},L.QueryParseError=function(t,e,n){this.name="QueryParseError",this.message=t,this.start=e,this.end=n},L.QueryParseError.prototype=new Error,L.QueryLexer=function(t){this.lexemes=[],this.str=t,this.length=t.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},L.QueryLexer.prototype.run=function(){for(var t=L.QueryLexer.lexText;t;)t=t(this)},L.QueryLexer.prototype.sliceString=function(){for(var t=[],e=this.start,n=this.pos,i=0;i<this.escapeCharPositions.length;i++)n=this.escapeCharPositions[i],t.push(this.str.slice(e,n)),e=n+1;return t.push(this.str.slice(e,this.pos)),this.escapeCharPositions.length=0,t.join("")},L.QueryLexer.prototype.emit=function(t){this.lexemes.push({type:t,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},L.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},L.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return L.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},L.QueryLexer.prototype.width=function(){return this.pos-this.start},L.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},L.QueryLexer.prototype.backup=function(){this.pos-=1},L.QueryLexer.prototype.acceptDigitRun=function(){var t,e;do{e=(t=this.next()).charCodeAt(0)}while(e>47&&e<58);t!=L.QueryLexer.EOS&&this.backup()},L.QueryLexer.prototype.more=function(){return this.pos<this.length},L.QueryLexer.EOS="EOS",L.QueryLexer.FIELD="FIELD",L.QueryLexer.TERM="TERM",L.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",L.QueryLexer.BOOST="BOOST",L.QueryLexer.PRESENCE="PRESENCE",L.QueryLexer.lexField=function(t){return t.backup(),t.emit(L.QueryLexer.FIELD),t.ignore(),L.QueryLexer.lexText},L.QueryLexer.lexTerm=function(t){if(t.width()>1&&(t.backup(),t.emit(L.QueryLexer.TERM)),t.ignore(),t.more())return L.QueryLexer.lexText},L.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(L.QueryLexer.EDIT_DISTANCE),L.QueryLexer.lexText},L.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(L.QueryLexer.BOOST),L.QueryLexer.lexText},L.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(L.QueryLexer.TERM)},L.QueryLexer.termSeparator=L.tokenizer.separator,L.QueryLexer.lexText=function(t){for(;;){var e=t.next();if(e==L.QueryLexer.EOS)return L.QueryLexer.lexEOS;if(92!=e.charCodeAt(0)){if(":"==e)return L.QueryLexer.lexField;if("~"==e)return t.backup(),t.width()>0&&t.emit(L.QueryLexer.TERM),L.QueryLexer.lexEditDistance;if("^"==e)return t.backup(),t.width()>0&&t.emit(L.QueryLexer.TERM),L.QueryLexer.lexBoost;if("+"==e&&1===t.width())return t.emit(L.QueryLexer.PRESENCE),L.QueryLexer.lexText;if("-"==e&&1===t.width())return t.emit(L.QueryLexer.PRESENCE),L.QueryLexer.lexText;if(e.match(L.QueryLexer.termSeparator))return L.QueryLexer.lexTerm}else t.escapeCharacter()}},L.QueryParser=function(t,e){this.lexer=new L.QueryLexer(t),this.query=e,this.currentClause={},this.lexemeIdx=0},L.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=L.QueryParser.parseClause;t;)t=t(this);return this.query},L.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},L.QueryParser.prototype.consumeLexeme=function(){var t=this.peekLexeme();return this.lexemeIdx+=1,t},L.QueryParser.prototype.nextClause=function(){var t=this.currentClause;this.query.clause(t),this.currentClause={}},L.QueryParser.parseClause=function(t){var e=t.peekLexeme();if(null!=e)switch(e.type){case L.QueryLexer.PRESENCE:return L.QueryParser.parsePresence;case L.QueryLexer.FIELD:return L.QueryParser.parseField;case L.QueryLexer.TERM:return L.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+e.type;throw e.str.length>=1&&(n+=" with value '"+e.str+"'"),new L.QueryParseError(n,e.start,e.end)}},L.QueryParser.parsePresence=function(t){var e=t.consumeLexeme();if(null!=e){switch(e.str){case"-":t.currentClause.presence=L.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=L.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+e.str+"'";throw new L.QueryParseError(n,e.start,e.end)}var i=t.peekLexeme();if(null==i){n="expecting term or field, found nothing";throw new L.QueryParseError(n,e.start,e.end)}switch(i.type){case L.QueryLexer.FIELD:return L.QueryParser.parseField;case L.QueryLexer.TERM:return L.QueryParser.parseTerm;default:n="expecting term or field, found '"+i.type+"'";throw new L.QueryParseError(n,i.start,i.end)}}},L.QueryParser.parseField=function(t){var e=t.consumeLexeme();if(null!=e){if(-1==t.query.allFields.indexOf(e.str)){var n=t.query.allFields.map(function(t){return"'"+t+"'"}).join(", "),i="unrecognised field '"+e.str+"', possible fields: "+n;throw new L.QueryParseError(i,e.start,e.end)}t.currentClause.fields=[e.str];var o=t.peekLexeme();if(null==o){i="expecting term, found nothing";throw new L.QueryParseError(i,e.start,e.end)}if(o.type===L.QueryLexer.TERM)return L.QueryParser.parseTerm;i="expecting term, found '"+o.type+"'";throw new L.QueryParseError(i,o.start,o.end)}},L.QueryParser.parseTerm=function(t){var e=t.consumeLexeme();if(null!=e){t.currentClause.term=e.str.toLowerCase(),-1!=e.str.indexOf("*")&&(t.currentClause.usePipeline=!1);var n=t.peekLexeme();if(null!=n)switch(n.type){case L.QueryLexer.TERM:return t.nextClause(),L.QueryParser.parseTerm;case L.QueryLexer.FIELD:return t.nextClause(),L.QueryParser.parseField;case L.QueryLexer.EDIT_DISTANCE:return L.QueryParser.parseEditDistance;case L.QueryLexer.BOOST:return L.QueryParser.parseBoost;case L.QueryLexer.PRESENCE:return t.nextClause(),L.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+n.type+"'";throw new L.QueryParseError(i,n.start,n.end)}else t.nextClause()}},L.QueryParser.parseEditDistance=function(t){var e=t.consumeLexeme();if(null!=e){var n=parseInt(e.str,10);if(isNaN(n)){var i="edit distance must be numeric";throw new L.QueryParseError(i,e.start,e.end)}t.currentClause.editDistance=n;var o=t.peekLexeme();if(null!=o)switch(o.type){case L.QueryLexer.TERM:return t.nextClause(),L.QueryParser.parseTerm;case L.QueryLexer.FIELD:return t.nextClause(),L.QueryParser.parseField;case L.QueryLexer.EDIT_DISTANCE:return L.QueryParser.parseEditDistance;case L.QueryLexer.BOOST:return L.QueryParser.parseBoost;case L.QueryLexer.PRESENCE:return t.nextClause(),L.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+o.type+"'";throw new L.QueryParseError(i,o.start,o.end)}else t.nextClause()}},L.QueryParser.parseBoost=function(t){var e=t.consumeLexeme();if(null!=e){var n=parseInt(e.str,10);if(isNaN(n)){var i="boost must be numeric";throw new L.QueryParseError(i,e.start,e.end)}t.currentClause.boost=n;var o=t.peekLexeme();if(null!=o)switch(o.type){case L.QueryLexer.TERM:return t.nextClause(),L.QueryParser.parseTerm;case L.QueryLexer.FIELD:return t.nextClause(),L.QueryParser.parseField;case L.QueryLexer.EDIT_DISTANCE:return L.QueryParser.parseEditDistance;case L.QueryLexer.BOOST:return L.QueryParser.parseBoost;case L.QueryLexer.PRESENCE:return t.nextClause(),L.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+o.type+"'";throw new L.QueryParseError(i,o.start,o.end)}else t.nextClause()}},_=this,F=function(){return L},"object"===_typeof(n)?e.exports=F():_.lunr=F()}()},{}],33:[function(t,e,n){e.exports=Math.abs},{}],34:[function(t,e,n){e.exports=Math.floor},{}],35:[function(t,e,n){e.exports=Number.isNaN||function(t){return t!=t}},{}],36:[function(t,e,n){e.exports=Math.max},{}],37:[function(t,e,n){e.exports=Math.min},{}],38:[function(t,e,n){e.exports=Math.pow},{}],39:[function(t,e,n){e.exports=Math.round},{}],40:[function(t,e,n){var i=t("./isNaN");e.exports=function(t){return i(t)||0===t?t:t<0?-1:1}},{"./isNaN":35}],41:[function(t,e,n){(function(n){(function(){var i="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=i&&o&&"function"==typeof o.get?o.get:null,a=i&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=s&&c&&"function"==typeof c.get?c.get:null,d=s&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,u="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,v=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,y=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,C=String.prototype.toLowerCase,x=RegExp.prototype.test,A=Array.prototype.concat,D=Array.prototype.join,k=Array.prototype.slice,E=Math.floor,S="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,T="function"==typeof Symbol&&"symbol"===_typeof(Symbol.iterator)?Symbol.prototype.toString:null,I="function"==typeof Symbol&&"object"===_typeof(Symbol.iterator),_="function"==typeof Symbol&&Symbol.toStringTag&&(_typeof(Symbol.toStringTag)===I||"symbol")?Symbol.toStringTag:null,F=Object.prototype.propertyIsEnumerable,L=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function M(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||x.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var i=t<0?-E(-t):E(t);if(i!==t){var o=String(i),r=y.call(e,o.length+1);return b.call(o,n,"$&_")+"."+b.call(b.call(r,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(e,n,"$&_")}var R=t("./util.inspect"),B=R.custom,H=q(B)?B:null,V={__proto__:null,double:'"',single:"'"},j={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function O(t,e,n){var i=n.quoteStyle||e,o=V[i];return o+t+o}function N(t){return b.call(String(t),/"/g,""")}function U(t){return!_||!("object"===_typeof(t)&&(_ in t||void 0!==t[_]))}function z(t){return"[object Array]"===$(t)&&U(t)}function W(t){return"[object RegExp]"===$(t)&&U(t)}function q(t){if(I)return t&&"object"===_typeof(t)&&t instanceof Symbol;if("symbol"===_typeof(t))return!0;if(!t||"object"!==_typeof(t)||!T)return!1;try{return T.call(t),!0}catch(t){}return!1}e.exports=function t(e,i,o,s){var c=i||{};if(G(c,"quoteStyle")&&!G(V,c.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var v=!G(c,"customInspect")||c.customInspect;if("boolean"!=typeof v&&"symbol"!==v)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=c.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return J(e,c);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var x=String(e);return w?M(e,x):x}if("bigint"==typeof e){var E=String(e)+"n";return w?M(e,E):E}var P=void 0===c.depth?5:c.depth;if(void 0===o&&(o=0),o>=P&&P>0&&"object"===_typeof(e))return z(e)?"[Array]":"[Object]";var B=function(t,e){var n;if("\t"===t.indent)n="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;n=D.call(Array(t.indent+1)," ")}return{base:n,prev:D.call(Array(e+1),n)}}(c,o);if(void 0===s)s=[];else if(K(s,e)>=0)return"[Circular]";function j(e,n,i){if(n&&(s=k.call(s)).push(n),i){var r={depth:c.depth};return G(c,"quoteStyle")&&(r.quoteStyle=c.quoteStyle),t(e,r,o+1,s)}return t(e,c,o+1,s)}if("function"==typeof e&&!W(e)){var Q=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),Z=nt(e,j);return"[Function"+(Q?": "+Q:" (anonymous)")+"]"+(Z.length>0?" { "+D.call(Z,", ")+" }":"")}if(q(e)){var it=I?b.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):T.call(e);return"object"!==_typeof(e)||I?it:X(it)}if(function(t){if(!t||"object"!==_typeof(t))return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var ot="<"+C.call(String(e.nodeName)),rt=e.attributes||[],at=0;at<rt.length;at++)ot+=" "+rt[at].name+"="+O(N(rt[at].value),"double",c);return ot+=">",e.childNodes&&e.childNodes.length&&(ot+="..."),ot+="</"+C.call(String(e.nodeName))+">"}if(z(e)){if(0===e.length)return"[]";var st=nt(e,j);return B&&!function(t){for(var e=0;e<t.length;e++)if(K(t[e],"\n")>=0)return!1;return!0}(st)?"["+et(st,B)+"]":"[ "+D.call(st,", ")+" ]"}if(function(t){return"[object Error]"===$(t)&&U(t)}(e)){var ct=nt(e,j);return"cause"in Error.prototype||!("cause"in e)||F.call(e,"cause")?0===ct.length?"["+String(e)+"]":"{ ["+String(e)+"] "+D.call(ct,", ")+" }":"{ ["+String(e)+"] "+D.call(A.call("[cause]: "+j(e.cause),ct),", ")+" }"}if("object"===_typeof(e)&&v){if(H&&"function"==typeof e[H]&&R)return R(e,{depth:P-o});if("symbol"!==v&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!r||!t||"object"!==_typeof(t))return!1;try{r.call(t);try{l.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var lt=[];return a&&a.call(e,function(t,n){lt.push(j(n,e,!0)+" => "+j(t,e))}),tt("Map",r.call(e),lt,B)}if(function(t){if(!l||!t||"object"!==_typeof(t))return!1;try{l.call(t);try{r.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var dt=[];return d&&d.call(e,function(t){dt.push(j(t,e))}),tt("Set",l.call(e),dt,B)}if(function(t){if(!p||!t||"object"!==_typeof(t))return!1;try{p.call(t,p);try{u.call(t,u)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Y("WeakMap");if(function(t){if(!u||!t||"object"!==_typeof(t))return!1;try{u.call(t,u);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Y("WeakSet");if(function(t){if(!h||!t||"object"!==_typeof(t))return!1;try{return h.call(t),!0}catch(t){}return!1}(e))return Y("WeakRef");if(function(t){return"[object Number]"===$(t)&&U(t)}(e))return X(j(Number(e)));if(function(t){if(!t||"object"!==_typeof(t)||!S)return!1;try{return S.call(t),!0}catch(t){}return!1}(e))return X(j(S.call(e)));if(function(t){return"[object Boolean]"===$(t)&&U(t)}(e))return X(f.call(e));if(function(t){return"[object String]"===$(t)&&U(t)}(e))return X(j(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==n&&e===n)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===$(t)&&U(t)}(e)&&!W(e)){var pt=nt(e,j),ut=L?L(e)===Object.prototype:e instanceof Object||e.constructor===Object,ht=e instanceof Object?"":"null prototype",ft=!ut&&_&&Object(e)===e&&_ in e?y.call($(e),8,-1):ht?"Object":"",vt=(ut||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(ft||ht?"["+D.call(A.call([],ft||[],ht||[]),": ")+"] ":"");return 0===pt.length?vt+"{}":B?vt+"{"+et(pt,B)+"}":vt+"{ "+D.call(pt,", ")+" }"}return String(e)};var Q=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return Q.call(t,e)}function $(t){return v.call(t)}function K(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1}function J(t,e){if(t.length>e.maxStringLength){var n=t.length-e.maxStringLength,i="... "+n+" more character"+(n>1?"s":"");return J(y.call(t,0,e.maxStringLength),e)+i}var o=j[e.quoteStyle||"single"];return o.lastIndex=0,O(b.call(b.call(t,o,"\\$1"),/[\x00-\x1f]/g,Z),"single",e)}function Z(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function X(t){return"Object("+t+")"}function Y(t){return t+" { ? }"}function tt(t,e,n,i){return t+" ("+e+") {"+(i?et(n,i):D.call(n,", "))+"}"}function et(t,e){if(0===t.length)return"";var n="\n"+e.prev+e.base;return n+D.call(t,","+n)+"\n"+e.prev}function nt(t,e){var n=z(t),i=[];if(n){i.length=t.length;for(var o=0;o<t.length;o++)i[o]=G(t,o)?e(t[o],t):""}var r,a="function"==typeof P?P(t):[];if(I){r={};for(var s=0;s<a.length;s++)r["$"+a[s]]=a[s]}for(var c in t)G(t,c)&&(n&&String(Number(c))===c&&c<t.length||I&&r["$"+c]instanceof Symbol||(x.call(/[^\w$]/,c)?i.push(e(c,t)+": "+e(t[c],t)):i.push(c+": "+e(t[c],t))));if("function"==typeof P)for(var l=0;l<a.length;l++)F.call(t,a[l])&&i.push("["+e(a[l])+"]: "+e(t[a[l]],t));return i}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./util.inspect":1}],42:[function(t,e,n){(function(t){(function(){function n(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function i(t,e){for(var n,i="",o=0,r=-1,a=0,s=0;s<=t.length;++s){if(s<t.length)n=t.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(r===s-1||1===a);else if(r!==s-1&&2===a){if(i.length<2||2!==o||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var c=i.lastIndexOf("/");if(c!==i.length-1){-1===c?(i="",o=0):o=(i=i.slice(0,c)).length-1-i.lastIndexOf("/"),r=s,a=0;continue}}else if(2===i.length||1===i.length){i="",o=0,r=s,a=0;continue}e&&(i.length>0?i+="/..":i="..",o=2)}else i.length>0?i+="/"+t.slice(r+1,s):i=t.slice(r+1,s),o=s-r-1;r=s,a=0}else 46===n&&-1!==a?++a:a=-1}return i}var o={resolve:function(){for(var e,o="",r=!1,a=arguments.length-1;a>=-1&&!r;a--){var s;a>=0?s=arguments[a]:(void 0===e&&(e=t.cwd()),s=e),n(s),0!==s.length&&(o=s+"/"+o,r=47===s.charCodeAt(0))}return o=i(o,!r),r?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(t){if(n(t),0===t.length)return".";var e=47===t.charCodeAt(0),o=47===t.charCodeAt(t.length-1);return 0!==(t=i(t,!e)).length||e||(t="."),t.length>0&&o&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return n(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var i=arguments[e];n(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":o.normalize(t)},relative:function(t,e){if(n(t),n(e),t===e)return"";if((t=o.resolve(t))===(e=o.resolve(e)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var r=t.length,a=r-i,s=1;s<e.length&&47===e.charCodeAt(s);++s);for(var c=e.length-s,l=a<c?a:c,d=-1,p=0;p<=l;++p){if(p===l){if(c>l){if(47===e.charCodeAt(s+p))return e.slice(s+p+1);if(0===p)return e.slice(s+p)}else a>l&&(47===t.charCodeAt(i+p)?d=p:0===p&&(d=0));break}var u=t.charCodeAt(i+p);if(u!==e.charCodeAt(s+p))break;47===u&&(d=p)}var h="";for(p=i+d+1;p<=r;++p)p!==r&&47!==t.charCodeAt(p)||(0===h.length?h+="..":h+="/..");return h.length>0?h+e.slice(s+d):(s+=d,47===e.charCodeAt(s)&&++s,e.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(n(t),0===t.length)return".";for(var e=t.charCodeAt(0),i=47===e,o=-1,r=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!r){o=a;break}}else r=!1;return-1===o?i?"/":".":i&&1===o?"//":t.slice(0,o)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');n(t);var i,o=0,r=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var s=e.length-1,c=-1;for(i=t.length-1;i>=0;--i){var l=t.charCodeAt(i);if(47===l){if(!a){o=i+1;break}}else-1===c&&(a=!1,c=i+1),s>=0&&(l===e.charCodeAt(s)?-1===--s&&(r=i):(s=-1,r=c))}return o===r?r=c:-1===r&&(r=t.length),t.slice(o,r)}for(i=t.length-1;i>=0;--i)if(47===t.charCodeAt(i)){if(!a){o=i+1;break}}else-1===r&&(a=!1,r=i+1);return-1===r?"":t.slice(o,r)},extname:function(t){n(t);for(var e=-1,i=0,o=-1,r=!0,a=0,s=t.length-1;s>=0;--s){var c=t.charCodeAt(s);if(47!==c)-1===o&&(r=!1,o=s+1),46===c?-1===e?e=s:1!==a&&(a=1):-1!==e&&(a=-1);else if(!r){i=s+1;break}}return-1===e||-1===o||0===a||1===a&&e===o-1&&e===i+1?"":t.slice(e,o)},format:function(t){if(null===t||"object"!==_typeof(t))throw new TypeError('The "pathObject" argument must be of type Object. Received type '+_typeof(t));return function(t,e){var n=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+i:n+t+i:i}("/",t)},parse:function(t){n(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var i,o=t.charCodeAt(0),r=47===o;r?(e.root="/",i=1):i=0;for(var a=-1,s=0,c=-1,l=!0,d=t.length-1,p=0;d>=i;--d)if(47!==(o=t.charCodeAt(d)))-1===c&&(l=!1,c=d+1),46===o?-1===a?a=d:1!==p&&(p=1):-1!==a&&(p=-1);else if(!l){s=d+1;break}return-1===a||-1===c||0===p||1===p&&a===c-1&&a===s+1?-1!==c&&(e.base=e.name=0===s&&r?t.slice(1,c):t.slice(s,c)):(0===s&&r?(e.name=t.slice(1,a),e.base=t.slice(1,c)):(e.name=t.slice(s,a),e.base=t.slice(s,c)),e.ext=t.slice(a,c)),s>0?e.dir=t.slice(0,s-1):r&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,e.exports=o}).call(this)}).call(this,t("_process"))},{_process:89}],43:[function(t,e,n){e.exports={name:"pict-application",version:"1.0.33",description:"Application base class for a pict view-based application",main:"source/Pict-Application.js",scripts:{test:"npx quack test",start:"node source/Pict-Application.js",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-application-image:local","docker-dev-run":'docker run -it -d --name pict-application-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-application" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-application-image:local',"docker-dev-shell":"docker exec -it pict-application-dev /bin/bash",tests:"npx quack test -g",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Application.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-application.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-application/issues"},homepage:"https://github.com/stevenvelozo/pict-application#readme",devDependencies:{"@eslint/js":"^9.28.0","browser-env":"^3.3.0",eslint:"^9.28.0",pict:"^1.0.348","pict-provider":"^1.0.10","pict-view":"^1.0.66",quackage:"^1.0.58",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{"fable-serviceproviderbase":"^3.0.19"}}},{}],44:[function(t,e,n){var i=t("fable-serviceproviderbase"),o=t("../package.json"),r={Name:"DefaultPictApplication",MainViewportViewIdentifier:"Default-View",MainViewportRenderableHash:!1,MainViewportDestinationAddress:!1,MainViewportDefaultDataAddress:!1,AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!0,AutoRenderViewsAfterInitialize:!1,AutoLoginAfterInitialize:!1,AutoLoadDataAfterLogin:!1,ConfigurationOnlyViews:[],Manifests:{},IdentifierAddressPrefix:"PICT-"},a=function(t){function e(t,n,i){var a;_classCallCheck(this,e);var s="object"===_typeof(t.settings.PictApplicationConfiguration)?t.settings.PictApplicationConfiguration:{};(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),s,n),i])).options,a.log,a.fable,a.UUID,a.Hash,a.servicesMap,a.serviceType="PictApplication",a._Package=o,a.pict=a.fable,a.AppData=a.fable.AppData,a.Bundle=a.fable.Bundle,a.initializeTimestamp,a.lastSolvedTimestamp,a.lastLoginTimestamp,a.lastMarshalFromViewsTimestamp,a.lastMarshalToViewsTimestamp,a.lastAutoRenderTimestamp,a.lastLoadDataTimestamp;var c=Object.keys(a.options.Manifests);if(c.length>0)for(var l=0;l<c.length;l++){var d=c[l];a.fable.instantiateServiceProvider("Manifest",a.options.Manifests[d],d)}return a}return _inherits(e,t),_createClass(e,[{key:"onPreSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onPreSolve:")),!0}},{key:"onPreSolveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"onBeforeSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSolve:")),!0}},{key:"onBeforeSolveAsync",value:function(t){return this.onBeforeSolve(),t()}},{key:"onSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSolve:")),!0}},{key:"onSolveAsync",value:function(t){return this.onSolve(),t()}},{key:"solve",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing solve() function..."));for(var t=Object.keys(this.pict.providers),e=[],n=0;n<t.length;n++){var i=this.pict.providers[t[n]];i.options.AutoSolveWithApp&&e.push(i)}e.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var o=0;o<e.length;o++)e[o].solve(e[o]);this.onBeforeSolve();for(var r=Object.keys(this.pict.views),a=[],s=0;s<r.length;s++){var c=this.pict.views[r[s]];c.options.AutoInitialize&&a.push(c)}a.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var l=0;l<a.length;l++)a[l].solve();return this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"solveAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");n.anticipate(this.onBeforeSolveAsync.bind(this));var i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync Auto Callback Error: ").concat(t),t)});for(var o=Object.keys(this.pict.providers),r=[],a=0;a<o.length;a++){var s=this.pict.providers[o[a]];s.options.AutoSolveWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var c=0;c<r.length;c++)n.anticipate(r[c].solveAsync.bind(r[c]));for(var l=Object.keys(this.pict.views),d=[],p=0;p<l.length;p++){var u=this.pict.views[l[p]];u.options.AutoSolveWithApp&&d.push(u)}d.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var h=0;h<d.length;h++)n.anticipate(d[h].solveAsync.bind(d[h]));n.anticipate(this.onSolveAsync.bind(this)),n.anticipate(this.onAfterSolveAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync() complete.")),e.lastSolvedTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSolve:")),!0}},{key:"onAfterSolveAsync",value:function(t){return this.onAfterSolve(),t()}},{key:"onBeforeLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoginAsync:")),t()}},{key:"onLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoginAsync:")),t()}},{key:"loginAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loginAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeLoginAsync.bind(this)),n.anticipate(this.onLoginAsync.bind(this)),n.anticipate(this.onAfterLoginAsync.bind(this)),this.options.AutoLoadDataAfterLogin&&n.anticipate(function(t){if(!e.isLoggedIn())return t();e.pict.LogNoisiness>1&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," auto loading data after login...")),e.loadDataAsync(function(e){t(e)})}),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loginAsync() complete.")),e.lastLoginTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"isLoggedIn",value:function(){return!0}},{key:"onAfterLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoginAsync:")),t()}},{key:"onBeforeLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoadDataAsync:")),t()}},{key:"onLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoadDataAsync:")),t()}},{key:"loadDataAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loadDataAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeLoadDataAsync.bind(this));for(var o=Object.keys(this.pict.providers),r=[],a=0;a<o.length;a++){var s=this.pict.providers[o[a]];s.options.AutoLoadDataWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoLoadDataOrdinal-e.options.AutoLoadDataOrdinal});for(var c=0,l=r;c<l.length;c++){var d=l[c];n.anticipate(d.onBeforeLoadDataAsync.bind(d))}n.anticipate(this.onLoadDataAsync.bind(this));for(var p=0,u=r;p<u.length;p++){var h=u[p];n.anticipate(h.onLoadDataAsync.bind(h))}n.anticipate(this.onAfterLoadDataAsync.bind(this));for(var f=0,v=r;f<v.length;f++){var g=v[f];n.anticipate(g.onAfterLoadDataAsync.bind(g))}n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loadDataAsync() complete.")),e.lastLoadDataTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoadDataAsync:")),t()}},{key:"onBeforeSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSaveDataAsync:")),t()}},{key:"onSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSaveDataAsync:")),t()}},{key:"saveDataAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," saveDataAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeSaveDataAsync.bind(this));for(var o=Object.keys(this.pict.providers),r=[],a=0;a<o.length;a++){var s=this.pict.providers[o[a]];s.options.AutoSaveDataWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoSaveDataOrdinal-e.options.AutoSaveDataOrdinal});for(var c=0,l=r;c<l.length;c++){var d=l[c];n.anticipate(d.onBeforeSaveDataAsync.bind(d))}n.anticipate(this.onSaveDataAsync.bind(this));for(var p=0,u=r;p<u.length;p++){var h=u[p];n.anticipate(h.onSaveDataAsync.bind(h))}n.anticipate(this.onAfterSaveDataAsync.bind(this));for(var f=0,v=r;f<v.length;f++){var g=v[f];n.anticipate(g.onAfterSaveDataAsync.bind(g))}n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," saveDataAsync() complete.")),e.lastSaveDataTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSaveDataAsync:")),t()}},{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize:")),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize called but initialization is already completed. Aborting.")),!1;if(this.onBeforeInitialize(),"ConfigurationOnlyViews"in this.options)for(var t=0;t<this.options.ConfigurationOnlyViews.length;t++){var e=void 0===this.options.ConfigurationOnlyViews[t].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[t].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(e)),this.pict.addView(e,this.options.ConfigurationOnlyViews[t])}this.onInitialize();for(var n=Object.keys(this.pict.providers),i=[],o=0;o<n.length;o++){var r=this.pict.providers[n[o]];r.options.AutoInitialize&&i.push(r)}i.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var a=0;a<i.length;a++)i[a].initialize();for(var s=Object.keys(this.pict.views),c=[],l=0;l<s.length;l++){var d=this.pict.views[s[l]];d.options.AutoInitialize&&c.push(d)}c.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var p=0;p<c.length;p++)c[p].initialize();return this.onAfterInitialize(),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving after initialization...")),this.solve()),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering after initialization...")),this.render()),this.initializeTimestamp=this.fable.log.getTimeStamp(),this.onCompletionOfInitialize(),!0}},{key:"initializeAsync",value:function(t){var e=this;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync:"));var n="function"==typeof t&&t;if(n||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),n=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initializeAsync Auto Callback Error: ").concat(t),t)}),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," async initialize called but initialization is already completed. Aborting.")),this.onCompletionOfInitializeAsync(n);var i=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");if(this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning initialization...")),"ConfigurationOnlyViews"in this.options)for(var o=0;o<this.options.ConfigurationOnlyViews.length;o++){var r=void 0===this.options.ConfigurationOnlyViews[o].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[o].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(r)),this.pict.addView(r,this.options.ConfigurationOnlyViews[o])}i.anticipate(this.onBeforeInitializeAsync.bind(this)),i.anticipate(this.onInitializeAsync.bind(this));for(var a=Object.keys(this.pict.providers),s=[],c=0;c<a.length;c++){var l=this.pict.providers[a[c]];l.options.AutoInitialize&&s.push(l)}s.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var d=0;d<s.length;d++)i.anticipate(s[d].initializeAsync.bind(s[d]));for(var p=Object.keys(this.pict.views),u=[],h=0;h<p.length;h++){var f=this.pict.views[p[h]];f.options.AutoInitialize&&u.push(f)}u.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var v=0;v<u.length;v++){var g=u[v];i.anticipate(g.initializeAsync.bind(g))}i.anticipate(this.onAfterInitializeAsync.bind(this)),this.options.AutoLoginAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto login (asynchronously) after initialization...")),i.anticipate(this.loginAsync.bind(this))),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving (asynchronously) after initialization...")),i.anticipate(this.solveAsync.bind(this))),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering (asynchronously) after initialization...")),i.anticipate(this.renderMainViewportAsync.bind(this))),i.wait(function(t){return t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initializeAsync Error: ").concat(t.message||t),{stack:t.stack}),e.initializeTimestamp=e.fable.log.getTimeStamp(),e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initialization complete.")),n()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onCompletionOfInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onCompletionOfInitialize:")),!0}},{key:"onCompletionOfInitializeAsync",value:function(t){return this.onCompletionOfInitialize(),t()}},{key:"onBeforeMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalFromViews:")),!0}},{key:"onBeforeMarshalFromViewsAsync",value:function(t){return this.onBeforeMarshalFromViews(),t()}},{key:"onMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalFromViews:")),!0}},{key:"onMarshalFromViewsAsync",value:function(t){return this.onMarshalFromViews(),t()}},{key:"marshalFromViews",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalFromViews() function...")),this.onBeforeMarshalFromViews();for(var t=Object.keys(this.pict.views),e=[],n=0;n<t.length;n++){var i=this.pict.views[t[n]];e.push(i)}for(var o=0;o<e.length;o++)e[o].marshalFromView();return this.onMarshalFromViews(),this.onAfterMarshalFromViews(),this.lastMarshalFromViewsTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"marshalFromViewsAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewsAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeMarshalFromViewsAsync.bind(this));for(var o=Object.keys(this.pict.views),r=[],a=0;a<o.length;a++){var s=this.pict.views[o[a]];r.push(s)}for(var c=0;c<r.length;c++)n.anticipate(r[c].marshalFromViewAsync.bind(r[c]));n.anticipate(this.onMarshalFromViewsAsync.bind(this)),n.anticipate(this.onAfterMarshalFromViewsAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewsAsync() complete.")),e.lastMarshalFromViewsTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalFromViews:")),!0}},{key:"onAfterMarshalFromViewsAsync",value:function(t){return this.onAfterMarshalFromViews(),t()}},{key:"onBeforeMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalToViews:")),!0}},{key:"onBeforeMarshalToViewsAsync",value:function(t){return this.onBeforeMarshalToViews(),t()}},{key:"onMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalToViews:")),!0}},{key:"onMarshalToViewsAsync",value:function(t){return this.onMarshalToViews(),t()}},{key:"marshalToViews",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalToViews() function...")),this.onBeforeMarshalToViews();for(var t=Object.keys(this.pict.views),e=[],n=0;n<t.length;n++){var i=this.pict.views[t[n]];e.push(i)}for(var o=0;o<e.length;o++)e[o].marshalToView();return this.onMarshalToViews(),this.onAfterMarshalToViews(),this.lastMarshalToViewsTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"marshalToViewsAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewsAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeMarshalToViewsAsync.bind(this));for(var o=Object.keys(this.pict.views),r=[],a=0;a<o.length;a++){var s=this.pict.views[o[a]];r.push(s)}for(var c=0;c<r.length;c++)n.anticipate(r[c].marshalToViewAsync.bind(r[c]));n.anticipate(this.onMarshalToViewsAsync.bind(this)),n.anticipate(this.onAfterMarshalToViewsAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewsAsync() complete.")),e.lastMarshalToViewsTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalToViews:")),!0}},{key:"onAfterMarshalToViewsAsync",value:function(t){return this.onAfterMarshalToViews(),t()}},{key:"onBeforeRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeRender:")),!0}},{key:"onBeforeRenderAsync",value:function(t){return this.onBeforeRender(),t()}},{key:"render",value:function(t,e,n,i){var o="string"!=typeof t?this.options.MainViewportViewIdentifier:t,r="string"!=typeof e?this.options.MainViewportRenderableHash:e,a="string"!=typeof n?this.options.MainViewportDestinationAddress:n,s="string"!=typeof i?this.options.MainViewportDefaultDataAddress:i;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(r,"] Destination[").concat(a,"] TemplateDataAddress[").concat(s,"] render:")),this.onBeforeRender();var c="string"==typeof o&&this.servicesMap.PictView[o];return c?(this.onRender(),c.render(r,a,s),this.onAfterRender(),!0):(this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not render from View ").concat(o," because it is not a valid view.")),!1)}},{key:"onRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onRender:")),!0}},{key:"onRenderAsync",value:function(t){return this.onRender(),t()}},{key:"renderAsync",value:function(t,e,n,i,o){var r=this,a="string"!=typeof t?this.options.MainViewportViewIdentifier:t,s="string"!=typeof e?this.options.MainViewportRenderableHash:e,c="string"!=typeof n?this.options.MainViewportDestinationAddress:n,l="string"!=typeof i?this.options.MainViewportDefaultDataAddress:i,d="function"==typeof o?o:"function"==typeof i?i:"function"==typeof n?n:"function"==typeof e?e:"function"==typeof t&&t;d||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),d=function(t){t&&r.log.error("PictApp [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.Name," renderAsync Auto Callback Error: ").concat(t),t)}),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(s,"] Destination[").concat(c,"] TemplateDataAddress[").concat(l,"] renderAsync:"));var p=this.fable.newAnticipate();p.anticipate(this.onBeforeRenderAsync.bind(this));var u="string"==typeof a&&this.servicesMap.PictView[a];if(!u){var h="PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not asynchronously render from View ").concat(a," because it is not a valid view.");return this.pict.LogNoisiness>3&&this.log.error(h),d(new Error(h))}return p.anticipate(this.onRenderAsync.bind(this)),p.anticipate(function(t){u.renderAsync.call(u,s,c,l,t)}),p.anticipate(this.onAfterRenderAsync.bind(this)),p.wait(d)}},{key:"onAfterRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterRender:")),!0}},{key:"onAfterRenderAsync",value:function(t){return this.onAfterRender(),t()}},{key:"renderMainViewport",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewport:")),this.render()}},{key:"renderMainViewportAsync",value:function(t){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewportAsync:")),this.renderAsync(t)}},{key:"renderAutoViews",value:function(){var t=this;this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViews..."));var e=Object.keys(this.pict.views);e.sort(function(e,n){return t.pict.views[e].options.AutoRenderOrdinal-t.pict.views[n].options.AutoRenderOrdinal});for(var n=0;n<e.length;n++){var i=this.pict.views[e[n]];i.options.AutoRender&&i.render()}this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync complete."))}},{key:"renderAutoViewsAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," renderAutoViewsAsync Auto Callback Error: ").concat(t),t)}),this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViewsAsync..."));var o=Object.keys(this.pict.views);o.sort(function(t,n){return e.pict.views[t].options.AutoRenderOrdinal-e.pict.views[n].options.AutoRenderOrdinal});for(var r=0;r<o.length;r++){var a=this.pict.views[o[r]];a.options.AutoRender&&n.anticipate(a.renderAsync.bind(a))}n.wait(function(t){return e.lastAutoRenderTimestamp=e.fable.log.getTimeStamp(),e.pict.LogNoisiness>0&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," renderAutoViewsAsync complete.")),i(t)})}},{key:"isPictApplication",get:function(){return!0}}])}(i);e.exports=a},{"../package.json":43,"fable-serviceproviderbase":20}],45:[function(t,e,n){e.exports=t("./views/Pict-View-Content.js"),e.exports.PictContentProvider=t("./providers/Pict-Provider-Content.js")},{"./providers/Pict-Provider-Content.js":46,"./views/Pict-View-Content.js":47}],46:[function(t,e,n){var i=t("pict-provider"),o=t("pict-section-code").createHighlighter,r=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"highlightCode",value:function(t,e){if(!t)return"";var n={textContent:t,innerHTML:""};return o(e)(n),n.innerHTML}},{key:"generateLineNumbers",value:function(t){if(!t)return"<span>1</span>";for(var e=t.split("\n").length,n="",i=1;i<=e;i++)n+="<span>"+i+"</span>";return n}},{key:"parseMarkdown",value:function(t,e,n){var i=this;if(!t)return"";for(var o=t.split("\n"),r=[],a=!1,s=0,c="",l=[],d=!1,p="",u=!1,h=[],f=!1,v=[],g=[],m=function(){g.length>0&&(r.push("<p>"+g.map(function(t){return i.parseInline(t,e,n)}).join(" ")+"</p>"),g=[])},y=0;y<o.length;y++){var b=o[y];if(a||!b.trim().match(/^\$\$/))if(f)v.push(b);else{var w=b.match(/^(`{3,})/);if(w){var C=w[1].length;if(a){if(C>=s&&b.trim()===w[1]){if("mermaid"===c)r.push('<pre class="mermaid">'+l.join("\n")+"</pre>");else{var x=l.join("\n"),A=this.highlightCode(x,c),D=this.generateLineNumbers(x);r.push('<div class="pict-content-code-wrap"><div class="pict-content-code-line-numbers">'+D+'</div><pre><code class="language-'+this.escapeHTML(c)+'">'+A+"</code></pre></div>")}a=!1,s=0,c="",l=[];continue}l.push(b);continue}m(),d&&(r.push("ul"===p?"</ul>":"</ol>"),d=!1),u&&(r.push("<blockquote>"+this.parseMarkdown(h.join("\n"),e,n)+"</blockquote>"),u=!1,h=[]),s=C,c=b.replace(/^`{3,}/,"").trim(),a=!0}else if(a)l.push(b);else if(b.match(/^>\s?/))u||(m(),d&&(r.push("ul"===p?"</ul>":"</ol>"),d=!1),u=!0,h=[]),h.push(b.replace(/^>\s?/,""));else if(u&&(r.push("<blockquote>"+this.parseMarkdown(h.join("\n"),e,n)+"</blockquote>"),u=!1,h=[]),b.match(/^(-{3,}|\*{3,}|_{3,})\s*$/))m(),d&&(r.push("ul"===p?"</ul>":"</ol>"),d=!1),r.push("<hr>");else{var k=b.match(/^(#{1,6})\s+(.+)/);if(k){m(),d&&(r.push("ul"===p?"</ul>":"</ol>"),d=!1);var E=k[1].length,S=this.parseInline(k[2],e,n),P=k[2].toLowerCase().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-");r.push("<h"+E+' id="'+P+'">'+S+"</h"+E+">")}else{var T=b.match(/^(\s*)[-*+]\s+(.*)/);if(T)m(),d&&"ul"===p||(d&&r.push("ul"===p?"</ul>":"</ol>"),r.push("<ul>"),d=!0,p="ul"),r.push("<li>"+this.parseInline(T[2],e,n)+"</li>");else{var I=b.match(/^(\s*)\d+\.\s+(.*)/);if(I)m(),d&&"ol"===p||(d&&r.push("ul"===p?"</ul>":"</ol>"),r.push("<ol>"),d=!0,p="ol"),r.push("<li>"+this.parseInline(I[2],e,n)+"</li>");else if(d&&""!==b.trim()&&(r.push("ul"===p?"</ul>":"</ol>"),d=!1),""!==b.trim())if(b.match(/^\|/)&&y+1<o.length&&o[y+1].match(/^\|[\s-:|]+\|/)){m(),d&&(r.push("ul"===p?"</ul>":"</ol>"),d=!1);var _="<table>",F=b.split("|").filter(function(t){return""!==t.trim()});_+="<thead><tr>";for(var L=0;L<F.length;L++)_+="<th>"+this.parseInline(F[L].trim(),e,n)+"</th>";for(_+="</tr></thead>",y++,_+="<tbody>";y+1<o.length&&o[y+1].match(/^\|/);){var M=o[++y].split("|").filter(function(t){return""!==t.trim()});_+="<tr>";for(var R=0;R<M.length;R++)_+="<td>"+this.parseInline(M[R].trim(),e,n)+"</td>";_+="</tr>"}_+="</tbody></table>",r.push(_)}else g.push(b);else m()}}}}else f?(r.push('<div class="pict-content-katex-display">'+v.join("\n")+"</div>"),f=!1,v=[]):(m(),d&&(r.push("ul"===p?"</ul>":"</ol>"),d=!1),u&&(r.push("<blockquote>"+this.parseMarkdown(h.join("\n"),e,n)+"</blockquote>"),u=!1,h=[]),f=!0)}if(m(),d&&r.push("ul"===p?"</ul>":"</ol>"),u&&r.push("<blockquote>"+this.parseMarkdown(h.join("\n"),e,n)+"</blockquote>"),a){var B=l.join("\n"),H=this.highlightCode(B,c),V=this.generateLineNumbers(B);r.push('<div class="pict-content-code-wrap"><div class="pict-content-code-line-numbers">'+V+"</div><pre><code>"+H+"</code></pre></div>")}return r.join("\n")}},{key:"parseInline",value:function(t,e,n){if(!t)return"";var i=t,o=[];return i=(i=(i=(i=(i=(i=(i=(i=(i=(i=i.replace(/`([^`]+)`/g,function(t,e){var n=o.length;return o.push("<code>"+e+"</code>"),"\0CODEINLINE"+n+"\0"})).replace(/\$([^\$\s][^\$]*?[^\$\s])\$/g,'<span class="pict-content-katex-inline">$1</span>')).replace(/\$([^\$\s])\$/g,'<span class="pict-content-katex-inline">$1</span>')).replace(/!\[([^\]]*)\]\(([^)]+)\)/g,function(t,e,i){var o=i;if("function"==typeof n){var r=n(i,e);r&&(o=r)}return'<img src="'+o+'" alt="'+e+'">'})).replace(/\[([^\]]+)\]\(([^)]+)\)/g,function(t,n,i){if("function"==typeof e){var o=e(i,n);if(o){var r=o.target?' target="'+o.target+'"':"",a=o.rel?' rel="'+o.rel+'"':"";return'<a href="'+o.href+'"'+r+a+">"+n+"</a>"}}return i.match(/^https?:\/\//)?'<a href="'+i+'" target="_blank" rel="noopener">'+n+"</a>":'<a href="'+i+'">'+n+"</a>"})).replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>")).replace(/__([^_]+)__/g,"<strong>$1</strong>")).replace(/\*([^*]+)\*/g,"<em>$1</em>")).replace(/_([^_]+)_/g,"<em>$1</em>")).replace(/\x00CODEINLINE(\d+)\x00/g,function(t,e){return o[parseInt(e)]})}},{key:"escapeHTML",value:function(t){return t?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}}])}(i);e.exports=r,e.exports.default_configuration={ProviderIdentifier:"Pict-Content",AutoInitialize:!0,AutoInitializeOrdinal:0}},{"pict-provider":58,"pict-section-code":61}],47:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"displayContent",value:function(t,e){var n=e||"Pict-Content-Body";this.pict.ContentAssignment.assignContent("#"+n,t);var i=document.getElementById(n);i&&i.parentElement&&(i.parentElement.scrollTop=0),this.renderMermaidDiagrams(n),this.renderKaTeXEquations(n)}},{key:"renderMermaidDiagrams",value:function(t){if("undefined"!=typeof mermaid){var e=t||"Pict-Content-Body",n=document.getElementById(e);if(n){var i=n.querySelectorAll("pre.mermaid");if(!(i.length<1))try{mermaid.run({nodes:i})}catch(t){this.log.error("Mermaid rendering error: "+t.message)}}}}},{key:"renderKaTeXEquations",value:function(t){if("undefined"!=typeof katex){var e=t||"Pict-Content-Body",n=document.getElementById(e);if(n){for(var i=n.querySelectorAll(".pict-content-katex-inline"),o=0;o<i.length;o++)try{katex.render(i[o].textContent,i[o],{throwOnError:!1,displayMode:!1})}catch(t){this.log.warn("KaTeX inline error: "+t.message)}for(var r=n.querySelectorAll(".pict-content-katex-display"),a=0;a<r.length;a++)try{katex.render(r[a].textContent,r[a],{throwOnError:!1,displayMode:!0})}catch(t){this.log.warn("KaTeX display error: "+t.message)}}}}},{key:"showLoading",value:function(t,e){var n=e||"Pict-Content-Body",i=t||"Loading content...";this.pict.ContentAssignment.assignContent("#"+n,'<div class="pict-content-loading">'+i+"</div>")}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Pict-Content",DefaultRenderable:"Pict-Content-Display",DefaultDestinationAddress:"#Pict-Content-Container",AutoRender:!1,CSS:"\n\t\t.pict-content {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.pict-content-loading {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 200px;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.pict-content h1 {\n\t\t\tfont-size: 2em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tpadding-bottom: 0.3em;\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.pict-content h2 {\n\t\t\tfont-size: 1.5em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\n\t\t\tpadding-bottom: 0.25em;\n\t\t\tmargin-top: 1.5em;\n\t\t}\n\t\t.pict-content h3 {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin-top: 1.25em;\n\t\t}\n\t\t.pict-content h4, .pict-content h5, .pict-content h6 {\n\t\t\tcolor: #5E5549;\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.pict-content p {\n\t\t\tline-height: 1.7;\n\t\t\tcolor: #423D37;\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.pict-content a {\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.pict-content a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.pict-content-code-wrap {\n\t\t\tposition: relative;\n\t\t\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1.5;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow: auto;\n\t\t\tmargin: 1em 0;\n\t\t\tbackground: #3D3229;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 40px;\n\t\t\tpadding: 1.25em 0;\n\t\t\ttext-align: right;\n\t\t\tbackground: #342A22;\n\t\t\tborder-right: 1px solid #4A3F35;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 13px;\n\t\t\tline-height: 1.5;\n\t\t\tuser-select: none;\n\t\t\tpointer-events: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers span {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0 8px 0 0;\n\t\t}\n\t\t.pict-content-code-wrap pre {\n\t\t\tmargin: 0;\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 1.25em 1.25em 1.25em 52px;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content-code-wrap pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.pict-content-code-wrap .keyword { color: #C678DD; }\n\t\t.pict-content-code-wrap .string { color: #98C379; }\n\t\t.pict-content-code-wrap .number { color: #D19A66; }\n\t\t.pict-content-code-wrap .comment { color: #7F848E; font-style: italic; }\n\t\t.pict-content-code-wrap .operator { color: #56B6C2; }\n\t\t.pict-content-code-wrap .punctuation { color: #E8E0D4; }\n\t\t.pict-content-code-wrap .function-name { color: #61AFEF; }\n\t\t.pict-content-code-wrap .property { color: #E06C75; }\n\t\t.pict-content-code-wrap .tag { color: #E06C75; }\n\t\t.pict-content-code-wrap .attr-name { color: #D19A66; }\n\t\t.pict-content-code-wrap .attr-value { color: #98C379; }\n\t\t.pict-content pre {\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 1.25em;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t.pict-content code {\n\t\t\tbackground: #F0ECE4;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #9E6B47;\n\t\t}\n\t\t.pict-content pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content blockquote {\n\t\t\tborder-left: 4px solid #2E7D74;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: #F7F5F0;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.pict-content blockquote p {\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-content ul, .pict-content ol {\n\t\t\tpadding-left: 2em;\n\t\t\tline-height: 1.8;\n\t\t}\n\t\t.pict-content li {\n\t\t\tmargin: 0.25em 0;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid #DDD6CA;\n\t\t\tmargin: 2em 0;\n\t\t}\n\t\t.pict-content table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content table th {\n\t\t\tbackground: #F5F0E8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.pict-content table td {\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content table tr:nth-child(even) {\n\t\t\tbackground: #F7F5F0;\n\t\t}\n\t\t.pict-content img {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\t\t.pict-content pre.mermaid {\n\t\t\tbackground: #fff;\n\t\t\tcolor: #3D3229;\n\t\t\ttext-align: center;\n\t\t\tpadding: 1em;\n\t\t}\n\t\t.pict-content .pict-content-katex-display {\n\t\t\ttext-align: center;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\t\t.pict-content .pict-content-katex-inline {\n\t\t\tdisplay: inline;\n\t\t}\n\t",Templates:[{Hash:"Pict-Content-Template",Template:'\n<div class="pict-content" id="Pict-Content-Body">\n\t<div class="pict-content-loading">Loading content...</div>\n</div>\n'}],Renderables:[{RenderableHash:"Pict-Content-Display",TemplateHash:"Pict-Content-Template",DestinationAddress:"#Pict-Content-Container",RenderMethod:"replace"}]}},{"pict-view":88}],48:[function(t,e,n){e.exports={Name:"Pict Docuserve",Hash:"Docuserve",MainViewportViewIdentifier:"Docuserve-Layout",AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!1,AutoRenderViewsAfterInitialize:!1,pict_configuration:{Product:"Docuserve-Pict-Application"}}},{}],49:[function(t,e,n){var i=t("pict-application"),o=t("./providers/Pict-Provider-Docuserve-Documentation.js"),r=t("./views/PictView-Docuserve-Layout.js"),a=t("./views/PictView-Docuserve-TopBar.js"),s=t("./views/PictView-Docuserve-Sidebar.js"),c=t("./views/PictView-Docuserve-Splash.js"),l=t("./views/PictView-Docuserve-Content.js"),d=t("./views/PictView-Docuserve-Search.js"),p=function(t){function e(t,n,i){var p;return _classCallCheck(this,e),(p=_callSuper(this,e,[t,n,i])).pict.addProvider("Docuserve-Documentation",o.default_configuration,o),p.pict.addView("Docuserve-Layout",r.default_configuration,r),p.pict.addView("Docuserve-TopBar",a.default_configuration,a),p.pict.addView("Docuserve-Sidebar",s.default_configuration,s),p.pict.addView("Docuserve-Splash",c.default_configuration,c),p.pict.addView("Docuserve-Content",l.default_configuration,l),p.pict.addView("Docuserve-Search",d.default_configuration,d),p}return _inherits(e,t),_createClass(e,[{key:"onAfterInitializeAsync",value:function(t){var n=this;this.pict.AppData.Docuserve={CatalogLoaded:!1,Catalog:null,CoverLoaded:!1,Cover:null,SidebarLoaded:!1,SidebarGroups:[],TopBarLoaded:!1,TopBar:null,ErrorPageLoaded:!1,ErrorPageHTML:null,KeywordIndexLoaded:!1,KeywordDocumentCount:0,CurrentGroup:"",CurrentModule:"",CurrentPath:"",SidebarVisible:!0,DocsBaseURL:"",CatalogURL:"retold-catalog.json"},this.pict.providers["Docuserve-Documentation"].loadCatalog(function(){var i=n.pict.AppData.Docuserve;return i.CoverLoaded&&i.Cover&&i.Cover.Title?document.title=i.Cover.Title.replace(/<[^>]*>/g,""):i.TopBarLoaded&&i.TopBar&&i.TopBar.Brand&&(document.title=i.TopBar.Brand.replace(/<[^>]*>/g,"")),n.pict.views["Docuserve-Layout"].render(),_superPropGet(e,"onAfterInitializeAsync",n,3)([t])})}},{key:"resolveHash",value:function(){var t=(window.location.hash||"").replace(/^#\/?/,"");if(t&&"Home"!==t){var e=t.split("/");if("search"!==e[0])if("page"===e[0]&&e.length>=2){var n=e.slice(1).join("/");this.navigateToPage(n)}else if("doc"===e[0]&&e.length>=3){var i=e[1],o=e[2];if(e.length>=4){var r=e.slice(3).join("/");this.navigateToModulePath(i,o,r)}else this.navigateToModule(i,o)}else this.navigateToPage(t);else{var a=decodeURIComponent(e.slice(1).join("/"));this.navigateToSearch(a)}}else this.showView("Docuserve-Splash")}},{key:"navigateTo",value:function(t){window.location.hash=t}},{key:"showView",value:function(t){t in this.pict.views&&(this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath="",this.pict.views[t].render(),this.pict.views["Docuserve-Sidebar"].clearModuleNav(),this.pict.views["Docuserve-Sidebar"].renderSidebarGroups())}},{key:"navigateToModule",value:function(t,e){this.navigateToModulePath(t,e,"README.md")}},{key:"navigateToModulePath",value:function(t,e,n){var i=this.pict.providers["Docuserve-Documentation"],o=this.pict.views["Docuserve-Content"],r=this.pict.views["Docuserve-Sidebar"];this.pict.AppData.Docuserve.CurrentGroup=t,this.pict.AppData.Docuserve.CurrentModule=e,this.pict.AppData.Docuserve.CurrentPath=n,o.render(),o.showLoading(),r.renderSidebarGroups(),r.renderModuleNav(t,e);var a=i.resolveDocumentURL(t,e,n||"README.md");if(a){var s=n||"README.md";i.fetchDocument(a,function(n,r){if(n){var a=t+"/"+e+"/"+s;i.fetchLocalDocument(a,function(t,e){o.displayContent(e)},t,e,s)}else o.displayContent(r)},t,e,s)}else o.displayContent(i.getErrorPageHTML(t+"/"+e))}},{key:"navigateToPage",value:function(t){var e=this.pict.providers["Docuserve-Documentation"],n=this.pict.views["Docuserve-Content"],i=this.pict.views["Docuserve-Sidebar"];this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath=t,n.render(),n.showLoading(),i.clearModuleNav(),i.renderSidebarGroups();var o=t;o.match(/\.md$/)||(o+=".md"),e.fetchLocalDocument(o,function(t,e){n.displayContent(e)})}},{key:"navigateToSearch",value:function(t){var e=this.pict.views["Docuserve-Sidebar"],n=this.pict.views["Docuserve-Search"];this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath="",e.clearModuleNav(),e.renderSidebarGroups(),n.render(),n.showSearch(t||"")}}])}(i);e.exports=p,e.exports.default_configuration=t("./Pict-Application-Docuserve-Configuration.json")},{"./Pict-Application-Docuserve-Configuration.json":48,"./providers/Pict-Provider-Docuserve-Documentation.js":50,"./views/PictView-Docuserve-Content.js":51,"./views/PictView-Docuserve-Layout.js":52,"./views/PictView-Docuserve-Search.js":53,"./views/PictView-Docuserve-Sidebar.js":54,"./views/PictView-Docuserve-Splash.js":55,"./views/PictView-Docuserve-TopBar.js":56,"pict-application":44}],50:[function(t,e,n){var i=t("pict-provider"),o=t("lunr"),r=t("pict-section-content").PictContentProvider,a=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._Catalog=null,o._ContentCache={},o._ContentProvider=o.pict.addProvider("Pict-Content",r.default_configuration,r),o}return _inherits(e,t),_createClass(e,[{key:"_createLinkResolver",value:function(t,e,n){var i=this;return function(o,r){if(o.match(/^\//)||o.match(/^[^:]+\.md/))return{href:i.convertDocLink(o,t,e,n)};var a=i.resolveGitHubURLToRoute(o);return a?{href:a}:null}}},{key:"_createImageResolver",value:function(t){var e="";if(t){var n=t.lastIndexOf("/");n>=0&&(e=t.substring(0,n+1))}return function(t,n){return t.match(/^https?:\/\//)||t.match(/^data:/)||t.match(/^\//)?t:e+t}}},{key:"loadCatalog",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.CatalogURL||"retold-catalog.json",o=function(){var t=5,i=function(){if(--t<=0){if(e.pict.AppData.Docuserve.SidebarGroups&&!(e.pict.AppData.Docuserve.SidebarGroups.length<1))return n();e.autoDiscoverSidebar(n)}};e.loadCover(i),e.loadSidebar(i),e.loadTopbar(i),e.loadErrorPage(i),e.loadKeywordIndex(i)};fetch(i).then(function(t){return t.ok?t.json():(e.log.info("Docuserve: No catalog at [".concat(i,"]; running in standalone mode.")),null)}).then(function(t){t&&(e._Catalog=t,e.pict.AppData.Docuserve.Catalog=t,e.pict.AppData.Docuserve.CatalogLoaded=!0,e.buildSidebarData(t)),o()}).catch(function(t){e.log.info("Docuserve: Catalog load error (".concat(t,"); continuing in standalone mode.")),o()})}},{key:"autoDiscoverSidebar",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"README.md").then(function(t){return t.ok?t.text():null}).then(function(t){if(t){var i=t.match(/^#+\s+(.+)/m),o=i?i[1].trim():"Docs";e.pict.AppData.Docuserve.SidebarGroups=[{Name:o,Key:"docs",Route:"#/page/README",Modules:[]}],e.pict.AppData.Docuserve.CoverLoaded||(e.pict.AppData.Docuserve.Cover={Title:o,Tagline:"",Description:"",Highlights:[],Actions:[{Text:"Read the Docs",Href:"README.md"}]},e.pict.AppData.Docuserve.CoverLoaded=!0)}else e.log.info("Docuserve: No README.md found; sidebar will be empty.");return n()}).catch(function(t){return e.log.info("Docuserve: README.md discovery failed (".concat(t,").")),n()})}},{key:"loadCover",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"_cover.md").then(function(t){return t.ok?t.text():null}).then(function(t){return t?(e.pict.AppData.Docuserve.Cover=e.parseCover(t),e.pict.AppData.Docuserve.CoverLoaded=!0,n()):(e.log.info("Docuserve: No _cover.md found; splash will use catalog data."),n())}).catch(function(t){return e.log.warn("Docuserve: Error loading _cover.md: ".concat(t)),n()})}},{key:"parseCover",value:function(t){for(var e={Title:"",Tagline:"",Description:"",Highlights:[],Actions:[]},n=t.split("\n"),i=0;i<n.length;i++){var o=n[i].trim();if(o){var r=o.match(/^#+\s+(.+)/);if(r)e.Title=r[1].trim();else{var a=o.match(/^>\s*(.*)/);if(a)e.Tagline=a[1].trim();else{var s=o.match(/^[-*+]\s+(.*)/);if(s){var c=s[1],l=c.match(/^\*\*([^*]+)\*\*\s*[-—:]\s*(.*)/);l?e.Highlights.push({Label:l[1].trim(),Text:l[2].trim()}):e.Highlights.push({Label:"",Text:c.trim()})}else{var d=o.match(/^\[([^\]]+)\]\(([^)]+)\)\s*$/);d?e.Actions.push({Text:d[1].trim(),Href:d[2].trim()}):e.Description?e.Description+=" "+o:e.Description=o}}}}}return e}},{key:"loadSidebar",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"_sidebar.md").then(function(t){return t.ok?t.text():null}).then(function(t){if(!t)return e.log.info("Docuserve: No _sidebar.md found; sidebar will use catalog data."),n();var i=e.parseSidebarMarkdown(t);return i&&i.length>0&&(e.pict.AppData.Docuserve.SidebarGroups=i,e.pict.AppData.Docuserve.SidebarLoaded=!0),n()}).catch(function(t){return e.log.warn("Docuserve: Error loading _sidebar.md: ".concat(t)),n()})}},{key:"loadTopbar",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"_topbar.md").then(function(t){return t.ok?t.text():null}).then(function(t){return t?(e.pict.AppData.Docuserve.TopBar=e.parseTopbar(t),e.pict.AppData.Docuserve.TopBarLoaded=!0,n()):(e.log.info("Docuserve: No _topbar.md found; top bar will use defaults."),n())}).catch(function(t){return e.log.warn("Docuserve: Error loading _topbar.md: ".concat(t)),n()})}},{key:"parseTopbar",value:function(t){for(var e={Brand:"",NavLinks:[],ExternalLinks:[]},n=t.split("\n"),i=0;i<n.length;i++){var o=n[i].trim();if(o){var r=o.match(/^#+\s+(.+)/);if(r)e.Brand=r[1].trim();else{var a=o.match(/^[-*+]\s+(.*)/);if(a){var s=a[1].trim().match(/^\[([^\]]+)\]\(([^)]+)\)/);if(s){var c=s[1].trim(),l=s[2].trim();if(l.match(/^https?:\/\//))e.ExternalLinks.push({Text:c,Href:l});else{var d=this.convertSidebarLink(l);e.NavLinks.push({Text:c,Href:d})}}}else;}}}return e}},{key:"loadErrorPage",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"errorpage.md").then(function(t){return t.ok?t.text():null}).then(function(t){return t?(e.pict.AppData.Docuserve.ErrorPageHTML=e._ContentProvider.parseMarkdown(t),e.pict.AppData.Docuserve.ErrorPageLoaded=!0,n()):(e.log.info("Docuserve: No errorpage.md found; errors will use default page."),n())}).catch(function(t){return e.log.warn("Docuserve: Error loading errorpage.md: ".concat(t)),n()})}},{key:"loadKeywordIndex",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"retold-keyword-index.json").then(function(t){return t.ok?t.json():null}).then(function(t){if(!t||!t.LunrIndex||!t.Documents)return e.log.info("Docuserve: No keyword index found; search will be unavailable."),n();try{e._LunrIndex=o.Index.load(t.LunrIndex),e._KeywordDocuments=t.Documents,e.pict.AppData.Docuserve.KeywordIndexLoaded=!0,e.pict.AppData.Docuserve.KeywordDocumentCount=t.DocumentCount||0,e.log.info("Docuserve: Keyword index loaded (".concat(t.DocumentCount||0," documents)."))}catch(t){e.log.warn("Docuserve: Error hydrating lunr index: ".concat(t))}return n()}).catch(function(t){return e.log.warn("Docuserve: Error loading keyword index: ".concat(t)),n()})}},{key:"isModuleInCatalog",value:function(t,e){if(!this._Catalog||!this._Catalog.Groups)return!1;for(var n=0;n<this._Catalog.Groups.length;n++){var i=this._Catalog.Groups[n];if(i.Key===t)for(var o=0;o<i.Modules.length;o++){if(i.Modules[o].Name===e)return!0}}return!1}},{key:"findModuleGroupKey",value:function(t){if(!this._Catalog||!this._Catalog.Groups)return null;for(var e=0;e<this._Catalog.Groups.length;e++)for(var n=this._Catalog.Groups[e],i=0;i<n.Modules.length;i++)if(n.Modules[i].Name===t)return n.Key;return null}},{key:"isGroupInCatalog",value:function(t){if(!this._Catalog||!this._Catalog.Groups)return!1;for(var e=0;e<this._Catalog.Groups.length;e++)if(this._Catalog.Groups[e].Key===t)return!0;return!1}},{key:"search",value:function(t){if(!(this._LunrIndex&&this._KeywordDocuments&&t&&t.trim()))return[];var e=[];try{for(var n=this._LunrIndex.search(t),i=0;i<n.length;i++){var o=n[i].ref,r=n[i].score,a=this._KeywordDocuments[o];if(a){var s=o.split("/"),c="";if(s.length>=2){var l=s[0],d=s[1];c=this.isModuleInCatalog(l,d)?"#/doc/"+o:"#/page/"+o}e.push({Key:o,Title:a.Title||o,Group:a.Group||"",Module:a.Module||"",DocPath:a.DocPath||"",Score:r,Route:c})}}}catch(t){this.log.warn("Docuserve: Search error: ".concat(t))}return e}},{key:"getErrorPageHTML",value:function(t){var e=t||"unknown";return this.pict.AppData.Docuserve.ErrorPageLoaded&&this.pict.AppData.Docuserve.ErrorPageHTML?this.pict.AppData.Docuserve.ErrorPageHTML.replace(/\{\{path\}\}/g,this._ContentProvider.escapeHTML(e)):'<div class="docuserve-not-found"><h2>Page Not Found</h2><p>The document <code>'+this._ContentProvider.escapeHTML(e)+'</code> could not be loaded.</p><p><a href="#/Home">Return to the home page</a></p></div>'}},{key:"parseSidebarMarkdown",value:function(t){for(var e=[],n=null,i=t.split("\n"),o=0;o<i.length;o++){var r=i[o];if(r.trim()){var a=r.match(/^(\s*)/),s=a?a[1].length:0,c=r.trim().match(/^[-*+]\s+(.*)/);if(c){var l=c[1].trim(),d=l.match(/^\[([^\]]+)\]\(([^)]+)\)/);if(s<2)if(d){var p=d[1].trim(),u=d[2].trim();n={Name:p,Key:this.deriveGroupKey(p,u),Route:this.convertSidebarLink(u),Modules:[]},e.push(n)}else{var h=l,f=h.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");n={Name:h,Key:f,Route:"",Modules:[]},e.push(n)}else if(n)if(d){var v=d[1].trim(),g=d[2].trim(),m=this.convertSidebarLink(g);n.Modules.push({Name:v,HasDocs:!0,Group:n.Key,Route:m})}else n.Modules.push({Name:l,HasDocs:!1,Group:n.Key,Route:""})}}}return e}},{key:"convertSidebarLink",value:function(t){if(!t)return"";if("/"===t)return"#/Home";if(t.match(/^#[^/]/)){var e=this.pict.AppData.Docuserve.SidebarGroups;if(e)for(var n=0;n<e.length;n++){var i=e[n].Modules;if(i)for(var o=0;o<i.length;o++)if(i[o].HasDocs&&i[o].Route&&"#/Home"!==i[o].Route)return i[o].Route;if(e[n].Route&&"#/Home"!==e[n].Route)return e[n].Route}return"#/Home"}var r=t.replace(/^\//,"").replace(/\/$/,"");if(!r)return"#/Home";var a=r.split("/");if(a.length>=2){if(this.isGroupInCatalog(a[0])&&this.isModuleInCatalog(a[0],a[1]))return"#/doc/"+r;var s=this.findModuleGroupKey(a[1]);if(s){var c=a.slice(2).join("/");return c?"#/doc/"+s+"/"+a[1]+"/"+c:"#/doc/"+s+"/"+a[1]}}return r.match(/\.md$/)?"#/page/"+r.replace(/\.md$/,""):"#/page/"+r}},{key:"deriveGroupKey",value:function(t,e){if(e&&"/"!==e){var n=e.replace(/^\//,"").replace(/\.md$/,"").replace(/\/$/,"");if(n&&!n.includes("/"))return n.toLowerCase()}return t.split(/[\s—\-:]+/)[0].toLowerCase().replace(/[^a-z0-9]/g,"")}},{key:"buildSidebarData",value:function(t){for(var e=[],n=0;n<t.Groups.length;n++){for(var i=t.Groups[n],o={Name:i.Name,Key:i.Key,Description:i.Description,Modules:[]},r=0;r<i.Modules.length;r++){var a=i.Modules[r];o.Modules.push({Name:a.Name,HasDocs:a.HasDocs,Group:i.Key,Route:"#/doc/"+i.Key+"/"+a.Name})}e.push(o)}this.pict.AppData.Docuserve.SidebarGroups=e}},{key:"resolveDocumentURL",value:function(t,e,n){if(!this._Catalog)return null;for(var i=this._Catalog.GitHubOrg||"stevenvelozo",o=this._Catalog.DefaultBranch||"master",r=0;r<this._Catalog.Groups.length;r++){var a=this._Catalog.Groups[r];if(a.Key===t)for(var s=0;s<a.Modules.length;s++){var c=a.Modules[s];if(c.Name===e){var l=c.Branch||o,d=n||"README.md";return"https://raw.githubusercontent.com/"+i+"/"+c.Repo+"/"+l+"/docs/"+d}}}return null}},{key:"resolveGitHubURLToRoute",value:function(t){if(!this._Catalog||!this._Catalog.Groups||!t)return null;var e=t.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)/);if(!e)return null;var n=e[1],i=e[2];if(n!==this._Catalog.GitHubOrg)return null;for(var o=0;o<this._Catalog.Groups.length;o++)for(var r=this._Catalog.Groups[o],a=0;a<r.Modules.length;a++){var s=r.Modules[a];if(s.Repo===i)return"#/doc/"+r.Key+"/"+s.Name}return null}},{key:"resolveGitHubPagesURL",value:function(t,e){if(!this._Catalog||!this._Catalog.Groups)return null;for(var n=this._Catalog.GitHubOrg||"stevenvelozo",i=0;i<this._Catalog.Groups.length;i++){var o=this._Catalog.Groups[i];if(o.Key===t)for(var r=0;r<o.Modules.length;r++){var a=o.Modules[r];if(a.Name===e)return a.HasDocs?"https://"+n+".github.io/"+a.Repo+"/":null}}return null}},{key:"getModuleSidebar",value:function(t,e){if(!this._Catalog)return null;for(var n=0;n<this._Catalog.Groups.length;n++){var i=this._Catalog.Groups[n];if(i.Key===t)for(var o=0;o<i.Modules.length;o++){var r=i.Modules[o];if(r.Name===e)return r.Sidebar||null}}return null}},{key:"fetchDocument",value:function(t,e,n,i,o){var r=this,a="function"==typeof e?e:function(){};return t?this._ContentCache[t]?a(null,this._ContentCache[t]):void fetch(t).then(function(t){return t.ok?t.text():null}).then(function(e){if(!e)return a("Document not found",r.getErrorPageHTML(t));var s=r._ContentProvider.parseMarkdown(e,r._createLinkResolver(n,i,o),r._createImageResolver(t));return r._ContentCache[t]=s,a(null,s)}).catch(function(e){return r.log.warn("Docuserve: Error fetching document [".concat(t,"]: ").concat(e)),a(e,r.getErrorPageHTML(t))}):a("No URL provided","")}},{key:"fetchLocalDocument",value:function(t,e,n,i,o){var r=(this.pict.AppData.Docuserve.DocsBaseURL||"")+t;this.fetchDocument(r,e,n,i,o)}},{key:"convertDocLink",value:function(t,e,n,i){var o=t.replace(/^\.\//,""),r=(o=o.replace(/^\//,"")).split("/");if(r.length>=2&&this.isGroupInCatalog(r[0])&&this.isModuleInCatalog(r[0],r[1]))return"#/doc/"+o;if(e&&n){var a="";if(i){var s=i.split("/");s.length>1&&(s.pop(),a=s.join("/")+"/")}return"#/doc/"+e+"/"+n+"/"+a+o}return o.match(/\.md$/)?"#/page/"+o.replace(/\.md$/,""):"#/page/"+o}}])}(i);e.exports=a,e.exports.default_configuration={ProviderIdentifier:"Docuserve-Documentation",AutoInitialize:!0,AutoInitializeOrdinal:0}},{lunr:32,"pict-provider":58,"pict-section-content":45}],51:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"displayContent",value:function(t){var n=t,i=this.pict.AppData.Docuserve.CurrentGroup,o=this.pict.AppData.Docuserve.CurrentModule;if(i&&o){var r=this.pict.providers["Docuserve-Documentation"];if(r){var a=r.resolveGitHubPagesURL(i,o);a&&(n='<div class="docuserve-module-external-link"><a href="'+a+'" target="_blank" rel="noopener">↗ View '+o+" documentation site</a></div>"+n)}}_superPropGet(e,"displayContent",this,3)([n,"Docuserve-Content-Body"])}},{key:"showLoading",value:function(){_superPropGet(e,"showLoading",this,3)(["Loading documentation...","Docuserve-Content-Body"])}}])}(t("pict-section-content"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-Content",DefaultRenderable:"Docuserve-Content-Display",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.pict-content {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.pict-content-loading {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 200px;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.pict-content h1 {\n\t\t\tfont-size: 2em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tpadding-bottom: 0.3em;\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.pict-content h2 {\n\t\t\tfont-size: 1.5em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\n\t\t\tpadding-bottom: 0.25em;\n\t\t\tmargin-top: 1.5em;\n\t\t}\n\t\t.pict-content h3 {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin-top: 1.25em;\n\t\t}\n\t\t.pict-content h4, .pict-content h5, .pict-content h6 {\n\t\t\tcolor: #5E5549;\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.pict-content p {\n\t\t\tline-height: 1.7;\n\t\t\tcolor: #423D37;\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.pict-content a {\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.pict-content a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.pict-content pre {\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 1.25em;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t.pict-content code {\n\t\t\tbackground: #F0ECE4;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #9E6B47;\n\t\t}\n\t\t.pict-content pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content-code-wrap {\n\t\t\tposition: relative;\n\t\t\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1.5;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow: auto;\n\t\t\tmargin: 1em 0;\n\t\t\tbackground: #3D3229;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 40px;\n\t\t\tpadding: 1.25em 0;\n\t\t\ttext-align: right;\n\t\t\tbackground: #342A22;\n\t\t\tborder-right: 1px solid #4A3F35;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 13px;\n\t\t\tline-height: 1.5;\n\t\t\tuser-select: none;\n\t\t\tpointer-events: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers span {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0 8px 0 0;\n\t\t}\n\t\t.pict-content-code-wrap pre {\n\t\t\tmargin: 0;\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 1.25em 1.25em 1.25em 52px;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content-code-wrap pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.pict-content-code-wrap .keyword { color: #C678DD; }\n\t\t.pict-content-code-wrap .string { color: #98C379; }\n\t\t.pict-content-code-wrap .number { color: #D19A66; }\n\t\t.pict-content-code-wrap .comment { color: #7F848E; font-style: italic; }\n\t\t.pict-content-code-wrap .operator { color: #56B6C2; }\n\t\t.pict-content-code-wrap .punctuation { color: #E8E0D4; }\n\t\t.pict-content-code-wrap .function-name { color: #61AFEF; }\n\t\t.pict-content-code-wrap .property { color: #E06C75; }\n\t\t.pict-content-code-wrap .tag { color: #E06C75; }\n\t\t.pict-content-code-wrap .attr-name { color: #D19A66; }\n\t\t.pict-content-code-wrap .attr-value { color: #98C379; }\n\t\t.pict-content blockquote {\n\t\t\tborder-left: 4px solid #2E7D74;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: #F7F5F0;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.pict-content blockquote p {\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-content ul, .pict-content ol {\n\t\t\tpadding-left: 2em;\n\t\t\tline-height: 1.8;\n\t\t}\n\t\t.pict-content li {\n\t\t\tmargin: 0.25em 0;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid #DDD6CA;\n\t\t\tmargin: 2em 0;\n\t\t}\n\t\t.pict-content table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content table th {\n\t\t\tbackground: #F5F0E8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.pict-content table td {\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content table tr:nth-child(even) {\n\t\t\tbackground: #F7F5F0;\n\t\t}\n\t\t.pict-content img {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\t\t.pict-content pre.mermaid {\n\t\t\tbackground: #fff;\n\t\t\tcolor: #3D3229;\n\t\t\ttext-align: center;\n\t\t\tpadding: 1em;\n\t\t}\n\t\t.pict-content .pict-content-katex-display {\n\t\t\ttext-align: center;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\t\t.pict-content .pict-content-katex-inline {\n\t\t\tdisplay: inline;\n\t\t}\n\t\t.docuserve-module-external-link {\n\t\t\tpadding: 0.5em 0;\n\t\t\tmargin-bottom: 0.5em;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\n\t\t\tfont-size: 0.85em;\n\t\t\ttext-align: right;\n\t\t}\n\t\t.docuserve-module-external-link a {\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.docuserve-module-external-link a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-not-found {\n\t\t\ttext-align: center;\n\t\t\tpadding: 3em 1em;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.docuserve-not-found h2 {\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1.5em;\n\t\t\tborder-bottom: none;\n\t\t}\n\t\t.docuserve-not-found code {\n\t\t\tbackground: #F0ECE4;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #9E6B47;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Content-Template",Template:'\n<div class="pict-content" id="Docuserve-Content-Body">\n\t<div class="pict-content-loading">Loading documentation...</div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Content-Display",TemplateHash:"Docuserve-Content-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-section-content":45}],52:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){if(this.pict.views["Docuserve-TopBar"].render(),this.pict.views["Docuserve-Sidebar"].render(),this.pict.views["Docuserve-Splash"].render(),this.pict.CSSMap.injectCSS(),this.pict.PictApplication.resolveHash(),!this._HashChangeListenerBound){this._HashChangeListenerBound=!0;var r=this;window.addEventListener("hashchange",function(){r.pict.PictApplication.resolveHash()})}return _superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-Layout",DefaultRenderable:"Docuserve-Layout-Shell",DefaultDestinationAddress:"#Docuserve-Application-Container",AutoRender:!1,CSS:"\n\t\t#Docuserve-Application-Container {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100vh;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t#Docuserve-TopBar-Container {\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.docuserve-body {\n\t\t\tdisplay: flex;\n\t\t\tflex: 1;\n\t\t\tmin-height: 0;\n\t\t}\n\t\t#Docuserve-Sidebar-Container {\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 280px;\n\t\t\toverflow-y: auto;\n\t\t\tbackground-color: #F5F0E8;\n\t\t}\n\t\t#Docuserve-Content-Container {\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t\toverflow-y: auto;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Layout-Shell-Template",Template:'\n<div id="Docuserve-TopBar-Container"></div>\n<div class="docuserve-body">\n\t<div id="Docuserve-Sidebar-Container"></div>\n\t<div id="Docuserve-Content-Container"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Layout-Shell",TemplateHash:"Docuserve-Layout-Shell-Template",DestinationAddress:"#Docuserve-Application-Container",RenderMethod:"replace"}]}},{"pict-view":88}],53:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._SearchDebounceTimer=null,o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){var r=this,a=document.getElementById("Docuserve-Search-Input");return a&&a.addEventListener("input",function(){r._SearchDebounceTimer&&clearTimeout(r._SearchDebounceTimer),r._SearchDebounceTimer=setTimeout(function(){r.performSearch(a.value)},250)}),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"showSearch",value:function(t){var e=document.getElementById("Docuserve-Search-Input");if(e&&(e.value=t||"",e.focus()),t&&t.trim())this.performSearch(t);else{var n=this.pict.AppData.Docuserve.KeywordDocumentCount||0,i=n>0?"Search across "+n+" documents.":"Enter a search term to find documentation.";this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status",i),this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results","")}var o=document.getElementById("Docuserve-Content-Container");o&&(o.scrollTop=0)}},{key:"performSearch",value:function(t){if(!t||!t.trim()){var e=this.pict.AppData.Docuserve.KeywordDocumentCount||0,n=e>0?"Search across "+e+" documents.":"Enter a search term to find documentation.";return this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status",n),void this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results","")}var i=this.pict.providers["Docuserve-Documentation"].search(t);if(0===i.length)return this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status","No results found for '"+this.escapeHTML(t)+"'."),void this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results","");this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status",i.length+" result"+(1!==i.length?"s":"")+" for '"+this.escapeHTML(t)+"'");for(var o="",r=0;r<i.length;r++){var a=i[r],s="";a.Group&&a.Module&&(s=a.Group+" › "+a.Module),o+='<a class="docuserve-search-result" href="'+a.Route+'">',o+='<div class="docuserve-search-result-title">'+this.escapeHTML(a.Title)+"</div>",s&&(o+='<div class="docuserve-search-result-breadcrumb">'+s+"</div>"),a.DocPath&&(o+='<div class="docuserve-search-result-path">'+this.escapeHTML(a.DocPath)+"</div>"),o+="</a>"}this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results",o)}},{key:"escapeHTML",value:function(t){return t?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-Search",DefaultRenderable:"Docuserve-Search-Display",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-search {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.docuserve-search-header {\n\t\t\tmargin-bottom: 1.5em;\n\t\t}\n\t\t.docuserve-search-header h1 {\n\t\t\tfont-size: 1.75em;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin: 0 0 0.75em 0;\n\t\t}\n\t\t.docuserve-search-input {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.75em 1em;\n\t\t\tfont-size: 1.1em;\n\t\t\tborder: 2px solid #D4CCBE;\n\t\t\tborder-radius: 6px;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t\ttransition: border-color 0.15s;\n\t\t}\n\t\t.docuserve-search-input:focus {\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.docuserve-search-status {\n\t\t\tmargin-top: 0.75em;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #8A7F72;\n\t\t}\n\t\t.docuserve-search-results {\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.docuserve-search-result {\n\t\t\tdisplay: block;\n\t\t\tpadding: 1em 1.25em;\n\t\t\tmargin-bottom: 0.5em;\n\t\t\tborder: 1px solid #EAE3D8;\n\t\t\tborder-radius: 6px;\n\t\t\ttext-decoration: none;\n\t\t\tcolor: inherit;\n\t\t\ttransition: border-color 0.15s, box-shadow 0.15s;\n\t\t}\n\t\t.docuserve-search-result:hover {\n\t\t\tborder-color: #2E7D74;\n\t\t\tbox-shadow: 0 2px 8px rgba(46, 125, 116, 0.1);\n\t\t}\n\t\t.docuserve-search-result-title {\n\t\t\tfont-size: 1.05em;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #2E7D74;\n\t\t\tmargin-bottom: 0.25em;\n\t\t}\n\t\t.docuserve-search-result-breadcrumb {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-bottom: 0.2em;\n\t\t}\n\t\t.docuserve-search-result-path {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: #A39889;\n\t\t\tfont-family: monospace;\n\t\t}\n\t\t.docuserve-search-empty {\n\t\t\ttext-align: center;\n\t\t\tpadding: 3em 1em;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1em;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Search-Template",Template:'\n<div class="docuserve-search">\n\t<div class="docuserve-search-header">\n\t\t<h1>Search Documentation</h1>\n\t\t<input type="text" class="docuserve-search-input" id="Docuserve-Search-Input" placeholder="Search across all modules...">\n\t\t<div id="Docuserve-Search-Status" class="docuserve-search-status"></div>\n\t</div>\n\t<div id="Docuserve-Search-Results" class="docuserve-search-results"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Search-Display",TemplateHash:"Docuserve-Search-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":88}],54:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._SidebarSearchDebounceTimer=null,o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){var r=this;this.renderSidebarGroups();var a=document.getElementById("Docuserve-Sidebar-Search");if(a&&this.pict.AppData.Docuserve.KeywordIndexLoaded){a.style.display="";var s=document.getElementById("Docuserve-Sidebar-Search-Input");s&&s.addEventListener("input",function(){r._SidebarSearchDebounceTimer&&clearTimeout(r._SidebarSearchDebounceTimer),r._SidebarSearchDebounceTimer=setTimeout(function(){r.performSidebarSearch(s.value)},250)})}return _superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"renderSidebarGroups",value:function(){var t=this.pict.AppData.Docuserve.SidebarGroups;if(!t||t.length<1)this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-Groups","");else{for(var e="",n=0;n<t.length;n++){var i=t[n];e+='<div class="docuserve-sidebar-group">';var o=i.Route||"";if(!o)for(var r=0;r<i.Modules.length;r++)if(i.Modules[r].HasDocs&&i.Modules[r].Route){o=i.Modules[r].Route;break}if(o){var a="",s=window.location.hash||"";this.pict.AppData.Docuserve.CurrentGroup!==i.Key&&s!==o||(a=" active"),e+='<a class="docuserve-sidebar-group-title'+a+'" href="'+o+'">'+this.escapeHTML(i.Name)+"</a>"}else e+='<div class="docuserve-sidebar-group-title">'+this.escapeHTML(i.Name)+"</div>";e+='<ul class="docuserve-sidebar-modules">';for(var c=0;c<i.Modules.length;c++){var l=i.Modules[c];if(l.HasDocs){var d="";this.pict.AppData.Docuserve.CurrentGroup===l.Group&&this.pict.AppData.Docuserve.CurrentModule===l.Name&&(d=' class="active"'),e+="<li><a"+d+' href="'+l.Route+'">'+this.escapeHTML(l.Name)+"</a></li>"}else e+='<li><span class="no-docs">'+this.escapeHTML(l.Name)+"</span></li>"}e+="</ul>",e+="</div>"}this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-Groups",e)}}},{key:"renderModuleNav",value:function(t,e){var n=this.pict.providers["Docuserve-Documentation"];if(n){var i=n.getModuleSidebar(t,e);if(i){for(var o="#/doc/"+t+"/"+e+"/",r='<div class="docuserve-sidebar-module-nav">',a=0;a<i.length;a++){var s=i[a];if(s.Children){r+='<div class="docuserve-sidebar-module-nav-section">'+this.escapeHTML(s.Title)+"</div>";for(var c=0;c<s.Children.length;c++){var l=s.Children[c];l.Path&&(r+='<a href="'+o+l.Path+'">'+this.escapeHTML(l.Title)+"</a>")}}else s.Path&&(r+='<a href="'+o+s.Path+'">'+this.escapeHTML(s.Title)+"</a>")}r+="</div>",this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-ModuleNav",r)}else this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-ModuleNav","")}}},{key:"performSidebarSearch",value:function(t){var e=document.getElementById("Docuserve-Sidebar-Search-Results");if(e)if(t&&t.trim()){var n=this.pict.providers["Docuserve-Documentation"].search(t);if(0!==n.length){for(var i="",o=0;o<n.length&&o<8;o++){var r=n[o],a="";r.Group&&r.Module&&(a=r.Group+" / "+r.Module),i+='<a href="'+r.Route+'">',i+='<div class="docuserve-sidebar-search-result-title">'+this.escapeHTML(r.Title)+"</div>",a&&(i+='<div class="docuserve-sidebar-search-result-meta">'+this.escapeHTML(a)+"</div>"),i+="</a>"}if(n.length>8)i+='<a class="docuserve-sidebar-search-all" href="#/search/'+encodeURIComponent(t)+'">See all '+n.length+" results</a>";e.innerHTML=i}else e.innerHTML='<div style="padding: 0.4em 0.5em; font-size: 0.82em; color: #8A7F72;">No results found.</div>'}else e.innerHTML=""}},{key:"toggleSidebar",value:function(){this.pict.AppData.Docuserve.SidebarVisible=!this.pict.AppData.Docuserve.SidebarVisible;var t=document.getElementById("Docuserve-Sidebar-Container"),e=document.getElementById("Docuserve-TopBar-Toggle");this.pict.AppData.Docuserve.SidebarVisible?(t&&(t.style.display=""),e&&(e.style.display="none")):(t&&(t.style.display="none"),e&&(e.style.display="inline-block"))}},{key:"clearModuleNav",value:function(){this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-ModuleNav","")}},{key:"escapeHTML",value:function(t){return t?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):""}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-Sidebar",DefaultRenderable:"Docuserve-Sidebar-Content",DefaultDestinationAddress:"#Docuserve-Sidebar-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-sidebar {\n\t\t\tborder-right: 1px solid #DDD6CA;\n\t\t\tpadding: 1em 0;\n\t\t\tpadding-top: 0;\n\t\t\tmin-height: 100%;\n\t\t\tposition: relative;\n\t\t}\n\t\t.docuserve-sidebar-header {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: flex-end;\n\t\t\tpadding: 0.4em 0.5em 0;\n\t\t}\n\t\t.docuserve-sidebar-close {\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1.2em;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0.2em 0.4em;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.docuserve-sidebar-close:hover {\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-search {\n\t\t\tpadding: 0 1em 1em 1em;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\n\t\t\tmargin-bottom: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search input {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.5em 0.75em;\n\t\t\tborder: 1px solid #D4CCBE;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.85em;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.docuserve-sidebar-search input:focus {\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-search-results {\n\t\t\tmargin-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search-results a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tcolor: #423D37;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.82em;\n\t\t\tborder-radius: 3px;\n\t\t\ttransition: background-color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-search-results a:hover {\n\t\t\tbackground-color: #EAE3D8;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-search-result-title {\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.docuserve-sidebar-search-results a:hover .docuserve-sidebar-search-result-title {\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-search-result-meta {\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #8A7F72;\n\t\t}\n\t\t.docuserve-sidebar-search-all {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tfont-size: 0.82em;\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t\tborder-top: 1px solid #EAE3D8;\n\t\t\tmargin-top: 0.25em;\n\t\t\tpadding-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search-all:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-sidebar-home {\n\t\t\tpadding: 0.5em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.85em;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.03em;\n\t\t}\n\t\t.docuserve-sidebar-home a {\n\t\t\tcolor: #5E5549;\n\t\t\ttext-decoration: none;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.docuserve-sidebar-home a:hover {\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-group {\n\t\t\tmargin-top: 0.25em;\n\t\t}\n\t\t.docuserve-sidebar-group-title {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.5em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.85em;\n\t\t\tcolor: #5E5549;\n\t\t\ttext-decoration: none;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.03em;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t}\n\t\t.docuserve-sidebar-group-title:hover {\n\t\t\tcolor: #2E7D74;\n\t\t\tbackground-color: #EAE3D8;\n\t\t}\n\t\ta.docuserve-sidebar-group-title.active {\n\t\t\tcolor: #2E7D74;\n\t\t\tbackground-color: #E0EDEB;\n\t\t}\n\t\t.docuserve-sidebar-modules {\n\t\t\tlist-style: none;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t.docuserve-sidebar-modules li {\n\t\t\tpadding: 0;\n\t\t}\n\t\t.docuserve-sidebar-modules a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.3em 1.25em 0.3em 2em;\n\t\t\tcolor: #5E5549;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.85em;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-modules a:hover {\n\t\t\tbackground-color: #EAE3D8;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-modules a.active {\n\t\t\tcolor: #2E7D74;\n\t\t\tfont-weight: 600;\n\t\t\tbackground-color: #E0EDEB;\n\t\t}\n\t\t.docuserve-sidebar-modules .no-docs {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.3em 1.25em 0.3em 2em;\n\t\t\tcolor: #A39889;\n\t\t\tfont-size: 0.85em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav {\n\t\t\tborder-top: 1px solid #EAE3D8;\n\t\t\tmargin-top: 0.5em;\n\t\t\tpadding-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav-section {\n\t\t\tpadding: 0.4em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: #8A7F72;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.02em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.25em 1.25em 0.25em 2.25em;\n\t\t\tcolor: #5E5549;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.82em;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-module-nav a:hover {\n\t\t\tbackground-color: #EAE3D8;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Sidebar-Template",Template:'\n<div class="docuserve-sidebar">\n\t<div class="docuserve-sidebar-header">\n\t\t<button class="docuserve-sidebar-close" onclick="{~P~}.views[\'Docuserve-Sidebar\'].toggleSidebar()">×</button>\n\t</div>\n\t<div id="Docuserve-Sidebar-Search" class="docuserve-sidebar-search" style="display:none;">\n\t\t<input type="text" placeholder="Search docs..." id="Docuserve-Sidebar-Search-Input">\n\t\t<div id="Docuserve-Sidebar-Search-Results" class="docuserve-sidebar-search-results"></div>\n\t</div>\n\t<div class="docuserve-sidebar-home">\n\t\t<a onclick="{~P~}.PictApplication.navigateTo(\'/Home\')">Home</a>\n\t</div>\n\t<div id="Docuserve-Sidebar-Groups"></div>\n\t<div id="Docuserve-Sidebar-ModuleNav"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Sidebar-Content",TemplateHash:"Docuserve-Sidebar-Template",DestinationAddress:"#Docuserve-Sidebar-Container",RenderMethod:"replace"}]}},{"pict-view":88}],55:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){var r=this.pict.AppData.Docuserve;return r.CoverLoaded&&r.Cover?this.renderFromCover(r.Cover):this.renderFromCatalog(r),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"renderFromCover",value:function(t){this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Title",this.sanitizeTitle(t.Title)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Tagline",this.escapeHTML(t.Tagline)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Description",this.escapeHTML(t.Description));for(var e="",n=0;n<t.Highlights.length;n++){var i=t.Highlights[n];e+='<div class="docuserve-splash-highlight-card">',i.Label&&(e+="<h3>"+this.escapeHTML(i.Label)+"</h3>"),e+="<p>"+this.escapeHTML(i.Text)+"</p>",e+="</div>"}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Highlights",e);for(var o="",r=this.pict.providers["Docuserve-Documentation"],a=0;a<t.Actions.length;a++){var s=t.Actions[a],c=0===a?"primary":"secondary",l=s.Href;if(l.match(/^https?:\/\//))o+='<a class="'+c+'" href="'+this.escapeHTML(l)+'" target="_blank" rel="noopener">'+this.escapeHTML(s.Text)+"</a>";else{var d=r.convertSidebarLink(l);o+='<a class="'+c+'" href="'+this.escapeHTML(d)+'">'+this.escapeHTML(s.Text)+"</a>"}}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Actions",o)}},{key:"renderFromCatalog",value:function(t){var e="Documentation",n="";t.CatalogLoaded&&t.Catalog&&t.Catalog.Name?e=t.Catalog.Name:t.TopBarLoaded&&t.TopBar&&t.TopBar.Brand?e=t.TopBar.Brand:"undefined"!=typeof document&&document.title&&(e=document.title),t.CatalogLoaded&&t.Catalog&&t.Catalog.Description&&(n=t.Catalog.Description),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Title",this.escapeHTML(e)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Tagline",this.escapeHTML(n)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Description","");for(var i="",o=t.SidebarGroups||[],r=0;r<o.length;r++){var a=o[r];if(a.Modules&&!(a.Modules.length<1)){var s=a.Description||a.Modules.length+" modules";i+='<div class="docuserve-splash-highlight-card">',i+="<h3>"+this.escapeHTML(a.Name)+"</h3>",i+="<p>"+this.escapeHTML(s)+"</p>",i+="</div>"}}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Highlights",i),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Actions","")}},{key:"sanitizeTitle",value:function(t){return t?this.escapeHTML(t).replace(/<small>/gi,"<small>").replace(/<\/small>/gi,"</small>"):""}},{key:"escapeHTML",value:function(t){return t?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):""}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-Splash",DefaultRenderable:"Docuserve-Splash-Content",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-splash {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: calc(100vh - 56px);\n\t\t\tpadding: 3em 2em;\n\t\t\ttext-align: center;\n\t\t\tbackground: linear-gradient(135deg, #F5F0E8 0%, #E4EFED 100%);\n\t\t}\n\t\t.docuserve-splash h1 {\n\t\t\tfont-size: 3em;\n\t\t\tfont-weight: 700;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin: 0 0 0.25em 0;\n\t\t}\n\t\t.docuserve-splash h1 small {\n\t\t\tfont-size: 0.4em;\n\t\t\tfont-weight: 400;\n\t\t\tcolor: #7A7568;\n\t\t\tvertical-align: middle;\n\t\t\tmargin-left: 0.15em;\n\t\t}\n\t\t.docuserve-splash-tagline {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #7A7568;\n\t\t\tmargin-bottom: 1.5em;\n\t\t\tfont-style: italic;\n\t\t}\n\t\t.docuserve-splash-description {\n\t\t\tfont-size: 1em;\n\t\t\tcolor: #5E5549;\n\t\t\tmax-width: 600px;\n\t\t\tline-height: 1.7;\n\t\t\tmargin-bottom: 2em;\n\t\t}\n\t\t.docuserve-splash-highlights {\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\t\t\tgap: 1.25em;\n\t\t\tmax-width: 900px;\n\t\t\twidth: 100%;\n\t\t\tmargin-bottom: 2.5em;\n\t\t}\n\t\t.docuserve-splash-highlight-card {\n\t\t\tbackground: #fff;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 8px;\n\t\t\tpadding: 1.25em;\n\t\t\ttext-align: left;\n\t\t\ttransition: box-shadow 0.2s, border-color 0.2s;\n\t\t}\n\t\t.docuserve-splash-highlight-card:hover {\n\t\t\tbox-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.docuserve-splash-highlight-card h3 {\n\t\t\tmargin: 0 0 0.5em 0;\n\t\t\tcolor: #3D3229;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.docuserve-splash-highlight-card p {\n\t\t\tmargin: 0;\n\t\t\tcolor: #7A7568;\n\t\t\tfont-size: 0.85em;\n\t\t\tline-height: 1.5;\n\t\t}\n\t\t.docuserve-splash-actions {\n\t\t\tdisplay: flex;\n\t\t\tgap: 1em;\n\t\t\tflex-wrap: wrap;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.docuserve-splash-actions a {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0.7em 1.5em;\n\t\t\tborder-radius: 6px;\n\t\t\tfont-size: 0.95em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-decoration: none;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-splash-actions .primary {\n\t\t\tbackground-color: #2E7D74;\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-splash-actions .primary:hover {\n\t\t\tbackground-color: #256861;\n\t\t}\n\t\t.docuserve-splash-actions .secondary {\n\t\t\tbackground-color: #fff;\n\t\t\tcolor: #3D3229;\n\t\t\tborder: 2px solid #2E7D74;\n\t\t}\n\t\t.docuserve-splash-actions .secondary:hover {\n\t\t\tborder-color: #256861;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Splash-Template",Template:'\n<div class="docuserve-splash">\n\t<h1 id="Docuserve-Splash-Title"></h1>\n\t<div class="docuserve-splash-tagline" id="Docuserve-Splash-Tagline"></div>\n\t<div class="docuserve-splash-description" id="Docuserve-Splash-Description"></div>\n\t<div class="docuserve-splash-highlights" id="Docuserve-Splash-Highlights"></div>\n\t<div class="docuserve-splash-actions" id="Docuserve-Splash-Actions"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Splash-Content",TemplateHash:"Docuserve-Splash-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":88}],56:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){return this.renderTopBarContent(),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"renderTopBarContent",value:function(){var t=this.pict.AppData.Docuserve,e=document.getElementById("Docuserve-TopBar-Brand"),n=document.getElementById("Docuserve-TopBar-Nav"),i=document.getElementById("Docuserve-TopBar-Links");if(e&&n&&i)if(t.TopBarLoaded&&t.TopBar){var o=t.TopBar;e.innerHTML=this.sanitizeTitle(o.Brand||"Documentation");for(var r='<a href="#/Home">Home</a>',a=0;a<o.NavLinks.length;a++){var s=o.NavLinks[a];r+='<a href="'+s.Href+'">'+this.escapeHTML(s.Text)+"</a>"}n.innerHTML=r;var c="";t.KeywordIndexLoaded&&(c+='<a href="#/search/">Search</a>');for(var l=0;l<o.ExternalLinks.length;l++){var d=o.ExternalLinks[l];c+='<a href="'+this.escapeHTML(d.Href)+'" target="_blank" rel="noopener">'+this.escapeHTML(d.Text)+"</a>"}i.innerHTML=c}else{var p="Documentation";t.CoverLoaded&&t.Cover&&t.Cover.Title?p=t.Cover.Title:t.CatalogLoaded&&t.Catalog&&t.Catalog.Name&&(p=t.Catalog.Name),e.innerHTML=this.sanitizeTitle(p),n.innerHTML='<a href="#/Home">Home</a>',i.innerHTML=t.KeywordIndexLoaded?'<a href="#/search/">Search</a>':""}}},{key:"sanitizeTitle",value:function(t){return t?this.escapeHTML(t).replace(/<small>/gi,"<small>").replace(/<\/small>/gi,"</small>"):""}},{key:"escapeHTML",value:function(t){return t?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-TopBar",DefaultRenderable:"Docuserve-TopBar-Content",DefaultDestinationAddress:"#Docuserve-TopBar-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-topbar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tbackground-color: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 0 1.5em;\n\t\t\theight: 56px;\n\t\t\tbox-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);\n\t\t\tposition: sticky;\n\t\t\ttop: 0;\n\t\t\tz-index: 100;\n\t\t}\n\t\t.docuserve-topbar-brand {\n\t\t\tfont-size: 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tletter-spacing: 0.02em;\n\t\t\tcolor: #E8E0D4;\n\t\t\ttext-decoration: none;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-topbar-brand small {\n\t\t\tfont-size: 0.65em;\n\t\t\tfont-weight: 400;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-left: 0.2em;\n\t\t}\n\t\t.docuserve-topbar-brand:hover {\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-topbar-nav {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.25em;\n\t\t}\n\t\t.docuserve-topbar-nav a {\n\t\t\tcolor: #B5AA9A;\n\t\t\ttext-decoration: none;\n\t\t\tpadding: 0.5em 0.75em;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-topbar-nav a:hover {\n\t\t\tbackground-color: #524438;\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-topbar-links {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t}\n\t\t.docuserve-topbar-links a {\n\t\t\tcolor: #8A7F72;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.85em;\n\t\t\tpadding: 0.4em 0.6em;\n\t\t\tborder-radius: 4px;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t}\n\t\t.docuserve-topbar-links a:hover {\n\t\t\tbackground-color: #524438;\n\t\t\tcolor: #E8E0D4;\n\t\t}\n\t\t.docuserve-topbar-toggle {\n\t\t\tdisplay: none;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tcolor: #B5AA9A;\n\t\t\tfont-size: 1.3em;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0.3em 0.5em;\n\t\t\tmargin-left: 0.5em;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.docuserve-topbar-toggle:hover {\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-topbar-right {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-TopBar-Template",Template:'\n<div class="docuserve-topbar">\n\t<a id="Docuserve-TopBar-Brand" class="docuserve-topbar-brand" href="#/Home"></a>\n\t<div id="Docuserve-TopBar-Nav" class="docuserve-topbar-nav"></div>\n\t<div class="docuserve-topbar-right">\n\t\t<div id="Docuserve-TopBar-Links" class="docuserve-topbar-links"></div>\n\t\t<button id="Docuserve-TopBar-Toggle" class="docuserve-topbar-toggle" onclick="{~P~}.views[\'Docuserve-Sidebar\'].toggleSidebar()">☰</button>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-TopBar-Content",TemplateHash:"Docuserve-TopBar-Template",DestinationAddress:"#Docuserve-TopBar-Container",RenderMethod:"replace"}]}},{"pict-view":88}],57:[function(t,e,n){e.exports={name:"pict-provider",version:"1.0.12",description:"Pict Provider Base Class",main:"source/Pict-Provider.js",scripts:{start:"node source/Pict-Provider.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-provider-image:local","docker-dev-run":'docker run -it -d --name pict-provider-dev -p 24125:8080 -p 30027:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-provider" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-provider-image:local',"docker-dev-shell":"docker exec -it pict-provider-dev /bin/bash",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Provider.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-provider.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-provider/issues"},homepage:"https://github.com/stevenvelozo/pict-provider#readme",devDependencies:{"@eslint/js":"^9.39.1",eslint:"^9.39.1",pict:"^1.0.351",quackage:"^1.0.58",typescript:"^5.9.3"},dependencies:{"fable-serviceproviderbase":"^3.0.19"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]}}},{}],58:[function(t,e,n){var i=t("fable-serviceproviderbase"),o=t("../package.json"),r={ProviderIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoLoadDataWithApp:!0,AutoLoadDataOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,Manifests:{},Templates:[]},a=function(t){function e(t,n,i){var a;_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),n),i])).fable,a.pict,a.log,a.options,a.UUID,a.Hash,a.options.ProviderIdentifier||(a.options.ProviderIdentifier="AutoProviderID-".concat(a.fable.getUUID())),a.serviceType="PictProvider",a._Package=o,a.pict=a.fable,a.AppData=a.pict.AppData,a.Bundle=a.pict.Bundle,a.initializeTimestamp=!1,a.lastSolvedTimestamp=!1;for(var s=0;s<a.options.Templates.length;s++){var c=a.options.Templates[s];c.hasOwnProperty("Postfix")&&c.hasOwnProperty("Template")?(c.Source||(c.Source="PictProvider [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ProviderIdentifier," options object.")),a.pict.TemplateProvider.addDefaultTemplate(c.Prefix,c.Postfix,c.Template,c.Source)):a.log.error("PictProvider [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ProviderIdentifier," could not load Default Template ").concat(s," in the options array."),c)}return a}return _inherits(e,t),_createClass(e,[{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}},{key:"initializeAsync",value:function(t){var e=this;if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," async initialize called but initialization is already completed. Aborting.")),t();var n=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," beginning initialization...")),n.anticipate(this.onBeforeInitializeAsync.bind(this)),n.anticipate(this.onInitializeAsync.bind(this)),n.anticipate(this.onAfterInitializeAsync.bind(this)),n.wait(function(n){return e.initializeTimestamp=e.pict.log.getTimeStamp(),n?e.log.error("PictProvider [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ProviderIdentifier," initialization failed: ").concat(n.message||n),{Stack:n.stack}):e.pict.LogNoisiness>0&&e.log.info("PictProvider [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ProviderIdentifier," initialization complete.")),t()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onPreRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreRender:")),!0}},{key:"onPreRenderAsync",value:function(t){return this.onPreRender(),t()}},{key:"render",value:function(){return this.onPreRender()}},{key:"renderAsync",value:function(t){return this.onPreRender(),t()}},{key:"onPreSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreSolve:")),!0}},{key:"onPreSolveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"solve",value:function(){return this.onPreSolve()}},{key:"solveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"onBeforeLoadDataAsync",value:function(t){return t()}},{key:"onLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onLoadDataAsync:")),t()}},{key:"onAfterLoadDataAsync",value:function(t){return t()}},{key:"onBeforeSaveDataAsync",value:function(t){return t()}},{key:"onSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onSaveDataAsync:")),t()}},{key:"onAfterSaveDataAsync",value:function(t){return t()}}])}(i);e.exports=a},{"../package.json":57,"fable-serviceproviderbase":20}],59:[function(t,e,n){var i={javascript:{tokenizer:/(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|(["'])(?:(?!\2|\\).|\\.)*?\2|(`(?:[^`\\]|\\.)*?`)|(\/(?![/*])(?:\\.|\[(?:\\.|[^\]])*\]|[^/\\\n])+\/[gimsuvy]*)/g,keywords:/\b(async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|export|extends|finally|for|from|function|get|if|import|in|instanceof|let|new|of|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/g,builtins:/\b(true|false|null|undefined|NaN|Infinity|console|window|document|Math|JSON|Array|Object|String|Number|Boolean|Date|RegExp|Map|Set|Promise|Error|Symbol|parseInt|parseFloat|require|module|exports)\b/g,numbers:/\b(\d+\.?\d*(?:e[+-]?\d+)?|0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+)\b/g},json:{tokenizer:/(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|("(?:[^"\\]|\\.)*")/g,keywords:/\b(true|false|null)\b/g,numbers:/-?\b\d+\.?\d*(?:e[+-]?\d+)?\b/g},html:{tokenizer:/(<!--[\s\S]*?-->)|(["'])(?:(?!\2|\\).|\\.)*?\2|(<\/?[a-zA-Z][a-zA-Z0-9-]*(?:\s+[a-zA-Z-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s*\/?>)/g,tagGroupIndex:3},css:{tokenizer:/(\/\*[\s\S]*?\*\/)|(["'])(?:(?!\2|\\).|\\.)*?\2/g,selectors:/([.#]?[a-zA-Z_][\w-]*(?:\s*[>+~]\s*[.#]?[a-zA-Z_][\w-]*)*)\s*\{/g,properties:/\b([a-zA-Z-]+)\s*:/g,numbers:/\b(\d+\.?\d*)(px|em|rem|%|vh|vw|s|ms|deg|fr)?\b/g,keywords:/\b(important|inherit|initial|unset|none|auto|block|inline|flex|grid)\b/g},sql:{tokenizer:/(--[^\n]*|\/\*[\s\S]*?\*\/)|(["'])(?:(?!\2|\\).|\\.)*?\2/g,keywords:/\b(SELECT|FROM|WHERE|AND|OR|INSERT|INTO|VALUES|UPDATE|SET|DELETE|CREATE|TABLE|DROP|ALTER|ADD|COLUMN|INDEX|JOIN|LEFT|RIGHT|INNER|OUTER|ON|AS|ORDER|BY|GROUP|HAVING|LIMIT|OFFSET|UNION|ALL|DISTINCT|COUNT|SUM|AVG|MIN|MAX|NOT|NULL|IS|IN|BETWEEN|LIKE|EXISTS|CASE|WHEN|THEN|ELSE|END|PRIMARY|KEY|FOREIGN|REFERENCES|CONSTRAINT|DEFAULT|CHECK|UNIQUE|CASCADE|GRANT|REVOKE|COMMIT|ROLLBACK|BEGIN|TRANSACTION|INT|VARCHAR|DATETIME|AUTO_INCREMENT|CURRENT_TIMESTAMP)\b/gi,numbers:/\b\d+\.?\d*\b/g}};function o(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function r(t,e){var n=t;return e.selectors&&(e.selectors.lastIndex=0,n=n.replace(e.selectors,'<span class="function-name">$1</span>{')),e.properties&&(e.properties.lastIndex=0,n=n.replace(e.properties,'<span class="property">$1</span>:')),e.keywords&&(e.keywords.lastIndex=0,n=n.replace(e.keywords,'<span class="keyword">$1</span>')),e.builtins&&(e.builtins.lastIndex=0,n=n.replace(e.builtins,'<span class="keyword">$1</span>')),e.numbers&&(e.numbers.lastIndex=0,n=n.replace(e.numbers,function(t){return'<span class="number">'.concat(t,"</span>")})),n}function a(t){var e="",n=t,i=n.match(/^(<\/?)([a-zA-Z][a-zA-Z0-9-]*)/);if(!i)return o(t);e+=o(i[1]),e+='<span class="tag">'+o(i[2])+"</span>",n=n.substring(i[0].length);for(var r,a=/^(\s+)([a-zA-Z-]+)(?:(\s*=\s*)(["'])([^"']*?)\4)?/;null!==(r=n.match(a));)e+=r[1],e+='<span class="attr-name">'+o(r[2])+"</span>",r[3]&&(e+=o(r[3]),e+='<span class="attr-value">'+o(r[4])+o(r[5])+o(r[4])+"</span>"),n=n.substring(r[0].length);return e+=o(n)}i.js=i.javascript,i.htm=i.html,e.exports=function(t){return function(e){var n=e.textContent,s="string"==typeof t?t.toLowerCase():"javascript",c=i[s];if(c)if(c.tokenizer){var l,d="",p=0,u=c.tagGroupIndex||0;for(c.tokenizer.lastIndex=0;null!==(l=c.tokenizer.exec(n));){if(l.index>p)d+=r(o(n.substring(p,l.index)),c);var h=l[0];l[1]?d+='<span class="comment">'.concat(o(h),"</span>"):u>0&&l[u]?d+=a(h):d+='<span class="string">'.concat(o(h),"</span>"),p=c.tokenizer.lastIndex}if(p<n.length)d+=r(o(n.substring(p)),c);e.innerHTML=d}else e.innerHTML=r(o(n),c);else e.innerHTML=o(n)}},e.exports.LanguageDefinitions=i},{}],60:[function(t,e,n){e.exports={RenderOnLoad:!0,DefaultRenderable:"CodeEditor-Wrap",DefaultDestinationAddress:"#CodeEditor-Container-Div",Templates:[{Hash:"CodeEditor-Container",Template:"\x3c!-- CodeEditor-Container Rendering Soon --\x3e"}],Renderables:[{RenderableHash:"CodeEditor-Wrap",TemplateHash:"CodeEditor-Container",DestinationAddress:"#CodeEditor-Container-Div"}],TargetElementAddress:"#CodeEditor-Container-Div",CodeDataAddress:!1,Language:"javascript",ReadOnly:!1,Tab:"\t",IndentOn:/[({[]$/,MoveToNewLine:/^[)}\]]/,AddClosing:!0,CatchTab:!0,LineNumbers:!0,DefaultCode:"// Enter your code here\n",CSS:".pict-code-editor-wrap\n{\n\tdisplay: flex;\n\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\tfont-size: 14px;\n\tline-height: 1.5;\n\tborder: 1px solid #D0D0D0;\n\tborder-radius: 4px;\n\toverflow: hidden;\n}\n.pict-code-editor-wrap .pict-code-line-numbers\n{\n\twidth: 40px;\n\tmin-width: 40px;\n\tpadding: 10px 0;\n\ttext-align: right;\n\tbackground: #F5F5F5;\n\tborder-right: 1px solid #D0D0D0;\n\tcolor: #999;\n\tfont-size: 13px;\n\tline-height: 1.5;\n\tuser-select: none;\n\tpointer-events: none;\n\tbox-sizing: border-box;\n}\n.pict-code-editor-wrap .pict-code-line-numbers span\n{\n\tdisplay: block;\n\tpadding: 0 8px 0 0;\n}\n.pict-code-editor-wrap .pict-code-editor\n{\n\tmargin: 0;\n\tpadding: 10px 10px 10px 8px;\n\tmin-height: 100px;\n\tflex: 1;\n\tmin-width: 0;\n\toutline: none;\n\ttab-size: 4;\n\twhite-space: pre;\n\toverflow-wrap: normal;\n\tcolor: #383A42;\n\tbackground: #FAFAFA;\n\tcaret-color: #526FFF;\n\tborder-radius: 0 4px 4px 0;\n}\n.pict-code-editor-wrap .pict-code-editor.pict-code-no-line-numbers\n{\n\tpadding-left: 10px;\n\tborder-radius: 4px;\n}\n.pict-code-editor-wrap .pict-code-editor .keyword { color: #A626A4; }\n.pict-code-editor-wrap .pict-code-editor .string { color: #50A14F; }\n.pict-code-editor-wrap .pict-code-editor .number { color: #986801; }\n.pict-code-editor-wrap .pict-code-editor .comment { color: #A0A1A7; font-style: italic; }\n.pict-code-editor-wrap .pict-code-editor .operator { color: #0184BC; }\n.pict-code-editor-wrap .pict-code-editor .punctuation { color: #383A42; }\n.pict-code-editor-wrap .pict-code-editor .function-name { color: #4078F2; }\n.pict-code-editor-wrap .pict-code-editor .property { color: #E45649; }\n.pict-code-editor-wrap .pict-code-editor .tag { color: #E45649; }\n.pict-code-editor-wrap .pict-code-editor .attr-name { color: #986801; }\n.pict-code-editor-wrap .pict-code-editor .attr-value { color: #50A14F; }\n"}},{}],61:[function(t,e,n){var i=t("pict-view"),o=t("./Pict-Code-Highlighter.js"),r=t("./Pict-Section-Code-DefaultConfiguration.js"),a=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,Object.assign({},r,n),i])).initialRenderComplete=!1,o.codeJar=null,o._highlightFunction=null,o._language=o.options.Language||"javascript",o}return _inherits(e,t),_createClass(e,[{key:"onBeforeInitialize",value:function(){return _superPropGet(e,"onBeforeInitialize",this,3)([]),this._codeJarPrototype=null,this.targetElement=!1,this._highlightFunction=o(this._language),_superPropGet(e,"onBeforeInitialize",this,3)([])}},{key:"connectCodeJarPrototype",value:function(t){if("function"!=typeof t)return"undefined"!=typeof window&&"function"==typeof window.CodeJar?(this.log.trace("PICT-Code Found CodeJar in window.CodeJar."),void(this._codeJarPrototype=window.CodeJar)):(this.log.error("PICT-Code No CodeJar prototype found. Include codejar via script tag or call connectCodeJarPrototype(CodeJar) explicitly."),!1);this._codeJarPrototype=t}},{key:"onAfterRender",value:function(t){return this.pict.CSSMap.injectCSS(),this.initialRenderComplete||(this.onAfterInitialRender(),this.initialRenderComplete=!0),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"onAfterInitialRender",value:function(){var t=this;if(this._codeJarPrototype||this.connectCodeJarPrototype(),!this._codeJarPrototype)return this.log.error("PICT-Code Cannot initialize editor; no CodeJar prototype available."),!1;if(this.codeJar)return this.log.error("PICT-Code editor is already initialized!"),!1;var e=this.services.ContentAssignment.getElement(this.options.TargetElementAddress);if(!e||e.length<1)return this.log.error("PICT-Code Could not find target element [".concat(this.options.TargetElementAddress,"]!")),this.targetElement=!1,!1;this.targetElement=e[0],this._buildEditorDOM();var n=this._resolveCodeContent(),i={};this.options.Tab&&(i.tab=this.options.Tab),this.options.IndentOn&&(i.indentOn=this.options.IndentOn),this.options.MoveToNewLine&&(i.moveToNewLine=this.options.MoveToNewLine),void 0!==this.options.AddClosing&&(i.addClosing=this.options.AddClosing),void 0!==this.options.CatchTab&&(i.catchTab=this.options.CatchTab),this.customConfigureEditorOptions(i);var o=this._editorElement;this.codeJar=this._codeJarPrototype(o,this._highlightFunction,i),this._resetEditorWrapStyles(),n&&this.codeJar.updateCode(n),this.codeJar.onUpdate(function(e){t._updateLineNumbers(),t.onCodeChange(e)}),this._updateLineNumbers(),this.options.ReadOnly&&o.setAttribute("contenteditable","false")}},{key:"_buildEditorDOM",value:function(){this.targetElement.innerHTML="";var t=document.createElement("div");if(t.className="pict-code-editor-wrap",this.options.LineNumbers){var e=document.createElement("div");e.className="pict-code-line-numbers",t.appendChild(e),this._lineNumbersElement=e}var n=document.createElement("div");n.className="pict-code-editor language-"+this._language,this.options.LineNumbers||(n.className+=" pict-code-no-line-numbers"),t.appendChild(n),this.targetElement.appendChild(t),this._editorElement=n,this._wrapElement=t}},{key:"_updateLineNumbers",value:function(){if(this.options.LineNumbers&&this._lineNumbersElement&&this._editorElement){for(var t=(this._editorElement.textContent||"").split("\n").length,e="",n=1;n<=t;n++)e+="<span>".concat(n,"</span>");this._lineNumbersElement.innerHTML=e}}},{key:"_resetEditorWrapStyles",value:function(){this._editorElement&&(this._editorElement.style.whiteSpace="pre",this._editorElement.style.overflowWrap="normal")}},{key:"_resolveCodeContent",value:function(){if(this.options.CodeDataAddress){var t={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options},e=this.fable.manifest.getValueByHash(t,this.options.CodeDataAddress);if("string"==typeof e)return e;this.log.warn("PICT-Code Address [".concat(this.options.CodeDataAddress,"] did not return a string; it was ").concat(_typeof(e),"."))}return this.options.DefaultCode||""}},{key:"customConfigureEditorOptions",value:function(t){}},{key:"onCodeChange",value:function(t){if(this.options.CodeDataAddress){var e={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options};this.fable.manifest.setValueByHash(e,this.options.CodeDataAddress,t)}}},{key:"getCode",value:function(){return this.codeJar?this.codeJar.toString():(this.log.warn("PICT-Code getCode called before editor initialized."),"")}},{key:"setCode",value:function(t){this.codeJar?(this.codeJar.updateCode(t),this._updateLineNumbers()):this.log.warn("PICT-Code setCode called before editor initialized.")}},{key:"setLanguage",value:function(t){var e=this;if(this._language=t,this._highlightFunction=o(t),this._editorElement&&(this._editorElement.className="pict-code-editor language-"+t,this.options.LineNumbers||(this._editorElement.className+=" pict-code-no-line-numbers")),this.codeJar){var n=this.codeJar.toString();this.codeJar.destroy(),this.codeJar=this._codeJarPrototype(this._editorElement,this._highlightFunction,{tab:this.options.Tab,catchTab:this.options.CatchTab,addClosing:this.options.AddClosing}),this._resetEditorWrapStyles(),this.codeJar.updateCode(n),this.codeJar.onUpdate(function(t){e._updateLineNumbers(),e.onCodeChange(t)})}}},{key:"setHighlightFunction",value:function(t){var e=this;if("function"==typeof t){if(this._highlightFunction=t,this.codeJar){var n=this.codeJar.toString();this.codeJar.destroy(),this.codeJar=this._codeJarPrototype(this._editorElement,this._highlightFunction,{tab:this.options.Tab,catchTab:this.options.CatchTab,addClosing:this.options.AddClosing}),this._resetEditorWrapStyles(),this.codeJar.updateCode(n),this.codeJar.onUpdate(function(t){e._updateLineNumbers(),e.onCodeChange(t)})}}else this.log.error("PICT-Code setHighlightFunction requires a function.")}},{key:"setReadOnly",value:function(t){this.options.ReadOnly=t,this._editorElement&&this._editorElement.setAttribute("contenteditable",t?"false":"true")}},{key:"destroy",value:function(){this.codeJar&&(this.codeJar.destroy(),this.codeJar=null)}},{key:"marshalToView",value:function(){if(_superPropGet(e,"marshalToView",this,3)([]),this.codeJar&&this.options.CodeDataAddress){var t=this._resolveCodeContent();"string"==typeof t&&(this.codeJar.updateCode(t),this._updateLineNumbers())}}},{key:"marshalFromView",value:function(){_superPropGet(e,"marshalFromView",this,3)([]),this.codeJar&&this.options.CodeDataAddress&&this.onCodeChange(this.codeJar.toString())}}])}(i);e.exports=a,e.exports.default_configuration=r,e.exports.createHighlighter=o},{"./Pict-Code-Highlighter.js":59,"./Pict-Section-Code-DefaultConfiguration.js":60,"pict-view":88}],62:[function(t,e,n){e.exports={ViewIdentifier:"Pict-FileBrowser",DefaultRenderable:"FileBrowser-Container",DefaultDestinationAddress:"#Pict-FileBrowser-Container",AutoRender:!1,StateAddresses:{Layout:"AppData.PictFileBrowser.Layout",RootLocation:"AppData.PictFileBrowser.RootLocation",CurrentLocation:"AppData.PictFileBrowser.CurrentLocation",CurrentFile:"AppData.PictFileBrowser.CurrentFile"},DefaultState:{Layout:"browser-detail",RootLocation:"/",CurrentLocation:"",CurrentFile:null},FileListAddress:"AppData.PictFileBrowser.FileList",FolderTreeAddress:"AppData.PictFileBrowser.FolderTree",ChildFolderCacheAddress:"AppData.PictFileBrowser.ChildFolderCache",Templates:[{Hash:"FileBrowser-Container-Template",Template:'\n<div class="pict-filebrowser" id="Pict-FileBrowser-Wrap">\n\t<div class="pict-filebrowser-browse-pane" id="Pict-FileBrowser-BrowsePane"></div>\n\t<div class="pict-filebrowser-main-pane">\n\t\t<div class="pict-filebrowser-list-pane" id="Pict-FileBrowser-ListPane"></div>\n\t\t<div class="pict-filebrowser-view-pane" id="Pict-FileBrowser-ViewPane"></div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"FileBrowser-Container",TemplateHash:"FileBrowser-Container-Template",DestinationAddress:"#Pict-FileBrowser-Container",RenderMethod:"replace"}],CSS:"\n\t\t.pict-filebrowser {\n\t\t\tdisplay: flex;\n\t\t\theight: 100%;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n\t\t\tfont-size: 14px;\n\t\t\tcolor: #3D3229;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\toverflow: hidden;\n\t\t\tbackground: #FAFAF8;\n\t\t}\n\n\t\t.pict-filebrowser-browse-pane {\n\t\t\twidth: 240px;\n\t\t\tmin-width: 180px;\n\t\t\tborder-right: 1px solid #DDD6CA;\n\t\t\toverflow-y: auto;\n\t\t\tbackground: #F5F0E8;\n\t\t\tflex-shrink: 0;\n\t\t}\n\n\t\t.pict-filebrowser-main-pane {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t}\n\n\t\t.pict-filebrowser-list-pane {\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\toverflow-x: hidden;\n\t\t}\n\n\t\t.pict-filebrowser-view-pane {\n\t\t\tborder-top: 1px solid #DDD6CA;\n\t\t\toverflow-y: auto;\n\t\t\tbackground: #FAFAF8;\n\t\t}\n\n\t\t/* --- Browsing: Tree --- */\n\t\t.pict-fb-tree {\n\t\t\tpadding: 8px 0;\n\t\t}\n\t\t.pict-fb-tree-node {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tpadding: 4px 8px 4px 0;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-fb-tree-node:hover {\n\t\t\tbackground: #EAE3D8;\n\t\t}\n\t\t.pict-fb-tree-node.selected {\n\t\t\tbackground: #DDD6CA;\n\t\t\tfont-weight: 600;\n\t\t}\n\t\t.pict-fb-tree-toggle {\n\t\t\tdisplay: inline-block;\n\t\t\twidth: 16px;\n\t\t\ttext-align: center;\n\t\t\tflex-shrink: 0;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 10px;\n\t\t}\n\t\t.pict-fb-tree-icon {\n\t\t\tmargin-right: 6px;\n\t\t\tflex-shrink: 0;\n\t\t\tfont-size: 14px;\n\t\t}\n\t\t.pict-fb-tree-label {\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t\t.pict-fb-tree-children {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.pict-fb-tree-children.expanded {\n\t\t\tdisplay: block;\n\t\t}\n\n\t\t/* --- Browsing: Search --- */\n\t\t.pict-fb-search {\n\t\t\tpadding: 8px;\n\t\t}\n\t\t.pict-fb-search-input {\n\t\t\twidth: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t\tpadding: 6px 10px;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 13px;\n\t\t\toutline: none;\n\t\t\tbackground: #fff;\n\t\t}\n\t\t.pict-fb-search-input:focus {\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.pict-fb-search-results {\n\t\t\tmargin-top: 4px;\n\t\t}\n\t\t.pict-fb-search-result {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tpadding: 5px 8px;\n\t\t\tcursor: pointer;\n\t\t\tborder-radius: 3px;\n\t\t}\n\t\t.pict-fb-search-result:hover {\n\t\t\tbackground: #EAE3D8;\n\t\t}\n\t\t.pict-fb-search-result-icon {\n\t\t\tmargin-right: 6px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-fb-search-result-name {\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-fb-search-result-path {\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 11px;\n\t\t\tmargin-left: auto;\n\t\t\tpadding-left: 8px;\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t/* --- Listing: Detail --- */\n\t\t.pict-fb-detail {\n\t\t\twidth: 100%;\n\t\t}\n\t\t.pict-fb-detail-header {\n\t\t\tdisplay: flex;\n\t\t\tpadding: 6px 12px;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 12px;\n\t\t\ttext-transform: uppercase;\n\t\t\tcolor: #8A7F72;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tbackground: #F5F0E8;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.pict-fb-detail-header-cell {\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-fb-detail-header-cell:hover {\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.pict-fb-detail-col-name {\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.pict-fb-detail-col-size {\n\t\t\twidth: 90px;\n\t\t\ttext-align: right;\n\t\t\tflex-shrink: 0;\n\t\t\tpadding-right: 12px;\n\t\t}\n\t\t.pict-fb-detail-col-modified {\n\t\t\twidth: 150px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-fb-detail-row {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tpadding: 5px 12px;\n\t\t\tcursor: pointer;\n\t\t\tborder-bottom: 1px solid #F0ECE4;\n\t\t}\n\t\t.pict-fb-detail-row:hover {\n\t\t\tbackground: #F0ECE4;\n\t\t}\n\t\t.pict-fb-detail-row.selected {\n\t\t\tbackground: #E0EDE9;\n\t\t}\n\t\t.pict-fb-detail-icon {\n\t\t\tmargin-right: 8px;\n\t\t\tflex-shrink: 0;\n\t\t\tfont-size: 16px;\n\t\t}\n\t\t.pict-fb-detail-name {\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-fb-detail-size {\n\t\t\twidth: 90px;\n\t\t\ttext-align: right;\n\t\t\tflex-shrink: 0;\n\t\t\tpadding-right: 12px;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 12px;\n\t\t}\n\t\t.pict-fb-detail-modified {\n\t\t\twidth: 150px;\n\t\t\tflex-shrink: 0;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 12px;\n\t\t}\n\n\t\t/* --- Listing: Icons --- */\n\t\t.pict-fb-icons {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tpadding: 12px;\n\t\t\tgap: 8px;\n\t\t}\n\t\t.pict-fb-icon-item {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\twidth: 96px;\n\t\t\tpadding: 10px 6px;\n\t\t\tcursor: pointer;\n\t\t\tborder-radius: 6px;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.pict-fb-icon-item:hover {\n\t\t\tbackground: #F0ECE4;\n\t\t}\n\t\t.pict-fb-icon-item.selected {\n\t\t\tbackground: #E0EDE9;\n\t\t}\n\t\t.pict-fb-icon-graphic {\n\t\t\tfont-size: 36px;\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t\t.pict-fb-icon-label {\n\t\t\tfont-size: 12px;\n\t\t\tword-break: break-word;\n\t\t\tline-height: 1.3;\n\t\t\tmax-height: 2.6em;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t/* --- Viewing: FileInfo --- */\n\t\t.pict-fb-fileinfo {\n\t\t\tpadding: 12px 16px;\n\t\t}\n\t\t.pict-fb-fileinfo-title {\n\t\t\tfont-size: 15px;\n\t\t\tfont-weight: 600;\n\t\t\tmargin-bottom: 8px;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.pict-fb-fileinfo-table {\n\t\t\twidth: 100%;\n\t\t\tfont-size: 13px;\n\t\t}\n\t\t.pict-fb-fileinfo-table td {\n\t\t\tpadding: 3px 0;\n\t\t}\n\t\t.pict-fb-fileinfo-label {\n\t\t\tcolor: #8A7F72;\n\t\t\twidth: 100px;\n\t\t\tfont-weight: 500;\n\t\t}\n\t\t.pict-fb-fileinfo-value {\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-fb-fileinfo-none {\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-style: italic;\n\t\t}\n\n\t\t/* --- Viewing: Image --- */\n\t\t.pict-fb-image-viewer {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tpadding: 16px;\n\t\t\tmin-height: 200px;\n\t\t}\n\t\t.pict-fb-image-viewer img {\n\t\t\tmax-width: 100%;\n\t\t\tmax-height: 500px;\n\t\t\tobject-fit: contain;\n\t\t\tborder-radius: 4px;\n\t\t\tbox-shadow: 0 1px 3px rgba(0,0,0,0.1);\n\t\t}\n\t\t.pict-fb-image-viewer-none {\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-style: italic;\n\t\t}\n\n\t\t/* --- Breadcrumb / Location Bar --- */\n\t\t.pict-fb-breadcrumb {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tpadding: 6px 12px;\n\t\t\tfont-size: 13px;\n\t\t\tbackground: #F5F0E8;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\toverflow-x: auto;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-fb-breadcrumb-segment {\n\t\t\tcursor: pointer;\n\t\t\tcolor: #2E7D74;\n\t\t\tpadding: 2px 4px;\n\t\t\tborder-radius: 3px;\n\t\t}\n\t\t.pict-fb-breadcrumb-segment:hover {\n\t\t\tbackground: #EAE3D8;\n\t\t}\n\t\t.pict-fb-breadcrumb-separator {\n\t\t\tmargin: 0 2px;\n\t\t\tcolor: #8A7F72;\n\t\t}\n\t\t.pict-fb-breadcrumb-current {\n\t\t\tcolor: #3D3229;\n\t\t\tfont-weight: 500;\n\t\t\tpadding: 2px 4px;\n\t\t}\n\n\t\t/* --- Empty state --- */\n\t\t.pict-fb-empty {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tpadding: 32px;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-style: italic;\n\t\t}\n\t"}},{}],63:[function(t,e,n){e.exports=t("./views/Pict-View-FileBrowser.js"),e.exports.PictFileBrowserBrowseProvider=t("./providers/Pict-Provider-FileBrowserBrowse.js"),e.exports.PictFileBrowserListProvider=t("./providers/Pict-Provider-FileBrowserList.js"),e.exports.PictFileBrowserViewProvider=t("./providers/Pict-Provider-FileBrowserView.js"),e.exports.PictFileBrowserLayoutProvider=t("./providers/Pict-Provider-FileBrowserLayout.js"),e.exports.PictFileBrowserIconProvider=t("./providers/Pict-Provider-FileBrowserIcons.js"),e.exports.PictViewBrowseTree=t("./views/Pict-View-FileBrowser-BrowseTree.js"),e.exports.PictViewBrowseSearch=t("./views/Pict-View-FileBrowser-BrowseSearch.js"),e.exports.PictViewListDetail=t("./views/Pict-View-FileBrowser-ListDetail.js"),e.exports.PictViewListIcons=t("./views/Pict-View-FileBrowser-ListIcons.js"),e.exports.PictViewFileInfo=t("./views/Pict-View-FileBrowser-ViewFileInfo.js"),e.exports.PictViewImageViewer=t("./views/Pict-View-FileBrowser-ViewImage.js"),e.exports.FileBrowserService=t("./services/Pict-Service-FileBrowser.js")},{"./providers/Pict-Provider-FileBrowserBrowse.js":64,"./providers/Pict-Provider-FileBrowserIcons.js":65,"./providers/Pict-Provider-FileBrowserLayout.js":66,"./providers/Pict-Provider-FileBrowserList.js":67,"./providers/Pict-Provider-FileBrowserView.js":68,"./services/Pict-Service-FileBrowser.js":69,"./views/Pict-View-FileBrowser-BrowseSearch.js":70,"./views/Pict-View-FileBrowser-BrowseTree.js":71,"./views/Pict-View-FileBrowser-ListDetail.js":72,"./views/Pict-View-FileBrowser-ListIcons.js":73,"./views/Pict-View-FileBrowser-ViewFileInfo.js":74,"./views/Pict-View-FileBrowser-ViewImage.js":75,"./views/Pict-View-FileBrowser.js":76}],64:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"getFolderTree",value:function(){var t=this.getFileBrowserOption("FolderTreeAddress","AppData.PictFileBrowser.FolderTree"),e=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t);return Array.isArray(e)?e:[]}},{key:"flattenTree",value:function(t){var e=t||this.getFolderTree(),n=[],i=function(t,e){for(var o=0;o<t.length;o++){var r=t[o],a=e?e+"/"+r.Name:r.Name;n.push({Name:r.Name,Path:a}),Array.isArray(r.Children)&&r.Children.length>0&&i(r.Children,a)}};return i(e,""),n}},{key:"getChildFolders",value:function(t){var e=this.getFileBrowserOption("ChildFolderCacheAddress","AppData.PictFileBrowser.ChildFolderCache"),n=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},e);if(!n||"object"!==_typeof(n))return null;var i=t||"_root_";return Array.isArray(n[i])?n[i]:null}},{key:"setChildFolders",value:function(t,e){var n=this.getFileBrowserOption("ChildFolderCacheAddress","AppData.PictFileBrowser.ChildFolderCache"),i=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},n);i&&"object"===_typeof(i)||(i={}),i[t||"_root_"]=Array.isArray(e)?e:[],this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},n,i)}},{key:"searchFiles",value:function(t,e){if(!t||"string"!=typeof t)return[];var n=e||this.getFileList(),i=t.toLowerCase();return n.filter(function(t){return t.Name&&t.Name.toLowerCase().indexOf(i)>=0})}},{key:"navigateToFolder",value:function(t){var e=this.getFileBrowserOption("StateAddresses",{}),n=e.CurrentLocation||"AppData.PictFileBrowser.CurrentLocation",i=e.CurrentFile||"AppData.PictFileBrowser.CurrentFile";this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},n,t||""),this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},i,null)}},{key:"getFileList",value:function(){var t=this.getFileBrowserOption("FileListAddress","AppData.PictFileBrowser.FileList"),e=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t);return Array.isArray(e)?e:[]}},{key:"getFileBrowserOption",value:function(t,e){if(this.pict.views&&this.pict.views["Pict-FileBrowser"]){var n=this.pict.views["Pict-FileBrowser"].options;if(n&&t in n)return n[t]}return e}}])}(t("pict-provider"));e.exports=i,e.exports.default_configuration={ProviderIdentifier:"Pict-FileBrowser-Browse",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0}},{"pict-provider":58}],65:[function(t,e,n){var i=t("pict-provider"),o={Primary:"#3D3229",Accent:"#2E7D74",Muted:"#8A7F72",Light:"#F5F0E8",WarmBeige:"#EAE3D8",TealTint:"#E0EDE9",Lavender:"#E8E0F0",AmberTint:"#F0E8D0"},r={folder:function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M3.2 7.1V17.2C3.2 18.2 4 19.1 5.1 18.9L19.1 19.1C20 19.1 20.9 18.2 20.8 17.1V9.1C20.9 8 20.1 7.1 19 7.1H12.1L10.1 4.9H5.1C3.9 5 3.1 5.9 3.2 7.1Z" fill="'+o.WarmBeige+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M3.2 9H20.8" stroke="'+o.Primary+'" stroke-width="1" opacity="0.3" /></svg>'},"folder-open":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M3.2 7.1V17.2C3.2 18.2 4 19.1 5.1 18.9L19.1 19.1C20 19.1 20.9 18.2 20.8 17.1V9.1C20.9 8 20.1 7.1 19 7.1H12.1L10.1 4.9H5.1C3.9 5 3.1 5.9 3.2 7.1Z" fill="'+o.WarmBeige+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M3.2 10.2L5.8 17.8C6 18.4 6.6 18.9 7.2 18.9H19.8L22.1 11.2C22.3 10.6 21.8 10 21.2 10H5.2C4.6 10 4 10.4 3.8 11" stroke="'+o.Primary+'" stroke-width="1.5" fill="'+o.Light+'" stroke-linecap="round" stroke-linejoin="round" opacity="0.7" /></svg>'},file:function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.Light+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"file-text":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.Light+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><line x1="8.1" y1="12.8" x2="15.9" y2="12.8" stroke="'+o.Muted+'" stroke-width="1.2" stroke-linecap="round" /><line x1="8.1" y1="15.8" x2="15.9" y2="15.8" stroke="'+o.Muted+'" stroke-width="1.2" stroke-linecap="round" /><line x1="8.1" y1="18.8" x2="12.2" y2="18.8" stroke="'+o.Muted+'" stroke-width="1.2" stroke-linecap="round" /></svg>'},"file-code":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.Light+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M8.5 13.2L6.8 15.1L8.6 16.8" stroke="'+o.Accent+'" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" /><path d="M15.5 13.2L17.2 15.1L15.4 16.8" stroke="'+o.Accent+'" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" /><line x1="12.8" y1="12" x2="11.2" y2="18" stroke="'+o.Muted+'" stroke-width="1.2" stroke-linecap="round" /></svg>'},"file-image":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><rect x="3.1" y="3.2" width="17.8" height="17.7" rx="2" fill="'+o.Lavender+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><circle cx="8.3" cy="8.7" r="1.8" fill="'+o.Accent+'" /><path d="M20.8 15.2L15.9 10.1L5.2 20.8" stroke="'+o.Primary+'" stroke-width="1.8" fill="none" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"file-pdf":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="#F0DDDD" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><text x="8.2" y="16.8" font-family="sans-serif" font-weight="700" font-size="6.5" fill="#C04040" letter-spacing="-0.3">PDF</text></svg>'},"file-spreadsheet":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.TealTint+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><rect x="7.2" y="11.1" width="9.8" height="7.8" rx="0.5" fill="none" stroke="'+o.Accent+'" stroke-width="1.2" /><line x1="7.2" y1="13.7" x2="17" y2="13.7" stroke="'+o.Accent+'" stroke-width="1" /><line x1="7.2" y1="16.3" x2="17" y2="16.3" stroke="'+o.Accent+'" stroke-width="1" /><line x1="10.9" y1="11.1" x2="10.9" y2="18.9" stroke="'+o.Accent+'" stroke-width="1" /></svg>'},"file-archive":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.WarmBeige+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><rect x="8.8" y="11.2" width="2.5" height="2" rx="0.4" fill="'+o.Primary+'" /><rect x="8.8" y="14.2" width="2.5" height="2" rx="0.4" fill="'+o.Primary+'" /><rect x="8.8" y="17.2" width="2.5" height="2" rx="0.4" fill="'+o.Primary+'" /></svg>'},"file-audio":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.AmberTint+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><circle cx="10.2" cy="16.8" r="2.1" fill="none" stroke="'+o.Accent+'" stroke-width="1.5" /><path d="M12.2 16.8V11.2L16.1 10.1" stroke="'+o.Accent+'" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none" /><circle cx="16.1" cy="15.3" r="1.4" fill="none" stroke="'+o.Accent+'" stroke-width="1.2" /></svg>'},"file-video":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.Lavender+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M9.8 12.2V18.2L15.8 15.2L9.8 12.2Z" fill="'+o.Accent+'" stroke="'+o.Accent+'" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"file-web":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="12" r="8.9" fill="'+o.TealTint+'" stroke="'+o.Primary+'" stroke-width="1.8" /><ellipse cx="12" cy="12" rx="4.1" ry="8.9" fill="none" stroke="'+o.Primary+'" stroke-width="1.2" /><line x1="3.1" y1="12" x2="20.9" y2="12" stroke="'+o.Primary+'" stroke-width="1" /><path d="M4.8 7.8C7 8.5 9.4 8.9 12 8.9C14.6 8.9 17 8.5 19.2 7.8" stroke="'+o.Primary+'" stroke-width="1" fill="none" /><path d="M4.8 16.2C7 15.5 9.4 15.1 12 15.1C14.6 15.1 17 15.5 19.2 16.2" stroke="'+o.Primary+'" stroke-width="1" fill="none" /></svg>'},"file-config":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.Light+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><circle cx="12" cy="15" r="2.8" fill="none" stroke="'+o.Muted+'" stroke-width="1.5" /><line x1="12" y1="11" x2="12" y2="12.2" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="12" y1="17.8" x2="12" y2="19" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="14.8" y1="13.2" x2="15.8" y2="12.6" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="8.2" y1="17" x2="9.2" y2="16.4" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="14.8" y1="16.8" x2="15.8" y2="17.4" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="8.2" y1="13" x2="9.2" y2="13.6" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /></svg>'},home:function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M3.1 9.6L12 3.1L20.9 9.6V19.9C20.9 20.5 20.5 21 19.9 20.9H4.1C3.5 21 3 20.5 3.1 19.9V9.6Z" fill="'+o.TealTint+'" stroke="'+o.Accent+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><rect x="9.2" y="14.1" width="5.6" height="6.9" rx="0.5" fill="'+o.Accent+'" /></svg>'},"arrow-up":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M12.1 19.1V5.1" stroke="'+o.Muted+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M5.2 11.9L12.1 5.1L18.9 11.9" stroke="'+o.Muted+'" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"chevron-right":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M9.2 6.1L14.8 12.1L9.1 17.9" stroke="'+o.Muted+'" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"chevron-down":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M6.1 9.2L12.1 14.8L17.9 9.1" stroke="'+o.Muted+'" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round" /></svg>'},search:function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><circle cx="10.8" cy="10.8" r="6.8" stroke="'+o.Primary+'" stroke-width="1.8" /><line x1="15.9" y1="16.1" x2="20.8" y2="20.8" stroke="'+o.Primary+'" stroke-width="2" stroke-linecap="round" /></svg>'},"sort-asc":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M12 4.2L7.2 10.8H16.8L12 4.2Z" fill="'+o.Primary+'" /><path d="M12 19.8L7.2 13.2H16.8L12 19.8Z" fill="'+o.Muted+'" opacity="0.35" /></svg>'},"sort-desc":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M12 4.2L7.2 10.8H16.8L12 4.2Z" fill="'+o.Muted+'" opacity="0.35" /><path d="M12 19.8L7.2 13.2H16.8L12 19.8Z" fill="'+o.Primary+'" /></svg>'}},a={".jpg":"file-image",".jpeg":"file-image",".png":"file-image",".gif":"file-image",".svg":"file-image",".webp":"file-image",".bmp":"file-image",".ico":"file-image",".txt":"file-text",".md":"file-text",".rtf":"file-text",".doc":"file-text",".docx":"file-text",".pdf":"file-pdf",".xls":"file-spreadsheet",".xlsx":"file-spreadsheet",".csv":"file-spreadsheet",".ods":"file-spreadsheet",".js":"file-code",".ts":"file-code",".jsx":"file-code",".tsx":"file-code",".py":"file-code",".rb":"file-code",".java":"file-code",".c":"file-code",".cpp":"file-code",".h":"file-code",".go":"file-code",".rs":"file-code",".swift":"file-code",".kt":"file-code",".scala":"file-code",".sh":"file-code",".bash":"file-code",".zsh":"file-code",".php":"file-code",".lua":"file-code",".r":"file-code",".sql":"file-code",".pl":"file-code",".html":"file-web",".htm":"file-web",".css":"file-web",".scss":"file-web",".less":"file-web",".xml":"file-web",".json":"file-config",".yaml":"file-config",".yml":"file-config",".toml":"file-config",".ini":"file-config",".env":"file-config",".conf":"file-config",".cfg":"file-config",".zip":"file-archive",".tar":"file-archive",".gz":"file-archive",".rar":"file-archive",".7z":"file-archive",".bz2":"file-archive",".xz":"file-archive",".tgz":"file-archive",".mp3":"file-audio",".wav":"file-audio",".flac":"file-audio",".ogg":"file-audio",".aac":"file-audio",".wma":"file-audio",".m4a":"file-audio",".mp4":"file-video",".avi":"file-video",".mov":"file-video",".mkv":"file-video",".webm":"file-video",".wmv":"file-video",".flv":"file-video",".m4v":"file-video"},s=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._icons=Object.assign({},r),o._extensionMap=Object.assign({},a),o._cssInjected=!1,o}return _inherits(e,t),_createClass(e,[{key:"getIcon",value:function(t,e){var n=e||16,i=this._icons[t];return"function"==typeof i?i(n):""}},{key:"getIconForEntry",value:function(t,e){if(!t)return"";if(t.Icon&&"string"==typeof t.Icon&&0===t.Icon.indexOf("<svg"))return t.Icon;var n=e||16;if("folder"===t.Type)return this.getIcon("folder",n);var i=(t.Extension||"").toLowerCase();return i&&this._extensionMap[i]?this.getIcon(this._extensionMap[i],n):this.getIcon("file",n)}},{key:"getUIIcon",value:function(t,e){return this.getIcon(t,e||16)}},{key:"registerIcon",value:function(t,e){return!(!t||"function"!=typeof e)&&(this._icons[t]=e,!0)}},{key:"registerExtension",value:function(t,e){return!(!t||!e)&&(this._extensionMap[t.toLowerCase()]=e,!0)}},{key:"getIconNames",value:function(){return Object.keys(this._icons)}},{key:"getExtensionMap",value:function(){return Object.assign({},this._extensionMap)}},{key:"injectCSS",value:function(){this._cssInjected||this.pict&&this.pict.CSSMap&&(this.pict.CSSMap.addCSS("PictFileBrowserIcons",".pict-fb-svg-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }\n.pict-fb-svg-icon svg { display: block; }\n.pict-fb-tree-icon svg { width: 16px; height: 16px; }\n.pict-fb-detail-icon svg { width: 16px; height: 16px; }\n.pict-fb-icon-graphic svg { width: 36px; height: 36px; }\n.pict-fb-tree-toggle svg { width: 10px; height: 10px; }\n"),this._cssInjected=!0)}}])}(i);e.exports=s,e.exports.default_configuration={ProviderIdentifier:"Pict-FileBrowser-Icons",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0},e.exports.BuiltInIcons=r,e.exports.ExtensionMap=a,e.exports.Colors=o},{"pict-provider":58}],66:[function(t,e,n){var i=t("pict-provider"),o={"list-only":{Key:"list-only",Label:"List Only",Description:"Full-width file list",Panes:["list"],PaneCount:1,CSSClass:"pict-fb-layout-list-only"},"tree-list":{Key:"tree-list",Label:"Tree + List",Description:"Folder tree on the left, file list on the right",Panes:["browse","list"],PaneCount:2,CSSClass:"pict-fb-layout-tree-list"},"list-detail":{Key:"list-detail",Label:"List + Detail",Description:"File list on top, file details on the bottom",Panes:["list","view"],PaneCount:2,CSSClass:"pict-fb-layout-list-detail"},"tree-detail":{Key:"tree-detail",Label:"Tree + Detail",Description:"Folder tree on the left, file details on the right",Panes:["browse","view"],PaneCount:2,CSSClass:"pict-fb-layout-tree-detail"},"browser-detail":{Key:"browser-detail",Label:"Browser",Description:"Folder tree on the left, file list top-right, details bottom-right",Panes:["browse","list","view"],PaneCount:3,CSSClass:"pict-fb-layout-browser-detail"},"browser-columns":{Key:"browser-columns",Label:"Columns",Description:"Three-column layout: folder tree, file list, and file details side-by-side",Panes:["browse","list","view"],PaneCount:3,CSSClass:"pict-fb-layout-browser-columns"}},r=function(t){function e(t,n,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,n,i])).layouts=JSON.parse(JSON.stringify(o)),r}return _inherits(e,t),_createClass(e,[{key:"getLayouts",value:function(){return this.layouts}},{key:"getLayoutList",value:function(){var t=[];for(var e in this.layouts)t.push(this.layouts[e]);return t.sort(function(t,e){return t.PaneCount!==e.PaneCount?t.PaneCount-e.PaneCount:t.Key.localeCompare(e.Key)}),t}},{key:"getLayout",value:function(t){return this.layouts[t]||null}},{key:"getCurrentLayoutKey",value:function(){var t=this.getFileBrowserOption("StateAddresses",{}).Layout||"AppData.PictFileBrowser.Layout";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||"browser-detail"}},{key:"getCurrentLayout",value:function(){var t=this.getCurrentLayoutKey();return this.layouts[t]||this.layouts["browser-detail"]}},{key:"setLayout",value:function(t){if(!this.layouts[t])return!1;var e=this.getFileBrowserOption("StateAddresses",{}).Layout||"AppData.PictFileBrowser.Layout";return this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},e,t),!0}},{key:"isPaneVisible",value:function(t){return this.getCurrentLayout().Panes.indexOf(t)>=0}},{key:"registerLayout",value:function(t){return!(!t||!t.Key)&&(this.layouts[t.Key]=t,!0)}},{key:"getFileBrowserOption",value:function(t,e){if(this.pict.views&&this.pict.views["Pict-FileBrowser"]){var n=this.pict.views["Pict-FileBrowser"].options;if(n&&t in n)return n[t]}return e}}])}(i);e.exports=r,e.exports.default_configuration={ProviderIdentifier:"Pict-FileBrowser-Layout",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0},e.exports.BuiltInLayouts=o},{"pict-provider":58}],67:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i])).sortField="Name",o.sortAscending=!0,o}return _inherits(e,t),_createClass(e,[{key:"getFileList",value:function(){var t=this.getFileBrowserOption("FileListAddress","AppData.PictFileBrowser.FileList"),e=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t);return Array.isArray(e)?e:[]}},{key:"getSortedFileList",value:function(t){var e=(t||this.getFileList()).slice(),n=this.sortField,i=this.sortAscending;return e.sort(function(t,e){var o="folder"===t.Type?0:1,r="folder"===e.Type?0:1;if(o!==r)return o-r;var a=t[n],s=e[n];if(null==a&&null==s)return 0;if(null==a)return 1;if(null==s)return-1;var c=0;return c="string"==typeof a?a.localeCompare(s):a<s?-1:a>s?1:0,i?c:-c}),e}},{key:"setSortField",value:function(t){this.sortField===t?this.sortAscending=!this.sortAscending:(this.sortField=t,this.sortAscending=!0)}},{key:"selectFile",value:function(t){var e=this.getFileBrowserOption("StateAddresses",{}).CurrentFile||"AppData.PictFileBrowser.CurrentFile";this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},e,t||null)}},{key:"getSelectedFile",value:function(){var t=this.getFileBrowserOption("StateAddresses",{}).CurrentFile||"AppData.PictFileBrowser.CurrentFile";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||null}},{key:"openEntry",value:function(t){if(t)if("folder"===t.Type){var e=this.pict.providers["Pict-FileBrowser-Browse"];if(e){var n=this.getFileBrowserOption("StateAddresses",{}).CurrentLocation||"AppData.PictFileBrowser.CurrentLocation",i=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},n)||"",o=i?i+"/"+t.Name:t.Name;e.navigateToFolder(o)}}else this.selectFile(t)}},{key:"formatFileSize",value:function(t){return null==t||isNaN(t)?"--":t<1024?t+" B":t<1048576?(t/1024).toFixed(1)+" KB":t<1073741824?(t/1048576).toFixed(1)+" MB":(t/1073741824).toFixed(1)+" GB"}},{key:"formatDate",value:function(t){if(!t)return"--";try{var e=new Date(t);return isNaN(e.getTime())?"--":e.toLocaleDateString()+" "+e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch(t){return"--"}}},{key:"getEntryIcon",value:function(t){if(!t)return"";if(t.Icon)return t.Icon;var e=this.pict.providers["Pict-FileBrowser-Icons"];if(e)return e.getIconForEntry(t,16);if("folder"===t.Type)return"📁";switch((t.Extension||"").toLowerCase()){case".jpg":case".jpeg":case".png":case".gif":case".svg":case".webp":case".bmp":return"🖼";case".pdf":default:return"📄";case".doc":case".docx":case".txt":case".md":case".rtf":return"📃";case".xls":case".xlsx":case".csv":return"📊";case".zip":case".tar":case".gz":case".rar":case".7z":return"📦";case".js":case".ts":case".py":case".rb":case".java":case".c":case".cpp":case".go":case".rs":return"💻";case".html":case".css":case".json":case".xml":case".yaml":case".yml":return"🌐";case".mp3":case".wav":case".flac":case".ogg":case".aac":return"🎵";case".mp4":case".avi":case".mov":case".mkv":case".webm":return"🎥"}}},{key:"getFileBrowserOption",value:function(t,e){if(this.pict.views&&this.pict.views["Pict-FileBrowser"]){var n=this.pict.views["Pict-FileBrowser"].options;if(n&&t in n)return n[t]}return e}}])}(t("pict-provider"));e.exports=i,e.exports.default_configuration={ProviderIdentifier:"Pict-FileBrowser-List",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0}},{"pict-provider":58}],68:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"getCurrentFile",value:function(){var t=this.getFileBrowserOption("StateAddresses",{}).CurrentFile||"AppData.PictFileBrowser.CurrentFile";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||null}},{key:"isImage",value:function(t){var e=t||this.getCurrentFile();if(!e)return!1;if(e.MimeType&&0===e.MimeType.indexOf("image/"))return!0;var n=(e.Extension||"").toLowerCase();return[".jpg",".jpeg",".png",".gif",".svg",".webp",".bmp",".ico",".tiff",".tif"].indexOf(n)>=0}},{key:"getImageURL",value:function(t){var e=t||this.getCurrentFile();return e&&(e.URL||e.ThumbnailURL)||null}},{key:"getFileTypeDescription",value:function(t){var e=t||this.getCurrentFile();if(!e)return"Unknown";if("folder"===e.Type)return"Folder";var n=(e.Extension||"").toLowerCase();switch(n){case".jpg":case".jpeg":return"JPEG Image";case".png":return"PNG Image";case".gif":return"GIF Image";case".svg":return"SVG Image";case".webp":return"WebP Image";case".bmp":return"Bitmap Image";case".pdf":return"PDF Document";case".doc":case".docx":return"Word Document";case".xls":case".xlsx":return"Excel Spreadsheet";case".csv":return"CSV File";case".txt":return"Text File";case".md":return"Markdown File";case".html":return"HTML File";case".css":return"CSS Stylesheet";case".js":return"JavaScript File";case".ts":return"TypeScript File";case".json":return"JSON File";case".xml":return"XML File";case".yaml":case".yml":return"YAML File";case".py":return"Python Script";case".rb":return"Ruby Script";case".java":return"Java File";case".c":return"C Source File";case".cpp":return"C++ Source File";case".go":return"Go Source File";case".rs":return"Rust Source File";case".zip":return"ZIP Archive";case".tar":return"TAR Archive";case".gz":return"GZip Archive";case".rar":return"RAR Archive";case".mp3":return"MP3 Audio";case".wav":return"WAV Audio";case".mp4":return"MP4 Video";case".avi":return"AVI Video";case".mov":return"QuickTime Video";default:return n?n.substring(1).toUpperCase()+" File":"File"}}},{key:"getFileBrowserOption",value:function(t,e){if(this.pict.views&&this.pict.views["Pict-FileBrowser"]){var n=this.pict.views["Pict-FileBrowser"].options;if(n&&t in n)return n[t]}return e}}])}(t("pict-provider"));e.exports=i,e.exports.default_configuration={ProviderIdentifier:"Pict-FileBrowser-View",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0}},{"pict-provider":58}],69:[function(t,e,n){(function(n){(function(){
|
|
57
|
+
L.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=L.tokenizer,this.pipeline=new L.Pipeline,this.searchPipeline=new L.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},L.Builder.prototype.ref=function(t){this._ref=t},L.Builder.prototype.field=function(t,e){if(/\//.test(t))throw new RangeError("Field '"+t+"' contains illegal character '/'");this._fields[t]=e||{}},L.Builder.prototype.b=function(t){this._b=t<0?0:t>1?1:t},L.Builder.prototype.k1=function(t){this._k1=t},L.Builder.prototype.add=function(t,e){var n=t[this._ref],i=Object.keys(this._fields);this._documents[n]=e||{},this.documentCount+=1;for(var o=0;o<i.length;o++){var r=i[o],a=this._fields[r].extractor,s=a?a(t):t[r],c=this.tokenizer(s,{fields:[r]}),l=this.pipeline.run(c),d=new L.FieldRef(n,r),p=Object.create(null);this.fieldTermFrequencies[d]=p,this.fieldLengths[d]=0,this.fieldLengths[d]+=l.length;for(var u=0;u<l.length;u++){var h=l[u];if(null==p[h]&&(p[h]=0),p[h]+=1,null==this.invertedIndex[h]){var f=Object.create(null);f._index=this.termIndex,this.termIndex+=1;for(var v=0;v<i.length;v++)f[i[v]]=Object.create(null);this.invertedIndex[h]=f}null==this.invertedIndex[h][r][n]&&(this.invertedIndex[h][r][n]=Object.create(null));for(var g=0;g<this.metadataWhitelist.length;g++){var m=this.metadataWhitelist[g],y=h.metadata[m];null==this.invertedIndex[h][r][n][m]&&(this.invertedIndex[h][r][n][m]=[]),this.invertedIndex[h][r][n][m].push(y)}}}},L.Builder.prototype.calculateAverageFieldLengths=function(){for(var t=Object.keys(this.fieldLengths),e=t.length,n={},i={},o=0;o<e;o++){var r=L.FieldRef.fromString(t[o]),a=r.fieldName;i[a]||(i[a]=0),i[a]+=1,n[a]||(n[a]=0),n[a]+=this.fieldLengths[r]}var s=Object.keys(this._fields);for(o=0;o<s.length;o++){var c=s[o];n[c]=n[c]/i[c]}this.averageFieldLength=n},L.Builder.prototype.createFieldVectors=function(){for(var t={},e=Object.keys(this.fieldTermFrequencies),n=e.length,i=Object.create(null),o=0;o<n;o++){for(var r=L.FieldRef.fromString(e[o]),a=r.fieldName,s=this.fieldLengths[r],c=new L.Vector,l=this.fieldTermFrequencies[r],d=Object.keys(l),p=d.length,u=this._fields[a].boost||1,h=this._documents[r.docRef].boost||1,f=0;f<p;f++){var v,g,m,y=d[f],b=l[y],w=this.invertedIndex[y]._index;void 0===i[y]?(v=L.idf(this.invertedIndex[y],this.documentCount),i[y]=v):v=i[y],g=v*((this._k1+1)*b)/(this._k1*(1-this._b+this._b*(s/this.averageFieldLength[a]))+b),g*=u,g*=h,m=Math.round(1e3*g)/1e3,c.insert(w,m)}t[r]=c}this.fieldVectors=t},L.Builder.prototype.createTokenSet=function(){this.tokenSet=L.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},L.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new L.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},L.Builder.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},L.MatchData=function(t,e,n){for(var i=Object.create(null),o=Object.keys(n||{}),r=0;r<o.length;r++){var a=o[r];i[a]=n[a].slice()}this.metadata=Object.create(null),void 0!==t&&(this.metadata[t]=Object.create(null),this.metadata[t][e]=i)},L.MatchData.prototype.combine=function(t){for(var e=Object.keys(t.metadata),n=0;n<e.length;n++){var i=e[n],o=Object.keys(t.metadata[i]);null==this.metadata[i]&&(this.metadata[i]=Object.create(null));for(var r=0;r<o.length;r++){var a=o[r],s=Object.keys(t.metadata[i][a]);null==this.metadata[i][a]&&(this.metadata[i][a]=Object.create(null));for(var c=0;c<s.length;c++){var l=s[c];null==this.metadata[i][a][l]?this.metadata[i][a][l]=t.metadata[i][a][l]:this.metadata[i][a][l]=this.metadata[i][a][l].concat(t.metadata[i][a][l])}}}},L.MatchData.prototype.add=function(t,e,n){if(!(t in this.metadata))return this.metadata[t]=Object.create(null),void(this.metadata[t][e]=n);if(e in this.metadata[t])for(var i=Object.keys(n),o=0;o<i.length;o++){var r=i[o];r in this.metadata[t][e]?this.metadata[t][e][r]=this.metadata[t][e][r].concat(n[r]):this.metadata[t][e][r]=n[r]}else this.metadata[t][e]=n},L.Query=function(t){this.clauses=[],this.allFields=t},L.Query.wildcard=new String("*"),L.Query.wildcard.NONE=0,L.Query.wildcard.LEADING=1,L.Query.wildcard.TRAILING=2,L.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},L.Query.prototype.clause=function(t){return"fields"in t||(t.fields=this.allFields),"boost"in t||(t.boost=1),"usePipeline"in t||(t.usePipeline=!0),"wildcard"in t||(t.wildcard=L.Query.wildcard.NONE),t.wildcard&L.Query.wildcard.LEADING&&t.term.charAt(0)!=L.Query.wildcard&&(t.term="*"+t.term),t.wildcard&L.Query.wildcard.TRAILING&&t.term.slice(-1)!=L.Query.wildcard&&(t.term=t.term+"*"),"presence"in t||(t.presence=L.Query.presence.OPTIONAL),this.clauses.push(t),this},L.Query.prototype.isNegated=function(){for(var t=0;t<this.clauses.length;t++)if(this.clauses[t].presence!=L.Query.presence.PROHIBITED)return!1;return!0},L.Query.prototype.term=function(t,e){if(Array.isArray(t))return t.forEach(function(t){this.term(t,L.utils.clone(e))},this),this;var n=e||{};return n.term=t.toString(),this.clause(n),this},L.QueryParseError=function(t,e,n){this.name="QueryParseError",this.message=t,this.start=e,this.end=n},L.QueryParseError.prototype=new Error,L.QueryLexer=function(t){this.lexemes=[],this.str=t,this.length=t.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},L.QueryLexer.prototype.run=function(){for(var t=L.QueryLexer.lexText;t;)t=t(this)},L.QueryLexer.prototype.sliceString=function(){for(var t=[],e=this.start,n=this.pos,i=0;i<this.escapeCharPositions.length;i++)n=this.escapeCharPositions[i],t.push(this.str.slice(e,n)),e=n+1;return t.push(this.str.slice(e,this.pos)),this.escapeCharPositions.length=0,t.join("")},L.QueryLexer.prototype.emit=function(t){this.lexemes.push({type:t,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},L.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},L.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return L.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},L.QueryLexer.prototype.width=function(){return this.pos-this.start},L.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},L.QueryLexer.prototype.backup=function(){this.pos-=1},L.QueryLexer.prototype.acceptDigitRun=function(){var t,e;do{e=(t=this.next()).charCodeAt(0)}while(e>47&&e<58);t!=L.QueryLexer.EOS&&this.backup()},L.QueryLexer.prototype.more=function(){return this.pos<this.length},L.QueryLexer.EOS="EOS",L.QueryLexer.FIELD="FIELD",L.QueryLexer.TERM="TERM",L.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",L.QueryLexer.BOOST="BOOST",L.QueryLexer.PRESENCE="PRESENCE",L.QueryLexer.lexField=function(t){return t.backup(),t.emit(L.QueryLexer.FIELD),t.ignore(),L.QueryLexer.lexText},L.QueryLexer.lexTerm=function(t){if(t.width()>1&&(t.backup(),t.emit(L.QueryLexer.TERM)),t.ignore(),t.more())return L.QueryLexer.lexText},L.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(L.QueryLexer.EDIT_DISTANCE),L.QueryLexer.lexText},L.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(L.QueryLexer.BOOST),L.QueryLexer.lexText},L.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(L.QueryLexer.TERM)},L.QueryLexer.termSeparator=L.tokenizer.separator,L.QueryLexer.lexText=function(t){for(;;){var e=t.next();if(e==L.QueryLexer.EOS)return L.QueryLexer.lexEOS;if(92!=e.charCodeAt(0)){if(":"==e)return L.QueryLexer.lexField;if("~"==e)return t.backup(),t.width()>0&&t.emit(L.QueryLexer.TERM),L.QueryLexer.lexEditDistance;if("^"==e)return t.backup(),t.width()>0&&t.emit(L.QueryLexer.TERM),L.QueryLexer.lexBoost;if("+"==e&&1===t.width())return t.emit(L.QueryLexer.PRESENCE),L.QueryLexer.lexText;if("-"==e&&1===t.width())return t.emit(L.QueryLexer.PRESENCE),L.QueryLexer.lexText;if(e.match(L.QueryLexer.termSeparator))return L.QueryLexer.lexTerm}else t.escapeCharacter()}},L.QueryParser=function(t,e){this.lexer=new L.QueryLexer(t),this.query=e,this.currentClause={},this.lexemeIdx=0},L.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=L.QueryParser.parseClause;t;)t=t(this);return this.query},L.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},L.QueryParser.prototype.consumeLexeme=function(){var t=this.peekLexeme();return this.lexemeIdx+=1,t},L.QueryParser.prototype.nextClause=function(){var t=this.currentClause;this.query.clause(t),this.currentClause={}},L.QueryParser.parseClause=function(t){var e=t.peekLexeme();if(null!=e)switch(e.type){case L.QueryLexer.PRESENCE:return L.QueryParser.parsePresence;case L.QueryLexer.FIELD:return L.QueryParser.parseField;case L.QueryLexer.TERM:return L.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+e.type;throw e.str.length>=1&&(n+=" with value '"+e.str+"'"),new L.QueryParseError(n,e.start,e.end)}},L.QueryParser.parsePresence=function(t){var e=t.consumeLexeme();if(null!=e){switch(e.str){case"-":t.currentClause.presence=L.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=L.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+e.str+"'";throw new L.QueryParseError(n,e.start,e.end)}var i=t.peekLexeme();if(null==i){n="expecting term or field, found nothing";throw new L.QueryParseError(n,e.start,e.end)}switch(i.type){case L.QueryLexer.FIELD:return L.QueryParser.parseField;case L.QueryLexer.TERM:return L.QueryParser.parseTerm;default:n="expecting term or field, found '"+i.type+"'";throw new L.QueryParseError(n,i.start,i.end)}}},L.QueryParser.parseField=function(t){var e=t.consumeLexeme();if(null!=e){if(-1==t.query.allFields.indexOf(e.str)){var n=t.query.allFields.map(function(t){return"'"+t+"'"}).join(", "),i="unrecognised field '"+e.str+"', possible fields: "+n;throw new L.QueryParseError(i,e.start,e.end)}t.currentClause.fields=[e.str];var o=t.peekLexeme();if(null==o){i="expecting term, found nothing";throw new L.QueryParseError(i,e.start,e.end)}if(o.type===L.QueryLexer.TERM)return L.QueryParser.parseTerm;i="expecting term, found '"+o.type+"'";throw new L.QueryParseError(i,o.start,o.end)}},L.QueryParser.parseTerm=function(t){var e=t.consumeLexeme();if(null!=e){t.currentClause.term=e.str.toLowerCase(),-1!=e.str.indexOf("*")&&(t.currentClause.usePipeline=!1);var n=t.peekLexeme();if(null!=n)switch(n.type){case L.QueryLexer.TERM:return t.nextClause(),L.QueryParser.parseTerm;case L.QueryLexer.FIELD:return t.nextClause(),L.QueryParser.parseField;case L.QueryLexer.EDIT_DISTANCE:return L.QueryParser.parseEditDistance;case L.QueryLexer.BOOST:return L.QueryParser.parseBoost;case L.QueryLexer.PRESENCE:return t.nextClause(),L.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+n.type+"'";throw new L.QueryParseError(i,n.start,n.end)}else t.nextClause()}},L.QueryParser.parseEditDistance=function(t){var e=t.consumeLexeme();if(null!=e){var n=parseInt(e.str,10);if(isNaN(n)){var i="edit distance must be numeric";throw new L.QueryParseError(i,e.start,e.end)}t.currentClause.editDistance=n;var o=t.peekLexeme();if(null!=o)switch(o.type){case L.QueryLexer.TERM:return t.nextClause(),L.QueryParser.parseTerm;case L.QueryLexer.FIELD:return t.nextClause(),L.QueryParser.parseField;case L.QueryLexer.EDIT_DISTANCE:return L.QueryParser.parseEditDistance;case L.QueryLexer.BOOST:return L.QueryParser.parseBoost;case L.QueryLexer.PRESENCE:return t.nextClause(),L.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+o.type+"'";throw new L.QueryParseError(i,o.start,o.end)}else t.nextClause()}},L.QueryParser.parseBoost=function(t){var e=t.consumeLexeme();if(null!=e){var n=parseInt(e.str,10);if(isNaN(n)){var i="boost must be numeric";throw new L.QueryParseError(i,e.start,e.end)}t.currentClause.boost=n;var o=t.peekLexeme();if(null!=o)switch(o.type){case L.QueryLexer.TERM:return t.nextClause(),L.QueryParser.parseTerm;case L.QueryLexer.FIELD:return t.nextClause(),L.QueryParser.parseField;case L.QueryLexer.EDIT_DISTANCE:return L.QueryParser.parseEditDistance;case L.QueryLexer.BOOST:return L.QueryParser.parseBoost;case L.QueryLexer.PRESENCE:return t.nextClause(),L.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+o.type+"'";throw new L.QueryParseError(i,o.start,o.end)}else t.nextClause()}},F=this,I=function(){return L},"object"===_typeof(n)?e.exports=I():F.lunr=I()}()},{}],33:[function(t,e,n){e.exports=Math.abs},{}],34:[function(t,e,n){e.exports=Math.floor},{}],35:[function(t,e,n){e.exports=Number.isNaN||function(t){return t!=t}},{}],36:[function(t,e,n){e.exports=Math.max},{}],37:[function(t,e,n){e.exports=Math.min},{}],38:[function(t,e,n){e.exports=Math.pow},{}],39:[function(t,e,n){e.exports=Math.round},{}],40:[function(t,e,n){var i=t("./isNaN");e.exports=function(t){return i(t)||0===t?t:t<0?-1:1}},{"./isNaN":35}],41:[function(t,e,n){(function(n){(function(){var i="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=i&&o&&"function"==typeof o.get?o.get:null,a=i&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=s&&c&&"function"==typeof c.get?c.get:null,d=s&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,u="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,v=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,y=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,C=String.prototype.toLowerCase,x=RegExp.prototype.test,A=Array.prototype.concat,D=Array.prototype.join,k=Array.prototype.slice,E=Math.floor,S="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,T="function"==typeof Symbol&&"symbol"===_typeof(Symbol.iterator)?Symbol.prototype.toString:null,_="function"==typeof Symbol&&"object"===_typeof(Symbol.iterator),F="function"==typeof Symbol&&Symbol.toStringTag&&(_typeof(Symbol.toStringTag)===_||"symbol")?Symbol.toStringTag:null,I=Object.prototype.propertyIsEnumerable,L=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function M(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||x.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var i=t<0?-E(-t):E(t);if(i!==t){var o=String(i),r=y.call(e,o.length+1);return b.call(o,n,"$&_")+"."+b.call(b.call(r,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(e,n,"$&_")}var R=t("./util.inspect"),B=R.custom,H=q(B)?B:null,V={__proto__:null,double:'"',single:"'"},j={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function O(t,e,n){var i=n.quoteStyle||e,o=V[i];return o+t+o}function N(t){return b.call(String(t),/"/g,""")}function U(t){return!F||!("object"===_typeof(t)&&(F in t||void 0!==t[F]))}function z(t){return"[object Array]"===$(t)&&U(t)}function W(t){return"[object RegExp]"===$(t)&&U(t)}function q(t){if(_)return t&&"object"===_typeof(t)&&t instanceof Symbol;if("symbol"===_typeof(t))return!0;if(!t||"object"!==_typeof(t)||!T)return!1;try{return T.call(t),!0}catch(t){}return!1}e.exports=function t(e,i,o,s){var c=i||{};if(G(c,"quoteStyle")&&!G(V,c.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var v=!G(c,"customInspect")||c.customInspect;if("boolean"!=typeof v&&"symbol"!==v)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=c.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return J(e,c);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var x=String(e);return w?M(e,x):x}if("bigint"==typeof e){var E=String(e)+"n";return w?M(e,E):E}var P=void 0===c.depth?5:c.depth;if(void 0===o&&(o=0),o>=P&&P>0&&"object"===_typeof(e))return z(e)?"[Array]":"[Object]";var B=function(t,e){var n;if("\t"===t.indent)n="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;n=D.call(Array(t.indent+1)," ")}return{base:n,prev:D.call(Array(e+1),n)}}(c,o);if(void 0===s)s=[];else if(K(s,e)>=0)return"[Circular]";function j(e,n,i){if(n&&(s=k.call(s)).push(n),i){var r={depth:c.depth};return G(c,"quoteStyle")&&(r.quoteStyle=c.quoteStyle),t(e,r,o+1,s)}return t(e,c,o+1,s)}if("function"==typeof e&&!W(e)){var Q=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),Z=nt(e,j);return"[Function"+(Q?": "+Q:" (anonymous)")+"]"+(Z.length>0?" { "+D.call(Z,", ")+" }":"")}if(q(e)){var it=_?b.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):T.call(e);return"object"!==_typeof(e)||_?it:X(it)}if(function(t){if(!t||"object"!==_typeof(t))return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var ot="<"+C.call(String(e.nodeName)),rt=e.attributes||[],at=0;at<rt.length;at++)ot+=" "+rt[at].name+"="+O(N(rt[at].value),"double",c);return ot+=">",e.childNodes&&e.childNodes.length&&(ot+="..."),ot+="</"+C.call(String(e.nodeName))+">"}if(z(e)){if(0===e.length)return"[]";var st=nt(e,j);return B&&!function(t){for(var e=0;e<t.length;e++)if(K(t[e],"\n")>=0)return!1;return!0}(st)?"["+et(st,B)+"]":"[ "+D.call(st,", ")+" ]"}if(function(t){return"[object Error]"===$(t)&&U(t)}(e)){var ct=nt(e,j);return"cause"in Error.prototype||!("cause"in e)||I.call(e,"cause")?0===ct.length?"["+String(e)+"]":"{ ["+String(e)+"] "+D.call(ct,", ")+" }":"{ ["+String(e)+"] "+D.call(A.call("[cause]: "+j(e.cause),ct),", ")+" }"}if("object"===_typeof(e)&&v){if(H&&"function"==typeof e[H]&&R)return R(e,{depth:P-o});if("symbol"!==v&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!r||!t||"object"!==_typeof(t))return!1;try{r.call(t);try{l.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var lt=[];return a&&a.call(e,function(t,n){lt.push(j(n,e,!0)+" => "+j(t,e))}),tt("Map",r.call(e),lt,B)}if(function(t){if(!l||!t||"object"!==_typeof(t))return!1;try{l.call(t);try{r.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var dt=[];return d&&d.call(e,function(t){dt.push(j(t,e))}),tt("Set",l.call(e),dt,B)}if(function(t){if(!p||!t||"object"!==_typeof(t))return!1;try{p.call(t,p);try{u.call(t,u)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Y("WeakMap");if(function(t){if(!u||!t||"object"!==_typeof(t))return!1;try{u.call(t,u);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Y("WeakSet");if(function(t){if(!h||!t||"object"!==_typeof(t))return!1;try{return h.call(t),!0}catch(t){}return!1}(e))return Y("WeakRef");if(function(t){return"[object Number]"===$(t)&&U(t)}(e))return X(j(Number(e)));if(function(t){if(!t||"object"!==_typeof(t)||!S)return!1;try{return S.call(t),!0}catch(t){}return!1}(e))return X(j(S.call(e)));if(function(t){return"[object Boolean]"===$(t)&&U(t)}(e))return X(f.call(e));if(function(t){return"[object String]"===$(t)&&U(t)}(e))return X(j(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==n&&e===n)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===$(t)&&U(t)}(e)&&!W(e)){var pt=nt(e,j),ut=L?L(e)===Object.prototype:e instanceof Object||e.constructor===Object,ht=e instanceof Object?"":"null prototype",ft=!ut&&F&&Object(e)===e&&F in e?y.call($(e),8,-1):ht?"Object":"",vt=(ut||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(ft||ht?"["+D.call(A.call([],ft||[],ht||[]),": ")+"] ":"");return 0===pt.length?vt+"{}":B?vt+"{"+et(pt,B)+"}":vt+"{ "+D.call(pt,", ")+" }"}return String(e)};var Q=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return Q.call(t,e)}function $(t){return v.call(t)}function K(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1}function J(t,e){if(t.length>e.maxStringLength){var n=t.length-e.maxStringLength,i="... "+n+" more character"+(n>1?"s":"");return J(y.call(t,0,e.maxStringLength),e)+i}var o=j[e.quoteStyle||"single"];return o.lastIndex=0,O(b.call(b.call(t,o,"\\$1"),/[\x00-\x1f]/g,Z),"single",e)}function Z(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function X(t){return"Object("+t+")"}function Y(t){return t+" { ? }"}function tt(t,e,n,i){return t+" ("+e+") {"+(i?et(n,i):D.call(n,", "))+"}"}function et(t,e){if(0===t.length)return"";var n="\n"+e.prev+e.base;return n+D.call(t,","+n)+"\n"+e.prev}function nt(t,e){var n=z(t),i=[];if(n){i.length=t.length;for(var o=0;o<t.length;o++)i[o]=G(t,o)?e(t[o],t):""}var r,a="function"==typeof P?P(t):[];if(_){r={};for(var s=0;s<a.length;s++)r["$"+a[s]]=a[s]}for(var c in t)G(t,c)&&(n&&String(Number(c))===c&&c<t.length||_&&r["$"+c]instanceof Symbol||(x.call(/[^\w$]/,c)?i.push(e(c,t)+": "+e(t[c],t)):i.push(c+": "+e(t[c],t))));if("function"==typeof P)for(var l=0;l<a.length;l++)I.call(t,a[l])&&i.push("["+e(a[l])+"]: "+e(t[a[l]],t));return i}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./util.inspect":1}],42:[function(t,e,n){(function(t){(function(){function n(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function i(t,e){for(var n,i="",o=0,r=-1,a=0,s=0;s<=t.length;++s){if(s<t.length)n=t.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(r===s-1||1===a);else if(r!==s-1&&2===a){if(i.length<2||2!==o||46!==i.charCodeAt(i.length-1)||46!==i.charCodeAt(i.length-2))if(i.length>2){var c=i.lastIndexOf("/");if(c!==i.length-1){-1===c?(i="",o=0):o=(i=i.slice(0,c)).length-1-i.lastIndexOf("/"),r=s,a=0;continue}}else if(2===i.length||1===i.length){i="",o=0,r=s,a=0;continue}e&&(i.length>0?i+="/..":i="..",o=2)}else i.length>0?i+="/"+t.slice(r+1,s):i=t.slice(r+1,s),o=s-r-1;r=s,a=0}else 46===n&&-1!==a?++a:a=-1}return i}var o={resolve:function(){for(var e,o="",r=!1,a=arguments.length-1;a>=-1&&!r;a--){var s;a>=0?s=arguments[a]:(void 0===e&&(e=t.cwd()),s=e),n(s),0!==s.length&&(o=s+"/"+o,r=47===s.charCodeAt(0))}return o=i(o,!r),r?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(t){if(n(t),0===t.length)return".";var e=47===t.charCodeAt(0),o=47===t.charCodeAt(t.length-1);return 0!==(t=i(t,!e)).length||e||(t="."),t.length>0&&o&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return n(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var i=arguments[e];n(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":o.normalize(t)},relative:function(t,e){if(n(t),n(e),t===e)return"";if((t=o.resolve(t))===(e=o.resolve(e)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var r=t.length,a=r-i,s=1;s<e.length&&47===e.charCodeAt(s);++s);for(var c=e.length-s,l=a<c?a:c,d=-1,p=0;p<=l;++p){if(p===l){if(c>l){if(47===e.charCodeAt(s+p))return e.slice(s+p+1);if(0===p)return e.slice(s+p)}else a>l&&(47===t.charCodeAt(i+p)?d=p:0===p&&(d=0));break}var u=t.charCodeAt(i+p);if(u!==e.charCodeAt(s+p))break;47===u&&(d=p)}var h="";for(p=i+d+1;p<=r;++p)p!==r&&47!==t.charCodeAt(p)||(0===h.length?h+="..":h+="/..");return h.length>0?h+e.slice(s+d):(s+=d,47===e.charCodeAt(s)&&++s,e.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(n(t),0===t.length)return".";for(var e=t.charCodeAt(0),i=47===e,o=-1,r=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!r){o=a;break}}else r=!1;return-1===o?i?"/":".":i&&1===o?"//":t.slice(0,o)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');n(t);var i,o=0,r=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var s=e.length-1,c=-1;for(i=t.length-1;i>=0;--i){var l=t.charCodeAt(i);if(47===l){if(!a){o=i+1;break}}else-1===c&&(a=!1,c=i+1),s>=0&&(l===e.charCodeAt(s)?-1===--s&&(r=i):(s=-1,r=c))}return o===r?r=c:-1===r&&(r=t.length),t.slice(o,r)}for(i=t.length-1;i>=0;--i)if(47===t.charCodeAt(i)){if(!a){o=i+1;break}}else-1===r&&(a=!1,r=i+1);return-1===r?"":t.slice(o,r)},extname:function(t){n(t);for(var e=-1,i=0,o=-1,r=!0,a=0,s=t.length-1;s>=0;--s){var c=t.charCodeAt(s);if(47!==c)-1===o&&(r=!1,o=s+1),46===c?-1===e?e=s:1!==a&&(a=1):-1!==e&&(a=-1);else if(!r){i=s+1;break}}return-1===e||-1===o||0===a||1===a&&e===o-1&&e===i+1?"":t.slice(e,o)},format:function(t){if(null===t||"object"!==_typeof(t))throw new TypeError('The "pathObject" argument must be of type Object. Received type '+_typeof(t));return function(t,e){var n=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+i:n+t+i:i}("/",t)},parse:function(t){n(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var i,o=t.charCodeAt(0),r=47===o;r?(e.root="/",i=1):i=0;for(var a=-1,s=0,c=-1,l=!0,d=t.length-1,p=0;d>=i;--d)if(47!==(o=t.charCodeAt(d)))-1===c&&(l=!1,c=d+1),46===o?-1===a?a=d:1!==p&&(p=1):-1!==a&&(p=-1);else if(!l){s=d+1;break}return-1===a||-1===c||0===p||1===p&&a===c-1&&a===s+1?-1!==c&&(e.base=e.name=0===s&&r?t.slice(1,c):t.slice(s,c)):(0===s&&r?(e.name=t.slice(1,a),e.base=t.slice(1,c)):(e.name=t.slice(s,a),e.base=t.slice(s,c)),e.ext=t.slice(a,c)),s>0?e.dir=t.slice(0,s-1):r&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,e.exports=o}).call(this)}).call(this,t("_process"))},{_process:89}],43:[function(t,e,n){e.exports={name:"pict-application",version:"1.0.33",description:"Application base class for a pict view-based application",main:"source/Pict-Application.js",scripts:{test:"npx quack test",start:"node source/Pict-Application.js",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-application-image:local","docker-dev-run":'docker run -it -d --name pict-application-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-application" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-application-image:local',"docker-dev-shell":"docker exec -it pict-application-dev /bin/bash",tests:"npx quack test -g",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Application.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-application.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-application/issues"},homepage:"https://github.com/stevenvelozo/pict-application#readme",devDependencies:{"@eslint/js":"^9.28.0","browser-env":"^3.3.0",eslint:"^9.28.0",pict:"^1.0.348","pict-provider":"^1.0.10","pict-view":"^1.0.66",quackage:"^1.0.58",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{"fable-serviceproviderbase":"^3.0.19"}}},{}],44:[function(t,e,n){var i=t("fable-serviceproviderbase"),o=t("../package.json"),r={Name:"DefaultPictApplication",MainViewportViewIdentifier:"Default-View",MainViewportRenderableHash:!1,MainViewportDestinationAddress:!1,MainViewportDefaultDataAddress:!1,AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!0,AutoRenderViewsAfterInitialize:!1,AutoLoginAfterInitialize:!1,AutoLoadDataAfterLogin:!1,ConfigurationOnlyViews:[],Manifests:{},IdentifierAddressPrefix:"PICT-"},a=function(t){function e(t,n,i){var a;_classCallCheck(this,e);var s="object"===_typeof(t.settings.PictApplicationConfiguration)?t.settings.PictApplicationConfiguration:{};(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),s,n),i])).options,a.log,a.fable,a.UUID,a.Hash,a.servicesMap,a.serviceType="PictApplication",a._Package=o,a.pict=a.fable,a.AppData=a.fable.AppData,a.Bundle=a.fable.Bundle,a.initializeTimestamp,a.lastSolvedTimestamp,a.lastLoginTimestamp,a.lastMarshalFromViewsTimestamp,a.lastMarshalToViewsTimestamp,a.lastAutoRenderTimestamp,a.lastLoadDataTimestamp;var c=Object.keys(a.options.Manifests);if(c.length>0)for(var l=0;l<c.length;l++){var d=c[l];a.fable.instantiateServiceProvider("Manifest",a.options.Manifests[d],d)}return a}return _inherits(e,t),_createClass(e,[{key:"onPreSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onPreSolve:")),!0}},{key:"onPreSolveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"onBeforeSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSolve:")),!0}},{key:"onBeforeSolveAsync",value:function(t){return this.onBeforeSolve(),t()}},{key:"onSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSolve:")),!0}},{key:"onSolveAsync",value:function(t){return this.onSolve(),t()}},{key:"solve",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing solve() function..."));for(var t=Object.keys(this.pict.providers),e=[],n=0;n<t.length;n++){var i=this.pict.providers[t[n]];i.options.AutoSolveWithApp&&e.push(i)}e.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var o=0;o<e.length;o++)e[o].solve(e[o]);this.onBeforeSolve();for(var r=Object.keys(this.pict.views),a=[],s=0;s<r.length;s++){var c=this.pict.views[r[s]];c.options.AutoInitialize&&a.push(c)}a.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var l=0;l<a.length;l++)a[l].solve();return this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"solveAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");n.anticipate(this.onBeforeSolveAsync.bind(this));var i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync Auto Callback Error: ").concat(t),t)});for(var o=Object.keys(this.pict.providers),r=[],a=0;a<o.length;a++){var s=this.pict.providers[o[a]];s.options.AutoSolveWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var c=0;c<r.length;c++)n.anticipate(r[c].solveAsync.bind(r[c]));for(var l=Object.keys(this.pict.views),d=[],p=0;p<l.length;p++){var u=this.pict.views[l[p]];u.options.AutoSolveWithApp&&d.push(u)}d.sort(function(t,e){return t.options.AutoSolveOrdinal-e.options.AutoSolveOrdinal});for(var h=0;h<d.length;h++)n.anticipate(d[h].solveAsync.bind(d[h]));n.anticipate(this.onSolveAsync.bind(this)),n.anticipate(this.onAfterSolveAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync() complete.")),e.lastSolvedTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSolve:")),!0}},{key:"onAfterSolveAsync",value:function(t){return this.onAfterSolve(),t()}},{key:"onBeforeLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoginAsync:")),t()}},{key:"onLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoginAsync:")),t()}},{key:"loginAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loginAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loginAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeLoginAsync.bind(this)),n.anticipate(this.onLoginAsync.bind(this)),n.anticipate(this.onAfterLoginAsync.bind(this)),this.options.AutoLoadDataAfterLogin&&n.anticipate(function(t){if(!e.isLoggedIn())return t();e.pict.LogNoisiness>1&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," auto loading data after login...")),e.loadDataAsync(function(e){t(e)})}),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loginAsync() complete.")),e.lastLoginTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"isLoggedIn",value:function(){return!0}},{key:"onAfterLoginAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoginAsync:")),t()}},{key:"onBeforeLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeLoadDataAsync:")),t()}},{key:"onLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onLoadDataAsync:")),t()}},{key:"loadDataAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," loadDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loadDataAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeLoadDataAsync.bind(this));for(var o=Object.keys(this.pict.providers),r=[],a=0;a<o.length;a++){var s=this.pict.providers[o[a]];s.options.AutoLoadDataWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoLoadDataOrdinal-e.options.AutoLoadDataOrdinal});for(var c=0,l=r;c<l.length;c++){var d=l[c];n.anticipate(d.onBeforeLoadDataAsync.bind(d))}n.anticipate(this.onLoadDataAsync.bind(this));for(var p=0,u=r;p<u.length;p++){var h=u[p];n.anticipate(h.onLoadDataAsync.bind(h))}n.anticipate(this.onAfterLoadDataAsync.bind(this));for(var f=0,v=r;f<v.length;f++){var g=v[f];n.anticipate(g.onAfterLoadDataAsync.bind(g))}n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," loadDataAsync() complete.")),e.lastLoadDataTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterLoadDataAsync:")),t()}},{key:"onBeforeSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeSaveDataAsync:")),t()}},{key:"onSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onSaveDataAsync:")),t()}},{key:"saveDataAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i=t;"function"!=typeof i&&(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," saveDataAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," saveDataAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeSaveDataAsync.bind(this));for(var o=Object.keys(this.pict.providers),r=[],a=0;a<o.length;a++){var s=this.pict.providers[o[a]];s.options.AutoSaveDataWithApp&&r.push(s)}r.sort(function(t,e){return t.options.AutoSaveDataOrdinal-e.options.AutoSaveDataOrdinal});for(var c=0,l=r;c<l.length;c++){var d=l[c];n.anticipate(d.onBeforeSaveDataAsync.bind(d))}n.anticipate(this.onSaveDataAsync.bind(this));for(var p=0,u=r;p<u.length;p++){var h=u[p];n.anticipate(h.onSaveDataAsync.bind(h))}n.anticipate(this.onAfterSaveDataAsync.bind(this));for(var f=0,v=r;f<v.length;f++){var g=v[f];n.anticipate(g.onAfterSaveDataAsync.bind(g))}n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," saveDataAsync() complete.")),e.lastSaveDataTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterSaveDataAsync:")),t()}},{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize:")),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initialize called but initialization is already completed. Aborting.")),!1;if(this.onBeforeInitialize(),"ConfigurationOnlyViews"in this.options)for(var t=0;t<this.options.ConfigurationOnlyViews.length;t++){var e=void 0===this.options.ConfigurationOnlyViews[t].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[t].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(e)),this.pict.addView(e,this.options.ConfigurationOnlyViews[t])}this.onInitialize();for(var n=Object.keys(this.pict.providers),i=[],o=0;o<n.length;o++){var r=this.pict.providers[n[o]];r.options.AutoInitialize&&i.push(r)}i.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var a=0;a<i.length;a++)i[a].initialize();for(var s=Object.keys(this.pict.views),c=[],l=0;l<s.length;l++){var d=this.pict.views[s[l]];d.options.AutoInitialize&&c.push(d)}c.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var p=0;p<c.length;p++)c[p].initialize();return this.onAfterInitialize(),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving after initialization...")),this.solve()),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering after initialization...")),this.render()),this.initializeTimestamp=this.fable.log.getTimeStamp(),this.onCompletionOfInitialize(),!0}},{key:"initializeAsync",value:function(t){var e=this;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync:"));var n="function"==typeof t&&t;if(n||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," initializeAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),n=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initializeAsync Auto Callback Error: ").concat(t),t)}),this.initializeTimestamp)return this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," async initialize called but initialization is already completed. Aborting.")),this.onCompletionOfInitializeAsync(n);var i=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate");if(this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning initialization...")),"ConfigurationOnlyViews"in this.options)for(var o=0;o<this.options.ConfigurationOnlyViews.length;o++){var r=void 0===this.options.ConfigurationOnlyViews[o].ViewIdentifier?"AutoView-".concat(this.fable.getUUID()):this.options.ConfigurationOnlyViews[o].ViewIdentifier;this.log.info("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," adding configuration only view: ").concat(r)),this.pict.addView(r,this.options.ConfigurationOnlyViews[o])}i.anticipate(this.onBeforeInitializeAsync.bind(this)),i.anticipate(this.onInitializeAsync.bind(this));for(var a=Object.keys(this.pict.providers),s=[],c=0;c<a.length;c++){var l=this.pict.providers[a[c]];l.options.AutoInitialize&&s.push(l)}s.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var d=0;d<s.length;d++)i.anticipate(s[d].initializeAsync.bind(s[d]));for(var p=Object.keys(this.pict.views),u=[],h=0;h<p.length;h++){var f=this.pict.views[p[h]];f.options.AutoInitialize&&u.push(f)}u.sort(function(t,e){return t.options.AutoInitializeOrdinal-e.options.AutoInitializeOrdinal});for(var v=0;v<u.length;v++){var g=u[v];i.anticipate(g.initializeAsync.bind(g))}i.anticipate(this.onAfterInitializeAsync.bind(this)),this.options.AutoLoginAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto login (asynchronously) after initialization...")),i.anticipate(this.loginAsync.bind(this))),this.options.AutoSolveAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto solving (asynchronously) after initialization...")),i.anticipate(this.solveAsync.bind(this))),this.options.AutoRenderMainViewportViewAfterInitialize&&(this.pict.LogNoisiness>1&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," auto rendering (asynchronously) after initialization...")),i.anticipate(this.renderMainViewportAsync.bind(this))),i.wait(function(t){return t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initializeAsync Error: ").concat(t.message||t),{stack:t.stack}),e.initializeTimestamp=e.fable.log.getTimeStamp(),e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," initialization complete.")),n()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onCompletionOfInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onCompletionOfInitialize:")),!0}},{key:"onCompletionOfInitializeAsync",value:function(t){return this.onCompletionOfInitialize(),t()}},{key:"onBeforeMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalFromViews:")),!0}},{key:"onBeforeMarshalFromViewsAsync",value:function(t){return this.onBeforeMarshalFromViews(),t()}},{key:"onMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalFromViews:")),!0}},{key:"onMarshalFromViewsAsync",value:function(t){return this.onMarshalFromViews(),t()}},{key:"marshalFromViews",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalFromViews() function...")),this.onBeforeMarshalFromViews();for(var t=Object.keys(this.pict.views),e=[],n=0;n<t.length;n++){var i=this.pict.views[t[n]];e.push(i)}for(var o=0;o<e.length;o++)e[o].marshalFromView();return this.onMarshalFromViews(),this.onAfterMarshalFromViews(),this.lastMarshalFromViewsTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"marshalFromViewsAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewsAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeMarshalFromViewsAsync.bind(this));for(var o=Object.keys(this.pict.views),r=[],a=0;a<o.length;a++){var s=this.pict.views[o[a]];r.push(s)}for(var c=0;c<r.length;c++)n.anticipate(r[c].marshalFromViewAsync.bind(r[c]));n.anticipate(this.onMarshalFromViewsAsync.bind(this)),n.anticipate(this.onAfterMarshalFromViewsAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewsAsync() complete.")),e.lastMarshalFromViewsTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalFromViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalFromViews:")),!0}},{key:"onAfterMarshalFromViewsAsync",value:function(t){return this.onAfterMarshalFromViews(),t()}},{key:"onBeforeMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeMarshalToViews:")),!0}},{key:"onBeforeMarshalToViewsAsync",value:function(t){return this.onBeforeMarshalToViews(),t()}},{key:"onMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onMarshalToViews:")),!0}},{key:"onMarshalToViewsAsync",value:function(t){return this.onMarshalToViews(),t()}},{key:"marshalToViews",value:function(){this.pict.LogNoisiness>2&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," executing marshalToViews() function...")),this.onBeforeMarshalToViews();for(var t=Object.keys(this.pict.views),e=[],n=0;n<t.length;n++){var i=this.pict.views[t[n]];e.push(i)}for(var o=0;o<e.length;o++)e[o].marshalToView();return this.onMarshalToViews(),this.onAfterMarshalToViews(),this.lastMarshalToViewsTimestamp=this.fable.log.getTimeStamp(),!0}},{key:"marshalToViewsAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewsAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeMarshalToViewsAsync.bind(this));for(var o=Object.keys(this.pict.views),r=[],a=0;a<o.length;a++){var s=this.pict.views[o[a]];r.push(s)}for(var c=0;c<r.length;c++)n.anticipate(r[c].marshalToViewAsync.bind(r[c]));n.anticipate(this.onMarshalToViewsAsync.bind(this)),n.anticipate(this.onAfterMarshalToViewsAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewsAsync() complete.")),e.lastMarshalToViewsTimestamp=e.fable.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalToViews",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterMarshalToViews:")),!0}},{key:"onAfterMarshalToViewsAsync",value:function(t){return this.onAfterMarshalToViews(),t()}},{key:"onBeforeRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onBeforeRender:")),!0}},{key:"onBeforeRenderAsync",value:function(t){return this.onBeforeRender(),t()}},{key:"render",value:function(t,e,n,i){var o="string"!=typeof t?this.options.MainViewportViewIdentifier:t,r="string"!=typeof e?this.options.MainViewportRenderableHash:e,a="string"!=typeof n?this.options.MainViewportDestinationAddress:n,s="string"!=typeof i?this.options.MainViewportDefaultDataAddress:i;this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(r,"] Destination[").concat(a,"] TemplateDataAddress[").concat(s,"] render:")),this.onBeforeRender();var c="string"==typeof o&&this.servicesMap.PictView[o];return c?(this.onRender(),c.render(r,a,s),this.onAfterRender(),!0):(this.log.error("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not render from View ").concat(o," because it is not a valid view.")),!1)}},{key:"onRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onRender:")),!0}},{key:"onRenderAsync",value:function(t){return this.onRender(),t()}},{key:"renderAsync",value:function(t,e,n,i,o){var r=this,a="string"!=typeof t?this.options.MainViewportViewIdentifier:t,s="string"!=typeof e?this.options.MainViewportRenderableHash:e,c="string"!=typeof n?this.options.MainViewportDestinationAddress:n,l="string"!=typeof i?this.options.MainViewportDefaultDataAddress:i,d="function"==typeof o?o:"function"==typeof i?i:"function"==typeof n?n:"function"==typeof e?e:"function"==typeof t&&t;d||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),d=function(t){t&&r.log.error("PictApp [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.Name," renderAsync Auto Callback Error: ").concat(t),t)}),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," VIEW Renderable[").concat(s,"] Destination[").concat(c,"] TemplateDataAddress[").concat(l,"] renderAsync:"));var p=this.fable.newAnticipate();p.anticipate(this.onBeforeRenderAsync.bind(this));var u="string"==typeof a&&this.servicesMap.PictView[a];if(!u){var h="PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," could not asynchronously render from View ").concat(a," because it is not a valid view.");return this.pict.LogNoisiness>3&&this.log.error(h),d(new Error(h))}return p.anticipate(this.onRenderAsync.bind(this)),p.anticipate(function(t){u.renderAsync.call(u,s,c,l,t)}),p.anticipate(this.onAfterRenderAsync.bind(this)),p.wait(d)}},{key:"onAfterRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," onAfterRender:")),!0}},{key:"onAfterRenderAsync",value:function(t){return this.onAfterRender(),t()}},{key:"renderMainViewport",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewport:")),this.render()}},{key:"renderMainViewportAsync",value:function(t){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow APPLICATION [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderMainViewportAsync:")),this.renderAsync(t)}},{key:"renderAutoViews",value:function(){var t=this;this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViews..."));var e=Object.keys(this.pict.views);e.sort(function(e,n){return t.pict.views[e].options.AutoRenderOrdinal-t.pict.views[n].options.AutoRenderOrdinal});for(var n=0;n<e.length;n++){var i=this.pict.views[e[n]];i.options.AutoRender&&i.render()}this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync complete."))}},{key:"renderAutoViewsAsync",value:function(t){var e=this,n=this.fable.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t&&t;i||(this.log.warn("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAutoViewsAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," renderAutoViewsAsync Auto Callback Error: ").concat(t),t)}),this.pict.LogNoisiness>0&&this.log.trace("PictApp [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," beginning renderAutoViewsAsync..."));var o=Object.keys(this.pict.views);o.sort(function(t,n){return e.pict.views[t].options.AutoRenderOrdinal-e.pict.views[n].options.AutoRenderOrdinal});for(var r=0;r<o.length;r++){var a=this.pict.views[o[r]];a.options.AutoRender&&n.anticipate(a.renderAsync.bind(a))}n.wait(function(t){return e.lastAutoRenderTimestamp=e.fable.log.getTimeStamp(),e.pict.LogNoisiness>0&&e.log.trace("PictApp [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," renderAutoViewsAsync complete.")),i(t)})}},{key:"isPictApplication",get:function(){return!0}}])}(i);e.exports=a},{"../package.json":43,"fable-serviceproviderbase":20}],45:[function(t,e,n){e.exports=t("./views/Pict-View-Content.js"),e.exports.PictContentProvider=t("./providers/Pict-Provider-Content.js")},{"./providers/Pict-Provider-Content.js":46,"./views/Pict-View-Content.js":47}],46:[function(t,e,n){var i=t("pict-provider"),o=t("pict-section-code").createHighlighter,r=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"highlightCode",value:function(t,e){if(!t)return"";var n={textContent:t,innerHTML:""};return o(e)(n),n.innerHTML}},{key:"generateLineNumbers",value:function(t){if(!t)return"<span>1</span>";for(var e=t.split("\n").length,n="",i=1;i<=e;i++)n+="<span>"+i+"</span>";return n}},{key:"parseMarkdown",value:function(t,e,n){var i=this;if(!t)return"";for(var o=t.split("\n"),r=[],a=!1,s=0,c="",l=[],d=!1,p="",u=!1,h=[],f=!1,v=[],g=[],m=function(){g.length>0&&(r.push("<p>"+g.map(function(t){return i.parseInline(t,e,n)}).join(" ")+"</p>"),g=[])},y=0;y<o.length;y++){var b=o[y];if(a||!b.trim().match(/^\$\$/))if(f)v.push(b);else{var w=b.match(/^(`{3,})/);if(w){var C=w[1].length;if(a){if(C>=s&&b.trim()===w[1]){if("mermaid"===c)r.push('<pre class="mermaid">'+l.join("\n")+"</pre>");else{var x=l.join("\n"),A=this.highlightCode(x,c),D=this.generateLineNumbers(x);r.push('<div class="pict-content-code-wrap"><div class="pict-content-code-line-numbers">'+D+'</div><pre><code class="language-'+this.escapeHTML(c)+'">'+A+"</code></pre></div>")}a=!1,s=0,c="",l=[];continue}l.push(b);continue}m(),d&&(r.push("ul"===p?"</ul>":"</ol>"),d=!1),u&&(r.push("<blockquote>"+this.parseMarkdown(h.join("\n"),e,n)+"</blockquote>"),u=!1,h=[]),s=C,c=b.replace(/^`{3,}/,"").trim(),a=!0}else if(a)l.push(b);else if(b.match(/^>\s?/))u||(m(),d&&(r.push("ul"===p?"</ul>":"</ol>"),d=!1),u=!0,h=[]),h.push(b.replace(/^>\s?/,""));else if(u&&(r.push("<blockquote>"+this.parseMarkdown(h.join("\n"),e,n)+"</blockquote>"),u=!1,h=[]),b.match(/^(-{3,}|\*{3,}|_{3,})\s*$/))m(),d&&(r.push("ul"===p?"</ul>":"</ol>"),d=!1),r.push("<hr>");else{var k=b.match(/^(#{1,6})\s+(.+)/);if(k){m(),d&&(r.push("ul"===p?"</ul>":"</ol>"),d=!1);var E=k[1].length,S=this.parseInline(k[2],e,n),P=k[2].toLowerCase().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-");r.push("<h"+E+' id="'+P+'">'+S+"</h"+E+">")}else{var T=b.match(/^(\s*)[-*+]\s+(.*)/);if(T)m(),d&&"ul"===p||(d&&r.push("ul"===p?"</ul>":"</ol>"),r.push("<ul>"),d=!0,p="ul"),r.push("<li>"+this.parseInline(T[2],e,n)+"</li>");else{var _=b.match(/^(\s*)\d+\.\s+(.*)/);if(_)m(),d&&"ol"===p||(d&&r.push("ul"===p?"</ul>":"</ol>"),r.push("<ol>"),d=!0,p="ol"),r.push("<li>"+this.parseInline(_[2],e,n)+"</li>");else if(d&&""!==b.trim()&&(r.push("ul"===p?"</ul>":"</ol>"),d=!1),""!==b.trim())if(b.match(/^\|/)&&y+1<o.length&&o[y+1].match(/^\|[\s-:|]+\|/)){m(),d&&(r.push("ul"===p?"</ul>":"</ol>"),d=!1);var F="<table>",I=b.split("|").filter(function(t){return""!==t.trim()});F+="<thead><tr>";for(var L=0;L<I.length;L++)F+="<th>"+this.parseInline(I[L].trim(),e,n)+"</th>";for(F+="</tr></thead>",y++,F+="<tbody>";y+1<o.length&&o[y+1].match(/^\|/);){var M=o[++y].split("|").filter(function(t){return""!==t.trim()});F+="<tr>";for(var R=0;R<M.length;R++)F+="<td>"+this.parseInline(M[R].trim(),e,n)+"</td>";F+="</tr>"}F+="</tbody></table>",r.push(F)}else g.push(b);else m()}}}}else f?(r.push('<div class="pict-content-katex-display">'+v.join("\n")+"</div>"),f=!1,v=[]):(m(),d&&(r.push("ul"===p?"</ul>":"</ol>"),d=!1),u&&(r.push("<blockquote>"+this.parseMarkdown(h.join("\n"),e,n)+"</blockquote>"),u=!1,h=[]),f=!0)}if(m(),d&&r.push("ul"===p?"</ul>":"</ol>"),u&&r.push("<blockquote>"+this.parseMarkdown(h.join("\n"),e,n)+"</blockquote>"),a){var B=l.join("\n"),H=this.highlightCode(B,c),V=this.generateLineNumbers(B);r.push('<div class="pict-content-code-wrap"><div class="pict-content-code-line-numbers">'+V+"</div><pre><code>"+H+"</code></pre></div>")}return r.join("\n")}},{key:"parseInline",value:function(t,e,n){if(!t)return"";var i=t,o=[];return i=(i=(i=(i=(i=(i=(i=(i=(i=(i=i.replace(/`([^`]+)`/g,function(t,e){var n=o.length;return o.push("<code>"+e+"</code>"),"\0CODEINLINE"+n+"\0"})).replace(/\$([^\$\s][^\$]*?[^\$\s])\$/g,'<span class="pict-content-katex-inline">$1</span>')).replace(/\$([^\$\s])\$/g,'<span class="pict-content-katex-inline">$1</span>')).replace(/!\[([^\]]*)\]\(([^)]+)\)/g,function(t,e,i){var o=i;if("function"==typeof n){var r=n(i,e);r&&(o=r)}return'<img src="'+o+'" alt="'+e+'">'})).replace(/\[([^\]]+)\]\(([^)]+)\)/g,function(t,n,i){if("function"==typeof e){var o=e(i,n);if(o){var r=o.target?' target="'+o.target+'"':"",a=o.rel?' rel="'+o.rel+'"':"";return'<a href="'+o.href+'"'+r+a+">"+n+"</a>"}}return i.match(/^https?:\/\//)?'<a href="'+i+'" target="_blank" rel="noopener">'+n+"</a>":'<a href="'+i+'">'+n+"</a>"})).replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>")).replace(/__([^_]+)__/g,"<strong>$1</strong>")).replace(/\*([^*]+)\*/g,"<em>$1</em>")).replace(/_([^_]+)_/g,"<em>$1</em>")).replace(/\x00CODEINLINE(\d+)\x00/g,function(t,e){return o[parseInt(e)]})}},{key:"escapeHTML",value:function(t){return t?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}}])}(i);e.exports=r,e.exports.default_configuration={ProviderIdentifier:"Pict-Content",AutoInitialize:!0,AutoInitializeOrdinal:0}},{"pict-provider":58,"pict-section-code":61}],47:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"displayContent",value:function(t,e){var n=e||"Pict-Content-Body";this.pict.ContentAssignment.assignContent("#"+n,t);var i=document.getElementById(n);i&&i.parentElement&&(i.parentElement.scrollTop=0),this.renderMermaidDiagrams(n),this.renderKaTeXEquations(n)}},{key:"renderMermaidDiagrams",value:function(t){if("undefined"!=typeof mermaid){var e=t||"Pict-Content-Body",n=document.getElementById(e);if(n){var i=n.querySelectorAll("pre.mermaid");if(!(i.length<1))try{mermaid.run({nodes:i})}catch(t){this.log.error("Mermaid rendering error: "+t.message)}}}}},{key:"renderKaTeXEquations",value:function(t){if("undefined"!=typeof katex){var e=t||"Pict-Content-Body",n=document.getElementById(e);if(n){for(var i=n.querySelectorAll(".pict-content-katex-inline"),o=0;o<i.length;o++)try{katex.render(i[o].textContent,i[o],{throwOnError:!1,displayMode:!1})}catch(t){this.log.warn("KaTeX inline error: "+t.message)}for(var r=n.querySelectorAll(".pict-content-katex-display"),a=0;a<r.length;a++)try{katex.render(r[a].textContent,r[a],{throwOnError:!1,displayMode:!0})}catch(t){this.log.warn("KaTeX display error: "+t.message)}}}}},{key:"showLoading",value:function(t,e){var n=e||"Pict-Content-Body",i=t||"Loading content...";this.pict.ContentAssignment.assignContent("#"+n,'<div class="pict-content-loading">'+i+"</div>")}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Pict-Content",DefaultRenderable:"Pict-Content-Display",DefaultDestinationAddress:"#Pict-Content-Container",AutoRender:!1,CSS:"\n\t\t.pict-content {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.pict-content-loading {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 200px;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.pict-content h1 {\n\t\t\tfont-size: 2em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tpadding-bottom: 0.3em;\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.pict-content h2 {\n\t\t\tfont-size: 1.5em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\n\t\t\tpadding-bottom: 0.25em;\n\t\t\tmargin-top: 1.5em;\n\t\t}\n\t\t.pict-content h3 {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin-top: 1.25em;\n\t\t}\n\t\t.pict-content h4, .pict-content h5, .pict-content h6 {\n\t\t\tcolor: #5E5549;\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.pict-content p {\n\t\t\tline-height: 1.7;\n\t\t\tcolor: #423D37;\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.pict-content a {\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.pict-content a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.pict-content-code-wrap {\n\t\t\tposition: relative;\n\t\t\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1.5;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow: auto;\n\t\t\tmargin: 1em 0;\n\t\t\tbackground: #3D3229;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 40px;\n\t\t\tpadding: 1.25em 0;\n\t\t\ttext-align: right;\n\t\t\tbackground: #342A22;\n\t\t\tborder-right: 1px solid #4A3F35;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 13px;\n\t\t\tline-height: 1.5;\n\t\t\tuser-select: none;\n\t\t\tpointer-events: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers span {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0 8px 0 0;\n\t\t}\n\t\t.pict-content-code-wrap pre {\n\t\t\tmargin: 0;\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 1.25em 1.25em 1.25em 52px;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content-code-wrap pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.pict-content-code-wrap .keyword { color: #C678DD; }\n\t\t.pict-content-code-wrap .string { color: #98C379; }\n\t\t.pict-content-code-wrap .number { color: #D19A66; }\n\t\t.pict-content-code-wrap .comment { color: #7F848E; font-style: italic; }\n\t\t.pict-content-code-wrap .operator { color: #56B6C2; }\n\t\t.pict-content-code-wrap .punctuation { color: #E8E0D4; }\n\t\t.pict-content-code-wrap .function-name { color: #61AFEF; }\n\t\t.pict-content-code-wrap .property { color: #E06C75; }\n\t\t.pict-content-code-wrap .tag { color: #E06C75; }\n\t\t.pict-content-code-wrap .attr-name { color: #D19A66; }\n\t\t.pict-content-code-wrap .attr-value { color: #98C379; }\n\t\t.pict-content pre {\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 1.25em;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t.pict-content code {\n\t\t\tbackground: #F0ECE4;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #9E6B47;\n\t\t}\n\t\t.pict-content pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content blockquote {\n\t\t\tborder-left: 4px solid #2E7D74;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: #F7F5F0;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.pict-content blockquote p {\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-content ul, .pict-content ol {\n\t\t\tpadding-left: 2em;\n\t\t\tline-height: 1.8;\n\t\t}\n\t\t.pict-content li {\n\t\t\tmargin: 0.25em 0;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid #DDD6CA;\n\t\t\tmargin: 2em 0;\n\t\t}\n\t\t.pict-content table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content table th {\n\t\t\tbackground: #F5F0E8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.pict-content table td {\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content table tr:nth-child(even) {\n\t\t\tbackground: #F7F5F0;\n\t\t}\n\t\t.pict-content img {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\t\t.pict-content pre.mermaid {\n\t\t\tbackground: #fff;\n\t\t\tcolor: #3D3229;\n\t\t\ttext-align: center;\n\t\t\tpadding: 1em;\n\t\t}\n\t\t.pict-content .pict-content-katex-display {\n\t\t\ttext-align: center;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\t\t.pict-content .pict-content-katex-inline {\n\t\t\tdisplay: inline;\n\t\t}\n\t",Templates:[{Hash:"Pict-Content-Template",Template:'\n<div class="pict-content" id="Pict-Content-Body">\n\t<div class="pict-content-loading">Loading content...</div>\n</div>\n'}],Renderables:[{RenderableHash:"Pict-Content-Display",TemplateHash:"Pict-Content-Template",DestinationAddress:"#Pict-Content-Container",RenderMethod:"replace"}]}},{"pict-view":88}],48:[function(t,e,n){e.exports={Name:"Pict Docuserve",Hash:"Docuserve",MainViewportViewIdentifier:"Docuserve-Layout",AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!1,AutoRenderViewsAfterInitialize:!1,pict_configuration:{Product:"Docuserve-Pict-Application"}}},{}],49:[function(t,e,n){var i=t("pict-application"),o=t("./providers/Pict-Provider-Docuserve-Documentation.js"),r=t("./views/PictView-Docuserve-Layout.js"),a=t("./views/PictView-Docuserve-TopBar.js"),s=t("./views/PictView-Docuserve-Sidebar.js"),c=t("./views/PictView-Docuserve-Splash.js"),l=t("./views/PictView-Docuserve-Content.js"),d=t("./views/PictView-Docuserve-Search.js"),p=function(t){function e(t,n,i){var p;return _classCallCheck(this,e),(p=_callSuper(this,e,[t,n,i])).pict.addProvider("Docuserve-Documentation",o.default_configuration,o),p.pict.addView("Docuserve-Layout",r.default_configuration,r),p.pict.addView("Docuserve-TopBar",a.default_configuration,a),p.pict.addView("Docuserve-Sidebar",s.default_configuration,s),p.pict.addView("Docuserve-Splash",c.default_configuration,c),p.pict.addView("Docuserve-Content",l.default_configuration,l),p.pict.addView("Docuserve-Search",d.default_configuration,d),p}return _inherits(e,t),_createClass(e,[{key:"onAfterInitializeAsync",value:function(t){var n=this;this.pict.AppData.Docuserve={CatalogLoaded:!1,Catalog:null,CoverLoaded:!1,Cover:null,SidebarLoaded:!1,SidebarGroups:[],TopBarLoaded:!1,TopBar:null,ErrorPageLoaded:!1,ErrorPageHTML:null,KeywordIndexLoaded:!1,KeywordDocumentCount:0,CurrentGroup:"",CurrentModule:"",CurrentPath:"",SidebarVisible:!0,DocsBaseURL:"",CatalogURL:"retold-catalog.json"},this.pict.providers["Docuserve-Documentation"].loadCatalog(function(){var i=n.pict.AppData.Docuserve;return i.CoverLoaded&&i.Cover&&i.Cover.Title?document.title=i.Cover.Title.replace(/<[^>]*>/g,""):i.TopBarLoaded&&i.TopBar&&i.TopBar.Brand&&(document.title=i.TopBar.Brand.replace(/<[^>]*>/g,"")),n.pict.views["Docuserve-Layout"].render(),_superPropGet(e,"onAfterInitializeAsync",n,3)([t])})}},{key:"resolveHash",value:function(){var t=(window.location.hash||"").replace(/^#\/?/,"");if(t&&"Home"!==t){var e=t.split("/");if("search"!==e[0])if("page"===e[0]&&e.length>=2){var n=e.slice(1).join("/");this.navigateToPage(n)}else if("doc"===e[0]&&e.length>=3){var i=e[1],o=e[2];if(e.length>=4){var r=e.slice(3).join("/");this.navigateToModulePath(i,o,r)}else this.navigateToModule(i,o)}else this.navigateToPage(t);else{var a=decodeURIComponent(e.slice(1).join("/"));this.navigateToSearch(a)}}else this.showView("Docuserve-Splash")}},{key:"navigateTo",value:function(t){window.location.hash=t}},{key:"showView",value:function(t){t in this.pict.views&&(this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath="",this.pict.views[t].render(),this.pict.views["Docuserve-Sidebar"].clearModuleNav(),this.pict.views["Docuserve-Sidebar"].renderSidebarGroups())}},{key:"navigateToModule",value:function(t,e){this.navigateToModulePath(t,e,"README.md")}},{key:"navigateToModulePath",value:function(t,e,n){var i=this.pict.providers["Docuserve-Documentation"],o=this.pict.views["Docuserve-Content"],r=this.pict.views["Docuserve-Sidebar"];this.pict.AppData.Docuserve.CurrentGroup=t,this.pict.AppData.Docuserve.CurrentModule=e,this.pict.AppData.Docuserve.CurrentPath=n,o.render(),o.showLoading(),r.renderSidebarGroups(),r.renderModuleNav(t,e);var a=i.resolveDocumentURL(t,e,n||"README.md");if(a){var s=n||"README.md";i.fetchDocument(a,function(n,r){if(n){var a=t+"/"+e+"/"+s;i.fetchLocalDocument(a,function(t,e){o.displayContent(e)},t,e,s)}else o.displayContent(r)},t,e,s)}else o.displayContent(i.getErrorPageHTML(t+"/"+e))}},{key:"navigateToPage",value:function(t){var e=this.pict.providers["Docuserve-Documentation"],n=this.pict.views["Docuserve-Content"],i=this.pict.views["Docuserve-Sidebar"];this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath=t,n.render(),n.showLoading(),i.clearModuleNav(),i.renderSidebarGroups();var o=t;o.match(/\.md$/)||(o+=".md"),e.fetchLocalDocument(o,function(t,e){n.displayContent(e)})}},{key:"navigateToSearch",value:function(t){var e=this.pict.views["Docuserve-Sidebar"],n=this.pict.views["Docuserve-Search"];this.pict.AppData.Docuserve.CurrentGroup="",this.pict.AppData.Docuserve.CurrentModule="",this.pict.AppData.Docuserve.CurrentPath="",e.clearModuleNav(),e.renderSidebarGroups(),n.render(),n.showSearch(t||"")}}])}(i);e.exports=p,e.exports.default_configuration=t("./Pict-Application-Docuserve-Configuration.json")},{"./Pict-Application-Docuserve-Configuration.json":48,"./providers/Pict-Provider-Docuserve-Documentation.js":50,"./views/PictView-Docuserve-Content.js":51,"./views/PictView-Docuserve-Layout.js":52,"./views/PictView-Docuserve-Search.js":53,"./views/PictView-Docuserve-Sidebar.js":54,"./views/PictView-Docuserve-Splash.js":55,"./views/PictView-Docuserve-TopBar.js":56,"pict-application":44}],50:[function(t,e,n){var i=t("pict-provider"),o=t("lunr"),r=t("pict-section-content").PictContentProvider,a=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._Catalog=null,o._ContentCache={},o._ContentProvider=o.pict.addProvider("Pict-Content",r.default_configuration,r),o}return _inherits(e,t),_createClass(e,[{key:"_createLinkResolver",value:function(t,e,n){var i=this;return function(o,r){if(o.match(/^\//)||o.match(/^[^:]+\.md/))return{href:i.convertDocLink(o,t,e,n)};var a=i.resolveGitHubURLToRoute(o);return a?{href:a}:null}}},{key:"_createImageResolver",value:function(t){var e="";if(t){var n=t.lastIndexOf("/");n>=0&&(e=t.substring(0,n+1))}return function(t,n){return t.match(/^https?:\/\//)||t.match(/^data:/)||t.match(/^\//)?t:e+t}}},{key:"loadCatalog",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.CatalogURL||"retold-catalog.json",o=function(){var t=5,i=function(){if(--t<=0){if(e.pict.AppData.Docuserve.SidebarGroups&&!(e.pict.AppData.Docuserve.SidebarGroups.length<1))return n();e.autoDiscoverSidebar(n)}};e.loadCover(i),e.loadSidebar(i),e.loadTopbar(i),e.loadErrorPage(i),e.loadKeywordIndex(i)};fetch(i).then(function(t){return t.ok?t.json():(e.log.info("Docuserve: No catalog at [".concat(i,"]; running in standalone mode.")),null)}).then(function(t){t&&(e._Catalog=t,e.pict.AppData.Docuserve.Catalog=t,e.pict.AppData.Docuserve.CatalogLoaded=!0,e.buildSidebarData(t)),o()}).catch(function(t){e.log.info("Docuserve: Catalog load error (".concat(t,"); continuing in standalone mode.")),o()})}},{key:"autoDiscoverSidebar",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"README.md").then(function(t){return t.ok?t.text():null}).then(function(t){if(t){var i=t.match(/^#+\s+(.+)/m),o=i?i[1].trim():"Docs";e.pict.AppData.Docuserve.SidebarGroups=[{Name:o,Key:"docs",Route:"#/page/README",Modules:[]}],e.pict.AppData.Docuserve.CoverLoaded||(e.pict.AppData.Docuserve.Cover={Title:o,Tagline:"",Description:"",Highlights:[],Actions:[{Text:"Read the Docs",Href:"README.md"}]},e.pict.AppData.Docuserve.CoverLoaded=!0)}else e.log.info("Docuserve: No README.md found; sidebar will be empty.");return n()}).catch(function(t){return e.log.info("Docuserve: README.md discovery failed (".concat(t,").")),n()})}},{key:"loadCover",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"_cover.md").then(function(t){return t.ok?t.text():null}).then(function(t){return t?(e.pict.AppData.Docuserve.Cover=e.parseCover(t),e.pict.AppData.Docuserve.CoverLoaded=!0,n()):(e.log.info("Docuserve: No _cover.md found; splash will use catalog data."),n())}).catch(function(t){return e.log.warn("Docuserve: Error loading _cover.md: ".concat(t)),n()})}},{key:"parseCover",value:function(t){for(var e={Title:"",Tagline:"",Description:"",Highlights:[],Actions:[]},n=t.split("\n"),i=0;i<n.length;i++){var o=n[i].trim();if(o){var r=o.match(/^#+\s+(.+)/);if(r)e.Title=r[1].trim();else{var a=o.match(/^>\s*(.*)/);if(a)e.Tagline=a[1].trim();else{var s=o.match(/^[-*+]\s+(.*)/);if(s){var c=s[1],l=c.match(/^\*\*([^*]+)\*\*\s*[-—:]\s*(.*)/);l?e.Highlights.push({Label:l[1].trim(),Text:l[2].trim()}):e.Highlights.push({Label:"",Text:c.trim()})}else{var d=o.match(/^\[([^\]]+)\]\(([^)]+)\)\s*$/);d?e.Actions.push({Text:d[1].trim(),Href:d[2].trim()}):e.Description?e.Description+=" "+o:e.Description=o}}}}}return e}},{key:"loadSidebar",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"_sidebar.md").then(function(t){return t.ok?t.text():null}).then(function(t){if(!t)return e.log.info("Docuserve: No _sidebar.md found; sidebar will use catalog data."),n();var i=e.parseSidebarMarkdown(t);return i&&i.length>0&&(e.pict.AppData.Docuserve.SidebarGroups=i,e.pict.AppData.Docuserve.SidebarLoaded=!0),n()}).catch(function(t){return e.log.warn("Docuserve: Error loading _sidebar.md: ".concat(t)),n()})}},{key:"loadTopbar",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"_topbar.md").then(function(t){return t.ok?t.text():null}).then(function(t){return t?(e.pict.AppData.Docuserve.TopBar=e.parseTopbar(t),e.pict.AppData.Docuserve.TopBarLoaded=!0,n()):(e.log.info("Docuserve: No _topbar.md found; top bar will use defaults."),n())}).catch(function(t){return e.log.warn("Docuserve: Error loading _topbar.md: ".concat(t)),n()})}},{key:"parseTopbar",value:function(t){for(var e={Brand:"",NavLinks:[],ExternalLinks:[]},n=t.split("\n"),i=0;i<n.length;i++){var o=n[i].trim();if(o){var r=o.match(/^#+\s+(.+)/);if(r)e.Brand=r[1].trim();else{var a=o.match(/^[-*+]\s+(.*)/);if(a){var s=a[1].trim().match(/^\[([^\]]+)\]\(([^)]+)\)/);if(s){var c=s[1].trim(),l=s[2].trim();if(l.match(/^https?:\/\//))e.ExternalLinks.push({Text:c,Href:l});else{var d=this.convertSidebarLink(l);e.NavLinks.push({Text:c,Href:d})}}}else;}}}return e}},{key:"loadErrorPage",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"errorpage.md").then(function(t){return t.ok?t.text():null}).then(function(t){return t?(e.pict.AppData.Docuserve.ErrorPageHTML=e._ContentProvider.parseMarkdown(t),e.pict.AppData.Docuserve.ErrorPageLoaded=!0,n()):(e.log.info("Docuserve: No errorpage.md found; errors will use default page."),n())}).catch(function(t){return e.log.warn("Docuserve: Error loading errorpage.md: ".concat(t)),n()})}},{key:"loadKeywordIndex",value:function(t){var e=this,n="function"==typeof t?t:function(){},i=this.pict.AppData.Docuserve.DocsBaseURL||"";fetch(i+"retold-keyword-index.json").then(function(t){return t.ok?t.json():null}).then(function(t){if(!t||!t.LunrIndex||!t.Documents)return e.log.info("Docuserve: No keyword index found; search will be unavailable."),n();try{e._LunrIndex=o.Index.load(t.LunrIndex),e._KeywordDocuments=t.Documents,e.pict.AppData.Docuserve.KeywordIndexLoaded=!0,e.pict.AppData.Docuserve.KeywordDocumentCount=t.DocumentCount||0,e.log.info("Docuserve: Keyword index loaded (".concat(t.DocumentCount||0," documents)."))}catch(t){e.log.warn("Docuserve: Error hydrating lunr index: ".concat(t))}return n()}).catch(function(t){return e.log.warn("Docuserve: Error loading keyword index: ".concat(t)),n()})}},{key:"isModuleInCatalog",value:function(t,e){if(!this._Catalog||!this._Catalog.Groups)return!1;for(var n=0;n<this._Catalog.Groups.length;n++){var i=this._Catalog.Groups[n];if(i.Key===t)for(var o=0;o<i.Modules.length;o++){if(i.Modules[o].Name===e)return!0}}return!1}},{key:"findModuleGroupKey",value:function(t){if(!this._Catalog||!this._Catalog.Groups)return null;for(var e=0;e<this._Catalog.Groups.length;e++)for(var n=this._Catalog.Groups[e],i=0;i<n.Modules.length;i++)if(n.Modules[i].Name===t)return n.Key;return null}},{key:"isGroupInCatalog",value:function(t){if(!this._Catalog||!this._Catalog.Groups)return!1;for(var e=0;e<this._Catalog.Groups.length;e++)if(this._Catalog.Groups[e].Key===t)return!0;return!1}},{key:"search",value:function(t){if(!(this._LunrIndex&&this._KeywordDocuments&&t&&t.trim()))return[];var e=[];try{for(var n=this._LunrIndex.search(t),i=0;i<n.length;i++){var o=n[i].ref,r=n[i].score,a=this._KeywordDocuments[o];if(a){var s=o.split("/"),c="";if(s.length>=2){var l=s[0],d=s[1];c=this.isModuleInCatalog(l,d)?"#/doc/"+o:"#/page/"+o}e.push({Key:o,Title:a.Title||o,Group:a.Group||"",Module:a.Module||"",DocPath:a.DocPath||"",Score:r,Route:c})}}}catch(t){this.log.warn("Docuserve: Search error: ".concat(t))}return e}},{key:"getErrorPageHTML",value:function(t){var e=t||"unknown";return this.pict.AppData.Docuserve.ErrorPageLoaded&&this.pict.AppData.Docuserve.ErrorPageHTML?this.pict.AppData.Docuserve.ErrorPageHTML.replace(/\{\{path\}\}/g,this._ContentProvider.escapeHTML(e)):'<div class="docuserve-not-found"><h2>Page Not Found</h2><p>The document <code>'+this._ContentProvider.escapeHTML(e)+'</code> could not be loaded.</p><p><a href="#/Home">Return to the home page</a></p></div>'}},{key:"parseSidebarMarkdown",value:function(t){for(var e=[],n=null,i=t.split("\n"),o=0;o<i.length;o++){var r=i[o];if(r.trim()){var a=r.match(/^(\s*)/),s=a?a[1].length:0,c=r.trim().match(/^[-*+]\s+(.*)/);if(c){var l=c[1].trim(),d=l.match(/^\[([^\]]+)\]\(([^)]+)\)/);if(s<2)if(d){var p=d[1].trim(),u=d[2].trim();n={Name:p,Key:this.deriveGroupKey(p,u),Route:this.convertSidebarLink(u),Modules:[]},e.push(n)}else{var h=l,f=h.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");n={Name:h,Key:f,Route:"",Modules:[]},e.push(n)}else if(n)if(d){var v=d[1].trim(),g=d[2].trim(),m=this.convertSidebarLink(g);n.Modules.push({Name:v,HasDocs:!0,Group:n.Key,Route:m})}else n.Modules.push({Name:l,HasDocs:!1,Group:n.Key,Route:""})}}}return e}},{key:"convertSidebarLink",value:function(t){if(!t)return"";if("/"===t)return"#/Home";if(t.match(/^#[^/]/)){var e=this.pict.AppData.Docuserve.SidebarGroups;if(e)for(var n=0;n<e.length;n++){var i=e[n].Modules;if(i)for(var o=0;o<i.length;o++)if(i[o].HasDocs&&i[o].Route&&"#/Home"!==i[o].Route)return i[o].Route;if(e[n].Route&&"#/Home"!==e[n].Route)return e[n].Route}return"#/Home"}var r=t.replace(/^\//,"").replace(/\/$/,"");if(!r)return"#/Home";var a=r.split("/");if(a.length>=2){if(this.isGroupInCatalog(a[0])&&this.isModuleInCatalog(a[0],a[1]))return"#/doc/"+r;var s=this.findModuleGroupKey(a[1]);if(s){var c=a.slice(2).join("/");return c?"#/doc/"+s+"/"+a[1]+"/"+c:"#/doc/"+s+"/"+a[1]}}return r.match(/\.md$/)?"#/page/"+r.replace(/\.md$/,""):"#/page/"+r}},{key:"deriveGroupKey",value:function(t,e){if(e&&"/"!==e){var n=e.replace(/^\//,"").replace(/\.md$/,"").replace(/\/$/,"");if(n&&!n.includes("/"))return n.toLowerCase()}return t.split(/[\s—\-:]+/)[0].toLowerCase().replace(/[^a-z0-9]/g,"")}},{key:"buildSidebarData",value:function(t){for(var e=[],n=0;n<t.Groups.length;n++){for(var i=t.Groups[n],o={Name:i.Name,Key:i.Key,Description:i.Description,Modules:[]},r=0;r<i.Modules.length;r++){var a=i.Modules[r];o.Modules.push({Name:a.Name,HasDocs:a.HasDocs,Group:i.Key,Route:"#/doc/"+i.Key+"/"+a.Name})}e.push(o)}this.pict.AppData.Docuserve.SidebarGroups=e}},{key:"resolveDocumentURL",value:function(t,e,n){if(!this._Catalog)return null;for(var i=this._Catalog.GitHubOrg||"stevenvelozo",o=this._Catalog.DefaultBranch||"master",r=0;r<this._Catalog.Groups.length;r++){var a=this._Catalog.Groups[r];if(a.Key===t)for(var s=0;s<a.Modules.length;s++){var c=a.Modules[s];if(c.Name===e){var l=c.Branch||o,d=n||"README.md";return"https://raw.githubusercontent.com/"+i+"/"+c.Repo+"/"+l+"/docs/"+d}}}return null}},{key:"resolveGitHubURLToRoute",value:function(t){if(!this._Catalog||!this._Catalog.Groups||!t)return null;var e=t.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)/);if(!e)return null;var n=e[1],i=e[2];if(n!==this._Catalog.GitHubOrg)return null;for(var o=0;o<this._Catalog.Groups.length;o++)for(var r=this._Catalog.Groups[o],a=0;a<r.Modules.length;a++){var s=r.Modules[a];if(s.Repo===i)return"#/doc/"+r.Key+"/"+s.Name}return null}},{key:"resolveGitHubPagesURL",value:function(t,e){if(!this._Catalog||!this._Catalog.Groups)return null;for(var n=this._Catalog.GitHubOrg||"stevenvelozo",i=0;i<this._Catalog.Groups.length;i++){var o=this._Catalog.Groups[i];if(o.Key===t)for(var r=0;r<o.Modules.length;r++){var a=o.Modules[r];if(a.Name===e)return a.HasDocs?"https://"+n+".github.io/"+a.Repo+"/":null}}return null}},{key:"getModuleSidebar",value:function(t,e){if(!this._Catalog)return null;for(var n=0;n<this._Catalog.Groups.length;n++){var i=this._Catalog.Groups[n];if(i.Key===t)for(var o=0;o<i.Modules.length;o++){var r=i.Modules[o];if(r.Name===e)return r.Sidebar||null}}return null}},{key:"fetchDocument",value:function(t,e,n,i,o){var r=this,a="function"==typeof e?e:function(){};return t?this._ContentCache[t]?a(null,this._ContentCache[t]):void fetch(t).then(function(t){return t.ok?t.text():null}).then(function(e){if(!e)return a("Document not found",r.getErrorPageHTML(t));var s=r._ContentProvider.parseMarkdown(e,r._createLinkResolver(n,i,o),r._createImageResolver(t));return r._ContentCache[t]=s,a(null,s)}).catch(function(e){return r.log.warn("Docuserve: Error fetching document [".concat(t,"]: ").concat(e)),a(e,r.getErrorPageHTML(t))}):a("No URL provided","")}},{key:"fetchLocalDocument",value:function(t,e,n,i,o){var r=(this.pict.AppData.Docuserve.DocsBaseURL||"")+t;this.fetchDocument(r,e,n,i,o)}},{key:"convertDocLink",value:function(t,e,n,i){var o=t.replace(/^\.\//,""),r=(o=o.replace(/^\//,"")).split("/");if(r.length>=2&&this.isGroupInCatalog(r[0])&&this.isModuleInCatalog(r[0],r[1]))return"#/doc/"+o;if(e&&n){var a="";if(i){var s=i.split("/");s.length>1&&(s.pop(),a=s.join("/")+"/")}return"#/doc/"+e+"/"+n+"/"+a+o}return o.match(/\.md$/)?"#/page/"+o.replace(/\.md$/,""):"#/page/"+o}}])}(i);e.exports=a,e.exports.default_configuration={ProviderIdentifier:"Docuserve-Documentation",AutoInitialize:!0,AutoInitializeOrdinal:0}},{lunr:32,"pict-provider":58,"pict-section-content":45}],51:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"displayContent",value:function(t){var n=t,i=this.pict.AppData.Docuserve.CurrentGroup,o=this.pict.AppData.Docuserve.CurrentModule;if(i&&o){var r=this.pict.providers["Docuserve-Documentation"];if(r){var a=r.resolveGitHubPagesURL(i,o);a&&(n='<div class="docuserve-module-external-link"><a href="'+a+'" target="_blank" rel="noopener">↗ View '+o+" documentation site</a></div>"+n)}}_superPropGet(e,"displayContent",this,3)([n,"Docuserve-Content-Body"])}},{key:"showLoading",value:function(){_superPropGet(e,"showLoading",this,3)(["Loading documentation...","Docuserve-Content-Body"])}}])}(t("pict-section-content"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-Content",DefaultRenderable:"Docuserve-Content-Display",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.pict-content {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.pict-content-loading {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 200px;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.pict-content h1 {\n\t\t\tfont-size: 2em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tpadding-bottom: 0.3em;\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.pict-content h2 {\n\t\t\tfont-size: 1.5em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\n\t\t\tpadding-bottom: 0.25em;\n\t\t\tmargin-top: 1.5em;\n\t\t}\n\t\t.pict-content h3 {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin-top: 1.25em;\n\t\t}\n\t\t.pict-content h4, .pict-content h5, .pict-content h6 {\n\t\t\tcolor: #5E5549;\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.pict-content p {\n\t\t\tline-height: 1.7;\n\t\t\tcolor: #423D37;\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.pict-content a {\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.pict-content a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.pict-content pre {\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 1.25em;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t.pict-content code {\n\t\t\tbackground: #F0ECE4;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #9E6B47;\n\t\t}\n\t\t.pict-content pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content-code-wrap {\n\t\t\tposition: relative;\n\t\t\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1.5;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow: auto;\n\t\t\tmargin: 1em 0;\n\t\t\tbackground: #3D3229;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers {\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\twidth: 40px;\n\t\t\tpadding: 1.25em 0;\n\t\t\ttext-align: right;\n\t\t\tbackground: #342A22;\n\t\t\tborder-right: 1px solid #4A3F35;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 13px;\n\t\t\tline-height: 1.5;\n\t\t\tuser-select: none;\n\t\t\tpointer-events: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers span {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0 8px 0 0;\n\t\t}\n\t\t.pict-content-code-wrap pre {\n\t\t\tmargin: 0;\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 1.25em 1.25em 1.25em 52px;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content-code-wrap pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.pict-content-code-wrap .keyword { color: #C678DD; }\n\t\t.pict-content-code-wrap .string { color: #98C379; }\n\t\t.pict-content-code-wrap .number { color: #D19A66; }\n\t\t.pict-content-code-wrap .comment { color: #7F848E; font-style: italic; }\n\t\t.pict-content-code-wrap .operator { color: #56B6C2; }\n\t\t.pict-content-code-wrap .punctuation { color: #E8E0D4; }\n\t\t.pict-content-code-wrap .function-name { color: #61AFEF; }\n\t\t.pict-content-code-wrap .property { color: #E06C75; }\n\t\t.pict-content-code-wrap .tag { color: #E06C75; }\n\t\t.pict-content-code-wrap .attr-name { color: #D19A66; }\n\t\t.pict-content-code-wrap .attr-value { color: #98C379; }\n\t\t.pict-content blockquote {\n\t\t\tborder-left: 4px solid #2E7D74;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: #F7F5F0;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.pict-content blockquote p {\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-content ul, .pict-content ol {\n\t\t\tpadding-left: 2em;\n\t\t\tline-height: 1.8;\n\t\t}\n\t\t.pict-content li {\n\t\t\tmargin: 0.25em 0;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid #DDD6CA;\n\t\t\tmargin: 2em 0;\n\t\t}\n\t\t.pict-content table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content table th {\n\t\t\tbackground: #F5F0E8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.pict-content table td {\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content table tr:nth-child(even) {\n\t\t\tbackground: #F7F5F0;\n\t\t}\n\t\t.pict-content img {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\t\t.pict-content pre.mermaid {\n\t\t\tbackground: #fff;\n\t\t\tcolor: #3D3229;\n\t\t\ttext-align: center;\n\t\t\tpadding: 1em;\n\t\t}\n\t\t.pict-content .pict-content-katex-display {\n\t\t\ttext-align: center;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\t\t.pict-content .pict-content-katex-inline {\n\t\t\tdisplay: inline;\n\t\t}\n\t\t.docuserve-module-external-link {\n\t\t\tpadding: 0.5em 0;\n\t\t\tmargin-bottom: 0.5em;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\n\t\t\tfont-size: 0.85em;\n\t\t\ttext-align: right;\n\t\t}\n\t\t.docuserve-module-external-link a {\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.docuserve-module-external-link a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-not-found {\n\t\t\ttext-align: center;\n\t\t\tpadding: 3em 1em;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.docuserve-not-found h2 {\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1.5em;\n\t\t\tborder-bottom: none;\n\t\t}\n\t\t.docuserve-not-found code {\n\t\t\tbackground: #F0ECE4;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #9E6B47;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Content-Template",Template:'\n<div class="pict-content" id="Docuserve-Content-Body">\n\t<div class="pict-content-loading">Loading documentation...</div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Content-Display",TemplateHash:"Docuserve-Content-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-section-content":45}],52:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){if(this.pict.views["Docuserve-TopBar"].render(),this.pict.views["Docuserve-Sidebar"].render(),this.pict.views["Docuserve-Splash"].render(),this.pict.CSSMap.injectCSS(),this.pict.PictApplication.resolveHash(),!this._HashChangeListenerBound){this._HashChangeListenerBound=!0;var r=this;window.addEventListener("hashchange",function(){r.pict.PictApplication.resolveHash()})}return _superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-Layout",DefaultRenderable:"Docuserve-Layout-Shell",DefaultDestinationAddress:"#Docuserve-Application-Container",AutoRender:!1,CSS:"\n\t\t#Docuserve-Application-Container {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100vh;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t#Docuserve-TopBar-Container {\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.docuserve-body {\n\t\t\tdisplay: flex;\n\t\t\tflex: 1;\n\t\t\tmin-height: 0;\n\t\t}\n\t\t#Docuserve-Sidebar-Container {\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 280px;\n\t\t\toverflow-y: auto;\n\t\t\tbackground-color: #F5F0E8;\n\t\t}\n\t\t#Docuserve-Content-Container {\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t\toverflow-y: auto;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Layout-Shell-Template",Template:'\n<div id="Docuserve-TopBar-Container"></div>\n<div class="docuserve-body">\n\t<div id="Docuserve-Sidebar-Container"></div>\n\t<div id="Docuserve-Content-Container"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Layout-Shell",TemplateHash:"Docuserve-Layout-Shell-Template",DestinationAddress:"#Docuserve-Application-Container",RenderMethod:"replace"}]}},{"pict-view":88}],53:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._SearchDebounceTimer=null,o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){var r=this,a=document.getElementById("Docuserve-Search-Input");return a&&a.addEventListener("input",function(){r._SearchDebounceTimer&&clearTimeout(r._SearchDebounceTimer),r._SearchDebounceTimer=setTimeout(function(){r.performSearch(a.value)},250)}),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"showSearch",value:function(t){var e=document.getElementById("Docuserve-Search-Input");if(e&&(e.value=t||"",e.focus()),t&&t.trim())this.performSearch(t);else{var n=this.pict.AppData.Docuserve.KeywordDocumentCount||0,i=n>0?"Search across "+n+" documents.":"Enter a search term to find documentation.";this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status",i),this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results","")}var o=document.getElementById("Docuserve-Content-Container");o&&(o.scrollTop=0)}},{key:"performSearch",value:function(t){if(!t||!t.trim()){var e=this.pict.AppData.Docuserve.KeywordDocumentCount||0,n=e>0?"Search across "+e+" documents.":"Enter a search term to find documentation.";return this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status",n),void this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results","")}var i=this.pict.providers["Docuserve-Documentation"].search(t);if(0===i.length)return this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status","No results found for '"+this.escapeHTML(t)+"'."),void this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results","");this.pict.ContentAssignment.assignContent("#Docuserve-Search-Status",i.length+" result"+(1!==i.length?"s":"")+" for '"+this.escapeHTML(t)+"'");for(var o="",r=0;r<i.length;r++){var a=i[r],s="";a.Group&&a.Module&&(s=a.Group+" › "+a.Module),o+='<a class="docuserve-search-result" href="'+a.Route+'">',o+='<div class="docuserve-search-result-title">'+this.escapeHTML(a.Title)+"</div>",s&&(o+='<div class="docuserve-search-result-breadcrumb">'+s+"</div>"),a.DocPath&&(o+='<div class="docuserve-search-result-path">'+this.escapeHTML(a.DocPath)+"</div>"),o+="</a>"}this.pict.ContentAssignment.assignContent("#Docuserve-Search-Results",o)}},{key:"escapeHTML",value:function(t){return t?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-Search",DefaultRenderable:"Docuserve-Search-Display",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-search {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.docuserve-search-header {\n\t\t\tmargin-bottom: 1.5em;\n\t\t}\n\t\t.docuserve-search-header h1 {\n\t\t\tfont-size: 1.75em;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin: 0 0 0.75em 0;\n\t\t}\n\t\t.docuserve-search-input {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.75em 1em;\n\t\t\tfont-size: 1.1em;\n\t\t\tborder: 2px solid #D4CCBE;\n\t\t\tborder-radius: 6px;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t\ttransition: border-color 0.15s;\n\t\t}\n\t\t.docuserve-search-input:focus {\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.docuserve-search-status {\n\t\t\tmargin-top: 0.75em;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #8A7F72;\n\t\t}\n\t\t.docuserve-search-results {\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.docuserve-search-result {\n\t\t\tdisplay: block;\n\t\t\tpadding: 1em 1.25em;\n\t\t\tmargin-bottom: 0.5em;\n\t\t\tborder: 1px solid #EAE3D8;\n\t\t\tborder-radius: 6px;\n\t\t\ttext-decoration: none;\n\t\t\tcolor: inherit;\n\t\t\ttransition: border-color 0.15s, box-shadow 0.15s;\n\t\t}\n\t\t.docuserve-search-result:hover {\n\t\t\tborder-color: #2E7D74;\n\t\t\tbox-shadow: 0 2px 8px rgba(46, 125, 116, 0.1);\n\t\t}\n\t\t.docuserve-search-result-title {\n\t\t\tfont-size: 1.05em;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #2E7D74;\n\t\t\tmargin-bottom: 0.25em;\n\t\t}\n\t\t.docuserve-search-result-breadcrumb {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-bottom: 0.2em;\n\t\t}\n\t\t.docuserve-search-result-path {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: #A39889;\n\t\t\tfont-family: monospace;\n\t\t}\n\t\t.docuserve-search-empty {\n\t\t\ttext-align: center;\n\t\t\tpadding: 3em 1em;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1em;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Search-Template",Template:'\n<div class="docuserve-search">\n\t<div class="docuserve-search-header">\n\t\t<h1>Search Documentation</h1>\n\t\t<input type="text" class="docuserve-search-input" id="Docuserve-Search-Input" placeholder="Search across all modules...">\n\t\t<div id="Docuserve-Search-Status" class="docuserve-search-status"></div>\n\t</div>\n\t<div id="Docuserve-Search-Results" class="docuserve-search-results"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Search-Display",TemplateHash:"Docuserve-Search-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":88}],54:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._SidebarSearchDebounceTimer=null,o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){var r=this;this.renderSidebarGroups();var a=document.getElementById("Docuserve-Sidebar-Search");if(a&&this.pict.AppData.Docuserve.KeywordIndexLoaded){a.style.display="";var s=document.getElementById("Docuserve-Sidebar-Search-Input");s&&s.addEventListener("input",function(){r._SidebarSearchDebounceTimer&&clearTimeout(r._SidebarSearchDebounceTimer),r._SidebarSearchDebounceTimer=setTimeout(function(){r.performSidebarSearch(s.value)},250)})}return _superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"renderSidebarGroups",value:function(){var t=this.pict.AppData.Docuserve.SidebarGroups;if(!t||t.length<1)this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-Groups","");else{for(var e="",n=0;n<t.length;n++){var i=t[n];e+='<div class="docuserve-sidebar-group">';var o=i.Route||"";if(!o)for(var r=0;r<i.Modules.length;r++)if(i.Modules[r].HasDocs&&i.Modules[r].Route){o=i.Modules[r].Route;break}if(o){var a="",s=window.location.hash||"";this.pict.AppData.Docuserve.CurrentGroup!==i.Key&&s!==o||(a=" active"),e+='<a class="docuserve-sidebar-group-title'+a+'" href="'+o+'">'+this.escapeHTML(i.Name)+"</a>"}else e+='<div class="docuserve-sidebar-group-title">'+this.escapeHTML(i.Name)+"</div>";e+='<ul class="docuserve-sidebar-modules">';for(var c=0;c<i.Modules.length;c++){var l=i.Modules[c];if(l.HasDocs){var d="";this.pict.AppData.Docuserve.CurrentGroup===l.Group&&this.pict.AppData.Docuserve.CurrentModule===l.Name&&(d=' class="active"'),e+="<li><a"+d+' href="'+l.Route+'">'+this.escapeHTML(l.Name)+"</a></li>"}else e+='<li><span class="no-docs">'+this.escapeHTML(l.Name)+"</span></li>"}e+="</ul>",e+="</div>"}this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-Groups",e)}}},{key:"renderModuleNav",value:function(t,e){var n=this.pict.providers["Docuserve-Documentation"];if(n){var i=n.getModuleSidebar(t,e);if(i){for(var o="#/doc/"+t+"/"+e+"/",r='<div class="docuserve-sidebar-module-nav">',a=0;a<i.length;a++){var s=i[a];if(s.Children){r+='<div class="docuserve-sidebar-module-nav-section">'+this.escapeHTML(s.Title)+"</div>";for(var c=0;c<s.Children.length;c++){var l=s.Children[c];l.Path&&(r+='<a href="'+o+l.Path+'">'+this.escapeHTML(l.Title)+"</a>")}}else s.Path&&(r+='<a href="'+o+s.Path+'">'+this.escapeHTML(s.Title)+"</a>")}r+="</div>",this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-ModuleNav",r)}else this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-ModuleNav","")}}},{key:"performSidebarSearch",value:function(t){var e=document.getElementById("Docuserve-Sidebar-Search-Results");if(e)if(t&&t.trim()){var n=this.pict.providers["Docuserve-Documentation"].search(t);if(0!==n.length){for(var i="",o=0;o<n.length&&o<8;o++){var r=n[o],a="";r.Group&&r.Module&&(a=r.Group+" / "+r.Module),i+='<a href="'+r.Route+'">',i+='<div class="docuserve-sidebar-search-result-title">'+this.escapeHTML(r.Title)+"</div>",a&&(i+='<div class="docuserve-sidebar-search-result-meta">'+this.escapeHTML(a)+"</div>"),i+="</a>"}if(n.length>8)i+='<a class="docuserve-sidebar-search-all" href="#/search/'+encodeURIComponent(t)+'">See all '+n.length+" results</a>";e.innerHTML=i}else e.innerHTML='<div style="padding: 0.4em 0.5em; font-size: 0.82em; color: #8A7F72;">No results found.</div>'}else e.innerHTML=""}},{key:"toggleSidebar",value:function(){this.pict.AppData.Docuserve.SidebarVisible=!this.pict.AppData.Docuserve.SidebarVisible;var t=document.getElementById("Docuserve-Sidebar-Container"),e=document.getElementById("Docuserve-TopBar-Toggle");this.pict.AppData.Docuserve.SidebarVisible?(t&&(t.style.display=""),e&&(e.style.display="none")):(t&&(t.style.display="none"),e&&(e.style.display="inline-block"))}},{key:"clearModuleNav",value:function(){this.pict.ContentAssignment.assignContent("#Docuserve-Sidebar-ModuleNav","")}},{key:"escapeHTML",value:function(t){return t?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):""}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-Sidebar",DefaultRenderable:"Docuserve-Sidebar-Content",DefaultDestinationAddress:"#Docuserve-Sidebar-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-sidebar {\n\t\t\tborder-right: 1px solid #DDD6CA;\n\t\t\tpadding: 1em 0;\n\t\t\tpadding-top: 0;\n\t\t\tmin-height: 100%;\n\t\t\tposition: relative;\n\t\t}\n\t\t.docuserve-sidebar-header {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: flex-end;\n\t\t\tpadding: 0.4em 0.5em 0;\n\t\t}\n\t\t.docuserve-sidebar-close {\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1.2em;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0.2em 0.4em;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.docuserve-sidebar-close:hover {\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-search {\n\t\t\tpadding: 0 1em 1em 1em;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\n\t\t\tmargin-bottom: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search input {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.5em 0.75em;\n\t\t\tborder: 1px solid #D4CCBE;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.85em;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.docuserve-sidebar-search input:focus {\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-search-results {\n\t\t\tmargin-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search-results a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tcolor: #423D37;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.82em;\n\t\t\tborder-radius: 3px;\n\t\t\ttransition: background-color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-search-results a:hover {\n\t\t\tbackground-color: #EAE3D8;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-search-result-title {\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.docuserve-sidebar-search-results a:hover .docuserve-sidebar-search-result-title {\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-search-result-meta {\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #8A7F72;\n\t\t}\n\t\t.docuserve-sidebar-search-all {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tfont-size: 0.82em;\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t\tborder-top: 1px solid #EAE3D8;\n\t\t\tmargin-top: 0.25em;\n\t\t\tpadding-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search-all:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-sidebar-home {\n\t\t\tpadding: 0.5em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.85em;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.03em;\n\t\t}\n\t\t.docuserve-sidebar-home a {\n\t\t\tcolor: #5E5549;\n\t\t\ttext-decoration: none;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.docuserve-sidebar-home a:hover {\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-group {\n\t\t\tmargin-top: 0.25em;\n\t\t}\n\t\t.docuserve-sidebar-group-title {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.5em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.85em;\n\t\t\tcolor: #5E5549;\n\t\t\ttext-decoration: none;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.03em;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t}\n\t\t.docuserve-sidebar-group-title:hover {\n\t\t\tcolor: #2E7D74;\n\t\t\tbackground-color: #EAE3D8;\n\t\t}\n\t\ta.docuserve-sidebar-group-title.active {\n\t\t\tcolor: #2E7D74;\n\t\t\tbackground-color: #E0EDEB;\n\t\t}\n\t\t.docuserve-sidebar-modules {\n\t\t\tlist-style: none;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t.docuserve-sidebar-modules li {\n\t\t\tpadding: 0;\n\t\t}\n\t\t.docuserve-sidebar-modules a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.3em 1.25em 0.3em 2em;\n\t\t\tcolor: #5E5549;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.85em;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-modules a:hover {\n\t\t\tbackground-color: #EAE3D8;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-modules a.active {\n\t\t\tcolor: #2E7D74;\n\t\t\tfont-weight: 600;\n\t\t\tbackground-color: #E0EDEB;\n\t\t}\n\t\t.docuserve-sidebar-modules .no-docs {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.3em 1.25em 0.3em 2em;\n\t\t\tcolor: #A39889;\n\t\t\tfont-size: 0.85em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav {\n\t\t\tborder-top: 1px solid #EAE3D8;\n\t\t\tmargin-top: 0.5em;\n\t\t\tpadding-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav-section {\n\t\t\tpadding: 0.4em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: #8A7F72;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.02em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.25em 1.25em 0.25em 2.25em;\n\t\t\tcolor: #5E5549;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.82em;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-module-nav a:hover {\n\t\t\tbackground-color: #EAE3D8;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Sidebar-Template",Template:'\n<div class="docuserve-sidebar">\n\t<div class="docuserve-sidebar-header">\n\t\t<button class="docuserve-sidebar-close" onclick="{~P~}.views[\'Docuserve-Sidebar\'].toggleSidebar()">×</button>\n\t</div>\n\t<div id="Docuserve-Sidebar-Search" class="docuserve-sidebar-search" style="display:none;">\n\t\t<input type="text" placeholder="Search docs..." id="Docuserve-Sidebar-Search-Input">\n\t\t<div id="Docuserve-Sidebar-Search-Results" class="docuserve-sidebar-search-results"></div>\n\t</div>\n\t<div class="docuserve-sidebar-home">\n\t\t<a onclick="{~P~}.PictApplication.navigateTo(\'/Home\')">Home</a>\n\t</div>\n\t<div id="Docuserve-Sidebar-Groups"></div>\n\t<div id="Docuserve-Sidebar-ModuleNav"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Sidebar-Content",TemplateHash:"Docuserve-Sidebar-Template",DestinationAddress:"#Docuserve-Sidebar-Container",RenderMethod:"replace"}]}},{"pict-view":88}],55:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){var r=this.pict.AppData.Docuserve;return r.CoverLoaded&&r.Cover?this.renderFromCover(r.Cover):this.renderFromCatalog(r),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"renderFromCover",value:function(t){this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Title",this.sanitizeTitle(t.Title)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Tagline",this.escapeHTML(t.Tagline)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Description",this.escapeHTML(t.Description));for(var e="",n=0;n<t.Highlights.length;n++){var i=t.Highlights[n];e+='<div class="docuserve-splash-highlight-card">',i.Label&&(e+="<h3>"+this.escapeHTML(i.Label)+"</h3>"),e+="<p>"+this.escapeHTML(i.Text)+"</p>",e+="</div>"}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Highlights",e);for(var o="",r=this.pict.providers["Docuserve-Documentation"],a=0;a<t.Actions.length;a++){var s=t.Actions[a],c=0===a?"primary":"secondary",l=s.Href;if(l.match(/^https?:\/\//))o+='<a class="'+c+'" href="'+this.escapeHTML(l)+'" target="_blank" rel="noopener">'+this.escapeHTML(s.Text)+"</a>";else{var d=r.convertSidebarLink(l);o+='<a class="'+c+'" href="'+this.escapeHTML(d)+'">'+this.escapeHTML(s.Text)+"</a>"}}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Actions",o)}},{key:"renderFromCatalog",value:function(t){var e="Documentation",n="";t.CatalogLoaded&&t.Catalog&&t.Catalog.Name?e=t.Catalog.Name:t.TopBarLoaded&&t.TopBar&&t.TopBar.Brand?e=t.TopBar.Brand:"undefined"!=typeof document&&document.title&&(e=document.title),t.CatalogLoaded&&t.Catalog&&t.Catalog.Description&&(n=t.Catalog.Description),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Title",this.escapeHTML(e)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Tagline",this.escapeHTML(n)),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Description","");for(var i="",o=t.SidebarGroups||[],r=0;r<o.length;r++){var a=o[r];if(a.Modules&&!(a.Modules.length<1)){var s=a.Description||a.Modules.length+" modules";i+='<div class="docuserve-splash-highlight-card">',i+="<h3>"+this.escapeHTML(a.Name)+"</h3>",i+="<p>"+this.escapeHTML(s)+"</p>",i+="</div>"}}this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Highlights",i),this.pict.ContentAssignment.assignContent("#Docuserve-Splash-Actions","")}},{key:"sanitizeTitle",value:function(t){return t?this.escapeHTML(t).replace(/<small>/gi,"<small>").replace(/<\/small>/gi,"</small>"):""}},{key:"escapeHTML",value:function(t){return t?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):""}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-Splash",DefaultRenderable:"Docuserve-Splash-Content",DefaultDestinationAddress:"#Docuserve-Content-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-splash {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: calc(100vh - 56px);\n\t\t\tpadding: 3em 2em;\n\t\t\ttext-align: center;\n\t\t\tbackground: linear-gradient(135deg, #F5F0E8 0%, #E4EFED 100%);\n\t\t}\n\t\t.docuserve-splash h1 {\n\t\t\tfont-size: 3em;\n\t\t\tfont-weight: 700;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin: 0 0 0.25em 0;\n\t\t}\n\t\t.docuserve-splash h1 small {\n\t\t\tfont-size: 0.4em;\n\t\t\tfont-weight: 400;\n\t\t\tcolor: #7A7568;\n\t\t\tvertical-align: middle;\n\t\t\tmargin-left: 0.15em;\n\t\t}\n\t\t.docuserve-splash-tagline {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #7A7568;\n\t\t\tmargin-bottom: 1.5em;\n\t\t\tfont-style: italic;\n\t\t}\n\t\t.docuserve-splash-description {\n\t\t\tfont-size: 1em;\n\t\t\tcolor: #5E5549;\n\t\t\tmax-width: 600px;\n\t\t\tline-height: 1.7;\n\t\t\tmargin-bottom: 2em;\n\t\t}\n\t\t.docuserve-splash-highlights {\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\t\t\tgap: 1.25em;\n\t\t\tmax-width: 900px;\n\t\t\twidth: 100%;\n\t\t\tmargin-bottom: 2.5em;\n\t\t}\n\t\t.docuserve-splash-highlight-card {\n\t\t\tbackground: #fff;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 8px;\n\t\t\tpadding: 1.25em;\n\t\t\ttext-align: left;\n\t\t\ttransition: box-shadow 0.2s, border-color 0.2s;\n\t\t}\n\t\t.docuserve-splash-highlight-card:hover {\n\t\t\tbox-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.docuserve-splash-highlight-card h3 {\n\t\t\tmargin: 0 0 0.5em 0;\n\t\t\tcolor: #3D3229;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.docuserve-splash-highlight-card p {\n\t\t\tmargin: 0;\n\t\t\tcolor: #7A7568;\n\t\t\tfont-size: 0.85em;\n\t\t\tline-height: 1.5;\n\t\t}\n\t\t.docuserve-splash-actions {\n\t\t\tdisplay: flex;\n\t\t\tgap: 1em;\n\t\t\tflex-wrap: wrap;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.docuserve-splash-actions a {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0.7em 1.5em;\n\t\t\tborder-radius: 6px;\n\t\t\tfont-size: 0.95em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-decoration: none;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-splash-actions .primary {\n\t\t\tbackground-color: #2E7D74;\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-splash-actions .primary:hover {\n\t\t\tbackground-color: #256861;\n\t\t}\n\t\t.docuserve-splash-actions .secondary {\n\t\t\tbackground-color: #fff;\n\t\t\tcolor: #3D3229;\n\t\t\tborder: 2px solid #2E7D74;\n\t\t}\n\t\t.docuserve-splash-actions .secondary:hover {\n\t\t\tborder-color: #256861;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-Splash-Template",Template:'\n<div class="docuserve-splash">\n\t<h1 id="Docuserve-Splash-Title"></h1>\n\t<div class="docuserve-splash-tagline" id="Docuserve-Splash-Tagline"></div>\n\t<div class="docuserve-splash-description" id="Docuserve-Splash-Description"></div>\n\t<div class="docuserve-splash-highlights" id="Docuserve-Splash-Highlights"></div>\n\t<div class="docuserve-splash-actions" id="Docuserve-Splash-Actions"></div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-Splash-Content",TemplateHash:"Docuserve-Splash-Template",DestinationAddress:"#Docuserve-Content-Container",RenderMethod:"replace"}]}},{"pict-view":88}],56:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){return this.renderTopBarContent(),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"renderTopBarContent",value:function(){var t=this.pict.AppData.Docuserve,e=document.getElementById("Docuserve-TopBar-Brand"),n=document.getElementById("Docuserve-TopBar-Nav"),i=document.getElementById("Docuserve-TopBar-Links");if(e&&n&&i)if(t.TopBarLoaded&&t.TopBar){var o=t.TopBar;e.innerHTML=this.sanitizeTitle(o.Brand||"Documentation");for(var r='<a href="#/Home">Home</a>',a=0;a<o.NavLinks.length;a++){var s=o.NavLinks[a];r+='<a href="'+s.Href+'">'+this.escapeHTML(s.Text)+"</a>"}n.innerHTML=r;var c="";t.KeywordIndexLoaded&&(c+='<a href="#/search/">Search</a>');for(var l=0;l<o.ExternalLinks.length;l++){var d=o.ExternalLinks[l];c+='<a href="'+this.escapeHTML(d.Href)+'" target="_blank" rel="noopener">'+this.escapeHTML(d.Text)+"</a>"}i.innerHTML=c}else{var p="Documentation";t.CoverLoaded&&t.Cover&&t.Cover.Title?p=t.Cover.Title:t.CatalogLoaded&&t.Catalog&&t.Catalog.Name&&(p=t.Catalog.Name),e.innerHTML=this.sanitizeTitle(p),n.innerHTML='<a href="#/Home">Home</a>',i.innerHTML=t.KeywordIndexLoaded?'<a href="#/search/">Search</a>':""}}},{key:"sanitizeTitle",value:function(t){return t?this.escapeHTML(t).replace(/<small>/gi,"<small>").replace(/<\/small>/gi,"</small>"):""}},{key:"escapeHTML",value:function(t){return t?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Docuserve-TopBar",DefaultRenderable:"Docuserve-TopBar-Content",DefaultDestinationAddress:"#Docuserve-TopBar-Container",AutoRender:!1,CSS:"\n\t\t.docuserve-topbar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tbackground-color: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 0 1.5em;\n\t\t\theight: 56px;\n\t\t\tbox-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);\n\t\t\tposition: sticky;\n\t\t\ttop: 0;\n\t\t\tz-index: 100;\n\t\t}\n\t\t.docuserve-topbar-brand {\n\t\t\tfont-size: 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tletter-spacing: 0.02em;\n\t\t\tcolor: #E8E0D4;\n\t\t\ttext-decoration: none;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-topbar-brand small {\n\t\t\tfont-size: 0.65em;\n\t\t\tfont-weight: 400;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-left: 0.2em;\n\t\t}\n\t\t.docuserve-topbar-brand:hover {\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-topbar-nav {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.25em;\n\t\t}\n\t\t.docuserve-topbar-nav a {\n\t\t\tcolor: #B5AA9A;\n\t\t\ttext-decoration: none;\n\t\t\tpadding: 0.5em 0.75em;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-topbar-nav a:hover {\n\t\t\tbackground-color: #524438;\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-topbar-links {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t}\n\t\t.docuserve-topbar-links a {\n\t\t\tcolor: #8A7F72;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.85em;\n\t\t\tpadding: 0.4em 0.6em;\n\t\t\tborder-radius: 4px;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t}\n\t\t.docuserve-topbar-links a:hover {\n\t\t\tbackground-color: #524438;\n\t\t\tcolor: #E8E0D4;\n\t\t}\n\t\t.docuserve-topbar-toggle {\n\t\t\tdisplay: none;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tcolor: #B5AA9A;\n\t\t\tfont-size: 1.3em;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0.3em 0.5em;\n\t\t\tmargin-left: 0.5em;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.docuserve-topbar-toggle:hover {\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-topbar-right {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\t",Templates:[{Hash:"Docuserve-TopBar-Template",Template:'\n<div class="docuserve-topbar">\n\t<a id="Docuserve-TopBar-Brand" class="docuserve-topbar-brand" href="#/Home"></a>\n\t<div id="Docuserve-TopBar-Nav" class="docuserve-topbar-nav"></div>\n\t<div class="docuserve-topbar-right">\n\t\t<div id="Docuserve-TopBar-Links" class="docuserve-topbar-links"></div>\n\t\t<button id="Docuserve-TopBar-Toggle" class="docuserve-topbar-toggle" onclick="{~P~}.views[\'Docuserve-Sidebar\'].toggleSidebar()">☰</button>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"Docuserve-TopBar-Content",TemplateHash:"Docuserve-TopBar-Template",DestinationAddress:"#Docuserve-TopBar-Container",RenderMethod:"replace"}]}},{"pict-view":88}],57:[function(t,e,n){e.exports={name:"pict-provider",version:"1.0.12",description:"Pict Provider Base Class",main:"source/Pict-Provider.js",scripts:{start:"node source/Pict-Provider.js",test:"npx quack test",tests:"npx quack test -g",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-provider-image:local","docker-dev-run":'docker run -it -d --name pict-provider-dev -p 24125:8080 -p 30027:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-provider" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-provider-image:local',"docker-dev-shell":"docker exec -it pict-provider-dev /bin/bash",lint:"eslint source/**",types:"tsc -p ."},types:"types/source/Pict-Provider.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-provider.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-provider/issues"},homepage:"https://github.com/stevenvelozo/pict-provider#readme",devDependencies:{"@eslint/js":"^9.39.1",eslint:"^9.39.1",pict:"^1.0.351",quackage:"^1.0.58",typescript:"^5.9.3"},dependencies:{"fable-serviceproviderbase":"^3.0.19"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]}}},{}],58:[function(t,e,n){var i=t("fable-serviceproviderbase"),o=t("../package.json"),r={ProviderIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoLoadDataWithApp:!0,AutoLoadDataOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,Manifests:{},Templates:[]},a=function(t){function e(t,n,i){var a;_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),n),i])).fable,a.pict,a.log,a.options,a.UUID,a.Hash,a.options.ProviderIdentifier||(a.options.ProviderIdentifier="AutoProviderID-".concat(a.fable.getUUID())),a.serviceType="PictProvider",a._Package=o,a.pict=a.fable,a.AppData=a.pict.AppData,a.Bundle=a.pict.Bundle,a.initializeTimestamp=!1,a.lastSolvedTimestamp=!1;for(var s=0;s<a.options.Templates.length;s++){var c=a.options.Templates[s];c.hasOwnProperty("Postfix")&&c.hasOwnProperty("Template")?(c.Source||(c.Source="PictProvider [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ProviderIdentifier," options object.")),a.pict.TemplateProvider.addDefaultTemplate(c.Prefix,c.Postfix,c.Template,c.Source)):a.log.error("PictProvider [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ProviderIdentifier," could not load Default Template ").concat(s," in the options array."),c)}return a}return _inherits(e,t),_createClass(e,[{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}},{key:"initializeAsync",value:function(t){var e=this;if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," async initialize called but initialization is already completed. Aborting.")),t();var n=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," beginning initialization...")),n.anticipate(this.onBeforeInitializeAsync.bind(this)),n.anticipate(this.onInitializeAsync.bind(this)),n.anticipate(this.onAfterInitializeAsync.bind(this)),n.wait(function(n){return e.initializeTimestamp=e.pict.log.getTimeStamp(),n?e.log.error("PictProvider [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ProviderIdentifier," initialization failed: ").concat(n.message||n),{Stack:n.stack}):e.pict.LogNoisiness>0&&e.log.info("PictProvider [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ProviderIdentifier," initialization complete.")),t()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onPreRender",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreRender:")),!0}},{key:"onPreRenderAsync",value:function(t){return this.onPreRender(),t()}},{key:"render",value:function(){return this.onPreRender()}},{key:"renderAsync",value:function(t){return this.onPreRender(),t()}},{key:"onPreSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreSolve:")),!0}},{key:"onPreSolveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"solve",value:function(){return this.onPreSolve()}},{key:"solveAsync",value:function(t){return this.onPreSolve(),t()}},{key:"onBeforeLoadDataAsync",value:function(t){return t()}},{key:"onLoadDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onLoadDataAsync:")),t()}},{key:"onAfterLoadDataAsync",value:function(t){return t()}},{key:"onBeforeSaveDataAsync",value:function(t){return t()}},{key:"onSaveDataAsync",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onSaveDataAsync:")),t()}},{key:"onAfterSaveDataAsync",value:function(t){return t()}}])}(i);e.exports=a},{"../package.json":57,"fable-serviceproviderbase":20}],59:[function(t,e,n){var i={javascript:{tokenizer:/(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|(["'])(?:(?!\2|\\).|\\.)*?\2|(`(?:[^`\\]|\\.)*?`)|(\/(?![/*])(?:\\.|\[(?:\\.|[^\]])*\]|[^/\\\n])+\/[gimsuvy]*)/g,keywords:/\b(async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|export|extends|finally|for|from|function|get|if|import|in|instanceof|let|new|of|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/g,builtins:/\b(true|false|null|undefined|NaN|Infinity|console|window|document|Math|JSON|Array|Object|String|Number|Boolean|Date|RegExp|Map|Set|Promise|Error|Symbol|parseInt|parseFloat|require|module|exports)\b/g,numbers:/\b(\d+\.?\d*(?:e[+-]?\d+)?|0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+)\b/g},json:{tokenizer:/(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|("(?:[^"\\]|\\.)*")/g,keywords:/\b(true|false|null)\b/g,numbers:/-?\b\d+\.?\d*(?:e[+-]?\d+)?\b/g},html:{tokenizer:/(<!--[\s\S]*?-->)|(["'])(?:(?!\2|\\).|\\.)*?\2|(<\/?[a-zA-Z][a-zA-Z0-9-]*(?:\s+[a-zA-Z-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s*\/?>)/g,tagGroupIndex:3},css:{tokenizer:/(\/\*[\s\S]*?\*\/)|(["'])(?:(?!\2|\\).|\\.)*?\2/g,selectors:/([.#]?[a-zA-Z_][\w-]*(?:\s*[>+~]\s*[.#]?[a-zA-Z_][\w-]*)*)\s*\{/g,properties:/\b([a-zA-Z-]+)\s*:/g,numbers:/\b(\d+\.?\d*)(px|em|rem|%|vh|vw|s|ms|deg|fr)?\b/g,keywords:/\b(important|inherit|initial|unset|none|auto|block|inline|flex|grid)\b/g},sql:{tokenizer:/(--[^\n]*|\/\*[\s\S]*?\*\/)|(["'])(?:(?!\2|\\).|\\.)*?\2/g,keywords:/\b(SELECT|FROM|WHERE|AND|OR|INSERT|INTO|VALUES|UPDATE|SET|DELETE|CREATE|TABLE|DROP|ALTER|ADD|COLUMN|INDEX|JOIN|LEFT|RIGHT|INNER|OUTER|ON|AS|ORDER|BY|GROUP|HAVING|LIMIT|OFFSET|UNION|ALL|DISTINCT|COUNT|SUM|AVG|MIN|MAX|NOT|NULL|IS|IN|BETWEEN|LIKE|EXISTS|CASE|WHEN|THEN|ELSE|END|PRIMARY|KEY|FOREIGN|REFERENCES|CONSTRAINT|DEFAULT|CHECK|UNIQUE|CASCADE|GRANT|REVOKE|COMMIT|ROLLBACK|BEGIN|TRANSACTION|INT|VARCHAR|DATETIME|AUTO_INCREMENT|CURRENT_TIMESTAMP)\b/gi,numbers:/\b\d+\.?\d*\b/g}};function o(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function r(t,e){var n=t;return e.selectors&&(e.selectors.lastIndex=0,n=n.replace(e.selectors,'<span class="function-name">$1</span>{')),e.properties&&(e.properties.lastIndex=0,n=n.replace(e.properties,'<span class="property">$1</span>:')),e.keywords&&(e.keywords.lastIndex=0,n=n.replace(e.keywords,'<span class="keyword">$1</span>')),e.builtins&&(e.builtins.lastIndex=0,n=n.replace(e.builtins,'<span class="keyword">$1</span>')),e.numbers&&(e.numbers.lastIndex=0,n=n.replace(e.numbers,function(t){return'<span class="number">'.concat(t,"</span>")})),n}function a(t){var e="",n=t,i=n.match(/^(<\/?)([a-zA-Z][a-zA-Z0-9-]*)/);if(!i)return o(t);e+=o(i[1]),e+='<span class="tag">'+o(i[2])+"</span>",n=n.substring(i[0].length);for(var r,a=/^(\s+)([a-zA-Z-]+)(?:(\s*=\s*)(["'])([^"']*?)\4)?/;null!==(r=n.match(a));)e+=r[1],e+='<span class="attr-name">'+o(r[2])+"</span>",r[3]&&(e+=o(r[3]),e+='<span class="attr-value">'+o(r[4])+o(r[5])+o(r[4])+"</span>"),n=n.substring(r[0].length);return e+=o(n)}i.js=i.javascript,i.htm=i.html,e.exports=function(t){return function(e){var n=e.textContent,s="string"==typeof t?t.toLowerCase():"javascript",c=i[s];if(c)if(c.tokenizer){var l,d="",p=0,u=c.tagGroupIndex||0;for(c.tokenizer.lastIndex=0;null!==(l=c.tokenizer.exec(n));){if(l.index>p)d+=r(o(n.substring(p,l.index)),c);var h=l[0];l[1]?d+='<span class="comment">'.concat(o(h),"</span>"):u>0&&l[u]?d+=a(h):d+='<span class="string">'.concat(o(h),"</span>"),p=c.tokenizer.lastIndex}if(p<n.length)d+=r(o(n.substring(p)),c);e.innerHTML=d}else e.innerHTML=r(o(n),c);else e.innerHTML=o(n)}},e.exports.LanguageDefinitions=i},{}],60:[function(t,e,n){e.exports={RenderOnLoad:!0,DefaultRenderable:"CodeEditor-Wrap",DefaultDestinationAddress:"#CodeEditor-Container-Div",Templates:[{Hash:"CodeEditor-Container",Template:"\x3c!-- CodeEditor-Container Rendering Soon --\x3e"}],Renderables:[{RenderableHash:"CodeEditor-Wrap",TemplateHash:"CodeEditor-Container",DestinationAddress:"#CodeEditor-Container-Div"}],TargetElementAddress:"#CodeEditor-Container-Div",CodeDataAddress:!1,Language:"javascript",ReadOnly:!1,Tab:"\t",IndentOn:/[({[]$/,MoveToNewLine:/^[)}\]]/,AddClosing:!0,CatchTab:!0,LineNumbers:!0,DefaultCode:"// Enter your code here\n",CSS:".pict-code-editor-wrap\n{\n\tdisplay: flex;\n\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\tfont-size: 14px;\n\tline-height: 1.5;\n\tborder: 1px solid #D0D0D0;\n\tborder-radius: 4px;\n\toverflow: hidden;\n}\n.pict-code-editor-wrap .pict-code-line-numbers\n{\n\twidth: 40px;\n\tmin-width: 40px;\n\tpadding: 10px 0;\n\ttext-align: right;\n\tbackground: #F5F5F5;\n\tborder-right: 1px solid #D0D0D0;\n\tcolor: #999;\n\tfont-size: 13px;\n\tline-height: 1.5;\n\tuser-select: none;\n\tpointer-events: none;\n\tbox-sizing: border-box;\n}\n.pict-code-editor-wrap .pict-code-line-numbers span\n{\n\tdisplay: block;\n\tpadding: 0 8px 0 0;\n}\n.pict-code-editor-wrap .pict-code-editor\n{\n\tmargin: 0;\n\tpadding: 10px 10px 10px 8px;\n\tmin-height: 100px;\n\tflex: 1;\n\tmin-width: 0;\n\toutline: none;\n\ttab-size: 4;\n\twhite-space: pre;\n\toverflow-wrap: normal;\n\tcolor: #383A42;\n\tbackground: #FAFAFA;\n\tcaret-color: #526FFF;\n\tborder-radius: 0 4px 4px 0;\n}\n.pict-code-editor-wrap .pict-code-editor.pict-code-no-line-numbers\n{\n\tpadding-left: 10px;\n\tborder-radius: 4px;\n}\n.pict-code-editor-wrap .pict-code-editor .keyword { color: #A626A4; }\n.pict-code-editor-wrap .pict-code-editor .string { color: #50A14F; }\n.pict-code-editor-wrap .pict-code-editor .number { color: #986801; }\n.pict-code-editor-wrap .pict-code-editor .comment { color: #A0A1A7; font-style: italic; }\n.pict-code-editor-wrap .pict-code-editor .operator { color: #0184BC; }\n.pict-code-editor-wrap .pict-code-editor .punctuation { color: #383A42; }\n.pict-code-editor-wrap .pict-code-editor .function-name { color: #4078F2; }\n.pict-code-editor-wrap .pict-code-editor .property { color: #E45649; }\n.pict-code-editor-wrap .pict-code-editor .tag { color: #E45649; }\n.pict-code-editor-wrap .pict-code-editor .attr-name { color: #986801; }\n.pict-code-editor-wrap .pict-code-editor .attr-value { color: #50A14F; }\n"}},{}],61:[function(t,e,n){var i=t("pict-view"),o=t("./Pict-Code-Highlighter.js"),r=t("./Pict-Section-Code-DefaultConfiguration.js"),a=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,Object.assign({},r,n),i])).initialRenderComplete=!1,o.codeJar=null,o._highlightFunction=null,o._language=o.options.Language||"javascript",o}return _inherits(e,t),_createClass(e,[{key:"onBeforeInitialize",value:function(){return _superPropGet(e,"onBeforeInitialize",this,3)([]),this._codeJarPrototype=null,this.targetElement=!1,this._highlightFunction=o(this._language),_superPropGet(e,"onBeforeInitialize",this,3)([])}},{key:"connectCodeJarPrototype",value:function(t){if("function"!=typeof t)return"undefined"!=typeof window&&"function"==typeof window.CodeJar?(this.log.trace("PICT-Code Found CodeJar in window.CodeJar."),void(this._codeJarPrototype=window.CodeJar)):(this.log.error("PICT-Code No CodeJar prototype found. Include codejar via script tag or call connectCodeJarPrototype(CodeJar) explicitly."),!1);this._codeJarPrototype=t}},{key:"onAfterRender",value:function(t){return this.pict.CSSMap.injectCSS(),this.initialRenderComplete||(this.onAfterInitialRender(),this.initialRenderComplete=!0),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"onAfterInitialRender",value:function(){var t=this;if(this._codeJarPrototype||this.connectCodeJarPrototype(),!this._codeJarPrototype)return this.log.error("PICT-Code Cannot initialize editor; no CodeJar prototype available."),!1;if(this.codeJar)return this.log.error("PICT-Code editor is already initialized!"),!1;var e=this.services.ContentAssignment.getElement(this.options.TargetElementAddress);if(!e||e.length<1)return this.log.error("PICT-Code Could not find target element [".concat(this.options.TargetElementAddress,"]!")),this.targetElement=!1,!1;this.targetElement=e[0],this._buildEditorDOM();var n=this._resolveCodeContent(),i={};this.options.Tab&&(i.tab=this.options.Tab),this.options.IndentOn&&(i.indentOn=this.options.IndentOn),this.options.MoveToNewLine&&(i.moveToNewLine=this.options.MoveToNewLine),void 0!==this.options.AddClosing&&(i.addClosing=this.options.AddClosing),void 0!==this.options.CatchTab&&(i.catchTab=this.options.CatchTab),this.customConfigureEditorOptions(i);var o=this._editorElement;this.codeJar=this._codeJarPrototype(o,this._highlightFunction,i),this._resetEditorWrapStyles(),n&&this.codeJar.updateCode(n),this.codeJar.onUpdate(function(e){t._updateLineNumbers(),t.onCodeChange(e)}),this._updateLineNumbers(),this.options.ReadOnly&&o.setAttribute("contenteditable","false")}},{key:"_buildEditorDOM",value:function(){this.targetElement.innerHTML="";var t=document.createElement("div");if(t.className="pict-code-editor-wrap",this.options.LineNumbers){var e=document.createElement("div");e.className="pict-code-line-numbers",t.appendChild(e),this._lineNumbersElement=e}var n=document.createElement("div");n.className="pict-code-editor language-"+this._language,this.options.LineNumbers||(n.className+=" pict-code-no-line-numbers"),t.appendChild(n),this.targetElement.appendChild(t),this._editorElement=n,this._wrapElement=t}},{key:"_updateLineNumbers",value:function(){if(this.options.LineNumbers&&this._lineNumbersElement&&this._editorElement){for(var t=(this._editorElement.textContent||"").split("\n").length,e="",n=1;n<=t;n++)e+="<span>".concat(n,"</span>");this._lineNumbersElement.innerHTML=e}}},{key:"_resetEditorWrapStyles",value:function(){this._editorElement&&(this._editorElement.style.whiteSpace="pre",this._editorElement.style.overflowWrap="normal")}},{key:"_resolveCodeContent",value:function(){if(this.options.CodeDataAddress){var t={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options},e=this.fable.manifest.getValueByHash(t,this.options.CodeDataAddress);if("string"==typeof e)return e;this.log.warn("PICT-Code Address [".concat(this.options.CodeDataAddress,"] did not return a string; it was ").concat(_typeof(e),"."))}return this.options.DefaultCode||""}},{key:"customConfigureEditorOptions",value:function(t){}},{key:"onCodeChange",value:function(t){if(this.options.CodeDataAddress){var e={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options};this.fable.manifest.setValueByHash(e,this.options.CodeDataAddress,t)}}},{key:"getCode",value:function(){return this.codeJar?this.codeJar.toString():(this.log.warn("PICT-Code getCode called before editor initialized."),"")}},{key:"setCode",value:function(t){this.codeJar?(this.codeJar.updateCode(t),this._updateLineNumbers()):this.log.warn("PICT-Code setCode called before editor initialized.")}},{key:"setLanguage",value:function(t){var e=this;if(this._language=t,this._highlightFunction=o(t),this._editorElement&&(this._editorElement.className="pict-code-editor language-"+t,this.options.LineNumbers||(this._editorElement.className+=" pict-code-no-line-numbers")),this.codeJar){var n=this.codeJar.toString();this.codeJar.destroy(),this.codeJar=this._codeJarPrototype(this._editorElement,this._highlightFunction,{tab:this.options.Tab,catchTab:this.options.CatchTab,addClosing:this.options.AddClosing}),this._resetEditorWrapStyles(),this.codeJar.updateCode(n),this.codeJar.onUpdate(function(t){e._updateLineNumbers(),e.onCodeChange(t)})}}},{key:"setHighlightFunction",value:function(t){var e=this;if("function"==typeof t){if(this._highlightFunction=t,this.codeJar){var n=this.codeJar.toString();this.codeJar.destroy(),this.codeJar=this._codeJarPrototype(this._editorElement,this._highlightFunction,{tab:this.options.Tab,catchTab:this.options.CatchTab,addClosing:this.options.AddClosing}),this._resetEditorWrapStyles(),this.codeJar.updateCode(n),this.codeJar.onUpdate(function(t){e._updateLineNumbers(),e.onCodeChange(t)})}}else this.log.error("PICT-Code setHighlightFunction requires a function.")}},{key:"setReadOnly",value:function(t){this.options.ReadOnly=t,this._editorElement&&this._editorElement.setAttribute("contenteditable",t?"false":"true")}},{key:"destroy",value:function(){this.codeJar&&(this.codeJar.destroy(),this.codeJar=null)}},{key:"marshalToView",value:function(){if(_superPropGet(e,"marshalToView",this,3)([]),this.codeJar&&this.options.CodeDataAddress){var t=this._resolveCodeContent();"string"==typeof t&&(this.codeJar.updateCode(t),this._updateLineNumbers())}}},{key:"marshalFromView",value:function(){_superPropGet(e,"marshalFromView",this,3)([]),this.codeJar&&this.options.CodeDataAddress&&this.onCodeChange(this.codeJar.toString())}}])}(i);e.exports=a,e.exports.default_configuration=r,e.exports.createHighlighter=o},{"./Pict-Code-Highlighter.js":59,"./Pict-Section-Code-DefaultConfiguration.js":60,"pict-view":88}],62:[function(t,e,n){e.exports={ViewIdentifier:"Pict-FileBrowser",DefaultRenderable:"FileBrowser-Container",DefaultDestinationAddress:"#Pict-FileBrowser-Container",AutoRender:!1,StateAddresses:{Layout:"AppData.PictFileBrowser.Layout",RootLocation:"AppData.PictFileBrowser.RootLocation",CurrentLocation:"AppData.PictFileBrowser.CurrentLocation",CurrentFile:"AppData.PictFileBrowser.CurrentFile"},DefaultState:{Layout:"browser-detail",RootLocation:"/",CurrentLocation:"",CurrentFile:null},FileListAddress:"AppData.PictFileBrowser.FileList",FolderTreeAddress:"AppData.PictFileBrowser.FolderTree",ChildFolderCacheAddress:"AppData.PictFileBrowser.ChildFolderCache",Templates:[{Hash:"FileBrowser-Container-Template",Template:'\n<div class="pict-filebrowser" id="Pict-FileBrowser-Wrap">\n\t<div class="pict-filebrowser-browse-pane" id="Pict-FileBrowser-BrowsePane"></div>\n\t<div class="pict-filebrowser-main-pane">\n\t\t<div class="pict-filebrowser-list-pane" id="Pict-FileBrowser-ListPane"></div>\n\t\t<div class="pict-filebrowser-view-pane" id="Pict-FileBrowser-ViewPane"></div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"FileBrowser-Container",TemplateHash:"FileBrowser-Container-Template",DestinationAddress:"#Pict-FileBrowser-Container",RenderMethod:"replace"}],CSS:"\n\t\t.pict-filebrowser {\n\t\t\tdisplay: flex;\n\t\t\theight: 100%;\n\t\t\tfont-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n\t\t\tfont-size: 14px;\n\t\t\tcolor: #3D3229;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\toverflow: hidden;\n\t\t\tbackground: #FAFAF8;\n\t\t}\n\n\t\t.pict-filebrowser-browse-pane {\n\t\t\twidth: 240px;\n\t\t\tmin-width: 180px;\n\t\t\tborder-right: 1px solid #DDD6CA;\n\t\t\toverflow-y: auto;\n\t\t\tbackground: #F5F0E8;\n\t\t\tflex-shrink: 0;\n\t\t}\n\n\t\t.pict-filebrowser-main-pane {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t}\n\n\t\t.pict-filebrowser-list-pane {\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\toverflow-x: hidden;\n\t\t}\n\n\t\t.pict-filebrowser-view-pane {\n\t\t\tborder-top: 1px solid #DDD6CA;\n\t\t\toverflow-y: auto;\n\t\t\tbackground: #FAFAF8;\n\t\t}\n\n\t\t/* --- Browsing: Tree --- */\n\t\t.pict-fb-tree {\n\t\t\tpadding: 8px 0;\n\t\t}\n\t\t.pict-fb-tree-node {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tpadding: 4px 8px 4px 0;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-fb-tree-node:hover {\n\t\t\tbackground: #EAE3D8;\n\t\t}\n\t\t.pict-fb-tree-node.selected {\n\t\t\tbackground: #DDD6CA;\n\t\t\tfont-weight: 600;\n\t\t}\n\t\t.pict-fb-tree-toggle {\n\t\t\tdisplay: inline-block;\n\t\t\twidth: 16px;\n\t\t\ttext-align: center;\n\t\t\tflex-shrink: 0;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 10px;\n\t\t}\n\t\t.pict-fb-tree-icon {\n\t\t\tmargin-right: 6px;\n\t\t\tflex-shrink: 0;\n\t\t\tfont-size: 14px;\n\t\t}\n\t\t.pict-fb-tree-label {\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t\t.pict-fb-tree-children {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.pict-fb-tree-children.expanded {\n\t\t\tdisplay: block;\n\t\t}\n\n\t\t/* --- Browsing: Search --- */\n\t\t.pict-fb-search {\n\t\t\tpadding: 8px;\n\t\t}\n\t\t.pict-fb-search-input {\n\t\t\twidth: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t\tpadding: 6px 10px;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 13px;\n\t\t\toutline: none;\n\t\t\tbackground: #fff;\n\t\t}\n\t\t.pict-fb-search-input:focus {\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.pict-fb-search-results {\n\t\t\tmargin-top: 4px;\n\t\t}\n\t\t.pict-fb-search-result {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tpadding: 5px 8px;\n\t\t\tcursor: pointer;\n\t\t\tborder-radius: 3px;\n\t\t}\n\t\t.pict-fb-search-result:hover {\n\t\t\tbackground: #EAE3D8;\n\t\t}\n\t\t.pict-fb-search-result-icon {\n\t\t\tmargin-right: 6px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-fb-search-result-name {\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-fb-search-result-path {\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 11px;\n\t\t\tmargin-left: auto;\n\t\t\tpadding-left: 8px;\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t/* --- Listing: Detail --- */\n\t\t.pict-fb-detail {\n\t\t\twidth: 100%;\n\t\t}\n\t\t.pict-fb-detail-header {\n\t\t\tdisplay: flex;\n\t\t\tpadding: 6px 12px;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 12px;\n\t\t\ttext-transform: uppercase;\n\t\t\tcolor: #8A7F72;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tbackground: #F5F0E8;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.pict-fb-detail-header-cell {\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-fb-detail-header-cell:hover {\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.pict-fb-detail-col-name {\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.pict-fb-detail-col-size {\n\t\t\twidth: 90px;\n\t\t\ttext-align: right;\n\t\t\tflex-shrink: 0;\n\t\t\tpadding-right: 12px;\n\t\t}\n\t\t.pict-fb-detail-col-modified {\n\t\t\twidth: 150px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.pict-fb-detail-row {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tpadding: 5px 12px;\n\t\t\tcursor: pointer;\n\t\t\tborder-bottom: 1px solid #F0ECE4;\n\t\t}\n\t\t.pict-fb-detail-row:hover {\n\t\t\tbackground: #F0ECE4;\n\t\t}\n\t\t.pict-fb-detail-row.selected {\n\t\t\tbackground: #E0EDE9;\n\t\t}\n\t\t.pict-fb-detail-icon {\n\t\t\tmargin-right: 8px;\n\t\t\tflex-shrink: 0;\n\t\t\tfont-size: 16px;\n\t\t}\n\t\t.pict-fb-detail-name {\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-fb-detail-size {\n\t\t\twidth: 90px;\n\t\t\ttext-align: right;\n\t\t\tflex-shrink: 0;\n\t\t\tpadding-right: 12px;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 12px;\n\t\t}\n\t\t.pict-fb-detail-modified {\n\t\t\twidth: 150px;\n\t\t\tflex-shrink: 0;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 12px;\n\t\t}\n\n\t\t/* --- Listing: Icons --- */\n\t\t.pict-fb-icons {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tpadding: 12px;\n\t\t\tgap: 8px;\n\t\t}\n\t\t.pict-fb-icon-item {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\twidth: 96px;\n\t\t\tpadding: 10px 6px;\n\t\t\tcursor: pointer;\n\t\t\tborder-radius: 6px;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.pict-fb-icon-item:hover {\n\t\t\tbackground: #F0ECE4;\n\t\t}\n\t\t.pict-fb-icon-item.selected {\n\t\t\tbackground: #E0EDE9;\n\t\t}\n\t\t.pict-fb-icon-graphic {\n\t\t\tfont-size: 36px;\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t\t.pict-fb-icon-label {\n\t\t\tfont-size: 12px;\n\t\t\tword-break: break-word;\n\t\t\tline-height: 1.3;\n\t\t\tmax-height: 2.6em;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t/* --- Viewing: FileInfo --- */\n\t\t.pict-fb-fileinfo {\n\t\t\tpadding: 12px 16px;\n\t\t}\n\t\t.pict-fb-fileinfo-title {\n\t\t\tfont-size: 15px;\n\t\t\tfont-weight: 600;\n\t\t\tmargin-bottom: 8px;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.pict-fb-fileinfo-table {\n\t\t\twidth: 100%;\n\t\t\tfont-size: 13px;\n\t\t}\n\t\t.pict-fb-fileinfo-table td {\n\t\t\tpadding: 3px 0;\n\t\t}\n\t\t.pict-fb-fileinfo-label {\n\t\t\tcolor: #8A7F72;\n\t\t\twidth: 100px;\n\t\t\tfont-weight: 500;\n\t\t}\n\t\t.pict-fb-fileinfo-value {\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-fb-fileinfo-none {\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-style: italic;\n\t\t}\n\n\t\t/* --- Viewing: Image --- */\n\t\t.pict-fb-image-viewer {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tpadding: 16px;\n\t\t\tmin-height: 200px;\n\t\t}\n\t\t.pict-fb-image-viewer img {\n\t\t\tmax-width: 100%;\n\t\t\tmax-height: 500px;\n\t\t\tobject-fit: contain;\n\t\t\tborder-radius: 4px;\n\t\t\tbox-shadow: 0 1px 3px rgba(0,0,0,0.1);\n\t\t}\n\t\t.pict-fb-image-viewer-none {\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-style: italic;\n\t\t}\n\n\t\t/* --- Breadcrumb / Location Bar --- */\n\t\t.pict-fb-breadcrumb {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tpadding: 6px 12px;\n\t\t\tfont-size: 13px;\n\t\t\tbackground: #F5F0E8;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\toverflow-x: auto;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t\t.pict-fb-breadcrumb-segment {\n\t\t\tcursor: pointer;\n\t\t\tcolor: #2E7D74;\n\t\t\tpadding: 2px 4px;\n\t\t\tborder-radius: 3px;\n\t\t}\n\t\t.pict-fb-breadcrumb-segment:hover {\n\t\t\tbackground: #EAE3D8;\n\t\t}\n\t\t.pict-fb-breadcrumb-separator {\n\t\t\tmargin: 0 2px;\n\t\t\tcolor: #8A7F72;\n\t\t}\n\t\t.pict-fb-breadcrumb-current {\n\t\t\tcolor: #3D3229;\n\t\t\tfont-weight: 500;\n\t\t\tpadding: 2px 4px;\n\t\t}\n\n\t\t/* --- Empty state --- */\n\t\t.pict-fb-empty {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tpadding: 32px;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-style: italic;\n\t\t}\n\t"}},{}],63:[function(t,e,n){e.exports=t("./views/Pict-View-FileBrowser.js"),e.exports.PictFileBrowserBrowseProvider=t("./providers/Pict-Provider-FileBrowserBrowse.js"),e.exports.PictFileBrowserListProvider=t("./providers/Pict-Provider-FileBrowserList.js"),e.exports.PictFileBrowserViewProvider=t("./providers/Pict-Provider-FileBrowserView.js"),e.exports.PictFileBrowserLayoutProvider=t("./providers/Pict-Provider-FileBrowserLayout.js"),e.exports.PictFileBrowserIconProvider=t("./providers/Pict-Provider-FileBrowserIcons.js"),e.exports.PictViewBrowseTree=t("./views/Pict-View-FileBrowser-BrowseTree.js"),e.exports.PictViewBrowseSearch=t("./views/Pict-View-FileBrowser-BrowseSearch.js"),e.exports.PictViewListDetail=t("./views/Pict-View-FileBrowser-ListDetail.js"),e.exports.PictViewListIcons=t("./views/Pict-View-FileBrowser-ListIcons.js"),e.exports.PictViewFileInfo=t("./views/Pict-View-FileBrowser-ViewFileInfo.js"),e.exports.PictViewImageViewer=t("./views/Pict-View-FileBrowser-ViewImage.js"),e.exports.FileBrowserService=t("./services/Pict-Service-FileBrowser.js")},{"./providers/Pict-Provider-FileBrowserBrowse.js":64,"./providers/Pict-Provider-FileBrowserIcons.js":65,"./providers/Pict-Provider-FileBrowserLayout.js":66,"./providers/Pict-Provider-FileBrowserList.js":67,"./providers/Pict-Provider-FileBrowserView.js":68,"./services/Pict-Service-FileBrowser.js":69,"./views/Pict-View-FileBrowser-BrowseSearch.js":70,"./views/Pict-View-FileBrowser-BrowseTree.js":71,"./views/Pict-View-FileBrowser-ListDetail.js":72,"./views/Pict-View-FileBrowser-ListIcons.js":73,"./views/Pict-View-FileBrowser-ViewFileInfo.js":74,"./views/Pict-View-FileBrowser-ViewImage.js":75,"./views/Pict-View-FileBrowser.js":76}],64:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"getFolderTree",value:function(){var t=this.getFileBrowserOption("FolderTreeAddress","AppData.PictFileBrowser.FolderTree"),e=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t);return Array.isArray(e)?e:[]}},{key:"flattenTree",value:function(t){var e=t||this.getFolderTree(),n=[],i=function(t,e){for(var o=0;o<t.length;o++){var r=t[o],a=e?e+"/"+r.Name:r.Name;n.push({Name:r.Name,Path:a}),Array.isArray(r.Children)&&r.Children.length>0&&i(r.Children,a)}};return i(e,""),n}},{key:"getChildFolders",value:function(t){var e=this.getFileBrowserOption("ChildFolderCacheAddress","AppData.PictFileBrowser.ChildFolderCache"),n=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},e);if(!n||"object"!==_typeof(n))return null;var i=t||"_root_";return Array.isArray(n[i])?n[i]:null}},{key:"setChildFolders",value:function(t,e){var n=this.getFileBrowserOption("ChildFolderCacheAddress","AppData.PictFileBrowser.ChildFolderCache"),i=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},n);i&&"object"===_typeof(i)||(i={}),i[t||"_root_"]=Array.isArray(e)?e:[],this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},n,i)}},{key:"searchFiles",value:function(t,e){if(!t||"string"!=typeof t)return[];var n=e||this.getFileList(),i=t.toLowerCase();return n.filter(function(t){return t.Name&&t.Name.toLowerCase().indexOf(i)>=0})}},{key:"navigateToFolder",value:function(t){var e=this.getFileBrowserOption("StateAddresses",{}),n=e.CurrentLocation||"AppData.PictFileBrowser.CurrentLocation",i=e.CurrentFile||"AppData.PictFileBrowser.CurrentFile";this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},n,t||""),this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},i,null)}},{key:"getFileList",value:function(){var t=this.getFileBrowserOption("FileListAddress","AppData.PictFileBrowser.FileList"),e=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t);return Array.isArray(e)?e:[]}},{key:"getFileBrowserOption",value:function(t,e){if(this.pict.views&&this.pict.views["Pict-FileBrowser"]){var n=this.pict.views["Pict-FileBrowser"].options;if(n&&t in n)return n[t]}return e}}])}(t("pict-provider"));e.exports=i,e.exports.default_configuration={ProviderIdentifier:"Pict-FileBrowser-Browse",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0}},{"pict-provider":58}],65:[function(t,e,n){var i=t("pict-provider"),o={Primary:"#3D3229",Accent:"#2E7D74",Muted:"#8A7F72",Light:"#F5F0E8",WarmBeige:"#EAE3D8",TealTint:"#E0EDE9",Lavender:"#E8E0F0",AmberTint:"#F0E8D0"},r={folder:function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M3.2 7.1V17.2C3.2 18.2 4 19.1 5.1 18.9L19.1 19.1C20 19.1 20.9 18.2 20.8 17.1V9.1C20.9 8 20.1 7.1 19 7.1H12.1L10.1 4.9H5.1C3.9 5 3.1 5.9 3.2 7.1Z" fill="'+o.WarmBeige+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M3.2 9H20.8" stroke="'+o.Primary+'" stroke-width="1" opacity="0.3" /></svg>'},"folder-open":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M3.2 7.1V17.2C3.2 18.2 4 19.1 5.1 18.9L19.1 19.1C20 19.1 20.9 18.2 20.8 17.1V9.1C20.9 8 20.1 7.1 19 7.1H12.1L10.1 4.9H5.1C3.9 5 3.1 5.9 3.2 7.1Z" fill="'+o.WarmBeige+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M3.2 10.2L5.8 17.8C6 18.4 6.6 18.9 7.2 18.9H19.8L22.1 11.2C22.3 10.6 21.8 10 21.2 10H5.2C4.6 10 4 10.4 3.8 11" stroke="'+o.Primary+'" stroke-width="1.5" fill="'+o.Light+'" stroke-linecap="round" stroke-linejoin="round" opacity="0.7" /></svg>'},file:function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.Light+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"file-text":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.Light+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><line x1="8.1" y1="12.8" x2="15.9" y2="12.8" stroke="'+o.Muted+'" stroke-width="1.2" stroke-linecap="round" /><line x1="8.1" y1="15.8" x2="15.9" y2="15.8" stroke="'+o.Muted+'" stroke-width="1.2" stroke-linecap="round" /><line x1="8.1" y1="18.8" x2="12.2" y2="18.8" stroke="'+o.Muted+'" stroke-width="1.2" stroke-linecap="round" /></svg>'},"file-code":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.Light+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M8.5 13.2L6.8 15.1L8.6 16.8" stroke="'+o.Accent+'" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" /><path d="M15.5 13.2L17.2 15.1L15.4 16.8" stroke="'+o.Accent+'" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" /><line x1="12.8" y1="12" x2="11.2" y2="18" stroke="'+o.Muted+'" stroke-width="1.2" stroke-linecap="round" /></svg>'},"file-image":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><rect x="3.1" y="3.2" width="17.8" height="17.7" rx="2" fill="'+o.Lavender+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><circle cx="8.3" cy="8.7" r="1.8" fill="'+o.Accent+'" /><path d="M20.8 15.2L15.9 10.1L5.2 20.8" stroke="'+o.Primary+'" stroke-width="1.8" fill="none" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"file-pdf":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="#F0DDDD" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><text x="8.2" y="16.8" font-family="sans-serif" font-weight="700" font-size="6.5" fill="#C04040" letter-spacing="-0.3">PDF</text></svg>'},"file-spreadsheet":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.TealTint+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><rect x="7.2" y="11.1" width="9.8" height="7.8" rx="0.5" fill="none" stroke="'+o.Accent+'" stroke-width="1.2" /><line x1="7.2" y1="13.7" x2="17" y2="13.7" stroke="'+o.Accent+'" stroke-width="1" /><line x1="7.2" y1="16.3" x2="17" y2="16.3" stroke="'+o.Accent+'" stroke-width="1" /><line x1="10.9" y1="11.1" x2="10.9" y2="18.9" stroke="'+o.Accent+'" stroke-width="1" /></svg>'},"file-archive":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.WarmBeige+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><rect x="8.8" y="11.2" width="2.5" height="2" rx="0.4" fill="'+o.Primary+'" /><rect x="8.8" y="14.2" width="2.5" height="2" rx="0.4" fill="'+o.Primary+'" /><rect x="8.8" y="17.2" width="2.5" height="2" rx="0.4" fill="'+o.Primary+'" /></svg>'},"file-audio":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.AmberTint+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><circle cx="10.2" cy="16.8" r="2.1" fill="none" stroke="'+o.Accent+'" stroke-width="1.5" /><path d="M12.2 16.8V11.2L16.1 10.1" stroke="'+o.Accent+'" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none" /><circle cx="16.1" cy="15.3" r="1.4" fill="none" stroke="'+o.Accent+'" stroke-width="1.2" /></svg>'},"file-video":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.Lavender+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M9.8 12.2V18.2L15.8 15.2L9.8 12.2Z" fill="'+o.Accent+'" stroke="'+o.Accent+'" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"file-web":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="12" r="8.9" fill="'+o.TealTint+'" stroke="'+o.Primary+'" stroke-width="1.8" /><ellipse cx="12" cy="12" rx="4.1" ry="8.9" fill="none" stroke="'+o.Primary+'" stroke-width="1.2" /><line x1="3.1" y1="12" x2="20.9" y2="12" stroke="'+o.Primary+'" stroke-width="1" /><path d="M4.8 7.8C7 8.5 9.4 8.9 12 8.9C14.6 8.9 17 8.5 19.2 7.8" stroke="'+o.Primary+'" stroke-width="1" fill="none" /><path d="M4.8 16.2C7 15.5 9.4 15.1 12 15.1C14.6 15.1 17 15.5 19.2 16.2" stroke="'+o.Primary+'" stroke-width="1" fill="none" /></svg>'},"file-config":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M14.1 2.1H6.2C5 2.2 4.1 3 4.1 4.1V20.1C4 21.2 5 22 6.1 21.9H18C19.1 22 20 21.1 19.9 19.9V8.1L14.1 2.1Z" fill="'+o.Light+'" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><path d="M13.9 2.1V8.2H20" stroke="'+o.Primary+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><circle cx="12" cy="15" r="2.8" fill="none" stroke="'+o.Muted+'" stroke-width="1.5" /><line x1="12" y1="11" x2="12" y2="12.2" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="12" y1="17.8" x2="12" y2="19" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="14.8" y1="13.2" x2="15.8" y2="12.6" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="8.2" y1="17" x2="9.2" y2="16.4" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="14.8" y1="16.8" x2="15.8" y2="17.4" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /><line x1="8.2" y1="13" x2="9.2" y2="13.6" stroke="'+o.Muted+'" stroke-width="1.3" stroke-linecap="round" /></svg>'},home:function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M3.1 9.6L12 3.1L20.9 9.6V19.9C20.9 20.5 20.5 21 19.9 20.9H4.1C3.5 21 3 20.5 3.1 19.9V9.6Z" fill="'+o.TealTint+'" stroke="'+o.Accent+'" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /><rect x="9.2" y="14.1" width="5.6" height="6.9" rx="0.5" fill="'+o.Accent+'" /></svg>'},"arrow-up":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M12.1 19.1V5.1" stroke="'+o.Muted+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M5.2 11.9L12.1 5.1L18.9 11.9" stroke="'+o.Muted+'" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"chevron-right":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M9.2 6.1L14.8 12.1L9.1 17.9" stroke="'+o.Muted+'" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round" /></svg>'},"chevron-down":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M6.1 9.2L12.1 14.8L17.9 9.1" stroke="'+o.Muted+'" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round" /></svg>'},search:function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><circle cx="10.8" cy="10.8" r="6.8" stroke="'+o.Primary+'" stroke-width="1.8" /><line x1="15.9" y1="16.1" x2="20.8" y2="20.8" stroke="'+o.Primary+'" stroke-width="2" stroke-linecap="round" /></svg>'},"sort-asc":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M12 4.2L7.2 10.8H16.8L12 4.2Z" fill="'+o.Primary+'" /><path d="M12 19.8L7.2 13.2H16.8L12 19.8Z" fill="'+o.Muted+'" opacity="0.35" /></svg>'},"sort-desc":function(t){return'<svg width="'+t+'" height="'+t+'" viewBox="0 0 24 24" fill="none"><path d="M12 4.2L7.2 10.8H16.8L12 4.2Z" fill="'+o.Muted+'" opacity="0.35" /><path d="M12 19.8L7.2 13.2H16.8L12 19.8Z" fill="'+o.Primary+'" /></svg>'}},a={".jpg":"file-image",".jpeg":"file-image",".png":"file-image",".gif":"file-image",".svg":"file-image",".webp":"file-image",".bmp":"file-image",".ico":"file-image",".txt":"file-text",".md":"file-text",".rtf":"file-text",".doc":"file-text",".docx":"file-text",".pdf":"file-pdf",".xls":"file-spreadsheet",".xlsx":"file-spreadsheet",".csv":"file-spreadsheet",".ods":"file-spreadsheet",".js":"file-code",".ts":"file-code",".jsx":"file-code",".tsx":"file-code",".py":"file-code",".rb":"file-code",".java":"file-code",".c":"file-code",".cpp":"file-code",".h":"file-code",".go":"file-code",".rs":"file-code",".swift":"file-code",".kt":"file-code",".scala":"file-code",".sh":"file-code",".bash":"file-code",".zsh":"file-code",".php":"file-code",".lua":"file-code",".r":"file-code",".sql":"file-code",".pl":"file-code",".html":"file-web",".htm":"file-web",".css":"file-web",".scss":"file-web",".less":"file-web",".xml":"file-web",".json":"file-config",".yaml":"file-config",".yml":"file-config",".toml":"file-config",".ini":"file-config",".env":"file-config",".conf":"file-config",".cfg":"file-config",".zip":"file-archive",".tar":"file-archive",".gz":"file-archive",".rar":"file-archive",".7z":"file-archive",".bz2":"file-archive",".xz":"file-archive",".tgz":"file-archive",".mp3":"file-audio",".wav":"file-audio",".flac":"file-audio",".ogg":"file-audio",".aac":"file-audio",".wma":"file-audio",".m4a":"file-audio",".mp4":"file-video",".avi":"file-video",".mov":"file-video",".mkv":"file-video",".webm":"file-video",".wmv":"file-video",".flv":"file-video",".m4v":"file-video"},s=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._icons=Object.assign({},r),o._extensionMap=Object.assign({},a),o._cssInjected=!1,o}return _inherits(e,t),_createClass(e,[{key:"getIcon",value:function(t,e){var n=e||16,i=this._icons[t];return"function"==typeof i?i(n):""}},{key:"getIconForEntry",value:function(t,e){if(!t)return"";if(t.Icon&&"string"==typeof t.Icon&&0===t.Icon.indexOf("<svg"))return t.Icon;var n=e||16;if("folder"===t.Type)return this.getIcon("folder",n);var i=(t.Extension||"").toLowerCase();return i&&this._extensionMap[i]?this.getIcon(this._extensionMap[i],n):this.getIcon("file",n)}},{key:"getUIIcon",value:function(t,e){return this.getIcon(t,e||16)}},{key:"registerIcon",value:function(t,e){return!(!t||"function"!=typeof e)&&(this._icons[t]=e,!0)}},{key:"registerExtension",value:function(t,e){return!(!t||!e)&&(this._extensionMap[t.toLowerCase()]=e,!0)}},{key:"getIconNames",value:function(){return Object.keys(this._icons)}},{key:"getExtensionMap",value:function(){return Object.assign({},this._extensionMap)}},{key:"injectCSS",value:function(){this._cssInjected||this.pict&&this.pict.CSSMap&&(this.pict.CSSMap.addCSS("PictFileBrowserIcons",".pict-fb-svg-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }\n.pict-fb-svg-icon svg { display: block; }\n.pict-fb-tree-icon svg { width: 16px; height: 16px; }\n.pict-fb-detail-icon svg { width: 16px; height: 16px; }\n.pict-fb-icon-graphic svg { width: 36px; height: 36px; }\n.pict-fb-tree-toggle svg { width: 10px; height: 10px; }\n"),this._cssInjected=!0)}}])}(i);e.exports=s,e.exports.default_configuration={ProviderIdentifier:"Pict-FileBrowser-Icons",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0},e.exports.BuiltInIcons=r,e.exports.ExtensionMap=a,e.exports.Colors=o},{"pict-provider":58}],66:[function(t,e,n){var i=t("pict-provider"),o={"list-only":{Key:"list-only",Label:"List Only",Description:"Full-width file list",Panes:["list"],PaneCount:1,CSSClass:"pict-fb-layout-list-only"},"tree-list":{Key:"tree-list",Label:"Tree + List",Description:"Folder tree on the left, file list on the right",Panes:["browse","list"],PaneCount:2,CSSClass:"pict-fb-layout-tree-list"},"list-detail":{Key:"list-detail",Label:"List + Detail",Description:"File list on top, file details on the bottom",Panes:["list","view"],PaneCount:2,CSSClass:"pict-fb-layout-list-detail"},"tree-detail":{Key:"tree-detail",Label:"Tree + Detail",Description:"Folder tree on the left, file details on the right",Panes:["browse","view"],PaneCount:2,CSSClass:"pict-fb-layout-tree-detail"},"browser-detail":{Key:"browser-detail",Label:"Browser",Description:"Folder tree on the left, file list top-right, details bottom-right",Panes:["browse","list","view"],PaneCount:3,CSSClass:"pict-fb-layout-browser-detail"},"browser-columns":{Key:"browser-columns",Label:"Columns",Description:"Three-column layout: folder tree, file list, and file details side-by-side",Panes:["browse","list","view"],PaneCount:3,CSSClass:"pict-fb-layout-browser-columns"}},r=function(t){function e(t,n,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,n,i])).layouts=JSON.parse(JSON.stringify(o)),r}return _inherits(e,t),_createClass(e,[{key:"getLayouts",value:function(){return this.layouts}},{key:"getLayoutList",value:function(){var t=[];for(var e in this.layouts)t.push(this.layouts[e]);return t.sort(function(t,e){return t.PaneCount!==e.PaneCount?t.PaneCount-e.PaneCount:t.Key.localeCompare(e.Key)}),t}},{key:"getLayout",value:function(t){return this.layouts[t]||null}},{key:"getCurrentLayoutKey",value:function(){var t=this.getFileBrowserOption("StateAddresses",{}).Layout||"AppData.PictFileBrowser.Layout";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||"browser-detail"}},{key:"getCurrentLayout",value:function(){var t=this.getCurrentLayoutKey();return this.layouts[t]||this.layouts["browser-detail"]}},{key:"setLayout",value:function(t){if(!this.layouts[t])return!1;var e=this.getFileBrowserOption("StateAddresses",{}).Layout||"AppData.PictFileBrowser.Layout";return this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},e,t),!0}},{key:"isPaneVisible",value:function(t){return this.getCurrentLayout().Panes.indexOf(t)>=0}},{key:"registerLayout",value:function(t){return!(!t||!t.Key)&&(this.layouts[t.Key]=t,!0)}},{key:"getFileBrowserOption",value:function(t,e){if(this.pict.views&&this.pict.views["Pict-FileBrowser"]){var n=this.pict.views["Pict-FileBrowser"].options;if(n&&t in n)return n[t]}return e}}])}(i);e.exports=r,e.exports.default_configuration={ProviderIdentifier:"Pict-FileBrowser-Layout",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0},e.exports.BuiltInLayouts=o},{"pict-provider":58}],67:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i])).sortField="Name",o.sortAscending=!0,o}return _inherits(e,t),_createClass(e,[{key:"getFileList",value:function(){var t=this.getFileBrowserOption("FileListAddress","AppData.PictFileBrowser.FileList"),e=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t);return Array.isArray(e)?e:[]}},{key:"getSortedFileList",value:function(t){var e=(t||this.getFileList()).slice(),n=this.sortField,i=this.sortAscending;return e.sort(function(t,e){var o="folder"===t.Type?0:1,r="folder"===e.Type?0:1;if(o!==r)return o-r;var a=t[n],s=e[n];if(null==a&&null==s)return 0;if(null==a)return 1;if(null==s)return-1;var c=0;return c="string"==typeof a?a.localeCompare(s):a<s?-1:a>s?1:0,i?c:-c}),e}},{key:"setSortField",value:function(t){this.sortField===t?this.sortAscending=!this.sortAscending:(this.sortField=t,this.sortAscending=!0)}},{key:"selectFile",value:function(t){var e=this.getFileBrowserOption("StateAddresses",{}).CurrentFile||"AppData.PictFileBrowser.CurrentFile";this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},e,t||null)}},{key:"getSelectedFile",value:function(){var t=this.getFileBrowserOption("StateAddresses",{}).CurrentFile||"AppData.PictFileBrowser.CurrentFile";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||null}},{key:"openEntry",value:function(t){if(t)if("folder"===t.Type){var e=this.pict.providers["Pict-FileBrowser-Browse"];if(e){var n=this.getFileBrowserOption("StateAddresses",{}).CurrentLocation||"AppData.PictFileBrowser.CurrentLocation",i=this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},n)||"",o=i?i+"/"+t.Name:t.Name;e.navigateToFolder(o)}}else this.selectFile(t)}},{key:"formatFileSize",value:function(t){return null==t||isNaN(t)?"--":t<1024?t+" B":t<1048576?(t/1024).toFixed(1)+" KB":t<1073741824?(t/1048576).toFixed(1)+" MB":(t/1073741824).toFixed(1)+" GB"}},{key:"formatDate",value:function(t){if(!t)return"--";try{var e=new Date(t);return isNaN(e.getTime())?"--":e.toLocaleDateString()+" "+e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch(t){return"--"}}},{key:"getEntryIcon",value:function(t){if(!t)return"";if(t.Icon)return t.Icon;var e=this.pict.providers["Pict-FileBrowser-Icons"];if(e)return e.getIconForEntry(t,16);if("folder"===t.Type)return"📁";switch((t.Extension||"").toLowerCase()){case".jpg":case".jpeg":case".png":case".gif":case".svg":case".webp":case".bmp":return"🖼";case".pdf":default:return"📄";case".doc":case".docx":case".txt":case".md":case".rtf":return"📃";case".xls":case".xlsx":case".csv":return"📊";case".zip":case".tar":case".gz":case".rar":case".7z":return"📦";case".js":case".ts":case".py":case".rb":case".java":case".c":case".cpp":case".go":case".rs":return"💻";case".html":case".css":case".json":case".xml":case".yaml":case".yml":return"🌐";case".mp3":case".wav":case".flac":case".ogg":case".aac":return"🎵";case".mp4":case".avi":case".mov":case".mkv":case".webm":return"🎥"}}},{key:"getFileBrowserOption",value:function(t,e){if(this.pict.views&&this.pict.views["Pict-FileBrowser"]){var n=this.pict.views["Pict-FileBrowser"].options;if(n&&t in n)return n[t]}return e}}])}(t("pict-provider"));e.exports=i,e.exports.default_configuration={ProviderIdentifier:"Pict-FileBrowser-List",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0}},{"pict-provider":58}],68:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"getCurrentFile",value:function(){var t=this.getFileBrowserOption("StateAddresses",{}).CurrentFile||"AppData.PictFileBrowser.CurrentFile";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||null}},{key:"isImage",value:function(t){var e=t||this.getCurrentFile();if(!e)return!1;if(e.MimeType&&0===e.MimeType.indexOf("image/"))return!0;var n=(e.Extension||"").toLowerCase();return[".jpg",".jpeg",".png",".gif",".svg",".webp",".bmp",".ico",".tiff",".tif"].indexOf(n)>=0}},{key:"getImageURL",value:function(t){var e=t||this.getCurrentFile();return e&&(e.URL||e.ThumbnailURL)||null}},{key:"getFileTypeDescription",value:function(t){var e=t||this.getCurrentFile();if(!e)return"Unknown";if("folder"===e.Type)return"Folder";var n=(e.Extension||"").toLowerCase();switch(n){case".jpg":case".jpeg":return"JPEG Image";case".png":return"PNG Image";case".gif":return"GIF Image";case".svg":return"SVG Image";case".webp":return"WebP Image";case".bmp":return"Bitmap Image";case".pdf":return"PDF Document";case".doc":case".docx":return"Word Document";case".xls":case".xlsx":return"Excel Spreadsheet";case".csv":return"CSV File";case".txt":return"Text File";case".md":return"Markdown File";case".html":return"HTML File";case".css":return"CSS Stylesheet";case".js":return"JavaScript File";case".ts":return"TypeScript File";case".json":return"JSON File";case".xml":return"XML File";case".yaml":case".yml":return"YAML File";case".py":return"Python Script";case".rb":return"Ruby Script";case".java":return"Java File";case".c":return"C Source File";case".cpp":return"C++ Source File";case".go":return"Go Source File";case".rs":return"Rust Source File";case".zip":return"ZIP Archive";case".tar":return"TAR Archive";case".gz":return"GZip Archive";case".rar":return"RAR Archive";case".mp3":return"MP3 Audio";case".wav":return"WAV Audio";case".mp4":return"MP4 Video";case".avi":return"AVI Video";case".mov":return"QuickTime Video";default:return n?n.substring(1).toUpperCase()+" File":"File"}}},{key:"getFileBrowserOption",value:function(t,e){if(this.pict.views&&this.pict.views["Pict-FileBrowser"]){var n=this.pict.views["Pict-FileBrowser"].options;if(n&&t in n)return n[t]}return e}}])}(t("pict-provider"));e.exports=i,e.exports.default_configuration={ProviderIdentifier:"Pict-FileBrowser-View",AutoInitialize:!0,AutoInitializeOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0}},{"pict-provider":58}],69:[function(t,e,n){(function(n){(function(){
|
|
58
58
|
/**
|
|
59
59
|
* Pict FileBrowser Service
|
|
60
60
|
*
|
|
@@ -85,5 +85,5 @@ L.Builder=function(){this._ref="id",this._fields=Object.create(null),this._docum
|
|
|
85
85
|
* @license MIT
|
|
86
86
|
* @author Steven Velozo <steven@velozo.com>
|
|
87
87
|
*/
|
|
88
|
-
var i=t("fable-serviceproviderbase"),o=t("path"),r=t("fs"),a=t("url"),s={BasePath:".",APIRoutePrefix:"/api/filebrowser",WebAppRoute:"/filebrowser/*",WebAppRouteStrip:"/filebrowser/",ServeWebApp:!0,IncludeHiddenFiles:!1,MaxTreeDepth:2},c=function(t){function e(t,n,i){var r;for(var a in _classCallCheck(this,e),(r=_callSuper(this,e,[t,n,i])).serviceType="PictFileBrowserService",s)a in r.options||(r.options[a]=s[a]);return r.basePath=o.resolve(r.options.BasePath),r}return _inherits(e,t),_createClass(e,[{key:"connectRoutes",value:function(){var t=this;if(!this.fable.Orator||!this.fable.Orator.serviceServer)return this.log.error("PictFileBrowserService: Orator service server is not available. Initialize Orator first."),!1;var e=this.fable.Orator.serviceServer,i=this.options.APIRoutePrefix;if(e.get(i+"/list",function(e,n,i){var o=t.parseQueryParams(e).path||"";t.listDirectory(o,function(t,e){return t?(n.send(400,{Error:t.message}),i()):(n.send(e),i())})}),e.get(i+"/tree",function(e,n,i){var o=t.parseQueryParams(e),r=t.options.MaxTreeDepth;o.depth&&(r=parseInt(o.depth)||t.options.MaxTreeDepth),t.buildFolderTree("",r,function(t,e){return t?(n.send(400,{Error:t.message}),i()):(n.send(e),i())})}),e.get(i+"/info",function(e,n,i){var o=t.parseQueryParams(e).path||"";t.getFileInfo(o,function(t,e){return t?(n.send(400,{Error:t.message}),i()):(n.send(e),i())})}),e.get(i+"/children",function(e,n,i){var o=t.parseQueryParams(e).path||"";t.listChildFolders(o,function(t,e){return t?(n.send(400,{Error:t.message}),i()):(n.send(e),i())})}),this.options.ServeWebApp){var r=o.join(n,"..","www");this.fable.Orator.addStaticRoute(r,"index.html",this.options.WebAppRoute,this.options.WebAppRouteStrip)}return this.log.info("PictFileBrowserService: Routes connected. Browsing path: "+this.basePath),!0}},{key:"parseQueryParams",value:function(t){return t.query&&"object"===_typeof(t.query)?t.query:a.parse(t.url,!0).query||{}}},{key:"resolveSafePath",value:function(t){var e=(t||"").replace(/\.\./g,"").replace(/\/\//g,"/"),n=o.resolve(this.basePath,e);return 0!==n.indexOf(this.basePath)?null:n}},{key:"listDirectory",value:function(t,e){var n=this,i=this.resolveSafePath(t);if(!i)return e(new Error("Invalid path"));r.readdir(i,{withFileTypes:!0},function(a,s){if(a)return"ENOENT"===a.code?e(new Error("Path not found")):"ENOTDIR"===a.code?e(new Error("Path is not a directory")):e(a);var c=[],l=s.length;if(0===l)return e(null,c);for(var d=0;d<s.length;d++){var p=s[d],u=p.name;if(n.options.IncludeHiddenFiles||"."!==u.charAt(0)){var h=o.join(i,u),f=t?t+"/"+u:u;r.stat(h,function(t,n,i){return function(r,a){var s={Name:t,Path:n,Type:i?"folder":"file"};if(a&&!r&&(s.Size=a.size,s.Modified=a.mtime,s.Created=a.birthtime,i||(s.Extension=o.extname(t))),c.push(s),0===--l)return e(null,c)}}(u,f,p.isDirectory()))}else if(0===--l)return e(null,c)}})}},{key:"listChildFolders",value:function(t,e){var n=this,i=this.resolveSafePath(t);if(!i)return e(new Error("Invalid path"));r.readdir(i,{withFileTypes:!0},function(a,s){if(a)return"ENOENT"===a.code?e(new Error("Path not found")):"ENOTDIR"===a.code?e(new Error("Path is not a directory")):e(a);for(var c=[],l=0;l<s.length;l++)if(s[l].isDirectory()){var d=s[l].name;(n.options.IncludeHiddenFiles||"."!==d.charAt(0))&&c.push(d)}if(c.sort(function(t,e){return t.localeCompare(e)}),0===c.length)return e(null,[]);for(var p=[],u=c.length,h=0;h<c.length;h++){var f=c[h],v=o.join(i,f),g=t?t+"/"+f:f;r.readdir(v,{withFileTypes:!0},function(t,i){return function(o,r){var a=!1;if(!o&&r)for(var s=0;s<r.length;s++)if(r[s].isDirectory()){var c=r[s].name;if(n.options.IncludeHiddenFiles||"."!==c.charAt(0)){a=!0;break}}if(p.push({Name:t,Path:i,HasChildren:a}),0===--u)return p.sort(function(t,e){return t.Name.localeCompare(e.Name)}),e(null,p)}}(f,g))}})}},{key:"buildFolderTree",value:function(t,e,n){var i=this.resolveSafePath(t);if(!i)return n(new Error("Invalid path"));this._buildTreeRecursive(i,t,e,0,n)}},{key:"_buildTreeRecursive",value:function(t,e,n,i,a){var s=this;if(n>0&&i>=n)return a(null,[]);r.readdir(t,{withFileTypes:!0},function(r,c){if(r)return a(null,[]);for(var l=[],d=0;d<c.length;d++)if(c[d].isDirectory()){var p=c[d].name;if(!s.options.IncludeHiddenFiles&&"."===p.charAt(0))continue;l.push(p)}if(0===l.length)return a(null,[]);for(var u=[],h=l.length,f=0;f<l.length;f++){var v=l[f],g=o.join(t,v),m=e?e+"/"+v:v;s._buildTreeRecursive(g,m,n,i+1,function(t,e){return function(n,i){if(u.push({Name:t,Path:e,Children:i||[]}),0===--h)return u.sort(function(t,e){return t.Name.localeCompare(e.Name)}),a(null,u)}}(v,m))}})}},{key:"getFileInfo",value:function(t,e){var n=this.resolveSafePath(t);if(!n)return e(new Error("Invalid path"));r.stat(n,function(i,r){if(i)return"ENOENT"===i.code?e(new Error("Path not found")):e(i);var a=o.basename(n),s={Name:a,Path:t||a,Type:r.isDirectory()?"folder":"file",Size:r.size,Modified:r.mtime,Created:r.birthtime};return r.isDirectory()||(s.Extension=o.extname(a)),e(null,s)})}}])}(i);e.exports=c,e.exports.default_configuration=s}).call(this)}).call(this,"/node_modules/pict-section-filebrowser/source/services")},{"fable-serviceproviderbase":20,fs:2,path:42,url:100}],70:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-BrowseSearch",DefaultRenderable:"BrowseSearch-Container",DefaultDestinationAddress:"#Pict-FileBrowser-BrowsePane",AutoRender:!1,Templates:[{Hash:"FileBrowser-BrowseSearch-Container-Template",Template:'\n<div class="pict-fb-search">\n\t<input type="text" class="pict-fb-search-input"\n\t\tid="Pict-FileBrowser-SearchInput"\n\t\tplaceholder="Search files..."\n\t\toninput="pict.views[\'{~D:Record.ViewHash~}\'].onSearchInput(this.value)" />\n\t<div class="pict-fb-search-results" id="Pict-FileBrowser-SearchResults"></div>\n</div>\n'},{Hash:"FileBrowser-BrowseSearch-Result-Template",Template:'\n<div class="pict-fb-search-result" onclick="{~D:Record.ClickHandler~}">\n\t<span class="pict-fb-search-result-icon">{~D:Record.Icon~}</span>\n\t<span class="pict-fb-search-result-name">{~D:Record.Name~}</span>\n\t<span class="pict-fb-search-result-path">{~D:Record.Path~}</span>\n</div>\n'},{Hash:"FileBrowser-BrowseSearch-Empty-Template",Template:'<div class="pict-fb-empty">{~D:Record.Message~}</div>'}],Renderables:[{RenderableHash:"BrowseSearch-Container",TemplateHash:"FileBrowser-BrowseSearch-Container-Template",DestinationAddress:"#Pict-FileBrowser-BrowsePane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},o,n),i])).lastQuery="",r.debounceTimer=null,r}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){var n=this.pict.parseTemplateByHash("FileBrowser-BrowseSearch-Container-Template",{ViewHash:this.Hash});return this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-BrowsePane",n),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"onSearchInput",value:function(t){var e=this;this.lastQuery=t||"",this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){e.performSearch(e.lastQuery)},150)}},{key:"performSearch",value:function(t){var e="#Pict-FileBrowser-SearchResults";if(!t||t.length<1)this.pict.ContentAssignment.assignContent(e,"");else{var n=this.pict.providers["Pict-FileBrowser-Browse"];if(n){var i=n.searchFiles(t),o=this.pict.providers["Pict-FileBrowser-List"];if(0!==i.length){for(var r="",a=0;a<i.length&&a<50;a++){var s=i[a],c=o?o.getEntryIcon(s):"📄",l=s.Path||"",d={Name:s.Name,Path:l,Icon:c,ClickHandler:"pict.views['"+this.Hash+"'].selectResult("+a+")"};r+=this.pict.parseTemplateByHash("FileBrowser-BrowseSearch-Result-Template",d)}this.pict.ContentAssignment.assignContent(e,r),this._lastResults=i}else{var p=this.pict.parseTemplateByHash("FileBrowser-BrowseSearch-Empty-Template",{Message:"No results found"});this.pict.ContentAssignment.assignContent(e,p)}}}}},{key:"selectResult",value:function(t){if(this._lastResults&&!(t>=this._lastResults.length)){var e=this._lastResults[t],n=this.pict.providers["Pict-FileBrowser-List"];n&&n.openEntry(e)}}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":88}],71:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-BrowseTree",DefaultRenderable:"BrowseTree-Container",DefaultDestinationAddress:"#Pict-FileBrowser-BrowsePane",AutoRender:!1,Templates:[{Hash:"FileBrowser-BrowseTree-Container-Template",Template:'<div class="pict-fb-tree" id="Pict-FileBrowser-Tree"></div>'},{Hash:"FileBrowser-BrowseTree-Node-Template",Template:'\n<div class="pict-fb-tree-node{~D:Record.SelectedClass~}" style="padding-left: {~D:Record.Indent~}px;" data-path="{~D:Record.Path~}" onclick="{~D:Record.ClickHandler~}">\n\t<span class="{~D:Record.ToggleClass~}" onclick="{~D:Record.ToggleHandler~}">{~D:Record.ToggleIcon~}</span>\n\t<span class="pict-fb-tree-icon">{~D:Record.Icon~}</span>\n\t<span class="pict-fb-tree-label">{~D:Record.Name~}</span>\n</div>\n<div class="pict-fb-tree-children{~D:Record.ExpandedClass~}" id="Pict-FB-TreeChildren-{~D:Record.NodeID~}">\n{~D:Record.ChildrenHTML~}\n</div>\n'}],Renderables:[{RenderableHash:"BrowseTree-Container",TemplateHash:"FileBrowser-BrowseTree-Container-Template",DestinationAddress:"#Pict-FileBrowser-BrowsePane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},o,n),i])).expandedPaths={},r}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){return this.rebuildTree(),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"rebuildTree",value:function(){if(this.pict.providers["Pict-FileBrowser-Browse"]){var t=this.getCurrentLocation(),e=this.renderTreeLevel("",0,t);this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-Tree",e)}}},{key:"renderTreeLevel",value:function(t,e,n){var i=this.pict.providers["Pict-FileBrowser-Browse"];if(!i)return"";var o=i.getChildFolders(t);if(!o)return this.expandedPaths[t]?'<div class="pict-fb-tree-loading" style="padding-left: '+(24+16*e)+'px;">Loading...</div>':"";for(var r="",a=0;a<o.length;a++){var s=o[a],c=s.Path,l=c.replace(/[^a-zA-Z0-9]/g,"_"),d=!!this.expandedPaths[c],p=c===n,u=i.getChildFolders(c),h=s.HasChildren||u&&u.length>0,f="";d&&(f=this.renderTreeLevel(c,e+1,n));var v=this.pict.providers["Pict-FileBrowser-Icons"],g=v?v.getIcon("folder",16):"📁",m="";h&&(m=v?d?v.getIcon("chevron-down",10):v.getIcon("chevron-right",10):d?"▾":"▸");var y={Name:s.Name,Path:c,NodeID:l,Indent:8+16*e,Icon:g,ToggleIcon:m,ToggleClass:h?"pict-fb-tree-toggle":"pict-fb-tree-toggle-empty",ToggleHandler:h?"event.stopPropagation(); pict.views['"+this.Hash+"'].toggleNode('"+c+"')":"",ClickHandler:"pict.views['"+this.Hash+"'].selectFolder('"+c+"')",SelectedClass:p?" selected":"",ExpandedClass:d?" expanded":"",ChildrenHTML:f};r+=this.pict.parseTemplateByHash("FileBrowser-BrowseTree-Node-Template",y)}return r}},{key:"toggleNode",value:function(t){if(this.expandedPaths[t]=!this.expandedPaths[t],this.expandedPaths[t]){var e=this.pict.providers["Pict-FileBrowser-Browse"];if(e)e.getChildFolders(t)||"function"==typeof this.onRequestChildren&&this.onRequestChildren(t)}this.rebuildTree()}},{key:"onRequestChildren",value:function(t){}},{key:"selectFolder",value:function(t){this.expandedPaths[t]=!0;var e=this.pict.providers["Pict-FileBrowser-Browse"];e&&(e.getChildFolders(t)||"function"==typeof this.onRequestChildren&&this.onRequestChildren(t),e.navigateToFolder(t));this.rebuildTree()}},{key:"getCurrentLocation",value:function(){var t=(this.options.StateAddresses||{}).CurrentLocation||"AppData.PictFileBrowser.CurrentLocation";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||""}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":88}],72:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-ListDetail",DefaultRenderable:"ListDetail-Container",DefaultDestinationAddress:"#Pict-FileBrowser-ListPane",AutoRender:!1,Templates:[{Hash:"FileBrowser-ListDetail-Container-Template",Template:'\n<div class="pict-fb-detail" id="Pict-FileBrowser-DetailList">\n\t<div class="pict-fb-breadcrumb" id="Pict-FileBrowser-Breadcrumb"></div>\n\t<div class="pict-fb-detail-header">\n\t\t<div class="pict-fb-detail-header-cell pict-fb-detail-col-name" onclick="pict.views[\'{~D:Record.ViewHash~}\'].sortBy(\'Name\')">Name</div>\n\t\t<div class="pict-fb-detail-header-cell pict-fb-detail-col-size" onclick="pict.views[\'{~D:Record.ViewHash~}\'].sortBy(\'Size\')">Size</div>\n\t\t<div class="pict-fb-detail-header-cell pict-fb-detail-col-modified" onclick="pict.views[\'{~D:Record.ViewHash~}\'].sortBy(\'Modified\')">Modified</div>\n\t</div>\n\t<div id="Pict-FileBrowser-DetailRows"></div>\n</div>\n'},{Hash:"FileBrowser-ListDetail-Row-Template",Template:'\n<div class="pict-fb-detail-row{~D:Record.SelectedClass~}" data-index="{~D:Record.Index~}" onclick="{~D:Record.ClickHandler~}" ondblclick="{~D:Record.DblClickHandler~}">\n\t<span class="pict-fb-detail-icon">{~D:Record.Icon~}</span>\n\t<span class="pict-fb-detail-name">{~D:Record.Name~}</span>\n\t<span class="pict-fb-detail-size">{~D:Record.SizeFormatted~}</span>\n\t<span class="pict-fb-detail-modified">{~D:Record.ModifiedFormatted~}</span>\n</div>\n'},{Hash:"FileBrowser-ListDetail-Empty-Template",Template:'<div class="pict-fb-empty">{~D:Record.Message~}</div>'},{Hash:"FileBrowser-Breadcrumb-Segment-Template",Template:'<span class="pict-fb-breadcrumb-segment" onclick="{~D:Record.ClickHandler~}">{~D:Record.Label~}</span>'},{Hash:"FileBrowser-Breadcrumb-Separator-Template",Template:'<span class="pict-fb-breadcrumb-separator">/</span>'},{Hash:"FileBrowser-Breadcrumb-Current-Template",Template:'<span class="pict-fb-breadcrumb-current">{~D:Record.Label~}</span>'}],Renderables:[{RenderableHash:"ListDetail-Container",TemplateHash:"FileBrowser-ListDetail-Container-Template",DestinationAddress:"#Pict-FileBrowser-ListPane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},o,n),i]))._cachedFileList=[],r}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){var n=this.pict.parseTemplateByHash("FileBrowser-ListDetail-Container-Template",{ViewHash:this.Hash});return this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-ListPane",n),this.rebuildList(),this.rebuildBreadcrumb(),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"rebuildList",value:function(){var t=this.pict.providers["Pict-FileBrowser-List"];if(t){var e=t.getSortedFileList();this._cachedFileList=e;var n=t.getSelectedFile();if(0!==e.length){for(var i="",o=0;o<e.length;o++){var r=e[o],a=n&&n.Name===r.Name&&n.Path===r.Path,s={Index:o,Name:r.Name,Icon:t.getEntryIcon(r),SizeFormatted:"folder"===r.Type?"--":t.formatFileSize(r.Size),ModifiedFormatted:t.formatDate(r.Modified),SelectedClass:a?" selected":"",ClickHandler:"pict.views['"+this.Hash+"'].selectEntry("+o+")",DblClickHandler:"pict.views['"+this.Hash+"'].openEntry("+o+")"};i+=this.pict.parseTemplateByHash("FileBrowser-ListDetail-Row-Template",s)}this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-DetailRows",i)}else{var c=this.pict.parseTemplateByHash("FileBrowser-ListDetail-Empty-Template",{Message:"This folder is empty"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-DetailRows",c)}}}},{key:"rebuildBreadcrumb",value:function(){var t=this.getCurrentLocation(),e="",n=this.pict.providers["Pict-FileBrowser-Icons"],i=n?n.getIcon("home",16):"🏠";if(e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Segment-Template",{Label:i,ClickHandler:"pict.views['"+this.Hash+"'].navigateToPath('')"}),t)for(var o=t.split("/"),r="",a=0;a<o.length;a++)if(r=r?r+"/"+o[a]:o[a],e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Separator-Template",{}),a===o.length-1)e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Current-Template",{Label:o[a]});else{var s=r;e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Segment-Template",{Label:o[a],ClickHandler:"pict.views['"+this.Hash+"'].navigateToPath('"+s+"')"})}this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-Breadcrumb",e)}},{key:"selectEntry",value:function(t){if(!(t<0||t>=this._cachedFileList.length)){var e=this.pict.providers["Pict-FileBrowser-List"];e&&e.selectFile(this._cachedFileList[t]),this.rebuildList()}}},{key:"openEntry",value:function(t){if(!(t<0||t>=this._cachedFileList.length)){var e=this.pict.providers["Pict-FileBrowser-List"];e&&e.openEntry(this._cachedFileList[t]),this.rebuildList(),this.rebuildBreadcrumb()}}},{key:"sortBy",value:function(t){var e=this.pict.providers["Pict-FileBrowser-List"];e&&e.setSortField(t),this.rebuildList()}},{key:"navigateToPath",value:function(t){var e=this.pict.providers["Pict-FileBrowser-Browse"];e&&e.navigateToFolder(t),this.rebuildList(),this.rebuildBreadcrumb()}},{key:"getCurrentLocation",value:function(){var t=(this.options.StateAddresses||{}).CurrentLocation||"AppData.PictFileBrowser.CurrentLocation";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||""}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":88}],73:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-ListIcons",DefaultRenderable:"ListIcons-Container",DefaultDestinationAddress:"#Pict-FileBrowser-ListPane",AutoRender:!1,Templates:[{Hash:"FileBrowser-ListIcons-Container-Template",Template:'\n<div id="Pict-FileBrowser-IconList">\n\t<div class="pict-fb-breadcrumb" id="Pict-FileBrowser-IconBreadcrumb"></div>\n\t<div class="pict-fb-icons" id="Pict-FileBrowser-IconGrid"></div>\n</div>\n'},{Hash:"FileBrowser-ListIcons-Item-Template",Template:'\n<div class="pict-fb-icon-item{~D:Record.SelectedClass~}" data-index="{~D:Record.Index~}" onclick="{~D:Record.ClickHandler~}" ondblclick="{~D:Record.DblClickHandler~}">\n\t<div class="pict-fb-icon-graphic">{~D:Record.Icon~}</div>\n\t<div class="pict-fb-icon-label">{~D:Record.Name~}</div>\n</div>\n'},{Hash:"FileBrowser-ListIcons-Empty-Template",Template:'<div class="pict-fb-empty">{~D:Record.Message~}</div>'}],Renderables:[{RenderableHash:"ListIcons-Container",TemplateHash:"FileBrowser-ListIcons-Container-Template",DestinationAddress:"#Pict-FileBrowser-ListPane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},o,n),i]))._cachedFileList=[],r}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){return this.rebuildGrid(),this.rebuildBreadcrumb(),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"rebuildGrid",value:function(){var t=this.pict.providers["Pict-FileBrowser-List"];if(t){var e=t.getSortedFileList();this._cachedFileList=e;var n=t.getSelectedFile();if(0!==e.length){for(var i="",o=0;o<e.length;o++){var r=e[o],a=n&&n.Name===r.Name&&n.Path===r.Path,s={Index:o,Name:r.Name,Icon:t.getEntryIcon(r),SelectedClass:a?" selected":"",ClickHandler:"pict.views['"+this.Hash+"'].selectEntry("+o+")",DblClickHandler:"pict.views['"+this.Hash+"'].openEntry("+o+")"};i+=this.pict.parseTemplateByHash("FileBrowser-ListIcons-Item-Template",s)}this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-IconGrid",i)}else{var c=this.pict.parseTemplateByHash("FileBrowser-ListIcons-Empty-Template",{Message:"This folder is empty"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-IconGrid",c)}}}},{key:"rebuildBreadcrumb",value:function(){var t=this.getCurrentLocation(),e="";if(e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Segment-Template",{Label:"🏠",ClickHandler:"pict.views['"+this.Hash+"'].navigateToPath('')"}),t)for(var n=t.split("/"),i="",o=0;o<n.length;o++)if(i=i?i+"/"+n[o]:n[o],e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Separator-Template",{}),o===n.length-1)e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Current-Template",{Label:n[o]});else{var r=i;e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Segment-Template",{Label:n[o],ClickHandler:"pict.views['"+this.Hash+"'].navigateToPath('"+r+"')"})}this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-IconBreadcrumb",e)}},{key:"selectEntry",value:function(t){if(!(t<0||t>=this._cachedFileList.length)){var e=this.pict.providers["Pict-FileBrowser-List"];e&&e.selectFile(this._cachedFileList[t]),this.rebuildGrid()}}},{key:"openEntry",value:function(t){if(!(t<0||t>=this._cachedFileList.length)){var e=this.pict.providers["Pict-FileBrowser-List"];e&&e.openEntry(this._cachedFileList[t]),this.rebuildGrid(),this.rebuildBreadcrumb()}}},{key:"navigateToPath",value:function(t){var e=this.pict.providers["Pict-FileBrowser-Browse"];e&&e.navigateToFolder(t),this.rebuildGrid(),this.rebuildBreadcrumb()}},{key:"getCurrentLocation",value:function(){var t=(this.options.StateAddresses||{}).CurrentLocation||"AppData.PictFileBrowser.CurrentLocation";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||""}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":88}],74:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-ViewFileInfo",DefaultRenderable:"ViewFileInfo-Container",DefaultDestinationAddress:"#Pict-FileBrowser-ViewPane",AutoRender:!1,Templates:[{Hash:"FileBrowser-ViewFileInfo-Container-Template",Template:'<div class="pict-fb-fileinfo" id="Pict-FileBrowser-FileInfo"></div>'},{Hash:"FileBrowser-ViewFileInfo-Detail-Template",Template:'\n<div class="pict-fb-fileinfo-title">{~D:Record.Name~}</div>\n<table class="pict-fb-fileinfo-table">\n\t<tr>\n\t\t<td class="pict-fb-fileinfo-label">Type</td>\n\t\t<td class="pict-fb-fileinfo-value">{~D:Record.TypeDescription~}</td>\n\t</tr>\n\t<tr>\n\t\t<td class="pict-fb-fileinfo-label">Size</td>\n\t\t<td class="pict-fb-fileinfo-value">{~D:Record.SizeFormatted~}</td>\n\t</tr>\n\t<tr>\n\t\t<td class="pict-fb-fileinfo-label">Modified</td>\n\t\t<td class="pict-fb-fileinfo-value">{~D:Record.ModifiedFormatted~}</td>\n\t</tr>\n\t<tr>\n\t\t<td class="pict-fb-fileinfo-label">Extension</td>\n\t\t<td class="pict-fb-fileinfo-value">{~D:Record.Extension~}</td>\n\t</tr>\n\t<tr>\n\t\t<td class="pict-fb-fileinfo-label">Path</td>\n\t\t<td class="pict-fb-fileinfo-value">{~D:Record.Path~}</td>\n\t</tr>\n</table>\n'},{Hash:"FileBrowser-ViewFileInfo-Empty-Template",Template:'<div class="pict-fb-fileinfo-none">No file selected</div>'}],Renderables:[{RenderableHash:"ViewFileInfo-Container",TemplateHash:"FileBrowser-ViewFileInfo-Container-Template",DestinationAddress:"#Pict-FileBrowser-ViewPane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,Object.assign({},o,n),i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){return this.rebuildFileInfo(),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"rebuildFileInfo",value:function(){var t=this.pict.providers["Pict-FileBrowser-View"],e=this.pict.providers["Pict-FileBrowser-List"],n=t?t.getCurrentFile():null;if(n){var i={Name:n.Name||"Unknown",TypeDescription:t?t.getFileTypeDescription(n):"File",SizeFormatted:e?e.formatFileSize(n.Size):n.Size||"--",ModifiedFormatted:e?e.formatDate(n.Modified):n.Modified||"--",Extension:n.Extension||"--",Path:n.Path||"--"},o=this.pict.parseTemplateByHash("FileBrowser-ViewFileInfo-Detail-Template",i);this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-FileInfo",o)}else{var r=this.pict.parseTemplateByHash("FileBrowser-ViewFileInfo-Empty-Template",{});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-FileInfo",r)}}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":88}],75:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-ViewImage",DefaultRenderable:"ViewImage-Container",DefaultDestinationAddress:"#Pict-FileBrowser-ViewPane",AutoRender:!1,Templates:[{Hash:"FileBrowser-ViewImage-Container-Template",Template:'<div class="pict-fb-image-viewer" id="Pict-FileBrowser-ImageViewer"></div>'},{Hash:"FileBrowser-ViewImage-Display-Template",Template:'<img src="{~D:Record.ImageURL~}" alt="{~D:Record.Name~}" />'},{Hash:"FileBrowser-ViewImage-NoImage-Template",Template:'<div class="pict-fb-image-viewer-none">{~D:Record.Message~}</div>'}],Renderables:[{RenderableHash:"ViewImage-Container",TemplateHash:"FileBrowser-ViewImage-Container-Template",DestinationAddress:"#Pict-FileBrowser-ViewPane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,Object.assign({},o,n),i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){return this.rebuildImageView(),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"rebuildImageView",value:function(){var t=this.pict.providers["Pict-FileBrowser-View"],e=t?t.getCurrentFile():null;if(e){if(!!t&&t.isImage(e)){var n=t?t.getImageURL(e):null;if(n){var i=this.pict.parseTemplateByHash("FileBrowser-ViewImage-Display-Template",{ImageURL:n,Name:e.Name||"Image"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-ImageViewer",i)}else{var o=this.pict.parseTemplateByHash("FileBrowser-ViewImage-NoImage-Template",{Message:"No image URL available"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-ImageViewer",o)}}else{var r=this.pict.parseTemplateByHash("FileBrowser-ViewImage-NoImage-Template",{Message:"Selected file is not an image"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-ImageViewer",r)}}else{var a=this.pict.parseTemplateByHash("FileBrowser-ViewImage-NoImage-Template",{Message:"No file selected"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-ImageViewer",a)}}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":88}],76:[function(t,e,n){var i=t("pict-view"),o=t("../Pict-Section-FileBrowser-DefaultConfiguration.js"),r=t("../providers/Pict-Provider-FileBrowserBrowse.js"),a=t("../providers/Pict-Provider-FileBrowserList.js"),s=t("../providers/Pict-Provider-FileBrowserView.js"),c=t("../providers/Pict-Provider-FileBrowserLayout.js"),l=t("../providers/Pict-Provider-FileBrowserIcons.js"),d=function(t){function e(t,n,i){var d;return _classCallCheck(this,e),(d=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(o)),n),i])).pict.providers["Pict-FileBrowser-Browse"]||d.pict.addProvider("Pict-FileBrowser-Browse",r.default_configuration,r),d.pict.providers["Pict-FileBrowser-List"]||d.pict.addProvider("Pict-FileBrowser-List",a.default_configuration,a),d.pict.providers["Pict-FileBrowser-View"]||d.pict.addProvider("Pict-FileBrowser-View",s.default_configuration,s),d.pict.providers["Pict-FileBrowser-Layout"]||d.pict.addProvider("Pict-FileBrowser-Layout",c.default_configuration,c),d.pict.providers["Pict-FileBrowser-Icons"]||d.pict.addProvider("Pict-FileBrowser-Icons",l.default_configuration,l),d.ensureDefaultState(),d}return _inherits(e,t),_createClass(e,[{key:"ensureDefaultState",value:function(){var t=this.options.DefaultState||{},e=this.options.StateAddresses||{},n={AppData:this.pict.AppData,Pict:this.pict};for(var i in this.pict.AppData.PictFileBrowser||(this.pict.AppData.PictFileBrowser={}),e){var o=e[i],r=this.pict.manifest.getValueByHash(n,o);if(null==r){var a=t[i];void 0!==a&&this.pict.manifest.setValueByHash(n,o,a)}}this.pict.AppData.PictFileBrowser.FileList||(this.pict.AppData.PictFileBrowser.FileList=[]),this.pict.AppData.PictFileBrowser.FolderTree||(this.pict.AppData.PictFileBrowser.FolderTree=[])}},{key:"onAfterRender",value:function(t){return this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"getState",value:function(t){var e=(this.options.StateAddresses||{})[t];if(e)return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},e)}},{key:"setState",value:function(t,e){var n=(this.options.StateAddresses||{})[t];n&&this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},n,e)}}])}(i);e.exports=d,e.exports.default_configuration=o},{"../Pict-Section-FileBrowser-DefaultConfiguration.js":62,"../providers/Pict-Provider-FileBrowserBrowse.js":64,"../providers/Pict-Provider-FileBrowserIcons.js":65,"../providers/Pict-Provider-FileBrowserLayout.js":66,"../providers/Pict-Provider-FileBrowserList.js":67,"../providers/Pict-Provider-FileBrowserView.js":68,"pict-view":88}],77:[function(t,e,n){arguments[4][45][0].apply(n,arguments)},{"./providers/Pict-Provider-Content.js":78,"./views/Pict-View-Content.js":79,dup:45}],78:[function(t,e,n){arguments[4][46][0].apply(n,arguments)},{dup:46,"pict-provider":58,"pict-section-code":61}],79:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"displayContent",value:function(t,e){var n=e||"Pict-Content-Body";this.pict.ContentAssignment.assignContent("#"+n,t);var i=document.getElementById(n);i&&i.parentElement&&(i.parentElement.scrollTop=0),this.renderMermaidDiagrams(n),this.renderKaTeXEquations(n)}},{key:"renderMermaidDiagrams",value:function(t){if("undefined"!=typeof mermaid){var e=t||"Pict-Content-Body",n=document.getElementById(e);if(n){var i=n.querySelectorAll("pre.mermaid");if(!(i.length<1))try{mermaid.run({nodes:i})}catch(t){this.log.error("Mermaid rendering error: "+t.message)}}}}},{key:"renderKaTeXEquations",value:function(t){if("undefined"!=typeof katex){var e=t||"Pict-Content-Body",n=document.getElementById(e);if(n){for(var i=n.querySelectorAll(".pict-content-katex-inline"),o=0;o<i.length;o++)try{katex.render(i[o].textContent,i[o],{throwOnError:!1,displayMode:!1})}catch(t){this.log.warn("KaTeX inline error: "+t.message)}for(var r=n.querySelectorAll(".pict-content-katex-display"),a=0;a<r.length;a++)try{katex.render(r[a].textContent,r[a],{throwOnError:!1,displayMode:!0})}catch(t){this.log.warn("KaTeX display error: "+t.message)}}}}},{key:"showLoading",value:function(t,e){var n=e||"Pict-Content-Body",i=t||"Loading content...";this.pict.ContentAssignment.assignContent("#"+n,'<div class="pict-content-loading">'+i+"</div>")}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Pict-Content",DefaultRenderable:"Pict-Content-Display",DefaultDestinationAddress:"#Pict-Content-Container",AutoRender:!1,CSS:"\n\t\t.pict-content {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.pict-content-loading {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 200px;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.pict-content h1 {\n\t\t\tfont-size: 2em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tpadding-bottom: 0.3em;\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.pict-content h2 {\n\t\t\tfont-size: 1.5em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\n\t\t\tpadding-bottom: 0.25em;\n\t\t\tmargin-top: 1.5em;\n\t\t}\n\t\t.pict-content h3 {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin-top: 1.25em;\n\t\t}\n\t\t.pict-content h4, .pict-content h5, .pict-content h6 {\n\t\t\tcolor: #5E5549;\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.pict-content p {\n\t\t\tline-height: 1.7;\n\t\t\tcolor: #423D37;\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.pict-content a {\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.pict-content a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.pict-content pre {\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 1.25em;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t.pict-content code {\n\t\t\tbackground: #F0ECE4;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #9E6B47;\n\t\t}\n\t\t.pict-content-code-wrap {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1.5;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow: auto;\n\t\t\tmargin: 1em 0;\n\t\t\tbackground: #3D3229;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers {\n\t\t\tposition: sticky;\n\t\t\tleft: 0;\n\t\t\twidth: 40px;\n\t\t\tmin-width: 40px;\n\t\t\tpadding: 1.25em 0;\n\t\t\ttext-align: right;\n\t\t\tbackground: #342A22;\n\t\t\tborder-right: 1px solid #4A3F35;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 13px;\n\t\t\tline-height: 1.5;\n\t\t\tuser-select: none;\n\t\t\tpointer-events: none;\n\t\t\tbox-sizing: border-box;\n\t\t\tz-index: 1;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers span {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0 8px 0 0;\n\t\t}\n\t\t.pict-content-code-wrap pre {\n\t\t\tmargin: 0;\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 1.25em 1.25em 1.25em 8px;\n\t\t\tborder-radius: 0 6px 6px 0;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: inherit;\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.pict-content-code-wrap pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.pict-content-code-wrap .keyword { color: #C678DD; }\n\t\t.pict-content-code-wrap .string { color: #98C379; }\n\t\t.pict-content-code-wrap .number { color: #D19A66; }\n\t\t.pict-content-code-wrap .comment { color: #7F848E; font-style: italic; }\n\t\t.pict-content-code-wrap .operator { color: #56B6C2; }\n\t\t.pict-content-code-wrap .punctuation { color: #E8E0D4; }\n\t\t.pict-content-code-wrap .function-name { color: #61AFEF; }\n\t\t.pict-content-code-wrap .property { color: #E06C75; }\n\t\t.pict-content-code-wrap .tag { color: #E06C75; }\n\t\t.pict-content-code-wrap .attr-name { color: #D19A66; }\n\t\t.pict-content-code-wrap .attr-value { color: #98C379; }\n\t\t.pict-content pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content blockquote {\n\t\t\tborder-left: 4px solid #2E7D74;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: #F7F5F0;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.pict-content blockquote p {\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-content ul, .pict-content ol {\n\t\t\tpadding-left: 2em;\n\t\t\tline-height: 1.8;\n\t\t}\n\t\t.pict-content li {\n\t\t\tmargin: 0.25em 0;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid #DDD6CA;\n\t\t\tmargin: 2em 0;\n\t\t}\n\t\t.pict-content table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content table th {\n\t\t\tbackground: #F5F0E8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.pict-content table td {\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content table tr:nth-child(even) {\n\t\t\tbackground: #F7F5F0;\n\t\t}\n\t\t.pict-content img {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\t\t.pict-content pre.mermaid {\n\t\t\tbackground: #fff;\n\t\t\tcolor: #3D3229;\n\t\t\ttext-align: center;\n\t\t\tpadding: 1em;\n\t\t}\n\t\t.pict-content .pict-content-katex-display {\n\t\t\ttext-align: center;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\t\t.pict-content .pict-content-katex-inline {\n\t\t\tdisplay: inline;\n\t\t}\n\t",Templates:[{Hash:"Pict-Content-Template",Template:'\n<div class="pict-content" id="Pict-Content-Body">\n\t<div class="pict-content-loading">Loading content...</div>\n</div>\n'}],Renderables:[{RenderableHash:"Pict-Content-Display",TemplateHash:"Pict-Content-Template",DestinationAddress:"#Pict-Content-Container",RenderMethod:"replace"}]}},{"pict-view":88}],80:[function(t,e,n){e.exports.attach=function(t){t._createEditorInContainer=function(e,n,i){var o=t._codeMirrorModules,r=[];r.push(o.EditorView.domEventHandlers({keydown:function(e,i){return(e.ctrlKey||e.metaKey)&&"b"===e.key?(e.preventDefault(),t.applyFormatting(n,"bold"),!0):(e.ctrlKey||e.metaKey)&&"i"===e.key?(e.preventDefault(),t.applyFormatting(n,"italic"),!0):(e.ctrlKey||e.metaKey)&&"e"===e.key?(e.preventDefault(),t.applyFormatting(n,"code"),!0):void 0},paste:function(e,i){var o=e.clipboardData&&e.clipboardData.items;if(!o)return!1;for(var r=0;r<o.length;r++)if(o[r].type.startsWith("image/")){e.preventDefault();var a=o[r].getAsFile();return a&&t._processImageFile(a,n),!0}return!1},drop:function(e,i){if(t._dragSourceIndex>=0)return!1;if(!e.dataTransfer||!e.dataTransfer.files||e.dataTransfer.files.length<1)return!1;var o=e.dataTransfer.files[0];if(o.type&&o.type.startsWith("image/")){e.preventDefault(),e.stopPropagation(),t._processImageFile(o,n);var r=i.dom.closest(".pict-mde-segment-editor");return r&&r.classList.remove("pict-mde-image-dragover"),!0}return!1}})),o.extensions&&Array.isArray(o.extensions)&&(r=r.concat(o.extensions)),r.push(o.EditorView.updateListener.of(function(e){e.docChanged&&t._onSegmentContentChange(n,e.state.doc.toString()),e.focusChanged&&(e.view.hasFocus?(t._setActiveSegment(n),t._updateSidebarPosition(n)):setTimeout(function(){if(t._activeSegmentIndex===n){var e=document.getElementById("PictMDE-Segment-".concat(n));e&&!e.contains(document.activeElement)&&(t._clearActiveSegment(n),t._resetSidebarPosition(n))}},100)),e.selectionSet&&e.view.hasFocus&&t._updateSidebarPosition(n)}));var a=t._buildDataURICollapseExtension();a&&r.push(a),t.options.ReadOnly&&(r.push(o.EditorState.readOnly.of(!0)),r.push(o.EditorView.editable.of(!1))),r=t.customConfigureExtensions(r,n);var s=o.EditorState.create({doc:i||"",extensions:r}),c=new o.EditorView({state:s,parent:e});t._segmentEditors[n]=c,c.contentDOM.addEventListener("keydown",function(e){if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&!(e.shiftKey||e.ctrlKey||e.metaKey||e.altKey)){var i=c.state,o=i.selection.main.head,r=i.doc.lineAt(o),a=o-r.from;if("ArrowDown"===e.key){if(r.to<i.doc.length)return;var s=t._getOrderedSegmentIndices(),l=t._getLogicalIndex(n);if(l<0||l>=s.length-1)return;var d=s[l+1],p=t._segmentEditors[d];if(!p)return;e.preventDefault(),e.stopPropagation();var u=p.state.doc.line(1),h=Math.min(a,u.to-u.from);p.focus(),p.dispatch({selection:{anchor:u.from+h}}),t._setActiveSegment(d)}else if("ArrowUp"===e.key){if(r.number>1)return;var f=t._getOrderedSegmentIndices(),v=t._getLogicalIndex(n);if(v<=0)return;var g=f[v-1],m=t._segmentEditors[g];if(!m)return;e.preventDefault(),e.stopPropagation();var y=m.state.doc.line(m.state.doc.lines),b=Math.min(a,y.to-y.from);m.focus(),m.dispatch({selection:{anchor:y.from+b}}),t._setActiveSegment(g)}}},!0),c.contentDOM.addEventListener("drop",function(e){if(!(t._dragSourceIndex>=0)&&e.dataTransfer&&e.dataTransfer.files&&!(e.dataTransfer.files.length<1)){var i=e.dataTransfer.files[0];if(i.type&&i.type.startsWith("image/")){e.preventDefault(),e.stopPropagation(),t._processImageFile(i,n);var o=document.getElementById("PictMDE-SegmentEditor-".concat(n));o&&o.classList.remove("pict-mde-image-dragover")}}},!0)},t._buildDataURICollapseExtension=function(){var e=t._codeMirrorModules;if(!(e&&e.Decoration&&e.ViewPlugin&&e.WidgetType))return null;var n=e.Decoration,i=e.ViewPlugin,o=e.WidgetType,r=function(t){function e(t){var n;return _classCallCheck(this,e),(n=_callSuper(this,e)).label=t,n}return _inherits(e,t),_createClass(e,[{key:"toDOM",value:function(){var t=document.createElement("span");return t.className="pict-mde-data-uri-collapsed",t.textContent=this.label,t.title="Data URI (click to expand in image preview below)",t}},{key:"eq",value:function(t){return this.label===t.label}}])}(o);function a(t){var e,i=[],o=t.state.doc,a=_createForOfIteratorHelper(t.visibleRanges);try{for(a.s();!(e=a.n()).done;)for(var s=e.value,c=s.from,l=s.to,d=o.sliceString(c,l),p=/!\[[^\]]*\]\(data:([^;]+);base64,/g,u=void 0;null!==(u=p.exec(d));){for(var h=c+u.index+u[0].length,f=-1,v=h,g=o.length,m=Math.min(g,v+5242880),y=v;y<m;y+=4096){var b=Math.min(y+4096,m),w=o.sliceString(y,b).indexOf(")");if(w>=0){f=y+w;break}}if(!(f<0)){var C=f-h;if(!(C<200)){var x=Math.round(.75*C),A=void 0;A=x>=1048576?(x/1048576).toFixed(1)+"MB":x>=1024?Math.round(x/1024)+"KB":x+"B";u[1];var D="…".concat(A,")"),k=n.replace({widget:new r(D)});i.push(k.range(h,f+1))}}}}catch(t){a.e(t)}finally{a.f()}return n.set(i,!0)}return i.fromClass(function(){return _createClass(function t(e){_classCallCheck(this,t),this.decorations=a(e)},[{key:"update",value:function(t){(t.docChanged||t.viewportChanged)&&(this.decorations=a(t.view))}}])}(),{decorations:function(t){return t.decorations}})}}},{}],81:[function(t,e,n){e.exports.attach=function(t){t._wireSegmentDragEvents=function(e,n){var i=e.querySelector(".pict-mde-drag-handle");i&&(i.addEventListener("dragstart",function(i){t._dragSourceIndex=n,i.dataTransfer.effectAllowed="move",i.dataTransfer.setData("text/plain",String(n));var o=t._getContainerElement();o&&o.classList.add("pict-mde-dragging"),setTimeout(function(){e.style.opacity="0.4"},0)}),i.addEventListener("dragend",function(){e.style.opacity="",t._dragSourceIndex=-1,t._clearAllDropIndicators();var n=t._getContainerElement();n&&n.classList.remove("pict-mde-dragging")}),e.addEventListener("dragover",function(n){n.preventDefault(),n.dataTransfer.dropEffect="move",t._clearAllDropIndicators();var i=e.getBoundingClientRect(),o=i.top+i.height/2;n.clientY<o?e.classList.add("pict-mde-drag-over-top"):e.classList.add("pict-mde-drag-over-bottom")}),e.addEventListener("dragleave",function(t){e.contains(t.relatedTarget)||(e.classList.remove("pict-mde-drag-over-top"),e.classList.remove("pict-mde-drag-over-bottom"))}),e.addEventListener("drop",function(i){i.preventDefault();var o=e.classList.contains("pict-mde-drag-over-bottom");t._clearAllDropIndicators();var r=t._dragSourceIndex;r<0||r===n||t._reorderSegment(r,n,o)}))},t._clearAllDropIndicators=function(){var e=t._getContainerElement();if(e)for(var n=e.querySelectorAll(".pict-mde-segment"),i=0;i<n.length;i++)n[i].classList.remove("pict-mde-drag-over-top"),n[i].classList.remove("pict-mde-drag-over-bottom")},t._reorderSegment=function(e,n,i){var o=t._getLogicalIndex(e),r=t._getLogicalIndex(n);if(o<0||r<0)t.log.warn("PICT-MarkdownEditor _reorderSegment: could not resolve logical indices (from=".concat(o,", to=").concat(r,")."));else if(o!==r){t._marshalAllEditorsToData();var a=t._getSegmentsFromData();if(a&&!(a.length<2)){var s=i?r+1:r;if(o<s&&s--,s!==o){var c=a.splice(o,1)[0];a.splice(s,0,c),t._setSegmentsToData(a),t._reorderHiddenPreviewState(o,s),t._reorderSegmentTabStates(o,s),t._buildEditorUI()}}}},t._reorderHiddenPreviewState=function(e,n){if(e!==n){var i=Object.keys(t._hiddenPreviewSegments).map(function(t){return parseInt(t,10)});if(0!==i.length){for(var o=Math.max.apply(Math,_toConsumableArray(i).concat([e,n])),r=[],a=0;a<=o;a++)r.push(!!t._hiddenPreviewSegments[a]);var s=r.splice(e,1)[0];r.splice(n,0,s),t._hiddenPreviewSegments={};for(var c=0;c<r.length;c++)r[c]&&(t._hiddenPreviewSegments[c]=!0)}}},t._swapHiddenPreviewState=function(e,n){var i=!!t._hiddenPreviewSegments[e];!!t._hiddenPreviewSegments[n]?t._hiddenPreviewSegments[e]=!0:delete t._hiddenPreviewSegments[e],i?t._hiddenPreviewSegments[n]=!0:delete t._hiddenPreviewSegments[n]},t._reorderSegmentTabStates=function(e,n){if(e!==n){var i=Object.keys(t._segmentTabStates).map(function(t){return parseInt(t,10)});if(0!==i.length){for(var o=Math.max.apply(Math,_toConsumableArray(i).concat([e,n])),r=[],a=0;a<=o;a++)r.push(t._segmentTabStates[a]||"editor");var s=r.splice(e,1)[0];r.splice(n,0,s),t._segmentTabStates={};for(var c=0;c<r.length;c++)"editor"!==r[c]&&(t._segmentTabStates[c]=r[c])}}},t._swapSegmentTabStates=function(e,n){var i=t._segmentTabStates[e]||"editor",o=t._segmentTabStates[n]||"editor";"editor"!==o?t._segmentTabStates[e]=o:delete t._segmentTabStates[e],"editor"!==i?t._segmentTabStates[n]=i:delete t._segmentTabStates[n]},t._setActiveSegment=function(e){if(t._activeSegmentIndex>=0&&t._activeSegmentIndex!==e){var n=document.getElementById("PictMDE-Segment-".concat(t._activeSegmentIndex));n&&n.classList.remove("pict-mde-active")}t._activeSegmentIndex=e;var i=document.getElementById("PictMDE-Segment-".concat(e));i&&i.classList.add("pict-mde-active")},t._clearActiveSegment=function(e){t._activeSegmentIndex===e&&(t._activeSegmentIndex=-1);var n=document.getElementById("PictMDE-Segment-".concat(e));n&&n.classList.remove("pict-mde-active"),t._resetSidebarPosition(e)},t._updateSidebarPosition=function(e){var n=document.getElementById("PictMDE-Segment-".concat(e));if(n){var i=n.querySelector(".pict-mde-quadrant-tr");if(i){var o=t._segmentEditors[e];if(o){var r=o.state.selection.main.head,a=o.coordsAtPos(r);if(a){var s=n.getBoundingClientRect(),c=a.top-s.top,l=i.offsetHeight||0,d=n.offsetHeight||0,p=Math.max(0,d-l);c=Math.max(0,Math.min(c,p)),i.classList.add("pict-mde-sidebar-at-cursor"),i.style.setProperty("--pict-mde-sidebar-top","".concat(c,"px"))}else t._resetSidebarPosition(e)}}}},t._resetSidebarPosition=function(t){var e=document.getElementById("PictMDE-Segment-".concat(t));if(e){var n=e.querySelector(".pict-mde-quadrant-tr");n&&(n.classList.remove("pict-mde-sidebar-at-cursor"),n.style.removeProperty("--pict-mde-sidebar-top"))}}}},{}],82:[function(t,e,n){var i={bold:{wrap:"**"},italic:{wrap:"*"},code:{wrap:"`"},heading:{prefix:"# "},link:{before:"[",after:"](url)"}};e.exports.attach=function(t){t.applyFormatting=function(e,n){var o=t._segmentEditors[e];if(o){var r=i[n];if(r){var a,s,c=o.state,l=c.selection.main,d=l.from,p=l.to,u=d!==p,h=u?c.sliceDoc(d,p):"";if(r.wrap){var f=r.wrap;if(u){var v=c.sliceDoc(Math.max(0,d-f.length),d),g=c.sliceDoc(p,Math.min(c.doc.length,p+f.length));if(v===f&&g===f)return a=[{from:d-f.length,to:d,insert:""},{from:p,to:p+f.length,insert:""}],s=d-f.length,void o.dispatch({changes:a,selection:{anchor:s,head:s+h.length}});a={from:d,to:p,insert:f+h+f},s=d+f.length,o.dispatch({changes:a,selection:{anchor:s,head:s+h.length}})}else{a={from:d,insert:f+f},s=d+f.length,o.dispatch({changes:a,selection:{anchor:s}})}}else if(r.prefix){var m=c.doc.lineAt(d);a=m.text.startsWith(r.prefix)?{from:m.from,to:m.from+r.prefix.length,insert:""}:{from:m.from,insert:r.prefix},o.dispatch({changes:a})}else if(r.before&&r.after){if(u)a={from:d,to:p,insert:r.before+h+r.after},s=d+r.before.length+h.length+2,o.dispatch({changes:a,selection:{anchor:s,head:s+3}});else a={from:d,insert:r.before+r.after},s=d+r.before.length,o.dispatch({changes:a,selection:{anchor:s}})}o.focus()}else t.log.warn('PICT-MarkdownEditor applyFormatting: unknown format type "'.concat(n,'".'))}else t.log.warn("PICT-MarkdownEditor applyFormatting: no editor for segment ".concat(e,"."))}}},{}],83:[function(t,e,n){e.exports.attach=function(t){t.openImagePicker=function(e){var n=document.getElementById("PictMDE-ImageInput-".concat(e));n?(n.onchange=function(){n.files&&n.files.length>0&&t._processImageFile(n.files[0],e),n.value=""},n.click()):t.log.warn("PICT-MarkdownEditor openImagePicker: file input not found for segment ".concat(e,"."))},t._processImageFile=function(e,n){if(e&&e.type&&e.type.startsWith("image/")){var i=e.name?e.name.replace(/\.[^.]+$/,""):"image";if(!t.onImageUpload(e,n,function(e,o){e?t.log.error("PICT-MarkdownEditor image upload error: ".concat(e)):o&&t._insertImageMarkdown(n,o,i)}))if("undefined"!=typeof FileReader){var o=new FileReader;o.onload=function(){t._insertImageMarkdown(n,o.result,i)},o.onerror=function(){t.log.error("PICT-MarkdownEditor _processImageFile: FileReader error.")},o.readAsDataURL(e)}else t.log.error("PICT-MarkdownEditor _processImageFile: FileReader not available in this environment.")}else t.log.warn("PICT-MarkdownEditor _processImageFile: not an image file (type: ".concat(e?e.type:"null",")."))},t._insertImageMarkdown=function(e,n,i){var o=t._segmentEditors[e];if(o){var r=".concat(n,")"),a=o.state.selection.main.head;o.dispatch({changes:{from:a,insert:r},selection:{anchor:a+r.length}}),o.focus(),t._updateImagePreviews(e)}else t.log.warn("PICT-MarkdownEditor _insertImageMarkdown: no editor for segment ".concat(e,"."))},t._updateImagePreviews=function(e){var n=document.getElementById("PictMDE-ImagePreview-".concat(e));if(n){var i=t._segmentEditors[e];if(!i)return n.innerHTML="",void n.classList.remove("pict-mde-has-images");for(var o,r=i.state.doc.toString(),a=/!\[([^\]]*)\]\(([^)]+)\)/g,s=[];null!==(o=a.exec(r));)s.push({alt:o[1]||"image",url:o[2]});if(0===s.length)return n.innerHTML="",void n.classList.remove("pict-mde-has-images");for(var c="",l=0;l<s.length;l++){var d=s[l].alt.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),p=t._resolveImageURL(s[l].url).replace(/&/g,"&").replace(/"/g,""");c+='<div class="pict-mde-image-preview-item"><img src="'.concat(p,'" alt="').concat(d,'" /><span class="pict-mde-image-preview-label">').concat(d,"</span></div>")}n.innerHTML=c,n.classList.add("pict-mde-has-images")}},t._wireImageDragEvents=function(e,n){e.addEventListener("dragover",function(n){t._dragSourceIndex>=0||!n.dataTransfer||!n.dataTransfer.types||n.dataTransfer.types.indexOf("Files")<0||(n.preventDefault(),n.dataTransfer.dropEffect="copy",e.classList.add("pict-mde-image-dragover"))}),e.addEventListener("dragleave",function(t){e.contains(t.relatedTarget)||e.classList.remove("pict-mde-image-dragover")}),e.addEventListener("drop",function(i){if(e.classList.remove("pict-mde-image-dragover"),!(t._dragSourceIndex>=0)&&i.dataTransfer&&i.dataTransfer.files&&!(i.dataTransfer.files.length<1)){var o=i.dataTransfer.files[0];o.type&&o.type.startsWith("image/")&&(i.preventDefault(),i.stopPropagation(),t._processImageFile(o,n))}})}}},{}],84:[function(t,e,n){var i=t("pict-section-content").PictContentProvider;e.exports.attach=function(t){t._getContentProvider=function(){return t._contentProvider||(t._contentProvider=new i(t.fable,{},"Pict-Content-Provider-MDE")),t._contentProvider},t._updateRichPreviews=function(e){if(t.options.EnableRichPreview){var n=document.getElementById("PictMDE-RichPreview-".concat(e));if(n){var i=t._segmentEditors[e];if(!i)return n.innerHTML="",void n.classList.remove("pict-mde-has-rich-preview");var o=i.state.doc.toString();if(!o||0===o.trim().length)return n.innerHTML="",void n.classList.remove("pict-mde-has-rich-preview");var r=t._getContentProvider().parseMarkdown(o);if(!r||0===r.trim().length)return n.innerHTML="",void n.classList.remove("pict-mde-has-rich-preview");var a="PictMDE-RichPreviewBody-".concat(e);if(n.innerHTML='<div class="pict-content" id="'.concat(a,'">').concat(r,"</div>"),n.classList.add("pict-mde-has-rich-preview"),t.options.ImageBaseURL)for(var s=n.querySelectorAll("img"),c=0;c<s.length;c++){var l=s[c].getAttribute("src");if(l){var d=t._resolveImageURL(l);d!==l&&s[c].setAttribute("src",d)}}var p=(t._richPreviewGenerations[e]||0)+1;t._richPreviewGenerations[e]=p,t._postRenderMermaid(a,e,p),t._postRenderKaTeX(a)}}},t._postRenderMermaid=function(e,n,i){if("undefined"!=typeof mermaid){var o=document.getElementById(e);if(o){var r=o.querySelectorAll("pre.mermaid");if(!(r.length<1))try{var a=mermaid.run({nodes:r});a&&"function"==typeof a.catch&&a.catch(function(e){(-1===n?t._renderedViewGeneration:t._richPreviewGenerations[n])===i&&t.log.warn("PICT-MarkdownEditor mermaid render error: ".concat(e.message||e))})}catch(e){t.log.warn("PICT-MarkdownEditor mermaid render error: ".concat(e.message||e))}}}},t._postRenderKaTeX=function(e){if("undefined"!=typeof katex){var n=document.getElementById(e);if(n){for(var i=n.querySelectorAll(".pict-content-katex-inline"),o=0;o<i.length;o++)try{katex.render(i[o].textContent,i[o],{throwOnError:!1,displayMode:!1})}catch(e){t.log.warn("PICT-MarkdownEditor KaTeX inline error: ".concat(e.message||e))}for(var r=n.querySelectorAll(".pict-content-katex-display"),a=0;a<r.length;a++)try{katex.render(r[a].textContent,r[a],{throwOnError:!1,displayMode:!0})}catch(e){t.log.warn("PICT-MarkdownEditor KaTeX display error: ".concat(e.message||e))}}}},t._escapeHTMLForPreview=function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},t.toggleRenderedView=function(e){t._renderedViewActive="boolean"==typeof e?e:!t._renderedViewActive,t._renderedViewActive?t._renderRenderedView():t._restoreEditingView()},t._renderRenderedView=function(){var e=t._getContainerElement();if(e){t._marshalAllEditorsToData();var n=t._getSegmentsFromData(),i="";if(n&&n.length>0){for(var o=[],r=0;r<n.length;r++)o.push(n[r].Content||"");i=o.join("\n\n")}for(var a in t._segmentEditors)t._segmentEditors[a]&&t._segmentEditors[a].destroy();t._segmentEditors={};var s=t._getContentProvider().parseMarkdown(i),c="PictMDE-RenderedView";if(e.innerHTML='<div class="pict-mde-rendered-view" id="'.concat(c,'"><div class="pict-content">').concat(s||"","</div></div>"),e.classList.add("pict-mde-rendered-mode"),t.options.ImageBaseURL)for(var l=e.querySelectorAll(".pict-mde-rendered-view img"),d=0;d<l.length;d++){var p=l[d].getAttribute("src");if(p){var u=t._resolveImageURL(p);u!==p&&l[d].setAttribute("src",u)}}t._renderedViewGeneration++;var h=t._renderedViewGeneration,f=e.querySelector("#".concat(c," .pict-content"));if(f){var v="PictMDE-RenderedViewContent";f.id=v,t._postRenderMermaid(v,-1,h),t._postRenderKaTeX(v)}}},t._restoreEditingView=function(){var e=t._getContainerElement();e&&(e.classList.remove("pict-mde-rendered-mode"),t._buildEditorUI())}}},{"pict-section-content":77}],85:[function(t,e,n){e.exports={DefaultRenderable:"MarkdownEditor-Wrap",DefaultDestinationAddress:"#MarkdownEditor-Container-Div",Templates:[{Hash:"MarkdownEditor-Container",Template:'<div class="pict-mde" id="PictMDE-Container"></div>'},{Hash:"MarkdownEditor-Segment",Template:'<div class="pict-mde-segment" id="PictMDE-Segment-{~D:Record.SegmentIndex~}" data-segment-index="{~D:Record.SegmentIndex~}">\n\t<div class="pict-mde-left-controls">\n\t\t<div class="pict-mde-quadrant-tl"></div>\n\t\t<div class="pict-mde-quadrant-bl"></div>\n\t</div>\n\t<div class="pict-mde-drag-handle" draggable="true" title="Drag to reorder"></div>\n\t<div class="pict-mde-segment-body">\n\t\t<div class="pict-mde-tab-bar" id="PictMDE-TabBar-{~D:Record.SegmentIndex~}">\n\t\t\t<button type="button" class="pict-mde-tab pict-mde-tab-active" data-tab="editor" onclick="{~D:Record.ViewIdentifier~}.switchSegmentTab({~D:Record.SegmentIndex~}, \'editor\')">Edit</button>\n\t\t\t<button type="button" class="pict-mde-tab" data-tab="preview" onclick="{~D:Record.ViewIdentifier~}.switchSegmentTab({~D:Record.SegmentIndex~}, \'preview\')">Preview</button>\n\t\t</div>\n\t\t<div class="pict-mde-segment-editor" id="PictMDE-SegmentEditor-{~D:Record.SegmentIndex~}"></div>\n\t\t<div class="pict-mde-preview-pane" id="PictMDE-PreviewPane-{~D:Record.SegmentIndex~}">\n\t\t\t<div class="pict-mde-image-preview" id="PictMDE-ImagePreview-{~D:Record.SegmentIndex~}"></div>\n\t\t\t<div class="pict-mde-rich-preview" id="PictMDE-RichPreview-{~D:Record.SegmentIndex~}"></div>\n\t\t</div>\n\t</div>\n\t<div class="pict-mde-sidebar" id="PictMDE-Sidebar-{~D:Record.SegmentIndex~}">\n\t\t<div class="pict-mde-quadrant-tr"></div>\n\t\t<div class="pict-mde-quadrant-br"></div>\n\t\t<input type="file" accept="image/*" class="pict-mde-image-input" id="PictMDE-ImageInput-{~D:Record.SegmentIndex~}" style="display:none" />\n\t</div>\n</div>'},{Hash:"MarkdownEditor-AddSegment",Template:'<div class="pict-mde-add-segment">\n\t<button type="button" class="pict-mde-btn-add" onclick="{~D:Record.ViewIdentifier~}.addSegment()">+ Add Segment</button>\n</div>'}],Renderables:[{RenderableHash:"MarkdownEditor-Wrap",TemplateHash:"MarkdownEditor-Container",DestinationAddress:"#MarkdownEditor-Container-Div"}],TargetElementAddress:"#MarkdownEditor-Container-Div",ContentDataAddress:!1,ReadOnly:!1,EnableRichPreview:!0,DefaultPreviewMode:"off",ImageBaseURL:"",ButtonsTL:[{HTML:"×",Action:"removeSegment",Class:"pict-mde-btn-remove",Title:"Remove Segment"}],ButtonsBL:[{HTML:"↑",Action:"moveSegmentUp",Class:"pict-mde-btn-move",Title:"Move Up"},{HTML:"↓",Action:"moveSegmentDown",Class:"pict-mde-btn-move",Title:"Move Down"},{HTML:"⊞",Action:"toggleControls",Class:"pict-mde-btn-linenums",Title:"Toggle Controls"},{HTML:"◎",Action:"cyclePreviewMode",Class:"pict-mde-btn-preview",Title:"Cycle Preview Mode"}],ButtonsTR:[{HTML:"<b>B</b>",Action:"applyFormatting:bold",Class:"",Title:"Bold (Ctrl+B)"},{HTML:"<i>I</i>",Action:"applyFormatting:italic",Class:"",Title:"Italic (Ctrl+I)"},{HTML:"<code><></code>",Action:"applyFormatting:code",Class:"",Title:"Inline Code (Ctrl+E)"},{HTML:"#",Action:"applyFormatting:heading",Class:"",Title:"Heading"},{HTML:"[ ]",Action:"applyFormatting:link",Class:"",Title:"Link"},{HTML:"▣",Action:"openImagePicker",Class:"pict-mde-sidebar-btn-image",Title:"Insert Image"}],ButtonsBR:[],CSS:"\n/* ---- Container ---- */\n.pict-mde\n{\n\tfont-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;\n\tfont-size: 14px;\n}\n\n/* ---- Segment row: left-controls | drag-handle | editor body | sidebar ---- */\n.pict-mde-segment\n{\n\tposition: relative;\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: stretch;\n\tmargin-bottom: 6px;\n\tmin-height: 48px;\n\ttransition: background-color 0.15s ease;\n}\n\n/* ---- Left controls column ---- */\n.pict-mde-left-controls\n{\n\tflex: 0 0 22px;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tjustify-content: space-between;\n\tpadding: 2px 0;\n}\n\n/* ---- Left-side quadrants ---- */\n.pict-mde-quadrant-tl\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tposition: sticky;\n\ttop: 2px;\n\tz-index: 2;\n}\n.pict-mde-quadrant-bl\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: 1px;\n\tposition: sticky;\n\tbottom: 2px;\n\tz-index: 2;\n}\n\n/* ---- Left-side buttons (shared base) ---- */\n.pict-mde-left-btn\n{\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 20px;\n\theight: 20px;\n\tborder: none;\n\tbackground: transparent;\n\tcursor: pointer;\n\tfont-size: 12px;\n\tpadding: 0;\n\tcolor: #888;\n\tline-height: 1;\n\tfont-family: inherit;\n\topacity: 0;\n\ttransition: opacity 0.15s ease;\n}\n.pict-mde-segment:hover .pict-mde-left-btn,\n.pict-mde-segment.pict-mde-active .pict-mde-left-btn\n{\n\topacity: 1;\n}\n.pict-mde-left-btn:hover\n{\n\tcolor: #222;\n}\n.pict-mde-btn-remove:hover\n{\n\tcolor: #CC3333;\n}\n.pict-mde-btn-linenums\n{\n\tfont-size: 11px;\n\tfont-weight: 600;\n\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', monospace;\n}\n/* Highlight when controls are active */\n.pict-mde.pict-mde-controls-on .pict-mde-btn-linenums\n{\n\tcolor: #4A90D9;\n}\n.pict-mde-btn-preview\n{\n\tfont-size: 11px;\n}\n/* Preview button: highlight when any preview mode is active */\n.pict-mde.pict-mde-preview-bottom .pict-mde-btn-preview,\n.pict-mde.pict-mde-preview-side .pict-mde-btn-preview,\n.pict-mde.pict-mde-preview-tabbed .pict-mde-btn-preview\n{\n\tcolor: #4A90D9;\n}\n/* Dim preview button when mode is off */\n.pict-mde.pict-mde-preview-off .pict-mde-btn-preview\n{\n\tcolor: #CCC;\n}\n\n/* ---- Drag handle (simple grey bar) ---- */\n.pict-mde-drag-handle\n{\n\tflex: 0 0 8px;\n\tcursor: grab;\n\tbackground: #EDEDED;\n\ttransition: background-color 0.15s ease;\n\tuser-select: none;\n}\n.pict-mde-drag-handle:active\n{\n\tcursor: grabbing;\n}\n.pict-mde-drag-handle:hover\n{\n\tbackground: #C8C8C8;\n}\n\n/* ---- Editor body (middle column) ---- */\n.pict-mde-segment-body\n{\n\tflex: 1 1 0%;\n\tmin-width: 0;\n\toverflow: hidden;\n\tbackground: #FFFFFF;\n\ttransition: background-color 0.15s ease;\n}\n.pict-mde-segment-editor\n{\n\tmin-height: 48px;\n}\n\n/* ---- Image preview area below the editor ---- */\n.pict-mde-image-preview\n{\n\tdisplay: none;\n}\n.pict-mde-image-preview.pict-mde-has-images\n{\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 8px;\n\tpadding: 8px 12px;\n\tborder-top: 1px solid #EDEDED;\n}\n.pict-mde-image-preview img\n{\n\tmax-width: 200px;\n\tmax-height: 150px;\n\tborder-radius: 3px;\n\tborder: 1px solid #E0E0E0;\n\tobject-fit: contain;\n\tbackground: #F8F8F8;\n}\n.pict-mde-image-preview-item\n{\n\tposition: relative;\n\tdisplay: inline-block;\n}\n.pict-mde-image-preview-label\n{\n\tdisplay: block;\n\tfont-size: 10px;\n\tcolor: #999;\n\tmargin-top: 2px;\n\tmax-width: 200px;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n/* ---- Rich content preview area (rendered via pict-section-content) ---- */\n.pict-mde-rich-preview\n{\n\tdisplay: none;\n}\n.pict-mde-rich-preview.pict-mde-has-rich-preview\n{\n\tdisplay: block;\n\tborder-top: 1px solid #EDEDED;\n\tbackground: #FCFCFC;\n\toverflow: hidden;\n}\n/* Constrain images in the rich preview even if pict-section-content CSS loads late */\n.pict-mde-rich-preview img\n{\n\tmax-width: 100%;\n\theight: auto;\n}\n/* ---- Preview layout modes ---- */\n\n/* Tab bar: hidden by default, shown only in tabbed mode */\n.pict-mde-tab-bar\n{\n\tdisplay: none;\n}\n.pict-mde.pict-mde-preview-tabbed .pict-mde-tab-bar\n{\n\tdisplay: flex;\n\tgap: 0;\n\tborder-bottom: 1px solid #EDEDED;\n\tbackground: #F8F8F8;\n}\n.pict-mde-tab\n{\n\tpadding: 4px 12px;\n\tborder: none;\n\tbackground: transparent;\n\tcursor: pointer;\n\tfont-size: 12px;\n\tcolor: #888;\n\tborder-bottom: 2px solid transparent;\n\tfont-family: inherit;\n}\n.pict-mde-tab:hover\n{\n\tcolor: #222;\n}\n.pict-mde-tab.pict-mde-tab-active\n{\n\tcolor: #4A90D9;\n\tborder-bottom-color: #4A90D9;\n}\n\n/* Off mode: hide all preview panes and tab bars */\n.pict-mde.pict-mde-preview-off .pict-mde-preview-pane\n{\n\tdisplay: none;\n}\n.pict-mde.pict-mde-preview-off .pict-mde-tab-bar\n{\n\tdisplay: none;\n}\n/* Legacy class alias for backward compatibility */\n.pict-mde.pict-mde-previews-hidden .pict-mde-preview-pane\n{\n\tdisplay: none;\n}\n\n/* Bottom mode: vertical stacking (default flex-column behavior) */\n.pict-mde.pict-mde-preview-bottom .pict-mde-segment-body\n{\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n/* Side-by-side mode: editor and preview side by side */\n.pict-mde.pict-mde-preview-side .pict-mde-segment-body\n{\n\tdisplay: flex;\n\tflex-direction: row;\n}\n.pict-mde.pict-mde-preview-side .pict-mde-segment-editor\n{\n\tflex: 1 1 50%;\n\tmin-width: 0;\n\toverflow: hidden;\n}\n.pict-mde.pict-mde-preview-side .pict-mde-preview-pane\n{\n\tflex: 1 1 50%;\n\tmin-width: 0;\n\toverflow: auto;\n\tborder-left: 1px solid #EDEDED;\n}\n/* Side-by-side: remove top borders since preview is beside, not below */\n.pict-mde.pict-mde-preview-side .pict-mde-rich-preview.pict-mde-has-rich-preview\n{\n\tborder-top: none;\n}\n.pict-mde.pict-mde-preview-side .pict-mde-image-preview.pict-mde-has-images\n{\n\tborder-top: none;\n}\n\n/* Tabbed mode: default hides preview, shows editor */\n.pict-mde.pict-mde-preview-tabbed .pict-mde-segment-body\n{\n\tdisplay: flex;\n\tflex-direction: column;\n}\n.pict-mde.pict-mde-preview-tabbed .pict-mde-preview-pane\n{\n\tdisplay: none;\n}\n/* Tabbed mode: when showing preview, hide editor and show preview */\n.pict-mde.pict-mde-preview-tabbed .pict-mde-segment.pict-mde-tab-showing-preview .pict-mde-segment-editor\n{\n\tdisplay: none;\n}\n.pict-mde.pict-mde-preview-tabbed .pict-mde-segment.pict-mde-tab-showing-preview .pict-mde-preview-pane\n{\n\tdisplay: block;\n}\n\n/* Per-segment preview hide: only applies in bottom and side modes */\n.pict-mde.pict-mde-preview-bottom .pict-mde-segment.pict-mde-preview-hidden .pict-mde-preview-pane,\n.pict-mde.pict-mde-preview-side .pict-mde-segment.pict-mde-preview-hidden .pict-mde-preview-pane\n{\n\tdisplay: none;\n}\n/* Constrain the pict-content inside the preview to fit the segment */\n.pict-mde-rich-preview .pict-content\n{\n\tpadding: 12px;\n\tmax-width: none;\n\tmargin: 0;\n\tfont-size: 13px;\n}\n/* Reduce heading sizes in the preview to be proportional */\n.pict-mde-rich-preview .pict-content h1\n{\n\tfont-size: 1.4em;\n\tmargin-top: 0;\n}\n.pict-mde-rich-preview .pict-content h2\n{\n\tfont-size: 1.2em;\n\tmargin-top: 0.75em;\n}\n.pict-mde-rich-preview .pict-content h3\n{\n\tfont-size: 1.1em;\n\tmargin-top: 0.6em;\n}\n\n/* ---- Rendered view (full document preview mode) ---- */\n.pict-mde-rendered-view\n{\n\tpadding: 16px 20px;\n\tbackground: #FFFFFF;\n\tmin-height: 120px;\n}\n.pict-mde-rendered-view .pict-content\n{\n\tmax-width: none;\n\tmargin: 0;\n}\n/* Hide the add-segment button in rendered mode */\n.pict-mde.pict-mde-rendered-mode .pict-mde-add-segment\n{\n\tdisplay: none;\n}\n\n/* Focused / active editor gets subtle warm background */\n.pict-mde-segment.pict-mde-active .pict-mde-segment-body\n{\n\tbackground: #FAFAF5;\n}\n.pict-mde-segment.pict-mde-active .pict-mde-drag-handle\n{\n\tbackground: #9CB4C8;\n}\n\n/* ---- Right sidebar column ---- */\n.pict-mde-sidebar\n{\n\tflex: 0 0 30px;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: flex-start;\n\tjustify-content: space-between;\n\tposition: relative;\n}\n\n/* ---- Right-side quadrants ---- */\n.pict-mde-quadrant-tr\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: 1px;\n\tpadding: 4px 0;\n\twidth: 100%;\n\topacity: 0;\n\ttransition: opacity 0.15s ease, top 0.1s ease;\n\tposition: sticky;\n\ttop: 0;\n}\n.pict-mde-quadrant-br\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: 1px;\n\tpadding: 4px 0;\n\twidth: 100%;\n\topacity: 0;\n\ttransition: opacity 0.15s ease;\n\tposition: sticky;\n\tbottom: 0;\n}\n\n/* Active segment always shows its right-side quadrants */\n.pict-mde-segment.pict-mde-active .pict-mde-quadrant-tr,\n.pict-mde-segment.pict-mde-active .pict-mde-quadrant-br\n{\n\topacity: 1;\n}\n/* When no segment is active, hovering shows both left + right controls */\n.pict-mde:not(:has(.pict-mde-active)) .pict-mde-segment:hover .pict-mde-quadrant-tr,\n.pict-mde:not(:has(.pict-mde-active)) .pict-mde-segment:hover .pict-mde-quadrant-br\n{\n\topacity: 1;\n}\n\n/* ---- Controls-hidden mode: right quadrants show faintly on hover ---- */\n.pict-mde.pict-mde-controls-hidden .pict-mde-quadrant-tr,\n.pict-mde.pict-mde-controls-hidden .pict-mde-quadrant-br\n{\n\topacity: 0;\n}\n.pict-mde.pict-mde-controls-hidden .pict-mde-segment:hover .pict-mde-quadrant-tr,\n.pict-mde.pict-mde-controls-hidden .pict-mde-segment:hover .pict-mde-quadrant-br\n{\n\topacity: 0.3;\n}\n.pict-mde.pict-mde-controls-hidden .pict-mde-segment.pict-mde-active .pict-mde-quadrant-tr,\n.pict-mde.pict-mde-controls-hidden .pict-mde-segment.pict-mde-active .pict-mde-quadrant-br\n{\n\topacity: 0.3;\n}\n\n/* When JS sets a cursor-relative offset, switch TR from sticky to absolute positioning */\n.pict-mde-quadrant-tr.pict-mde-sidebar-at-cursor\n{\n\tposition: absolute;\n\ttop: var(--pict-mde-sidebar-top, 0px);\n}\n\n/* ---- Right-side buttons (shared base) ---- */\n.pict-mde-sidebar-btn\n{\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 24px;\n\theight: 22px;\n\tborder: none;\n\tbackground: transparent;\n\tcursor: pointer;\n\tfont-size: 12px;\n\tpadding: 0;\n\tborder-radius: 3px;\n\tcolor: #666;\n\tline-height: 1;\n\tfont-family: inherit;\n}\n.pict-mde-sidebar-btn:hover\n{\n\tcolor: #222;\n}\n.pict-mde-sidebar-btn b\n{\n\tfont-size: 13px;\n\tfont-weight: 700;\n}\n.pict-mde-sidebar-btn i\n{\n\tfont-size: 13px;\n\tfont-style: italic;\n}\n.pict-mde-sidebar-btn code\n{\n\tfont-size: 10px;\n\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', monospace;\n}\n\n/* ---- Add segment button ---- */\n.pict-mde-add-segment\n{\n\tmargin-top: 6px;\n\tpadding-left: 30px;\n}\n.pict-mde-btn-add\n{\n\tdisplay: block;\n\twidth: 100%;\n\tpadding: 7px;\n\tborder: 2px dashed #D0D0D0;\n\tborder-radius: 4px;\n\tbackground: transparent;\n\tcolor: #999;\n\tfont-size: 12px;\n\tfont-weight: 600;\n\tcursor: pointer;\n\ttransition: all 0.15s ease;\n}\n.pict-mde-btn-add:hover\n{\n\tborder-color: #4A90D9;\n\tcolor: #4A90D9;\n\tbackground: rgba(74, 144, 217, 0.04);\n}\n\n/* ---- Image drag-over indicator ---- */\n.pict-mde-segment-editor.pict-mde-image-dragover\n{\n\toutline: 2px dashed #4A90D9;\n\toutline-offset: -2px;\n}\n\n/* ---- Drag-in-progress: prevent CodeMirror from intercepting drop events ---- */\n.pict-mde.pict-mde-dragging .pict-mde-segment-editor\n{\n\tpointer-events: none;\n}\n\n/* ---- Drop target indicators for drag reorder ---- */\n.pict-mde-segment.pict-mde-drag-over-top\n{\n\tbox-shadow: 0 -2px 0 0 #4A90D9;\n}\n.pict-mde-segment.pict-mde-drag-over-bottom\n{\n\tbox-shadow: 0 2px 0 0 #4A90D9;\n}\n\n/* ---- CodeMirror overrides inside segments ---- */\n.pict-mde-segment-editor .cm-editor\n{\n\tborder: none;\n}\n.pict-mde-segment-editor .cm-editor .cm-scroller\n{\n\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\tfont-size: 14px;\n\tline-height: 1.6;\n}\n.pict-mde-segment-editor .cm-editor.cm-focused\n{\n\toutline: none;\n}\n.pict-mde-segment-editor .cm-editor .cm-content\n{\n\tpadding: 8px 12px;\n\tmin-height: 36px;\n}\n.pict-mde-segment-editor .cm-editor .cm-gutters\n{\n\tbackground: #F8F8F8;\n\tborder-right: 1px solid #E8E8E8;\n\tcolor: #BBB;\n}\n\n/* ---- Collapsed data URI widget ---- */\n.pict-mde-data-uri-collapsed\n{\n\tdisplay: inline;\n\tbackground: #F0F0F0;\n\tcolor: #888;\n\tfont-size: 11px;\n\tpadding: 1px 4px;\n\tborder-radius: 3px;\n\tborder: 1px solid #E0E0E0;\n\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', monospace;\n\tcursor: default;\n\twhite-space: nowrap;\n}\n\n/* ---- Line number / controls toggle: gutters hidden by default ---- */\n.pict-mde .cm-editor .cm-gutters\n{\n\tdisplay: none;\n}\n.pict-mde.pict-mde-controls-on .cm-editor .cm-gutters\n{\n\tdisplay: flex;\n}\n\n/* ============================================\n RESPONSIVE: Tablet / Phone (max-width: 768px)\n ============================================ */\n@media (max-width: 768px)\n{\n\t/* Prevent any horizontal overflow in the editor */\n\t.pict-mde\n\t{\n\t\toverflow-x: hidden;\n\t\tmax-width: 100%;\n\t}\n\n\t/* Reduce the left controls column width */\n\t.pict-mde-left-controls\n\t{\n\t\tflex: 0 0 16px;\n\t}\n\t.pict-mde-left-btn\n\t{\n\t\twidth: 16px;\n\t\theight: 18px;\n\t\tfont-size: 10px;\n\t}\n\n\t/* Make left-side buttons always visible on touch (no hover) */\n\t.pict-mde-left-btn\n\t{\n\t\topacity: 0.6;\n\t}\n\n\t/* Narrow the drag handle */\n\t.pict-mde-drag-handle\n\t{\n\t\tflex: 0 0 5px;\n\t}\n\n\t/* Shrink the right sidebar column */\n\t.pict-mde-sidebar\n\t{\n\t\tflex: 0 0 24px;\n\t}\n\t.pict-mde-sidebar-btn\n\t{\n\t\twidth: 20px;\n\t\theight: 20px;\n\t\tfont-size: 11px;\n\t}\n\n\t/* Make right sidebar buttons always visible (touch devices) */\n\t.pict-mde-quadrant-tr,\n\t.pict-mde-quadrant-br\n\t{\n\t\topacity: 0.7;\n\t}\n\t.pict-mde-segment.pict-mde-active .pict-mde-quadrant-tr,\n\t.pict-mde-segment.pict-mde-active .pict-mde-quadrant-br\n\t{\n\t\topacity: 1;\n\t}\n\n\t/* Reduce CodeMirror content padding */\n\t.pict-mde-segment-editor .cm-editor .cm-content\n\t{\n\t\tpadding: 6px 6px;\n\t}\n\n\t/* Reduce font size slightly for more content on screen */\n\t.pict-mde-segment-editor .cm-editor .cm-scroller\n\t{\n\t\tfont-size: 13px;\n\t}\n\n\t/* Add segment button: reduce left margin */\n\t.pict-mde-add-segment\n\t{\n\t\tpadding-left: 21px;\n\t}\n\n\t/* Side-by-side: fall back to vertical stacking on narrow screens */\n\t.pict-mde.pict-mde-preview-side .pict-mde-segment-body\n\t{\n\t\tflex-direction: column;\n\t}\n\t.pict-mde.pict-mde-preview-side .pict-mde-preview-pane\n\t{\n\t\tborder-left: none;\n\t\tborder-top: 1px solid #EDEDED;\n\t}\n\n\t/* Tab bar: smaller on tablet */\n\t.pict-mde-tab\n\t{\n\t\tpadding: 3px 8px;\n\t\tfont-size: 11px;\n\t}\n\n\t/* Rich preview: less padding */\n\t.pict-mde-rich-preview .pict-content\n\t{\n\t\tpadding: 8px;\n\t\tfont-size: 12px;\n\t}\n\n\t/* Image previews: smaller max dimensions */\n\t.pict-mde-image-preview img\n\t{\n\t\tmax-width: 120px;\n\t\tmax-height: 100px;\n\t}\n\n\t/* Rendered view: less padding */\n\t.pict-mde-rendered-view\n\t{\n\t\tpadding: 10px 8px;\n\t}\n}\n\n/* ============================================\n RESPONSIVE: Small phone (max-width: 480px)\n ============================================ */\n@media (max-width: 480px)\n{\n\t/* Wrap segment so left controls flow to the top as a horizontal bar */\n\t.pict-mde-segment\n\t{\n\t\tflex-wrap: wrap;\n\t}\n\n\t/* Left controls become a horizontal toolbar at the top of the segment */\n\t.pict-mde-left-controls\n\t{\n\t\tflex: 0 0 100%;\n\t\tflex-direction: row;\n\t\tjustify-content: flex-start;\n\t\tgap: 2px;\n\t\tpadding: 3px 4px;\n\t\torder: -1;\n\t\tbackground: #F5F5F5;\n\t\tborder-bottom: 1px solid #EDEDED;\n\t}\n\t.pict-mde-left-btn\n\t{\n\t\twidth: 24px;\n\t\theight: 24px;\n\t\tfont-size: 12px;\n\t\topacity: 0.7;\n\t}\n\n\t/* Left quadrants flow horizontally */\n\t.pict-mde-quadrant-tl,\n\t.pict-mde-quadrant-bl\n\t{\n\t\tflex-direction: row;\n\t\tgap: 2px;\n\t\tposition: static;\n\t}\n\n\t/* Segment body: explicit basis so it fills the wrapped row */\n\t.pict-mde-segment-body\n\t{\n\t\tflex: 1 1 calc(100% - 20px);\n\t}\n\n\t/* Hide drag handle on very small screens */\n\t.pict-mde-drag-handle\n\t{\n\t\tdisplay: none;\n\t}\n\n\t/* Right sidebar: further shrink */\n\t.pict-mde-sidebar\n\t{\n\t\tflex: 0 0 20px;\n\t}\n\t.pict-mde-sidebar-btn\n\t{\n\t\twidth: 18px;\n\t\theight: 18px;\n\t\tfont-size: 10px;\n\t}\n\n\t/* Add segment: no left offset since controls are at top */\n\t.pict-mde-add-segment\n\t{\n\t\tpadding-left: 0;\n\t}\n\n\t/* Even tighter CodeMirror padding */\n\t.pict-mde-segment-editor .cm-editor .cm-content\n\t{\n\t\tpadding: 4px 4px;\n\t}\n}\n"}},{}],86:[function(t,e,n){var i=t("pict-view"),o=t("pict-section-content"),r=t("./Pict-Section-MarkdownEditor-DefaultConfiguration.js"),a=t("./Pict-MDE-Formatting.js"),s=t("./Pict-MDE-ImageHandling.js"),c=t("./Pict-MDE-DragAndReorder.js"),l=t("./Pict-MDE-RichPreview.js"),d=t("./Pict-MDE-CodeMirror.js"),p=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,Object.assign({},r,n),i])).initialRenderComplete=!1,o._codeMirrorModules=null,o._segmentEditors={},o._segmentCounter=0,o._viewCallIdentifier=!1,o._activeSegmentIndex=-1,o._dragSourceIndex=-1,o._controlsVisible=!0,o._previewMode=o.options.DefaultPreviewMode||"off",o._lastPreviewLayout="bottom",o._segmentTabStates={},o._hiddenPreviewSegments={},o._imagePreviewTimers={},o._richPreviewTimers={},o._richPreviewGenerations={},o._contentProvider=null,o._renderedViewActive=!1,o._renderedViewGeneration=0,a.attach(o),s.attach(o),c.attach(o),l.attach(o),d.attach(o),o}return _inherits(e,t),_createClass(e,[{key:"onBeforeInitialize",value:function(){return _superPropGet(e,"onBeforeInitialize",this,3)([]),this.targetElement=!1,_superPropGet(e,"onBeforeInitialize",this,3)([])}},{key:"connectCodeMirrorModules",value:function(t){if(!t||"object"!==_typeof(t)||"function"!=typeof t.EditorView||"function"!=typeof t.EditorState)return"undefined"!=typeof window&&window.CodeMirrorModules&&"function"==typeof window.CodeMirrorModules.EditorView?(this.log.trace("PICT-MarkdownEditor Found CodeMirror modules on window.CodeMirrorModules."),void(this._codeMirrorModules=window.CodeMirrorModules)):(this.log.error("PICT-MarkdownEditor No CodeMirror modules found. Provide them via connectCodeMirrorModules() or set window.CodeMirrorModules."),!1);this._codeMirrorModules=t}},{key:"onAfterRender",value:function(t){return this.initialRenderComplete||(this.onAfterInitialRender(),this.initialRenderComplete=!0),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"onAfterInitialRender",value:function(){if(this._codeMirrorModules||this.connectCodeMirrorModules(),!this._codeMirrorModules)return this.log.error("PICT-MarkdownEditor Cannot initialize; no CodeMirror modules available."),!1;if(this.options.EnableRichPreview){var t=o.default_configuration;t&&t.CSS&&this.pict.CSSMap.addCSS("Pict-Content-View",t.CSS)}var e=this.services.ContentAssignment.getElement(this.options.TargetElementAddress);if(!e||e.length<1)return this.log.error("PICT-MarkdownEditor Could not find target element [".concat(this.options.TargetElementAddress,"]!")),this.targetElement=!1,!1;this.targetElement=e[0],this._viewCallIdentifier=this._resolveViewCallIdentifier(),this._buildEditorUI()}},{key:"_resolveViewCallIdentifier",value:function(){var t=this.pict.views;for(var e in t)if(t[e]===this)return"_Pict.views.".concat(e);return"_Pict.servicesMap.PictView['".concat(this.Hash,"']")}},{key:"_getContainerElement",value:function(){if(this.targetElement){var t=this.targetElement.querySelector(".pict-mde");if(t)return t}return this.targetElement||null}},{key:"_resolveImageURL",value:function(t){if(!t||!this.options.ImageBaseURL)return t;if(t.startsWith("/")||t.startsWith("http://")||t.startsWith("https://")||t.startsWith("data:"))return t;var e=this.options.ImageBaseURL;return e&&!e.endsWith("/")&&(e+="/"),e+t}},{key:"_buildEditorUI",value:function(){var t=this._getContainerElement();for(var e in t&&!t.classList.contains("pict-mde")&&t.classList.add("pict-mde"),this._segmentEditors)this._segmentEditors[e]&&this._segmentEditors[e].destroy();t.innerHTML="",t.classList.remove("pict-mde-preview-off","pict-mde-preview-bottom","pict-mde-preview-side","pict-mde-preview-tabbed","pict-mde-previews-hidden"),t.classList.add("pict-mde-preview-"+this._previewMode),this._controlsVisible?t.classList.add("pict-mde-controls-on"):t.classList.add("pict-mde-controls-hidden");var n=this._getSegmentsFromData();n&&0!==n.length||(n=[{Content:""}],this._setSegmentsToData(n)),this._segmentCounter=0,this._segmentEditors={};for(var i=0;i<n.length;i++)this._renderSegment(t,i,n[i].Content||"");this._renderAddButton(t)}},{key:"_renderSegment",value:function(t,e,n){var i=this._segmentCounter++,o={SegmentIndex:i,SegmentDisplayIndex:e+1,ViewIdentifier:this._viewCallIdentifier},r=this.pict.parseTemplateByHash("MarkdownEditor-Segment",o),a=document.createElement("div");a.innerHTML=r;var s=a.firstElementChild;if(t.appendChild(s),this._buildQuadrantButtons(s,i),this._hiddenPreviewSegments[e]&&s.classList.add("pict-mde-preview-hidden"),"tabbed"===this._previewMode&&"preview"===this._segmentTabStates[e]){s.classList.add("pict-mde-tab-showing-preview");var c=s.querySelector(".pict-mde-tab-bar");if(c){var l=c.querySelector('[data-tab="editor"]'),d=c.querySelector('[data-tab="preview"]');l&&l.classList.remove("pict-mde-tab-active"),d&&d.classList.add("pict-mde-tab-active")}}this._wireSegmentDragEvents(s,i);var p=document.getElementById("PictMDE-SegmentEditor-".concat(i));p&&(this._createEditorInContainer(p,i,n),this._wireImageDragEvents(p,i),n&&(this._updateImagePreviews(i),this._updateRichPreviews(i)))}},{key:"_buildQuadrantButtons",value:function(t,e){for(var n=[{key:"ButtonsTL",selector:".pict-mde-quadrant-tl",baseClass:"pict-mde-left-btn"},{key:"ButtonsBL",selector:".pict-mde-quadrant-bl",baseClass:"pict-mde-left-btn"},{key:"ButtonsTR",selector:".pict-mde-quadrant-tr",baseClass:"pict-mde-sidebar-btn"},{key:"ButtonsBR",selector:".pict-mde-quadrant-br",baseClass:"pict-mde-sidebar-btn"}],i=this,o=0;o<n.length;o++){var r=n[o],a=t.querySelector(r.selector);if(a){var s=this.options[r.key];if(Array.isArray(s))for(var c=function(){var t=s[l],n=document.createElement("button");n.type="button",n.className=r.baseClass,t.Class&&(n.className+=" "+t.Class),n.innerHTML=t.HTML||"",n.title=t.Title||"";var o,c,d,p=t.Action||"",u=p,h=null,f=p.indexOf(":");f>=0&&(u=p.substring(0,f),h=p.substring(f+1)),o=u,c=h,d=e,n.addEventListener("click",function(){"function"==typeof i[o]?null!==c?i[o](d,c):i[o](d):i.log.warn('PICT-MarkdownEditor _buildQuadrantButtons: method "'.concat(o,'" not found.'))}),a.appendChild(n)},l=0;l<s.length;l++)c()}}}},{key:"customConfigureExtensions",value:function(t,e){return t}},{key:"_renderAddButton",value:function(t){var e={ViewIdentifier:this._viewCallIdentifier},n=this.pict.parseTemplateByHash("MarkdownEditor-AddSegment",e),i=document.createElement("div");i.innerHTML=n;var o=i.firstElementChild;t.appendChild(o)}},{key:"onImageUpload",value:function(t,e,n){return!1}},{key:"toggleControls",value:function(t,e){var n=e;"boolean"==typeof t&&(n=t),this._controlsVisible="boolean"==typeof n?n:!this._controlsVisible;var i=this._getContainerElement();i&&(this._controlsVisible?(i.classList.add("pict-mde-controls-on"),i.classList.remove("pict-mde-controls-hidden")):(i.classList.remove("pict-mde-controls-on"),i.classList.add("pict-mde-controls-hidden")))}},{key:"toggleLineNumbers",value:function(t){this.toggleControls(t)}},{key:"togglePreview",value:function(t){"boolean"==typeof t?t?this.setPreviewMode(this._lastPreviewLayout||"bottom"):this.setPreviewMode("off"):"off"===this._previewMode?this.setPreviewMode(this._lastPreviewLayout||"bottom"):this.setPreviewMode("off")}},{key:"setPreviewMode",value:function(t){if(["off","bottom","side","tabbed"].indexOf(t)<0)this.log.warn('PICT-MarkdownEditor setPreviewMode: unknown mode "'.concat(t,'".'));else{"off"!==t&&(this._lastPreviewLayout=t),this._previewMode=t;var e=this._getContainerElement();if(e&&(e.classList.remove("pict-mde-preview-off","pict-mde-preview-bottom","pict-mde-preview-side","pict-mde-preview-tabbed","pict-mde-previews-hidden"),e.classList.add("pict-mde-preview-"+t)),"off"!==t)for(var n=this._getOrderedSegmentIndices(),i=0;i<n.length;i++)this._updateRichPreviews(n[i]),this._updateImagePreviews(n[i])}}},{key:"cyclePreviewMode",value:function(t){var e=["off","bottom","side","tabbed"],n=(e.indexOf(this._previewMode)+1)%e.length;this.setPreviewMode(e[n])}},{key:"switchSegmentTab",value:function(t,e){var n=this._getLogicalIndex(t);if(!(n<0)){this._segmentTabStates[n]=e;var i=document.getElementById("PictMDE-Segment-".concat(t));if(i){"preview"===e?(i.classList.add("pict-mde-tab-showing-preview"),this._updateRichPreviews(t),this._updateImagePreviews(t)):i.classList.remove("pict-mde-tab-showing-preview");var o=document.getElementById("PictMDE-TabBar-".concat(t));if(o)for(var r=o.querySelectorAll(".pict-mde-tab"),a=0;a<r.length;a++)r[a].getAttribute("data-tab")===e?r[a].classList.add("pict-mde-tab-active"):r[a].classList.remove("pict-mde-tab-active")}}}},{key:"toggleSegmentPreview",value:function(t,e){var n=this._getLogicalIndex(t);if(!(n<0)){var i=!!this._hiddenPreviewSegments[n];(i="boolean"==typeof e?!e:!i)?this._hiddenPreviewSegments[n]=!0:delete this._hiddenPreviewSegments[n];var o=document.getElementById("PictMDE-Segment-".concat(t));o&&(i?o.classList.add("pict-mde-preview-hidden"):(o.classList.remove("pict-mde-preview-hidden"),this._updateRichPreviews(t),this._updateImagePreviews(t)))}}},{key:"_getSegmentsFromData",value:function(){if(!this.options.ContentDataAddress)return null;var t={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options},e=this.fable.manifest.getValueByHash(t,this.options.ContentDataAddress);return Array.isArray(e)?e:null}},{key:"_setSegmentsToData",value:function(t){if(this.options.ContentDataAddress){var e={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options};this.fable.manifest.setValueByHash(e,this.options.ContentDataAddress,t)}}},{key:"_onSegmentContentChange",value:function(t,e){var n=this._getLogicalIndex(t);if(!(n<0)){var i=this._getSegmentsFromData();if(i){n<i.length&&(i[n].Content=e),this.onContentChange(n,e);var o=this;this._imagePreviewTimers[t]&&clearTimeout(this._imagePreviewTimers[t]),this._imagePreviewTimers[t]=setTimeout(function(){o._updateImagePreviews(t),delete o._imagePreviewTimers[t]},500),this._richPreviewTimers[t]&&clearTimeout(this._richPreviewTimers[t]),this._richPreviewTimers[t]=setTimeout(function(){o._updateRichPreviews(t),delete o._richPreviewTimers[t]},500)}}}},{key:"onContentChange",value:function(t,e){}},{key:"_getLogicalIndex",value:function(t){var e=this._getContainerElement();if(!e)return-1;for(var n=e.querySelectorAll(".pict-mde-segment"),i=0;i<n.length;i++){if(parseInt(n[i].getAttribute("data-segment-index"),10)===t)return i}return-1}},{key:"_getOrderedSegmentIndices",value:function(){var t=this._getContainerElement();if(!t)return[];for(var e=t.querySelectorAll(".pict-mde-segment"),n=[],i=0;i<e.length;i++)n.push(parseInt(e[i].getAttribute("data-segment-index"),10));return n}},{key:"addSegment",value:function(t){var e="string"==typeof t?t:"",n=this._getSegmentsFromData();n||(n=[]),n.push({Content:e}),this._setSegmentsToData(n),this._buildEditorUI()}},{key:"removeSegment",value:function(t){var e=this._getLogicalIndex(t);if(e<0)this.log.warn("PICT-MarkdownEditor removeSegment: segment index ".concat(t," not found."));else{var n=this._getSegmentsFromData();if(!n||n.length<=1)this.log.warn("PICT-MarkdownEditor removeSegment: cannot remove the last segment.");else{this._segmentEditors[t]&&(this._segmentEditors[t].destroy(),delete this._segmentEditors[t]),n.splice(e,1),this._setSegmentsToData(n);var i={};for(var o in this._hiddenPreviewSegments){var r=parseInt(o,10);r<e?i[r]=!0:r>e&&(i[r-1]=!0)}this._hiddenPreviewSegments=i;var a={};for(var s in this._segmentTabStates){var c=parseInt(s,10);c<e?a[c]=this._segmentTabStates[s]:c>e&&(a[c-1]=this._segmentTabStates[s])}this._segmentTabStates=a,this._buildEditorUI()}}}},{key:"moveSegmentUp",value:function(t){var e=this._getLogicalIndex(t);if(!(e<=0)){this._marshalAllEditorsToData();var n=this._getSegmentsFromData();if(n){var i=n[e];n[e]=n[e-1],n[e-1]=i,this._swapHiddenPreviewState(e,e-1),this._swapSegmentTabStates(e,e-1),this._buildEditorUI()}}}},{key:"moveSegmentDown",value:function(t){var e=this._getLogicalIndex(t),n=this._getSegmentsFromData();if(!(!n||e<0||e>=n.length-1)){this._marshalAllEditorsToData();var i=n[e];n[e]=n[e+1],n[e+1]=i,this._swapHiddenPreviewState(e,e+1),this._swapSegmentTabStates(e,e+1),this._buildEditorUI()}}},{key:"getSegmentContent",value:function(t){var e=this._getOrderedSegmentIndices();if(t<0||t>=e.length)return"";var n=e[t],i=this._segmentEditors[n];return i?i.state.doc.toString():""}},{key:"setSegmentContent",value:function(t,e){var n=this._getOrderedSegmentIndices();if(t<0||t>=n.length)this.log.warn("PICT-MarkdownEditor setSegmentContent: index ".concat(t," out of range."));else{var i=n[t],o=this._segmentEditors[i];o&&o.dispatch({changes:{from:0,to:o.state.doc.length,insert:e}})}}},{key:"getSegmentCount",value:function(){return this._getOrderedSegmentIndices().length}},{key:"getAllContent",value:function(t){for(var e="string"==typeof t?t:"\n\n",n=this._getOrderedSegmentIndices(),i=[],o=0;o<n.length;o++){var r=this._segmentEditors[n[o]];r&&i.push(r.state.doc.toString())}return i.join(e)}},{key:"_marshalAllEditorsToData",value:function(){var t=this._getSegmentsFromData();if(t)for(var e=this._getOrderedSegmentIndices(),n=0;n<e.length;n++){var i=this._segmentEditors[e[n]];i&&n<t.length&&(t[n].Content=i.state.doc.toString())}}},{key:"setReadOnly",value:function(t){this.options.ReadOnly=t,this.initialRenderComplete&&(this._marshalAllEditorsToData(),this._buildEditorUI())}},{key:"marshalToView",value:function(){_superPropGet(e,"marshalToView",this,3)([]),this.initialRenderComplete&&this.options.ContentDataAddress&&this._buildEditorUI()}},{key:"marshalFromView",value:function(){_superPropGet(e,"marshalFromView",this,3)([]),this._marshalAllEditorsToData()}},{key:"destroy",value:function(){for(var t in this._segmentEditors)this._segmentEditors[t]&&this._segmentEditors[t].destroy();for(var e in this._segmentEditors={},this._richPreviewTimers)clearTimeout(this._richPreviewTimers[e]);this._richPreviewTimers={},this._richPreviewGenerations={},this._segmentTabStates={}}}])}(i);e.exports=p,e.exports.default_configuration=r},{"./Pict-MDE-CodeMirror.js":80,"./Pict-MDE-DragAndReorder.js":81,"./Pict-MDE-Formatting.js":82,"./Pict-MDE-ImageHandling.js":83,"./Pict-MDE-RichPreview.js":84,"./Pict-Section-MarkdownEditor-DefaultConfiguration.js":85,"pict-section-content":77,"pict-view":88}],87:[function(t,e,n){e.exports={name:"pict-view",version:"1.0.67",description:"Pict View Base Class",main:"source/Pict-View.js",scripts:{test:"npx quack test",tests:"npx quack test -g",start:"node source/Pict-View.js",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":'docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-view" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-view-image:local',"docker-dev-shell":"docker exec -it pict-view-dev /bin/bash",types:"tsc -p .",lint:"eslint source/**"},types:"types/source/Pict-View.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-view.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-view/issues"},homepage:"https://github.com/stevenvelozo/pict-view#readme",devDependencies:{"@eslint/js":"^9.39.1","browser-env":"^3.3.0",eslint:"^9.39.1",pict:"^1.0.348",quackage:"^1.0.58",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{fable:"^3.1.63","fable-serviceproviderbase":"^3.0.19"}}},{}],88:[function(t,e,n){var i=t("fable-serviceproviderbase"),o=t("../package.json"),r={DefaultRenderable:!1,DefaultDestinationAddress:!1,DefaultTemplateRecordAddress:!1,ViewIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoRender:!0,AutoRenderOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,CSSHash:!1,CSS:!1,CSSProvider:!1,CSSPriority:500,Templates:[],DefaultTemplates:[],Renderables:[],Manifests:{}},a=function(t){function e(t,n,i){var a;_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),n),i])).fable,a.options,a.UUID,a.Hash,a.log;var s=a.Hash===a.UUID;a.UUID="V-".concat(a.UUID),s&&(a.Hash=a.UUID),a.options.ViewIdentifier||(a.options.ViewIdentifier="AutoViewID-".concat(a.fable.getUUID())),a.serviceType="PictView",a._Package=o,a.pict=a.fable,a.AppData=a.pict.AppData,a.Bundle=a.pict.Bundle,a.initializeTimestamp=!1,a.lastSolvedTimestamp=!1,a.lastRenderedTimestamp=!1,a.lastMarshalFromViewTimestamp=!1,a.lastMarshalToViewTimestamp=!1,a.pict.instantiateServiceProviderIfNotExists("TransactionTracking");for(var c=0;c<a.options.Templates.length;c++){var l=a.options.Templates[c];"Hash"in l&&"Template"in l?(l.Source||(l.Source="PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," options object.")),a.pict.TemplateProvider.addTemplate(l.Hash,l.Template,l.Source)):a.log.error("PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," could not load Template ").concat(c," in the options array."),l)}for(var d=0;d<a.options.DefaultTemplates.length;d++){var p=a.options.DefaultTemplates[d];"Postfix"in p&&"Template"in p?(p.Source||(p.Source="PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," options object.")),a.pict.TemplateProvider.addDefaultTemplate(p.Prefix,p.Postfix,p.Template,p.Source)):a.log.error("PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," could not load Default Template ").concat(d," in the options array."),p)}if(a.options.CSS){var u=a.options.CSSHash?a.options.CSSHash:"View-".concat(a.options.ViewIdentifier),h=a.options.CSSProvider?a.options.CSSProvider:u;a.pict.CSSMap.addCSS(u,a.options.CSS,h,a.options.CSSPriority)}a.renderables={};for(var f=0;f<a.options.Renderables.length;f++){var v=a.options.Renderables[f];a.addRenderable(v)}return a}return _inherits(e,t),_createClass(e,[{key:"addRenderable",value:function(t,e,n,i,o){var r;"object"==_typeof(t)?r=t:r={RenderableHash:t,TemplateHash:e,DefaultTemplateRecordAddress:n,ContentDestinationAddress:i,RenderMethod:"string"!=typeof o?o:"replace"};"string"!=typeof r.RenderableHash||"string"!=typeof r.TemplateHash?this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Renderable; RenderableHash or TemplateHash are invalid."),r):(this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," adding renderable [").concat(r.RenderableHash,"] pointed to template ").concat(r.TemplateHash,".")),this.renderables[r.RenderableHash]=r)}},{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}},{key:"initializeAsync",value:function(t){var e=this;if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," async initialize called but initialization is already completed. Aborting.")),t();var n=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," beginning initialization...")),n.anticipate(this.onBeforeInitializeAsync.bind(this)),n.anticipate(this.onInitializeAsync.bind(this)),n.anticipate(this.onAfterInitializeAsync.bind(this)),n.wait(function(n){return n&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," initialization failed: ").concat(n.message||n),{stack:n.stack}),e.initializeTimestamp=e.pict.log.getTimeStamp(),e.pict.LogNoisiness>0&&e.log.info("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," initialization complete.")),t()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onBeforeRender",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeRender:")),!0}},{key:"onBeforeRenderAsync",value:function(t,e){return this.onBeforeRender(e),t()}},{key:"onBeforeProject",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeProject:")),!0}},{key:"onBeforeProjectAsync",value:function(t,e){return this.onBeforeProject(e),t()}},{key:"buildRenderOptions",value:function(t,e,n){var i={Valid:!0};return i.RenderableHash="string"==typeof t?t:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,i.RenderableHash||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not find a suitable RenderableHash ").concat(i.RenderableHash," (param ").concat(t,"because it is not a valid renderable.")),i.Valid=!1),i.Renderable=this.renderables[i.RenderableHash],i.Renderable||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(i.RenderableHash," (param ").concat(t,") because it does not exist.")),i.Valid=!1),i.DestinationAddress="string"==typeof e?e:"string"==typeof i.Renderable.ContentDestinationAddress?i.Renderable.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress&&this.options.DefaultDestinationAddress,i.DestinationAddress||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(i.RenderableHash," (param ").concat(t,") because it does not have a valid destination address (param ").concat(e,").")),i.Valid=!1),"object"===_typeof(n)?(i.RecordAddress="Passed in as object",i.Record=n):(i.RecordAddress="string"==typeof n?n:"string"==typeof i.Renderable.DefaultTemplateRecordAddress?i.Renderable.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,i.Record="string"==typeof i.RecordAddress?this.pict.DataProvider.getDataByAddress(i.RecordAddress):void 0),i}},{key:"assignRenderContent",value:function(t,e,n){return this.pict.ContentAssignment.projectContent(t.RenderMethod,e,n,t.TestAddress)}},{key:"render",value:function(t,e,n,i){return this.renderWithScope(this,t,e,n,i)}},{key:"renderWithScope",value:function(t,e,n,i,o){var r,a,s,c="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable;return c?("__Virtual"==c?r={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof n?n:"string"==typeof r.ContentDestinationAddress?r.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:o&&o.TransactionHash,RootRenderableViewHash:o&&o.RootRenderableViewHash}:(r=Object.assign({},this.renderables[c])).ContentDestinationAddress="string"==typeof n?n:"string"==typeof r.ContentDestinationAddress?r.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,r.TransactionHash||(r.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(c,"-U-").concat(this.pict.getUUID()),r.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(r.TransactionHash)),r?r.ContentDestinationAddress?("object"===_typeof(i)?(s=i,a="Passed in as object"):s="string"==typeof(a="string"==typeof i?i:"string"==typeof r.DefaultTemplateRecordAddress?r.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress)?this.pict.DataProvider.getDataByAddress(a):void 0,this.onBeforeRender(r),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(c,"] Destination[").concat(r.ContentDestinationAddress,"] TemplateRecordAddress[").concat(a,"] render:")),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Render of Renderable[").concat(c,"] to Destination [").concat(r.ContentDestinationAddress,"]...")),r.Content=this.pict.parseTemplateByHash(r.TemplateHash,s,null,[this],t,{RootRenderable:"object"===_typeof(o)?o:r}),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(c,"] content length ").concat(r.Content.length," to Destination [").concat(r.ContentDestinationAddress,"] using render method [").concat(r.RenderMethod,"].")),this.onBeforeProject(r),this.onProject(r),"virtual-assignment"!==r.RenderMethod&&(this.onAfterProject(r),this.onAfterRender(r)),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(e,") because it does not have a valid destination address.")),!1):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(e,") because it does not exist.")),!1)):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(e,") because it is not a valid renderable.")),!1)}},{key:"renderAsync",value:function(t,e,n,i,o){return this.renderWithScopeAsync(this,t,e,n,i,o)}},{key:"renderWithScopeAsync",value:function(t,e,n,i,o,r){var a,s,c,l=this,d="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,p="function"==typeof r?r:"function"==typeof i?i:"function"==typeof n?n:"function"==typeof e?e:"function"==typeof o?o:null;if(p||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),p=function(t){t&&l.log.error("PictView [".concat(l.UUID,"]::[").concat(l.Hash,"] ").concat(l.options.Name," renderAsync Auto Callback Error: ").concat(t),t)}),!d)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(d," (param ").concat(e,"because it is not a valid renderable.")),p(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(d," (param ").concat(e,"because it is not a valid renderable.")));if("__Virtual"==d?a={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof n?n:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:o&&"function"!=typeof o&&o.TransactionHash,RootRenderableViewHash:o&&"function"!=typeof o&&o.RootRenderableViewHash}:(a=Object.assign({},this.renderables[d])).ContentDestinationAddress="string"==typeof n?n:"string"==typeof a.ContentDestinationAddress?a.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,a.TransactionHash||(a.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(d,"-U-").concat(this.pict.getUUID()),a.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(a.TransactionHash)),!a)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not exist.")),p(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not exist.")));if(!a.ContentDestinationAddress)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not have a valid destination address.")),p(new Error("Could not render ".concat(d)));"object"===_typeof(i)?(c=i,s="Passed in as object"):(s="string"==typeof i?i:"string"==typeof a.DefaultTemplateRecordAddress?a.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,c="string"==typeof s?this.pict.DataProvider.getDataByAddress(s):void 0),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(d,"] Destination[").concat(a.ContentDestinationAddress,"] TemplateRecordAddress[").concat(s,"] renderAsync:")),this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Asynchronous Render (callback-style)..."));var u=this.fable.newAnticipate();u.anticipate(function(t){l.onBeforeRenderAsync(t,a)}),u.anticipate(function(n){l.pict.parseTemplateByHash(a.TemplateHash,c,function(t,i){return t?(l.log.error("PictView [".concat(l.UUID,"]::[").concat(l.Hash,"] ").concat(l.options.ViewIdentifier," could not render (asynchronously) ").concat(d," (param ").concat(e,") because it did not parse the template."),t),n(t)):(a.Content=i,n())},[l],t,{RootRenderable:"object"===_typeof(o)?o:a})}),u.anticipate(function(t){l.onBeforeProjectAsync(t,a)}),u.anticipate(function(t){l.onProjectAsync(t,a)}),"virtual-assignment"!==a.RenderMethod&&(u.anticipate(function(t){l.onAfterProjectAsync(t,a)}),u.anticipate(function(t){l.onAfterRenderAsync(t,a)})),u.wait(p)}},{key:"renderDefaultAsync",value:function(t){this.renderAsync(t)}},{key:"basicRender",value:function(t,e,n){return this.basicRenderWithScope(this,t,e,n)}},{key:"basicRenderWithScope",value:function(t,e,n,i){var o=this.buildRenderOptions(e,n,i);return o.Valid?(this.assignRenderContent(o.Renderable,o.DestinationAddress,this.pict.parseTemplateByHash(o.Renderable.TemplateHash,o.Record,null,[this],t,{RootRenderable:o.Renderable})),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(o.RenderableHash," because it is not valid.")),!1)}},{key:"basicRenderAsync",value:function(t,e,n,i){return this.basicRenderWithScopeAsync(this,t,e,n,i)}},{key:"basicRenderWithScopeAsync",value:function(t,e,n,i,o){var r=this,a="function"==typeof o?o:"function"==typeof i?i:"function"==typeof n?n:"function"==typeof e?e:null;a||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," basicRenderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),a=function(t){t&&r.log.error("PictView [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.Name," basicRenderAsync Auto Callback Error: ").concat(t),t)});var s=this.buildRenderOptions(e,n,i);if(!s.Valid){var c="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(s.RenderableHash," because it is not valid.");return this.log.error(c),a(new Error(c))}this.pict.parseTemplateByHash(s.Renderable.TemplateHash,s.Record,function(t,e){return t?(r.log.error("PictView [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.ViewIdentifier," could not render (asynchronously) ").concat(s.RenderableHash," because it did not parse the template."),t),a(t)):(r.assignRenderContent(s.Renderable,s.DestinationAddress,e),a())},[this],t,{RootRenderable:s.Renderable})}},{key:"onProject",value:function(t){this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onProject:")),"virtual-assignment"===t.RenderMethod&&this.pict.TransactionTracking.pushToTransactionQueue(t.TransactionHash,{ViewHash:this.Hash,Renderable:t},"Deferred-Post-Content-Assignment"),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(t.RenderableHash,"] content length ").concat(t.Content.length," to Destination [").concat(t.ContentDestinationAddress,"] using Async render method ").concat(t.RenderMethod,".")),this.pict.ContentAssignment.projectContent(t.RenderMethod,t.ContentDestinationAddress,t.Content,t.TestAddress),this.lastRenderedTimestamp=this.pict.log.getTimeStamp()}},{key:"onProjectAsync",value:function(t,e){return this.onProject(e),t()}},{key:"onAfterRender",value:function(t){if(this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender:")),t&&t.RootRenderableViewHash===this.Hash){var e,n=_createForOfIteratorHelper(this.pict.TransactionTracking.clearTransactionQueue(t.TransactionHash)||[]);try{for(n.s();!(e=n.n()).done;){var i=e.value,o=this.pict.views[i.Data.ViewHash];o?(o.onAfterProject(),o.onAfterRender(i.Data.Renderable)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender: Could not find view for transaction hash ").concat(t.TransactionHash," and ViewHash ").concat(i.Data.ViewHash,"."))}}catch(t){n.e(t)}finally{n.f()}}return!0}},{key:"onAfterRenderAsync",value:function(t,e){var n=this;this.onAfterRender(e);var i=this.fable.newAnticipate();if(e&&e.RootRenderableViewHash===this.Hash){var o,r=_createForOfIteratorHelper(this.pict.TransactionTracking.clearTransactionQueue(e.TransactionHash)||[]);try{var a=function(){var t=o.value,r=n.pict.views[t.Data.ViewHash];if(!r)return n.log.error("PictView [".concat(n.UUID,"]::[").concat(n.Hash,"] ").concat(n.options.ViewIdentifier," onAfterRenderAsync: Could not find view for transaction hash ").concat(e.TransactionHash," and ViewHash ").concat(t.Data.ViewHash,".")),1;i.anticipate(r.onAfterProjectAsync.bind(r)),i.anticipate(function(e){r.onAfterRenderAsync(e,t.Data.Renderable)})};for(r.s();!(o=r.n()).done;)a()}catch(t){r.e(t)}finally{r.f()}}return i.wait(t)}},{key:"onAfterProject",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterProject:")),!0}},{key:"onAfterProjectAsync",value:function(t,e){return t()}},{key:"onBeforeSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeSolve:")),!0}},{key:"onBeforeSolveAsync",value:function(t){return this.onBeforeSolve(),t()}},{key:"onSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onSolve:")),!0}},{key:"onSolveAsync",value:function(t){return this.onSolve(),t()}},{key:"solve",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeSolve(),this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"solveAsync",value:function(t){var e=this,n=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeSolveAsync.bind(this)),n.anticipate(this.onSolveAsync.bind(this)),n.anticipate(this.onAfterSolveAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," solveAsync() complete.")),e.lastSolvedTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterSolve:")),!0}},{key:"onAfterSolveAsync",value:function(t){return this.onAfterSolve(),t()}},{key:"onBeforeMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalFromView:")),!0}},{key:"onBeforeMarshalFromViewAsync",value:function(t){return this.onBeforeMarshalFromView(),t()}},{key:"onMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalFromView:")),!0}},{key:"onMarshalFromViewAsync",value:function(t){return this.onMarshalFromView(),t()}},{key:"marshalFromView",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalFromView(),this.onMarshalFromView(),this.onAfterMarshalFromView(),this.lastMarshalFromViewTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"marshalFromViewAsync",value:function(t){var e=this,n=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeMarshalFromViewAsync.bind(this)),n.anticipate(this.onMarshalFromViewAsync.bind(this)),n.anticipate(this.onAfterMarshalFromViewAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," marshalFromViewAsync() complete.")),e.lastMarshalFromViewTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalFromView:")),!0}},{key:"onAfterMarshalFromViewAsync",value:function(t){return this.onAfterMarshalFromView(),t()}},{key:"onBeforeMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalToView:")),!0}},{key:"onBeforeMarshalToViewAsync",value:function(t){return this.onBeforeMarshalToView(),t()}},{key:"onMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalToView:")),!0}},{key:"onMarshalToViewAsync",value:function(t){return this.onMarshalToView(),t()}},{key:"marshalToView",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalToView(),this.onMarshalToView(),this.onAfterMarshalToView(),this.lastMarshalToViewTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"marshalToViewAsync",value:function(t){var e=this,n=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeMarshalToViewAsync.bind(this)),n.anticipate(this.onMarshalToViewAsync.bind(this)),n.anticipate(this.onAfterMarshalToViewAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," marshalToViewAsync() complete.")),e.lastMarshalToViewTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalToView:")),!0}},{key:"onAfterMarshalToViewAsync",value:function(t){return this.onAfterMarshalToView(),t()}},{key:"isPictView",get:function(){return!0}}])}(i);e.exports=a},{"../package.json":87,"fable-serviceproviderbase":20}],89:[function(t,e,n){var i,o,r=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function c(t){if(i===setTimeout)return setTimeout(t,0);if((i===a||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:a}catch(t){i=a}try{o="function"==typeof clearTimeout?clearTimeout:s}catch(t){o=s}}();var l,d=[],p=!1,u=-1;function h(){p&&l&&(p=!1,l.length?d=l.concat(d):u=-1,d.length&&f())}function f(){if(!p){var t=c(h);p=!0;for(var e=d.length;e;){for(l=d,d=[];++u<e;)l&&l[u].run();u=-1,e=d.length}l=null,p=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===s||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{return o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function v(t,e){this.fun=t,this.array=e}function g(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new v(t,e)),1!==d.length||p||c(f)},v.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},{}],90:[function(t,e,n){(function(t){(function(){!function(i){var o="object"==_typeof(n)&&n&&!n.nodeType&&n,r="object"==_typeof(e)&&e&&!e.nodeType&&e,a="object"==_typeof(t)&&t;a.global!==a&&a.window!==a&&a.self!==a||(i=a);var s,c,l=2147483647,d=36,p=/^xn--/,u=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=Math.floor,g=String.fromCharCode;function m(t){throw new RangeError(f[t])}function y(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i}function b(t,e){var n=t.split("@"),i="";return n.length>1&&(i=n[0]+"@",t=n[1]),i+y((t=t.replace(h,".")).split("."),e).join(".")}function w(t){for(var e,n,i=[],o=0,r=t.length;o<r;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<r?56320==(64512&(n=t.charCodeAt(o++)))?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),o--):i.push(e);return i}function C(t){return y(t,function(t){var e="";return t>65535&&(e+=g((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=g(t)}).join("")}function x(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:d}function A(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function D(t,e,n){var i=0;for(t=n?v(t/700):t>>1,t+=v(t/e);t>455;i+=d)t=v(t/35);return v(i+36*t/(t+38))}function k(t){var e,n,i,o,r,a,s,c,p,u,h=[],f=t.length,g=0,y=128,b=72;for((n=t.lastIndexOf("-"))<0&&(n=0),i=0;i<n;++i)t.charCodeAt(i)>=128&&m("not-basic"),h.push(t.charCodeAt(i));for(o=n>0?n+1:0;o<f;){for(r=g,a=1,s=d;o>=f&&m("invalid-input"),((c=x(t.charCodeAt(o++)))>=d||c>v((l-g)/a))&&m("overflow"),g+=c*a,!(c<(p=s<=b?1:s>=b+26?26:s-b));s+=d)a>v(l/(u=d-p))&&m("overflow"),a*=u;b=D(g-r,e=h.length+1,0==r),v(g/e)>l-y&&m("overflow"),y+=v(g/e),g%=e,h.splice(g++,0,y)}return C(h)}function E(t){var e,n,i,o,r,a,s,c,p,u,h,f,y,b,C,x=[];for(f=(t=w(t)).length,e=128,n=0,r=72,a=0;a<f;++a)(h=t[a])<128&&x.push(g(h));for(i=o=x.length,o&&x.push("-");i<f;){for(s=l,a=0;a<f;++a)(h=t[a])>=e&&h<s&&(s=h);for(s-e>v((l-n)/(y=i+1))&&m("overflow"),n+=(s-e)*y,e=s,a=0;a<f;++a)if((h=t[a])<e&&++n>l&&m("overflow"),h==e){for(c=n,p=d;!(c<(u=p<=r?1:p>=r+26?26:p-r));p+=d)C=c-u,b=d-u,x.push(g(A(u+C%b,0))),c=v(C/b);x.push(g(A(c,0))),r=D(n,y,i==o),n=0,++i}++n,++e}return x.join("")}if(s={version:"1.4.1",ucs2:{decode:w,encode:C},decode:k,encode:E,toASCII:function(t){return b(t,function(t){return u.test(t)?"xn--"+E(t):t})},toUnicode:function(t){return b(t,function(t){return p.test(t)?k(t.slice(4).toLowerCase()):t})}},o&&r)if(e.exports==o)r.exports=s;else for(c in s)s.hasOwnProperty(c)&&(o[c]=s[c]);else i.punycode=s}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],91:[function(t,e,n){var i=String.prototype.replace,o=/%20/g,r="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(t){return i.call(t,o,"+")},RFC3986:function(t){return String(t)}},RFC1738:r,RFC3986:a}},{}],92:[function(t,e,n){var i=t("./stringify"),o=t("./parse"),r=t("./formats");e.exports={formats:r,parse:o,stringify:i}},{"./formats":91,"./parse":93,"./stringify":94}],93:[function(t,e,n){var i=t("./utils"),o=Object.prototype.hasOwnProperty,r=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:i.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},s=function(t){return t.replace(/&#(\d+);/g,function(t,e){return String.fromCharCode(parseInt(e,10))})},c=function(t,e,n){if(t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&n>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(1===e.arrayLimit?"":"s")+" allowed in an array.");return t},l=function(t,e,n,r){if(t){var a=function(t,e){var n=e.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t;if(e.depth<=0){if(!e.plainObjects&&o.call(Object.prototype,n)&&!e.allowPrototypes)return;return[n]}var i=/(\[[^[\]]*])/g,r=/(\[[^[\]]*])/.exec(n),a=r?n.slice(0,r.index):n,s=[];if(a){if(!e.plainObjects&&o.call(Object.prototype,a)&&!e.allowPrototypes)return;s[s.length]=a}for(var c=0;null!==(r=i.exec(n))&&c<e.depth;){c+=1;var l=r[1].slice(1,-1);if(!e.plainObjects&&o.call(Object.prototype,l)&&!e.allowPrototypes)return;s[s.length]=r[1]}if(r){if(!0===e.strictDepth)throw new RangeError("Input depth exceeded depth option of "+e.depth+" and strictDepth is true");s[s.length]="["+n.slice(r.index)+"]"}return s}(t,n);if(a)return function(t,e,n,o){var r=0;if(t.length>0&&"[]"===t[t.length-1]){var a=t.slice(0,-1).join("");r=Array.isArray(e)&&e[a]?e[a].length:0}for(var s=o?e:c(e,n,r),l=t.length-1;l>=0;--l){var d,p=t[l];if("[]"===p&&n.parseArrays)d=i.isOverflow(s)?s:n.allowEmptyArrays&&(""===s||n.strictNullHandling&&null===s)?[]:i.combine([],s,n.arrayLimit,n.plainObjects);else{d=n.plainObjects?{__proto__:null}:{};var u="["===p.charAt(0)&&"]"===p.charAt(p.length-1)?p.slice(1,-1):p,h=n.decodeDotInKeys?u.replace(/%2E/g,"."):u,f=parseInt(h,10),v=!isNaN(f)&&p!==h&&String(f)===h&&f>=0&&n.parseArrays;if(n.parseArrays||""!==h)if(v&&f<n.arrayLimit)(d=[])[f]=s;else{if(v&&n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(1===n.arrayLimit?"":"s")+" allowed in an array.");v?(d[f]=s,i.markOverflow(d,f)):"__proto__"!==h&&(d[h]=s)}else d={0:s}}s=d}return s}(a,e,n,r)}};e.exports=function(t,e){var n=function(t){if(!t)return a;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==t.throwOnLimitExceeded&&"boolean"!=typeof t.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var e=void 0===t.charset?a.charset:t.charset,n=void 0===t.duplicates?a.duplicates:t.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||a.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:a.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:a.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:a.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:a.decoder,delimiter:"string"==typeof t.delimiter||i.isRegExp(t.delimiter)?t.delimiter:a.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:a.depth,duplicates:n,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:a.strictDepth,strictMerge:"boolean"==typeof t.strictMerge?!!t.strictMerge:a.strictMerge,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof t.throwOnLimitExceeded&&t.throwOnLimitExceeded}}(e);if(""===t||null==t)return n.plainObjects?{__proto__:null}:{};for(var d="string"==typeof t?function(t,e){var n={__proto__:null},l=e.ignoreQueryPrefix?t.replace(/^\?/,""):t;l=l.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var d=e.parameterLimit===1/0?void 0:e.parameterLimit,p=l.split(e.delimiter,e.throwOnLimitExceeded?d+1:d);if(e.throwOnLimitExceeded&&p.length>d)throw new RangeError("Parameter limit exceeded. Only "+d+" parameter"+(1===d?"":"s")+" allowed.");var u,h=-1,f=e.charset;if(e.charsetSentinel)for(u=0;u<p.length;++u)0===p[u].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[u]?f="utf-8":"utf8=%26%2310003%3B"===p[u]&&(f="iso-8859-1"),h=u,u=p.length);for(u=0;u<p.length;++u)if(u!==h){var v,g,m=p[u],y=m.indexOf("]="),b=-1===y?m.indexOf("="):y+1;if(-1===b?(v=e.decoder(m,a.decoder,f,"key"),g=e.strictNullHandling?null:""):null!==(v=e.decoder(m.slice(0,b),a.decoder,f,"key"))&&(g=i.maybeMap(c(m.slice(b+1),e,r(n[v])?n[v].length:0),function(t){return e.decoder(t,a.decoder,f,"value")})),g&&e.interpretNumericEntities&&"iso-8859-1"===f&&(g=s(String(g))),m.indexOf("[]=")>-1&&(g=r(g)?[g]:g),e.comma&&r(g)&&g.length>e.arrayLimit){if(e.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(1===e.arrayLimit?"":"s")+" allowed in an array.");g=i.combine([],g,e.arrayLimit,e.plainObjects)}if(null!==v){var w=o.call(n,v);w&&("combine"===e.duplicates||m.indexOf("[]=")>-1)?n[v]=i.combine(n[v],g,e.arrayLimit,e.plainObjects):w&&"last"!==e.duplicates||(n[v]=g)}}return n}(t,n):t,p=n.plainObjects?{__proto__:null}:{},u=Object.keys(d),h=0;h<u.length;++h){var f=u[h],v=l(f,d[f],n,"string"==typeof t);p=i.merge(p,v,n)}return!0===n.allowSparse?p:i.compact(p)}},{"./utils":95}],94:[function(t,e,n){var i=t("side-channel"),o=t("./utils"),r=t("./formats"),a=Object.prototype.hasOwnProperty,s={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},c=Array.isArray,l=Array.prototype.push,d=function(t,e){l.apply(t,c(e)?e:[e])},p=Date.prototype.toISOString,u=r.default,h={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o.encode,encodeValuesOnly:!1,filter:void 0,format:u,formatter:r.formatters[u],indices:!1,serializeDate:function(t){return p.call(t)},skipNulls:!1,strictNullHandling:!1},f={},v=function t(e,n,r,a,s,l,p,u,v,g,m,y,b,w,C,x,A,D){for(var k,E=e,S=D,P=0,T=!1;void 0!==(S=S.get(f))&&!T;){var I=S.get(e);if(P+=1,void 0!==I){if(I===P)throw new RangeError("Cyclic object value");T=!0}void 0===S.get(f)&&(P=0)}if("function"==typeof g?E=g(n,E):E instanceof Date?E=b(E):"comma"===r&&c(E)&&(E=o.maybeMap(E,function(t){return t instanceof Date?b(t):t})),null===E){if(l)return v&&!x?v(n,h.encoder,A,"key",w):n;E=""}if("string"==typeof(k=E)||"number"==typeof k||"boolean"==typeof k||"symbol"===_typeof(k)||"bigint"==typeof k||o.isBuffer(E))return v?[C(x?n:v(n,h.encoder,A,"key",w))+"="+C(v(E,h.encoder,A,"value",w))]:[C(n)+"="+C(String(E))];var _,F=[];if(void 0===E)return F;if("comma"===r&&c(E))x&&v&&(E=o.maybeMap(E,v)),_=[{value:E.length>0?E.join(",")||null:void 0}];else if(c(g))_=g;else{var L=Object.keys(E);_=m?L.sort(m):L}var M=u?String(n).replace(/\./g,"%2E"):String(n),R=a&&c(E)&&1===E.length?M+"[]":M;if(s&&c(E)&&0===E.length)return R+"[]";for(var B=0;B<_.length;++B){var H=_[B],V="object"===_typeof(H)&&H&&void 0!==H.value?H.value:E[H];if(!p||null!==V){var j=y&&u?String(H).replace(/\./g,"%2E"):String(H),O=c(E)?"function"==typeof r?r(R,j):R:R+(y?"."+j:"["+j+"]");D.set(e,P);var N=i();N.set(f,D),d(F,t(V,O,r,a,s,l,p,u,"comma"===r&&x&&c(E)?null:v,g,m,y,b,w,C,x,A,N))}}return F};e.exports=function(t,e){var n,o=t,l=function(t){if(!t)return h;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.encodeDotInKeys&&"boolean"!=typeof t.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||h.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=r.default;if(void 0!==t.format){if(!a.call(r.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i,o=r.formatters[n],l=h.filter;if(("function"==typeof t.filter||c(t.filter))&&(l=t.filter),i=t.arrayFormat in s?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":h.arrayFormat,"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=void 0===t.allowDots?!0===t.encodeDotInKeys||h.allowDots:!!t.allowDots;return{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:h.addQueryPrefix,allowDots:d,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:h.allowEmptyArrays,arrayFormat:i,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:h.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:void 0===t.delimiter?h.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:h.encode,encodeDotInKeys:"boolean"==typeof t.encodeDotInKeys?t.encodeDotInKeys:h.encodeDotInKeys,encoder:"function"==typeof t.encoder?t.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:h.encodeValuesOnly,filter:l,format:n,formatter:o,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:h.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:h.strictNullHandling}}(e);"function"==typeof l.filter?o=(0,l.filter)("",o):c(l.filter)&&(n=l.filter);var p=[];if("object"!==_typeof(o)||null===o)return"";var u=s[l.arrayFormat],f="comma"===u&&l.commaRoundTrip;n||(n=Object.keys(o)),l.sort&&n.sort(l.sort);for(var g=i(),m=0;m<n.length;++m){var y=n[m],b=o[y];l.skipNulls&&null===b||d(p,v(b,y,u,f,l.allowEmptyArrays,l.strictNullHandling,l.skipNulls,l.encodeDotInKeys,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,g))}var w=p.join(l.delimiter),C=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?C+="utf8=%26%2310003%3B&":C+="utf8=%E2%9C%93&"),w.length>0?C+w:""}},{"./formats":91,"./utils":95,"side-channel":99}],95:[function(t,e,n){var i=t("./formats"),o=t("side-channel"),r=Object.prototype.hasOwnProperty,a=Array.isArray,s=o(),c=function(t,e){return s.set(t,e),t},l=function(t){return s.has(t)},d=function(t){return s.get(t)},p=function(t,e){s.set(t,e)},u=function(){for(var t=[],e=0;e<256;++e)t[t.length]="%"+((e<16?"0":"")+e.toString(16)).toUpperCase();return t}(),h=function(t,e){for(var n=e&&e.plainObjects?{__proto__:null}:{},i=0;i<t.length;++i)void 0!==t[i]&&(n[i]=t[i]);return n},f=1024;e.exports={arrayToObject:h,assign:function(t,e){return Object.keys(e).reduce(function(t,n){return t[n]=e[n],t},t)},combine:function(t,e,n,i){if(l(t)){var o=d(t)+1;return t[o]=e,p(t,o),t}var r=[].concat(t,e);return r.length>n?c(h(r,{plainObjects:i}),r.length-1):r},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],i=0;i<e.length;++i)for(var o=e[i],r=o.obj[o.prop],s=Object.keys(r),c=0;c<s.length;++c){var l=s[c],d=r[l];"object"===_typeof(d)&&null!==d&&-1===n.indexOf(d)&&(e[e.length]={obj:r,prop:l},n[n.length]=d)}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(a(n)){for(var i=[],o=0;o<n.length;++o)void 0!==n[o]&&(i[i.length]=n[o]);e.obj[e.prop]=i}}}(e),t},decode:function(t,e,n){var i=t.replace(/\+/g," ");if("iso-8859-1"===n)return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch(t){return i}},encode:function(t,e,n,o,r){if(0===t.length)return t;var a=t;if("symbol"===_typeof(t)?a=Symbol.prototype.toString.call(t):"string"!=typeof t&&(a=String(t)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"});for(var s="",c=0;c<a.length;c+=f){for(var l=a.length>=f?a.slice(c,c+f):a,d=[],p=0;p<l.length;++p){var h=l.charCodeAt(p);45===h||46===h||95===h||126===h||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||r===i.RFC1738&&(40===h||41===h)?d[d.length]=l.charAt(p):h<128?d[d.length]=u[h]:h<2048?d[d.length]=u[192|h>>6]+u[128|63&h]:h<55296||h>=57344?d[d.length]=u[224|h>>12]+u[128|h>>6&63]+u[128|63&h]:(p+=1,h=65536+((1023&h)<<10|1023&l.charCodeAt(p)),d[d.length]=u[240|h>>18]+u[128|h>>12&63]+u[128|h>>6&63]+u[128|63&h])}s+=d.join("")}return s},isBuffer:function(t){return!(!t||"object"!==_typeof(t))&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isOverflow:l,isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},markOverflow:c,maybeMap:function(t,e){if(a(t)){for(var n=[],i=0;i<t.length;i+=1)n[n.length]=e(t[i]);return n}return e(t)},merge:function t(e,n,i){if(!n)return e;if("object"!==_typeof(n)&&"function"!=typeof n){if(a(e)){var o=e.length;if(i&&"number"==typeof i.arrayLimit&&o>i.arrayLimit)return c(h(e.concat(n),i),o);e[o]=n}else{if(!e||"object"!==_typeof(e))return[e,n];if(l(e)){var s=d(e)+1;e[s]=n,p(e,s)}else{if(i&&i.strictMerge)return[e,n];(i&&(i.plainObjects||i.allowPrototypes)||!r.call(Object.prototype,n))&&(e[n]=!0)}}return e}if(!e||"object"!==_typeof(e)){if(l(n)){for(var u=Object.keys(n),f=i&&i.plainObjects?{__proto__:null,0:e}:{0:e},v=0;v<u.length;v++){f[parseInt(u[v],10)+1]=n[u[v]]}return c(f,d(n)+1)}var g=[e].concat(n);return i&&"number"==typeof i.arrayLimit&&g.length>i.arrayLimit?c(h(g,i),g.length-1):g}var m=e;return a(e)&&!a(n)&&(m=h(e,i)),a(e)&&a(n)?(n.forEach(function(n,o){if(r.call(e,o)){var a=e[o];a&&"object"===_typeof(a)&&n&&"object"===_typeof(n)?e[o]=t(a,n,i):e[e.length]=n}else e[o]=n}),e):Object.keys(n).reduce(function(e,o){var a=n[o];if(r.call(e,o)?e[o]=t(e[o],a,i):e[o]=a,l(n)&&!l(e)&&c(e,d(n)),l(e)){var s=parseInt(o,10);String(s)===o&&s>=0&&s>d(e)&&p(e,s)}return e},m)}}},{"./formats":91,"side-channel":99}],96:[function(t,e,n){var i=t("object-inspect"),o=t("es-errors/type"),r=function(t,e,n){for(var i,o=t;null!=(i=o.next);o=i)if(i.key===e)return o.next=i.next,n||(i.next=t.next,t.next=i),i};e.exports=function(){var t,e={assert:function(t){if(!e.has(t))throw new o("Side channel does not contain "+i(t))},delete:function(e){var n=t&&t.next,i=function(t,e){if(t)return r(t,e,!0)}(t,e);return i&&n&&n===i&&(t=void 0),!!i},get:function(e){return function(t,e){if(t){var n=r(t,e);return n&&n.value}}(t,e)},has:function(e){return function(t,e){return!!t&&!!r(t,e)}(t,e)},set:function(e,n){t||(t={next:void 0}),function(t,e,n){var i=r(t,e);i?i.value=n:t.next={key:e,next:t.next,value:n}}(t,e,n)}};return e}},{"es-errors/type":16,"object-inspect":41}],97:[function(t,e,n){var i=t("get-intrinsic"),o=t("call-bound"),r=t("object-inspect"),a=t("es-errors/type"),s=i("%Map%",!0),c=o("Map.prototype.get",!0),l=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),p=o("Map.prototype.delete",!0),u=o("Map.prototype.size",!0);e.exports=!!s&&function(){var t,e={assert:function(t){if(!e.has(t))throw new a("Side channel does not contain "+r(t))},delete:function(e){if(t){var n=p(t,e);return 0===u(t)&&(t=void 0),n}return!1},get:function(e){if(t)return c(t,e)},has:function(e){return!!t&&d(t,e)},set:function(e,n){t||(t=new s),l(t,e,n)}};return e}},{"call-bound":8,"es-errors/type":16,"get-intrinsic":23,"object-inspect":41}],98:[function(t,e,n){var i=t("get-intrinsic"),o=t("call-bound"),r=t("object-inspect"),a=t("side-channel-map"),s=t("es-errors/type"),c=i("%WeakMap%",!0),l=o("WeakMap.prototype.get",!0),d=o("WeakMap.prototype.set",!0),p=o("WeakMap.prototype.has",!0),u=o("WeakMap.prototype.delete",!0);e.exports=c?function(){var t,e,n={assert:function(t){if(!n.has(t))throw new s("Side channel does not contain "+r(t))},delete:function(n){if(c&&n&&("object"===_typeof(n)||"function"==typeof n)){if(t)return u(t,n)}else if(a&&e)return e.delete(n);return!1},get:function(n){return c&&n&&("object"===_typeof(n)||"function"==typeof n)&&t?l(t,n):e&&e.get(n)},has:function(n){return c&&n&&("object"===_typeof(n)||"function"==typeof n)&&t?p(t,n):!!e&&e.has(n)},set:function(n,i){c&&n&&("object"===_typeof(n)||"function"==typeof n)?(t||(t=new c),d(t,n,i)):a&&(e||(e=a()),e.set(n,i))}};return n}:a},{"call-bound":8,"es-errors/type":16,"get-intrinsic":23,"object-inspect":41,"side-channel-map":97}],99:[function(t,e,n){var i=t("es-errors/type"),o=t("object-inspect"),r=t("side-channel-list"),a=t("side-channel-map"),s=t("side-channel-weakmap")||a||r;e.exports=function(){var t,e={assert:function(t){if(!e.has(t))throw new i("Side channel does not contain "+o(t))},delete:function(e){return!!t&&t.delete(e)},get:function(e){return t&&t.get(e)},has:function(e){return!!t&&t.has(e)},set:function(e,n){t||(t=s()),t.set(e,n)}};return e}},{"es-errors/type":16,"object-inspect":41,"side-channel-list":96,"side-channel-map":97,"side-channel-weakmap":98}],100:[function(t,e,n){var i=t("punycode/");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var r=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),d=["%","/","?",";","#"].concat(l),p=["/","?","#"],u=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=t("qs");function y(t,e,n){if(t&&"object"===_typeof(t)&&t instanceof o)return t;var i=new o;return i.parse(t,e,n),i}o.prototype.parse=function(t,e,n){if("string"!=typeof t)throw new TypeError("Parameter 'url' must be a string, not "+_typeof(t));var o=t.indexOf("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",c=t.split(a);c[0]=c[0].replace(/\\/g,"/");var y=t=c.join(a);if(y=y.trim(),!n&&1===t.split("#").length){var b=s.exec(y);if(b)return this.path=y,this.href=y,this.pathname=b[1],b[2]?(this.search=b[2],this.query=e?m.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var w=r.exec(y);if(w){var C=(w=w[0]).toLowerCase();this.protocol=C,y=y.substr(w.length)}if(n||w||y.match(/^\/\/[^@/]+@[^@/]+/)){var x="//"===y.substr(0,2);!x||w&&v[w]||(y=y.substr(2),this.slashes=!0)}if(!v[w]&&(x||w&&!g[w])){for(var A,D,k=-1,E=0;E<p.length;E++){-1!==(S=y.indexOf(p[E]))&&(-1===k||S<k)&&(k=S)}-1!==(D=-1===k?y.lastIndexOf("@"):y.lastIndexOf("@",k))&&(A=y.slice(0,D),y=y.slice(D+1),this.auth=decodeURIComponent(A)),k=-1;for(E=0;E<d.length;E++){var S;-1!==(S=y.indexOf(d[E]))&&(-1===k||S<k)&&(k=S)}-1===k&&(k=y.length),this.host=y.slice(0,k),y=y.slice(k),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var T=this.hostname.split(/\./),I=(E=0,T.length);E<I;E++){var _=T[E];if(_&&!_.match(u)){for(var F="",L=0,M=_.length;L<M;L++)_.charCodeAt(L)>127?F+="x":F+=_[L];if(!F.match(u)){var R=T.slice(0,E),B=T.slice(E+1),H=_.match(h);H&&(R.push(H[1]),B.unshift(H[2])),B.length&&(y="/"+B.join(".")+y),this.hostname=R.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=i.toASCII(this.hostname));var V=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+V,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!f[C])for(E=0,I=l.length;E<I;E++){var O=l[E];if(-1!==y.indexOf(O)){var N=encodeURIComponent(O);N===O&&(N=escape(O)),y=y.split(O).join(N)}}var U=y.indexOf("#");-1!==U&&(this.hash=y.substr(U),y=y.slice(0,U));var z=y.indexOf("?");if(-1!==z?(this.search=y.substr(z),this.query=y.substr(z+1),e&&(this.query=m.parse(this.query)),y=y.slice(0,z)):e&&(this.search="",this.query={}),y&&(this.pathname=y),g[C]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){V=this.pathname||"";var W=this.search||"";this.path=V+W}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",i=this.hash||"",o=!1,r="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&"object"===_typeof(this.query)&&Object.keys(this.query).length&&(r=m.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var a=this.search||r&&"?"+r||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||g[e])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),a&&"?"!==a.charAt(0)&&(a="?"+a),e+o+(n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(a=a.replace("#","%23"))+i},o.prototype.resolve=function(t){return this.resolveObject(y(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if("string"==typeof t){var e=new o;e.parse(t,!1,!0),t=e}for(var n=new o,i=Object.keys(this),r=0;r<i.length;r++){var a=i[r];n[a]=this[a]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),c=0;c<s.length;c++){var l=s[c];"protocol"!==l&&(n[l]=t[l])}return g[n.protocol]&&n.hostname&&!n.pathname&&(n.pathname="/",n.path=n.pathname),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!g[t.protocol]){for(var d=Object.keys(t),p=0;p<d.length;p++){var u=d[p];n[u]=t[u]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||v[t.protocol])n.pathname=t.pathname;else{for(var h=(t.pathname||"").split("/");h.length&&!(t.host=h.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var f=n.pathname||"",m=n.search||"";n.path=f+m}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),b=t.host||t.pathname&&"/"===t.pathname.charAt(0),w=b||y||n.host&&t.pathname,C=w,x=n.pathname&&n.pathname.split("/")||[],A=(h=t.pathname&&t.pathname.split("/")||[],n.protocol&&!g[n.protocol]);if(A&&(n.hostname="",n.port=null,n.host&&(""===x[0]?x[0]=n.host:x.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===h[0]?h[0]=t.host:h.unshift(t.host)),t.host=null),w=w&&(""===h[0]||""===x[0])),b)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,x=h;else if(h.length)x||(x=[]),x.pop(),x=x.concat(h),n.search=t.search,n.query=t.query;else if(null!=t.search){if(A)n.host=x.shift(),n.hostname=n.host,(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.hostname=P.shift(),n.host=n.hostname);return n.search=t.search,n.query=t.query,null===n.pathname&&null===n.search||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var D=x.slice(-1)[0],k=(n.host||t.host||x.length>1)&&("."===D||".."===D)||""===D,E=0,S=x.length;S>=0;S--)"."===(D=x[S])?x.splice(S,1):".."===D?(x.splice(S,1),E++):E&&(x.splice(S,1),E--);if(!w&&!C)for(;E--;E)x.unshift("..");!w||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),k&&"/"!==x.join("/").substr(-1)&&x.push("");var P,T=""===x[0]||x[0]&&"/"===x[0].charAt(0);A&&(n.hostname=T?"":x.length?x.shift():"",n.host=n.hostname,(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.hostname=P.shift(),n.host=n.hostname));return(w=w||n.host&&x.length)&&!T&&x.unshift(""),x.length>0?n.pathname=x.join("/"):(n.pathname=null,n.path=null),null===n.pathname&&null===n.search||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},n.parse=y,n.resolve=function(t,e){return y(t,!1,!0).resolve(e)},n.resolveObject=function(t,e){return t?y(t,!1,!0).resolveObject(e):e},n.format=function(t){return"string"==typeof t&&(t=y(t)),t instanceof o?t.format():o.prototype.format.call(t)},n.Url=o},{"punycode/":90,qs:92}],101:[function(t,e,n){e.exports={Name:"Retold Content Editor",Hash:"ContentEditor",MainViewportViewIdentifier:"ContentEditor-Layout",AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!1,AutoRenderViewsAfterInitialize:!1,pict_configuration:{Product:"ContentEditor-Pict-Application"}}},{}],102:[function(t,e,n){var i=t("pict-application"),o=t("pict-section-filebrowser"),r=t("./providers/Pict-Provider-ContentEditor.js"),a=t("./views/PictView-Editor-Layout.js"),s=t("./views/PictView-Editor-TopBar.js"),c=t("./views/PictView-Editor-MarkdownEditor.js"),l=t("./views/PictView-Editor-CodeEditor.js"),d=t("./views/PictView-Editor-SettingsPanel.js"),p=t("./views/PictView-Editor-MarkdownReference.js"),u=t("./views/PictView-Editor-Topics.js"),h=function(t){function e(t,n,i){var h;_classCallCheck(this,e),(h=_callSuper(this,e,[t,n,i])).pict.addProvider("ContentEditor-Provider",r.default_configuration,r),h.pict.addView("ContentEditor-Layout",a.default_configuration,a),h.pict.addView("ContentEditor-TopBar",s.default_configuration,s),h.pict.addView("ContentEditor-MarkdownEditor",c.default_configuration,c),h.pict.addView("ContentEditor-CodeEditor",l.default_configuration,l),h.pict.addView("ContentEditor-SettingsPanel",d.default_configuration,d),h.pict.addView("ContentEditor-MarkdownReference",p.default_configuration,p),h.pict.addView("ContentEditor-Topics",u.default_configuration,u);var f=JSON.parse(JSON.stringify(o.default_configuration));f.DefaultDestinationAddress="#ContentEditor-Sidebar-Container",f.DefaultState.Layout="list-only",h.pict.addView("Pict-FileBrowser",f,o);for(var v=JSON.parse(JSON.stringify(o.PictViewListDetail.default_configuration)),g=0;g<v.Templates.length;g++)"FileBrowser-ListDetail-Container-Template"===v.Templates[g].Hash&&(v.Templates[g].Template='\n<div class="pict-fb-detail" id="Pict-FileBrowser-DetailList">\n\t<div class="pict-fb-breadcrumb-bar">\n\t\t<div class="pict-fb-breadcrumb" id="Pict-FileBrowser-Breadcrumb"></div>\n\t\t<button class="pict-fb-breadcrumb-addfolder" onclick="pict.PictApplication.promptNewFolder()" title="New folder">+</button>\n\t</div>\n\t<div class="pict-fb-detail-header">\n\t\t<div class="pict-fb-detail-header-cell pict-fb-detail-col-name" onclick="pict.views[\'{~D:Record.ViewHash~}\'].sortBy(\'Name\')">Name</div>\n\t\t<div class="pict-fb-detail-header-cell pict-fb-detail-col-size" onclick="pict.views[\'{~D:Record.ViewHash~}\'].sortBy(\'Size\')">Size</div>\n\t\t<div class="pict-fb-detail-header-cell pict-fb-detail-col-modified" onclick="pict.views[\'{~D:Record.ViewHash~}\'].sortBy(\'Modified\')">Modified</div>\n\t</div>\n\t<div id="Pict-FileBrowser-DetailRows"></div>\n</div>\n'),"FileBrowser-ListDetail-Row-Template"===v.Templates[g].Hash&&(v.Templates[g].Template='\n<div class="pict-fb-detail-row{~D:Record.SelectedClass~}" data-index="{~D:Record.Index~}" data-name="{~D:Record.Name~}" onclick="{~D:Record.ClickHandler~}" ondblclick="{~D:Record.DblClickHandler~}">\n\t<span class="pict-fb-detail-icon">{~D:Record.Icon~}</span>\n\t<span class="pict-fb-detail-name">{~D:Record.Name~}</span>\n\t<span class="pict-fb-detail-size">{~D:Record.SizeFormatted~}</span>\n\t<span class="pict-fb-detail-modified">{~D:Record.ModifiedFormatted~}</span>\n\t<button class="pict-fb-insert-btn" onclick="event.stopPropagation(); pict.PictApplication.insertFileReference(this.parentElement.getAttribute(\'data-name\'))" title="Insert into editor">+</button>\n</div>\n');return h.pict.addView("Pict-FileBrowser-ListDetail",v,o.PictViewListDetail),h}return _inherits(e,t),_createClass(e,[{key:"onAfterInitializeAsync",value:function(t){"undefined"!=typeof window&&(window.pict=this.pict),this.pict.AppData.ContentEditor={CurrentFile:"",ActiveEditor:"markdown",IsDirty:!1,IsSaving:!1,IsLoading:!1,Files:[],Document:{Segments:[{Content:""}]},CodeContent:"",SaveStatus:"",SaveStatusClass:"",AutoSegmentMarkdown:!1,AutoSegmentDepth:1,ContentPreviewMode:"off",MarkdownEditingControls:!0,MarkdownWordWrap:!0,CodeWordWrap:!1,SidebarCollapsed:!1,SidebarWidth:250,AutoPreviewImages:!0,AutoPreviewVideo:!1,AutoPreviewAudio:!1,ShowHiddenFiles:!1,TopicsFilePath:".pict_documentation_topics.json"},this._loadSettings(),this.pict.views["ContentEditor-Layout"].render();var n=this,i=this.pict.providers["Pict-FileBrowser-List"];if(i){var o=i.selectFile.bind(i);i.selectFile=function(t){o(t),t&&"file"===t.Type&&n.navigateToFile(t.Path)}}var r=this.pict.providers["Pict-FileBrowser-Browse"];if(r){var a=r.navigateToFolder.bind(r);r.navigateToFolder=function(t){a(t),n.loadFileList(t)}}this.syncHiddenFilesSetting(function(){n.loadFileList(null,function(){n.resolveHash()})});var s=this.pict.AppData.ContentEditor.TopicsFilePath;if(s){var c=this.pict.views["ContentEditor-Topics"];c&&c.loadTopicsFile(s,function(){})}return _superPropGet(e,"onAfterInitializeAsync",this,3)([t])}},{key:"syncHiddenFilesSetting",value:function(t){var e="function"==typeof t?t:function(){},n=this.pict.AppData.ContentEditor.ShowHiddenFiles;fetch("/api/filebrowser/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({IncludeHiddenFiles:!!n})}).then(function(){return e()}).catch(function(){return e()})}},{key:"loadFileList",value:function(t,e){var n="function"==typeof e?e:"function"==typeof t?t:function(){},i=this,o="string"==typeof t?t:null;null===o&&this.pict.AppData.PictFileBrowser&&this.pict.AppData.PictFileBrowser.CurrentLocation&&(o=this.pict.AppData.PictFileBrowser.CurrentLocation);var r="/api/filebrowser/list";o&&o.length>0&&(r+="?path="+encodeURIComponent(o)),fetch(r).then(function(t){return t.json()}).then(function(t){i.pict.AppData.PictFileBrowser=i.pict.AppData.PictFileBrowser||{},i.pict.AppData.PictFileBrowser.FileList=t||[];var e=i.pict.views["Pict-FileBrowser"];e&&e.render();var o=i.pict.views["Pict-FileBrowser-ListDetail"];return o&&o.render(),n()}).catch(function(t){return i.log.error("Failed to load file list: ".concat(t.message)),n()})}},{key:"resolveHash",value:function(){var t=(window.location.hash||"").replace(/^#\/?/,"");if(t){var e=t.split("/");if("edit"===e[0]&&e.length>=2){var n=e.slice(1).join("/");if(this.pict.AppData.ContentEditor.CurrentFile===n)return;this.navigateToFile(n)}}}},{key:"getEditorTypeForFile",value:function(t){if(!t)return"markdown";var e=t.replace(/^.*\./,"").toLowerCase();if("md"===e||"markdown"===e)return"markdown";return{png:!0,jpg:!0,jpeg:!0,gif:!0,bmp:!0,webp:!0,ico:!0,svg:!0,tiff:!0,tif:!0,avif:!0,heic:!0,heif:!0,mp3:!0,wav:!0,ogg:!0,flac:!0,aac:!0,m4a:!0,wma:!0,mp4:!0,avi:!0,mkv:!0,mov:!0,wmv:!0,webm:!0,flv:!0,m4v:!0,pdf:!0,doc:!0,docx:!0,xls:!0,xlsx:!0,ppt:!0,pptx:!0,odt:!0,ods:!0,odp:!0,zip:!0,tar:!0,gz:!0,bz2:!0,xz:!0,"7z":!0,rar:!0,ttf:!0,otf:!0,woff:!0,woff2:!0,eot:!0,exe:!0,dll:!0,so:!0,dylib:!0,o:!0,class:!0,pyc:!0,wasm:!0}[e]?"binary":"code"}},{key:"_cleanupEditors",value:function(){var t=this.pict.views["ContentEditor-CodeEditor"];t&&(t.codeJar&&t.destroy(),t.initialRenderComplete=!1);var e=this.pict.ContentAssignment.getElement("#ContentEditor-Editor-Container");e&&e[0]&&(e[0].innerHTML="")}},{key:"_formatFileSize",value:function(t){if(0===t)return"0 B";var e=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(t)/Math.log(1024));return n>=e.length&&(n=e.length-1),(t/Math.pow(1024,n)).toFixed(0===n?0:1)+" "+e[n]}},{key:"_getMediaType",value:function(t){return{png:!0,jpg:!0,jpeg:!0,gif:!0,webp:!0,svg:!0,bmp:!0,ico:!0,avif:!0}[t]?"image":{mp4:!0,webm:!0,mov:!0,mkv:!0,avi:!0,wmv:!0,flv:!0,m4v:!0,ogv:!0}[t]?"video":{mp3:!0,wav:!0,ogg:!0,flac:!0,aac:!0,m4a:!0,wma:!0,oga:!0}[t]?"audio":"other"}},{key:"_buildMediaPreviewHTML",value:function(t,e,n){return"image"===t?'<div class="binary-preview-image-wrap"><div class="binary-preview-image"><img src="'+e+'" alt="'+n+'"></div></div>':"video"===t?'<div class="binary-preview-media-wrap"><video class="binary-preview-video" controls preload="metadata"><source src="'+e+'">Your browser does not support the video tag.</video></div>':"audio"===t?'<div class="binary-preview-media-wrap"><audio class="binary-preview-audio" controls preload="metadata"><source src="'+e+'">Your browser does not support the audio tag.</audio></div>':""}},{key:"loadMediaPreview",value:function(t,e,n){var i=document.getElementById("ContentEditor-MediaPreviewPlaceholder");i&&(i.innerHTML=this._buildMediaPreviewHTML(t,e,n))}},{key:"_showBinaryPreview",value:function(t){var e=this,n=t.replace(/^.*\//,""),i=t.replace(/^.*\./,"").toLowerCase(),o="/content/"+encodeURIComponent(t),r=this._getMediaType(i),a=this.pict.AppData.ContentEditor,s=!1;"image"===r&&(s=a.AutoPreviewImages),"video"===r&&(s=a.AutoPreviewVideo),"audio"===r&&(s=a.AutoPreviewAudio),fetch("/api/filebrowser/info?path="+encodeURIComponent(t)).then(function(t){return t.json()}).then(function(t){var a=t&&"number"==typeof t.Size?e._formatFileSize(t.Size):"Unknown",c=t&&t.Modified?new Date(t.Modified).toLocaleString():"Unknown",l=e.pict.ContentAssignment.getElement("#ContentEditor-Editor-Container");if(l&&l[0]){var d="";"other"!==r&&(s?d+=e._buildMediaPreviewHTML(r,o,n):(d+='<div id="ContentEditor-MediaPreviewPlaceholder">',d+='<button class="binary-preview-btn binary-preview-btn-preview"',d+=' onclick="pict.PictApplication.loadMediaPreview(',d+="'"+r+"','"+o+"','"+n.replace(/'/g,"\\'")+"'",d+=')">Preview '+r.charAt(0).toUpperCase()+r.slice(1)+"</button>",d+="</div>")),d+='<div class="binary-preview-card">',d+='<div class="binary-preview-icon">'+i.toUpperCase()+"</div>",d+='<div class="binary-preview-info">',d+='<div class="binary-preview-name">'+n+"</div>",d+='<div class="binary-preview-meta">Size: '+a+"</div>",d+='<div class="binary-preview-meta">Modified: '+c+"</div>",d+='<div class="binary-preview-meta">Type: .'+i+"</div>",d+="</div>",d+='<div class="binary-preview-actions">',d+='<a class="binary-preview-btn" href="'+o+'" download="'+n+'">Download</a>',d+='<a class="binary-preview-btn binary-preview-btn-secondary" href="'+o+'" target="_blank">Open in New Tab</a>',d+="</div>",d+="</div>",l[0].innerHTML=d}}).catch(function(){var t=e.pict.ContentAssignment.getElement("#ContentEditor-Editor-Container");t&&t[0]&&(t[0].innerHTML='<div class="binary-preview-card"><div class="binary-preview-icon">'+i.toUpperCase()+'</div><div class="binary-preview-info"><div class="binary-preview-name">'+n+'</div><div class="binary-preview-meta">Binary file — cannot be edited in the browser</div></div><div class="binary-preview-actions"><a class="binary-preview-btn" href="'+o+'" download="'+n+'">Download</a><a class="binary-preview-btn binary-preview-btn-secondary" href="'+o+'" target="_blank">Open in New Tab</a></div></div>')})}},{key:"segmentMarkdownContent",value:function(t){var e=this.pict.AppData.ContentEditor;if(!e.AutoSegmentMarkdown||!t)return[{Content:t||""}];var n=parseInt(e.AutoSegmentDepth,10)||1;if(1===n){for(var i=t.split("\n"),o=[],r=[],a=!1,s=0;s<i.length;s++){var c=i[s];/^(`{3,}|~{3,})/.test(c.trim())?(a=!a,r.push(c)):a||""!==c.trim()?r.push(c):r.length>0&&(o.push({Content:r.join("\n")}),r=[])}return r.length>0&&o.push({Content:r.join("\n")}),o.length>0?o:[{Content:""}]}for(var l=new RegExp("^(#{1,"+n+"})\\s"),d=t.split("\n"),p=[],u=[],h=0;h<d.length;h++){var f=d[h];l.test(f.trim())&&u.length>0&&(p.push({Content:u.join("\n")}),u=[]),u.push(f)}return u.length>0&&p.push({Content:u.join("\n")}),p.length>0?p:[{Content:""}]}},{key:"navigateToFile",value:function(t){if(t){var e=this,n=this.getEditorTypeForFile(t);if(this.pict.AppData.ContentEditor.SaveStatus="",this.pict.AppData.ContentEditor.SaveStatusClass="",window.location.hash="#/edit/"+t,this.pict.AppData.ContentEditor.CurrentFile=t,this.pict.AppData.ContentEditor.IsDirty=!1,this.pict.AppData.ContentEditor.ActiveEditor=n,this._cleanupEditors(),this.pict.views["ContentEditor-TopBar"].render(),"binary"===n)return this._showBinaryPreview(t),void this.updateStats();var i=this.pict.providers["ContentEditor-Provider"];this.pict.AppData.ContentEditor.IsLoading=!0,i.loadFile(t,function(i,o){if(e.pict.AppData.ContentEditor.IsLoading=!1,i)return e.pict.AppData.ContentEditor.SaveStatus="Error loading file: "+i,e.pict.AppData.ContentEditor.SaveStatusClass="content-editor-status-error",void e.pict.views["ContentEditor-TopBar"].render();if("markdown"===n){e.pict.AppData.ContentEditor.Document.Segments=e.segmentMarkdownContent(o);var r=e.pict.views["ContentEditor-MarkdownEditor"];if(r){var a="/content/",s=t.lastIndexOf("/");s>0&&(a="/content/"+t.substring(0,s)+"/"),r.options.ImageBaseURL=a,r.render(),r.marshalToView(),r.setPreviewMode(e.pict.AppData.ContentEditor.ContentPreviewMode||"off"),r.toggleControls(e.pict.AppData.ContentEditor.MarkdownEditingControls)}e.updateStats()}else{e.pict.AppData.ContentEditor.CodeContent=o;var c=t.replace(/^.*\./,"").toLowerCase(),d=l.getLanguageForExtension?l.getLanguageForExtension(c):l.ExtensionLanguageMap[c]||"plaintext",p=e.pict.views["ContentEditor-CodeEditor"];p&&(p.initialRenderComplete=!1,p._language=d,p._suppressNextDirty=!0,p.render(),p.marshalToView(),e.pict.AppData.ContentEditor.CodeWordWrap&&p._editorElement&&(p._editorElement.style.whiteSpace="pre-wrap",p._editorElement.style.overflowWrap="break-word")),e.updateStats()}})}}},{key:"saveCurrentFile",value:function(){var t=this.pict.AppData.ContentEditor.CurrentFile;if(t){var e=this.pict.providers["ContentEditor-Provider"],n=this,i="";if("code"===this.pict.AppData.ContentEditor.ActiveEditor){var o=this.pict.views["ContentEditor-CodeEditor"];o&&o.marshalFromView(),i=this.pict.AppData.ContentEditor.CodeContent||""}else{var r=this.pict.views["ContentEditor-MarkdownEditor"];r&&r.marshalFromView();var a=this.pict.AppData.ContentEditor.Document.Segments;if(a&&a.length>0){for(var s=[],c=0;c<a.length;c++)s.push(a[c].Content||"");i=s.join("\n\n")}}this.pict.AppData.ContentEditor.IsSaving=!0,this.pict.AppData.ContentEditor.SaveStatus="Saving...",this.pict.AppData.ContentEditor.SaveStatusClass="content-editor-status-saving",this.pict.views["ContentEditor-TopBar"].render(),e.saveFile(t,i,function(t){n.pict.AppData.ContentEditor.IsSaving=!1,t?(n.pict.AppData.ContentEditor.SaveStatus="Error: "+t,n.pict.AppData.ContentEditor.SaveStatusClass="content-editor-status-error"):(n.pict.AppData.ContentEditor.IsDirty=!1,n.pict.AppData.ContentEditor.SaveStatus="Saved",n.pict.AppData.ContentEditor.SaveStatusClass="content-editor-status-saved",n.loadFileList(),setTimeout(function(){"Saved"===n.pict.AppData.ContentEditor.SaveStatus&&(n.pict.AppData.ContentEditor.SaveStatus="",n.pict.AppData.ContentEditor.SaveStatusClass="",n.pict.views["ContentEditor-TopBar"].render())},3e3)),n.pict.views["ContentEditor-TopBar"].render()})}}},{key:"closeCurrentFile",value:function(){this.pict.AppData.ContentEditor.CurrentFile&&(this.pict.AppData.ContentEditor.IsDirty?this._showCloseConfirmation():this._doCloseFile())}},{key:"_doCloseFile",value:function(){this._hideCloseConfirmation(),this._cleanupEditors(),this.pict.AppData.ContentEditor.CurrentFile="",this.pict.AppData.ContentEditor.ActiveEditor="markdown",this.pict.AppData.ContentEditor.IsDirty=!1,this.pict.AppData.ContentEditor.SaveStatus="",this.pict.AppData.ContentEditor.SaveStatusClass="",this.pict.AppData.ContentEditor.Document.Segments=[{Content:""}],this.pict.AppData.ContentEditor.CodeContent="",window.location.hash="",this.pict.views["ContentEditor-TopBar"].render();var t=this.pict.ContentAssignment.getElement("#ContentEditor-Editor-Container");t&&t[0]&&(t[0].innerHTML='<div style="display:flex;align-items:center;justify-content:center;height:100%;color:#8A7F72;font-size:1.1em;">Select a file from the sidebar to begin editing</div>'),this.updateStats()}},{key:"confirmCloseFile",value:function(){this._doCloseFile()}},{key:"cancelCloseFile",value:function(){this._hideCloseConfirmation()}},{key:"_showCloseConfirmation",value:function(){var t=document.getElementById("ContentEditor-ConfirmOverlay");if(t&&t.classList.add("open"),!this._confirmKeyHandler){var e=this;this._confirmKeyHandler=function(t){var n=t.key.toLowerCase();"y"===n?(t.preventDefault(),e.confirmCloseFile()):"n"!==n&&"Escape"!==t.key||(t.preventDefault(),e.cancelCloseFile())}}window.addEventListener("keydown",this._confirmKeyHandler)}},{key:"_hideCloseConfirmation",value:function(){var t=document.getElementById("ContentEditor-ConfirmOverlay");t&&t.classList.remove("open"),this._confirmKeyHandler&&window.removeEventListener("keydown",this._confirmKeyHandler)}},{key:"createNewFile",value:function(t){if(t){t.replace(/^.*\//,"").indexOf(".")<0&&(t+=".md");var e=this.pict.providers["ContentEditor-Provider"],n=this,i="";i=t.endsWith(".md")?"# "+t.replace(/\.[^.]+$/,"").replace(/^.*\//,"")+"\n\n":"// "+t.replace(/^.*\//,"")+"\n",e.saveFile(t,i,function(e){e||n.loadFileList(null,function(){n.navigateToFile(t)})})}}},{key:"promptNewFile",value:function(){var t=prompt("Enter a name for the new file (e.g. my-page.md, script.js, style.css):");t&&t.trim()&&this.createNewFile(t.trim())}},{key:"promptNewFolder",value:function(){var t=prompt("Enter a name for the new folder:");if(t&&t.trim()){t=t.trim();var e="";this.pict.AppData.PictFileBrowser&&this.pict.AppData.PictFileBrowser.CurrentLocation&&(e=this.pict.AppData.PictFileBrowser.CurrentLocation);var n=e?e+"/"+t:t,i=this;fetch("/api/content/mkdir",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({Path:n})}).then(function(t){return t.json()}).then(function(t){t&&t.Success?(i.log.info("Folder created: ".concat(n)),i.loadFileList()):alert("Could not create folder: "+(t?t.Error:"Unknown error"))}).catch(function(t){alert("Error creating folder: "+t.message)})}}},{key:"insertFileReference",value:function(t){if(t){var e=this.pict.views["ContentEditor-MarkdownEditor"];if(e&&"markdown"===this.pict.AppData.ContentEditor.ActiveEditor){var n=e._activeSegmentIndex;if(n<0){var i=e._getOrderedSegmentIndices();i.length>0&&(n=i[0])}if(!(n<0)){var o=t.replace(/\.[^.]+$/,"");o=(o=o.replace(/^\d{10,}-/,"")).replace(/[-_]+/g," ").trim()||"image";var r=t.substring(t.lastIndexOf(".")).toLowerCase();if([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".avif",".apng",".ico",".tiff",".tif",".jfif"].indexOf(r)>=0)e._insertImageMarkdown(n,t,o);else{var a=e._segmentEditors[n];if(a){var s="["+o+"]("+t+")",c=a.state.selection.main.head;a.dispatch({changes:{from:c,insert:s},selection:{anchor:c+s.length}}),a.focus()}}}}}}},{key:"handleF4TopicAction",value:function(){var t=this.pict.views["ContentEditor-Layout"],e=this.pict.views["ContentEditor-Topics"];if(t&&e){var n=this.pict.AppData.ContentEditor,i=n.ActiveEditor,o=n.CurrentFile,r=0,a=!1;if("markdown"===i&&o){var s=this.pict.views["ContentEditor-MarkdownEditor"];if(s&&s._segmentEditors){var c=0;for(var l in s._segmentEditors){var d=s._segmentEditors[l];if(d&&d.hasFocus){var p=d.state.selection.main.head;r=c+d.state.doc.lineAt(p).number,a=!0;break}d&&d.state&&(c+=d.state.doc.lines)}}}if(n.SidebarCollapsed&&t.toggleSidebar(),t.switchSidebarTab("topics"),a&&o){var u={TopicCode:"New-Topic",TopicHelpFilePath:o,TopicTitle:this._extractFirstHeading()||"New Topic"};r>0&&(u.RelevantMarkdownLine=r),e.addTopic(u)}}}},{key:"_extractFirstHeading",value:function(){var t=this.pict.views["ContentEditor-MarkdownEditor"];if(!t||!t._segmentEditors)return"";var e=7,n="";for(var i in t._segmentEditors){var o=t._segmentEditors[i];if(o&&o.state&&o.state.doc)for(var r=o.state.doc,a=1;a<=r.lines;a++){var s=r.line(a).text.match(/^(#{1,6})\s+(.+)/);if(s){var c=s[1].length;if(c<e&&(e=c,n=s[2].trim(),1===e))return n}}}return n}},{key:"updateStats",value:function(){var t=document.getElementById("ContentEditor-Stats");if(t){var e=this.pict.AppData.ContentEditor.ActiveEditor,n=0,i=0,o=0;if("markdown"===e){var r=this.pict.views["ContentEditor-MarkdownEditor"];if(r&&r._segmentEditors)for(var a in r._segmentEditors){var s=r._segmentEditors[a];if(s&&s.state&&s.state.doc){n+=s.state.doc.lines,i+=s.state.doc.length;var c=s.state.doc.toString().match(/\S+/g);c&&(o+=c.length)}}}else{if("code"!==e)return void(t.textContent="");var l=this.pict.views["ContentEditor-CodeEditor"];if(l&&l.codeJar){var d=l.codeJar.toString();i=d.length,n=d.split("\n").length;var p=d.match(/\S+/g);p&&(o=p.length)}}t.textContent=n+" lines · "+o+" words · "+i+" chars"}}},{key:"markDirty",value:function(){this.pict.AppData.ContentEditor.IsDirty||(this.pict.AppData.ContentEditor.IsDirty=!0,this.pict.views["ContentEditor-TopBar"].render())}},{key:"_settingsKey",get:function(){return"retold-content-editor-settings"}},{key:"saveSettings",value:function(){if("undefined"!=typeof window&&window.localStorage){var t=this.pict.AppData.ContentEditor,e={AutoSegmentMarkdown:t.AutoSegmentMarkdown,AutoSegmentDepth:t.AutoSegmentDepth,ContentPreviewMode:t.ContentPreviewMode,MarkdownEditingControls:t.MarkdownEditingControls,MarkdownWordWrap:t.MarkdownWordWrap,CodeWordWrap:t.CodeWordWrap,SidebarCollapsed:t.SidebarCollapsed,SidebarWidth:t.SidebarWidth,AutoPreviewImages:t.AutoPreviewImages,AutoPreviewVideo:t.AutoPreviewVideo,AutoPreviewAudio:t.AutoPreviewAudio,ShowHiddenFiles:t.ShowHiddenFiles,TopicsFilePath:t.TopicsFilePath};try{window.localStorage.setItem(this._settingsKey,JSON.stringify(e))}catch(t){this.log.warn("Failed to save settings: "+t.message)}}}},{key:"_loadSettings",value:function(){if("undefined"!=typeof window&&window.localStorage)try{var t=window.localStorage.getItem(this._settingsKey);if(!t)return;var e=JSON.parse(t),n=this.pict.AppData.ContentEditor;"boolean"==typeof e.AutoSegmentMarkdown&&(n.AutoSegmentMarkdown=e.AutoSegmentMarkdown),"number"==typeof e.AutoSegmentDepth&&(n.AutoSegmentDepth=e.AutoSegmentDepth),"string"==typeof e.ContentPreviewMode?n.ContentPreviewMode=e.ContentPreviewMode:"boolean"==typeof e.AutoContentPreview&&(n.ContentPreviewMode=e.AutoContentPreview?"bottom":"off"),"boolean"==typeof e.MarkdownEditingControls&&(n.MarkdownEditingControls=e.MarkdownEditingControls),"boolean"==typeof e.MarkdownWordWrap&&(n.MarkdownWordWrap=e.MarkdownWordWrap),"boolean"==typeof e.CodeWordWrap&&(n.CodeWordWrap=e.CodeWordWrap),"boolean"==typeof e.SidebarCollapsed&&(n.SidebarCollapsed=e.SidebarCollapsed),"number"==typeof e.SidebarWidth&&(n.SidebarWidth=e.SidebarWidth),"boolean"==typeof e.AutoPreviewImages&&(n.AutoPreviewImages=e.AutoPreviewImages),"boolean"==typeof e.AutoPreviewVideo&&(n.AutoPreviewVideo=e.AutoPreviewVideo),"boolean"==typeof e.AutoPreviewAudio&&(n.AutoPreviewAudio=e.AutoPreviewAudio),"boolean"==typeof e.ShowHiddenFiles&&(n.ShowHiddenFiles=e.ShowHiddenFiles),"string"==typeof e.TopicsFilePath&&(n.TopicsFilePath=e.TopicsFilePath)}catch(t){this.log.warn("Failed to load settings: "+t.message)}}}])}(i);e.exports=h,e.exports.default_configuration=t("./Pict-Application-ContentEditor-Configuration.json")},{"./Pict-Application-ContentEditor-Configuration.json":101,"./providers/Pict-Provider-ContentEditor.js":106,"./views/PictView-Editor-CodeEditor.js":107,"./views/PictView-Editor-Layout.js":108,"./views/PictView-Editor-MarkdownEditor.js":109,"./views/PictView-Editor-MarkdownReference.js":110,"./views/PictView-Editor-SettingsPanel.js":111,"./views/PictView-Editor-TopBar.js":112,"./views/PictView-Editor-Topics.js":113,"pict-application":44,"pict-section-filebrowser":63}],103:[function(t,e,n){e.exports={Name:"Retold Content Reader",Hash:"ContentReader",MainViewportViewIdentifier:"Docuserve-Layout",AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!1,AutoRenderViewsAfterInitialize:!1,pict_configuration:{Product:"ContentReader-Pict-Application"}}},{}],104:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onAfterInitializeAsync",value:function(t){var e=this;this.pict.AppData.Docuserve={CatalogLoaded:!1,Catalog:null,CoverLoaded:!1,Cover:null,SidebarLoaded:!1,SidebarGroups:[],TopBarLoaded:!1,TopBar:null,ErrorPageLoaded:!1,ErrorPageHTML:null,KeywordIndexLoaded:!1,KeywordDocumentCount:0,CurrentGroup:"",CurrentModule:"",CurrentPath:"",SidebarVisible:!0,DocsBaseURL:"/content/",CatalogURL:"/content/retold-catalog.json"},this.pict.providers["Docuserve-Documentation"].loadCatalog(function(){var n=e.pict.AppData.Docuserve;return n.CoverLoaded&&n.Cover&&n.Cover.Title?document.title=n.Cover.Title.replace(/<[^>]*>/g,""):n.TopBarLoaded&&n.TopBar&&n.TopBar.Brand&&(document.title=n.TopBar.Brand.replace(/<[^>]*>/g,"")),n.TopBar?(Array.isArray(n.TopBar.ExternalLinks)||(n.TopBar.ExternalLinks=[]),n.TopBar.ExternalLinks.push({Text:"Edit",Href:"/"})):(n.TopBarLoaded=!0,n.TopBar={Brand:"Content System",NavLinks:[],ExternalLinks:[{Text:"Edit",Href:"/"}]}),e.pict.views["Docuserve-Layout"].render(),t()})}}])}(t("pict-docuserve"));e.exports=i,e.exports.default_configuration=t("./Pict-Application-ContentReader-Configuration.json")},{"./Pict-Application-ContentReader-Configuration.json":103,"pict-docuserve":49}],105:[function(t,e,n){e.exports={PictContentReader:t("./Pict-Application-ContentReader.js"),PictContentEditor:t("./Pict-Application-ContentEditor.js")},"undefined"!=typeof window&&(window.PictContentReader=e.exports.PictContentReader,window.PictContentEditor=e.exports.PictContentEditor)},{"./Pict-Application-ContentEditor.js":102,"./Pict-Application-ContentReader.js":104}],106:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"loadFile",value:function(t,e){var n=this,i="function"==typeof e?e:function(){};if(!t)return i("No file path specified","");fetch("/api/content/read/"+encodeURIComponent(t)).then(function(t){return t.ok?t.json():i("File not found: "+t.status,"")}).then(function(t){return t&&t.Success?i(null,t.Content||""):i(t?t.Error:"Unknown error","")}).catch(function(e){return n.log.warn("ContentEditor: Error loading file [".concat(t,"]: ").concat(e)),i(e.message,"")})}},{key:"saveFile",value:function(t,e,n){var i=this,o="function"==typeof n?n:function(){};if(!t)return o("No file path specified");fetch("/api/content/save/"+encodeURIComponent(t),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({Content:e})}).then(function(t){return t.ok?t.json():o("Save failed: "+t.status)}).then(function(t){return t&&t.Success?o(null):o(t?t.Error:"Unknown error")}).catch(function(e){return i.log.warn("ContentEditor: Error saving file [".concat(t,"]: ").concat(e)),o(e.message)})}},{key:"uploadImage",value:function(t,e){var n=this,i="function"==typeof e?e:function(){},o="",r=this.pict.AppData.ContentEditor.CurrentFile;if(r){var a=r.lastIndexOf("/");a>0&&(o=r.substring(0,a))}else this.pict.AppData.PictFileBrowser&&this.pict.AppData.PictFileBrowser.CurrentLocation&&(o=this.pict.AppData.PictFileBrowser.CurrentLocation);var s={"Content-Type":t.type,"x-filename":t.name};o&&(s["x-upload-path"]=o),fetch("/api/content/upload-image",{method:"POST",body:t,headers:s}).then(function(t){return t.json()}).then(function(t){return t&&t.Success&&t.URL?i(null,t.URL):i(t?t.Error:"Upload failed")}).catch(function(t){return n.log.warn("ContentEditor: Image upload failed: ".concat(t)),i(t.message)})}}])}(t("pict-provider"));e.exports=i,e.exports.default_configuration={ProviderIdentifier:"ContentEditor-Provider",AutoInitialize:!0,AutoInitializeOrdinal:0}},{"pict-provider":58}],107:[function(t,e,n){var i=t("pict-section-code"),o={js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",json:"json",html:"xml",htm:"xml",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"scss",less:"less",sql:"sql",py:"python",rb:"ruby",java:"java",kt:"kotlin",kts:"kotlin",go:"go",rs:"rust",c:"c",h:"c",cpp:"cpp",cc:"cpp",hpp:"cpp",cs:"csharp",swift:"swift",php:"php",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",yml:"yaml",yaml:"yaml",toml:"ini",ini:"ini",cfg:"ini",conf:"ini",dockerfile:"dockerfile",docker:"dockerfile",makefile:"makefile",mk:"makefile",md:"markdown",markdown:"markdown",lua:"lua",r:"r",pl:"perl",pm:"perl",ex:"elixir",exs:"elixir",erl:"erlang",hrl:"erlang",hs:"haskell",clj:"clojure",scala:"scala",dart:"dart",groovy:"groovy",gradle:"groovy",tf:"terraform",vim:"vim",diff:"diff",patch:"diff",log:"accesslog",txt:"plaintext"},r=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._suppressNextDirty=!1,o}return _inherits(e,t),_createClass(e,[{key:"onAfterInitialRender",value:function(){if("undefined"!=typeof window&&window.CodeJarModules&&window.CodeJarModules.CodeJar&&this.connectCodeJarPrototype(window.CodeJarModules.CodeJar),"undefined"!=typeof window&&window.CodeJarModules&&window.CodeJarModules.hljs){var t=window.CodeJarModules.hljs,n=this._language;this._highlightFunction=function(e){e.removeAttribute("data-highlighted"),delete e.dataset.highlighted,e.className=e.className.replace(/\bhljs\b/g,"").replace(/\blanguage-\S+/g,"").trim(),e.classList.add("hljs"),n&&"plaintext"!==n&&e.classList.add("language-"+n),t.highlightElement(e)}}return _superPropGet(e,"onAfterInitialRender",this,3)([])}},{key:"setLanguage",value:function(t){var e=this;if(this._language=t,"undefined"!=typeof window&&window.CodeJarModules&&window.CodeJarModules.hljs){var n=window.CodeJarModules.hljs,i=t;this._highlightFunction=function(t){t.removeAttribute("data-highlighted"),delete t.dataset.highlighted,t.className=t.className.replace(/\bhljs\b/g,"").replace(/\blanguage-\S+/g,"").trim(),t.classList.add("hljs"),i&&"plaintext"!==i&&t.classList.add("language-"+i),n.highlightElement(t)}}if(this._editorElement&&(this._editorElement.className="pict-code-editor language-"+t,this.options.LineNumbers||(this._editorElement.className+=" pict-code-no-line-numbers")),this.codeJar){var o=this.codeJar.toString();this.codeJar.destroy(),this.codeJar=this._codeJarPrototype(this._editorElement,this._highlightFunction,{tab:this.options.Tab,catchTab:this.options.CatchTab,addClosing:this.options.AddClosing}),this.codeJar.updateCode(o),this.codeJar.onUpdate(function(t){e._updateLineNumbers(),e.onCodeChange(t)})}}},{key:"onCodeChange",value:function(t){_superPropGet(e,"onCodeChange",this,3)([t]),this._suppressNextDirty?this._suppressNextDirty=!1:this.pict.PictApplication&&(this.pict.PictApplication.markDirty(),this.pict.PictApplication.updateStats())}}],[{key:"getLanguageForExtension",value:function(t){if(!t)return"plaintext";var e=t.toLowerCase();return o[e]||"plaintext"}}])}(i);e.exports=r,e.exports.default_configuration={ViewIdentifier:"ContentEditor-CodeEditor",DefaultRenderable:"CodeEditor-Wrap",DefaultDestinationAddress:"#ContentEditor-Editor-Container",TargetElementAddress:"#ContentEditor-Editor-Container",CodeDataAddress:"AppData.ContentEditor.CodeContent",ReadOnly:!1,LineNumbers:!0,Language:"javascript",Tab:"\t",AutoRender:!1,Renderables:[{RenderableHash:"CodeEditor-Wrap",TemplateHash:"CodeEditor-Container",DestinationAddress:"#ContentEditor-Editor-Container"}]},e.exports.ExtensionLanguageMap=o},{"pict-section-code":61}],108:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._minSidebarWidth=140,o._maxSidebarWidth=600,o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){this.pict.views["ContentEditor-TopBar"].render();var r=this.pict.ContentAssignment.getElement("#ContentEditor-Editor-Container");r&&r[0]&&!this.pict.AppData.ContentEditor.CurrentFile&&(r[0].innerHTML='<div style="display:flex;align-items:center;justify-content:center;height:100%;color:#8A7F72;font-size:1.1em;">Select a file from the sidebar to begin editing</div>'),this.pict.CSSMap.injectCSS();var a=this.pict.AppData.ContentEditor,s=document.getElementById("ContentEditor-SidebarWrap"),c=document.getElementById("ContentEditor-SidebarToggle");if(s){var l=window.innerWidth<=768;s.style.width=l?"100%":a.SidebarWidth+"px",a.SidebarCollapsed?(s.classList.add("collapsed"),c&&(c.innerHTML=l?"▼":"▶")):l&&(a.SidebarCollapsed=!0,s.classList.add("collapsed"),c&&(c.innerHTML="▼"))}var d=this;return c&&c.addEventListener("click",function(){d.toggleSidebar()}),this._wireResizeHandle(),window.addEventListener("hashchange",function(){d.pict.PictApplication.resolveHash()}),window.addEventListener("keydown",function(t){if((t.metaKey||t.ctrlKey)&&"s"===t.key)return t.preventDefault(),void d.pict.PictApplication.saveCurrentFile();if("F1"===t.key)return t.preventDefault(),void d._handleF1();if("F2"===t.key)return t.preventDefault(),void d.toggleSidebar();if("F3"===t.key)return t.preventDefault(),void d.toggleUploadForm();if((t.metaKey||t.ctrlKey)&&t.shiftKey&&("u"===t.key||"U"===t.key))return t.preventDefault(),void d.toggleUploadForm();if("F4"===t.key)return t.preventDefault(),void d.pict.PictApplication.handleF4TopicAction();if((t.metaKey||t.ctrlKey)&&t.shiftKey&&("t"===t.key||"T"===t.key))return t.preventDefault(),void d.pict.PictApplication.handleF4TopicAction();if("Escape"===t.key){var e=document.getElementById("ContentEditor-UploadOverlay");if(e&&e.classList.contains("open"))return void d.closeUploadForm();var n=document.getElementById("ContentEditor-ConfirmOverlay");if(n&&n.classList.contains("open"))return;if(d.pict.AppData.ContentEditor.CurrentFile)return t.preventDefault(),void d.pict.PictApplication.closeCurrentFile()}}),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"toggleSidebar",value:function(){var t=document.getElementById("ContentEditor-SidebarWrap"),e=document.getElementById("ContentEditor-SidebarToggle");if(t){var n=this.pict.AppData.ContentEditor;n.SidebarCollapsed=!n.SidebarCollapsed;var i=window.innerWidth<=768;n.SidebarCollapsed?(t.classList.add("collapsed"),e&&(e.innerHTML=i?"▼":"▶")):(t.classList.remove("collapsed"),t.style.width=i?"100%":n.SidebarWidth+"px",e&&(e.innerHTML=i?"▲":"◀")),this.pict.PictApplication.saveSettings()}}},{key:"switchSidebarTab",value:function(t){var e={files:document.getElementById("ContentEditor-Sidebar-Container"),reference:document.getElementById("ContentEditor-SidebarReference-Container"),topics:document.getElementById("ContentEditor-SidebarTopics-Container")},n={files:document.getElementById("ContentEditor-SidebarTab-Files"),reference:document.getElementById("ContentEditor-SidebarTab-Reference"),topics:document.getElementById("ContentEditor-SidebarTab-Topics")};for(var i in e)e[i]&&(e[i].style.display="none"),n[i]&&n[i].classList.remove("active");e[t]&&(e[t].style.display=""),n[t]&&n[t].classList.add("active");var o=document.getElementById("ContentEditor-SidebarWrap");if(o&&("reference"===t||"topics"===t?o.classList.add("sidebar-expanded-pane"):o.classList.remove("sidebar-expanded-pane")),"reference"===t){var r=this.pict.views["ContentEditor-MarkdownReference"];r&&!r._hasRendered&&r.render()}if("topics"===t){var a=this.pict.views["ContentEditor-Topics"];a&&!a._hasRendered&&a.render()}}},{key:"_handleF1",value:function(){if(this.pict.AppData.ContentEditor.SidebarCollapsed)return this.toggleSidebar(),void this.switchSidebarTab("reference");var t=document.getElementById("ContentEditor-SidebarTab-Reference");t&&t.classList.contains("active")?this.switchSidebarTab("files"):this.switchSidebarTab("reference")}},{key:"getActiveSidebarTab",value:function(){var t=document.getElementById("ContentEditor-SidebarTab-Reference"),e=document.getElementById("ContentEditor-SidebarTab-Topics");return t&&t.classList.contains("active")?"reference":e&&e.classList.contains("active")?"topics":"files"}},{key:"toggleUploadForm",value:function(){var t=document.getElementById("ContentEditor-UploadOverlay");t&&(t.classList.contains("open")?this.closeUploadForm():this.openUploadForm())}},{key:"openUploadForm",value:function(){var t=document.getElementById("ContentEditor-UploadOverlay");t&&t.classList.add("open"),this._wireUploadDropzone()}},{key:"closeUploadForm",value:function(){var t=document.getElementById("ContentEditor-UploadOverlay");t&&t.classList.remove("open");var e=document.getElementById("ContentEditor-UploadFileInput");e&&(e.value="");var n=document.getElementById("ContentEditor-UploadStatus");n&&(n.innerHTML="");var i=document.getElementById("ContentEditor-UploadResult");i&&(i.innerHTML="")}},{key:"onUploadOverlayClick",value:function(t){"ContentEditor-UploadOverlay"===t.target.id&&this.closeUploadForm()}},{key:"onUploadFileSelected",value:function(t){t.files&&t.files.length>0&&this._uploadFile(t.files[0])}},{key:"_wireUploadDropzone",value:function(){var t=document.getElementById("ContentEditor-UploadDropzone");if(t&&!t._wired){t._wired=!0;var e=this;t.addEventListener("dragover",function(e){e.preventDefault(),e.stopPropagation(),t.classList.add("dragover")}),t.addEventListener("dragleave",function(e){e.preventDefault(),e.stopPropagation(),t.classList.remove("dragover")}),t.addEventListener("drop",function(n){n.preventDefault(),n.stopPropagation(),t.classList.remove("dragover"),n.dataTransfer&&n.dataTransfer.files&&n.dataTransfer.files.length>0&&e._uploadFile(n.dataTransfer.files[0])})}}},{key:"_uploadFile",value:function(t){var e=document.getElementById("ContentEditor-UploadStatus"),n=document.getElementById("ContentEditor-UploadResult");if(t)if(t.type.startsWith("image/")){e&&(e.innerHTML="Uploading <strong>"+t.name+"</strong>..."),n&&(n.innerHTML="");var i=this,o=this.pict.providers["ContentEditor-Provider"];o?o.uploadImage(t,function(o,r){if(o)e&&(e.innerHTML='<span class="content-editor-upload-status-error">Upload failed: '+o+"</span>");else{e&&(e.innerHTML='<span class="content-editor-upload-status-success">Uploaded successfully!</span>');var a="";n&&(n.innerHTML='<div class="content-editor-upload-result"><div class="content-editor-upload-result-label">Markdown</div><div class="content-editor-upload-result-url"><span class="content-editor-upload-result-text">'+a+'</span><button class="content-editor-upload-result-copy" onclick="navigator.clipboard.writeText(\''+a.replace(/'/g,"\\'")+'\').then(function(){this.textContent=\'Copied!\'}.bind(this))">Copy</button></div><div class="content-editor-upload-result-label" style="margin-top:8px">URL</div><div class="content-editor-upload-result-url"><span class="content-editor-upload-result-text">'+r+'</span><button class="content-editor-upload-result-copy" onclick="navigator.clipboard.writeText(\''+r.replace(/'/g,"\\'")+"').then(function(){this.textContent='Copied!'}.bind(this))\">Copy</button></div></div>"),i.pict.PictApplication.loadFileList()}}):e&&(e.innerHTML='<span class="content-editor-upload-status-error">Provider not available.</span>')}else e&&(e.innerHTML='<span class="content-editor-upload-status-error">Only image files are supported.</span>')}},{key:"_wireResizeHandle",value:function(){var t=document.getElementById("ContentEditor-ResizeHandle"),e=document.getElementById("ContentEditor-SidebarWrap");if(t&&e){var n=this,i=!1,o=0,r=0;t.addEventListener("mousedown",function(c){n.pict.AppData.ContentEditor.SidebarCollapsed||(c.preventDefault(),i=!0,o=c.clientX,r=e.offsetWidth,t.classList.add("dragging"),e.style.transition="none",document.body.style.userSelect="none",document.body.style.cursor="col-resize",document.addEventListener("mousemove",a),document.addEventListener("mouseup",s))})}function a(t){if(i){var a=t.clientX-o,s=r+a;s<n._minSidebarWidth&&(s=n._minSidebarWidth),s>n._maxSidebarWidth&&(s=n._maxSidebarWidth),e.style.width=s+"px"}}function s(){i&&(i=!1,t.classList.remove("dragging"),e.style.transition="",document.body.style.userSelect="",document.body.style.cursor="",n.pict.AppData.ContentEditor.SidebarWidth=e.offsetWidth,n.pict.PictApplication.saveSettings(),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s))}}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"ContentEditor-Layout",DefaultRenderable:"ContentEditor-Layout-Shell",DefaultDestinationAddress:"#ContentEditor-Application-Container",AutoRender:!1,CSS:'\n\t\t#ContentEditor-Application-Container\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100vh;\n\t\t\tbackground: #F5F3EE;\n\t\t}\n\t\t#ContentEditor-TopBar-Container\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.content-editor-body\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex: 1;\n\t\t\tmin-height: 0;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t/* Sidebar wrapper holds the sidebar content + collapse toggle */\n\t\t.content-editor-sidebar-wrap\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-shrink: 0;\n\t\t\tposition: relative;\n\t\t\ttransition: width 0.2s ease;\n\t\t}\n\t\t/* Inner wrapper: vertical flex for tab bar + panes */\n\t\t.content-editor-sidebar-inner\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t\tmin-height: 0;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t/* Sidebar tab bar */\n\t\t.content-editor-sidebar-tabs\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-shrink: 0;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tbackground: #F5F0EA;\n\t\t}\n\t\t.content-editor-sidebar-tab\n\t\t{\n\t\t\tflex: 1;\n\t\t\tpadding: 7px 0;\n\t\t\tborder: none;\n\t\t\tbackground: transparent;\n\t\t\tfont-size: 0.78rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: pointer;\n\t\t\tborder-bottom: 2px solid transparent;\n\t\t\ttransition: color 0.15s, border-color 0.15s;\n\t\t}\n\t\t.content-editor-sidebar-tab:hover\n\t\t{\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.content-editor-sidebar-tab.active\n\t\t{\n\t\t\tcolor: #2E7D74;\n\t\t\tborder-bottom-color: #2E7D74;\n\t\t}\n\t\t.content-editor-sidebar-addfile\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 30px;\n\t\t\tborder: none;\n\t\t\tbackground: transparent;\n\t\t\tfont-size: 1.1rem;\n\t\t\tfont-weight: 400;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tborder-bottom: 2px solid transparent;\n\t\t\ttransition: color 0.15s, background 0.15s;\n\t\t}\n\t\t.content-editor-sidebar-addfile:hover\n\t\t{\n\t\t\tcolor: #2E7D74;\n\t\t\tbackground: #EDE9E3;\n\t\t}\n\t\t/* Sidebar panes */\n\t\t.content-editor-sidebar-pane\n\t\t{\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\toverflow-x: hidden;\n\t\t\tmin-width: 0;\n\t\t\tmin-height: 0;\n\t\t}\n\t\t#ContentEditor-Sidebar-Container\n\t\t{\n\t\t\tbackground: #FAF8F4;\n\t\t}\n\t\t/* Collapsed state */\n\t\t.content-editor-sidebar-wrap.collapsed\n\t\t{\n\t\t\twidth: 0 !important;\n\t\t}\n\t\t.content-editor-sidebar-wrap.collapsed .content-editor-sidebar-inner\n\t\t{\n\t\t\tvisibility: hidden;\n\t\t}\n\t\t.content-editor-sidebar-wrap.collapsed .content-editor-resize-handle\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t/* Collapse / expand toggle */\n\t\t.content-editor-sidebar-toggle\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 8px;\n\t\t\tright: -20px;\n\t\t\twidth: 20px;\n\t\t\theight: 28px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tbackground: #FAF8F4;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-left: none;\n\t\t\tborder-radius: 0 4px 4px 0;\n\t\t\tcursor: pointer;\n\t\t\tz-index: 10;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 11px;\n\t\t\tline-height: 1;\n\t\t\ttransition: color 0.15s;\n\t\t}\n\t\t.content-editor-sidebar-toggle:hover\n\t\t{\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.content-editor-sidebar-wrap.collapsed .content-editor-sidebar-toggle\n\t\t{\n\t\t\tright: -20px;\n\t\t}\n\t\t/* Resize handle */\n\t\t.content-editor-resize-handle\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 5px;\n\t\t\tcursor: col-resize;\n\t\t\tbackground: transparent;\n\t\t\tborder-right: 1px solid #DDD6CA;\n\t\t\ttransition: background 0.15s;\n\t\t}\n\t\t.content-editor-resize-handle:hover,\n\t\t.content-editor-resize-handle.dragging\n\t\t{\n\t\t\tbackground: #2E7D74;\n\t\t\tborder-right-color: #2E7D74;\n\t\t}\n\t\t/* File browser layout overrides for sidebar use */\n\t\t#ContentEditor-Sidebar-Container .pict-filebrowser\n\t\t{\n\t\t\tborder: none;\n\t\t\tborder-radius: 0;\n\t\t\tbackground: transparent;\n\t\t}\n\t\t#ContentEditor-Sidebar-Container .pict-filebrowser-browse-pane\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t#ContentEditor-Sidebar-Container .pict-filebrowser-view-pane\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t/* Hide size/date columns — the sidebar is too narrow for them */\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-col-size,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-col-modified,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-size,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-modified\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t/* Hide the column header bar in sidebar mode */\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-header\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t/* Breadcrumb bar: flex wrapper with create-folder button */\n\t\t.pict-fb-breadcrumb-bar\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tbackground: #F5F0E8;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t}\n\t\t.pict-fb-breadcrumb-bar .pict-fb-breadcrumb\n\t\t{\n\t\t\tflex: 1;\n\t\t\tborder-bottom: none;\n\t\t}\n\t\t.pict-fb-breadcrumb-addfolder\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\t\t\tfont-size: 1.1rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 4px 10px;\n\t\t\tline-height: 1;\n\t\t\tborder-radius: 4px;\n\t\t\tmargin-right: 4px;\n\t\t}\n\t\t.pict-fb-breadcrumb-addfolder:hover\n\t\t{\n\t\t\tcolor: #2E7D74;\n\t\t\tbackground: #EAE3D8;\n\t\t}\n\t\t#ContentEditor-Editor-Container\n\t\t{\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\tpadding: 44px 16px 16px 16px;\n\t\t}\n\t\t/* Code editor: fill the container and remove outer border */\n\t\t#ContentEditor-Editor-Container .pict-code-editor-wrap\n\t\t{\n\t\t\theight: calc(100% - 4px);\n\t\t\tborder: none;\n\t\t\tborder-radius: 0;\n\t\t}\n\t\t#ContentEditor-Editor-Container .pict-code-editor\n\t\t{\n\t\t\tmin-height: unset;\n\t\t\theight: 100%;\n\t\t\tbackground: #FAFAFA;\n\t\t}\n\t\t/* Binary file preview */\n\t\t.binary-preview-image-wrap\n\t\t{\n\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\t.binary-preview-image\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tbackground: #FFF;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 6px;\n\t\t\tpadding: 24px;\n\t\t}\n\t\t.binary-preview-image img\n\t\t{\n\t\t\tdisplay: block;\n\t\t\tmax-width: 100%;\n\t\t\tmax-height: 400px;\n\t\t\tobject-fit: contain;\n\t\t\tborder-radius: 4px;\n\t\t}\n\t\t.binary-preview-card\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 20px;\n\t\t\tbackground: #FFF;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 6px;\n\t\t\tpadding: 24px;\n\t\t\tmax-width: 600px;\n\t\t}\n\t\t.binary-preview-icon\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 64px;\n\t\t\theight: 64px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder-radius: 8px;\n\t\t\tfont-size: 0.75rem;\n\t\t\tfont-weight: 700;\n\t\t\tcolor: #5E5549;\n\t\t\tletter-spacing: 0.5px;\n\t\t}\n\t\t.binary-preview-info\n\t\t{\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.binary-preview-name\n\t\t{\n\t\t\tfont-size: 1rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin-bottom: 6px;\n\t\t\tword-break: break-all;\n\t\t}\n\t\t.binary-preview-meta\n\t\t{\n\t\t\tfont-size: 0.8rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tline-height: 1.6;\n\t\t}\n\t\t.binary-preview-actions\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 8px;\n\t\t}\n\t\t.binary-preview-btn\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 8px 16px;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.8rem;\n\t\t\tfont-weight: 600;\n\t\t\ttext-decoration: none;\n\t\t\ttext-align: center;\n\t\t\tcursor: pointer;\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t}\n\t\t.binary-preview-btn:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t.binary-preview-btn-secondary\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tcolor: #5E5549;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t}\n\t\t.binary-preview-btn-secondary:hover\n\t\t{\n\t\t\tborder-color: #8A7F72;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.binary-preview-btn-preview\n\t\t{\n\t\t\tpadding: 10px 20px;\n\t\t\tfont-size: 0.85rem;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tbackground: #FAF8F4;\n\t\t\tcolor: #3D3229;\n\t\t\tcursor: pointer;\n\t\t\tborder-radius: 6px;\n\t\t\ttransition: background 0.15s, border-color 0.15s;\n\t\t}\n\t\t.binary-preview-btn-preview:hover\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder-color: #8A7F72;\n\t\t}\n\t\t#ContentEditor-MediaPreviewPlaceholder\n\t\t{\n\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\t.binary-preview-media-wrap\n\t\t{\n\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\t.binary-preview-video\n\t\t{\n\t\t\tdisplay: block;\n\t\t\tmax-width: 100%;\n\t\t\tmax-height: 500px;\n\t\t\tborder-radius: 6px;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tbackground: #000;\n\t\t}\n\t\t.binary-preview-audio\n\t\t{\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-width: 500px;\n\t\t}\n\t\t/* Image upload overlay */\n\t\t.content-editor-upload-overlay\n\t\t{\n\t\t\tdisplay: none;\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tbottom: 0;\n\t\t\tz-index: 1099;\n\t\t\tbackground: rgba(0, 0, 0, 0.35);\n\t\t}\n\t\t.content-editor-upload-overlay.open\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.content-editor-upload-panel\n\t\t{\n\t\t\tbackground: #FFF;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 10px;\n\t\t\tbox-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);\n\t\t\twidth: 420px;\n\t\t\tmax-width: 90vw;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t.content-editor-upload-header\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tpadding: 14px 18px;\n\t\t\tborder-bottom: 1px solid #EDE9E3;\n\t\t}\n\t\t.content-editor-upload-title\n\t\t{\n\t\t\tfont-size: 0.95rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.content-editor-upload-close\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\t\t\tfont-size: 1.2rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 2px 6px;\n\t\t\tline-height: 1;\n\t\t\tborder-radius: 4px;\n\t\t}\n\t\t.content-editor-upload-close:hover\n\t\t{\n\t\t\tcolor: #3D3229;\n\t\t\tbackground: #F0EDE8;\n\t\t}\n\t\t.content-editor-upload-body\n\t\t{\n\t\t\tpadding: 18px;\n\t\t}\n\t\t.content-editor-upload-dropzone\n\t\t{\n\t\t\tborder: 2px dashed #DDD6CA;\n\t\t\tborder-radius: 8px;\n\t\t\tpadding: 28px 16px;\n\t\t\ttext-align: center;\n\t\t\tcursor: pointer;\n\t\t\ttransition: border-color 0.15s, background 0.15s;\n\t\t\tbackground: #FAF8F4;\n\t\t}\n\t\t.content-editor-upload-dropzone:hover,\n\t\t.content-editor-upload-dropzone.dragover\n\t\t{\n\t\t\tborder-color: #2E7D74;\n\t\t\tbackground: #F0FAF8;\n\t\t}\n\t\t.content-editor-upload-dropzone-icon\n\t\t{\n\t\t\tfont-size: 2rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t\t.content-editor-upload-dropzone-text\n\t\t{\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.content-editor-upload-dropzone-hint\n\t\t{\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-top: 4px;\n\t\t}\n\t\t.content-editor-upload-file-input\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t.content-editor-upload-status\n\t\t{\n\t\t\tmargin-top: 12px;\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #5E5549;\n\t\t\tmin-height: 20px;\n\t\t}\n\t\t.content-editor-upload-status-error\n\t\t{\n\t\t\tcolor: #D9534F;\n\t\t}\n\t\t.content-editor-upload-status-success\n\t\t{\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.content-editor-upload-result\n\t\t{\n\t\t\tmargin-top: 12px;\n\t\t\tpadding: 10px 12px;\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 6px;\n\t\t}\n\t\t.content-editor-upload-result-label\n\t\t{\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-bottom: 4px;\n\t\t}\n\t\t.content-editor-upload-result-url\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 6px;\n\t\t}\n\t\t.content-editor-upload-result-text\n\t\t{\n\t\t\tflex: 1;\n\t\t\tfont-family: monospace;\n\t\t\tfont-size: 0.78rem;\n\t\t\tcolor: #3D3229;\n\t\t\tword-break: break-all;\n\t\t}\n\t\t.content-editor-upload-result-copy\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tpadding: 4px 10px;\n\t\t\tfont-size: 0.72rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.content-editor-upload-result-copy:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t.content-editor-upload-kbd\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 1px 5px;\n\t\t\tfont-size: 0.68rem;\n\t\t\tfont-family: monospace;\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 3px;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.content-editor-upload-footer\n\t\t{\n\t\t\tpadding: 10px 18px;\n\t\t\tborder-top: 1px solid #EDE9E3;\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\ttext-align: center;\n\t\t}\n\n\t\t/* File browser row insert button — hidden by default, shown on\n\t\t hover for image file rows via CSS attribute selectors. */\n\t\t.pict-fb-insert-btn\n\t\t{\n\t\t\tdisplay: none;\n\t\t\tposition: absolute;\n\t\t\tright: 6px;\n\t\t\ttop: 50%;\n\t\t\ttransform: translateY(-50%);\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tfont-weight: 700;\n\t\t\tline-height: 1;\n\t\t\tpadding: 2px 7px;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-fb-insert-btn:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t/* Make the row position:relative so the button can be absolutely placed */\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row\n\t\t{\n\t\t\tposition: relative;\n\t\t}\n\t\t/* Show the insert button on hover for image file extensions.\n\t\t CSS attribute selector [data-name$=".ext" i] matches\n\t\t the end of the data-name attribute, case-insensitive. */\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".png" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".jpg" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".jpeg" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".gif" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".webp" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".svg" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".bmp" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".avif" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".apng" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".ico" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".tiff" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".tif" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".jfif" i]:hover .pict-fb-insert-btn\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t}\n\n\t\t/* ============================================\n\t\t RESPONSIVE: Tablet / Phone (max-width: 768px)\n\t\t ============================================ */\n\t\t@media (max-width: 768px)\n\t\t{\n\t\t\t/* Prevent horizontal scroll on the whole app */\n\t\t\t#ContentEditor-Application-Container\n\t\t\t{\n\t\t\t\toverflow-x: hidden;\n\t\t\t\twidth: 100%;\n\t\t\t\tmax-width: 100vw;\n\t\t\t}\n\n\t\t\t/* Stack sidebar ABOVE editor instead of side-by-side */\n\t\t\t.content-editor-body\n\t\t\t{\n\t\t\t\tflex-direction: column;\n\t\t\t}\n\n\t\t\t/* Sidebar becomes a horizontal strip at the top */\n\t\t\t.content-editor-sidebar-wrap\n\t\t\t{\n\t\t\t\twidth: 100% !important;\n\t\t\t\tmax-height: 40vh;\n\t\t\t\tflex-shrink: 0;\n\t\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\t\tborder-right: none;\n\t\t\t}\n\n\t\t\t/* Give the Reference and Topics tabs much more room on mobile\n\t\t\t since they contain long scrollable content */\n\t\t\t.content-editor-sidebar-wrap.sidebar-expanded-pane\n\t\t\t{\n\t\t\t\tmax-height: 70vh;\n\t\t\t}\n\n\t\t\t/* When collapsed on mobile, hide the inner content but keep the\n\t\t\t toggle button visible (it\'s positioned below the sidebar strip) */\n\t\t\t.content-editor-sidebar-wrap.collapsed\n\t\t\t{\n\t\t\t\twidth: 100% !important;\n\t\t\t\tmax-height: 0;\n\t\t\t\toverflow: visible;\n\t\t\t}\n\t\t\t.content-editor-sidebar-wrap.collapsed .content-editor-sidebar-inner\n\t\t\t{\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t\t/* Hide the resize handle (desktop-only interaction) */\n\t\t\t.content-editor-resize-handle\n\t\t\t{\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t\t/* Reposition the sidebar toggle for horizontal layout —\n\t\t\t place it at the bottom-center of the sidebar strip */\n\t\t\t.content-editor-sidebar-toggle\n\t\t\t{\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: auto;\n\t\t\t\tbottom: -20px;\n\t\t\t\tright: auto;\n\t\t\t\tleft: 50%;\n\t\t\t\ttransform: translateX(-50%);\n\t\t\t\twidth: 28px;\n\t\t\t\theight: 20px;\n\t\t\t\tborder-radius: 0 0 4px 4px;\n\t\t\t\tborder: 1px solid #DDD6CA;\n\t\t\t\tborder-top: none;\n\t\t\t\tz-index: 10;\n\t\t\t}\n\t\t\t.content-editor-sidebar-wrap.collapsed .content-editor-sidebar-toggle\n\t\t\t{\n\t\t\t\tbottom: -20px;\n\t\t\t\tright: auto;\n\t\t\t\tleft: 50%;\n\t\t\t\ttransform: translateX(-50%);\n\t\t\t}\n\n\t\t\t/* Reduce editor container padding (less gutters) */\n\t\t\t#ContentEditor-Editor-Container\n\t\t\t{\n\t\t\t\tpadding: 24px 8px 8px 8px;\n\t\t\t}\n\n\t\t\t/* Reduce binary preview padding */\n\t\t\t.binary-preview-image\n\t\t\t{\n\t\t\t\tpadding: 12px;\n\t\t\t}\n\t\t\t.binary-preview-card\n\t\t\t{\n\t\t\t\tpadding: 12px;\n\t\t\t\tgap: 12px;\n\t\t\t}\n\n\t\t\t/* Upload panel: fill more of the screen */\n\t\t\t.content-editor-upload-panel\n\t\t\t{\n\t\t\t\twidth: 95vw;\n\t\t\t\tmax-width: 95vw;\n\t\t\t}\n\n\t\t}\n\n\t\t/* ============================================\n\t\t RESPONSIVE: Small phone (max-width: 480px)\n\t\t ============================================ */\n\t\t@media (max-width: 480px)\n\t\t{\n\t\t\t/* Even tighter editor padding */\n\t\t\t#ContentEditor-Editor-Container\n\t\t\t{\n\t\t\t\tpadding: 20px 4px 4px 4px;\n\t\t\t}\n\n\t\t\t/* Sidebar gets a smaller max height */\n\t\t\t.content-editor-sidebar-wrap\n\t\t\t{\n\t\t\t\tmax-height: 35vh;\n\t\t\t}\n\t\t\t.content-editor-sidebar-wrap.sidebar-expanded-pane\n\t\t\t{\n\t\t\t\tmax-height: 65vh;\n\t\t\t}\n\t\t}\n\t',Templates:[{Hash:"ContentEditor-Layout-Shell-Template",Template:'\n<div id="ContentEditor-TopBar-Container"></div>\n<div class="content-editor-body">\n\t<div class="content-editor-sidebar-wrap" id="ContentEditor-SidebarWrap" style="width:250px">\n\t\t<div class="content-editor-sidebar-inner">\n\t\t\t<div class="content-editor-sidebar-tabs">\n\t\t\t\t<button class="content-editor-sidebar-tab active" id="ContentEditor-SidebarTab-Files"\n\t\t\t\t\tonclick="{~P~}.views[\'ContentEditor-Layout\'].switchSidebarTab(\'files\')">Files</button>\n\t\t\t\t<button class="content-editor-sidebar-tab" id="ContentEditor-SidebarTab-Reference"\n\t\t\t\t\tonclick="{~P~}.views[\'ContentEditor-Layout\'].switchSidebarTab(\'reference\')">Reference</button>\n\t\t\t\t<button class="content-editor-sidebar-tab" id="ContentEditor-SidebarTab-Topics"\n\t\t\t\t\tonclick="{~P~}.views[\'ContentEditor-Layout\'].switchSidebarTab(\'topics\')">Topics</button>\n\t\t\t\t<button class="content-editor-sidebar-addfile" title="New file"\n\t\t\t\t\tonclick="{~P~}.PictApplication.promptNewFile()">+</button>\n\t\t\t</div>\n\t\t\t<div id="ContentEditor-Sidebar-Container" class="content-editor-sidebar-pane"></div>\n\t\t\t<div id="ContentEditor-SidebarReference-Container" class="content-editor-sidebar-pane" style="display:none"></div>\n\t\t\t<div id="ContentEditor-SidebarTopics-Container" class="content-editor-sidebar-pane" style="display:none"></div>\n\t\t</div>\n\t\t<div class="content-editor-resize-handle" id="ContentEditor-ResizeHandle"></div>\n\t\t<div class="content-editor-sidebar-toggle" id="ContentEditor-SidebarToggle">◀</div>\n\t</div>\n\t<div id="ContentEditor-Editor-Container"></div>\n</div>\n<div class="content-editor-upload-overlay" id="ContentEditor-UploadOverlay"\n\tonclick="{~P~}.views[\'ContentEditor-Layout\'].onUploadOverlayClick(event)">\n\t<div class="content-editor-upload-panel">\n\t\t<div class="content-editor-upload-header">\n\t\t\t<span class="content-editor-upload-title">Upload Image</span>\n\t\t\t<button class="content-editor-upload-close"\n\t\t\t\tonclick="{~P~}.views[\'ContentEditor-Layout\'].toggleUploadForm()">×</button>\n\t\t</div>\n\t\t<div class="content-editor-upload-body">\n\t\t\t<div class="content-editor-upload-dropzone" id="ContentEditor-UploadDropzone"\n\t\t\t\tonclick="document.getElementById(\'ContentEditor-UploadFileInput\').click()">\n\t\t\t\t<div class="content-editor-upload-dropzone-icon">📷</div>\n\t\t\t\t<div class="content-editor-upload-dropzone-text">Drop an image here or click to browse</div>\n\t\t\t\t<div class="content-editor-upload-dropzone-hint">PNG, JPG, GIF, WebP, SVG, BMP</div>\n\t\t\t</div>\n\t\t\t<input type="file" class="content-editor-upload-file-input" id="ContentEditor-UploadFileInput"\n\t\t\t\taccept="image/png,image/jpeg,image/gif,image/webp,image/svg+xml,image/bmp"\n\t\t\t\tonchange="{~P~}.views[\'ContentEditor-Layout\'].onUploadFileSelected(this)">\n\t\t\t<div class="content-editor-upload-status" id="ContentEditor-UploadStatus"></div>\n\t\t\t<div id="ContentEditor-UploadResult"></div>\n\t\t</div>\n\t\t<div class="content-editor-upload-footer">\n\t\t\t<span class="content-editor-upload-kbd">F3</span> or\n\t\t\t<span class="content-editor-upload-kbd">Ctrl+Shift+U</span> to toggle\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"ContentEditor-Layout-Shell",TemplateHash:"ContentEditor-Layout-Shell-Template",DestinationAddress:"#ContentEditor-Application-Container",RenderMethod:"replace"}]}},{"pict-view":88}],109:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onImageUpload",value:function(t,e,n){var i=this.pict.providers["ContentEditor-Provider"];return!!i&&(i.uploadImage(t,function(t,e){t?n(t):n(null,e)}),!0)}},{key:"customConfigureExtensions",value:function(t,e){if(this.pict.AppData.ContentEditor&&this.pict.AppData.ContentEditor.MarkdownWordWrap){var n=this._codeMirrorModules;n&&n.EditorView&&n.EditorView.lineWrapping&&t.push(n.EditorView.lineWrapping)}return t}},{key:"onContentChange",value:function(t,e){this.pict.PictApplication&&(this.pict.PictApplication.markDirty(),this.pict.PictApplication.updateStats())}}])}(t("pict-section-markdowneditor"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"ContentEditor-MarkdownEditor",DefaultRenderable:"MarkdownEditor-Wrap",DefaultDestinationAddress:"#ContentEditor-Editor-Container",TargetElementAddress:"#ContentEditor-Editor-Container",ContentDataAddress:"AppData.ContentEditor.Document.Segments",ReadOnly:!1,EnableRichPreview:!0,AutoRender:!1,Renderables:[{RenderableHash:"MarkdownEditor-Wrap",TemplateHash:"MarkdownEditor-Container",DestinationAddress:"#ContentEditor-Editor-Container"}]}},{"pict-section-markdowneditor":86}],110:[function(t,e,n){var i={ViewIdentifier:"ContentEditor-MarkdownReference",DefaultRenderable:"ContentEditor-MarkdownReference-Display",DefaultDestinationAddress:"#ContentEditor-SidebarReference-Container",AutoRender:!1,CSS:"\n\t\t.md-ref-container\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100%;\n\t\t\tbackground: #FAF8F4;\n\t\t}\n\t\t.md-ref-search-bar\n\t\t{\n\t\t\tposition: sticky;\n\t\t\ttop: 0;\n\t\t\tz-index: 5;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 4px;\n\t\t\tpadding: 6px 8px;\n\t\t\tbackground: #F5F0EA;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.md-ref-search-input\n\t\t{\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t\tpadding: 5px 8px;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.8rem;\n\t\t\tbackground: #FFF;\n\t\t\tcolor: #3D3229;\n\t\t\toutline: none;\n\t\t}\n\t\t.md-ref-search-input:focus\n\t\t{\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.md-ref-search-nav\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\twidth: 26px;\n\t\t\theight: 26px;\n\t\t\tcursor: pointer;\n\t\t\tcolor: #5E5549;\n\t\t\tfont-size: 0.7rem;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.md-ref-search-nav:hover\n\t\t{\n\t\t\tbackground: #EDE9E3;\n\t\t}\n\t\t.md-ref-search-nav:disabled\n\t\t{\n\t\t\topacity: 0.3;\n\t\t\tcursor: not-allowed;\n\t\t}\n\t\t.md-ref-search-count\n\t\t{\n\t\t\tfont-size: 0.7rem;\n\t\t\tcolor: #8A7F72;\n\t\t\twhite-space: nowrap;\n\t\t\tmin-width: 32px;\n\t\t\ttext-align: center;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.md-ref-content\n\t\t{\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\tpadding: 12px;\n\t\t\tfont-size: 0.82rem;\n\t\t\tline-height: 1.6;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.md-ref-content h2\n\t\t{\n\t\t\tfont-size: 0.95rem;\n\t\t\tmargin: 20px 0 8px 0;\n\t\t\tpadding-bottom: 4px;\n\t\t\tborder-bottom: 1px solid #EDE9E3;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.md-ref-content h2:first-child\n\t\t{\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.md-ref-content h3\n\t\t{\n\t\t\tfont-size: 0.85rem;\n\t\t\tmargin: 14px 0 6px 0;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.md-ref-content p\n\t\t{\n\t\t\tmargin: 6px 0;\n\t\t}\n\t\t.md-ref-content code\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t\tpadding: 1px 4px;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tfont-family: monospace;\n\t\t}\n\t\t.md-ref-content pre\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\tpadding: 8px 10px;\n\t\t\toverflow-x: auto;\n\t\t\tfont-size: 0.76rem;\n\t\t\tline-height: 1.5;\n\t\t\tmargin: 6px 0;\n\t\t\tposition: relative;\n\t\t}\n\t\t.md-ref-content pre code\n\t\t{\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.md-ref-copy-btn\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 4px;\n\t\t\tright: 4px;\n\t\t\tbackground: #FAF8F4;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 3px;\n\t\t\tpadding: 2px 6px;\n\t\t\tfont-size: 0.65rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: pointer;\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.15s;\n\t\t}\n\t\t.md-ref-content pre:hover .md-ref-copy-btn\n\t\t{\n\t\t\topacity: 1;\n\t\t}\n\t\t.md-ref-copy-btn:hover\n\t\t{\n\t\t\tbackground: #EDE9E3;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.md-ref-docs-link\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tgap: 6px;\n\t\t\tpadding: 8px 10px;\n\t\t\tbackground: #F0FAF8;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tfont-size: 0.8rem;\n\t\t\tfont-weight: 600;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.md-ref-docs-link a\n\t\t{\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.md-ref-docs-link a:hover\n\t\t{\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t/* Search highlight */\n\t\tmark.md-ref-highlight\n\t\t{\n\t\t\tbackground: #FFEAA7;\n\t\t\tcolor: inherit;\n\t\t\tpadding: 0;\n\t\t\tborder-radius: 2px;\n\t\t}\n\t\tmark.md-ref-highlight-active\n\t\t{\n\t\t\tbackground: #E8A94D;\n\t\t\tcolor: #FFF;\n\t\t}\n\t",Templates:[{Hash:"ContentEditor-MarkdownReference-Template",Template:'\n<div class="md-ref-container">\n\t<div class="md-ref-docs-link">\n\t\t<span>📖</span>\n\t\t<a href="/docs/" target="_blank">Full Documentation</a>\n\t</div>\n\t<div class="md-ref-search-bar">\n\t\t<input type="text" class="md-ref-search-input"\n\t\t\tid="ContentEditor-MdRef-SearchInput"\n\t\t\tplaceholder="Search reference..."\n\t\t\toninput="{~P~}.views[\'ContentEditor-MarkdownReference\'].onSearchInput(this.value)"\n\t\t\tonkeydown="{~P~}.views[\'ContentEditor-MarkdownReference\'].onSearchKeydown(event)">\n\t\t<span class="md-ref-search-count" id="ContentEditor-MdRef-SearchCount"></span>\n\t\t<button class="md-ref-search-nav" id="ContentEditor-MdRef-SearchPrev"\n\t\t\tonclick="{~P~}.views[\'ContentEditor-MarkdownReference\'].navigateMatch(-1)" disabled>▲</button>\n\t\t<button class="md-ref-search-nav" id="ContentEditor-MdRef-SearchNext"\n\t\t\tonclick="{~P~}.views[\'ContentEditor-MarkdownReference\'].navigateMatch(1)" disabled>▼</button>\n\t</div>\n\t<div class="md-ref-content" id="ContentEditor-MdRef-Content">\n\n<h2>Headings</h2>\n<p>Use <code>#</code> through <code>######</code> for heading levels 1–6.</p>\n<pre><code># Heading 1\n## Heading 2\n### Heading 3\n#### Heading 4\n##### Heading 5\n###### Heading 6</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Emphasis</h2>\n<p>Bold, italic, strikethrough, and combinations.</p>\n<pre><code>**bold text**\n*italic text*\n***bold and italic***\n~~strikethrough~~\n**bold and ~~strikethrough~~**</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Inline Code</h2>\n<p>Wrap text in backticks for inline code.</p>\n<pre><code>Use `console.log()` to debug.\nUse ``double backticks for `literal` backticks``.</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Links</h2>\n<p>Inline links, reference links, and autolinks.</p>\n<pre><code>[Link text](https://example.com)\n[Link with title](https://example.com "Title text")\n\n[Reference link][1]\n[1]: https://example.com\n\nAutolink: https://example.com\nEmail: user@example.com</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Images</h2>\n<pre><code>\n\n\n[](https://example.com)</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Unordered Lists</h2>\n<p>Use <code>-</code>, <code>*</code>, or <code>+</code> for bullet items.</p>\n<pre><code>- Item one\n- Item two\n - Nested item\n - Another nested\n - Deeply nested\n- Item three</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Ordered Lists</h2>\n<pre><code>1. First item\n2. Second item\n3. Third item\n 1. Sub-item A\n 2. Sub-item B</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Task Lists</h2>\n<pre><code>- [x] Completed task\n- [ ] Incomplete task\n- [ ] Another task</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Blockquotes</h2>\n<pre><code>> This is a blockquote.\n>\n> It can span multiple paragraphs.\n>\n>> Nested blockquote.</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Code Blocks</h2>\n<p>Use triple backticks with an optional language identifier.</p>\n<pre><code>```javascript\nfunction hello()\n{\n console.log("Hello, world!");\n}\n```\n\n```python\ndef hello():\n print("Hello, world!")\n```\n\n```css\n.container {\n display: flex;\n gap: 16px;\n}\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Tables</h2>\n<p>Use pipes and hyphens. Colons control alignment.</p>\n<pre><code>| Left Align | Center Align | Right Align |\n|:-----------|:------------:|------------:|\n| Cell 1 | Cell 2 | Cell 3 |\n| Cell 4 | Cell 5 | Cell 6 |</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Horizontal Rules</h2>\n<p>Three or more hyphens, asterisks, or underscores.</p>\n<pre><code>---\n\n***\n\n___</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Footnotes</h2>\n<pre><code>Here is a footnote reference[^1] and another[^note].\n\n[^1]: This is the footnote content.\n[^note]: Footnotes can have any label.</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>HTML in Markdown</h2>\n<p>Raw HTML is allowed in GitHub-Flavored Markdown.</p>\n<pre><code><details>\n<summary>Click to expand</summary>\n\nHidden content here.\n\n</details>\n\n<kbd>Ctrl</kbd> + <kbd>S</kbd> to save.\n\n<mark>Highlighted text</mark>\n\n<sup>superscript</sup> and <sub>subscript</sub></code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Escaping Characters</h2>\n<p>Backslash-escape special markdown characters.</p>\n<pre><code>\\*not italic\\*\n\\# not a heading\n\\[not a link\\](url)\n\\`not code\\`</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Line Breaks</h2>\n<pre><code>End a line with two spaces\nto create a line break.\n\nOr use a blank line\n\nfor a new paragraph.</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>KaTeX — Inline Math</h2>\n<p>Wrap expressions with single dollar signs for inline math.</p>\n<pre><code>The equation $E = mc^2$ is famous.\n\nThe quadratic formula is $x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}$.\n\nGreek letters: $\\alpha$, $\\beta$, $\\gamma$, $\\delta$, $\\theta$, $\\pi$.\n\nSubscripts and superscripts: $x_i^2$ and $a_{n+1}$.</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>KaTeX — Display Math</h2>\n<p>Use double dollar signs on their own lines for display (block) math.</p>\n\n<h3>Integral</h3>\n<pre><code>$$\n\\int_{-\\infty}^{\\infty} e^{-x^2} \\, dx = \\sqrt{\\pi}\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h3>Summation</h3>\n<pre><code>$$\n\\sum_{n=1}^{\\infty} \\frac{1}{n^2} = \\frac{\\pi^2}{6}\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h3>Matrix</h3>\n<pre><code>$$\n\\begin{bmatrix}\na & b \\\\\nc & d\n\\end{bmatrix}\n\\begin{bmatrix}\nx \\\\\ny\n\\end{bmatrix}\n=\n\\begin{bmatrix}\nax + by \\\\\ncx + dy\n\\end{bmatrix}\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h3>Aligned Equations</h3>\n<pre><code>$$\n\\begin{aligned}\nf(x) &= x^2 + 2x + 1 \\\\\n &= (x + 1)^2\n\\end{aligned}\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h3>Cases (Piecewise)</h3>\n<pre><code>$$\nf(x) = \\begin{cases}\nx^2 & \\text{if } x \\geq 0 \\\\\n-x^2 & \\text{if } x < 0\n\\end{cases}\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h3>Fractions & Limits</h3>\n<pre><code>$$\n\\lim_{x \\to 0} \\frac{\\sin x}{x} = 1\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Mermaid — Flowchart</h2>\n<pre><code>```mermaid\ngraph TD\n A[Start] --> B{Decision}\n B -->|Yes| C[Do something]\n B -->|No| D[Do something else]\n C --> E[End]\n D --> E\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Mermaid — Sequence Diagram</h2>\n<pre><code>```mermaid\nsequenceDiagram\n participant A as Alice\n participant B as Bob\n A->>B: Hello Bob\n B-->>A: Hi Alice\n A->>B: How are you?\n B-->>A: Great!\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Mermaid — Gantt Chart</h2>\n<pre><code>```mermaid\ngantt\n title Project Timeline\n dateFormat YYYY-MM-DD\n section Phase 1\n Research :a1, 2024-01-01, 30d\n Design :a2, after a1, 20d\n section Phase 2\n Development :b1, after a2, 40d\n Testing :b2, after b1, 15d\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Mermaid — Class Diagram</h2>\n<pre><code>```mermaid\nclassDiagram\n Animal <|-- Duck\n Animal <|-- Fish\n Animal : +int age\n Animal : +String gender\n Animal : +swim()\n Duck : +String beakColor\n Duck : +quack()\n Fish : +int sizeInFeet\n Fish : +canEat()\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Mermaid — State Diagram</h2>\n<pre><code>```mermaid\nstateDiagram-v2\n [*] --> Idle\n Idle --> Processing : Start\n Processing --> Done : Complete\n Processing --> Error : Fail\n Error --> Idle : Reset\n Done --> [*]\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"ContentEditor-MarkdownReference-Display",TemplateHash:"ContentEditor-MarkdownReference-Template",DestinationAddress:"#ContentEditor-SidebarReference-Container",RenderMethod:"replace"}]},o=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._hasRendered=!1,o._searchMatches=[],o._currentMatchIndex=-1,o._originalContent="",o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){this._hasRendered=!0;var r=document.getElementById("ContentEditor-MdRef-Content");return r&&(this._originalContent=r.innerHTML),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"copyCodeBlock",value:function(t){var e=t.closest("pre");if(e){var n=e.querySelector("code");if(n){var i=n.textContent;navigator.clipboard&&navigator.clipboard.writeText(i).then(function(){t.textContent="Copied!",setTimeout(function(){t.textContent="Copy"},1500)})}}}},{key:"onSearchInput",value:function(t){this._performSearch(t)}},{key:"onSearchKeydown",value:function(t){"Enter"===t.key&&(t.preventDefault(),t.shiftKey?this.navigateMatch(-1):this.navigateMatch(1)),"Escape"===t.key&&(t.target.value="",this._clearSearch())}},{key:"navigateMatch",value:function(t){if(0!==this._searchMatches.length){this._currentMatchIndex>=0&&this._searchMatches[this._currentMatchIndex]&&this._searchMatches[this._currentMatchIndex].classList.remove("md-ref-highlight-active"),this._currentMatchIndex+=t,this._currentMatchIndex>=this._searchMatches.length&&(this._currentMatchIndex=0),this._currentMatchIndex<0&&(this._currentMatchIndex=this._searchMatches.length-1);var e=this._searchMatches[this._currentMatchIndex];e.classList.add("md-ref-highlight-active"),e.scrollIntoView({behavior:"smooth",block:"center"}),this._updateSearchCount()}}},{key:"_performSearch",value:function(t){var e=document.getElementById("ContentEditor-MdRef-Content");if(e){if(e.innerHTML=this._originalContent,this._searchMatches=[],this._currentMatchIndex=-1,!t||t.length<2)return this._updateSearchCount(),void this._updateNavButtons();for(var n,i=t.toLowerCase(),o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,!1),r=[];n=o.nextNode();)n.nodeValue.toLowerCase().indexOf(i)>=0&&r.push(n);for(var a=0;a<r.length;a++)this._highlightTextNode(r[a],i);this._searchMatches=Array.from(e.querySelectorAll("mark.md-ref-highlight")),this._searchMatches.length>0&&(this._currentMatchIndex=0,this._searchMatches[0].classList.add("md-ref-highlight-active"),this._searchMatches[0].scrollIntoView({behavior:"smooth",block:"center"})),this._updateSearchCount(),this._updateNavButtons()}}},{key:"_highlightTextNode",value:function(t,e){for(var n=t.nodeValue,i=n.toLowerCase(),o=t.parentNode,r=document.createDocumentFragment(),a=0,s=i.indexOf(e);s>=0;){s>a&&r.appendChild(document.createTextNode(n.substring(a,s)));var c=document.createElement("mark");c.className="md-ref-highlight",c.textContent=n.substring(s,s+e.length),r.appendChild(c),a=s+e.length,s=i.indexOf(e,a)}a<n.length&&r.appendChild(document.createTextNode(n.substring(a))),o.replaceChild(r,t)}},{key:"_updateSearchCount",value:function(){var t=document.getElementById("ContentEditor-MdRef-SearchCount");if(t)if(0===this._searchMatches.length){var e=document.getElementById("ContentEditor-MdRef-SearchInput");e&&e.value&&e.value.length>=2?t.textContent="0":t.textContent=""}else t.textContent=this._currentMatchIndex+1+"/"+this._searchMatches.length}},{key:"_updateNavButtons",value:function(){var t=document.getElementById("ContentEditor-MdRef-SearchPrev"),e=document.getElementById("ContentEditor-MdRef-SearchNext"),n=this._searchMatches.length>0;t&&(t.disabled=!n),e&&(e.disabled=!n)}},{key:"_clearSearch",value:function(){var t=document.getElementById("ContentEditor-MdRef-Content");t&&this._originalContent&&(t.innerHTML=this._originalContent),this._searchMatches=[],this._currentMatchIndex=-1,this._updateSearchCount(),this._updateNavButtons()}}])}(t("pict-view"));e.exports=o,e.exports.default_configuration=i},{"pict-view":88}],111:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._isOpen=!1,o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){var r=this.pict.AppData.ContentEditor,a=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-MarkdownWordWrap");a&&a[0]&&(a[0].checked=r.MarkdownWordWrap);var s=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-CodeWordWrap");s&&s[0]&&(s[0].checked=r.CodeWordWrap);var c=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-EditingControls");c&&c[0]&&(c[0].checked=r.MarkdownEditingControls);var l=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-ContentPreviewMode");l&&l[0]&&(l[0].value=r.ContentPreviewMode||"off");var d=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-AutoSegment");d&&d[0]&&(d[0].checked=r.AutoSegmentMarkdown);var p=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-SegmentDepth");p&&p[0]&&(p[0].value=String(r.AutoSegmentDepth),p[0].disabled=!r.AutoSegmentMarkdown);var u=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-AutoPreviewImages");u&&u[0]&&(u[0].checked=r.AutoPreviewImages);var h=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-AutoPreviewVideo");h&&h[0]&&(h[0].checked=r.AutoPreviewVideo);var f=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-AutoPreviewAudio");f&&f[0]&&(f[0].checked=r.AutoPreviewAudio);var v=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-ShowHiddenFiles");return v&&v[0]&&(v[0].checked=r.ShowHiddenFiles),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"togglePanel",value:function(){this._isOpen?this.closePanel():this.openPanel()}},{key:"openPanel",value:function(){this._isOpen=!0;var t=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsFlyout"),e=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsOverlay"),n=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsGear");t&&t[0]&&t[0].classList.add("open"),e&&e[0]&&e[0].classList.add("open"),n&&n[0]&&n[0].classList.add("active")}},{key:"closePanel",value:function(){this._isOpen=!1;var t=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsFlyout"),e=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsOverlay"),n=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsGear");t&&t[0]&&t[0].classList.remove("open"),e&&e[0]&&e[0].classList.remove("open"),n&&n[0]&&n[0].classList.remove("active")}},{key:"onMarkdownWordWrapChanged",value:function(t){this.pict.AppData.ContentEditor.MarkdownWordWrap=t,this.pict.PictApplication.saveSettings();var e=this.pict.views["ContentEditor-MarkdownEditor"];if(e&&"markdown"===this.pict.AppData.ContentEditor.ActiveEditor&&e._segmentEditors)for(var n in e._segmentEditors){var i=e._segmentEditors[n];i&&i.contentDOM&&(t?i.contentDOM.classList.add("cm-lineWrapping"):i.contentDOM.classList.remove("cm-lineWrapping"))}}},{key:"onCodeWordWrapChanged",value:function(t){this.pict.AppData.ContentEditor.CodeWordWrap=t,this.pict.PictApplication.saveSettings();var e=this.pict.views["ContentEditor-CodeEditor"];e&&e._editorElement&&"code"===this.pict.AppData.ContentEditor.ActiveEditor&&(t?(e._editorElement.style.whiteSpace="pre-wrap",e._editorElement.style.overflowWrap="break-word"):(e._editorElement.style.whiteSpace="pre",e._editorElement.style.overflowWrap="normal"))}},{key:"onEditingControlsChanged",value:function(t){this.pict.AppData.ContentEditor.MarkdownEditingControls=t,this.pict.PictApplication.saveSettings();var e=this.pict.views["ContentEditor-MarkdownEditor"];e&&"markdown"===this.pict.AppData.ContentEditor.ActiveEditor&&e.toggleControls(t)}},{key:"onContentPreviewModeChanged",value:function(t){this.pict.AppData.ContentEditor.ContentPreviewMode=t,this.pict.PictApplication.saveSettings();var e=this.pict.views["ContentEditor-MarkdownEditor"];e&&"markdown"===this.pict.AppData.ContentEditor.ActiveEditor&&e.setPreviewMode(t)}},{key:"onAutoSegmentChanged",value:function(t){this.pict.AppData.ContentEditor.AutoSegmentMarkdown=t,this.pict.PictApplication.saveSettings();var e=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-SegmentDepth");e&&e[0]&&(e[0].disabled=!t)}},{key:"onSegmentDepthChanged",value:function(t){this.pict.AppData.ContentEditor.AutoSegmentDepth=parseInt(t,10)||1,this.pict.PictApplication.saveSettings()}},{key:"onAutoPreviewImagesChanged",value:function(t){this.pict.AppData.ContentEditor.AutoPreviewImages=t,this.pict.PictApplication.saveSettings()}},{key:"onAutoPreviewVideoChanged",value:function(t){this.pict.AppData.ContentEditor.AutoPreviewVideo=t,this.pict.PictApplication.saveSettings()}},{key:"onAutoPreviewAudioChanged",value:function(t){this.pict.AppData.ContentEditor.AutoPreviewAudio=t,this.pict.PictApplication.saveSettings()}},{key:"onShowHiddenFilesChanged",value:function(t){this.pict.AppData.ContentEditor.ShowHiddenFiles=t,this.pict.PictApplication.saveSettings();var e=this;this.pict.PictApplication.syncHiddenFilesSetting(function(){e.pict.PictApplication.loadFileList()})}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"ContentEditor-SettingsPanel",DefaultRenderable:"ContentEditor-SettingsPanel-Display",DefaultDestinationAddress:"#ContentEditor-SettingsPanel-Container",AutoRender:!1,CSS:"\n\t\t.content-editor-settings-wrap\n\t\t{\n\t\t\tposition: relative;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\t\t.content-editor-settings-gear\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 6px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tborder-radius: 4px;\n\t\t\tcolor: #B8AFA4;\n\t\t\ttransition: color 0.15s;\n\t\t}\n\t\t.content-editor-settings-gear:hover,\n\t\t.content-editor-settings-gear.active\n\t\t{\n\t\t\tcolor: #E8E0D4;\n\t\t}\n\t\t.content-editor-settings-gear svg\n\t\t{\n\t\t\twidth: 20px;\n\t\t\theight: 20px;\n\t\t\tfill: currentColor;\n\t\t}\n\t\t/* Flyout overlay — covers viewport to catch clicks outside */\n\t\t.content-editor-settings-overlay\n\t\t{\n\t\t\tdisplay: none;\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tbottom: 0;\n\t\t\tz-index: 999;\n\t\t}\n\t\t.content-editor-settings-overlay.open\n\t\t{\n\t\t\tdisplay: block;\n\t\t}\n\t\t/* Flyout panel */\n\t\t.content-editor-settings-flyout\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 44px;\n\t\t\tright: 0;\n\t\t\twidth: 270px;\n\t\t\tbackground: #FFF;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 8px;\n\t\t\tbox-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);\n\t\t\tz-index: 1000;\n\t\t\topacity: 0;\n\t\t\ttransform: translateY(-4px);\n\t\t\tpointer-events: none;\n\t\t\ttransition: opacity 0.15s ease, transform 0.15s ease;\n\t\t}\n\t\t.content-editor-settings-flyout.open\n\t\t{\n\t\t\topacity: 1;\n\t\t\ttransform: translateY(0);\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t/* Speech bubble arrow */\n\t\t.content-editor-settings-flyout::before\n\t\t{\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop: -7px;\n\t\t\tright: 12px;\n\t\t\twidth: 12px;\n\t\t\theight: 12px;\n\t\t\tbackground: #FFF;\n\t\t\tborder-left: 1px solid #DDD6CA;\n\t\t\tborder-top: 1px solid #DDD6CA;\n\t\t\ttransform: rotate(45deg);\n\t\t}\n\t\t.content-editor-settings-flyout-body\n\t\t{\n\t\t\tpadding: 8px;\n\t\t}\n\t\t.content-editor-settings-flyout-link\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 8px;\n\t\t\tpadding: 10px 12px;\n\t\t\tborder-radius: 6px;\n\t\t\ttext-decoration: none;\n\t\t\tcolor: #3D3229;\n\t\t\tfont-size: 0.85rem;\n\t\t\tfont-weight: 500;\n\t\t\ttransition: background 0.1s;\n\t\t}\n\t\t.content-editor-settings-flyout-link:hover\n\t\t{\n\t\t\tbackground: #F5F3EE;\n\t\t}\n\t\t.content-editor-settings-flyout-link svg\n\t\t{\n\t\t\twidth: 16px;\n\t\t\theight: 16px;\n\t\t\tflex-shrink: 0;\n\t\t\tfill: #8A7F72;\n\t\t}\n\t\t.content-editor-settings-divider\n\t\t{\n\t\t\theight: 1px;\n\t\t\tbackground: #EDE9E3;\n\t\t\tmargin: 4px 8px;\n\t\t}\n\t\t/* Settings controls */\n\t\t.content-editor-settings-section\n\t\t{\n\t\t\tpadding: 8px 12px;\n\t\t}\n\t\t.content-editor-settings-label\n\t\t{\n\t\t\tfont-size: 0.72rem;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-bottom: 8px;\n\t\t}\n\t\t.content-editor-settings-row\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tgap: 8px;\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t\t.content-editor-settings-row:last-child\n\t\t{\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t\t.content-editor-settings-checkbox\n\t\t{\n\t\t\twidth: 16px;\n\t\t\theight: 16px;\n\t\t\taccent-color: #2E7D74;\n\t\t\tcursor: pointer;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.content-editor-settings-checkbox-label\n\t\t{\n\t\t\tfont: inherit;\n\t\t\tfont-size: 0.85rem;\n\t\t\tcolor: #3D3229;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.content-editor-settings-select\n\t\t{\n\t\t\twidth: 140px;\n\t\t\tpadding: 5px 8px;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\tbackground: #FFF;\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #3D3229;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.content-editor-settings-select:disabled\n\t\t{\n\t\t\topacity: 0.45;\n\t\t\tcursor: not-allowed;\n\t\t}\n\t\t.content-editor-settings-select-label\n\t\t{\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #5E5549;\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t/* ============================================\n\t\t RESPONSIVE: Tablet / Phone (max-width: 768px)\n\t\t ============================================ */\n\t\t@media (max-width: 768px)\n\t\t{\n\t\t\t/* Settings flyout: position from left edge for more room */\n\t\t\t.content-editor-settings-flyout\n\t\t\t{\n\t\t\t\tright: -8px;\n\t\t\t\twidth: 260px;\n\t\t\t}\n\t\t}\n\n\t\t/* ============================================\n\t\t RESPONSIVE: Small phone (max-width: 480px)\n\t\t ============================================ */\n\t\t@media (max-width: 480px)\n\t\t{\n\t\t\t/* Full-width settings flyout on small phones */\n\t\t\t.content-editor-settings-flyout\n\t\t\t{\n\t\t\t\tposition: fixed;\n\t\t\t\ttop: 48px;\n\t\t\t\tright: 0;\n\t\t\t\tleft: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\tborder-radius: 0 0 8px 8px;\n\t\t\t}\n\t\t\t.content-editor-settings-flyout::before\n\t\t\t{\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t",Templates:[{Hash:"ContentEditor-SettingsPanel-Template",Template:'\n<div class="content-editor-settings-wrap">\n\t<button class="content-editor-settings-gear" id="ContentEditor-SettingsGear"\n\t\tonclick="{~P~}.views[\'ContentEditor-SettingsPanel\'].togglePanel()">\n\t\t<svg viewBox="0 0 24 24"><path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.49.49 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.48.48 0 0 0-.48-.41h-3.84a.48.48 0 0 0-.48.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96a.49.49 0 0 0-.59.22L2.74 8.87a.48.48 0 0 0 .12.61l2.03 1.58c-.05.3-.07.62-.07.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.26.41.48.41h3.84c.24 0 .44-.17.48-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6A3.6 3.6 0 1 1 12 8.4a3.6 3.6 0 0 1 0 7.2z"/></svg>\n\t</button>\n\t<div class="content-editor-settings-overlay" id="ContentEditor-SettingsOverlay"\n\t\tonclick="{~P~}.views[\'ContentEditor-SettingsPanel\'].closePanel()"></div>\n\t<div class="content-editor-settings-flyout" id="ContentEditor-SettingsFlyout">\n\t\t<div class="content-editor-settings-flyout-body">\n\t\t\t<a class="content-editor-settings-flyout-link"\n\t\t\t\thref="/preview.html{~D:AppData.ContentEditor.ViewerHash~}" target="_blank">\n\t\t\t\t<svg viewBox="0 0 24 24"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>\n\t\t\t\tDocuserve Preview\n\t\t\t</a>\n\t\t\t<div class="content-editor-settings-divider"></div>\n\t\t\t<div class="content-editor-settings-section">\n\t\t\t\t<div class="content-editor-settings-label">Word Wrap</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-MarkdownWordWrap">Markdown Word Wrap</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-MarkdownWordWrap"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onMarkdownWordWrapChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-CodeWordWrap">Code Word Wrap</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-CodeWordWrap"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onCodeWordWrapChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="content-editor-settings-divider"></div>\n\t\t\t<div class="content-editor-settings-section">\n\t\t\t\t<div class="content-editor-settings-label">Markdown Editor</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-EditingControls">Editing Controls</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-EditingControls"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onEditingControlsChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<span class="content-editor-settings-select-label">Content Preview</span>\n\t\t\t\t\t<select class="content-editor-settings-select"\n\t\t\t\t\t\tid="ContentEditor-Setting-ContentPreviewMode"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onContentPreviewModeChanged(this.value)">\n\t\t\t\t\t\t<option value="off">Off</option>\n\t\t\t\t\t\t<option value="bottom">Underneath</option>\n\t\t\t\t\t\t<option value="side">Beside</option>\n\t\t\t\t\t\t<option value="tabbed">Tab</option>\n\t\t\t\t\t</select>\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-AutoSegment">Auto Segment Markdown</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-AutoSegment"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onAutoSegmentChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<span class="content-editor-settings-select-label">Segment Depth</span>\n\t\t\t\t\t<select class="content-editor-settings-select"\n\t\t\t\t\t\tid="ContentEditor-Setting-SegmentDepth"\n\t\t\t\t\t\tdisabled\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onSegmentDepthChanged(this.value)">\n\t\t\t\t\t\t<option value="1">Depth 1: Blocks</option>\n\t\t\t\t\t\t<option value="2">Depth 2: ##</option>\n\t\t\t\t\t\t<option value="3">Depth 3: ###</option>\n\t\t\t\t\t\t<option value="4">Depth 4: ####</option>\n\t\t\t\t\t\t<option value="5">Depth 5: #####</option>\n\t\t\t\t\t\t<option value="6">Depth 6: ######</option>\n\t\t\t\t\t</select>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="content-editor-settings-divider"></div>\n\t\t\t<div class="content-editor-settings-section">\n\t\t\t\t<div class="content-editor-settings-label">Media Preview</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-AutoPreviewImages">Auto-Preview Images</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-AutoPreviewImages"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onAutoPreviewImagesChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-AutoPreviewVideo">Auto-Preview Video</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-AutoPreviewVideo"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onAutoPreviewVideoChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-AutoPreviewAudio">Auto-Preview Audio</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-AutoPreviewAudio"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onAutoPreviewAudioChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="content-editor-settings-divider"></div>\n\t\t\t<div class="content-editor-settings-section">\n\t\t\t\t<div class="content-editor-settings-label">File Browser</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-ShowHiddenFiles">Show Hidden Files</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-ShowHiddenFiles"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onShowHiddenFilesChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"ContentEditor-SettingsPanel-Display",TemplateHash:"ContentEditor-SettingsPanel-Template",DestinationAddress:"#ContentEditor-SettingsPanel-Container",RenderMethod:"replace"}]}},{"pict-view":88}],112:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onBeforeRender",value:function(t,n,i){var o=this.pict.AppData.ContentEditor;if(o.DirtyIndicatorHTML=o.IsDirty?' <span class="content-editor-dirty-indicator">*</span>':"",o.SaveDisabledAttr=!o.CurrentFile||o.IsSaving?"disabled":"",o.SaveVisibilityAttr=o.IsDirty||o.IsSaving||o.SaveStatus?"":'style="display:none"',o.CloseVisibilityAttr=o.CurrentFile?"":'style="display:none"',o.CurrentFile){var r=o.CurrentFile.replace(/\.md$/,"");o.ViewerHash="#/page/"+r}else o.ViewerHash="";return _superPropGet(e,"onBeforeRender",this,3)([t,n,i])}},{key:"onAfterRender",value:function(t,n,i,o){var r=this.pict.views["ContentEditor-SettingsPanel"];return r&&r.render(),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"ContentEditor-TopBar",DefaultRenderable:"ContentEditor-TopBar-Display",DefaultDestinationAddress:"#ContentEditor-TopBar-Container",AutoRender:!1,CSS:"\n\t\t.content-editor-topbar\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 0;\n\t\t\theight: 48px;\n\t\t\tborder-bottom: 3px solid #2E7D74;\n\t\t\tposition: relative;\n\t\t}\n\t\t.content-editor-topbar-brand\n\t\t{\n\t\t\tpadding: 0 16px;\n\t\t\tfont-size: 1rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #E8E0D4;\n\t\t\twhite-space: nowrap;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t/* Centered file name — absolutely positioned so it stays\n\t\t centered in the full bar regardless of left/right content */\n\t\t.content-editor-topbar-file\n\t\t{\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t\tmax-width: 50%;\n\t\t\ttext-align: center;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.content-editor-topbar-filename\n\t\t{\n\t\t\tfont-size: 0.9rem;\n\t\t\tfont-weight: 500;\n\t\t\tcolor: #E8E0D4;\n\t\t\tletter-spacing: 0.2px;\n\t\t}\n\t\t.content-editor-topbar-file .content-editor-dirty-indicator\n\t\t{\n\t\t\tcolor: #E8A94D;\n\t\t\tfont-weight: bold;\n\t\t}\n\t\t/* Left spacer pushes actions to the right */\n\t\t.content-editor-topbar-spacer\n\t\t{\n\t\t\tflex: 1;\n\t\t}\n\t\t.content-editor-topbar-status\n\t\t{\n\t\t\tpadding: 0 12px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.content-editor-status-saving\n\t\t{\n\t\t\tcolor: #E8A94D;\n\t\t}\n\t\t.content-editor-status-saved\n\t\t{\n\t\t\tcolor: #7BC47F;\n\t\t}\n\t\t.content-editor-status-error\n\t\t{\n\t\t\tcolor: #D9534F;\n\t\t}\n\t\t.content-editor-topbar-stats\n\t\t{\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\twhite-space: nowrap;\n\t\t\tpadding: 0 8px;\n\t\t\tflex-shrink: 0;\n\t\t\tletter-spacing: 0.2px;\n\t\t}\n\t\t.content-editor-topbar-actions\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 8px;\n\t\t\tpadding: 0 12px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.content-editor-topbar-btn\n\t\t{\n\t\t\tpadding: 6px 14px;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tcursor: pointer;\n\t\t\tfont-size: 0.8rem;\n\t\t\tfont-weight: 600;\n\t\t}\n\t\t.content-editor-topbar-btn-save\n\t\t{\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t}\n\t\t.content-editor-topbar-btn-save:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t.content-editor-topbar-btn-save:disabled\n\t\t{\n\t\t\tbackground: #5E5549;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: not-allowed;\n\t\t}\n\t\t.content-editor-topbar-btn-close\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tcolor: #B8AFA4;\n\t\t\tborder: 1px solid #5E5549;\n\t\t}\n\t\t.content-editor-topbar-btn-close:hover\n\t\t{\n\t\t\tcolor: #E8E0D4;\n\t\t\tborder-color: #8A7F72;\n\t\t\tbackground: rgba(255, 255, 255, 0.05);\n\t\t}\n\t\t/* Close-file confirmation overlay */\n\t\t.content-editor-confirm-overlay\n\t\t{\n\t\t\tdisplay: none;\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tbottom: 0;\n\t\t\tz-index: 1099;\n\t\t\tbackground: rgba(0, 0, 0, 0.35);\n\t\t}\n\t\t.content-editor-confirm-overlay.open\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.content-editor-confirm-panel\n\t\t{\n\t\t\tbackground: #FFF;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 10px;\n\t\t\tbox-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);\n\t\t\twidth: 360px;\n\t\t\tmax-width: 90vw;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t.content-editor-confirm-body\n\t\t{\n\t\t\tpadding: 24px 22px 16px;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.content-editor-confirm-icon\n\t\t{\n\t\t\tfont-size: 2rem;\n\t\t\tmargin-bottom: 8px;\n\t\t\tcolor: #E8A94D;\n\t\t}\n\t\t.content-editor-confirm-title\n\t\t{\n\t\t\tfont-size: 0.95rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t\t.content-editor-confirm-message\n\t\t{\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #5E5549;\n\t\t\tmargin-bottom: 16px;\n\t\t\tline-height: 1.5;\n\t\t}\n\t\t.content-editor-confirm-actions\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tgap: 10px;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.content-editor-confirm-btn\n\t\t{\n\t\t\tpadding: 8px 20px;\n\t\t\tborder: none;\n\t\t\tborder-radius: 5px;\n\t\t\tfont-size: 0.82rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.content-editor-confirm-btn-discard\n\t\t{\n\t\t\tbackground: #D9534F;\n\t\t\tcolor: #FFF;\n\t\t}\n\t\t.content-editor-confirm-btn-discard:hover\n\t\t{\n\t\t\tbackground: #C9302C;\n\t\t}\n\t\t.content-editor-confirm-btn-cancel\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tcolor: #5E5549;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t}\n\t\t.content-editor-confirm-btn-cancel:hover\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t}\n\t\t.content-editor-confirm-footer\n\t\t{\n\t\t\tpadding: 10px 22px;\n\t\t\tborder-top: 1px solid #EDE9E3;\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.content-editor-confirm-kbd\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 1px 5px;\n\t\t\tfont-size: 0.68rem;\n\t\t\tfont-family: monospace;\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 3px;\n\t\t\tcolor: #5E5549;\n\t\t}\n\n\t\t/* ============================================\n\t\t RESPONSIVE: Tablet / Phone (max-width: 768px)\n\t\t ============================================ */\n\t\t@media (max-width: 768px)\n\t\t{\n\t\t\t.content-editor-topbar\n\t\t\t{\n\t\t\t\theight: auto;\n\t\t\t\tmin-height: 44px;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tpadding: 4px 0;\n\t\t\t}\n\n\t\t\t/* Brand text: shrink */\n\t\t\t.content-editor-topbar-brand\n\t\t\t{\n\t\t\t\tpadding: 0 8px;\n\t\t\t\tfont-size: 0.85rem;\n\t\t\t}\n\n\t\t\t/* File name: switch from absolute centering to flow layout */\n\t\t\t.content-editor-topbar-file\n\t\t\t{\n\t\t\t\tposition: static;\n\t\t\t\ttransform: none;\n\t\t\t\tmax-width: none;\n\t\t\t\tflex: 1;\n\t\t\t\tmin-width: 0;\n\t\t\t\tpadding: 0 4px;\n\t\t\t}\n\n\t\t\t/* Hide the spacer (not needed when file is in-flow) */\n\t\t\t.content-editor-topbar-spacer\n\t\t\t{\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t\t/* Hide word/line count stats on mobile to save space */\n\t\t\t.content-editor-topbar-stats\n\t\t\t{\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t\t/* Compact action buttons */\n\t\t\t.content-editor-topbar-actions\n\t\t\t{\n\t\t\t\tgap: 4px;\n\t\t\t\tpadding: 0 6px;\n\t\t\t}\n\n\t\t\t.content-editor-topbar-btn\n\t\t\t{\n\t\t\t\tpadding: 5px 10px;\n\t\t\t\tfont-size: 0.75rem;\n\t\t\t}\n\n\t\t\t/* Status text */\n\t\t\t.content-editor-topbar-status\n\t\t\t{\n\t\t\t\tpadding: 0 6px;\n\t\t\t\tfont-size: 0.72rem;\n\t\t\t}\n\n\t\t\t/* Confirm dialog: tighter for mobile */\n\t\t\t.content-editor-confirm-panel\n\t\t\t{\n\t\t\t\twidth: 95vw;\n\t\t\t\tmax-width: 95vw;\n\t\t\t}\n\t\t}\n\n\t\t/* ============================================\n\t\t RESPONSIVE: Small phone (max-width: 480px)\n\t\t ============================================ */\n\t\t@media (max-width: 480px)\n\t\t{\n\t\t\t/* Hide brand text entirely on very small screens */\n\t\t\t.content-editor-topbar-brand\n\t\t\t{\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t\t.content-editor-topbar-filename\n\t\t\t{\n\t\t\t\tfont-size: 0.8rem;\n\t\t\t}\n\n\t\t\t.content-editor-topbar-actions\n\t\t\t{\n\t\t\t\tpadding: 0 4px;\n\t\t\t}\n\t\t}\n\t",Templates:[{Hash:"ContentEditor-TopBar-Template",Template:'\n<div class="content-editor-topbar">\n\t<div class="content-editor-topbar-brand">Content Editor</div>\n\t<div class="content-editor-topbar-file">\n\t\t<span class="content-editor-topbar-filename">{~D:AppData.ContentEditor.CurrentFile~}</span>{~D:AppData.ContentEditor.DirtyIndicatorHTML~}\n\t</div>\n\t<div class="content-editor-topbar-spacer"></div>\n\t<div class="content-editor-topbar-status {~D:AppData.ContentEditor.SaveStatusClass~}">\n\t\t{~D:AppData.ContentEditor.SaveStatus~}\n\t</div>\n\t<span class="content-editor-topbar-stats" id="ContentEditor-Stats"></span>\n\t<div class="content-editor-topbar-actions">\n\t\t<button class="content-editor-topbar-btn content-editor-topbar-btn-save"\n\t\t\tonclick="{~P~}.PictApplication.saveCurrentFile()"\n\t\t\t{~D:AppData.ContentEditor.SaveDisabledAttr~} {~D:AppData.ContentEditor.SaveVisibilityAttr~}>Save</button>\n\t\t<button class="content-editor-topbar-btn content-editor-topbar-btn-close"\n\t\t\tonclick="{~P~}.PictApplication.closeCurrentFile()"\n\t\t\t{~D:AppData.ContentEditor.CloseVisibilityAttr~}>Close</button>\n\t\t<div id="ContentEditor-SettingsPanel-Container"></div>\n\t</div>\n</div>\n<div class="content-editor-confirm-overlay" id="ContentEditor-ConfirmOverlay"\n\tonclick="{~P~}.PictApplication.cancelCloseFile()">\n\t<div class="content-editor-confirm-panel" onclick="event.stopPropagation()">\n\t\t<div class="content-editor-confirm-body">\n\t\t\t<div class="content-editor-confirm-icon">⚠</div>\n\t\t\t<div class="content-editor-confirm-title">Unsaved Changes</div>\n\t\t\t<div class="content-editor-confirm-message">\n\t\t\t\tThis file has unsaved changes.<br>Close without saving?\n\t\t\t</div>\n\t\t\t<div class="content-editor-confirm-actions">\n\t\t\t\t<button class="content-editor-confirm-btn content-editor-confirm-btn-discard"\n\t\t\t\t\tonclick="{~P~}.PictApplication.confirmCloseFile()">Discard & Close</button>\n\t\t\t\t<button class="content-editor-confirm-btn content-editor-confirm-btn-cancel"\n\t\t\t\t\tonclick="{~P~}.PictApplication.cancelCloseFile()">Cancel</button>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="content-editor-confirm-footer">\n\t\t\t<span class="content-editor-confirm-kbd">Y</span> to discard ·\n\t\t\t<span class="content-editor-confirm-kbd">N</span> or\n\t\t\t<span class="content-editor-confirm-kbd">Esc</span> to cancel\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"ContentEditor-TopBar-Display",TemplateHash:"ContentEditor-TopBar-Template",DestinationAddress:"#ContentEditor-TopBar-Container",RenderMethod:"replace"}]}},{"pict-view":88}],113:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._topics={},o._topicsFilePath="",o._hasRendered=!1,o._editingTopicCode=null,o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(){this._hasRendered=!0,this.pict.CSSMap.injectCSS(),this._topicsFilePath?(this._updateHeaderTitle(),this.renderTopicList()):this._showEmptyState()}},{key:"loadTopicsFile",value:function(t,e){var n="function"==typeof e?e:function(){},i=this;if(!t)return n("No path specified");var o=this.pict.providers["ContentEditor-Provider"];if(!o)return n("Provider not available");o.loadFile(t,function(e,o){if(e)return i._topics={},i._topicsFilePath="",i._hasRendered&&i._showEmptyState(),n(e);try{var r=JSON.parse(o);"object"!==_typeof(r)||null===r||Array.isArray(r)?i._topics={}:i._topics=r}catch(t){i._topics={},i.log.warn("ContentEditor-Topics: Failed to parse topics JSON: "+t.message)}return i._topicsFilePath=t,i.pict.AppData.ContentEditor.TopicsFilePath=t,i.pict.PictApplication.saveSettings(),i._hasRendered&&(i._updateHeaderTitle(),i.renderTopicList(),i._showFooter(!0)),n(null)})}},{key:"saveTopicsFile",value:function(t){var e="function"==typeof t?t:function(){};if(!this._topicsFilePath)return e("No topics file loaded");var n=this.pict.providers["ContentEditor-Provider"];if(!n)return e("Provider not available");var i=JSON.stringify(this._topics,null,"\t");n.saveFile(this._topicsFilePath,i,e)}},{key:"closeTopicsFile",value:function(){this._topics={},this._topicsFilePath="",this._editingTopicCode=null,this.pict.AppData.ContentEditor.TopicsFilePath="",this.pict.PictApplication.saveSettings(),this._hasRendered&&this._showEmptyState()}},{key:"addTopic",value:function(t){var e=this;if(this._topicsFilePath){var n=t||{},i=n.TopicCode||this._generateUniqueCode("New-Topic"),o={TopicCode:i,TopicHelpFilePath:n.TopicHelpFilePath||"",TopicTitle:n.TopicTitle||""};"number"==typeof n.RelevantMarkdownLine&&(o.RelevantMarkdownLine=n.RelevantMarkdownLine),this._topics[i]=o;var r=this;this.saveTopicsFile(function(){r.renderTopicList(),r.startEditTopic(i)})}else this._createDefaultTopicsFile(function(){e.addTopic(t)})}},{key:"removeTopic",value:function(t){if(t&&this._topics[t]&&confirm('Remove topic "'+t+'"?')){delete this._topics[t],this._editingTopicCode=null;var e=this;this.saveTopicsFile(function(){e.renderTopicList()})}}},{key:"startEditTopic",value:function(t){if(t&&this._topics[t]){this._editingTopicCode=t,this.renderTopicList();var e=document.getElementById("topics-edit-code");e&&(e.focus(),e.select())}}},{key:"saveEditTopic",value:function(t){if(t&&this._topics[t]){var e=document.getElementById("topics-edit-code"),n=document.getElementById("topics-edit-title"),i=document.getElementById("topics-edit-path"),o=document.getElementById("topics-edit-line");if(e){var r=e.value.trim(),a=n?n.value.trim():"",s=i?i.value.trim():"",c=o?parseInt(o.value,10):NaN;if(r){if(r!==t&&this._topics[r])return e.style.borderColor="#D9534F",void alert('A topic with code "'+r+'" already exists.');r!==t&&delete this._topics[t];var l={TopicCode:r,TopicHelpFilePath:s,TopicTitle:a};!isNaN(c)&&c>0&&(l.RelevantMarkdownLine=c),this._topics[r]=l,this._editingTopicCode=null;var d=this;this.saveTopicsFile(function(){d.renderTopicList()})}else e.style.borderColor="#D9534F"}}}},{key:"cancelEditTopic",value:function(){this._editingTopicCode=null,this.renderTopicList()}},{key:"navigateToTopic",value:function(t){var e=this;if(t&&this._topics[t]){var n=this._topics[t],i=n.TopicHelpFilePath;if(i&&(this.pict.PictApplication.navigateToFile(i),"number"==typeof n.RelevantMarkdownLine&&n.RelevantMarkdownLine>0)){var o=n.RelevantMarkdownLine;setTimeout(function(){var t=e.pict.views["ContentEditor-MarkdownEditor"];if(t&&t._segmentEditors){var n=0;for(var i in t._segmentEditors){var r=t._segmentEditors[i];if(r&&r.state&&r.state.doc){var a=r.state.doc.lines;if(n+a>=o){var s=o-n;s<1&&(s=1),s>a&&(s=a);var c=r.state.doc.line(s);r.dispatch({selection:{anchor:c.from},scrollIntoView:!0}),r.focus();break}n+=a}}}},500)}}}},{key:"renderTopicList",value:function(){var t=document.getElementById("ContentEditor-Topics-List");if(t){var e=Object.keys(this._topics);if(0!==e.length){for(var n="",i=0;i<e.length;i++){var o=e[i],r=this._topics[o];this._editingTopicCode===o?n+=this._buildEditFormHTML(r):n+=this._buildTopicRowHTML(r)}t.innerHTML=n}else t.innerHTML='<div style="padding:16px;text-align:center;color:#8A7F72;font-size:0.78rem;">No topics yet. Click "+ Add Topic" to create one.</div>'}}},{key:"_buildTopicRowHTML",value:function(t){var e=this._escapeHTML(t.TopicCode||""),n=this._escapeHTML(t.TopicTitle||""),i=this._escapeHTML(t.TopicHelpFilePath||""),o="number"==typeof t.RelevantMarkdownLine?" :"+t.RelevantMarkdownLine:"",r=this._escapeAttr(t.TopicCode||""),a="<div class=\"topics-row\" ondblclick=\"pict.views['ContentEditor-Topics'].startEditTopic('"+r+"')\">";return a+='<div class="topics-row-info">',a+='<div class="topics-row-code">'+e+"</div>",n&&(a+='<div class="topics-row-title">'+n+"</div>"),i&&(a+='<div class="topics-row-path">'+i+o+"</div>"),a+="</div>",a+='<div class="topics-row-actions">',a+='<button class="topics-row-btn" title="Edit" onclick="event.stopPropagation();pict.views[\'ContentEditor-Topics\'].startEditTopic(\''+r+"')\">✎</button>",a+='<button class="topics-row-btn topics-row-btn-delete" title="Delete" onclick="event.stopPropagation();pict.views[\'ContentEditor-Topics\'].removeTopic(\''+r+"')\">✖</button>",i&&(a+='<button class="topics-row-btn" title="Go to file" onclick="event.stopPropagation();pict.views[\'ContentEditor-Topics\'].navigateToTopic(\''+r+"')\">→</button>"),a+="</div>",a+="</div>"}},{key:"_buildEditFormHTML",value:function(t){var e='<div class="topics-edit">';return e+='<div class="topics-edit-field">',e+='<label class="topics-edit-label">Topic Code</label>',e+='<input class="topics-edit-input" id="topics-edit-code" type="text" value="'+this._escapeAttr(t.TopicCode||"")+'" placeholder="My-Topic-Code">',e+="</div>",e+='<div class="topics-edit-field">',e+='<label class="topics-edit-label">Title</label>',e+='<input class="topics-edit-input" id="topics-edit-title" type="text" value="'+this._escapeAttr(t.TopicTitle||"")+'" placeholder="Topic title">',e+="</div>",e+='<div class="topics-edit-field">',e+='<label class="topics-edit-label">Help File Path</label>',e+='<input class="topics-edit-input" id="topics-edit-path" type="text" value="'+this._escapeAttr(t.TopicHelpFilePath||"")+'" placeholder="path/to/file.md">',e+="</div>",e+='<div class="topics-edit-field">',e+='<label class="topics-edit-label">Line Number (optional)</label>',e+='<input class="topics-edit-input" id="topics-edit-line" type="number" value="'+("number"==typeof t.RelevantMarkdownLine?t.RelevantMarkdownLine:"")+'" placeholder="e.g. 23" min="1">',e+="</div>",e+='<div class="topics-edit-actions">',e+="<button class=\"topics-edit-save\" onclick=\"pict.views['ContentEditor-Topics'].saveEditTopic('"+this._escapeAttr(t.TopicCode||"")+"')\">Save</button>",e+='<button class="topics-edit-cancel" onclick="pict.views[\'ContentEditor-Topics\'].cancelEditTopic()">Cancel</button>',e+="</div>",e+="</div>"}},{key:"_showEmptyState",value:function(){var t=document.getElementById("ContentEditor-Topics-Container");if(t)t.innerHTML=this._buildEmptyStateHTML();else{var e=document.getElementById("ContentEditor-SidebarTopics-Container");e&&(e.innerHTML=this._buildEmptyStateHTML())}}},{key:"_buildEmptyStateHTML",value:function(){return'<div class="topics-empty"><div class="topics-empty-icon">📑</div><div>No topics file loaded</div><button class="topics-empty-btn" onclick="pict.views[\'ContentEditor-Topics\'].loadDefaultTopicsFile()">Load .pict_documentation_topics.json</button><button class="topics-empty-btn topics-empty-btn-secondary" onclick="pict.views[\'ContentEditor-Topics\'].promptSelectTopicsFile()">Select file...</button></div>'}},{key:"loadDefaultTopicsFile",value:function(){var t=this;this.loadTopicsFile(".pict_documentation_topics.json",function(e){e&&t._createDefaultTopicsFile()})}},{key:"promptSelectTopicsFile",value:function(){var t=prompt("Enter the path to a topics JSON file:",".pict_documentation_topics.json");if(t&&t.trim()){var e=this;this.loadTopicsFile(t.trim(),function(n){n&&confirm('File not found. Create "'+t.trim()+'"?')&&(e._topicsFilePath=t.trim(),e._topics={},e.pict.AppData.ContentEditor.TopicsFilePath=t.trim(),e.pict.PictApplication.saveSettings(),e.saveTopicsFile(function(){e._hasRendered&&e.render()}))})}}},{key:"_createDefaultTopicsFile",value:function(t){var e="function"==typeof t?t:function(){},n=this,i=".pict_documentation_topics.json";this._topicsFilePath=i,this._topics={},this.pict.AppData.ContentEditor.TopicsFilePath=i,this.pict.PictApplication.saveSettings(),this.saveTopicsFile(function(){n._hasRendered&&n.render(),e()})}},{key:"_updateHeaderTitle",value:function(){var t=document.getElementById("ContentEditor-Topics-HeaderTitle");if(t){var e=this._topicsFilePath.replace(/^.*\//,"");t.textContent=e||"Topics",t.title=this._topicsFilePath}}},{key:"_showFooter",value:function(t){var e=document.getElementById("ContentEditor-Topics-Footer");e&&(e.style.display=t?"":"none")}},{key:"_generateUniqueCode",value:function(t){if(!this._topics[t])return t;for(var e=2;this._topics[t+"-"+e];)e++;return t+"-"+e}},{key:"_escapeHTML",value:function(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}},{key:"_escapeAttr",value:function(t){return String(t).replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"ContentEditor-Topics",DefaultRenderable:"Topics-Wrap",DefaultDestinationAddress:"#ContentEditor-SidebarTopics-Container",AutoRender:!1,CSS:"\n\t\t.topics-container\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100%;\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.topics-header\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 6px;\n\t\t\tpadding: 8px 10px;\n\t\t\tborder-bottom: 1px solid #EDE9E3;\n\t\t\tbackground: #FAF8F4;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.topics-header-title\n\t\t{\n\t\t\tflex: 1;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.78rem;\n\t\t\tcolor: #5E5549;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t\t.topics-header-btn\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\t\t\tcursor: pointer;\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tpadding: 2px 6px;\n\t\t\tborder-radius: 3px;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.topics-header-btn:hover\n\t\t{\n\t\t\tcolor: #3D3229;\n\t\t\tbackground: #EDE9E3;\n\t\t}\n\t\t.topics-list\n\t\t{\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\toverflow-x: hidden;\n\t\t}\n\t\t.topics-row\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: flex-start;\n\t\t\tgap: 6px;\n\t\t\tpadding: 8px 10px;\n\t\t\tborder-bottom: 1px solid #F0EDE8;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background 0.1s;\n\t\t}\n\t\t.topics-row:hover\n\t\t{\n\t\t\tbackground: #F5F0EA;\n\t\t}\n\t\t.topics-row-info\n\t\t{\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.topics-row-code\n\t\t{\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.78rem;\n\t\t\tcolor: #2E7D74;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t\t.topics-row-title\n\t\t{\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #5E5549;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tmargin-top: 1px;\n\t\t}\n\t\t.topics-row-path\n\t\t{\n\t\t\tfont-size: 0.68rem;\n\t\t\tcolor: #8A7F72;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tmargin-top: 1px;\n\t\t}\n\t\t.topics-row-actions\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\tdisplay: flex;\n\t\t\tgap: 2px;\n\t\t\tpadding-top: 1px;\n\t\t}\n\t\t.topics-row-btn\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\t\t\tcursor: pointer;\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tpadding: 2px 4px;\n\t\t\tborder-radius: 3px;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.topics-row-btn:hover\n\t\t{\n\t\t\tcolor: #3D3229;\n\t\t\tbackground: #EDE9E3;\n\t\t}\n\t\t.topics-row-btn-delete:hover\n\t\t{\n\t\t\tcolor: #D9534F;\n\t\t\tbackground: #FDF0EF;\n\t\t}\n\t\t/* Inline edit form */\n\t\t.topics-edit\n\t\t{\n\t\t\tpadding: 8px 10px;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tbackground: #FFF9F0;\n\t\t}\n\t\t.topics-edit-field\n\t\t{\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t\t.topics-edit-label\n\t\t{\n\t\t\tdisplay: block;\n\t\t\tfont-size: 0.68rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-bottom: 2px;\n\t\t}\n\t\t.topics-edit-input\n\t\t{\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t\tpadding: 4px 6px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 3px;\n\t\t\tbackground: #FFF;\n\t\t\tcolor: #3D3229;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.topics-edit-input:focus\n\t\t{\n\t\t\toutline: none;\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.topics-edit-actions\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tgap: 6px;\n\t\t\tmargin-top: 8px;\n\t\t}\n\t\t.topics-edit-save\n\t\t{\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t\tborder: none;\n\t\t\tborder-radius: 3px;\n\t\t\tpadding: 4px 12px;\n\t\t\tfont-size: 0.72rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.topics-edit-save:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t.topics-edit-cancel\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tcolor: #5E5549;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 3px;\n\t\t\tpadding: 4px 12px;\n\t\t\tfont-size: 0.72rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.topics-edit-cancel:hover\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t}\n\t\t/* Footer add button */\n\t\t.topics-footer\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\tpadding: 8px 10px;\n\t\t\tborder-top: 1px solid #EDE9E3;\n\t\t\tbackground: #FAF8F4;\n\t\t}\n\t\t.topics-add-btn\n\t\t{\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tpadding: 6px 0;\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.topics-add-btn:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t/* Empty state */\n\t\t.topics-empty\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tgap: 12px;\n\t\t\tpadding: 32px 16px;\n\t\t\ttext-align: center;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 0.82rem;\n\t\t}\n\t\t.topics-empty-icon\n\t\t{\n\t\t\tfont-size: 2rem;\n\t\t\tcolor: #C4BDB3;\n\t\t}\n\t\t.topics-empty-btn\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 6px 14px;\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.topics-empty-btn:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t.topics-empty-btn-secondary\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tcolor: #5E5549;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t}\n\t\t.topics-empty-btn-secondary:hover\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder-color: #8A7F72;\n\t\t}\n\t",Templates:[{Hash:"Topics-Container-Template",Template:'\n<div class="topics-container" id="ContentEditor-Topics-Container">\n\t<div class="topics-header">\n\t\t<span class="topics-header-title" id="ContentEditor-Topics-HeaderTitle">Topics</span>\n\t\t<button class="topics-header-btn" title="Close topics file"\n\t\t\tonclick="pict.views[\'ContentEditor-Topics\'].closeTopicsFile()">×</button>\n\t</div>\n\t<div class="topics-list" id="ContentEditor-Topics-List"></div>\n\t<div class="topics-footer" id="ContentEditor-Topics-Footer">\n\t\t<button class="topics-add-btn"\n\t\t\tonclick="pict.views[\'ContentEditor-Topics\'].addTopic()">+ Add Topic</button>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"Topics-Wrap",TemplateHash:"Topics-Container-Template",DestinationAddress:"#ContentEditor-SidebarTopics-Container"}]}},{"pict-view":88}]},{},[105])(105)});
|
|
88
|
+
var i=t("fable-serviceproviderbase"),o=t("path"),r=t("fs"),a=t("url"),s={BasePath:".",APIRoutePrefix:"/api/filebrowser",WebAppRoute:"/filebrowser/*",WebAppRouteStrip:"/filebrowser/",ServeWebApp:!0,IncludeHiddenFiles:!1,MaxTreeDepth:2},c=function(t){function e(t,n,i){var r;for(var a in _classCallCheck(this,e),(r=_callSuper(this,e,[t,n,i])).serviceType="PictFileBrowserService",s)a in r.options||(r.options[a]=s[a]);return r.basePath=o.resolve(r.options.BasePath),r}return _inherits(e,t),_createClass(e,[{key:"connectRoutes",value:function(){var t=this;if(!this.fable.Orator||!this.fable.Orator.serviceServer)return this.log.error("PictFileBrowserService: Orator service server is not available. Initialize Orator first."),!1;var e=this.fable.Orator.serviceServer,i=this.options.APIRoutePrefix;if(e.get(i+"/list",function(e,n,i){var o=t.parseQueryParams(e).path||"";t.listDirectory(o,function(t,e){return t?(n.send(400,{Error:t.message}),i()):(n.send(e),i())})}),e.get(i+"/tree",function(e,n,i){var o=t.parseQueryParams(e),r=t.options.MaxTreeDepth;o.depth&&(r=parseInt(o.depth)||t.options.MaxTreeDepth),t.buildFolderTree("",r,function(t,e){return t?(n.send(400,{Error:t.message}),i()):(n.send(e),i())})}),e.get(i+"/info",function(e,n,i){var o=t.parseQueryParams(e).path||"";t.getFileInfo(o,function(t,e){return t?(n.send(400,{Error:t.message}),i()):(n.send(e),i())})}),e.get(i+"/children",function(e,n,i){var o=t.parseQueryParams(e).path||"";t.listChildFolders(o,function(t,e){return t?(n.send(400,{Error:t.message}),i()):(n.send(e),i())})}),this.options.ServeWebApp){var r=o.join(n,"..","www");this.fable.Orator.addStaticRoute(r,"index.html",this.options.WebAppRoute,this.options.WebAppRouteStrip)}return this.log.info("PictFileBrowserService: Routes connected. Browsing path: "+this.basePath),!0}},{key:"parseQueryParams",value:function(t){return t.query&&"object"===_typeof(t.query)?t.query:a.parse(t.url,!0).query||{}}},{key:"resolveSafePath",value:function(t){var e=(t||"").replace(/\.\./g,"").replace(/\/\//g,"/"),n=o.resolve(this.basePath,e);return 0!==n.indexOf(this.basePath)?null:n}},{key:"listDirectory",value:function(t,e){var n=this,i=this.resolveSafePath(t);if(!i)return e(new Error("Invalid path"));r.readdir(i,{withFileTypes:!0},function(a,s){if(a)return"ENOENT"===a.code?e(new Error("Path not found")):"ENOTDIR"===a.code?e(new Error("Path is not a directory")):e(a);var c=[],l=s.length;if(0===l)return e(null,c);for(var d=0;d<s.length;d++){var p=s[d],u=p.name;if(n.options.IncludeHiddenFiles||"."!==u.charAt(0)){var h=o.join(i,u),f=t?t+"/"+u:u;r.stat(h,function(t,n,i){return function(r,a){var s={Name:t,Path:n,Type:i?"folder":"file"};if(a&&!r&&(s.Size=a.size,s.Modified=a.mtime,s.Created=a.birthtime,i||(s.Extension=o.extname(t))),c.push(s),0===--l)return e(null,c)}}(u,f,p.isDirectory()))}else if(0===--l)return e(null,c)}})}},{key:"listChildFolders",value:function(t,e){var n=this,i=this.resolveSafePath(t);if(!i)return e(new Error("Invalid path"));r.readdir(i,{withFileTypes:!0},function(a,s){if(a)return"ENOENT"===a.code?e(new Error("Path not found")):"ENOTDIR"===a.code?e(new Error("Path is not a directory")):e(a);for(var c=[],l=0;l<s.length;l++)if(s[l].isDirectory()){var d=s[l].name;(n.options.IncludeHiddenFiles||"."!==d.charAt(0))&&c.push(d)}if(c.sort(function(t,e){return t.localeCompare(e)}),0===c.length)return e(null,[]);for(var p=[],u=c.length,h=0;h<c.length;h++){var f=c[h],v=o.join(i,f),g=t?t+"/"+f:f;r.readdir(v,{withFileTypes:!0},function(t,i){return function(o,r){var a=!1;if(!o&&r)for(var s=0;s<r.length;s++)if(r[s].isDirectory()){var c=r[s].name;if(n.options.IncludeHiddenFiles||"."!==c.charAt(0)){a=!0;break}}if(p.push({Name:t,Path:i,HasChildren:a}),0===--u)return p.sort(function(t,e){return t.Name.localeCompare(e.Name)}),e(null,p)}}(f,g))}})}},{key:"buildFolderTree",value:function(t,e,n){var i=this.resolveSafePath(t);if(!i)return n(new Error("Invalid path"));this._buildTreeRecursive(i,t,e,0,n)}},{key:"_buildTreeRecursive",value:function(t,e,n,i,a){var s=this;if(n>0&&i>=n)return a(null,[]);r.readdir(t,{withFileTypes:!0},function(r,c){if(r)return a(null,[]);for(var l=[],d=0;d<c.length;d++)if(c[d].isDirectory()){var p=c[d].name;if(!s.options.IncludeHiddenFiles&&"."===p.charAt(0))continue;l.push(p)}if(0===l.length)return a(null,[]);for(var u=[],h=l.length,f=0;f<l.length;f++){var v=l[f],g=o.join(t,v),m=e?e+"/"+v:v;s._buildTreeRecursive(g,m,n,i+1,function(t,e){return function(n,i){if(u.push({Name:t,Path:e,Children:i||[]}),0===--h)return u.sort(function(t,e){return t.Name.localeCompare(e.Name)}),a(null,u)}}(v,m))}})}},{key:"getFileInfo",value:function(t,e){var n=this.resolveSafePath(t);if(!n)return e(new Error("Invalid path"));r.stat(n,function(i,r){if(i)return"ENOENT"===i.code?e(new Error("Path not found")):e(i);var a=o.basename(n),s={Name:a,Path:t||a,Type:r.isDirectory()?"folder":"file",Size:r.size,Modified:r.mtime,Created:r.birthtime};return r.isDirectory()||(s.Extension=o.extname(a)),e(null,s)})}}])}(i);e.exports=c,e.exports.default_configuration=s}).call(this)}).call(this,"/node_modules/pict-section-filebrowser/source/services")},{"fable-serviceproviderbase":20,fs:2,path:42,url:100}],70:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-BrowseSearch",DefaultRenderable:"BrowseSearch-Container",DefaultDestinationAddress:"#Pict-FileBrowser-BrowsePane",AutoRender:!1,Templates:[{Hash:"FileBrowser-BrowseSearch-Container-Template",Template:'\n<div class="pict-fb-search">\n\t<input type="text" class="pict-fb-search-input"\n\t\tid="Pict-FileBrowser-SearchInput"\n\t\tplaceholder="Search files..."\n\t\toninput="pict.views[\'{~D:Record.ViewHash~}\'].onSearchInput(this.value)" />\n\t<div class="pict-fb-search-results" id="Pict-FileBrowser-SearchResults"></div>\n</div>\n'},{Hash:"FileBrowser-BrowseSearch-Result-Template",Template:'\n<div class="pict-fb-search-result" onclick="{~D:Record.ClickHandler~}">\n\t<span class="pict-fb-search-result-icon">{~D:Record.Icon~}</span>\n\t<span class="pict-fb-search-result-name">{~D:Record.Name~}</span>\n\t<span class="pict-fb-search-result-path">{~D:Record.Path~}</span>\n</div>\n'},{Hash:"FileBrowser-BrowseSearch-Empty-Template",Template:'<div class="pict-fb-empty">{~D:Record.Message~}</div>'}],Renderables:[{RenderableHash:"BrowseSearch-Container",TemplateHash:"FileBrowser-BrowseSearch-Container-Template",DestinationAddress:"#Pict-FileBrowser-BrowsePane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},o,n),i])).lastQuery="",r.debounceTimer=null,r}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){var n=this.pict.parseTemplateByHash("FileBrowser-BrowseSearch-Container-Template",{ViewHash:this.Hash});return this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-BrowsePane",n),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"onSearchInput",value:function(t){var e=this;this.lastQuery=t||"",this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){e.performSearch(e.lastQuery)},150)}},{key:"performSearch",value:function(t){var e="#Pict-FileBrowser-SearchResults";if(!t||t.length<1)this.pict.ContentAssignment.assignContent(e,"");else{var n=this.pict.providers["Pict-FileBrowser-Browse"];if(n){var i=n.searchFiles(t),o=this.pict.providers["Pict-FileBrowser-List"];if(0!==i.length){for(var r="",a=0;a<i.length&&a<50;a++){var s=i[a],c=o?o.getEntryIcon(s):"📄",l=s.Path||"",d={Name:s.Name,Path:l,Icon:c,ClickHandler:"pict.views['"+this.Hash+"'].selectResult("+a+")"};r+=this.pict.parseTemplateByHash("FileBrowser-BrowseSearch-Result-Template",d)}this.pict.ContentAssignment.assignContent(e,r),this._lastResults=i}else{var p=this.pict.parseTemplateByHash("FileBrowser-BrowseSearch-Empty-Template",{Message:"No results found"});this.pict.ContentAssignment.assignContent(e,p)}}}}},{key:"selectResult",value:function(t){if(this._lastResults&&!(t>=this._lastResults.length)){var e=this._lastResults[t],n=this.pict.providers["Pict-FileBrowser-List"];n&&n.openEntry(e)}}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":88}],71:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-BrowseTree",DefaultRenderable:"BrowseTree-Container",DefaultDestinationAddress:"#Pict-FileBrowser-BrowsePane",AutoRender:!1,Templates:[{Hash:"FileBrowser-BrowseTree-Container-Template",Template:'<div class="pict-fb-tree" id="Pict-FileBrowser-Tree"></div>'},{Hash:"FileBrowser-BrowseTree-Node-Template",Template:'\n<div class="pict-fb-tree-node{~D:Record.SelectedClass~}" style="padding-left: {~D:Record.Indent~}px;" data-path="{~D:Record.Path~}" onclick="{~D:Record.ClickHandler~}">\n\t<span class="{~D:Record.ToggleClass~}" onclick="{~D:Record.ToggleHandler~}">{~D:Record.ToggleIcon~}</span>\n\t<span class="pict-fb-tree-icon">{~D:Record.Icon~}</span>\n\t<span class="pict-fb-tree-label">{~D:Record.Name~}</span>\n</div>\n<div class="pict-fb-tree-children{~D:Record.ExpandedClass~}" id="Pict-FB-TreeChildren-{~D:Record.NodeID~}">\n{~D:Record.ChildrenHTML~}\n</div>\n'}],Renderables:[{RenderableHash:"BrowseTree-Container",TemplateHash:"FileBrowser-BrowseTree-Container-Template",DestinationAddress:"#Pict-FileBrowser-BrowsePane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},o,n),i])).expandedPaths={},r}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){return this.rebuildTree(),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"rebuildTree",value:function(){if(this.pict.providers["Pict-FileBrowser-Browse"]){var t=this.getCurrentLocation(),e=this.renderTreeLevel("",0,t);this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-Tree",e)}}},{key:"renderTreeLevel",value:function(t,e,n){var i=this.pict.providers["Pict-FileBrowser-Browse"];if(!i)return"";var o=i.getChildFolders(t);if(!o)return this.expandedPaths[t]?'<div class="pict-fb-tree-loading" style="padding-left: '+(24+16*e)+'px;">Loading...</div>':"";for(var r="",a=0;a<o.length;a++){var s=o[a],c=s.Path,l=c.replace(/[^a-zA-Z0-9]/g,"_"),d=!!this.expandedPaths[c],p=c===n,u=i.getChildFolders(c),h=s.HasChildren||u&&u.length>0,f="";d&&(f=this.renderTreeLevel(c,e+1,n));var v=this.pict.providers["Pict-FileBrowser-Icons"],g=v?v.getIcon("folder",16):"📁",m="";h&&(m=v?d?v.getIcon("chevron-down",10):v.getIcon("chevron-right",10):d?"▾":"▸");var y={Name:s.Name,Path:c,NodeID:l,Indent:8+16*e,Icon:g,ToggleIcon:m,ToggleClass:h?"pict-fb-tree-toggle":"pict-fb-tree-toggle-empty",ToggleHandler:h?"event.stopPropagation(); pict.views['"+this.Hash+"'].toggleNode('"+c+"')":"",ClickHandler:"pict.views['"+this.Hash+"'].selectFolder('"+c+"')",SelectedClass:p?" selected":"",ExpandedClass:d?" expanded":"",ChildrenHTML:f};r+=this.pict.parseTemplateByHash("FileBrowser-BrowseTree-Node-Template",y)}return r}},{key:"toggleNode",value:function(t){if(this.expandedPaths[t]=!this.expandedPaths[t],this.expandedPaths[t]){var e=this.pict.providers["Pict-FileBrowser-Browse"];if(e)e.getChildFolders(t)||"function"==typeof this.onRequestChildren&&this.onRequestChildren(t)}this.rebuildTree()}},{key:"onRequestChildren",value:function(t){}},{key:"selectFolder",value:function(t){this.expandedPaths[t]=!0;var e=this.pict.providers["Pict-FileBrowser-Browse"];e&&(e.getChildFolders(t)||"function"==typeof this.onRequestChildren&&this.onRequestChildren(t),e.navigateToFolder(t));this.rebuildTree()}},{key:"getCurrentLocation",value:function(){var t=(this.options.StateAddresses||{}).CurrentLocation||"AppData.PictFileBrowser.CurrentLocation";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||""}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":88}],72:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-ListDetail",DefaultRenderable:"ListDetail-Container",DefaultDestinationAddress:"#Pict-FileBrowser-ListPane",AutoRender:!1,Templates:[{Hash:"FileBrowser-ListDetail-Container-Template",Template:'\n<div class="pict-fb-detail" id="Pict-FileBrowser-DetailList">\n\t<div class="pict-fb-breadcrumb" id="Pict-FileBrowser-Breadcrumb"></div>\n\t<div class="pict-fb-detail-header">\n\t\t<div class="pict-fb-detail-header-cell pict-fb-detail-col-name" onclick="pict.views[\'{~D:Record.ViewHash~}\'].sortBy(\'Name\')">Name</div>\n\t\t<div class="pict-fb-detail-header-cell pict-fb-detail-col-size" onclick="pict.views[\'{~D:Record.ViewHash~}\'].sortBy(\'Size\')">Size</div>\n\t\t<div class="pict-fb-detail-header-cell pict-fb-detail-col-modified" onclick="pict.views[\'{~D:Record.ViewHash~}\'].sortBy(\'Modified\')">Modified</div>\n\t</div>\n\t<div id="Pict-FileBrowser-DetailRows"></div>\n</div>\n'},{Hash:"FileBrowser-ListDetail-Row-Template",Template:'\n<div class="pict-fb-detail-row{~D:Record.SelectedClass~}" data-index="{~D:Record.Index~}" onclick="{~D:Record.ClickHandler~}" ondblclick="{~D:Record.DblClickHandler~}">\n\t<span class="pict-fb-detail-icon">{~D:Record.Icon~}</span>\n\t<span class="pict-fb-detail-name">{~D:Record.Name~}</span>\n\t<span class="pict-fb-detail-size">{~D:Record.SizeFormatted~}</span>\n\t<span class="pict-fb-detail-modified">{~D:Record.ModifiedFormatted~}</span>\n</div>\n'},{Hash:"FileBrowser-ListDetail-Empty-Template",Template:'<div class="pict-fb-empty">{~D:Record.Message~}</div>'},{Hash:"FileBrowser-Breadcrumb-Segment-Template",Template:'<span class="pict-fb-breadcrumb-segment" onclick="{~D:Record.ClickHandler~}">{~D:Record.Label~}</span>'},{Hash:"FileBrowser-Breadcrumb-Separator-Template",Template:'<span class="pict-fb-breadcrumb-separator">/</span>'},{Hash:"FileBrowser-Breadcrumb-Current-Template",Template:'<span class="pict-fb-breadcrumb-current">{~D:Record.Label~}</span>'}],Renderables:[{RenderableHash:"ListDetail-Container",TemplateHash:"FileBrowser-ListDetail-Container-Template",DestinationAddress:"#Pict-FileBrowser-ListPane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},o,n),i]))._cachedFileList=[],r._activeRebuildFrame=null,r._activeRebuildToken=0,r}return _inherits(e,t),_createClass(e,[{key:"_cancelActiveRebuild",value:function(){null!==this._activeRebuildFrame&&"function"==typeof cancelAnimationFrame&&(cancelAnimationFrame(this._activeRebuildFrame),this._activeRebuildFrame=null),this._activeRebuildToken++}},{key:"onAfterRender",value:function(t){var n=this.pict.parseTemplateByHash("FileBrowser-ListDetail-Container-Template",{ViewHash:this.Hash});return this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-ListPane",n),this.rebuildList(),this.rebuildBreadcrumb(),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"rebuildList",value:function(){this._cancelActiveRebuild();var t=this.pict.providers["Pict-FileBrowser-List"];if(t){var e=t.getSortedFileList();this._cachedFileList=e;var n=t.getSelectedFile();if(0!==e.length)if(e.length<=500){for(var i="",o=0;o<e.length;o++)i+=this._buildRowHTML(e[o],o,n);this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-DetailRows",i)}else{var r='<div class="retold-remote-filebrowser-loading-row">Loading '+e.length.toLocaleString()+" items…</div>";this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-DetailRows",r),this._rebuildListChunked(e,n)}else{var a=this.pict.parseTemplateByHash("FileBrowser-ListDetail-Empty-Template",{Message:"This folder is empty"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-DetailRows",a)}}}},{key:"_buildRowHTML",value:function(t,e,n){var i=this.pict.providers["Pict-FileBrowser-List"],o=n&&n.Name===t.Name&&n.Path===t.Path,r={Index:e,Name:t.Name,Icon:i.getEntryIcon(t),SizeFormatted:"folder"===t.Type?"--":i.formatFileSize(t.Size),ModifiedFormatted:i.formatDate(t.Modified),SelectedClass:o?" selected":"",ClickHandler:"pict.views['"+this.Hash+"'].selectEntry("+e+")",DblClickHandler:"pict.views['"+this.Hash+"'].openEntry("+e+")"};return this.pict.parseTemplateByHash("FileBrowser-ListDetail-Row-Template",r)}},{key:"_rebuildListChunked",value:function(t,e){var n=this,i=++this._activeRebuildToken,o=t.length,r=0,a=function(){if(i===n._activeRebuildToken){var s=document.getElementById("Pict-FileBrowser-DetailRows");if(s){for(var c=0===r?200:400,l=Math.min(r+c,o),d="",p=r;p<l;p++)d+=n._buildRowHTML(t[p],p,e);0===r?s.innerHTML=d:s.insertAdjacentHTML("beforeend",d),r=l,n._activeRebuildFrame=r<o?requestAnimationFrame(a):null}}};if("function"==typeof requestAnimationFrame)this._activeRebuildFrame=requestAnimationFrame(a);else for(a();r<o;)a()}},{key:"rebuildBreadcrumb",value:function(){var t=this.getCurrentLocation(),e="",n=this.pict.providers["Pict-FileBrowser-Icons"],i=n?n.getIcon("home",16):"🏠";if(e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Segment-Template",{Label:i,ClickHandler:"pict.views['"+this.Hash+"'].navigateToPath('')"}),t)for(var o=t.split("/"),r="",a=0;a<o.length;a++)if(r=r?r+"/"+o[a]:o[a],e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Separator-Template",{}),a===o.length-1)e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Current-Template",{Label:o[a]});else{var s=r;e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Segment-Template",{Label:o[a],ClickHandler:"pict.views['"+this.Hash+"'].navigateToPath('"+s+"')"})}this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-Breadcrumb",e)}},{key:"selectEntry",value:function(t){if(!(t<0||t>=this._cachedFileList.length)){var e=this.pict.providers["Pict-FileBrowser-List"];e&&e.selectFile(this._cachedFileList[t]),this.rebuildList()}}},{key:"openEntry",value:function(t){if(!(t<0||t>=this._cachedFileList.length)){var e=this.pict.providers["Pict-FileBrowser-List"];e&&e.openEntry(this._cachedFileList[t]),this.rebuildList(),this.rebuildBreadcrumb()}}},{key:"sortBy",value:function(t){var e=this.pict.providers["Pict-FileBrowser-List"];e&&e.setSortField(t),this.rebuildList()}},{key:"navigateToPath",value:function(t){var e=this.pict.providers["Pict-FileBrowser-Browse"];e&&e.navigateToFolder(t),this.rebuildList(),this.rebuildBreadcrumb()}},{key:"getCurrentLocation",value:function(){var t=(this.options.StateAddresses||{}).CurrentLocation||"AppData.PictFileBrowser.CurrentLocation";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||""}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":88}],73:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-ListIcons",DefaultRenderable:"ListIcons-Container",DefaultDestinationAddress:"#Pict-FileBrowser-ListPane",AutoRender:!1,Templates:[{Hash:"FileBrowser-ListIcons-Container-Template",Template:'\n<div id="Pict-FileBrowser-IconList">\n\t<div class="pict-fb-breadcrumb" id="Pict-FileBrowser-IconBreadcrumb"></div>\n\t<div class="pict-fb-icons" id="Pict-FileBrowser-IconGrid"></div>\n</div>\n'},{Hash:"FileBrowser-ListIcons-Item-Template",Template:'\n<div class="pict-fb-icon-item{~D:Record.SelectedClass~}" data-index="{~D:Record.Index~}" onclick="{~D:Record.ClickHandler~}" ondblclick="{~D:Record.DblClickHandler~}">\n\t<div class="pict-fb-icon-graphic">{~D:Record.Icon~}</div>\n\t<div class="pict-fb-icon-label">{~D:Record.Name~}</div>\n</div>\n'},{Hash:"FileBrowser-ListIcons-Empty-Template",Template:'<div class="pict-fb-empty">{~D:Record.Message~}</div>'}],Renderables:[{RenderableHash:"ListIcons-Container",TemplateHash:"FileBrowser-ListIcons-Container-Template",DestinationAddress:"#Pict-FileBrowser-ListPane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){var r;return _classCallCheck(this,e),(r=_callSuper(this,e,[t,Object.assign({},o,n),i]))._cachedFileList=[],r}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){return this.rebuildGrid(),this.rebuildBreadcrumb(),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"rebuildGrid",value:function(){var t=this.pict.providers["Pict-FileBrowser-List"];if(t){var e=t.getSortedFileList();this._cachedFileList=e;var n=t.getSelectedFile();if(0!==e.length){for(var i="",o=0;o<e.length;o++){var r=e[o],a=n&&n.Name===r.Name&&n.Path===r.Path,s={Index:o,Name:r.Name,Icon:t.getEntryIcon(r),SelectedClass:a?" selected":"",ClickHandler:"pict.views['"+this.Hash+"'].selectEntry("+o+")",DblClickHandler:"pict.views['"+this.Hash+"'].openEntry("+o+")"};i+=this.pict.parseTemplateByHash("FileBrowser-ListIcons-Item-Template",s)}this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-IconGrid",i)}else{var c=this.pict.parseTemplateByHash("FileBrowser-ListIcons-Empty-Template",{Message:"This folder is empty"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-IconGrid",c)}}}},{key:"rebuildBreadcrumb",value:function(){var t=this.getCurrentLocation(),e="";if(e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Segment-Template",{Label:"🏠",ClickHandler:"pict.views['"+this.Hash+"'].navigateToPath('')"}),t)for(var n=t.split("/"),i="",o=0;o<n.length;o++)if(i=i?i+"/"+n[o]:n[o],e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Separator-Template",{}),o===n.length-1)e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Current-Template",{Label:n[o]});else{var r=i;e+=this.pict.parseTemplateByHash("FileBrowser-Breadcrumb-Segment-Template",{Label:n[o],ClickHandler:"pict.views['"+this.Hash+"'].navigateToPath('"+r+"')"})}this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-IconBreadcrumb",e)}},{key:"selectEntry",value:function(t){if(!(t<0||t>=this._cachedFileList.length)){var e=this.pict.providers["Pict-FileBrowser-List"];e&&e.selectFile(this._cachedFileList[t]),this.rebuildGrid()}}},{key:"openEntry",value:function(t){if(!(t<0||t>=this._cachedFileList.length)){var e=this.pict.providers["Pict-FileBrowser-List"];e&&e.openEntry(this._cachedFileList[t]),this.rebuildGrid(),this.rebuildBreadcrumb()}}},{key:"navigateToPath",value:function(t){var e=this.pict.providers["Pict-FileBrowser-Browse"];e&&e.navigateToFolder(t),this.rebuildGrid(),this.rebuildBreadcrumb()}},{key:"getCurrentLocation",value:function(){var t=(this.options.StateAddresses||{}).CurrentLocation||"AppData.PictFileBrowser.CurrentLocation";return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},t)||""}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":88}],74:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-ViewFileInfo",DefaultRenderable:"ViewFileInfo-Container",DefaultDestinationAddress:"#Pict-FileBrowser-ViewPane",AutoRender:!1,Templates:[{Hash:"FileBrowser-ViewFileInfo-Container-Template",Template:'<div class="pict-fb-fileinfo" id="Pict-FileBrowser-FileInfo"></div>'},{Hash:"FileBrowser-ViewFileInfo-Detail-Template",Template:'\n<div class="pict-fb-fileinfo-title">{~D:Record.Name~}</div>\n<table class="pict-fb-fileinfo-table">\n\t<tr>\n\t\t<td class="pict-fb-fileinfo-label">Type</td>\n\t\t<td class="pict-fb-fileinfo-value">{~D:Record.TypeDescription~}</td>\n\t</tr>\n\t<tr>\n\t\t<td class="pict-fb-fileinfo-label">Size</td>\n\t\t<td class="pict-fb-fileinfo-value">{~D:Record.SizeFormatted~}</td>\n\t</tr>\n\t<tr>\n\t\t<td class="pict-fb-fileinfo-label">Modified</td>\n\t\t<td class="pict-fb-fileinfo-value">{~D:Record.ModifiedFormatted~}</td>\n\t</tr>\n\t<tr>\n\t\t<td class="pict-fb-fileinfo-label">Extension</td>\n\t\t<td class="pict-fb-fileinfo-value">{~D:Record.Extension~}</td>\n\t</tr>\n\t<tr>\n\t\t<td class="pict-fb-fileinfo-label">Path</td>\n\t\t<td class="pict-fb-fileinfo-value">{~D:Record.Path~}</td>\n\t</tr>\n</table>\n'},{Hash:"FileBrowser-ViewFileInfo-Empty-Template",Template:'<div class="pict-fb-fileinfo-none">No file selected</div>'}],Renderables:[{RenderableHash:"ViewFileInfo-Container",TemplateHash:"FileBrowser-ViewFileInfo-Container-Template",DestinationAddress:"#Pict-FileBrowser-ViewPane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,Object.assign({},o,n),i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){return this.rebuildFileInfo(),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"rebuildFileInfo",value:function(){var t=this.pict.providers["Pict-FileBrowser-View"],e=this.pict.providers["Pict-FileBrowser-List"],n=t?t.getCurrentFile():null;if(n){var i={Name:n.Name||"Unknown",TypeDescription:t?t.getFileTypeDescription(n):"File",SizeFormatted:e?e.formatFileSize(n.Size):n.Size||"--",ModifiedFormatted:e?e.formatDate(n.Modified):n.Modified||"--",Extension:n.Extension||"--",Path:n.Path||"--"},o=this.pict.parseTemplateByHash("FileBrowser-ViewFileInfo-Detail-Template",i);this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-FileInfo",o)}else{var r=this.pict.parseTemplateByHash("FileBrowser-ViewFileInfo-Empty-Template",{});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-FileInfo",r)}}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":88}],75:[function(t,e,n){var i=t("pict-view"),o={ViewIdentifier:"Pict-FileBrowser-ViewImage",DefaultRenderable:"ViewImage-Container",DefaultDestinationAddress:"#Pict-FileBrowser-ViewPane",AutoRender:!1,Templates:[{Hash:"FileBrowser-ViewImage-Container-Template",Template:'<div class="pict-fb-image-viewer" id="Pict-FileBrowser-ImageViewer"></div>'},{Hash:"FileBrowser-ViewImage-Display-Template",Template:'<img src="{~D:Record.ImageURL~}" alt="{~D:Record.Name~}" />'},{Hash:"FileBrowser-ViewImage-NoImage-Template",Template:'<div class="pict-fb-image-viewer-none">{~D:Record.Message~}</div>'}],Renderables:[{RenderableHash:"ViewImage-Container",TemplateHash:"FileBrowser-ViewImage-Container-Template",DestinationAddress:"#Pict-FileBrowser-ViewPane",RenderMethod:"replace"}]},r=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,Object.assign({},o,n),i])}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t){return this.rebuildImageView(),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"rebuildImageView",value:function(){var t=this.pict.providers["Pict-FileBrowser-View"],e=t?t.getCurrentFile():null;if(e){if(!!t&&t.isImage(e)){var n=t?t.getImageURL(e):null;if(n){var i=this.pict.parseTemplateByHash("FileBrowser-ViewImage-Display-Template",{ImageURL:n,Name:e.Name||"Image"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-ImageViewer",i)}else{var o=this.pict.parseTemplateByHash("FileBrowser-ViewImage-NoImage-Template",{Message:"No image URL available"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-ImageViewer",o)}}else{var r=this.pict.parseTemplateByHash("FileBrowser-ViewImage-NoImage-Template",{Message:"Selected file is not an image"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-ImageViewer",r)}}else{var a=this.pict.parseTemplateByHash("FileBrowser-ViewImage-NoImage-Template",{Message:"No file selected"});this.pict.ContentAssignment.assignContent("#Pict-FileBrowser-ImageViewer",a)}}}])}(i);e.exports=r,e.exports.default_configuration=o},{"pict-view":88}],76:[function(t,e,n){var i=t("pict-view"),o=t("../Pict-Section-FileBrowser-DefaultConfiguration.js"),r=t("../providers/Pict-Provider-FileBrowserBrowse.js"),a=t("../providers/Pict-Provider-FileBrowserList.js"),s=t("../providers/Pict-Provider-FileBrowserView.js"),c=t("../providers/Pict-Provider-FileBrowserLayout.js"),l=t("../providers/Pict-Provider-FileBrowserIcons.js"),d=function(t){function e(t,n,i){var d;return _classCallCheck(this,e),(d=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(o)),n),i])).pict.providers["Pict-FileBrowser-Browse"]||d.pict.addProvider("Pict-FileBrowser-Browse",r.default_configuration,r),d.pict.providers["Pict-FileBrowser-List"]||d.pict.addProvider("Pict-FileBrowser-List",a.default_configuration,a),d.pict.providers["Pict-FileBrowser-View"]||d.pict.addProvider("Pict-FileBrowser-View",s.default_configuration,s),d.pict.providers["Pict-FileBrowser-Layout"]||d.pict.addProvider("Pict-FileBrowser-Layout",c.default_configuration,c),d.pict.providers["Pict-FileBrowser-Icons"]||d.pict.addProvider("Pict-FileBrowser-Icons",l.default_configuration,l),d.ensureDefaultState(),d}return _inherits(e,t),_createClass(e,[{key:"ensureDefaultState",value:function(){var t=this.options.DefaultState||{},e=this.options.StateAddresses||{},n={AppData:this.pict.AppData,Pict:this.pict};for(var i in this.pict.AppData.PictFileBrowser||(this.pict.AppData.PictFileBrowser={}),e){var o=e[i],r=this.pict.manifest.getValueByHash(n,o);if(null==r){var a=t[i];void 0!==a&&this.pict.manifest.setValueByHash(n,o,a)}}this.pict.AppData.PictFileBrowser.FileList||(this.pict.AppData.PictFileBrowser.FileList=[]),this.pict.AppData.PictFileBrowser.FolderTree||(this.pict.AppData.PictFileBrowser.FolderTree=[])}},{key:"onAfterRender",value:function(t){return this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"getState",value:function(t){var e=(this.options.StateAddresses||{})[t];if(e)return this.pict.manifest.getValueByHash({AppData:this.pict.AppData,Pict:this.pict},e)}},{key:"setState",value:function(t,e){var n=(this.options.StateAddresses||{})[t];n&&this.pict.manifest.setValueByHash({AppData:this.pict.AppData,Pict:this.pict},n,e)}}])}(i);e.exports=d,e.exports.default_configuration=o},{"../Pict-Section-FileBrowser-DefaultConfiguration.js":62,"../providers/Pict-Provider-FileBrowserBrowse.js":64,"../providers/Pict-Provider-FileBrowserIcons.js":65,"../providers/Pict-Provider-FileBrowserLayout.js":66,"../providers/Pict-Provider-FileBrowserList.js":67,"../providers/Pict-Provider-FileBrowserView.js":68,"pict-view":88}],77:[function(t,e,n){arguments[4][45][0].apply(n,arguments)},{"./providers/Pict-Provider-Content.js":78,"./views/Pict-View-Content.js":79,dup:45}],78:[function(t,e,n){arguments[4][46][0].apply(n,arguments)},{dup:46,"pict-provider":58,"pict-section-code":61}],79:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"displayContent",value:function(t,e){var n=e||"Pict-Content-Body";this.pict.ContentAssignment.assignContent("#"+n,t);var i=document.getElementById(n);i&&i.parentElement&&(i.parentElement.scrollTop=0),this.renderMermaidDiagrams(n),this.renderKaTeXEquations(n)}},{key:"renderMermaidDiagrams",value:function(t){if("undefined"!=typeof mermaid){var e=t||"Pict-Content-Body",n=document.getElementById(e);if(n){var i=n.querySelectorAll("pre.mermaid");if(!(i.length<1))try{mermaid.run({nodes:i})}catch(t){this.log.error("Mermaid rendering error: "+t.message)}}}}},{key:"renderKaTeXEquations",value:function(t){if("undefined"!=typeof katex){var e=t||"Pict-Content-Body",n=document.getElementById(e);if(n){for(var i=n.querySelectorAll(".pict-content-katex-inline"),o=0;o<i.length;o++)try{katex.render(i[o].textContent,i[o],{throwOnError:!1,displayMode:!1})}catch(t){this.log.warn("KaTeX inline error: "+t.message)}for(var r=n.querySelectorAll(".pict-content-katex-display"),a=0;a<r.length;a++)try{katex.render(r[a].textContent,r[a],{throwOnError:!1,displayMode:!0})}catch(t){this.log.warn("KaTeX display error: "+t.message)}}}}},{key:"showLoading",value:function(t,e){var n=e||"Pict-Content-Body",i=t||"Loading content...";this.pict.ContentAssignment.assignContent("#"+n,'<div class="pict-content-loading">'+i+"</div>")}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"Pict-Content",DefaultRenderable:"Pict-Content-Display",DefaultDestinationAddress:"#Pict-Content-Container",AutoRender:!1,CSS:"\n\t\t.pict-content {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.pict-content-loading {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 200px;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.pict-content h1 {\n\t\t\tfont-size: 2em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tpadding-bottom: 0.3em;\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.pict-content h2 {\n\t\t\tfont-size: 1.5em;\n\t\t\tcolor: #3D3229;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\n\t\t\tpadding-bottom: 0.25em;\n\t\t\tmargin-top: 1.5em;\n\t\t}\n\t\t.pict-content h3 {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin-top: 1.25em;\n\t\t}\n\t\t.pict-content h4, .pict-content h5, .pict-content h6 {\n\t\t\tcolor: #5E5549;\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.pict-content p {\n\t\t\tline-height: 1.7;\n\t\t\tcolor: #423D37;\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.pict-content a {\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.pict-content a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.pict-content pre {\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 1.25em;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t.pict-content code {\n\t\t\tbackground: #F0ECE4;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #9E6B47;\n\t\t}\n\t\t.pict-content-code-wrap {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 1.5;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow: auto;\n\t\t\tmargin: 1em 0;\n\t\t\tbackground: #3D3229;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers {\n\t\t\tposition: sticky;\n\t\t\tleft: 0;\n\t\t\twidth: 40px;\n\t\t\tmin-width: 40px;\n\t\t\tpadding: 1.25em 0;\n\t\t\ttext-align: right;\n\t\t\tbackground: #342A22;\n\t\t\tborder-right: 1px solid #4A3F35;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 13px;\n\t\t\tline-height: 1.5;\n\t\t\tuser-select: none;\n\t\t\tpointer-events: none;\n\t\t\tbox-sizing: border-box;\n\t\t\tz-index: 1;\n\t\t}\n\t\t.pict-content-code-wrap .pict-content-code-line-numbers span {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0 8px 0 0;\n\t\t}\n\t\t.pict-content-code-wrap pre {\n\t\t\tmargin: 0;\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 1.25em 1.25em 1.25em 8px;\n\t\t\tborder-radius: 0 6px 6px 0;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: inherit;\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.pict-content-code-wrap pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.pict-content-code-wrap .keyword { color: #C678DD; }\n\t\t.pict-content-code-wrap .string { color: #98C379; }\n\t\t.pict-content-code-wrap .number { color: #D19A66; }\n\t\t.pict-content-code-wrap .comment { color: #7F848E; font-style: italic; }\n\t\t.pict-content-code-wrap .operator { color: #56B6C2; }\n\t\t.pict-content-code-wrap .punctuation { color: #E8E0D4; }\n\t\t.pict-content-code-wrap .function-name { color: #61AFEF; }\n\t\t.pict-content-code-wrap .property { color: #E06C75; }\n\t\t.pict-content-code-wrap .tag { color: #E06C75; }\n\t\t.pict-content-code-wrap .attr-name { color: #D19A66; }\n\t\t.pict-content-code-wrap .attr-value { color: #98C379; }\n\t\t.pict-content pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.pict-content blockquote {\n\t\t\tborder-left: 4px solid #2E7D74;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: #F7F5F0;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.pict-content blockquote p {\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.pict-content ul, .pict-content ol {\n\t\t\tpadding-left: 2em;\n\t\t\tline-height: 1.8;\n\t\t}\n\t\t.pict-content li {\n\t\t\tmargin: 0.25em 0;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid #DDD6CA;\n\t\t\tmargin: 2em 0;\n\t\t}\n\t\t.pict-content table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.pict-content table th {\n\t\t\tbackground: #F5F0E8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.pict-content table td {\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.pict-content table tr:nth-child(even) {\n\t\t\tbackground: #F7F5F0;\n\t\t}\n\t\t.pict-content img {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\t\t.pict-content pre.mermaid {\n\t\t\tbackground: #fff;\n\t\t\tcolor: #3D3229;\n\t\t\ttext-align: center;\n\t\t\tpadding: 1em;\n\t\t}\n\t\t.pict-content .pict-content-katex-display {\n\t\t\ttext-align: center;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\t\t.pict-content .pict-content-katex-inline {\n\t\t\tdisplay: inline;\n\t\t}\n\t",Templates:[{Hash:"Pict-Content-Template",Template:'\n<div class="pict-content" id="Pict-Content-Body">\n\t<div class="pict-content-loading">Loading content...</div>\n</div>\n'}],Renderables:[{RenderableHash:"Pict-Content-Display",TemplateHash:"Pict-Content-Template",DestinationAddress:"#Pict-Content-Container",RenderMethod:"replace"}]}},{"pict-view":88}],80:[function(t,e,n){e.exports.attach=function(t){t._createEditorInContainer=function(e,n,i){var o=t._codeMirrorModules,r=[];r.push(o.EditorView.domEventHandlers({keydown:function(e,i){return(e.ctrlKey||e.metaKey)&&"b"===e.key?(e.preventDefault(),t.applyFormatting(n,"bold"),!0):(e.ctrlKey||e.metaKey)&&"i"===e.key?(e.preventDefault(),t.applyFormatting(n,"italic"),!0):(e.ctrlKey||e.metaKey)&&"e"===e.key?(e.preventDefault(),t.applyFormatting(n,"code"),!0):void 0},paste:function(e,i){var o=e.clipboardData&&e.clipboardData.items;if(!o)return!1;for(var r=0;r<o.length;r++)if(o[r].type.startsWith("image/")){e.preventDefault();var a=o[r].getAsFile();return a&&t._processImageFile(a,n),!0}return!1},drop:function(e,i){if(t._dragSourceIndex>=0)return!1;if(!e.dataTransfer||!e.dataTransfer.files||e.dataTransfer.files.length<1)return!1;var o=e.dataTransfer.files[0];if(o.type&&o.type.startsWith("image/")){e.preventDefault(),e.stopPropagation(),t._processImageFile(o,n);var r=i.dom.closest(".pict-mde-segment-editor");return r&&r.classList.remove("pict-mde-image-dragover"),!0}return!1}})),o.extensions&&Array.isArray(o.extensions)&&(r=r.concat(o.extensions)),r.push(o.EditorView.updateListener.of(function(e){e.docChanged&&t._onSegmentContentChange(n,e.state.doc.toString()),e.focusChanged&&(e.view.hasFocus?(t._setActiveSegment(n),t._updateSidebarPosition(n)):setTimeout(function(){if(t._activeSegmentIndex===n){var e=document.getElementById("PictMDE-Segment-".concat(n));e&&!e.contains(document.activeElement)&&(t._clearActiveSegment(n),t._resetSidebarPosition(n))}},100)),e.selectionSet&&e.view.hasFocus&&t._updateSidebarPosition(n)}));var a=t._buildDataURICollapseExtension();a&&r.push(a),t.options.ReadOnly&&(r.push(o.EditorState.readOnly.of(!0)),r.push(o.EditorView.editable.of(!1))),r=t.customConfigureExtensions(r,n);var s=o.EditorState.create({doc:i||"",extensions:r}),c=new o.EditorView({state:s,parent:e});t._segmentEditors[n]=c,c.contentDOM.addEventListener("keydown",function(e){if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&!(e.shiftKey||e.ctrlKey||e.metaKey||e.altKey)){var i=c.state,o=i.selection.main.head,r=i.doc.lineAt(o),a=o-r.from;if("ArrowDown"===e.key){if(r.to<i.doc.length)return;var s=t._getOrderedSegmentIndices(),l=t._getLogicalIndex(n);if(l<0||l>=s.length-1)return;var d=s[l+1],p=t._segmentEditors[d];if(!p)return;e.preventDefault(),e.stopPropagation();var u=p.state.doc.line(1),h=Math.min(a,u.to-u.from);p.focus(),p.dispatch({selection:{anchor:u.from+h}}),t._setActiveSegment(d)}else if("ArrowUp"===e.key){if(r.number>1)return;var f=t._getOrderedSegmentIndices(),v=t._getLogicalIndex(n);if(v<=0)return;var g=f[v-1],m=t._segmentEditors[g];if(!m)return;e.preventDefault(),e.stopPropagation();var y=m.state.doc.line(m.state.doc.lines),b=Math.min(a,y.to-y.from);m.focus(),m.dispatch({selection:{anchor:y.from+b}}),t._setActiveSegment(g)}}},!0),c.contentDOM.addEventListener("drop",function(e){if(!(t._dragSourceIndex>=0)&&e.dataTransfer&&e.dataTransfer.files&&!(e.dataTransfer.files.length<1)){var i=e.dataTransfer.files[0];if(i.type&&i.type.startsWith("image/")){e.preventDefault(),e.stopPropagation(),t._processImageFile(i,n);var o=document.getElementById("PictMDE-SegmentEditor-".concat(n));o&&o.classList.remove("pict-mde-image-dragover")}}},!0)},t._buildDataURICollapseExtension=function(){var e=t._codeMirrorModules;if(!(e&&e.Decoration&&e.ViewPlugin&&e.WidgetType))return null;var n=e.Decoration,i=e.ViewPlugin,o=e.WidgetType,r=function(t){function e(t){var n;return _classCallCheck(this,e),(n=_callSuper(this,e)).label=t,n}return _inherits(e,t),_createClass(e,[{key:"toDOM",value:function(){var t=document.createElement("span");return t.className="pict-mde-data-uri-collapsed",t.textContent=this.label,t.title="Data URI (click to expand in image preview below)",t}},{key:"eq",value:function(t){return this.label===t.label}}])}(o);function a(t){var e,i=[],o=t.state.doc,a=_createForOfIteratorHelper(t.visibleRanges);try{for(a.s();!(e=a.n()).done;)for(var s=e.value,c=s.from,l=s.to,d=o.sliceString(c,l),p=/!\[[^\]]*\]\(data:([^;]+);base64,/g,u=void 0;null!==(u=p.exec(d));){for(var h=c+u.index+u[0].length,f=-1,v=h,g=o.length,m=Math.min(g,v+5242880),y=v;y<m;y+=4096){var b=Math.min(y+4096,m),w=o.sliceString(y,b).indexOf(")");if(w>=0){f=y+w;break}}if(!(f<0)){var C=f-h;if(!(C<200)){var x=Math.round(.75*C),A=void 0;A=x>=1048576?(x/1048576).toFixed(1)+"MB":x>=1024?Math.round(x/1024)+"KB":x+"B";u[1];var D="…".concat(A,")"),k=n.replace({widget:new r(D)});i.push(k.range(h,f+1))}}}}catch(t){a.e(t)}finally{a.f()}return n.set(i,!0)}return i.fromClass(function(){return _createClass(function t(e){_classCallCheck(this,t),this.decorations=a(e)},[{key:"update",value:function(t){(t.docChanged||t.viewportChanged)&&(this.decorations=a(t.view))}}])}(),{decorations:function(t){return t.decorations}})}}},{}],81:[function(t,e,n){e.exports.attach=function(t){t._wireSegmentDragEvents=function(e,n){var i=e.querySelector(".pict-mde-drag-handle");i&&(i.addEventListener("dragstart",function(i){t._dragSourceIndex=n,i.dataTransfer.effectAllowed="move",i.dataTransfer.setData("text/plain",String(n));var o=t._getContainerElement();o&&o.classList.add("pict-mde-dragging"),setTimeout(function(){e.style.opacity="0.4"},0)}),i.addEventListener("dragend",function(){e.style.opacity="",t._dragSourceIndex=-1,t._clearAllDropIndicators();var n=t._getContainerElement();n&&n.classList.remove("pict-mde-dragging")}),e.addEventListener("dragover",function(n){n.preventDefault(),n.dataTransfer.dropEffect="move",t._clearAllDropIndicators();var i=e.getBoundingClientRect(),o=i.top+i.height/2;n.clientY<o?e.classList.add("pict-mde-drag-over-top"):e.classList.add("pict-mde-drag-over-bottom")}),e.addEventListener("dragleave",function(t){e.contains(t.relatedTarget)||(e.classList.remove("pict-mde-drag-over-top"),e.classList.remove("pict-mde-drag-over-bottom"))}),e.addEventListener("drop",function(i){i.preventDefault();var o=e.classList.contains("pict-mde-drag-over-bottom");t._clearAllDropIndicators();var r=t._dragSourceIndex;r<0||r===n||t._reorderSegment(r,n,o)}))},t._clearAllDropIndicators=function(){var e=t._getContainerElement();if(e)for(var n=e.querySelectorAll(".pict-mde-segment"),i=0;i<n.length;i++)n[i].classList.remove("pict-mde-drag-over-top"),n[i].classList.remove("pict-mde-drag-over-bottom")},t._reorderSegment=function(e,n,i){var o=t._getLogicalIndex(e),r=t._getLogicalIndex(n);if(o<0||r<0)t.log.warn("PICT-MarkdownEditor _reorderSegment: could not resolve logical indices (from=".concat(o,", to=").concat(r,")."));else if(o!==r){t._marshalAllEditorsToData();var a=t._getSegmentsFromData();if(a&&!(a.length<2)){var s=i?r+1:r;if(o<s&&s--,s!==o){var c=a.splice(o,1)[0];a.splice(s,0,c),t._setSegmentsToData(a),t._reorderHiddenPreviewState(o,s),t._reorderSegmentTabStates(o,s),t._buildEditorUI()}}}},t._reorderHiddenPreviewState=function(e,n){if(e!==n){var i=Object.keys(t._hiddenPreviewSegments).map(function(t){return parseInt(t,10)});if(0!==i.length){for(var o=Math.max.apply(Math,_toConsumableArray(i).concat([e,n])),r=[],a=0;a<=o;a++)r.push(!!t._hiddenPreviewSegments[a]);var s=r.splice(e,1)[0];r.splice(n,0,s),t._hiddenPreviewSegments={};for(var c=0;c<r.length;c++)r[c]&&(t._hiddenPreviewSegments[c]=!0)}}},t._swapHiddenPreviewState=function(e,n){var i=!!t._hiddenPreviewSegments[e];!!t._hiddenPreviewSegments[n]?t._hiddenPreviewSegments[e]=!0:delete t._hiddenPreviewSegments[e],i?t._hiddenPreviewSegments[n]=!0:delete t._hiddenPreviewSegments[n]},t._reorderSegmentTabStates=function(e,n){if(e!==n){var i=Object.keys(t._segmentTabStates).map(function(t){return parseInt(t,10)});if(0!==i.length){for(var o=Math.max.apply(Math,_toConsumableArray(i).concat([e,n])),r=[],a=0;a<=o;a++)r.push(t._segmentTabStates[a]||"editor");var s=r.splice(e,1)[0];r.splice(n,0,s),t._segmentTabStates={};for(var c=0;c<r.length;c++)"editor"!==r[c]&&(t._segmentTabStates[c]=r[c])}}},t._swapSegmentTabStates=function(e,n){var i=t._segmentTabStates[e]||"editor",o=t._segmentTabStates[n]||"editor";"editor"!==o?t._segmentTabStates[e]=o:delete t._segmentTabStates[e],"editor"!==i?t._segmentTabStates[n]=i:delete t._segmentTabStates[n]},t._setActiveSegment=function(e){if(t._activeSegmentIndex>=0&&t._activeSegmentIndex!==e){var n=document.getElementById("PictMDE-Segment-".concat(t._activeSegmentIndex));n&&n.classList.remove("pict-mde-active")}t._activeSegmentIndex=e;var i=document.getElementById("PictMDE-Segment-".concat(e));i&&i.classList.add("pict-mde-active")},t._clearActiveSegment=function(e){t._activeSegmentIndex===e&&(t._activeSegmentIndex=-1);var n=document.getElementById("PictMDE-Segment-".concat(e));n&&n.classList.remove("pict-mde-active"),t._resetSidebarPosition(e)},t._updateSidebarPosition=function(e){var n=document.getElementById("PictMDE-Segment-".concat(e));if(n){var i=n.querySelector(".pict-mde-quadrant-tr");if(i){var o=t._segmentEditors[e];if(o){var r=o.state.selection.main.head,a=o.coordsAtPos(r);if(a){var s=n.getBoundingClientRect(),c=a.top-s.top,l=i.offsetHeight||0,d=n.offsetHeight||0,p=Math.max(0,d-l);c=Math.max(0,Math.min(c,p)),i.classList.add("pict-mde-sidebar-at-cursor"),i.style.setProperty("--pict-mde-sidebar-top","".concat(c,"px"))}else t._resetSidebarPosition(e)}}}},t._resetSidebarPosition=function(t){var e=document.getElementById("PictMDE-Segment-".concat(t));if(e){var n=e.querySelector(".pict-mde-quadrant-tr");n&&(n.classList.remove("pict-mde-sidebar-at-cursor"),n.style.removeProperty("--pict-mde-sidebar-top"))}}}},{}],82:[function(t,e,n){var i={bold:{wrap:"**"},italic:{wrap:"*"},code:{wrap:"`"},heading:{prefix:"# "},link:{before:"[",after:"](url)"}};e.exports.attach=function(t){t.applyFormatting=function(e,n){var o=t._segmentEditors[e];if(o){var r=i[n];if(r){var a,s,c=o.state,l=c.selection.main,d=l.from,p=l.to,u=d!==p,h=u?c.sliceDoc(d,p):"";if(r.wrap){var f=r.wrap;if(u){var v=c.sliceDoc(Math.max(0,d-f.length),d),g=c.sliceDoc(p,Math.min(c.doc.length,p+f.length));if(v===f&&g===f)return a=[{from:d-f.length,to:d,insert:""},{from:p,to:p+f.length,insert:""}],s=d-f.length,void o.dispatch({changes:a,selection:{anchor:s,head:s+h.length}});a={from:d,to:p,insert:f+h+f},s=d+f.length,o.dispatch({changes:a,selection:{anchor:s,head:s+h.length}})}else{a={from:d,insert:f+f},s=d+f.length,o.dispatch({changes:a,selection:{anchor:s}})}}else if(r.prefix){var m=c.doc.lineAt(d);a=m.text.startsWith(r.prefix)?{from:m.from,to:m.from+r.prefix.length,insert:""}:{from:m.from,insert:r.prefix},o.dispatch({changes:a})}else if(r.before&&r.after){if(u)a={from:d,to:p,insert:r.before+h+r.after},s=d+r.before.length+h.length+2,o.dispatch({changes:a,selection:{anchor:s,head:s+3}});else a={from:d,insert:r.before+r.after},s=d+r.before.length,o.dispatch({changes:a,selection:{anchor:s}})}o.focus()}else t.log.warn('PICT-MarkdownEditor applyFormatting: unknown format type "'.concat(n,'".'))}else t.log.warn("PICT-MarkdownEditor applyFormatting: no editor for segment ".concat(e,"."))}}},{}],83:[function(t,e,n){e.exports.attach=function(t){t.openImagePicker=function(e){var n=document.getElementById("PictMDE-ImageInput-".concat(e));n?(n.onchange=function(){n.files&&n.files.length>0&&t._processImageFile(n.files[0],e),n.value=""},n.click()):t.log.warn("PICT-MarkdownEditor openImagePicker: file input not found for segment ".concat(e,"."))},t._processImageFile=function(e,n){if(e&&e.type&&e.type.startsWith("image/")){var i=e.name?e.name.replace(/\.[^.]+$/,""):"image";if(!t.onImageUpload(e,n,function(e,o){e?t.log.error("PICT-MarkdownEditor image upload error: ".concat(e)):o&&t._insertImageMarkdown(n,o,i)}))if("undefined"!=typeof FileReader){var o=new FileReader;o.onload=function(){t._insertImageMarkdown(n,o.result,i)},o.onerror=function(){t.log.error("PICT-MarkdownEditor _processImageFile: FileReader error.")},o.readAsDataURL(e)}else t.log.error("PICT-MarkdownEditor _processImageFile: FileReader not available in this environment.")}else t.log.warn("PICT-MarkdownEditor _processImageFile: not an image file (type: ".concat(e?e.type:"null",")."))},t._insertImageMarkdown=function(e,n,i){var o=t._segmentEditors[e];if(o){var r=".concat(n,")"),a=o.state.selection.main.head;o.dispatch({changes:{from:a,insert:r},selection:{anchor:a+r.length}}),o.focus(),t._updateImagePreviews(e)}else t.log.warn("PICT-MarkdownEditor _insertImageMarkdown: no editor for segment ".concat(e,"."))},t._updateImagePreviews=function(e){var n=document.getElementById("PictMDE-ImagePreview-".concat(e));if(n){var i=t._segmentEditors[e];if(!i)return n.innerHTML="",void n.classList.remove("pict-mde-has-images");for(var o,r=i.state.doc.toString(),a=/!\[([^\]]*)\]\(([^)]+)\)/g,s=[];null!==(o=a.exec(r));)s.push({alt:o[1]||"image",url:o[2]});if(0===s.length)return n.innerHTML="",void n.classList.remove("pict-mde-has-images");for(var c="",l=0;l<s.length;l++){var d=s[l].alt.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),p=t._resolveImageURL(s[l].url).replace(/&/g,"&").replace(/"/g,""");c+='<div class="pict-mde-image-preview-item"><img src="'.concat(p,'" alt="').concat(d,'" /><span class="pict-mde-image-preview-label">').concat(d,"</span></div>")}n.innerHTML=c,n.classList.add("pict-mde-has-images")}},t._wireImageDragEvents=function(e,n){e.addEventListener("dragover",function(n){t._dragSourceIndex>=0||!n.dataTransfer||!n.dataTransfer.types||n.dataTransfer.types.indexOf("Files")<0||(n.preventDefault(),n.dataTransfer.dropEffect="copy",e.classList.add("pict-mde-image-dragover"))}),e.addEventListener("dragleave",function(t){e.contains(t.relatedTarget)||e.classList.remove("pict-mde-image-dragover")}),e.addEventListener("drop",function(i){if(e.classList.remove("pict-mde-image-dragover"),!(t._dragSourceIndex>=0)&&i.dataTransfer&&i.dataTransfer.files&&!(i.dataTransfer.files.length<1)){var o=i.dataTransfer.files[0];o.type&&o.type.startsWith("image/")&&(i.preventDefault(),i.stopPropagation(),t._processImageFile(o,n))}})}}},{}],84:[function(t,e,n){var i=t("pict-section-content").PictContentProvider;e.exports.attach=function(t){t._getContentProvider=function(){return t._contentProvider||(t._contentProvider=new i(t.fable,{},"Pict-Content-Provider-MDE")),t._contentProvider},t._updateRichPreviews=function(e){if(t.options.EnableRichPreview){var n=document.getElementById("PictMDE-RichPreview-".concat(e));if(n){var i=t._segmentEditors[e];if(!i)return n.innerHTML="",void n.classList.remove("pict-mde-has-rich-preview");var o=i.state.doc.toString();if(!o||0===o.trim().length)return n.innerHTML="",void n.classList.remove("pict-mde-has-rich-preview");var r=t._getContentProvider().parseMarkdown(o);if(!r||0===r.trim().length)return n.innerHTML="",void n.classList.remove("pict-mde-has-rich-preview");var a="PictMDE-RichPreviewBody-".concat(e);if(n.innerHTML='<div class="pict-content" id="'.concat(a,'">').concat(r,"</div>"),n.classList.add("pict-mde-has-rich-preview"),t.options.ImageBaseURL)for(var s=n.querySelectorAll("img"),c=0;c<s.length;c++){var l=s[c].getAttribute("src");if(l){var d=t._resolveImageURL(l);d!==l&&s[c].setAttribute("src",d)}}var p=(t._richPreviewGenerations[e]||0)+1;t._richPreviewGenerations[e]=p,t._postRenderMermaid(a,e,p),t._postRenderKaTeX(a)}}},t._postRenderMermaid=function(e,n,i){if("undefined"!=typeof mermaid){var o=document.getElementById(e);if(o){var r=o.querySelectorAll("pre.mermaid");if(!(r.length<1))try{var a=mermaid.run({nodes:r});a&&"function"==typeof a.catch&&a.catch(function(e){(-1===n?t._renderedViewGeneration:t._richPreviewGenerations[n])===i&&t.log.warn("PICT-MarkdownEditor mermaid render error: ".concat(e.message||e))})}catch(e){t.log.warn("PICT-MarkdownEditor mermaid render error: ".concat(e.message||e))}}}},t._postRenderKaTeX=function(e){if("undefined"!=typeof katex){var n=document.getElementById(e);if(n){for(var i=n.querySelectorAll(".pict-content-katex-inline"),o=0;o<i.length;o++)try{katex.render(i[o].textContent,i[o],{throwOnError:!1,displayMode:!1})}catch(e){t.log.warn("PICT-MarkdownEditor KaTeX inline error: ".concat(e.message||e))}for(var r=n.querySelectorAll(".pict-content-katex-display"),a=0;a<r.length;a++)try{katex.render(r[a].textContent,r[a],{throwOnError:!1,displayMode:!0})}catch(e){t.log.warn("PICT-MarkdownEditor KaTeX display error: ".concat(e.message||e))}}}},t._escapeHTMLForPreview=function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},t.toggleRenderedView=function(e){t._renderedViewActive="boolean"==typeof e?e:!t._renderedViewActive,t._renderedViewActive?t._renderRenderedView():t._restoreEditingView()},t._renderRenderedView=function(){var e=t._getContainerElement();if(e){t._marshalAllEditorsToData();var n=t._getSegmentsFromData(),i="";if(n&&n.length>0){for(var o=[],r=0;r<n.length;r++)o.push(n[r].Content||"");i=o.join("\n\n")}for(var a in t._segmentEditors)t._segmentEditors[a]&&t._segmentEditors[a].destroy();t._segmentEditors={};var s=t._getContentProvider().parseMarkdown(i),c="PictMDE-RenderedView";if(e.innerHTML='<div class="pict-mde-rendered-view" id="'.concat(c,'"><div class="pict-content">').concat(s||"","</div></div>"),e.classList.add("pict-mde-rendered-mode"),t.options.ImageBaseURL)for(var l=e.querySelectorAll(".pict-mde-rendered-view img"),d=0;d<l.length;d++){var p=l[d].getAttribute("src");if(p){var u=t._resolveImageURL(p);u!==p&&l[d].setAttribute("src",u)}}t._renderedViewGeneration++;var h=t._renderedViewGeneration,f=e.querySelector("#".concat(c," .pict-content"));if(f){var v="PictMDE-RenderedViewContent";f.id=v,t._postRenderMermaid(v,-1,h),t._postRenderKaTeX(v)}}},t._restoreEditingView=function(){var e=t._getContainerElement();e&&(e.classList.remove("pict-mde-rendered-mode"),t._buildEditorUI())}}},{"pict-section-content":77}],85:[function(t,e,n){e.exports={DefaultRenderable:"MarkdownEditor-Wrap",DefaultDestinationAddress:"#MarkdownEditor-Container-Div",Templates:[{Hash:"MarkdownEditor-Container",Template:'<div class="pict-mde" id="PictMDE-Container"></div>'},{Hash:"MarkdownEditor-Segment",Template:'<div class="pict-mde-segment" id="PictMDE-Segment-{~D:Record.SegmentIndex~}" data-segment-index="{~D:Record.SegmentIndex~}">\n\t<div class="pict-mde-left-controls">\n\t\t<div class="pict-mde-quadrant-tl"></div>\n\t\t<div class="pict-mde-quadrant-bl"></div>\n\t</div>\n\t<div class="pict-mde-drag-handle" draggable="true" title="Drag to reorder"></div>\n\t<div class="pict-mde-segment-body">\n\t\t<div class="pict-mde-tab-bar" id="PictMDE-TabBar-{~D:Record.SegmentIndex~}">\n\t\t\t<button type="button" class="pict-mde-tab pict-mde-tab-active" data-tab="editor" onclick="{~D:Record.ViewIdentifier~}.switchSegmentTab({~D:Record.SegmentIndex~}, \'editor\')">Edit</button>\n\t\t\t<button type="button" class="pict-mde-tab" data-tab="preview" onclick="{~D:Record.ViewIdentifier~}.switchSegmentTab({~D:Record.SegmentIndex~}, \'preview\')">Preview</button>\n\t\t</div>\n\t\t<div class="pict-mde-segment-editor" id="PictMDE-SegmentEditor-{~D:Record.SegmentIndex~}"></div>\n\t\t<div class="pict-mde-preview-pane" id="PictMDE-PreviewPane-{~D:Record.SegmentIndex~}">\n\t\t\t<div class="pict-mde-image-preview" id="PictMDE-ImagePreview-{~D:Record.SegmentIndex~}"></div>\n\t\t\t<div class="pict-mde-rich-preview" id="PictMDE-RichPreview-{~D:Record.SegmentIndex~}"></div>\n\t\t</div>\n\t</div>\n\t<div class="pict-mde-sidebar" id="PictMDE-Sidebar-{~D:Record.SegmentIndex~}">\n\t\t<div class="pict-mde-quadrant-tr"></div>\n\t\t<div class="pict-mde-quadrant-br"></div>\n\t\t<input type="file" accept="image/*" class="pict-mde-image-input" id="PictMDE-ImageInput-{~D:Record.SegmentIndex~}" style="display:none" />\n\t</div>\n</div>'},{Hash:"MarkdownEditor-AddSegment",Template:'<div class="pict-mde-add-segment">\n\t<button type="button" class="pict-mde-btn-add" onclick="{~D:Record.ViewIdentifier~}.addSegment()">+ Add Segment</button>\n</div>'}],Renderables:[{RenderableHash:"MarkdownEditor-Wrap",TemplateHash:"MarkdownEditor-Container",DestinationAddress:"#MarkdownEditor-Container-Div"}],TargetElementAddress:"#MarkdownEditor-Container-Div",ContentDataAddress:!1,ReadOnly:!1,EnableRichPreview:!0,DefaultPreviewMode:"off",ImageBaseURL:"",ButtonsTL:[{HTML:"×",Action:"removeSegment",Class:"pict-mde-btn-remove",Title:"Remove Segment"}],ButtonsBL:[{HTML:"↑",Action:"moveSegmentUp",Class:"pict-mde-btn-move",Title:"Move Up"},{HTML:"↓",Action:"moveSegmentDown",Class:"pict-mde-btn-move",Title:"Move Down"},{HTML:"⊞",Action:"toggleControls",Class:"pict-mde-btn-linenums",Title:"Toggle Controls"},{HTML:"◎",Action:"cyclePreviewMode",Class:"pict-mde-btn-preview",Title:"Cycle Preview Mode"}],ButtonsTR:[{HTML:"<b>B</b>",Action:"applyFormatting:bold",Class:"",Title:"Bold (Ctrl+B)"},{HTML:"<i>I</i>",Action:"applyFormatting:italic",Class:"",Title:"Italic (Ctrl+I)"},{HTML:"<code><></code>",Action:"applyFormatting:code",Class:"",Title:"Inline Code (Ctrl+E)"},{HTML:"#",Action:"applyFormatting:heading",Class:"",Title:"Heading"},{HTML:"[ ]",Action:"applyFormatting:link",Class:"",Title:"Link"},{HTML:"▣",Action:"openImagePicker",Class:"pict-mde-sidebar-btn-image",Title:"Insert Image"}],ButtonsBR:[],CSS:"\n/* ---- Container ---- */\n.pict-mde\n{\n\tfont-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;\n\tfont-size: 14px;\n}\n\n/* ---- Segment row: left-controls | drag-handle | editor body | sidebar ---- */\n.pict-mde-segment\n{\n\tposition: relative;\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: stretch;\n\tmargin-bottom: 6px;\n\tmin-height: 48px;\n\ttransition: background-color 0.15s ease;\n}\n\n/* ---- Left controls column ---- */\n.pict-mde-left-controls\n{\n\tflex: 0 0 22px;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tjustify-content: space-between;\n\tpadding: 2px 0;\n}\n\n/* ---- Left-side quadrants ---- */\n.pict-mde-quadrant-tl\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tposition: sticky;\n\ttop: 2px;\n\tz-index: 2;\n}\n.pict-mde-quadrant-bl\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: 1px;\n\tposition: sticky;\n\tbottom: 2px;\n\tz-index: 2;\n}\n\n/* ---- Left-side buttons (shared base) ---- */\n.pict-mde-left-btn\n{\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 20px;\n\theight: 20px;\n\tborder: none;\n\tbackground: transparent;\n\tcursor: pointer;\n\tfont-size: 12px;\n\tpadding: 0;\n\tcolor: #888;\n\tline-height: 1;\n\tfont-family: inherit;\n\topacity: 0;\n\ttransition: opacity 0.15s ease;\n}\n.pict-mde-segment:hover .pict-mde-left-btn,\n.pict-mde-segment.pict-mde-active .pict-mde-left-btn\n{\n\topacity: 1;\n}\n.pict-mde-left-btn:hover\n{\n\tcolor: #222;\n}\n.pict-mde-btn-remove:hover\n{\n\tcolor: #CC3333;\n}\n.pict-mde-btn-linenums\n{\n\tfont-size: 11px;\n\tfont-weight: 600;\n\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', monospace;\n}\n/* Highlight when controls are active */\n.pict-mde.pict-mde-controls-on .pict-mde-btn-linenums\n{\n\tcolor: #4A90D9;\n}\n.pict-mde-btn-preview\n{\n\tfont-size: 11px;\n}\n/* Preview button: highlight when any preview mode is active */\n.pict-mde.pict-mde-preview-bottom .pict-mde-btn-preview,\n.pict-mde.pict-mde-preview-side .pict-mde-btn-preview,\n.pict-mde.pict-mde-preview-tabbed .pict-mde-btn-preview\n{\n\tcolor: #4A90D9;\n}\n/* Dim preview button when mode is off */\n.pict-mde.pict-mde-preview-off .pict-mde-btn-preview\n{\n\tcolor: #CCC;\n}\n\n/* ---- Drag handle (simple grey bar) ---- */\n.pict-mde-drag-handle\n{\n\tflex: 0 0 8px;\n\tcursor: grab;\n\tbackground: #EDEDED;\n\ttransition: background-color 0.15s ease;\n\tuser-select: none;\n}\n.pict-mde-drag-handle:active\n{\n\tcursor: grabbing;\n}\n.pict-mde-drag-handle:hover\n{\n\tbackground: #C8C8C8;\n}\n\n/* ---- Editor body (middle column) ---- */\n.pict-mde-segment-body\n{\n\tflex: 1 1 0%;\n\tmin-width: 0;\n\toverflow: hidden;\n\tbackground: #FFFFFF;\n\ttransition: background-color 0.15s ease;\n}\n.pict-mde-segment-editor\n{\n\tmin-height: 48px;\n}\n\n/* ---- Image preview area below the editor ---- */\n.pict-mde-image-preview\n{\n\tdisplay: none;\n}\n.pict-mde-image-preview.pict-mde-has-images\n{\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 8px;\n\tpadding: 8px 12px;\n\tborder-top: 1px solid #EDEDED;\n}\n.pict-mde-image-preview img\n{\n\tmax-width: 200px;\n\tmax-height: 150px;\n\tborder-radius: 3px;\n\tborder: 1px solid #E0E0E0;\n\tobject-fit: contain;\n\tbackground: #F8F8F8;\n}\n.pict-mde-image-preview-item\n{\n\tposition: relative;\n\tdisplay: inline-block;\n}\n.pict-mde-image-preview-label\n{\n\tdisplay: block;\n\tfont-size: 10px;\n\tcolor: #999;\n\tmargin-top: 2px;\n\tmax-width: 200px;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n/* ---- Rich content preview area (rendered via pict-section-content) ---- */\n.pict-mde-rich-preview\n{\n\tdisplay: none;\n}\n.pict-mde-rich-preview.pict-mde-has-rich-preview\n{\n\tdisplay: block;\n\tborder-top: 1px solid #EDEDED;\n\tbackground: #FCFCFC;\n\toverflow: hidden;\n}\n/* Constrain images in the rich preview even if pict-section-content CSS loads late */\n.pict-mde-rich-preview img\n{\n\tmax-width: 100%;\n\theight: auto;\n}\n/* ---- Preview layout modes ---- */\n\n/* Tab bar: hidden by default, shown only in tabbed mode */\n.pict-mde-tab-bar\n{\n\tdisplay: none;\n}\n.pict-mde.pict-mde-preview-tabbed .pict-mde-tab-bar\n{\n\tdisplay: flex;\n\tgap: 0;\n\tborder-bottom: 1px solid #EDEDED;\n\tbackground: #F8F8F8;\n}\n.pict-mde-tab\n{\n\tpadding: 4px 12px;\n\tborder: none;\n\tbackground: transparent;\n\tcursor: pointer;\n\tfont-size: 12px;\n\tcolor: #888;\n\tborder-bottom: 2px solid transparent;\n\tfont-family: inherit;\n}\n.pict-mde-tab:hover\n{\n\tcolor: #222;\n}\n.pict-mde-tab.pict-mde-tab-active\n{\n\tcolor: #4A90D9;\n\tborder-bottom-color: #4A90D9;\n}\n\n/* Off mode: hide all preview panes and tab bars */\n.pict-mde.pict-mde-preview-off .pict-mde-preview-pane\n{\n\tdisplay: none;\n}\n.pict-mde.pict-mde-preview-off .pict-mde-tab-bar\n{\n\tdisplay: none;\n}\n/* Legacy class alias for backward compatibility */\n.pict-mde.pict-mde-previews-hidden .pict-mde-preview-pane\n{\n\tdisplay: none;\n}\n\n/* Bottom mode: vertical stacking (default flex-column behavior) */\n.pict-mde.pict-mde-preview-bottom .pict-mde-segment-body\n{\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n/* Side-by-side mode: editor and preview side by side */\n.pict-mde.pict-mde-preview-side .pict-mde-segment-body\n{\n\tdisplay: flex;\n\tflex-direction: row;\n}\n.pict-mde.pict-mde-preview-side .pict-mde-segment-editor\n{\n\tflex: 1 1 50%;\n\tmin-width: 0;\n\toverflow: hidden;\n}\n.pict-mde.pict-mde-preview-side .pict-mde-preview-pane\n{\n\tflex: 1 1 50%;\n\tmin-width: 0;\n\toverflow: auto;\n\tborder-left: 1px solid #EDEDED;\n}\n/* Side-by-side: remove top borders since preview is beside, not below */\n.pict-mde.pict-mde-preview-side .pict-mde-rich-preview.pict-mde-has-rich-preview\n{\n\tborder-top: none;\n}\n.pict-mde.pict-mde-preview-side .pict-mde-image-preview.pict-mde-has-images\n{\n\tborder-top: none;\n}\n\n/* Tabbed mode: default hides preview, shows editor */\n.pict-mde.pict-mde-preview-tabbed .pict-mde-segment-body\n{\n\tdisplay: flex;\n\tflex-direction: column;\n}\n.pict-mde.pict-mde-preview-tabbed .pict-mde-preview-pane\n{\n\tdisplay: none;\n}\n/* Tabbed mode: when showing preview, hide editor and show preview */\n.pict-mde.pict-mde-preview-tabbed .pict-mde-segment.pict-mde-tab-showing-preview .pict-mde-segment-editor\n{\n\tdisplay: none;\n}\n.pict-mde.pict-mde-preview-tabbed .pict-mde-segment.pict-mde-tab-showing-preview .pict-mde-preview-pane\n{\n\tdisplay: block;\n}\n\n/* Per-segment preview hide: only applies in bottom and side modes */\n.pict-mde.pict-mde-preview-bottom .pict-mde-segment.pict-mde-preview-hidden .pict-mde-preview-pane,\n.pict-mde.pict-mde-preview-side .pict-mde-segment.pict-mde-preview-hidden .pict-mde-preview-pane\n{\n\tdisplay: none;\n}\n/* Constrain the pict-content inside the preview to fit the segment */\n.pict-mde-rich-preview .pict-content\n{\n\tpadding: 12px;\n\tmax-width: none;\n\tmargin: 0;\n\tfont-size: 13px;\n}\n/* Reduce heading sizes in the preview to be proportional */\n.pict-mde-rich-preview .pict-content h1\n{\n\tfont-size: 1.4em;\n\tmargin-top: 0;\n}\n.pict-mde-rich-preview .pict-content h2\n{\n\tfont-size: 1.2em;\n\tmargin-top: 0.75em;\n}\n.pict-mde-rich-preview .pict-content h3\n{\n\tfont-size: 1.1em;\n\tmargin-top: 0.6em;\n}\n\n/* ---- Rendered view (full document preview mode) ---- */\n.pict-mde-rendered-view\n{\n\tpadding: 16px 20px;\n\tbackground: #FFFFFF;\n\tmin-height: 120px;\n}\n.pict-mde-rendered-view .pict-content\n{\n\tmax-width: none;\n\tmargin: 0;\n}\n/* Hide the add-segment button in rendered mode */\n.pict-mde.pict-mde-rendered-mode .pict-mde-add-segment\n{\n\tdisplay: none;\n}\n\n/* Focused / active editor gets subtle warm background */\n.pict-mde-segment.pict-mde-active .pict-mde-segment-body\n{\n\tbackground: #FAFAF5;\n}\n.pict-mde-segment.pict-mde-active .pict-mde-drag-handle\n{\n\tbackground: #9CB4C8;\n}\n\n/* ---- Right sidebar column ---- */\n.pict-mde-sidebar\n{\n\tflex: 0 0 30px;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: flex-start;\n\tjustify-content: space-between;\n\tposition: relative;\n}\n\n/* ---- Right-side quadrants ---- */\n.pict-mde-quadrant-tr\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: 1px;\n\tpadding: 4px 0;\n\twidth: 100%;\n\topacity: 0;\n\ttransition: opacity 0.15s ease, top 0.1s ease;\n\tposition: sticky;\n\ttop: 0;\n}\n.pict-mde-quadrant-br\n{\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: 1px;\n\tpadding: 4px 0;\n\twidth: 100%;\n\topacity: 0;\n\ttransition: opacity 0.15s ease;\n\tposition: sticky;\n\tbottom: 0;\n}\n\n/* Active segment always shows its right-side quadrants */\n.pict-mde-segment.pict-mde-active .pict-mde-quadrant-tr,\n.pict-mde-segment.pict-mde-active .pict-mde-quadrant-br\n{\n\topacity: 1;\n}\n/* When no segment is active, hovering shows both left + right controls */\n.pict-mde:not(:has(.pict-mde-active)) .pict-mde-segment:hover .pict-mde-quadrant-tr,\n.pict-mde:not(:has(.pict-mde-active)) .pict-mde-segment:hover .pict-mde-quadrant-br\n{\n\topacity: 1;\n}\n\n/* ---- Controls-hidden mode: right quadrants show faintly on hover ---- */\n.pict-mde.pict-mde-controls-hidden .pict-mde-quadrant-tr,\n.pict-mde.pict-mde-controls-hidden .pict-mde-quadrant-br\n{\n\topacity: 0;\n}\n.pict-mde.pict-mde-controls-hidden .pict-mde-segment:hover .pict-mde-quadrant-tr,\n.pict-mde.pict-mde-controls-hidden .pict-mde-segment:hover .pict-mde-quadrant-br\n{\n\topacity: 0.3;\n}\n.pict-mde.pict-mde-controls-hidden .pict-mde-segment.pict-mde-active .pict-mde-quadrant-tr,\n.pict-mde.pict-mde-controls-hidden .pict-mde-segment.pict-mde-active .pict-mde-quadrant-br\n{\n\topacity: 0.3;\n}\n\n/* When JS sets a cursor-relative offset, switch TR from sticky to absolute positioning */\n.pict-mde-quadrant-tr.pict-mde-sidebar-at-cursor\n{\n\tposition: absolute;\n\ttop: var(--pict-mde-sidebar-top, 0px);\n}\n\n/* ---- Right-side buttons (shared base) ---- */\n.pict-mde-sidebar-btn\n{\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 24px;\n\theight: 22px;\n\tborder: none;\n\tbackground: transparent;\n\tcursor: pointer;\n\tfont-size: 12px;\n\tpadding: 0;\n\tborder-radius: 3px;\n\tcolor: #666;\n\tline-height: 1;\n\tfont-family: inherit;\n}\n.pict-mde-sidebar-btn:hover\n{\n\tcolor: #222;\n}\n.pict-mde-sidebar-btn b\n{\n\tfont-size: 13px;\n\tfont-weight: 700;\n}\n.pict-mde-sidebar-btn i\n{\n\tfont-size: 13px;\n\tfont-style: italic;\n}\n.pict-mde-sidebar-btn code\n{\n\tfont-size: 10px;\n\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', monospace;\n}\n\n/* ---- Add segment button ---- */\n.pict-mde-add-segment\n{\n\tmargin-top: 6px;\n\tpadding-left: 30px;\n}\n.pict-mde-btn-add\n{\n\tdisplay: block;\n\twidth: 100%;\n\tpadding: 7px;\n\tborder: 2px dashed #D0D0D0;\n\tborder-radius: 4px;\n\tbackground: transparent;\n\tcolor: #999;\n\tfont-size: 12px;\n\tfont-weight: 600;\n\tcursor: pointer;\n\ttransition: all 0.15s ease;\n}\n.pict-mde-btn-add:hover\n{\n\tborder-color: #4A90D9;\n\tcolor: #4A90D9;\n\tbackground: rgba(74, 144, 217, 0.04);\n}\n\n/* ---- Image drag-over indicator ---- */\n.pict-mde-segment-editor.pict-mde-image-dragover\n{\n\toutline: 2px dashed #4A90D9;\n\toutline-offset: -2px;\n}\n\n/* ---- Drag-in-progress: prevent CodeMirror from intercepting drop events ---- */\n.pict-mde.pict-mde-dragging .pict-mde-segment-editor\n{\n\tpointer-events: none;\n}\n\n/* ---- Drop target indicators for drag reorder ---- */\n.pict-mde-segment.pict-mde-drag-over-top\n{\n\tbox-shadow: 0 -2px 0 0 #4A90D9;\n}\n.pict-mde-segment.pict-mde-drag-over-bottom\n{\n\tbox-shadow: 0 2px 0 0 #4A90D9;\n}\n\n/* ---- CodeMirror overrides inside segments ---- */\n.pict-mde-segment-editor .cm-editor\n{\n\tborder: none;\n}\n.pict-mde-segment-editor .cm-editor .cm-scroller\n{\n\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace;\n\tfont-size: 14px;\n\tline-height: 1.6;\n}\n.pict-mde-segment-editor .cm-editor.cm-focused\n{\n\toutline: none;\n}\n.pict-mde-segment-editor .cm-editor .cm-content\n{\n\tpadding: 8px 12px;\n\tmin-height: 36px;\n}\n.pict-mde-segment-editor .cm-editor .cm-gutters\n{\n\tbackground: #F8F8F8;\n\tborder-right: 1px solid #E8E8E8;\n\tcolor: #BBB;\n}\n\n/* ---- Collapsed data URI widget ---- */\n.pict-mde-data-uri-collapsed\n{\n\tdisplay: inline;\n\tbackground: #F0F0F0;\n\tcolor: #888;\n\tfont-size: 11px;\n\tpadding: 1px 4px;\n\tborder-radius: 3px;\n\tborder: 1px solid #E0E0E0;\n\tfont-family: 'SFMono-Regular', 'SF Mono', 'Menlo', monospace;\n\tcursor: default;\n\twhite-space: nowrap;\n}\n\n/* ---- Line number / controls toggle: gutters hidden by default ---- */\n.pict-mde .cm-editor .cm-gutters\n{\n\tdisplay: none;\n}\n.pict-mde.pict-mde-controls-on .cm-editor .cm-gutters\n{\n\tdisplay: flex;\n}\n\n/* ============================================\n RESPONSIVE: Tablet / Phone (max-width: 768px)\n ============================================ */\n@media (max-width: 768px)\n{\n\t/* Prevent any horizontal overflow in the editor */\n\t.pict-mde\n\t{\n\t\toverflow-x: hidden;\n\t\tmax-width: 100%;\n\t}\n\n\t/* Reduce the left controls column width */\n\t.pict-mde-left-controls\n\t{\n\t\tflex: 0 0 16px;\n\t}\n\t.pict-mde-left-btn\n\t{\n\t\twidth: 16px;\n\t\theight: 18px;\n\t\tfont-size: 10px;\n\t}\n\n\t/* Make left-side buttons always visible on touch (no hover) */\n\t.pict-mde-left-btn\n\t{\n\t\topacity: 0.6;\n\t}\n\n\t/* Narrow the drag handle */\n\t.pict-mde-drag-handle\n\t{\n\t\tflex: 0 0 5px;\n\t}\n\n\t/* Shrink the right sidebar column */\n\t.pict-mde-sidebar\n\t{\n\t\tflex: 0 0 24px;\n\t}\n\t.pict-mde-sidebar-btn\n\t{\n\t\twidth: 20px;\n\t\theight: 20px;\n\t\tfont-size: 11px;\n\t}\n\n\t/* Make right sidebar buttons always visible (touch devices) */\n\t.pict-mde-quadrant-tr,\n\t.pict-mde-quadrant-br\n\t{\n\t\topacity: 0.7;\n\t}\n\t.pict-mde-segment.pict-mde-active .pict-mde-quadrant-tr,\n\t.pict-mde-segment.pict-mde-active .pict-mde-quadrant-br\n\t{\n\t\topacity: 1;\n\t}\n\n\t/* Reduce CodeMirror content padding */\n\t.pict-mde-segment-editor .cm-editor .cm-content\n\t{\n\t\tpadding: 6px 6px;\n\t}\n\n\t/* Reduce font size slightly for more content on screen */\n\t.pict-mde-segment-editor .cm-editor .cm-scroller\n\t{\n\t\tfont-size: 13px;\n\t}\n\n\t/* Add segment button: reduce left margin */\n\t.pict-mde-add-segment\n\t{\n\t\tpadding-left: 21px;\n\t}\n\n\t/* Side-by-side: fall back to vertical stacking on narrow screens */\n\t.pict-mde.pict-mde-preview-side .pict-mde-segment-body\n\t{\n\t\tflex-direction: column;\n\t}\n\t.pict-mde.pict-mde-preview-side .pict-mde-preview-pane\n\t{\n\t\tborder-left: none;\n\t\tborder-top: 1px solid #EDEDED;\n\t}\n\n\t/* Tab bar: smaller on tablet */\n\t.pict-mde-tab\n\t{\n\t\tpadding: 3px 8px;\n\t\tfont-size: 11px;\n\t}\n\n\t/* Rich preview: less padding */\n\t.pict-mde-rich-preview .pict-content\n\t{\n\t\tpadding: 8px;\n\t\tfont-size: 12px;\n\t}\n\n\t/* Image previews: smaller max dimensions */\n\t.pict-mde-image-preview img\n\t{\n\t\tmax-width: 120px;\n\t\tmax-height: 100px;\n\t}\n\n\t/* Rendered view: less padding */\n\t.pict-mde-rendered-view\n\t{\n\t\tpadding: 10px 8px;\n\t}\n}\n\n/* ============================================\n RESPONSIVE: Small phone (max-width: 480px)\n ============================================ */\n@media (max-width: 480px)\n{\n\t/* Wrap segment so left controls flow to the top as a horizontal bar */\n\t.pict-mde-segment\n\t{\n\t\tflex-wrap: wrap;\n\t}\n\n\t/* Left controls become a horizontal toolbar at the top of the segment */\n\t.pict-mde-left-controls\n\t{\n\t\tflex: 0 0 100%;\n\t\tflex-direction: row;\n\t\tjustify-content: flex-start;\n\t\tgap: 2px;\n\t\tpadding: 3px 4px;\n\t\torder: -1;\n\t\tbackground: #F5F5F5;\n\t\tborder-bottom: 1px solid #EDEDED;\n\t}\n\t.pict-mde-left-btn\n\t{\n\t\twidth: 24px;\n\t\theight: 24px;\n\t\tfont-size: 12px;\n\t\topacity: 0.7;\n\t}\n\n\t/* Left quadrants flow horizontally */\n\t.pict-mde-quadrant-tl,\n\t.pict-mde-quadrant-bl\n\t{\n\t\tflex-direction: row;\n\t\tgap: 2px;\n\t\tposition: static;\n\t}\n\n\t/* Segment body: explicit basis so it fills the wrapped row */\n\t.pict-mde-segment-body\n\t{\n\t\tflex: 1 1 calc(100% - 20px);\n\t}\n\n\t/* Hide drag handle on very small screens */\n\t.pict-mde-drag-handle\n\t{\n\t\tdisplay: none;\n\t}\n\n\t/* Right sidebar: further shrink */\n\t.pict-mde-sidebar\n\t{\n\t\tflex: 0 0 20px;\n\t}\n\t.pict-mde-sidebar-btn\n\t{\n\t\twidth: 18px;\n\t\theight: 18px;\n\t\tfont-size: 10px;\n\t}\n\n\t/* Add segment: no left offset since controls are at top */\n\t.pict-mde-add-segment\n\t{\n\t\tpadding-left: 0;\n\t}\n\n\t/* Even tighter CodeMirror padding */\n\t.pict-mde-segment-editor .cm-editor .cm-content\n\t{\n\t\tpadding: 4px 4px;\n\t}\n}\n"}},{}],86:[function(t,e,n){var i=t("pict-view"),o=t("pict-section-content"),r=t("./Pict-Section-MarkdownEditor-DefaultConfiguration.js"),a=t("./Pict-MDE-Formatting.js"),s=t("./Pict-MDE-ImageHandling.js"),c=t("./Pict-MDE-DragAndReorder.js"),l=t("./Pict-MDE-RichPreview.js"),d=t("./Pict-MDE-CodeMirror.js"),p=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,Object.assign({},r,n),i])).initialRenderComplete=!1,o._codeMirrorModules=null,o._segmentEditors={},o._segmentCounter=0,o._viewCallIdentifier=!1,o._activeSegmentIndex=-1,o._dragSourceIndex=-1,o._controlsVisible=!0,o._previewMode=o.options.DefaultPreviewMode||"off",o._lastPreviewLayout="bottom",o._segmentTabStates={},o._hiddenPreviewSegments={},o._imagePreviewTimers={},o._richPreviewTimers={},o._richPreviewGenerations={},o._contentProvider=null,o._renderedViewActive=!1,o._renderedViewGeneration=0,a.attach(o),s.attach(o),c.attach(o),l.attach(o),d.attach(o),o}return _inherits(e,t),_createClass(e,[{key:"onBeforeInitialize",value:function(){return _superPropGet(e,"onBeforeInitialize",this,3)([]),this.targetElement=!1,_superPropGet(e,"onBeforeInitialize",this,3)([])}},{key:"connectCodeMirrorModules",value:function(t){if(!t||"object"!==_typeof(t)||"function"!=typeof t.EditorView||"function"!=typeof t.EditorState)return"undefined"!=typeof window&&window.CodeMirrorModules&&"function"==typeof window.CodeMirrorModules.EditorView?(this.log.trace("PICT-MarkdownEditor Found CodeMirror modules on window.CodeMirrorModules."),void(this._codeMirrorModules=window.CodeMirrorModules)):(this.log.error("PICT-MarkdownEditor No CodeMirror modules found. Provide them via connectCodeMirrorModules() or set window.CodeMirrorModules."),!1);this._codeMirrorModules=t}},{key:"onAfterRender",value:function(t){return this.initialRenderComplete||(this.onAfterInitialRender(),this.initialRenderComplete=!0),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t])}},{key:"onAfterInitialRender",value:function(){if(this._codeMirrorModules||this.connectCodeMirrorModules(),!this._codeMirrorModules)return this.log.error("PICT-MarkdownEditor Cannot initialize; no CodeMirror modules available."),!1;if(this.options.EnableRichPreview){var t=o.default_configuration;t&&t.CSS&&this.pict.CSSMap.addCSS("Pict-Content-View",t.CSS)}var e=this.services.ContentAssignment.getElement(this.options.TargetElementAddress);if(!e||e.length<1)return this.log.error("PICT-MarkdownEditor Could not find target element [".concat(this.options.TargetElementAddress,"]!")),this.targetElement=!1,!1;this.targetElement=e[0],this._viewCallIdentifier=this._resolveViewCallIdentifier(),this._buildEditorUI()}},{key:"_resolveViewCallIdentifier",value:function(){var t=this.pict.views;for(var e in t)if(t[e]===this)return"_Pict.views.".concat(e);return"_Pict.servicesMap.PictView['".concat(this.Hash,"']")}},{key:"_getContainerElement",value:function(){if(this.targetElement){var t=this.targetElement.querySelector(".pict-mde");if(t)return t}return this.targetElement||null}},{key:"_resolveImageURL",value:function(t){if(!t||!this.options.ImageBaseURL)return t;if(t.startsWith("/")||t.startsWith("http://")||t.startsWith("https://")||t.startsWith("data:"))return t;var e=this.options.ImageBaseURL;return e&&!e.endsWith("/")&&(e+="/"),e+t}},{key:"_buildEditorUI",value:function(){var t=this._getContainerElement();for(var e in t&&!t.classList.contains("pict-mde")&&t.classList.add("pict-mde"),this._segmentEditors)this._segmentEditors[e]&&this._segmentEditors[e].destroy();t.innerHTML="",t.classList.remove("pict-mde-preview-off","pict-mde-preview-bottom","pict-mde-preview-side","pict-mde-preview-tabbed","pict-mde-previews-hidden"),t.classList.add("pict-mde-preview-"+this._previewMode),this._controlsVisible?t.classList.add("pict-mde-controls-on"):t.classList.add("pict-mde-controls-hidden");var n=this._getSegmentsFromData();n&&0!==n.length||(n=[{Content:""}],this._setSegmentsToData(n)),this._segmentCounter=0,this._segmentEditors={};for(var i=0;i<n.length;i++)this._renderSegment(t,i,n[i].Content||"");this._renderAddButton(t)}},{key:"_renderSegment",value:function(t,e,n){var i=this._segmentCounter++,o={SegmentIndex:i,SegmentDisplayIndex:e+1,ViewIdentifier:this._viewCallIdentifier},r=this.pict.parseTemplateByHash("MarkdownEditor-Segment",o),a=document.createElement("div");a.innerHTML=r;var s=a.firstElementChild;if(t.appendChild(s),this._buildQuadrantButtons(s,i),this._hiddenPreviewSegments[e]&&s.classList.add("pict-mde-preview-hidden"),"tabbed"===this._previewMode&&"preview"===this._segmentTabStates[e]){s.classList.add("pict-mde-tab-showing-preview");var c=s.querySelector(".pict-mde-tab-bar");if(c){var l=c.querySelector('[data-tab="editor"]'),d=c.querySelector('[data-tab="preview"]');l&&l.classList.remove("pict-mde-tab-active"),d&&d.classList.add("pict-mde-tab-active")}}this._wireSegmentDragEvents(s,i);var p=document.getElementById("PictMDE-SegmentEditor-".concat(i));p&&(this._createEditorInContainer(p,i,n),this._wireImageDragEvents(p,i),n&&(this._updateImagePreviews(i),this._updateRichPreviews(i)))}},{key:"_buildQuadrantButtons",value:function(t,e){for(var n=[{key:"ButtonsTL",selector:".pict-mde-quadrant-tl",baseClass:"pict-mde-left-btn"},{key:"ButtonsBL",selector:".pict-mde-quadrant-bl",baseClass:"pict-mde-left-btn"},{key:"ButtonsTR",selector:".pict-mde-quadrant-tr",baseClass:"pict-mde-sidebar-btn"},{key:"ButtonsBR",selector:".pict-mde-quadrant-br",baseClass:"pict-mde-sidebar-btn"}],i=this,o=0;o<n.length;o++){var r=n[o],a=t.querySelector(r.selector);if(a){var s=this.options[r.key];if(Array.isArray(s))for(var c=function(){var t=s[l],n=document.createElement("button");n.type="button",n.className=r.baseClass,t.Class&&(n.className+=" "+t.Class),n.innerHTML=t.HTML||"",n.title=t.Title||"";var o,c,d,p=t.Action||"",u=p,h=null,f=p.indexOf(":");f>=0&&(u=p.substring(0,f),h=p.substring(f+1)),o=u,c=h,d=e,n.addEventListener("click",function(){"function"==typeof i[o]?null!==c?i[o](d,c):i[o](d):i.log.warn('PICT-MarkdownEditor _buildQuadrantButtons: method "'.concat(o,'" not found.'))}),a.appendChild(n)},l=0;l<s.length;l++)c()}}}},{key:"customConfigureExtensions",value:function(t,e){return t}},{key:"_renderAddButton",value:function(t){var e={ViewIdentifier:this._viewCallIdentifier},n=this.pict.parseTemplateByHash("MarkdownEditor-AddSegment",e),i=document.createElement("div");i.innerHTML=n;var o=i.firstElementChild;t.appendChild(o)}},{key:"onImageUpload",value:function(t,e,n){return!1}},{key:"toggleControls",value:function(t,e){var n=e;"boolean"==typeof t&&(n=t),this._controlsVisible="boolean"==typeof n?n:!this._controlsVisible;var i=this._getContainerElement();i&&(this._controlsVisible?(i.classList.add("pict-mde-controls-on"),i.classList.remove("pict-mde-controls-hidden")):(i.classList.remove("pict-mde-controls-on"),i.classList.add("pict-mde-controls-hidden")))}},{key:"toggleLineNumbers",value:function(t){this.toggleControls(t)}},{key:"togglePreview",value:function(t){"boolean"==typeof t?t?this.setPreviewMode(this._lastPreviewLayout||"bottom"):this.setPreviewMode("off"):"off"===this._previewMode?this.setPreviewMode(this._lastPreviewLayout||"bottom"):this.setPreviewMode("off")}},{key:"setPreviewMode",value:function(t){if(["off","bottom","side","tabbed"].indexOf(t)<0)this.log.warn('PICT-MarkdownEditor setPreviewMode: unknown mode "'.concat(t,'".'));else{"off"!==t&&(this._lastPreviewLayout=t),this._previewMode=t;var e=this._getContainerElement();if(e&&(e.classList.remove("pict-mde-preview-off","pict-mde-preview-bottom","pict-mde-preview-side","pict-mde-preview-tabbed","pict-mde-previews-hidden"),e.classList.add("pict-mde-preview-"+t)),"off"!==t)for(var n=this._getOrderedSegmentIndices(),i=0;i<n.length;i++)this._updateRichPreviews(n[i]),this._updateImagePreviews(n[i])}}},{key:"cyclePreviewMode",value:function(t){var e=["off","bottom","side","tabbed"],n=(e.indexOf(this._previewMode)+1)%e.length;this.setPreviewMode(e[n])}},{key:"switchSegmentTab",value:function(t,e){var n=this._getLogicalIndex(t);if(!(n<0)){this._segmentTabStates[n]=e;var i=document.getElementById("PictMDE-Segment-".concat(t));if(i){"preview"===e?(i.classList.add("pict-mde-tab-showing-preview"),this._updateRichPreviews(t),this._updateImagePreviews(t)):i.classList.remove("pict-mde-tab-showing-preview");var o=document.getElementById("PictMDE-TabBar-".concat(t));if(o)for(var r=o.querySelectorAll(".pict-mde-tab"),a=0;a<r.length;a++)r[a].getAttribute("data-tab")===e?r[a].classList.add("pict-mde-tab-active"):r[a].classList.remove("pict-mde-tab-active")}}}},{key:"toggleSegmentPreview",value:function(t,e){var n=this._getLogicalIndex(t);if(!(n<0)){var i=!!this._hiddenPreviewSegments[n];(i="boolean"==typeof e?!e:!i)?this._hiddenPreviewSegments[n]=!0:delete this._hiddenPreviewSegments[n];var o=document.getElementById("PictMDE-Segment-".concat(t));o&&(i?o.classList.add("pict-mde-preview-hidden"):(o.classList.remove("pict-mde-preview-hidden"),this._updateRichPreviews(t),this._updateImagePreviews(t)))}}},{key:"_getSegmentsFromData",value:function(){if(!this.options.ContentDataAddress)return null;var t={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options},e=this.fable.manifest.getValueByHash(t,this.options.ContentDataAddress);return Array.isArray(e)?e:null}},{key:"_setSegmentsToData",value:function(t){if(this.options.ContentDataAddress){var e={Fable:this.fable,Pict:this.fable,AppData:this.AppData,Bundle:this.Bundle,Options:this.options};this.fable.manifest.setValueByHash(e,this.options.ContentDataAddress,t)}}},{key:"_onSegmentContentChange",value:function(t,e){var n=this._getLogicalIndex(t);if(!(n<0)){var i=this._getSegmentsFromData();if(i){n<i.length&&(i[n].Content=e),this.onContentChange(n,e);var o=this;this._imagePreviewTimers[t]&&clearTimeout(this._imagePreviewTimers[t]),this._imagePreviewTimers[t]=setTimeout(function(){o._updateImagePreviews(t),delete o._imagePreviewTimers[t]},500),this._richPreviewTimers[t]&&clearTimeout(this._richPreviewTimers[t]),this._richPreviewTimers[t]=setTimeout(function(){o._updateRichPreviews(t),delete o._richPreviewTimers[t]},500)}}}},{key:"onContentChange",value:function(t,e){}},{key:"_getLogicalIndex",value:function(t){var e=this._getContainerElement();if(!e)return-1;for(var n=e.querySelectorAll(".pict-mde-segment"),i=0;i<n.length;i++){if(parseInt(n[i].getAttribute("data-segment-index"),10)===t)return i}return-1}},{key:"_getOrderedSegmentIndices",value:function(){var t=this._getContainerElement();if(!t)return[];for(var e=t.querySelectorAll(".pict-mde-segment"),n=[],i=0;i<e.length;i++)n.push(parseInt(e[i].getAttribute("data-segment-index"),10));return n}},{key:"addSegment",value:function(t){var e="string"==typeof t?t:"",n=this._getSegmentsFromData();n||(n=[]),n.push({Content:e}),this._setSegmentsToData(n),this._buildEditorUI()}},{key:"removeSegment",value:function(t){var e=this._getLogicalIndex(t);if(e<0)this.log.warn("PICT-MarkdownEditor removeSegment: segment index ".concat(t," not found."));else{var n=this._getSegmentsFromData();if(!n||n.length<=1)this.log.warn("PICT-MarkdownEditor removeSegment: cannot remove the last segment.");else{this._segmentEditors[t]&&(this._segmentEditors[t].destroy(),delete this._segmentEditors[t]),n.splice(e,1),this._setSegmentsToData(n);var i={};for(var o in this._hiddenPreviewSegments){var r=parseInt(o,10);r<e?i[r]=!0:r>e&&(i[r-1]=!0)}this._hiddenPreviewSegments=i;var a={};for(var s in this._segmentTabStates){var c=parseInt(s,10);c<e?a[c]=this._segmentTabStates[s]:c>e&&(a[c-1]=this._segmentTabStates[s])}this._segmentTabStates=a,this._buildEditorUI()}}}},{key:"moveSegmentUp",value:function(t){var e=this._getLogicalIndex(t);if(!(e<=0)){this._marshalAllEditorsToData();var n=this._getSegmentsFromData();if(n){var i=n[e];n[e]=n[e-1],n[e-1]=i,this._swapHiddenPreviewState(e,e-1),this._swapSegmentTabStates(e,e-1),this._buildEditorUI()}}}},{key:"moveSegmentDown",value:function(t){var e=this._getLogicalIndex(t),n=this._getSegmentsFromData();if(!(!n||e<0||e>=n.length-1)){this._marshalAllEditorsToData();var i=n[e];n[e]=n[e+1],n[e+1]=i,this._swapHiddenPreviewState(e,e+1),this._swapSegmentTabStates(e,e+1),this._buildEditorUI()}}},{key:"getSegmentContent",value:function(t){var e=this._getOrderedSegmentIndices();if(t<0||t>=e.length)return"";var n=e[t],i=this._segmentEditors[n];return i?i.state.doc.toString():""}},{key:"setSegmentContent",value:function(t,e){var n=this._getOrderedSegmentIndices();if(t<0||t>=n.length)this.log.warn("PICT-MarkdownEditor setSegmentContent: index ".concat(t," out of range."));else{var i=n[t],o=this._segmentEditors[i];o&&o.dispatch({changes:{from:0,to:o.state.doc.length,insert:e}})}}},{key:"getSegmentCount",value:function(){return this._getOrderedSegmentIndices().length}},{key:"getAllContent",value:function(t){for(var e="string"==typeof t?t:"\n\n",n=this._getOrderedSegmentIndices(),i=[],o=0;o<n.length;o++){var r=this._segmentEditors[n[o]];r&&i.push(r.state.doc.toString())}return i.join(e)}},{key:"_marshalAllEditorsToData",value:function(){var t=this._getSegmentsFromData();if(t)for(var e=this._getOrderedSegmentIndices(),n=0;n<e.length;n++){var i=this._segmentEditors[e[n]];i&&n<t.length&&(t[n].Content=i.state.doc.toString())}}},{key:"setReadOnly",value:function(t){this.options.ReadOnly=t,this.initialRenderComplete&&(this._marshalAllEditorsToData(),this._buildEditorUI())}},{key:"marshalToView",value:function(){_superPropGet(e,"marshalToView",this,3)([]),this.initialRenderComplete&&this.options.ContentDataAddress&&this._buildEditorUI()}},{key:"marshalFromView",value:function(){_superPropGet(e,"marshalFromView",this,3)([]),this._marshalAllEditorsToData()}},{key:"destroy",value:function(){for(var t in this._segmentEditors)this._segmentEditors[t]&&this._segmentEditors[t].destroy();for(var e in this._segmentEditors={},this._richPreviewTimers)clearTimeout(this._richPreviewTimers[e]);this._richPreviewTimers={},this._richPreviewGenerations={},this._segmentTabStates={}}}])}(i);e.exports=p,e.exports.default_configuration=r},{"./Pict-MDE-CodeMirror.js":80,"./Pict-MDE-DragAndReorder.js":81,"./Pict-MDE-Formatting.js":82,"./Pict-MDE-ImageHandling.js":83,"./Pict-MDE-RichPreview.js":84,"./Pict-Section-MarkdownEditor-DefaultConfiguration.js":85,"pict-section-content":77,"pict-view":88}],87:[function(t,e,n){e.exports={name:"pict-view",version:"1.0.67",description:"Pict View Base Class",main:"source/Pict-View.js",scripts:{test:"npx quack test",tests:"npx quack test -g",start:"node source/Pict-View.js",coverage:"npx quack coverage",build:"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":'docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/pict-view" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" pict-view-image:local',"docker-dev-shell":"docker exec -it pict-view-dev /bin/bash",types:"tsc -p .",lint:"eslint source/**"},types:"types/source/Pict-View.d.ts",repository:{type:"git",url:"git+https://github.com/stevenvelozo/pict-view.git"},author:"steven velozo <steven@velozo.com>",license:"MIT",bugs:{url:"https://github.com/stevenvelozo/pict-view/issues"},homepage:"https://github.com/stevenvelozo/pict-view#readme",devDependencies:{"@eslint/js":"^9.39.1","browser-env":"^3.3.0",eslint:"^9.39.1",pict:"^1.0.348",quackage:"^1.0.58",typescript:"^5.9.3"},mocha:{diff:!0,extension:["js"],package:"./package.json",reporter:"spec",slow:"75",timeout:"5000",ui:"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},dependencies:{fable:"^3.1.63","fable-serviceproviderbase":"^3.0.19"}}},{}],88:[function(t,e,n){var i=t("fable-serviceproviderbase"),o=t("../package.json"),r={DefaultRenderable:!1,DefaultDestinationAddress:!1,DefaultTemplateRecordAddress:!1,ViewIdentifier:!1,AutoInitialize:!0,AutoInitializeOrdinal:0,AutoRender:!0,AutoRenderOrdinal:0,AutoSolveWithApp:!0,AutoSolveOrdinal:0,CSSHash:!1,CSS:!1,CSSProvider:!1,CSSPriority:500,Templates:[],DefaultTemplates:[],Renderables:[],Manifests:{}},a=function(t){function e(t,n,i){var a;_classCallCheck(this,e),(a=_callSuper(this,e,[t,Object.assign({},JSON.parse(JSON.stringify(r)),n),i])).fable,a.options,a.UUID,a.Hash,a.log;var s=a.Hash===a.UUID;a.UUID="V-".concat(a.UUID),s&&(a.Hash=a.UUID),a.options.ViewIdentifier||(a.options.ViewIdentifier="AutoViewID-".concat(a.fable.getUUID())),a.serviceType="PictView",a._Package=o,a.pict=a.fable,a.AppData=a.pict.AppData,a.Bundle=a.pict.Bundle,a.initializeTimestamp=!1,a.lastSolvedTimestamp=!1,a.lastRenderedTimestamp=!1,a.lastMarshalFromViewTimestamp=!1,a.lastMarshalToViewTimestamp=!1,a.pict.instantiateServiceProviderIfNotExists("TransactionTracking");for(var c=0;c<a.options.Templates.length;c++){var l=a.options.Templates[c];"Hash"in l&&"Template"in l?(l.Source||(l.Source="PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," options object.")),a.pict.TemplateProvider.addTemplate(l.Hash,l.Template,l.Source)):a.log.error("PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," could not load Template ").concat(c," in the options array."),l)}for(var d=0;d<a.options.DefaultTemplates.length;d++){var p=a.options.DefaultTemplates[d];"Postfix"in p&&"Template"in p?(p.Source||(p.Source="PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," options object.")),a.pict.TemplateProvider.addDefaultTemplate(p.Prefix,p.Postfix,p.Template,p.Source)):a.log.error("PictView [".concat(a.UUID,"]::[").concat(a.Hash,"] ").concat(a.options.ViewIdentifier," could not load Default Template ").concat(d," in the options array."),p)}if(a.options.CSS){var u=a.options.CSSHash?a.options.CSSHash:"View-".concat(a.options.ViewIdentifier),h=a.options.CSSProvider?a.options.CSSProvider:u;a.pict.CSSMap.addCSS(u,a.options.CSS,h,a.options.CSSPriority)}a.renderables={};for(var f=0;f<a.options.Renderables.length;f++){var v=a.options.Renderables[f];a.addRenderable(v)}return a}return _inherits(e,t),_createClass(e,[{key:"addRenderable",value:function(t,e,n,i,o){var r;"object"==_typeof(t)?r=t:r={RenderableHash:t,TemplateHash:e,DefaultTemplateRecordAddress:n,ContentDestinationAddress:i,RenderMethod:"string"!=typeof o?o:"replace"};"string"!=typeof r.RenderableHash||"string"!=typeof r.TemplateHash?this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Renderable; RenderableHash or TemplateHash are invalid."),r):(this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," adding renderable [").concat(r.RenderableHash,"] pointed to template ").concat(r.TemplateHash,".")),this.renderables[r.RenderableHash]=r)}},{key:"onBeforeInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeInitialize:")),!0}},{key:"onBeforeInitializeAsync",value:function(t){return this.onBeforeInitialize(),t()}},{key:"onInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onInitialize:")),!0}},{key:"onInitializeAsync",value:function(t){return this.onInitialize(),t()}},{key:"initialize",value:function(){return this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize:")),this.initializeTimestamp?(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initialize called but initialization is already completed. Aborting.")),!1):(this.onBeforeInitialize(),this.onInitialize(),this.onAfterInitialize(),this.initializeTimestamp=this.pict.log.getTimeStamp(),!0)}},{key:"initializeAsync",value:function(t){var e=this;if(this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initializeAsync:")),this.initializeTimestamp)return this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," async initialize called but initialization is already completed. Aborting.")),t();var n=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate");this.pict.LogNoisiness>0&&this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," beginning initialization...")),n.anticipate(this.onBeforeInitializeAsync.bind(this)),n.anticipate(this.onInitializeAsync.bind(this)),n.anticipate(this.onAfterInitializeAsync.bind(this)),n.wait(function(n){return n&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," initialization failed: ").concat(n.message||n),{stack:n.stack}),e.initializeTimestamp=e.pict.log.getTimeStamp(),e.pict.LogNoisiness>0&&e.log.info("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," initialization complete.")),t()})}},{key:"onAfterInitialize",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterInitialize:")),!0}},{key:"onAfterInitializeAsync",value:function(t){return this.onAfterInitialize(),t()}},{key:"onBeforeRender",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeRender:")),!0}},{key:"onBeforeRenderAsync",value:function(t,e){return this.onBeforeRender(e),t()}},{key:"onBeforeProject",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeProject:")),!0}},{key:"onBeforeProjectAsync",value:function(t,e){return this.onBeforeProject(e),t()}},{key:"buildRenderOptions",value:function(t,e,n){var i={Valid:!0};return i.RenderableHash="string"==typeof t?t:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,i.RenderableHash||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not find a suitable RenderableHash ").concat(i.RenderableHash," (param ").concat(t,"because it is not a valid renderable.")),i.Valid=!1),i.Renderable=this.renderables[i.RenderableHash],i.Renderable||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(i.RenderableHash," (param ").concat(t,") because it does not exist.")),i.Valid=!1),i.DestinationAddress="string"==typeof e?e:"string"==typeof i.Renderable.ContentDestinationAddress?i.Renderable.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress&&this.options.DefaultDestinationAddress,i.DestinationAddress||(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(i.RenderableHash," (param ").concat(t,") because it does not have a valid destination address (param ").concat(e,").")),i.Valid=!1),"object"===_typeof(n)?(i.RecordAddress="Passed in as object",i.Record=n):(i.RecordAddress="string"==typeof n?n:"string"==typeof i.Renderable.DefaultTemplateRecordAddress?i.Renderable.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,i.Record="string"==typeof i.RecordAddress?this.pict.DataProvider.getDataByAddress(i.RecordAddress):void 0),i}},{key:"assignRenderContent",value:function(t,e,n){return this.pict.ContentAssignment.projectContent(t.RenderMethod,e,n,t.TestAddress)}},{key:"render",value:function(t,e,n,i){return this.renderWithScope(this,t,e,n,i)}},{key:"renderWithScope",value:function(t,e,n,i,o){var r,a,s,c="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable;return c?("__Virtual"==c?r={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof n?n:"string"==typeof r.ContentDestinationAddress?r.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:o&&o.TransactionHash,RootRenderableViewHash:o&&o.RootRenderableViewHash}:(r=Object.assign({},this.renderables[c])).ContentDestinationAddress="string"==typeof n?n:"string"==typeof r.ContentDestinationAddress?r.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,r.TransactionHash||(r.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(c,"-U-").concat(this.pict.getUUID()),r.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(r.TransactionHash)),r?r.ContentDestinationAddress?("object"===_typeof(i)?(s=i,a="Passed in as object"):s="string"==typeof(a="string"==typeof i?i:"string"==typeof r.DefaultTemplateRecordAddress?r.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress)?this.pict.DataProvider.getDataByAddress(a):void 0,this.onBeforeRender(r),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(c,"] Destination[").concat(r.ContentDestinationAddress,"] TemplateRecordAddress[").concat(a,"] render:")),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Render of Renderable[").concat(c,"] to Destination [").concat(r.ContentDestinationAddress,"]...")),r.Content=this.pict.parseTemplateByHash(r.TemplateHash,s,null,[this],t,{RootRenderable:"object"===_typeof(o)?o:r}),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(c,"] content length ").concat(r.Content.length," to Destination [").concat(r.ContentDestinationAddress,"] using render method [").concat(r.RenderMethod,"].")),this.onBeforeProject(r),this.onProject(r),"virtual-assignment"!==r.RenderMethod&&(this.onAfterProject(r),this.onAfterRender(r)),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(e,") because it does not have a valid destination address.")),!1):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(e,") because it does not exist.")),!1)):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(c," (param ").concat(e,") because it is not a valid renderable.")),!1)}},{key:"renderAsync",value:function(t,e,n,i,o){return this.renderWithScopeAsync(this,t,e,n,i,o)}},{key:"renderWithScopeAsync",value:function(t,e,n,i,o,r){var a,s,c,l=this,d="string"==typeof e?e:"string"==typeof this.options.DefaultRenderable&&this.options.DefaultRenderable,p="function"==typeof r?r:"function"==typeof i?i:"function"==typeof n?n:"function"==typeof e?e:"function"==typeof o?o:null;if(p||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),p=function(t){t&&l.log.error("PictView [".concat(l.UUID,"]::[").concat(l.Hash,"] ").concat(l.options.Name," renderAsync Auto Callback Error: ").concat(t),t)}),!d)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(d," (param ").concat(e,"because it is not a valid renderable.")),p(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(d," (param ").concat(e,"because it is not a valid renderable.")));if("__Virtual"==d?a={RenderableHash:"__Virtual",TemplateHash:this.renderables[this.options.DefaultRenderable].TemplateHash,ContentDestinationAddress:"string"==typeof n?n:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,RenderMethod:"virtual-assignment",TransactionHash:o&&"function"!=typeof o&&o.TransactionHash,RootRenderableViewHash:o&&"function"!=typeof o&&o.RootRenderableViewHash}:(a=Object.assign({},this.renderables[d])).ContentDestinationAddress="string"==typeof n?n:"string"==typeof a.ContentDestinationAddress?a.ContentDestinationAddress:"string"==typeof this.options.DefaultDestinationAddress?this.options.DefaultDestinationAddress:null,a.TransactionHash||(a.TransactionHash="ViewRender-V-".concat(this.options.ViewIdentifier,"-R-").concat(d,"-U-").concat(this.pict.getUUID()),a.RootRenderableViewHash=this.Hash,this.pict.TransactionTracking.registerTransaction(a.TransactionHash)),!a)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not exist.")),p(new Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not exist.")));if(!a.ContentDestinationAddress)return this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(d," (param ").concat(e,") because it does not have a valid destination address.")),p(new Error("Could not render ".concat(d)));"object"===_typeof(i)?(c=i,s="Passed in as object"):(s="string"==typeof i?i:"string"==typeof a.DefaultTemplateRecordAddress?a.DefaultTemplateRecordAddress:"string"==typeof this.options.DefaultTemplateRecordAddress&&this.options.DefaultTemplateRecordAddress,c="string"==typeof s?this.pict.DataProvider.getDataByAddress(s):void 0),this.pict.LogControlFlow&&this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(d,"] Destination[").concat(a.ContentDestinationAddress,"] TemplateRecordAddress[").concat(s,"] renderAsync:")),this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Asynchronous Render (callback-style)..."));var u=this.fable.newAnticipate();u.anticipate(function(t){l.onBeforeRenderAsync(t,a)}),u.anticipate(function(n){l.pict.parseTemplateByHash(a.TemplateHash,c,function(t,i){return t?(l.log.error("PictView [".concat(l.UUID,"]::[").concat(l.Hash,"] ").concat(l.options.ViewIdentifier," could not render (asynchronously) ").concat(d," (param ").concat(e,") because it did not parse the template."),t),n(t)):(a.Content=i,n())},[l],t,{RootRenderable:"object"===_typeof(o)?o:a})}),u.anticipate(function(t){l.onBeforeProjectAsync(t,a)}),u.anticipate(function(t){l.onProjectAsync(t,a)}),"virtual-assignment"!==a.RenderMethod&&(u.anticipate(function(t){l.onAfterProjectAsync(t,a)}),u.anticipate(function(t){l.onAfterRenderAsync(t,a)})),u.wait(p)}},{key:"renderDefaultAsync",value:function(t){this.renderAsync(t)}},{key:"basicRender",value:function(t,e,n){return this.basicRenderWithScope(this,t,e,n)}},{key:"basicRenderWithScope",value:function(t,e,n,i){var o=this.buildRenderOptions(e,n,i);return o.Valid?(this.assignRenderContent(o.Renderable,o.DestinationAddress,this.pict.parseTemplateByHash(o.Renderable.TemplateHash,o.Record,null,[this],t,{RootRenderable:o.Renderable})),!0):(this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(o.RenderableHash," because it is not valid.")),!1)}},{key:"basicRenderAsync",value:function(t,e,n,i){return this.basicRenderWithScopeAsync(this,t,e,n,i)}},{key:"basicRenderWithScopeAsync",value:function(t,e,n,i,o){var r=this,a="function"==typeof o?o:"function"==typeof i?i:"function"==typeof n?n:"function"==typeof e?e:null;a||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," basicRenderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),a=function(t){t&&r.log.error("PictView [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.Name," basicRenderAsync Auto Callback Error: ").concat(t),t)});var s=this.buildRenderOptions(e,n,i);if(!s.Valid){var c="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(s.RenderableHash," because it is not valid.");return this.log.error(c),a(new Error(c))}this.pict.parseTemplateByHash(s.Renderable.TemplateHash,s.Record,function(t,e){return t?(r.log.error("PictView [".concat(r.UUID,"]::[").concat(r.Hash,"] ").concat(r.options.ViewIdentifier," could not render (asynchronously) ").concat(s.RenderableHash," because it did not parse the template."),t),a(t)):(r.assignRenderContent(s.Renderable,s.DestinationAddress,e),a())},[this],t,{RootRenderable:s.Renderable})}},{key:"onProject",value:function(t){this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onProject:")),"virtual-assignment"===t.RenderMethod&&this.pict.TransactionTracking.pushToTransactionQueue(t.TransactionHash,{ViewHash:this.Hash,Renderable:t},"Deferred-Post-Content-Assignment"),this.pict.LogNoisiness>0&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(t.RenderableHash,"] content length ").concat(t.Content.length," to Destination [").concat(t.ContentDestinationAddress,"] using Async render method ").concat(t.RenderMethod,".")),this.pict.ContentAssignment.projectContent(t.RenderMethod,t.ContentDestinationAddress,t.Content,t.TestAddress),this.lastRenderedTimestamp=this.pict.log.getTimeStamp()}},{key:"onProjectAsync",value:function(t,e){return this.onProject(e),t()}},{key:"onAfterRender",value:function(t){if(this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender:")),t&&t.RootRenderableViewHash===this.Hash){var e,n=_createForOfIteratorHelper(this.pict.TransactionTracking.clearTransactionQueue(t.TransactionHash)||[]);try{for(n.s();!(e=n.n()).done;){var i=e.value,o=this.pict.views[i.Data.ViewHash];o?(o.onAfterProject(),o.onAfterRender(i.Data.Renderable)):this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender: Could not find view for transaction hash ").concat(t.TransactionHash," and ViewHash ").concat(i.Data.ViewHash,"."))}}catch(t){n.e(t)}finally{n.f()}this.pict.TransactionTracking.unregisterTransaction(t.TransactionHash)}return!0}},{key:"onAfterRenderAsync",value:function(t,e){var n=this;this.onAfterRender(e);var i=this.fable.newAnticipate(),o=e&&e.RootRenderableViewHash===this.Hash;if(o){var r,a=_createForOfIteratorHelper(this.pict.TransactionTracking.clearTransactionQueue(e.TransactionHash)||[]);try{var s=function(){var t=r.value,o=n.pict.views[t.Data.ViewHash];if(!o)return n.log.error("PictView [".concat(n.UUID,"]::[").concat(n.Hash,"] ").concat(n.options.ViewIdentifier," onAfterRenderAsync: Could not find view for transaction hash ").concat(e.TransactionHash," and ViewHash ").concat(t.Data.ViewHash,".")),1;i.anticipate(o.onAfterProjectAsync.bind(o)),i.anticipate(function(e){o.onAfterRenderAsync(e,t.Data.Renderable)})};for(a.s();!(r=a.n()).done;)s()}catch(t){a.e(t)}finally{a.f()}}return i.wait(function(i){return o&&e&&e.TransactionHash&&n.pict.TransactionTracking.unregisterTransaction(e.TransactionHash),t(i)})}},{key:"onAfterProject",value:function(t){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterProject:")),!0}},{key:"onAfterProjectAsync",value:function(t,e){return t()}},{key:"onBeforeSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeSolve:")),!0}},{key:"onBeforeSolveAsync",value:function(t){return this.onBeforeSolve(),t()}},{key:"onSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onSolve:")),!0}},{key:"onSolveAsync",value:function(t){return this.onSolve(),t()}},{key:"solve",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeSolve(),this.onSolve(),this.onAfterSolve(),this.lastSolvedTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"solveAsync",value:function(t){var e=this,n=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," solveAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," solveAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeSolveAsync.bind(this)),n.anticipate(this.onSolveAsync.bind(this)),n.anticipate(this.onAfterSolveAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," solveAsync() complete.")),e.lastSolvedTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterSolve",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterSolve:")),!0}},{key:"onAfterSolveAsync",value:function(t){return this.onAfterSolve(),t()}},{key:"onBeforeMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalFromView:")),!0}},{key:"onBeforeMarshalFromViewAsync",value:function(t){return this.onBeforeMarshalFromView(),t()}},{key:"onMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalFromView:")),!0}},{key:"onMarshalFromViewAsync",value:function(t){return this.onMarshalFromView(),t()}},{key:"marshalFromView",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalFromView(),this.onMarshalFromView(),this.onAfterMarshalFromView(),this.lastMarshalFromViewTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"marshalFromViewAsync",value:function(t){var e=this,n=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalFromViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalFromViewAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeMarshalFromViewAsync.bind(this)),n.anticipate(this.onMarshalFromViewAsync.bind(this)),n.anticipate(this.onAfterMarshalFromViewAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," marshalFromViewAsync() complete.")),e.lastMarshalFromViewTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalFromView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalFromView:")),!0}},{key:"onAfterMarshalFromViewAsync",value:function(t){return this.onAfterMarshalFromView(),t()}},{key:"onBeforeMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeMarshalToView:")),!0}},{key:"onBeforeMarshalToViewAsync",value:function(t){return this.onBeforeMarshalToView(),t()}},{key:"onMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onMarshalToView:")),!0}},{key:"onMarshalToViewAsync",value:function(t){return this.onMarshalToView(),t()}},{key:"marshalToView",value:function(){return this.pict.LogNoisiness>2&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," executing solve() function...")),this.onBeforeMarshalToView(),this.onMarshalToView(),this.onAfterMarshalToView(),this.lastMarshalToViewTimestamp=this.pict.log.getTimeStamp(),!0}},{key:"marshalToViewAsync",value:function(t){var e=this,n=this.pict.instantiateServiceProviderWithoutRegistration("Anticipate"),i="function"==typeof t?t:null;i||(this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," marshalToViewAsync was called without a valid callback. A callback will be generated but this could lead to race conditions.")),i=function(t){t&&e.log.error("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.Name," marshalToViewAsync Auto Callback Error: ").concat(t),t)}),n.anticipate(this.onBeforeMarshalToViewAsync.bind(this)),n.anticipate(this.onMarshalToViewAsync.bind(this)),n.anticipate(this.onAfterMarshalToViewAsync.bind(this)),n.wait(function(t){return e.pict.LogNoisiness>2&&e.log.trace("PictView [".concat(e.UUID,"]::[").concat(e.Hash,"] ").concat(e.options.ViewIdentifier," marshalToViewAsync() complete.")),e.lastMarshalToViewTimestamp=e.pict.log.getTimeStamp(),i(t)})}},{key:"onAfterMarshalToView",value:function(){return this.pict.LogNoisiness>3&&this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterMarshalToView:")),!0}},{key:"onAfterMarshalToViewAsync",value:function(t){return this.onAfterMarshalToView(),t()}},{key:"isPictView",get:function(){return!0}}])}(i);e.exports=a},{"../package.json":87,"fable-serviceproviderbase":20}],89:[function(t,e,n){var i,o,r=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function c(t){if(i===setTimeout)return setTimeout(t,0);if((i===a||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:a}catch(t){i=a}try{o="function"==typeof clearTimeout?clearTimeout:s}catch(t){o=s}}();var l,d=[],p=!1,u=-1;function h(){p&&l&&(p=!1,l.length?d=l.concat(d):u=-1,d.length&&f())}function f(){if(!p){var t=c(h);p=!0;for(var e=d.length;e;){for(l=d,d=[];++u<e;)l&&l[u].run();u=-1,e=d.length}l=null,p=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===s||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{return o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function v(t,e){this.fun=t,this.array=e}function g(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new v(t,e)),1!==d.length||p||c(f)},v.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},{}],90:[function(t,e,n){(function(t){(function(){!function(i){var o="object"==_typeof(n)&&n&&!n.nodeType&&n,r="object"==_typeof(e)&&e&&!e.nodeType&&e,a="object"==_typeof(t)&&t;a.global!==a&&a.window!==a&&a.self!==a||(i=a);var s,c,l=2147483647,d=36,p=/^xn--/,u=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=Math.floor,g=String.fromCharCode;function m(t){throw new RangeError(f[t])}function y(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i}function b(t,e){var n=t.split("@"),i="";return n.length>1&&(i=n[0]+"@",t=n[1]),i+y((t=t.replace(h,".")).split("."),e).join(".")}function w(t){for(var e,n,i=[],o=0,r=t.length;o<r;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<r?56320==(64512&(n=t.charCodeAt(o++)))?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),o--):i.push(e);return i}function C(t){return y(t,function(t){var e="";return t>65535&&(e+=g((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=g(t)}).join("")}function x(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:d}function A(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function D(t,e,n){var i=0;for(t=n?v(t/700):t>>1,t+=v(t/e);t>455;i+=d)t=v(t/35);return v(i+36*t/(t+38))}function k(t){var e,n,i,o,r,a,s,c,p,u,h=[],f=t.length,g=0,y=128,b=72;for((n=t.lastIndexOf("-"))<0&&(n=0),i=0;i<n;++i)t.charCodeAt(i)>=128&&m("not-basic"),h.push(t.charCodeAt(i));for(o=n>0?n+1:0;o<f;){for(r=g,a=1,s=d;o>=f&&m("invalid-input"),((c=x(t.charCodeAt(o++)))>=d||c>v((l-g)/a))&&m("overflow"),g+=c*a,!(c<(p=s<=b?1:s>=b+26?26:s-b));s+=d)a>v(l/(u=d-p))&&m("overflow"),a*=u;b=D(g-r,e=h.length+1,0==r),v(g/e)>l-y&&m("overflow"),y+=v(g/e),g%=e,h.splice(g++,0,y)}return C(h)}function E(t){var e,n,i,o,r,a,s,c,p,u,h,f,y,b,C,x=[];for(f=(t=w(t)).length,e=128,n=0,r=72,a=0;a<f;++a)(h=t[a])<128&&x.push(g(h));for(i=o=x.length,o&&x.push("-");i<f;){for(s=l,a=0;a<f;++a)(h=t[a])>=e&&h<s&&(s=h);for(s-e>v((l-n)/(y=i+1))&&m("overflow"),n+=(s-e)*y,e=s,a=0;a<f;++a)if((h=t[a])<e&&++n>l&&m("overflow"),h==e){for(c=n,p=d;!(c<(u=p<=r?1:p>=r+26?26:p-r));p+=d)C=c-u,b=d-u,x.push(g(A(u+C%b,0))),c=v(C/b);x.push(g(A(c,0))),r=D(n,y,i==o),n=0,++i}++n,++e}return x.join("")}if(s={version:"1.4.1",ucs2:{decode:w,encode:C},decode:k,encode:E,toASCII:function(t){return b(t,function(t){return u.test(t)?"xn--"+E(t):t})},toUnicode:function(t){return b(t,function(t){return p.test(t)?k(t.slice(4).toLowerCase()):t})}},o&&r)if(e.exports==o)r.exports=s;else for(c in s)s.hasOwnProperty(c)&&(o[c]=s[c]);else i.punycode=s}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],91:[function(t,e,n){var i=String.prototype.replace,o=/%20/g,r="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(t){return i.call(t,o,"+")},RFC3986:function(t){return String(t)}},RFC1738:r,RFC3986:a}},{}],92:[function(t,e,n){var i=t("./stringify"),o=t("./parse"),r=t("./formats");e.exports={formats:r,parse:o,stringify:i}},{"./formats":91,"./parse":93,"./stringify":94}],93:[function(t,e,n){var i=t("./utils"),o=Object.prototype.hasOwnProperty,r=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:i.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},s=function(t){return t.replace(/&#(\d+);/g,function(t,e){return String.fromCharCode(parseInt(e,10))})},c=function(t,e,n){if(t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&n>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(1===e.arrayLimit?"":"s")+" allowed in an array.");return t},l=function(t,e,n,r){if(t){var a=function(t,e){var n=e.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t;if(e.depth<=0){if(!e.plainObjects&&o.call(Object.prototype,n)&&!e.allowPrototypes)return;return[n]}var i=/(\[[^[\]]*])/g,r=/(\[[^[\]]*])/.exec(n),a=r?n.slice(0,r.index):n,s=[];if(a){if(!e.plainObjects&&o.call(Object.prototype,a)&&!e.allowPrototypes)return;s[s.length]=a}for(var c=0;null!==(r=i.exec(n))&&c<e.depth;){c+=1;var l=r[1].slice(1,-1);if(!e.plainObjects&&o.call(Object.prototype,l)&&!e.allowPrototypes)return;s[s.length]=r[1]}if(r){if(!0===e.strictDepth)throw new RangeError("Input depth exceeded depth option of "+e.depth+" and strictDepth is true");s[s.length]="["+n.slice(r.index)+"]"}return s}(t,n);if(a)return function(t,e,n,o){var r=0;if(t.length>0&&"[]"===t[t.length-1]){var a=t.slice(0,-1).join("");r=Array.isArray(e)&&e[a]?e[a].length:0}for(var s=o?e:c(e,n,r),l=t.length-1;l>=0;--l){var d,p=t[l];if("[]"===p&&n.parseArrays)d=i.isOverflow(s)?s:n.allowEmptyArrays&&(""===s||n.strictNullHandling&&null===s)?[]:i.combine([],s,n.arrayLimit,n.plainObjects);else{d=n.plainObjects?{__proto__:null}:{};var u="["===p.charAt(0)&&"]"===p.charAt(p.length-1)?p.slice(1,-1):p,h=n.decodeDotInKeys?u.replace(/%2E/g,"."):u,f=parseInt(h,10),v=!isNaN(f)&&p!==h&&String(f)===h&&f>=0&&n.parseArrays;if(n.parseArrays||""!==h)if(v&&f<n.arrayLimit)(d=[])[f]=s;else{if(v&&n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(1===n.arrayLimit?"":"s")+" allowed in an array.");v?(d[f]=s,i.markOverflow(d,f)):"__proto__"!==h&&(d[h]=s)}else d={0:s}}s=d}return s}(a,e,n,r)}};e.exports=function(t,e){var n=function(t){if(!t)return a;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==t.throwOnLimitExceeded&&"boolean"!=typeof t.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var e=void 0===t.charset?a.charset:t.charset,n=void 0===t.duplicates?a.duplicates:t.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||a.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:a.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:a.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:a.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:a.decoder,delimiter:"string"==typeof t.delimiter||i.isRegExp(t.delimiter)?t.delimiter:a.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:a.depth,duplicates:n,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:a.strictDepth,strictMerge:"boolean"==typeof t.strictMerge?!!t.strictMerge:a.strictMerge,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof t.throwOnLimitExceeded&&t.throwOnLimitExceeded}}(e);if(""===t||null==t)return n.plainObjects?{__proto__:null}:{};for(var d="string"==typeof t?function(t,e){var n={__proto__:null},l=e.ignoreQueryPrefix?t.replace(/^\?/,""):t;l=l.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var d=e.parameterLimit===1/0?void 0:e.parameterLimit,p=l.split(e.delimiter,e.throwOnLimitExceeded?d+1:d);if(e.throwOnLimitExceeded&&p.length>d)throw new RangeError("Parameter limit exceeded. Only "+d+" parameter"+(1===d?"":"s")+" allowed.");var u,h=-1,f=e.charset;if(e.charsetSentinel)for(u=0;u<p.length;++u)0===p[u].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[u]?f="utf-8":"utf8=%26%2310003%3B"===p[u]&&(f="iso-8859-1"),h=u,u=p.length);for(u=0;u<p.length;++u)if(u!==h){var v,g,m=p[u],y=m.indexOf("]="),b=-1===y?m.indexOf("="):y+1;if(-1===b?(v=e.decoder(m,a.decoder,f,"key"),g=e.strictNullHandling?null:""):null!==(v=e.decoder(m.slice(0,b),a.decoder,f,"key"))&&(g=i.maybeMap(c(m.slice(b+1),e,r(n[v])?n[v].length:0),function(t){return e.decoder(t,a.decoder,f,"value")})),g&&e.interpretNumericEntities&&"iso-8859-1"===f&&(g=s(String(g))),m.indexOf("[]=")>-1&&(g=r(g)?[g]:g),e.comma&&r(g)&&g.length>e.arrayLimit){if(e.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(1===e.arrayLimit?"":"s")+" allowed in an array.");g=i.combine([],g,e.arrayLimit,e.plainObjects)}if(null!==v){var w=o.call(n,v);w&&("combine"===e.duplicates||m.indexOf("[]=")>-1)?n[v]=i.combine(n[v],g,e.arrayLimit,e.plainObjects):w&&"last"!==e.duplicates||(n[v]=g)}}return n}(t,n):t,p=n.plainObjects?{__proto__:null}:{},u=Object.keys(d),h=0;h<u.length;++h){var f=u[h],v=l(f,d[f],n,"string"==typeof t);p=i.merge(p,v,n)}return!0===n.allowSparse?p:i.compact(p)}},{"./utils":95}],94:[function(t,e,n){var i=t("side-channel"),o=t("./utils"),r=t("./formats"),a=Object.prototype.hasOwnProperty,s={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},c=Array.isArray,l=Array.prototype.push,d=function(t,e){l.apply(t,c(e)?e:[e])},p=Date.prototype.toISOString,u=r.default,h={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o.encode,encodeValuesOnly:!1,filter:void 0,format:u,formatter:r.formatters[u],indices:!1,serializeDate:function(t){return p.call(t)},skipNulls:!1,strictNullHandling:!1},f={},v=function t(e,n,r,a,s,l,p,u,v,g,m,y,b,w,C,x,A,D){for(var k,E=e,S=D,P=0,T=!1;void 0!==(S=S.get(f))&&!T;){var _=S.get(e);if(P+=1,void 0!==_){if(_===P)throw new RangeError("Cyclic object value");T=!0}void 0===S.get(f)&&(P=0)}if("function"==typeof g?E=g(n,E):E instanceof Date?E=b(E):"comma"===r&&c(E)&&(E=o.maybeMap(E,function(t){return t instanceof Date?b(t):t})),null===E){if(l)return v&&!x?v(n,h.encoder,A,"key",w):n;E=""}if("string"==typeof(k=E)||"number"==typeof k||"boolean"==typeof k||"symbol"===_typeof(k)||"bigint"==typeof k||o.isBuffer(E))return v?[C(x?n:v(n,h.encoder,A,"key",w))+"="+C(v(E,h.encoder,A,"value",w))]:[C(n)+"="+C(String(E))];var F,I=[];if(void 0===E)return I;if("comma"===r&&c(E))x&&v&&(E=o.maybeMap(E,v)),F=[{value:E.length>0?E.join(",")||null:void 0}];else if(c(g))F=g;else{var L=Object.keys(E);F=m?L.sort(m):L}var M=u?String(n).replace(/\./g,"%2E"):String(n),R=a&&c(E)&&1===E.length?M+"[]":M;if(s&&c(E)&&0===E.length)return R+"[]";for(var B=0;B<F.length;++B){var H=F[B],V="object"===_typeof(H)&&H&&void 0!==H.value?H.value:E[H];if(!p||null!==V){var j=y&&u?String(H).replace(/\./g,"%2E"):String(H),O=c(E)?"function"==typeof r?r(R,j):R:R+(y?"."+j:"["+j+"]");D.set(e,P);var N=i();N.set(f,D),d(I,t(V,O,r,a,s,l,p,u,"comma"===r&&x&&c(E)?null:v,g,m,y,b,w,C,x,A,N))}}return I};e.exports=function(t,e){var n,o=t,l=function(t){if(!t)return h;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.encodeDotInKeys&&"boolean"!=typeof t.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||h.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=r.default;if(void 0!==t.format){if(!a.call(r.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i,o=r.formatters[n],l=h.filter;if(("function"==typeof t.filter||c(t.filter))&&(l=t.filter),i=t.arrayFormat in s?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":h.arrayFormat,"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var d=void 0===t.allowDots?!0===t.encodeDotInKeys||h.allowDots:!!t.allowDots;return{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:h.addQueryPrefix,allowDots:d,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:h.allowEmptyArrays,arrayFormat:i,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:h.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:void 0===t.delimiter?h.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:h.encode,encodeDotInKeys:"boolean"==typeof t.encodeDotInKeys?t.encodeDotInKeys:h.encodeDotInKeys,encoder:"function"==typeof t.encoder?t.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:h.encodeValuesOnly,filter:l,format:n,formatter:o,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:h.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:h.strictNullHandling}}(e);"function"==typeof l.filter?o=(0,l.filter)("",o):c(l.filter)&&(n=l.filter);var p=[];if("object"!==_typeof(o)||null===o)return"";var u=s[l.arrayFormat],f="comma"===u&&l.commaRoundTrip;n||(n=Object.keys(o)),l.sort&&n.sort(l.sort);for(var g=i(),m=0;m<n.length;++m){var y=n[m],b=o[y];l.skipNulls&&null===b||d(p,v(b,y,u,f,l.allowEmptyArrays,l.strictNullHandling,l.skipNulls,l.encodeDotInKeys,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,g))}var w=p.join(l.delimiter),C=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?C+="utf8=%26%2310003%3B&":C+="utf8=%E2%9C%93&"),w.length>0?C+w:""}},{"./formats":91,"./utils":95,"side-channel":99}],95:[function(t,e,n){var i=t("./formats"),o=t("side-channel"),r=Object.prototype.hasOwnProperty,a=Array.isArray,s=o(),c=function(t,e){return s.set(t,e),t},l=function(t){return s.has(t)},d=function(t){return s.get(t)},p=function(t,e){s.set(t,e)},u=function(){for(var t=[],e=0;e<256;++e)t[t.length]="%"+((e<16?"0":"")+e.toString(16)).toUpperCase();return t}(),h=function(t,e){for(var n=e&&e.plainObjects?{__proto__:null}:{},i=0;i<t.length;++i)void 0!==t[i]&&(n[i]=t[i]);return n},f=1024;e.exports={arrayToObject:h,assign:function(t,e){return Object.keys(e).reduce(function(t,n){return t[n]=e[n],t},t)},combine:function(t,e,n,i){if(l(t)){var o=d(t)+1;return t[o]=e,p(t,o),t}var r=[].concat(t,e);return r.length>n?c(h(r,{plainObjects:i}),r.length-1):r},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],i=0;i<e.length;++i)for(var o=e[i],r=o.obj[o.prop],s=Object.keys(r),c=0;c<s.length;++c){var l=s[c],d=r[l];"object"===_typeof(d)&&null!==d&&-1===n.indexOf(d)&&(e[e.length]={obj:r,prop:l},n[n.length]=d)}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(a(n)){for(var i=[],o=0;o<n.length;++o)void 0!==n[o]&&(i[i.length]=n[o]);e.obj[e.prop]=i}}}(e),t},decode:function(t,e,n){var i=t.replace(/\+/g," ");if("iso-8859-1"===n)return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch(t){return i}},encode:function(t,e,n,o,r){if(0===t.length)return t;var a=t;if("symbol"===_typeof(t)?a=Symbol.prototype.toString.call(t):"string"!=typeof t&&(a=String(t)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"});for(var s="",c=0;c<a.length;c+=f){for(var l=a.length>=f?a.slice(c,c+f):a,d=[],p=0;p<l.length;++p){var h=l.charCodeAt(p);45===h||46===h||95===h||126===h||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||r===i.RFC1738&&(40===h||41===h)?d[d.length]=l.charAt(p):h<128?d[d.length]=u[h]:h<2048?d[d.length]=u[192|h>>6]+u[128|63&h]:h<55296||h>=57344?d[d.length]=u[224|h>>12]+u[128|h>>6&63]+u[128|63&h]:(p+=1,h=65536+((1023&h)<<10|1023&l.charCodeAt(p)),d[d.length]=u[240|h>>18]+u[128|h>>12&63]+u[128|h>>6&63]+u[128|63&h])}s+=d.join("")}return s},isBuffer:function(t){return!(!t||"object"!==_typeof(t))&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isOverflow:l,isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},markOverflow:c,maybeMap:function(t,e){if(a(t)){for(var n=[],i=0;i<t.length;i+=1)n[n.length]=e(t[i]);return n}return e(t)},merge:function t(e,n,i){if(!n)return e;if("object"!==_typeof(n)&&"function"!=typeof n){if(a(e)){var o=e.length;if(i&&"number"==typeof i.arrayLimit&&o>i.arrayLimit)return c(h(e.concat(n),i),o);e[o]=n}else{if(!e||"object"!==_typeof(e))return[e,n];if(l(e)){var s=d(e)+1;e[s]=n,p(e,s)}else{if(i&&i.strictMerge)return[e,n];(i&&(i.plainObjects||i.allowPrototypes)||!r.call(Object.prototype,n))&&(e[n]=!0)}}return e}if(!e||"object"!==_typeof(e)){if(l(n)){for(var u=Object.keys(n),f=i&&i.plainObjects?{__proto__:null,0:e}:{0:e},v=0;v<u.length;v++){f[parseInt(u[v],10)+1]=n[u[v]]}return c(f,d(n)+1)}var g=[e].concat(n);return i&&"number"==typeof i.arrayLimit&&g.length>i.arrayLimit?c(h(g,i),g.length-1):g}var m=e;return a(e)&&!a(n)&&(m=h(e,i)),a(e)&&a(n)?(n.forEach(function(n,o){if(r.call(e,o)){var a=e[o];a&&"object"===_typeof(a)&&n&&"object"===_typeof(n)?e[o]=t(a,n,i):e[e.length]=n}else e[o]=n}),e):Object.keys(n).reduce(function(e,o){var a=n[o];if(r.call(e,o)?e[o]=t(e[o],a,i):e[o]=a,l(n)&&!l(e)&&c(e,d(n)),l(e)){var s=parseInt(o,10);String(s)===o&&s>=0&&s>d(e)&&p(e,s)}return e},m)}}},{"./formats":91,"side-channel":99}],96:[function(t,e,n){var i=t("object-inspect"),o=t("es-errors/type"),r=function(t,e,n){for(var i,o=t;null!=(i=o.next);o=i)if(i.key===e)return o.next=i.next,n||(i.next=t.next,t.next=i),i};e.exports=function(){var t,e={assert:function(t){if(!e.has(t))throw new o("Side channel does not contain "+i(t))},delete:function(e){var n=t&&t.next,i=function(t,e){if(t)return r(t,e,!0)}(t,e);return i&&n&&n===i&&(t=void 0),!!i},get:function(e){return function(t,e){if(t){var n=r(t,e);return n&&n.value}}(t,e)},has:function(e){return function(t,e){return!!t&&!!r(t,e)}(t,e)},set:function(e,n){t||(t={next:void 0}),function(t,e,n){var i=r(t,e);i?i.value=n:t.next={key:e,next:t.next,value:n}}(t,e,n)}};return e}},{"es-errors/type":16,"object-inspect":41}],97:[function(t,e,n){var i=t("get-intrinsic"),o=t("call-bound"),r=t("object-inspect"),a=t("es-errors/type"),s=i("%Map%",!0),c=o("Map.prototype.get",!0),l=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),p=o("Map.prototype.delete",!0),u=o("Map.prototype.size",!0);e.exports=!!s&&function(){var t,e={assert:function(t){if(!e.has(t))throw new a("Side channel does not contain "+r(t))},delete:function(e){if(t){var n=p(t,e);return 0===u(t)&&(t=void 0),n}return!1},get:function(e){if(t)return c(t,e)},has:function(e){return!!t&&d(t,e)},set:function(e,n){t||(t=new s),l(t,e,n)}};return e}},{"call-bound":8,"es-errors/type":16,"get-intrinsic":23,"object-inspect":41}],98:[function(t,e,n){var i=t("get-intrinsic"),o=t("call-bound"),r=t("object-inspect"),a=t("side-channel-map"),s=t("es-errors/type"),c=i("%WeakMap%",!0),l=o("WeakMap.prototype.get",!0),d=o("WeakMap.prototype.set",!0),p=o("WeakMap.prototype.has",!0),u=o("WeakMap.prototype.delete",!0);e.exports=c?function(){var t,e,n={assert:function(t){if(!n.has(t))throw new s("Side channel does not contain "+r(t))},delete:function(n){if(c&&n&&("object"===_typeof(n)||"function"==typeof n)){if(t)return u(t,n)}else if(a&&e)return e.delete(n);return!1},get:function(n){return c&&n&&("object"===_typeof(n)||"function"==typeof n)&&t?l(t,n):e&&e.get(n)},has:function(n){return c&&n&&("object"===_typeof(n)||"function"==typeof n)&&t?p(t,n):!!e&&e.has(n)},set:function(n,i){c&&n&&("object"===_typeof(n)||"function"==typeof n)?(t||(t=new c),d(t,n,i)):a&&(e||(e=a()),e.set(n,i))}};return n}:a},{"call-bound":8,"es-errors/type":16,"get-intrinsic":23,"object-inspect":41,"side-channel-map":97}],99:[function(t,e,n){var i=t("es-errors/type"),o=t("object-inspect"),r=t("side-channel-list"),a=t("side-channel-map"),s=t("side-channel-weakmap")||a||r;e.exports=function(){var t,e={assert:function(t){if(!e.has(t))throw new i("Side channel does not contain "+o(t))},delete:function(e){return!!t&&t.delete(e)},get:function(e){return t&&t.get(e)},has:function(e){return!!t&&t.has(e)},set:function(e,n){t||(t=s()),t.set(e,n)}};return e}},{"es-errors/type":16,"object-inspect":41,"side-channel-list":96,"side-channel-map":97,"side-channel-weakmap":98}],100:[function(t,e,n){var i=t("punycode/");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var r=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),d=["%","/","?",";","#"].concat(l),p=["/","?","#"],u=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=t("qs");function y(t,e,n){if(t&&"object"===_typeof(t)&&t instanceof o)return t;var i=new o;return i.parse(t,e,n),i}o.prototype.parse=function(t,e,n){if("string"!=typeof t)throw new TypeError("Parameter 'url' must be a string, not "+_typeof(t));var o=t.indexOf("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",c=t.split(a);c[0]=c[0].replace(/\\/g,"/");var y=t=c.join(a);if(y=y.trim(),!n&&1===t.split("#").length){var b=s.exec(y);if(b)return this.path=y,this.href=y,this.pathname=b[1],b[2]?(this.search=b[2],this.query=e?m.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var w=r.exec(y);if(w){var C=(w=w[0]).toLowerCase();this.protocol=C,y=y.substr(w.length)}if(n||w||y.match(/^\/\/[^@/]+@[^@/]+/)){var x="//"===y.substr(0,2);!x||w&&v[w]||(y=y.substr(2),this.slashes=!0)}if(!v[w]&&(x||w&&!g[w])){for(var A,D,k=-1,E=0;E<p.length;E++){-1!==(S=y.indexOf(p[E]))&&(-1===k||S<k)&&(k=S)}-1!==(D=-1===k?y.lastIndexOf("@"):y.lastIndexOf("@",k))&&(A=y.slice(0,D),y=y.slice(D+1),this.auth=decodeURIComponent(A)),k=-1;for(E=0;E<d.length;E++){var S;-1!==(S=y.indexOf(d[E]))&&(-1===k||S<k)&&(k=S)}-1===k&&(k=y.length),this.host=y.slice(0,k),y=y.slice(k),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var T=this.hostname.split(/\./),_=(E=0,T.length);E<_;E++){var F=T[E];if(F&&!F.match(u)){for(var I="",L=0,M=F.length;L<M;L++)F.charCodeAt(L)>127?I+="x":I+=F[L];if(!I.match(u)){var R=T.slice(0,E),B=T.slice(E+1),H=F.match(h);H&&(R.push(H[1]),B.unshift(H[2])),B.length&&(y="/"+B.join(".")+y),this.hostname=R.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=i.toASCII(this.hostname));var V=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+V,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!f[C])for(E=0,_=l.length;E<_;E++){var O=l[E];if(-1!==y.indexOf(O)){var N=encodeURIComponent(O);N===O&&(N=escape(O)),y=y.split(O).join(N)}}var U=y.indexOf("#");-1!==U&&(this.hash=y.substr(U),y=y.slice(0,U));var z=y.indexOf("?");if(-1!==z?(this.search=y.substr(z),this.query=y.substr(z+1),e&&(this.query=m.parse(this.query)),y=y.slice(0,z)):e&&(this.search="",this.query={}),y&&(this.pathname=y),g[C]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){V=this.pathname||"";var W=this.search||"";this.path=V+W}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",i=this.hash||"",o=!1,r="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&"object"===_typeof(this.query)&&Object.keys(this.query).length&&(r=m.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var a=this.search||r&&"?"+r||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||g[e])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),a&&"?"!==a.charAt(0)&&(a="?"+a),e+o+(n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(a=a.replace("#","%23"))+i},o.prototype.resolve=function(t){return this.resolveObject(y(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if("string"==typeof t){var e=new o;e.parse(t,!1,!0),t=e}for(var n=new o,i=Object.keys(this),r=0;r<i.length;r++){var a=i[r];n[a]=this[a]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),c=0;c<s.length;c++){var l=s[c];"protocol"!==l&&(n[l]=t[l])}return g[n.protocol]&&n.hostname&&!n.pathname&&(n.pathname="/",n.path=n.pathname),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!g[t.protocol]){for(var d=Object.keys(t),p=0;p<d.length;p++){var u=d[p];n[u]=t[u]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||v[t.protocol])n.pathname=t.pathname;else{for(var h=(t.pathname||"").split("/");h.length&&!(t.host=h.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var f=n.pathname||"",m=n.search||"";n.path=f+m}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),b=t.host||t.pathname&&"/"===t.pathname.charAt(0),w=b||y||n.host&&t.pathname,C=w,x=n.pathname&&n.pathname.split("/")||[],A=(h=t.pathname&&t.pathname.split("/")||[],n.protocol&&!g[n.protocol]);if(A&&(n.hostname="",n.port=null,n.host&&(""===x[0]?x[0]=n.host:x.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===h[0]?h[0]=t.host:h.unshift(t.host)),t.host=null),w=w&&(""===h[0]||""===x[0])),b)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,x=h;else if(h.length)x||(x=[]),x.pop(),x=x.concat(h),n.search=t.search,n.query=t.query;else if(null!=t.search){if(A)n.host=x.shift(),n.hostname=n.host,(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.hostname=P.shift(),n.host=n.hostname);return n.search=t.search,n.query=t.query,null===n.pathname&&null===n.search||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var D=x.slice(-1)[0],k=(n.host||t.host||x.length>1)&&("."===D||".."===D)||""===D,E=0,S=x.length;S>=0;S--)"."===(D=x[S])?x.splice(S,1):".."===D?(x.splice(S,1),E++):E&&(x.splice(S,1),E--);if(!w&&!C)for(;E--;E)x.unshift("..");!w||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),k&&"/"!==x.join("/").substr(-1)&&x.push("");var P,T=""===x[0]||x[0]&&"/"===x[0].charAt(0);A&&(n.hostname=T?"":x.length?x.shift():"",n.host=n.hostname,(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.hostname=P.shift(),n.host=n.hostname));return(w=w||n.host&&x.length)&&!T&&x.unshift(""),x.length>0?n.pathname=x.join("/"):(n.pathname=null,n.path=null),null===n.pathname&&null===n.search||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},n.parse=y,n.resolve=function(t,e){return y(t,!1,!0).resolve(e)},n.resolveObject=function(t,e){return t?y(t,!1,!0).resolveObject(e):e},n.format=function(t){return"string"==typeof t&&(t=y(t)),t instanceof o?t.format():o.prototype.format.call(t)},n.Url=o},{"punycode/":90,qs:92}],101:[function(t,e,n){e.exports={Name:"Retold Content Editor",Hash:"ContentEditor",MainViewportViewIdentifier:"ContentEditor-Layout",AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!1,AutoRenderViewsAfterInitialize:!1,pict_configuration:{Product:"ContentEditor-Pict-Application"}}},{}],102:[function(t,e,n){var i=t("pict-application"),o=t("pict-section-filebrowser"),r=t("./providers/Pict-Provider-ContentEditor.js"),a=t("./views/PictView-Editor-Layout.js"),s=t("./views/PictView-Editor-TopBar.js"),c=t("./views/PictView-Editor-MarkdownEditor.js"),l=t("./views/PictView-Editor-CodeEditor.js"),d=t("./views/PictView-Editor-SettingsPanel.js"),p=t("./views/PictView-Editor-MarkdownReference.js"),u=t("./views/PictView-Editor-Topics.js"),h=function(t){function e(t,n,i){var h;_classCallCheck(this,e),(h=_callSuper(this,e,[t,n,i])).pict.addProvider("ContentEditor-Provider",r.default_configuration,r),h.pict.addView("ContentEditor-Layout",a.default_configuration,a),h.pict.addView("ContentEditor-TopBar",s.default_configuration,s),h.pict.addView("ContentEditor-MarkdownEditor",c.default_configuration,c),h.pict.addView("ContentEditor-CodeEditor",l.default_configuration,l),h.pict.addView("ContentEditor-SettingsPanel",d.default_configuration,d),h.pict.addView("ContentEditor-MarkdownReference",p.default_configuration,p),h.pict.addView("ContentEditor-Topics",u.default_configuration,u);var f=JSON.parse(JSON.stringify(o.default_configuration));f.DefaultDestinationAddress="#ContentEditor-Sidebar-Container",f.DefaultState.Layout="list-only",h.pict.addView("Pict-FileBrowser",f,o);for(var v=JSON.parse(JSON.stringify(o.PictViewListDetail.default_configuration)),g=0;g<v.Templates.length;g++)"FileBrowser-ListDetail-Container-Template"===v.Templates[g].Hash&&(v.Templates[g].Template='\n<div class="pict-fb-detail" id="Pict-FileBrowser-DetailList">\n\t<div class="pict-fb-breadcrumb-bar">\n\t\t<div class="pict-fb-breadcrumb" id="Pict-FileBrowser-Breadcrumb"></div>\n\t\t<button class="pict-fb-breadcrumb-addfolder" onclick="pict.PictApplication.promptNewFolder()" title="New folder">+</button>\n\t</div>\n\t<div class="pict-fb-detail-header">\n\t\t<div class="pict-fb-detail-header-cell pict-fb-detail-col-name" onclick="pict.views[\'{~D:Record.ViewHash~}\'].sortBy(\'Name\')">Name</div>\n\t\t<div class="pict-fb-detail-header-cell pict-fb-detail-col-size" onclick="pict.views[\'{~D:Record.ViewHash~}\'].sortBy(\'Size\')">Size</div>\n\t\t<div class="pict-fb-detail-header-cell pict-fb-detail-col-modified" onclick="pict.views[\'{~D:Record.ViewHash~}\'].sortBy(\'Modified\')">Modified</div>\n\t</div>\n\t<div id="Pict-FileBrowser-DetailRows"></div>\n</div>\n'),"FileBrowser-ListDetail-Row-Template"===v.Templates[g].Hash&&(v.Templates[g].Template='\n<div class="pict-fb-detail-row{~D:Record.SelectedClass~}" data-index="{~D:Record.Index~}" data-name="{~D:Record.Name~}" onclick="{~D:Record.ClickHandler~}" ondblclick="{~D:Record.DblClickHandler~}">\n\t<span class="pict-fb-detail-icon">{~D:Record.Icon~}</span>\n\t<span class="pict-fb-detail-name">{~D:Record.Name~}</span>\n\t<span class="pict-fb-detail-size">{~D:Record.SizeFormatted~}</span>\n\t<span class="pict-fb-detail-modified">{~D:Record.ModifiedFormatted~}</span>\n\t<button class="pict-fb-insert-btn" onclick="event.stopPropagation(); pict.PictApplication.insertFileReference(this.parentElement.getAttribute(\'data-name\'))" title="Insert into editor">+</button>\n</div>\n');return h.pict.addView("Pict-FileBrowser-ListDetail",v,o.PictViewListDetail),h}return _inherits(e,t),_createClass(e,[{key:"onAfterInitializeAsync",value:function(t){"undefined"!=typeof window&&(window.pict=this.pict),this.pict.AppData.ContentEditor={CurrentFile:"",ActiveEditor:"markdown",IsDirty:!1,IsSaving:!1,IsLoading:!1,Files:[],Document:{Segments:[{Content:""}]},CodeContent:"",SaveStatus:"",SaveStatusClass:"",AutoSegmentMarkdown:!1,AutoSegmentDepth:1,ContentPreviewMode:"off",MarkdownEditingControls:!0,MarkdownWordWrap:!0,CodeWordWrap:!1,SidebarCollapsed:!1,SidebarWidth:250,AutoPreviewImages:!0,AutoPreviewVideo:!1,AutoPreviewAudio:!1,ShowHiddenFiles:!1,TopicsFilePath:".pict_documentation_topics.json"},this._loadSettings(),this.pict.views["ContentEditor-Layout"].render();var n=this,i=this.pict.providers["Pict-FileBrowser-List"];if(i){var o=i.selectFile.bind(i);i.selectFile=function(t){o(t),t&&"file"===t.Type&&n.navigateToFile(t.Path)}}var r=this.pict.providers["Pict-FileBrowser-Browse"];if(r){var a=r.navigateToFolder.bind(r);r.navigateToFolder=function(t){a(t),n.loadFileList(t)}}this.syncHiddenFilesSetting(function(){n.loadFileList(null,function(){n.resolveHash()})});var s=this.pict.AppData.ContentEditor.TopicsFilePath;if(s){var c=this.pict.views["ContentEditor-Topics"];c&&c.loadTopicsFile(s,function(){})}return _superPropGet(e,"onAfterInitializeAsync",this,3)([t])}},{key:"syncHiddenFilesSetting",value:function(t){var e="function"==typeof t?t:function(){},n=this.pict.AppData.ContentEditor.ShowHiddenFiles;fetch("/api/filebrowser/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({IncludeHiddenFiles:!!n})}).then(function(){return e()}).catch(function(){return e()})}},{key:"loadFileList",value:function(t,e){var n="function"==typeof e?e:"function"==typeof t?t:function(){},i=this,o="string"==typeof t?t:null;null===o&&this.pict.AppData.PictFileBrowser&&this.pict.AppData.PictFileBrowser.CurrentLocation&&(o=this.pict.AppData.PictFileBrowser.CurrentLocation);var r="/api/filebrowser/list";o&&o.length>0&&(r+="?path="+encodeURIComponent(o)),fetch(r).then(function(t){return t.json()}).then(function(t){i.pict.AppData.PictFileBrowser=i.pict.AppData.PictFileBrowser||{},i.pict.AppData.PictFileBrowser.FileList=t||[];var e=i.pict.views["Pict-FileBrowser"];e&&e.render();var o=i.pict.views["Pict-FileBrowser-ListDetail"];return o&&o.render(),n()}).catch(function(t){return i.log.error("Failed to load file list: ".concat(t.message)),n()})}},{key:"resolveHash",value:function(){var t=(window.location.hash||"").replace(/^#\/?/,"");if(t){var e=t.split("/");if("edit"===e[0]&&e.length>=2){var n=e.slice(1).join("/");if(this.pict.AppData.ContentEditor.CurrentFile===n)return;this.navigateToFile(n)}}}},{key:"getEditorTypeForFile",value:function(t){if(!t)return"markdown";var e=t.replace(/^.*\./,"").toLowerCase();if("md"===e||"markdown"===e)return"markdown";return{png:!0,jpg:!0,jpeg:!0,gif:!0,bmp:!0,webp:!0,ico:!0,svg:!0,tiff:!0,tif:!0,avif:!0,heic:!0,heif:!0,mp3:!0,wav:!0,ogg:!0,flac:!0,aac:!0,m4a:!0,wma:!0,mp4:!0,avi:!0,mkv:!0,mov:!0,wmv:!0,webm:!0,flv:!0,m4v:!0,pdf:!0,doc:!0,docx:!0,xls:!0,xlsx:!0,ppt:!0,pptx:!0,odt:!0,ods:!0,odp:!0,zip:!0,tar:!0,gz:!0,bz2:!0,xz:!0,"7z":!0,rar:!0,ttf:!0,otf:!0,woff:!0,woff2:!0,eot:!0,exe:!0,dll:!0,so:!0,dylib:!0,o:!0,class:!0,pyc:!0,wasm:!0}[e]?"binary":"code"}},{key:"_cleanupEditors",value:function(){var t=this.pict.views["ContentEditor-CodeEditor"];t&&(t.codeJar&&t.destroy(),t.initialRenderComplete=!1);var e=this.pict.ContentAssignment.getElement("#ContentEditor-Editor-Container");e&&e[0]&&(e[0].innerHTML="")}},{key:"_formatFileSize",value:function(t){if(0===t)return"0 B";var e=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(t)/Math.log(1024));return n>=e.length&&(n=e.length-1),(t/Math.pow(1024,n)).toFixed(0===n?0:1)+" "+e[n]}},{key:"_getMediaType",value:function(t){return{png:!0,jpg:!0,jpeg:!0,gif:!0,webp:!0,svg:!0,bmp:!0,ico:!0,avif:!0}[t]?"image":{mp4:!0,webm:!0,mov:!0,mkv:!0,avi:!0,wmv:!0,flv:!0,m4v:!0,ogv:!0}[t]?"video":{mp3:!0,wav:!0,ogg:!0,flac:!0,aac:!0,m4a:!0,wma:!0,oga:!0}[t]?"audio":"other"}},{key:"_buildMediaPreviewHTML",value:function(t,e,n){return"image"===t?'<div class="binary-preview-image-wrap"><div class="binary-preview-image"><img src="'+e+'" alt="'+n+'"></div></div>':"video"===t?'<div class="binary-preview-media-wrap"><video class="binary-preview-video" controls preload="metadata"><source src="'+e+'">Your browser does not support the video tag.</video></div>':"audio"===t?'<div class="binary-preview-media-wrap"><audio class="binary-preview-audio" controls preload="metadata"><source src="'+e+'">Your browser does not support the audio tag.</audio></div>':""}},{key:"loadMediaPreview",value:function(t,e,n){var i=document.getElementById("ContentEditor-MediaPreviewPlaceholder");i&&(i.innerHTML=this._buildMediaPreviewHTML(t,e,n))}},{key:"_showBinaryPreview",value:function(t){var e=this,n=t.replace(/^.*\//,""),i=t.replace(/^.*\./,"").toLowerCase(),o="/content/"+encodeURIComponent(t),r=this._getMediaType(i),a=this.pict.AppData.ContentEditor,s=!1;"image"===r&&(s=a.AutoPreviewImages),"video"===r&&(s=a.AutoPreviewVideo),"audio"===r&&(s=a.AutoPreviewAudio),fetch("/api/filebrowser/info?path="+encodeURIComponent(t)).then(function(t){return t.json()}).then(function(t){var a=t&&"number"==typeof t.Size?e._formatFileSize(t.Size):"Unknown",c=t&&t.Modified?new Date(t.Modified).toLocaleString():"Unknown",l=e.pict.ContentAssignment.getElement("#ContentEditor-Editor-Container");if(l&&l[0]){var d="";"other"!==r&&(s?d+=e._buildMediaPreviewHTML(r,o,n):(d+='<div id="ContentEditor-MediaPreviewPlaceholder">',d+='<button class="binary-preview-btn binary-preview-btn-preview"',d+=' onclick="pict.PictApplication.loadMediaPreview(',d+="'"+r+"','"+o+"','"+n.replace(/'/g,"\\'")+"'",d+=')">Preview '+r.charAt(0).toUpperCase()+r.slice(1)+"</button>",d+="</div>")),d+='<div class="binary-preview-card">',d+='<div class="binary-preview-icon">'+i.toUpperCase()+"</div>",d+='<div class="binary-preview-info">',d+='<div class="binary-preview-name">'+n+"</div>",d+='<div class="binary-preview-meta">Size: '+a+"</div>",d+='<div class="binary-preview-meta">Modified: '+c+"</div>",d+='<div class="binary-preview-meta">Type: .'+i+"</div>",d+="</div>",d+='<div class="binary-preview-actions">',d+='<a class="binary-preview-btn" href="'+o+'" download="'+n+'">Download</a>',d+='<a class="binary-preview-btn binary-preview-btn-secondary" href="'+o+'" target="_blank">Open in New Tab</a>',d+="</div>",d+="</div>",l[0].innerHTML=d}}).catch(function(){var t=e.pict.ContentAssignment.getElement("#ContentEditor-Editor-Container");t&&t[0]&&(t[0].innerHTML='<div class="binary-preview-card"><div class="binary-preview-icon">'+i.toUpperCase()+'</div><div class="binary-preview-info"><div class="binary-preview-name">'+n+'</div><div class="binary-preview-meta">Binary file — cannot be edited in the browser</div></div><div class="binary-preview-actions"><a class="binary-preview-btn" href="'+o+'" download="'+n+'">Download</a><a class="binary-preview-btn binary-preview-btn-secondary" href="'+o+'" target="_blank">Open in New Tab</a></div></div>')})}},{key:"segmentMarkdownContent",value:function(t){var e=this.pict.AppData.ContentEditor;if(!e.AutoSegmentMarkdown||!t)return[{Content:t||""}];var n=parseInt(e.AutoSegmentDepth,10)||1;if(1===n){for(var i=t.split("\n"),o=[],r=[],a=!1,s=0;s<i.length;s++){var c=i[s];/^(`{3,}|~{3,})/.test(c.trim())?(a=!a,r.push(c)):a||""!==c.trim()?r.push(c):r.length>0&&(o.push({Content:r.join("\n")}),r=[])}return r.length>0&&o.push({Content:r.join("\n")}),o.length>0?o:[{Content:""}]}for(var l=new RegExp("^(#{1,"+n+"})\\s"),d=t.split("\n"),p=[],u=[],h=0;h<d.length;h++){var f=d[h];l.test(f.trim())&&u.length>0&&(p.push({Content:u.join("\n")}),u=[]),u.push(f)}return u.length>0&&p.push({Content:u.join("\n")}),p.length>0?p:[{Content:""}]}},{key:"navigateToFile",value:function(t){if(t){var e=this,n=this.getEditorTypeForFile(t);if(this.pict.AppData.ContentEditor.SaveStatus="",this.pict.AppData.ContentEditor.SaveStatusClass="",window.location.hash="#/edit/"+t,this.pict.AppData.ContentEditor.CurrentFile=t,this.pict.AppData.ContentEditor.IsDirty=!1,this.pict.AppData.ContentEditor.ActiveEditor=n,this._cleanupEditors(),this.pict.views["ContentEditor-TopBar"].render(),"binary"===n)return this._showBinaryPreview(t),void this.updateStats();var i=this.pict.providers["ContentEditor-Provider"];this.pict.AppData.ContentEditor.IsLoading=!0,i.loadFile(t,function(i,o){if(e.pict.AppData.ContentEditor.IsLoading=!1,i)return e.pict.AppData.ContentEditor.SaveStatus="Error loading file: "+i,e.pict.AppData.ContentEditor.SaveStatusClass="content-editor-status-error",void e.pict.views["ContentEditor-TopBar"].render();if("markdown"===n){e.pict.AppData.ContentEditor.Document.Segments=e.segmentMarkdownContent(o);var r=e.pict.views["ContentEditor-MarkdownEditor"];if(r){var a="/content/",s=t.lastIndexOf("/");s>0&&(a="/content/"+t.substring(0,s)+"/"),r.options.ImageBaseURL=a,r.render(),r.marshalToView(),r.setPreviewMode(e.pict.AppData.ContentEditor.ContentPreviewMode||"off"),r.toggleControls(e.pict.AppData.ContentEditor.MarkdownEditingControls)}e.updateStats()}else{e.pict.AppData.ContentEditor.CodeContent=o;var c=t.replace(/^.*\./,"").toLowerCase(),d=l.getLanguageForExtension?l.getLanguageForExtension(c):l.ExtensionLanguageMap[c]||"plaintext",p=e.pict.views["ContentEditor-CodeEditor"];p&&(p.initialRenderComplete=!1,p._language=d,p._suppressNextDirty=!0,p.render(),p.marshalToView(),e.pict.AppData.ContentEditor.CodeWordWrap&&p._editorElement&&(p._editorElement.style.whiteSpace="pre-wrap",p._editorElement.style.overflowWrap="break-word")),e.updateStats()}})}}},{key:"saveCurrentFile",value:function(){var t=this.pict.AppData.ContentEditor.CurrentFile;if(t){var e=this.pict.providers["ContentEditor-Provider"],n=this,i="";if("code"===this.pict.AppData.ContentEditor.ActiveEditor){var o=this.pict.views["ContentEditor-CodeEditor"];o&&o.marshalFromView(),i=this.pict.AppData.ContentEditor.CodeContent||""}else{var r=this.pict.views["ContentEditor-MarkdownEditor"];r&&r.marshalFromView();var a=this.pict.AppData.ContentEditor.Document.Segments;if(a&&a.length>0){for(var s=[],c=0;c<a.length;c++)s.push(a[c].Content||"");i=s.join("\n\n")}}this.pict.AppData.ContentEditor.IsSaving=!0,this.pict.AppData.ContentEditor.SaveStatus="Saving...",this.pict.AppData.ContentEditor.SaveStatusClass="content-editor-status-saving",this.pict.views["ContentEditor-TopBar"].render(),e.saveFile(t,i,function(t){n.pict.AppData.ContentEditor.IsSaving=!1,t?(n.pict.AppData.ContentEditor.SaveStatus="Error: "+t,n.pict.AppData.ContentEditor.SaveStatusClass="content-editor-status-error"):(n.pict.AppData.ContentEditor.IsDirty=!1,n.pict.AppData.ContentEditor.SaveStatus="Saved",n.pict.AppData.ContentEditor.SaveStatusClass="content-editor-status-saved",n.loadFileList(),setTimeout(function(){"Saved"===n.pict.AppData.ContentEditor.SaveStatus&&(n.pict.AppData.ContentEditor.SaveStatus="",n.pict.AppData.ContentEditor.SaveStatusClass="",n.pict.views["ContentEditor-TopBar"].render())},3e3)),n.pict.views["ContentEditor-TopBar"].render()})}}},{key:"closeCurrentFile",value:function(){this.pict.AppData.ContentEditor.CurrentFile&&(this.pict.AppData.ContentEditor.IsDirty?this._showCloseConfirmation():this._doCloseFile())}},{key:"_doCloseFile",value:function(){this._hideCloseConfirmation(),this._cleanupEditors(),this.pict.AppData.ContentEditor.CurrentFile="",this.pict.AppData.ContentEditor.ActiveEditor="markdown",this.pict.AppData.ContentEditor.IsDirty=!1,this.pict.AppData.ContentEditor.SaveStatus="",this.pict.AppData.ContentEditor.SaveStatusClass="",this.pict.AppData.ContentEditor.Document.Segments=[{Content:""}],this.pict.AppData.ContentEditor.CodeContent="",window.location.hash="",this.pict.views["ContentEditor-TopBar"].render();var t=this.pict.ContentAssignment.getElement("#ContentEditor-Editor-Container");t&&t[0]&&(t[0].innerHTML='<div style="display:flex;align-items:center;justify-content:center;height:100%;color:#8A7F72;font-size:1.1em;">Select a file from the sidebar to begin editing</div>'),this.updateStats()}},{key:"confirmCloseFile",value:function(){this._doCloseFile()}},{key:"cancelCloseFile",value:function(){this._hideCloseConfirmation()}},{key:"_showCloseConfirmation",value:function(){var t=document.getElementById("ContentEditor-ConfirmOverlay");if(t&&t.classList.add("open"),!this._confirmKeyHandler){var e=this;this._confirmKeyHandler=function(t){var n=t.key.toLowerCase();"y"===n?(t.preventDefault(),e.confirmCloseFile()):"n"!==n&&"Escape"!==t.key||(t.preventDefault(),e.cancelCloseFile())}}window.addEventListener("keydown",this._confirmKeyHandler)}},{key:"_hideCloseConfirmation",value:function(){var t=document.getElementById("ContentEditor-ConfirmOverlay");t&&t.classList.remove("open"),this._confirmKeyHandler&&window.removeEventListener("keydown",this._confirmKeyHandler)}},{key:"createNewFile",value:function(t){if(t){t.replace(/^.*\//,"").indexOf(".")<0&&(t+=".md");var e=this.pict.providers["ContentEditor-Provider"],n=this,i="";i=t.endsWith(".md")?"# "+t.replace(/\.[^.]+$/,"").replace(/^.*\//,"")+"\n\n":"// "+t.replace(/^.*\//,"")+"\n",e.saveFile(t,i,function(e){e||n.loadFileList(null,function(){n.navigateToFile(t)})})}}},{key:"promptNewFile",value:function(){var t=prompt("Enter a name for the new file (e.g. my-page.md, script.js, style.css):");t&&t.trim()&&this.createNewFile(t.trim())}},{key:"promptNewFolder",value:function(){var t=prompt("Enter a name for the new folder:");if(t&&t.trim()){t=t.trim();var e="";this.pict.AppData.PictFileBrowser&&this.pict.AppData.PictFileBrowser.CurrentLocation&&(e=this.pict.AppData.PictFileBrowser.CurrentLocation);var n=e?e+"/"+t:t,i=this;fetch("/api/content/mkdir",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({Path:n})}).then(function(t){return t.json()}).then(function(t){t&&t.Success?(i.log.info("Folder created: ".concat(n)),i.loadFileList()):alert("Could not create folder: "+(t?t.Error:"Unknown error"))}).catch(function(t){alert("Error creating folder: "+t.message)})}}},{key:"insertFileReference",value:function(t){if(t){var e=this.pict.views["ContentEditor-MarkdownEditor"];if(e&&"markdown"===this.pict.AppData.ContentEditor.ActiveEditor){var n=e._activeSegmentIndex;if(n<0){var i=e._getOrderedSegmentIndices();i.length>0&&(n=i[0])}if(!(n<0)){var o=t.replace(/\.[^.]+$/,"");o=(o=o.replace(/^\d{10,}-/,"")).replace(/[-_]+/g," ").trim()||"image";var r=t.substring(t.lastIndexOf(".")).toLowerCase();if([".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".avif",".apng",".ico",".tiff",".tif",".jfif"].indexOf(r)>=0)e._insertImageMarkdown(n,t,o);else{var a=e._segmentEditors[n];if(a){var s="["+o+"]("+t+")",c=a.state.selection.main.head;a.dispatch({changes:{from:c,insert:s},selection:{anchor:c+s.length}}),a.focus()}}}}}}},{key:"handleF4TopicAction",value:function(){var t=this.pict.views["ContentEditor-Layout"],e=this.pict.views["ContentEditor-Topics"];if(t&&e){var n=this.pict.AppData.ContentEditor,i=n.ActiveEditor,o=n.CurrentFile,r=0,a=!1;if("markdown"===i&&o){var s=this.pict.views["ContentEditor-MarkdownEditor"];if(s&&s._segmentEditors){var c=0;for(var l in s._segmentEditors){var d=s._segmentEditors[l];if(d&&d.hasFocus){var p=d.state.selection.main.head;r=c+d.state.doc.lineAt(p).number,a=!0;break}d&&d.state&&(c+=d.state.doc.lines)}}}if(n.SidebarCollapsed&&t.toggleSidebar(),t.switchSidebarTab("topics"),a&&o){var u={TopicCode:"New-Topic",TopicHelpFilePath:o,TopicTitle:this._extractFirstHeading()||"New Topic"};r>0&&(u.RelevantMarkdownLine=r),e.addTopic(u)}}}},{key:"_extractFirstHeading",value:function(){var t=this.pict.views["ContentEditor-MarkdownEditor"];if(!t||!t._segmentEditors)return"";var e=7,n="";for(var i in t._segmentEditors){var o=t._segmentEditors[i];if(o&&o.state&&o.state.doc)for(var r=o.state.doc,a=1;a<=r.lines;a++){var s=r.line(a).text.match(/^(#{1,6})\s+(.+)/);if(s){var c=s[1].length;if(c<e&&(e=c,n=s[2].trim(),1===e))return n}}}return n}},{key:"updateStats",value:function(){var t=document.getElementById("ContentEditor-Stats");if(t){var e=this.pict.AppData.ContentEditor.ActiveEditor,n=0,i=0,o=0;if("markdown"===e){var r=this.pict.views["ContentEditor-MarkdownEditor"];if(r&&r._segmentEditors)for(var a in r._segmentEditors){var s=r._segmentEditors[a];if(s&&s.state&&s.state.doc){n+=s.state.doc.lines,i+=s.state.doc.length;var c=s.state.doc.toString().match(/\S+/g);c&&(o+=c.length)}}}else{if("code"!==e)return void(t.textContent="");var l=this.pict.views["ContentEditor-CodeEditor"];if(l&&l.codeJar){var d=l.codeJar.toString();i=d.length,n=d.split("\n").length;var p=d.match(/\S+/g);p&&(o=p.length)}}t.textContent=n+" lines · "+o+" words · "+i+" chars"}}},{key:"markDirty",value:function(){this.pict.AppData.ContentEditor.IsDirty||(this.pict.AppData.ContentEditor.IsDirty=!0,this.pict.views["ContentEditor-TopBar"].render())}},{key:"_settingsKey",get:function(){return"retold-content-editor-settings"}},{key:"saveSettings",value:function(){if("undefined"!=typeof window&&window.localStorage){var t=this.pict.AppData.ContentEditor,e={AutoSegmentMarkdown:t.AutoSegmentMarkdown,AutoSegmentDepth:t.AutoSegmentDepth,ContentPreviewMode:t.ContentPreviewMode,MarkdownEditingControls:t.MarkdownEditingControls,MarkdownWordWrap:t.MarkdownWordWrap,CodeWordWrap:t.CodeWordWrap,SidebarCollapsed:t.SidebarCollapsed,SidebarWidth:t.SidebarWidth,AutoPreviewImages:t.AutoPreviewImages,AutoPreviewVideo:t.AutoPreviewVideo,AutoPreviewAudio:t.AutoPreviewAudio,ShowHiddenFiles:t.ShowHiddenFiles,TopicsFilePath:t.TopicsFilePath};try{window.localStorage.setItem(this._settingsKey,JSON.stringify(e))}catch(t){this.log.warn("Failed to save settings: "+t.message)}}}},{key:"_loadSettings",value:function(){if("undefined"!=typeof window&&window.localStorage)try{var t=window.localStorage.getItem(this._settingsKey);if(!t)return;var e=JSON.parse(t),n=this.pict.AppData.ContentEditor;"boolean"==typeof e.AutoSegmentMarkdown&&(n.AutoSegmentMarkdown=e.AutoSegmentMarkdown),"number"==typeof e.AutoSegmentDepth&&(n.AutoSegmentDepth=e.AutoSegmentDepth),"string"==typeof e.ContentPreviewMode?n.ContentPreviewMode=e.ContentPreviewMode:"boolean"==typeof e.AutoContentPreview&&(n.ContentPreviewMode=e.AutoContentPreview?"bottom":"off"),"boolean"==typeof e.MarkdownEditingControls&&(n.MarkdownEditingControls=e.MarkdownEditingControls),"boolean"==typeof e.MarkdownWordWrap&&(n.MarkdownWordWrap=e.MarkdownWordWrap),"boolean"==typeof e.CodeWordWrap&&(n.CodeWordWrap=e.CodeWordWrap),"boolean"==typeof e.SidebarCollapsed&&(n.SidebarCollapsed=e.SidebarCollapsed),"number"==typeof e.SidebarWidth&&(n.SidebarWidth=e.SidebarWidth),"boolean"==typeof e.AutoPreviewImages&&(n.AutoPreviewImages=e.AutoPreviewImages),"boolean"==typeof e.AutoPreviewVideo&&(n.AutoPreviewVideo=e.AutoPreviewVideo),"boolean"==typeof e.AutoPreviewAudio&&(n.AutoPreviewAudio=e.AutoPreviewAudio),"boolean"==typeof e.ShowHiddenFiles&&(n.ShowHiddenFiles=e.ShowHiddenFiles),"string"==typeof e.TopicsFilePath&&(n.TopicsFilePath=e.TopicsFilePath)}catch(t){this.log.warn("Failed to load settings: "+t.message)}}}])}(i);e.exports=h,e.exports.default_configuration=t("./Pict-Application-ContentEditor-Configuration.json")},{"./Pict-Application-ContentEditor-Configuration.json":101,"./providers/Pict-Provider-ContentEditor.js":106,"./views/PictView-Editor-CodeEditor.js":107,"./views/PictView-Editor-Layout.js":108,"./views/PictView-Editor-MarkdownEditor.js":109,"./views/PictView-Editor-MarkdownReference.js":110,"./views/PictView-Editor-SettingsPanel.js":111,"./views/PictView-Editor-TopBar.js":112,"./views/PictView-Editor-Topics.js":113,"pict-application":44,"pict-section-filebrowser":63}],103:[function(t,e,n){e.exports={Name:"Retold Content Reader",Hash:"ContentReader",MainViewportViewIdentifier:"Docuserve-Layout",AutoSolveAfterInitialize:!0,AutoRenderMainViewportViewAfterInitialize:!1,AutoRenderViewsAfterInitialize:!1,pict_configuration:{Product:"ContentReader-Pict-Application"}}},{}],104:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onAfterInitializeAsync",value:function(t){var e=this;this.pict.AppData.Docuserve={CatalogLoaded:!1,Catalog:null,CoverLoaded:!1,Cover:null,SidebarLoaded:!1,SidebarGroups:[],TopBarLoaded:!1,TopBar:null,ErrorPageLoaded:!1,ErrorPageHTML:null,KeywordIndexLoaded:!1,KeywordDocumentCount:0,CurrentGroup:"",CurrentModule:"",CurrentPath:"",SidebarVisible:!0,DocsBaseURL:"/content/",CatalogURL:"/content/retold-catalog.json"},this.pict.providers["Docuserve-Documentation"].loadCatalog(function(){var n=e.pict.AppData.Docuserve;return n.CoverLoaded&&n.Cover&&n.Cover.Title?document.title=n.Cover.Title.replace(/<[^>]*>/g,""):n.TopBarLoaded&&n.TopBar&&n.TopBar.Brand&&(document.title=n.TopBar.Brand.replace(/<[^>]*>/g,"")),n.TopBar?(Array.isArray(n.TopBar.ExternalLinks)||(n.TopBar.ExternalLinks=[]),n.TopBar.ExternalLinks.push({Text:"Edit",Href:"/"})):(n.TopBarLoaded=!0,n.TopBar={Brand:"Content System",NavLinks:[],ExternalLinks:[{Text:"Edit",Href:"/"}]}),e.pict.views["Docuserve-Layout"].render(),t()})}}])}(t("pict-docuserve"));e.exports=i,e.exports.default_configuration=t("./Pict-Application-ContentReader-Configuration.json")},{"./Pict-Application-ContentReader-Configuration.json":103,"pict-docuserve":49}],105:[function(t,e,n){e.exports={PictContentReader:t("./Pict-Application-ContentReader.js"),PictContentEditor:t("./Pict-Application-ContentEditor.js")},"undefined"!=typeof window&&(window.PictContentReader=e.exports.PictContentReader,window.PictContentEditor=e.exports.PictContentEditor)},{"./Pict-Application-ContentEditor.js":102,"./Pict-Application-ContentReader.js":104}],106:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"loadFile",value:function(t,e){var n=this,i="function"==typeof e?e:function(){};if(!t)return i("No file path specified","");fetch("/api/content/read/"+encodeURIComponent(t)).then(function(t){return t.ok?t.json():i("File not found: "+t.status,"")}).then(function(t){return t&&t.Success?i(null,t.Content||""):i(t?t.Error:"Unknown error","")}).catch(function(e){return n.log.warn("ContentEditor: Error loading file [".concat(t,"]: ").concat(e)),i(e.message,"")})}},{key:"saveFile",value:function(t,e,n){var i=this,o="function"==typeof n?n:function(){};if(!t)return o("No file path specified");fetch("/api/content/save/"+encodeURIComponent(t),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({Content:e})}).then(function(t){return t.ok?t.json():o("Save failed: "+t.status)}).then(function(t){return t&&t.Success?o(null):o(t?t.Error:"Unknown error")}).catch(function(e){return i.log.warn("ContentEditor: Error saving file [".concat(t,"]: ").concat(e)),o(e.message)})}},{key:"uploadImage",value:function(t,e){var n=this,i="function"==typeof e?e:function(){},o="",r=this.pict.AppData.ContentEditor.CurrentFile;if(r){var a=r.lastIndexOf("/");a>0&&(o=r.substring(0,a))}else this.pict.AppData.PictFileBrowser&&this.pict.AppData.PictFileBrowser.CurrentLocation&&(o=this.pict.AppData.PictFileBrowser.CurrentLocation);var s={"Content-Type":t.type,"x-filename":t.name};o&&(s["x-upload-path"]=o),fetch("/api/content/upload-image",{method:"POST",body:t,headers:s}).then(function(t){return t.json()}).then(function(t){return t&&t.Success&&t.URL?i(null,t.URL):i(t?t.Error:"Upload failed")}).catch(function(t){return n.log.warn("ContentEditor: Image upload failed: ".concat(t)),i(t.message)})}}])}(t("pict-provider"));e.exports=i,e.exports.default_configuration={ProviderIdentifier:"ContentEditor-Provider",AutoInitialize:!0,AutoInitializeOrdinal:0}},{"pict-provider":58}],107:[function(t,e,n){var i=t("pict-section-code"),o={js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",json:"json",html:"xml",htm:"xml",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"scss",less:"less",sql:"sql",py:"python",rb:"ruby",java:"java",kt:"kotlin",kts:"kotlin",go:"go",rs:"rust",c:"c",h:"c",cpp:"cpp",cc:"cpp",hpp:"cpp",cs:"csharp",swift:"swift",php:"php",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",yml:"yaml",yaml:"yaml",toml:"ini",ini:"ini",cfg:"ini",conf:"ini",dockerfile:"dockerfile",docker:"dockerfile",makefile:"makefile",mk:"makefile",md:"markdown",markdown:"markdown",lua:"lua",r:"r",pl:"perl",pm:"perl",ex:"elixir",exs:"elixir",erl:"erlang",hrl:"erlang",hs:"haskell",clj:"clojure",scala:"scala",dart:"dart",groovy:"groovy",gradle:"groovy",tf:"terraform",vim:"vim",diff:"diff",patch:"diff",log:"accesslog",txt:"plaintext"},r=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._suppressNextDirty=!1,o}return _inherits(e,t),_createClass(e,[{key:"onAfterInitialRender",value:function(){if("undefined"!=typeof window&&window.CodeJarModules&&window.CodeJarModules.CodeJar&&this.connectCodeJarPrototype(window.CodeJarModules.CodeJar),"undefined"!=typeof window&&window.CodeJarModules&&window.CodeJarModules.hljs){var t=window.CodeJarModules.hljs,n=this._language;this._highlightFunction=function(e){e.removeAttribute("data-highlighted"),delete e.dataset.highlighted,e.className=e.className.replace(/\bhljs\b/g,"").replace(/\blanguage-\S+/g,"").trim(),e.classList.add("hljs"),n&&"plaintext"!==n&&e.classList.add("language-"+n),t.highlightElement(e)}}return _superPropGet(e,"onAfterInitialRender",this,3)([])}},{key:"setLanguage",value:function(t){var e=this;if(this._language=t,"undefined"!=typeof window&&window.CodeJarModules&&window.CodeJarModules.hljs){var n=window.CodeJarModules.hljs,i=t;this._highlightFunction=function(t){t.removeAttribute("data-highlighted"),delete t.dataset.highlighted,t.className=t.className.replace(/\bhljs\b/g,"").replace(/\blanguage-\S+/g,"").trim(),t.classList.add("hljs"),i&&"plaintext"!==i&&t.classList.add("language-"+i),n.highlightElement(t)}}if(this._editorElement&&(this._editorElement.className="pict-code-editor language-"+t,this.options.LineNumbers||(this._editorElement.className+=" pict-code-no-line-numbers")),this.codeJar){var o=this.codeJar.toString();this.codeJar.destroy(),this.codeJar=this._codeJarPrototype(this._editorElement,this._highlightFunction,{tab:this.options.Tab,catchTab:this.options.CatchTab,addClosing:this.options.AddClosing}),this.codeJar.updateCode(o),this.codeJar.onUpdate(function(t){e._updateLineNumbers(),e.onCodeChange(t)})}}},{key:"onCodeChange",value:function(t){_superPropGet(e,"onCodeChange",this,3)([t]),this._suppressNextDirty?this._suppressNextDirty=!1:this.pict.PictApplication&&(this.pict.PictApplication.markDirty(),this.pict.PictApplication.updateStats())}}],[{key:"getLanguageForExtension",value:function(t){if(!t)return"plaintext";var e=t.toLowerCase();return o[e]||"plaintext"}}])}(i);e.exports=r,e.exports.default_configuration={ViewIdentifier:"ContentEditor-CodeEditor",DefaultRenderable:"CodeEditor-Wrap",DefaultDestinationAddress:"#ContentEditor-Editor-Container",TargetElementAddress:"#ContentEditor-Editor-Container",CodeDataAddress:"AppData.ContentEditor.CodeContent",ReadOnly:!1,LineNumbers:!0,Language:"javascript",Tab:"\t",AutoRender:!1,Renderables:[{RenderableHash:"CodeEditor-Wrap",TemplateHash:"CodeEditor-Container",DestinationAddress:"#ContentEditor-Editor-Container"}]},e.exports.ExtensionLanguageMap=o},{"pict-section-code":61}],108:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._minSidebarWidth=140,o._maxSidebarWidth=600,o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){this.pict.views["ContentEditor-TopBar"].render();var r=this.pict.ContentAssignment.getElement("#ContentEditor-Editor-Container");r&&r[0]&&!this.pict.AppData.ContentEditor.CurrentFile&&(r[0].innerHTML='<div style="display:flex;align-items:center;justify-content:center;height:100%;color:#8A7F72;font-size:1.1em;">Select a file from the sidebar to begin editing</div>'),this.pict.CSSMap.injectCSS();var a=this.pict.AppData.ContentEditor,s=document.getElementById("ContentEditor-SidebarWrap"),c=document.getElementById("ContentEditor-SidebarToggle");if(s){var l=window.innerWidth<=768;s.style.width=l?"100%":a.SidebarWidth+"px",a.SidebarCollapsed?(s.classList.add("collapsed"),c&&(c.innerHTML=l?"▼":"▶")):l&&(a.SidebarCollapsed=!0,s.classList.add("collapsed"),c&&(c.innerHTML="▼"))}var d=this;return c&&c.addEventListener("click",function(){d.toggleSidebar()}),this._wireResizeHandle(),window.addEventListener("hashchange",function(){d.pict.PictApplication.resolveHash()}),window.addEventListener("keydown",function(t){if((t.metaKey||t.ctrlKey)&&"s"===t.key)return t.preventDefault(),void d.pict.PictApplication.saveCurrentFile();if("F1"===t.key)return t.preventDefault(),void d._handleF1();if("F2"===t.key)return t.preventDefault(),void d.toggleSidebar();if("F3"===t.key)return t.preventDefault(),void d.toggleUploadForm();if((t.metaKey||t.ctrlKey)&&t.shiftKey&&("u"===t.key||"U"===t.key))return t.preventDefault(),void d.toggleUploadForm();if("F4"===t.key)return t.preventDefault(),void d.pict.PictApplication.handleF4TopicAction();if((t.metaKey||t.ctrlKey)&&t.shiftKey&&("t"===t.key||"T"===t.key))return t.preventDefault(),void d.pict.PictApplication.handleF4TopicAction();if("Escape"===t.key){var e=document.getElementById("ContentEditor-UploadOverlay");if(e&&e.classList.contains("open"))return void d.closeUploadForm();var n=document.getElementById("ContentEditor-ConfirmOverlay");if(n&&n.classList.contains("open"))return;if(d.pict.AppData.ContentEditor.CurrentFile)return t.preventDefault(),void d.pict.PictApplication.closeCurrentFile()}}),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"toggleSidebar",value:function(){var t=document.getElementById("ContentEditor-SidebarWrap"),e=document.getElementById("ContentEditor-SidebarToggle");if(t){var n=this.pict.AppData.ContentEditor;n.SidebarCollapsed=!n.SidebarCollapsed;var i=window.innerWidth<=768;n.SidebarCollapsed?(t.classList.add("collapsed"),e&&(e.innerHTML=i?"▼":"▶")):(t.classList.remove("collapsed"),t.style.width=i?"100%":n.SidebarWidth+"px",e&&(e.innerHTML=i?"▲":"◀")),this.pict.PictApplication.saveSettings()}}},{key:"switchSidebarTab",value:function(t){var e={files:document.getElementById("ContentEditor-Sidebar-Container"),reference:document.getElementById("ContentEditor-SidebarReference-Container"),topics:document.getElementById("ContentEditor-SidebarTopics-Container")},n={files:document.getElementById("ContentEditor-SidebarTab-Files"),reference:document.getElementById("ContentEditor-SidebarTab-Reference"),topics:document.getElementById("ContentEditor-SidebarTab-Topics")};for(var i in e)e[i]&&(e[i].style.display="none"),n[i]&&n[i].classList.remove("active");e[t]&&(e[t].style.display=""),n[t]&&n[t].classList.add("active");var o=document.getElementById("ContentEditor-SidebarWrap");if(o&&("reference"===t||"topics"===t?o.classList.add("sidebar-expanded-pane"):o.classList.remove("sidebar-expanded-pane")),"reference"===t){var r=this.pict.views["ContentEditor-MarkdownReference"];r&&!r._hasRendered&&r.render()}if("topics"===t){var a=this.pict.views["ContentEditor-Topics"];a&&!a._hasRendered&&a.render()}}},{key:"_handleF1",value:function(){if(this.pict.AppData.ContentEditor.SidebarCollapsed)return this.toggleSidebar(),void this.switchSidebarTab("reference");var t=document.getElementById("ContentEditor-SidebarTab-Reference");t&&t.classList.contains("active")?this.switchSidebarTab("files"):this.switchSidebarTab("reference")}},{key:"getActiveSidebarTab",value:function(){var t=document.getElementById("ContentEditor-SidebarTab-Reference"),e=document.getElementById("ContentEditor-SidebarTab-Topics");return t&&t.classList.contains("active")?"reference":e&&e.classList.contains("active")?"topics":"files"}},{key:"toggleUploadForm",value:function(){var t=document.getElementById("ContentEditor-UploadOverlay");t&&(t.classList.contains("open")?this.closeUploadForm():this.openUploadForm())}},{key:"openUploadForm",value:function(){var t=document.getElementById("ContentEditor-UploadOverlay");t&&t.classList.add("open"),this._wireUploadDropzone()}},{key:"closeUploadForm",value:function(){var t=document.getElementById("ContentEditor-UploadOverlay");t&&t.classList.remove("open");var e=document.getElementById("ContentEditor-UploadFileInput");e&&(e.value="");var n=document.getElementById("ContentEditor-UploadStatus");n&&(n.innerHTML="");var i=document.getElementById("ContentEditor-UploadResult");i&&(i.innerHTML="")}},{key:"onUploadOverlayClick",value:function(t){"ContentEditor-UploadOverlay"===t.target.id&&this.closeUploadForm()}},{key:"onUploadFileSelected",value:function(t){t.files&&t.files.length>0&&this._uploadFile(t.files[0])}},{key:"_wireUploadDropzone",value:function(){var t=document.getElementById("ContentEditor-UploadDropzone");if(t&&!t._wired){t._wired=!0;var e=this;t.addEventListener("dragover",function(e){e.preventDefault(),e.stopPropagation(),t.classList.add("dragover")}),t.addEventListener("dragleave",function(e){e.preventDefault(),e.stopPropagation(),t.classList.remove("dragover")}),t.addEventListener("drop",function(n){n.preventDefault(),n.stopPropagation(),t.classList.remove("dragover"),n.dataTransfer&&n.dataTransfer.files&&n.dataTransfer.files.length>0&&e._uploadFile(n.dataTransfer.files[0])})}}},{key:"_uploadFile",value:function(t){var e=document.getElementById("ContentEditor-UploadStatus"),n=document.getElementById("ContentEditor-UploadResult");if(t)if(t.type.startsWith("image/")){e&&(e.innerHTML="Uploading <strong>"+t.name+"</strong>..."),n&&(n.innerHTML="");var i=this,o=this.pict.providers["ContentEditor-Provider"];o?o.uploadImage(t,function(o,r){if(o)e&&(e.innerHTML='<span class="content-editor-upload-status-error">Upload failed: '+o+"</span>");else{e&&(e.innerHTML='<span class="content-editor-upload-status-success">Uploaded successfully!</span>');var a="";n&&(n.innerHTML='<div class="content-editor-upload-result"><div class="content-editor-upload-result-label">Markdown</div><div class="content-editor-upload-result-url"><span class="content-editor-upload-result-text">'+a+'</span><button class="content-editor-upload-result-copy" onclick="navigator.clipboard.writeText(\''+a.replace(/'/g,"\\'")+'\').then(function(){this.textContent=\'Copied!\'}.bind(this))">Copy</button></div><div class="content-editor-upload-result-label" style="margin-top:8px">URL</div><div class="content-editor-upload-result-url"><span class="content-editor-upload-result-text">'+r+'</span><button class="content-editor-upload-result-copy" onclick="navigator.clipboard.writeText(\''+r.replace(/'/g,"\\'")+"').then(function(){this.textContent='Copied!'}.bind(this))\">Copy</button></div></div>"),i.pict.PictApplication.loadFileList()}}):e&&(e.innerHTML='<span class="content-editor-upload-status-error">Provider not available.</span>')}else e&&(e.innerHTML='<span class="content-editor-upload-status-error">Only image files are supported.</span>')}},{key:"_wireResizeHandle",value:function(){var t=document.getElementById("ContentEditor-ResizeHandle"),e=document.getElementById("ContentEditor-SidebarWrap");if(t&&e){var n=this,i=!1,o=0,r=0;t.addEventListener("mousedown",function(c){n.pict.AppData.ContentEditor.SidebarCollapsed||(c.preventDefault(),i=!0,o=c.clientX,r=e.offsetWidth,t.classList.add("dragging"),e.style.transition="none",document.body.style.userSelect="none",document.body.style.cursor="col-resize",document.addEventListener("mousemove",a),document.addEventListener("mouseup",s))})}function a(t){if(i){var a=t.clientX-o,s=r+a;s<n._minSidebarWidth&&(s=n._minSidebarWidth),s>n._maxSidebarWidth&&(s=n._maxSidebarWidth),e.style.width=s+"px"}}function s(){i&&(i=!1,t.classList.remove("dragging"),e.style.transition="",document.body.style.userSelect="",document.body.style.cursor="",n.pict.AppData.ContentEditor.SidebarWidth=e.offsetWidth,n.pict.PictApplication.saveSettings(),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s))}}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"ContentEditor-Layout",DefaultRenderable:"ContentEditor-Layout-Shell",DefaultDestinationAddress:"#ContentEditor-Application-Container",AutoRender:!1,CSS:'\n\t\t#ContentEditor-Application-Container\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100vh;\n\t\t\tbackground: #F5F3EE;\n\t\t}\n\t\t#ContentEditor-TopBar-Container\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.content-editor-body\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex: 1;\n\t\t\tmin-height: 0;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t/* Sidebar wrapper holds the sidebar content + collapse toggle */\n\t\t.content-editor-sidebar-wrap\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-shrink: 0;\n\t\t\tposition: relative;\n\t\t\ttransition: width 0.2s ease;\n\t\t}\n\t\t/* Inner wrapper: vertical flex for tab bar + panes */\n\t\t.content-editor-sidebar-inner\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t\tmin-height: 0;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t/* Sidebar tab bar */\n\t\t.content-editor-sidebar-tabs\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-shrink: 0;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tbackground: #F5F0EA;\n\t\t}\n\t\t.content-editor-sidebar-tab\n\t\t{\n\t\t\tflex: 1;\n\t\t\tpadding: 7px 0;\n\t\t\tborder: none;\n\t\t\tbackground: transparent;\n\t\t\tfont-size: 0.78rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: pointer;\n\t\t\tborder-bottom: 2px solid transparent;\n\t\t\ttransition: color 0.15s, border-color 0.15s;\n\t\t}\n\t\t.content-editor-sidebar-tab:hover\n\t\t{\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.content-editor-sidebar-tab.active\n\t\t{\n\t\t\tcolor: #2E7D74;\n\t\t\tborder-bottom-color: #2E7D74;\n\t\t}\n\t\t.content-editor-sidebar-addfile\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 30px;\n\t\t\tborder: none;\n\t\t\tbackground: transparent;\n\t\t\tfont-size: 1.1rem;\n\t\t\tfont-weight: 400;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tborder-bottom: 2px solid transparent;\n\t\t\ttransition: color 0.15s, background 0.15s;\n\t\t}\n\t\t.content-editor-sidebar-addfile:hover\n\t\t{\n\t\t\tcolor: #2E7D74;\n\t\t\tbackground: #EDE9E3;\n\t\t}\n\t\t/* Sidebar panes */\n\t\t.content-editor-sidebar-pane\n\t\t{\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\toverflow-x: hidden;\n\t\t\tmin-width: 0;\n\t\t\tmin-height: 0;\n\t\t}\n\t\t#ContentEditor-Sidebar-Container\n\t\t{\n\t\t\tbackground: #FAF8F4;\n\t\t}\n\t\t/* Collapsed state */\n\t\t.content-editor-sidebar-wrap.collapsed\n\t\t{\n\t\t\twidth: 0 !important;\n\t\t}\n\t\t.content-editor-sidebar-wrap.collapsed .content-editor-sidebar-inner\n\t\t{\n\t\t\tvisibility: hidden;\n\t\t}\n\t\t.content-editor-sidebar-wrap.collapsed .content-editor-resize-handle\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t/* Collapse / expand toggle */\n\t\t.content-editor-sidebar-toggle\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 8px;\n\t\t\tright: -20px;\n\t\t\twidth: 20px;\n\t\t\theight: 28px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tbackground: #FAF8F4;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-left: none;\n\t\t\tborder-radius: 0 4px 4px 0;\n\t\t\tcursor: pointer;\n\t\t\tz-index: 10;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 11px;\n\t\t\tline-height: 1;\n\t\t\ttransition: color 0.15s;\n\t\t}\n\t\t.content-editor-sidebar-toggle:hover\n\t\t{\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.content-editor-sidebar-wrap.collapsed .content-editor-sidebar-toggle\n\t\t{\n\t\t\tright: -20px;\n\t\t}\n\t\t/* Resize handle */\n\t\t.content-editor-resize-handle\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 5px;\n\t\t\tcursor: col-resize;\n\t\t\tbackground: transparent;\n\t\t\tborder-right: 1px solid #DDD6CA;\n\t\t\ttransition: background 0.15s;\n\t\t}\n\t\t.content-editor-resize-handle:hover,\n\t\t.content-editor-resize-handle.dragging\n\t\t{\n\t\t\tbackground: #2E7D74;\n\t\t\tborder-right-color: #2E7D74;\n\t\t}\n\t\t/* File browser layout overrides for sidebar use */\n\t\t#ContentEditor-Sidebar-Container .pict-filebrowser\n\t\t{\n\t\t\tborder: none;\n\t\t\tborder-radius: 0;\n\t\t\tbackground: transparent;\n\t\t}\n\t\t#ContentEditor-Sidebar-Container .pict-filebrowser-browse-pane\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t#ContentEditor-Sidebar-Container .pict-filebrowser-view-pane\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t/* Hide size/date columns — the sidebar is too narrow for them */\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-col-size,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-col-modified,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-size,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-modified\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t/* Hide the column header bar in sidebar mode */\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-header\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t/* Breadcrumb bar: flex wrapper with create-folder button */\n\t\t.pict-fb-breadcrumb-bar\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tbackground: #F5F0E8;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t}\n\t\t.pict-fb-breadcrumb-bar .pict-fb-breadcrumb\n\t\t{\n\t\t\tflex: 1;\n\t\t\tborder-bottom: none;\n\t\t}\n\t\t.pict-fb-breadcrumb-addfolder\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\t\t\tfont-size: 1.1rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 4px 10px;\n\t\t\tline-height: 1;\n\t\t\tborder-radius: 4px;\n\t\t\tmargin-right: 4px;\n\t\t}\n\t\t.pict-fb-breadcrumb-addfolder:hover\n\t\t{\n\t\t\tcolor: #2E7D74;\n\t\t\tbackground: #EAE3D8;\n\t\t}\n\t\t#ContentEditor-Editor-Container\n\t\t{\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\tpadding: 44px 16px 16px 16px;\n\t\t}\n\t\t/* Code editor: fill the container and remove outer border */\n\t\t#ContentEditor-Editor-Container .pict-code-editor-wrap\n\t\t{\n\t\t\theight: calc(100% - 4px);\n\t\t\tborder: none;\n\t\t\tborder-radius: 0;\n\t\t}\n\t\t#ContentEditor-Editor-Container .pict-code-editor\n\t\t{\n\t\t\tmin-height: unset;\n\t\t\theight: 100%;\n\t\t\tbackground: #FAFAFA;\n\t\t}\n\t\t/* Binary file preview */\n\t\t.binary-preview-image-wrap\n\t\t{\n\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\t.binary-preview-image\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tbackground: #FFF;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 6px;\n\t\t\tpadding: 24px;\n\t\t}\n\t\t.binary-preview-image img\n\t\t{\n\t\t\tdisplay: block;\n\t\t\tmax-width: 100%;\n\t\t\tmax-height: 400px;\n\t\t\tobject-fit: contain;\n\t\t\tborder-radius: 4px;\n\t\t}\n\t\t.binary-preview-card\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 20px;\n\t\t\tbackground: #FFF;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 6px;\n\t\t\tpadding: 24px;\n\t\t\tmax-width: 600px;\n\t\t}\n\t\t.binary-preview-icon\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\twidth: 64px;\n\t\t\theight: 64px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder-radius: 8px;\n\t\t\tfont-size: 0.75rem;\n\t\t\tfont-weight: 700;\n\t\t\tcolor: #5E5549;\n\t\t\tletter-spacing: 0.5px;\n\t\t}\n\t\t.binary-preview-info\n\t\t{\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.binary-preview-name\n\t\t{\n\t\t\tfont-size: 1rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin-bottom: 6px;\n\t\t\tword-break: break-all;\n\t\t}\n\t\t.binary-preview-meta\n\t\t{\n\t\t\tfont-size: 0.8rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tline-height: 1.6;\n\t\t}\n\t\t.binary-preview-actions\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tgap: 8px;\n\t\t}\n\t\t.binary-preview-btn\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 8px 16px;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.8rem;\n\t\t\tfont-weight: 600;\n\t\t\ttext-decoration: none;\n\t\t\ttext-align: center;\n\t\t\tcursor: pointer;\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t}\n\t\t.binary-preview-btn:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t.binary-preview-btn-secondary\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tcolor: #5E5549;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t}\n\t\t.binary-preview-btn-secondary:hover\n\t\t{\n\t\t\tborder-color: #8A7F72;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.binary-preview-btn-preview\n\t\t{\n\t\t\tpadding: 10px 20px;\n\t\t\tfont-size: 0.85rem;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tbackground: #FAF8F4;\n\t\t\tcolor: #3D3229;\n\t\t\tcursor: pointer;\n\t\t\tborder-radius: 6px;\n\t\t\ttransition: background 0.15s, border-color 0.15s;\n\t\t}\n\t\t.binary-preview-btn-preview:hover\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder-color: #8A7F72;\n\t\t}\n\t\t#ContentEditor-MediaPreviewPlaceholder\n\t\t{\n\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\t.binary-preview-media-wrap\n\t\t{\n\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\t.binary-preview-video\n\t\t{\n\t\t\tdisplay: block;\n\t\t\tmax-width: 100%;\n\t\t\tmax-height: 500px;\n\t\t\tborder-radius: 6px;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tbackground: #000;\n\t\t}\n\t\t.binary-preview-audio\n\t\t{\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-width: 500px;\n\t\t}\n\t\t/* Image upload overlay */\n\t\t.content-editor-upload-overlay\n\t\t{\n\t\t\tdisplay: none;\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tbottom: 0;\n\t\t\tz-index: 1099;\n\t\t\tbackground: rgba(0, 0, 0, 0.35);\n\t\t}\n\t\t.content-editor-upload-overlay.open\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.content-editor-upload-panel\n\t\t{\n\t\t\tbackground: #FFF;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 10px;\n\t\t\tbox-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);\n\t\t\twidth: 420px;\n\t\t\tmax-width: 90vw;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t.content-editor-upload-header\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tpadding: 14px 18px;\n\t\t\tborder-bottom: 1px solid #EDE9E3;\n\t\t}\n\t\t.content-editor-upload-title\n\t\t{\n\t\t\tfont-size: 0.95rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.content-editor-upload-close\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\t\t\tfont-size: 1.2rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 2px 6px;\n\t\t\tline-height: 1;\n\t\t\tborder-radius: 4px;\n\t\t}\n\t\t.content-editor-upload-close:hover\n\t\t{\n\t\t\tcolor: #3D3229;\n\t\t\tbackground: #F0EDE8;\n\t\t}\n\t\t.content-editor-upload-body\n\t\t{\n\t\t\tpadding: 18px;\n\t\t}\n\t\t.content-editor-upload-dropzone\n\t\t{\n\t\t\tborder: 2px dashed #DDD6CA;\n\t\t\tborder-radius: 8px;\n\t\t\tpadding: 28px 16px;\n\t\t\ttext-align: center;\n\t\t\tcursor: pointer;\n\t\t\ttransition: border-color 0.15s, background 0.15s;\n\t\t\tbackground: #FAF8F4;\n\t\t}\n\t\t.content-editor-upload-dropzone:hover,\n\t\t.content-editor-upload-dropzone.dragover\n\t\t{\n\t\t\tborder-color: #2E7D74;\n\t\t\tbackground: #F0FAF8;\n\t\t}\n\t\t.content-editor-upload-dropzone-icon\n\t\t{\n\t\t\tfont-size: 2rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t\t.content-editor-upload-dropzone-text\n\t\t{\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.content-editor-upload-dropzone-hint\n\t\t{\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-top: 4px;\n\t\t}\n\t\t.content-editor-upload-file-input\n\t\t{\n\t\t\tdisplay: none;\n\t\t}\n\t\t.content-editor-upload-status\n\t\t{\n\t\t\tmargin-top: 12px;\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #5E5549;\n\t\t\tmin-height: 20px;\n\t\t}\n\t\t.content-editor-upload-status-error\n\t\t{\n\t\t\tcolor: #D9534F;\n\t\t}\n\t\t.content-editor-upload-status-success\n\t\t{\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.content-editor-upload-result\n\t\t{\n\t\t\tmargin-top: 12px;\n\t\t\tpadding: 10px 12px;\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 6px;\n\t\t}\n\t\t.content-editor-upload-result-label\n\t\t{\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-bottom: 4px;\n\t\t}\n\t\t.content-editor-upload-result-url\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 6px;\n\t\t}\n\t\t.content-editor-upload-result-text\n\t\t{\n\t\t\tflex: 1;\n\t\t\tfont-family: monospace;\n\t\t\tfont-size: 0.78rem;\n\t\t\tcolor: #3D3229;\n\t\t\tword-break: break-all;\n\t\t}\n\t\t.content-editor-upload-result-copy\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tpadding: 4px 10px;\n\t\t\tfont-size: 0.72rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.content-editor-upload-result-copy:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t.content-editor-upload-kbd\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 1px 5px;\n\t\t\tfont-size: 0.68rem;\n\t\t\tfont-family: monospace;\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 3px;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.content-editor-upload-footer\n\t\t{\n\t\t\tpadding: 10px 18px;\n\t\t\tborder-top: 1px solid #EDE9E3;\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\ttext-align: center;\n\t\t}\n\n\t\t/* File browser row insert button — hidden by default, shown on\n\t\t hover for image file rows via CSS attribute selectors. */\n\t\t.pict-fb-insert-btn\n\t\t{\n\t\t\tdisplay: none;\n\t\t\tposition: absolute;\n\t\t\tright: 6px;\n\t\t\ttop: 50%;\n\t\t\ttransform: translateY(-50%);\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tfont-weight: 700;\n\t\t\tline-height: 1;\n\t\t\tpadding: 2px 7px;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.pict-fb-insert-btn:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t/* Make the row position:relative so the button can be absolutely placed */\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row\n\t\t{\n\t\t\tposition: relative;\n\t\t}\n\t\t/* Show the insert button on hover for image file extensions.\n\t\t CSS attribute selector [data-name$=".ext" i] matches\n\t\t the end of the data-name attribute, case-insensitive. */\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".png" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".jpg" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".jpeg" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".gif" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".webp" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".svg" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".bmp" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".avif" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".apng" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".ico" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".tiff" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".tif" i]:hover .pict-fb-insert-btn,\n\t\t#ContentEditor-Sidebar-Container .pict-fb-detail-row[data-name$=".jfif" i]:hover .pict-fb-insert-btn\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t}\n\n\t\t/* ============================================\n\t\t RESPONSIVE: Tablet / Phone (max-width: 768px)\n\t\t ============================================ */\n\t\t@media (max-width: 768px)\n\t\t{\n\t\t\t/* Prevent horizontal scroll on the whole app */\n\t\t\t#ContentEditor-Application-Container\n\t\t\t{\n\t\t\t\toverflow-x: hidden;\n\t\t\t\twidth: 100%;\n\t\t\t\tmax-width: 100vw;\n\t\t\t}\n\n\t\t\t/* Stack sidebar ABOVE editor instead of side-by-side */\n\t\t\t.content-editor-body\n\t\t\t{\n\t\t\t\tflex-direction: column;\n\t\t\t}\n\n\t\t\t/* Sidebar becomes a horizontal strip at the top */\n\t\t\t.content-editor-sidebar-wrap\n\t\t\t{\n\t\t\t\twidth: 100% !important;\n\t\t\t\tmax-height: 40vh;\n\t\t\t\tflex-shrink: 0;\n\t\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\t\tborder-right: none;\n\t\t\t}\n\n\t\t\t/* Give the Reference and Topics tabs much more room on mobile\n\t\t\t since they contain long scrollable content */\n\t\t\t.content-editor-sidebar-wrap.sidebar-expanded-pane\n\t\t\t{\n\t\t\t\tmax-height: 70vh;\n\t\t\t}\n\n\t\t\t/* When collapsed on mobile, hide the inner content but keep the\n\t\t\t toggle button visible (it\'s positioned below the sidebar strip) */\n\t\t\t.content-editor-sidebar-wrap.collapsed\n\t\t\t{\n\t\t\t\twidth: 100% !important;\n\t\t\t\tmax-height: 0;\n\t\t\t\toverflow: visible;\n\t\t\t}\n\t\t\t.content-editor-sidebar-wrap.collapsed .content-editor-sidebar-inner\n\t\t\t{\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t\t/* Hide the resize handle (desktop-only interaction) */\n\t\t\t.content-editor-resize-handle\n\t\t\t{\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t\t/* Reposition the sidebar toggle for horizontal layout —\n\t\t\t place it at the bottom-center of the sidebar strip */\n\t\t\t.content-editor-sidebar-toggle\n\t\t\t{\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: auto;\n\t\t\t\tbottom: -20px;\n\t\t\t\tright: auto;\n\t\t\t\tleft: 50%;\n\t\t\t\ttransform: translateX(-50%);\n\t\t\t\twidth: 28px;\n\t\t\t\theight: 20px;\n\t\t\t\tborder-radius: 0 0 4px 4px;\n\t\t\t\tborder: 1px solid #DDD6CA;\n\t\t\t\tborder-top: none;\n\t\t\t\tz-index: 10;\n\t\t\t}\n\t\t\t.content-editor-sidebar-wrap.collapsed .content-editor-sidebar-toggle\n\t\t\t{\n\t\t\t\tbottom: -20px;\n\t\t\t\tright: auto;\n\t\t\t\tleft: 50%;\n\t\t\t\ttransform: translateX(-50%);\n\t\t\t}\n\n\t\t\t/* Reduce editor container padding (less gutters) */\n\t\t\t#ContentEditor-Editor-Container\n\t\t\t{\n\t\t\t\tpadding: 24px 8px 8px 8px;\n\t\t\t}\n\n\t\t\t/* Reduce binary preview padding */\n\t\t\t.binary-preview-image\n\t\t\t{\n\t\t\t\tpadding: 12px;\n\t\t\t}\n\t\t\t.binary-preview-card\n\t\t\t{\n\t\t\t\tpadding: 12px;\n\t\t\t\tgap: 12px;\n\t\t\t}\n\n\t\t\t/* Upload panel: fill more of the screen */\n\t\t\t.content-editor-upload-panel\n\t\t\t{\n\t\t\t\twidth: 95vw;\n\t\t\t\tmax-width: 95vw;\n\t\t\t}\n\n\t\t}\n\n\t\t/* ============================================\n\t\t RESPONSIVE: Small phone (max-width: 480px)\n\t\t ============================================ */\n\t\t@media (max-width: 480px)\n\t\t{\n\t\t\t/* Even tighter editor padding */\n\t\t\t#ContentEditor-Editor-Container\n\t\t\t{\n\t\t\t\tpadding: 20px 4px 4px 4px;\n\t\t\t}\n\n\t\t\t/* Sidebar gets a smaller max height */\n\t\t\t.content-editor-sidebar-wrap\n\t\t\t{\n\t\t\t\tmax-height: 35vh;\n\t\t\t}\n\t\t\t.content-editor-sidebar-wrap.sidebar-expanded-pane\n\t\t\t{\n\t\t\t\tmax-height: 65vh;\n\t\t\t}\n\t\t}\n\t',Templates:[{Hash:"ContentEditor-Layout-Shell-Template",Template:'\n<div id="ContentEditor-TopBar-Container"></div>\n<div class="content-editor-body">\n\t<div class="content-editor-sidebar-wrap" id="ContentEditor-SidebarWrap" style="width:250px">\n\t\t<div class="content-editor-sidebar-inner">\n\t\t\t<div class="content-editor-sidebar-tabs">\n\t\t\t\t<button class="content-editor-sidebar-tab active" id="ContentEditor-SidebarTab-Files"\n\t\t\t\t\tonclick="{~P~}.views[\'ContentEditor-Layout\'].switchSidebarTab(\'files\')">Files</button>\n\t\t\t\t<button class="content-editor-sidebar-tab" id="ContentEditor-SidebarTab-Reference"\n\t\t\t\t\tonclick="{~P~}.views[\'ContentEditor-Layout\'].switchSidebarTab(\'reference\')">Reference</button>\n\t\t\t\t<button class="content-editor-sidebar-tab" id="ContentEditor-SidebarTab-Topics"\n\t\t\t\t\tonclick="{~P~}.views[\'ContentEditor-Layout\'].switchSidebarTab(\'topics\')">Topics</button>\n\t\t\t\t<button class="content-editor-sidebar-addfile" title="New file"\n\t\t\t\t\tonclick="{~P~}.PictApplication.promptNewFile()">+</button>\n\t\t\t</div>\n\t\t\t<div id="ContentEditor-Sidebar-Container" class="content-editor-sidebar-pane"></div>\n\t\t\t<div id="ContentEditor-SidebarReference-Container" class="content-editor-sidebar-pane" style="display:none"></div>\n\t\t\t<div id="ContentEditor-SidebarTopics-Container" class="content-editor-sidebar-pane" style="display:none"></div>\n\t\t</div>\n\t\t<div class="content-editor-resize-handle" id="ContentEditor-ResizeHandle"></div>\n\t\t<div class="content-editor-sidebar-toggle" id="ContentEditor-SidebarToggle">◀</div>\n\t</div>\n\t<div id="ContentEditor-Editor-Container"></div>\n</div>\n<div class="content-editor-upload-overlay" id="ContentEditor-UploadOverlay"\n\tonclick="{~P~}.views[\'ContentEditor-Layout\'].onUploadOverlayClick(event)">\n\t<div class="content-editor-upload-panel">\n\t\t<div class="content-editor-upload-header">\n\t\t\t<span class="content-editor-upload-title">Upload Image</span>\n\t\t\t<button class="content-editor-upload-close"\n\t\t\t\tonclick="{~P~}.views[\'ContentEditor-Layout\'].toggleUploadForm()">×</button>\n\t\t</div>\n\t\t<div class="content-editor-upload-body">\n\t\t\t<div class="content-editor-upload-dropzone" id="ContentEditor-UploadDropzone"\n\t\t\t\tonclick="document.getElementById(\'ContentEditor-UploadFileInput\').click()">\n\t\t\t\t<div class="content-editor-upload-dropzone-icon">📷</div>\n\t\t\t\t<div class="content-editor-upload-dropzone-text">Drop an image here or click to browse</div>\n\t\t\t\t<div class="content-editor-upload-dropzone-hint">PNG, JPG, GIF, WebP, SVG, BMP</div>\n\t\t\t</div>\n\t\t\t<input type="file" class="content-editor-upload-file-input" id="ContentEditor-UploadFileInput"\n\t\t\t\taccept="image/png,image/jpeg,image/gif,image/webp,image/svg+xml,image/bmp"\n\t\t\t\tonchange="{~P~}.views[\'ContentEditor-Layout\'].onUploadFileSelected(this)">\n\t\t\t<div class="content-editor-upload-status" id="ContentEditor-UploadStatus"></div>\n\t\t\t<div id="ContentEditor-UploadResult"></div>\n\t\t</div>\n\t\t<div class="content-editor-upload-footer">\n\t\t\t<span class="content-editor-upload-kbd">F3</span> or\n\t\t\t<span class="content-editor-upload-kbd">Ctrl+Shift+U</span> to toggle\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"ContentEditor-Layout-Shell",TemplateHash:"ContentEditor-Layout-Shell-Template",DestinationAddress:"#ContentEditor-Application-Container",RenderMethod:"replace"}]}},{"pict-view":88}],109:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onImageUpload",value:function(t,e,n){var i=this.pict.providers["ContentEditor-Provider"];return!!i&&(i.uploadImage(t,function(t,e){t?n(t):n(null,e)}),!0)}},{key:"customConfigureExtensions",value:function(t,e){if(this.pict.AppData.ContentEditor&&this.pict.AppData.ContentEditor.MarkdownWordWrap){var n=this._codeMirrorModules;n&&n.EditorView&&n.EditorView.lineWrapping&&t.push(n.EditorView.lineWrapping)}return t}},{key:"onContentChange",value:function(t,e){this.pict.PictApplication&&(this.pict.PictApplication.markDirty(),this.pict.PictApplication.updateStats())}}])}(t("pict-section-markdowneditor"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"ContentEditor-MarkdownEditor",DefaultRenderable:"MarkdownEditor-Wrap",DefaultDestinationAddress:"#ContentEditor-Editor-Container",TargetElementAddress:"#ContentEditor-Editor-Container",ContentDataAddress:"AppData.ContentEditor.Document.Segments",ReadOnly:!1,EnableRichPreview:!0,AutoRender:!1,Renderables:[{RenderableHash:"MarkdownEditor-Wrap",TemplateHash:"MarkdownEditor-Container",DestinationAddress:"#ContentEditor-Editor-Container"}]}},{"pict-section-markdowneditor":86}],110:[function(t,e,n){var i={ViewIdentifier:"ContentEditor-MarkdownReference",DefaultRenderable:"ContentEditor-MarkdownReference-Display",DefaultDestinationAddress:"#ContentEditor-SidebarReference-Container",AutoRender:!1,CSS:"\n\t\t.md-ref-container\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100%;\n\t\t\tbackground: #FAF8F4;\n\t\t}\n\t\t.md-ref-search-bar\n\t\t{\n\t\t\tposition: sticky;\n\t\t\ttop: 0;\n\t\t\tz-index: 5;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 4px;\n\t\t\tpadding: 6px 8px;\n\t\t\tbackground: #F5F0EA;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.md-ref-search-input\n\t\t{\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t\tpadding: 5px 8px;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.8rem;\n\t\t\tbackground: #FFF;\n\t\t\tcolor: #3D3229;\n\t\t\toutline: none;\n\t\t}\n\t\t.md-ref-search-input:focus\n\t\t{\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.md-ref-search-nav\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\twidth: 26px;\n\t\t\theight: 26px;\n\t\t\tcursor: pointer;\n\t\t\tcolor: #5E5549;\n\t\t\tfont-size: 0.7rem;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.md-ref-search-nav:hover\n\t\t{\n\t\t\tbackground: #EDE9E3;\n\t\t}\n\t\t.md-ref-search-nav:disabled\n\t\t{\n\t\t\topacity: 0.3;\n\t\t\tcursor: not-allowed;\n\t\t}\n\t\t.md-ref-search-count\n\t\t{\n\t\t\tfont-size: 0.7rem;\n\t\t\tcolor: #8A7F72;\n\t\t\twhite-space: nowrap;\n\t\t\tmin-width: 32px;\n\t\t\ttext-align: center;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.md-ref-content\n\t\t{\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\tpadding: 12px;\n\t\t\tfont-size: 0.82rem;\n\t\t\tline-height: 1.6;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.md-ref-content h2\n\t\t{\n\t\t\tfont-size: 0.95rem;\n\t\t\tmargin: 20px 0 8px 0;\n\t\t\tpadding-bottom: 4px;\n\t\t\tborder-bottom: 1px solid #EDE9E3;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.md-ref-content h2:first-child\n\t\t{\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.md-ref-content h3\n\t\t{\n\t\t\tfont-size: 0.85rem;\n\t\t\tmargin: 14px 0 6px 0;\n\t\t\tcolor: #5E5549;\n\t\t}\n\t\t.md-ref-content p\n\t\t{\n\t\t\tmargin: 6px 0;\n\t\t}\n\t\t.md-ref-content code\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t\tpadding: 1px 4px;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tfont-family: monospace;\n\t\t}\n\t\t.md-ref-content pre\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\tpadding: 8px 10px;\n\t\t\toverflow-x: auto;\n\t\t\tfont-size: 0.76rem;\n\t\t\tline-height: 1.5;\n\t\t\tmargin: 6px 0;\n\t\t\tposition: relative;\n\t\t}\n\t\t.md-ref-content pre code\n\t\t{\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.md-ref-copy-btn\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 4px;\n\t\t\tright: 4px;\n\t\t\tbackground: #FAF8F4;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 3px;\n\t\t\tpadding: 2px 6px;\n\t\t\tfont-size: 0.65rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: pointer;\n\t\t\topacity: 0;\n\t\t\ttransition: opacity 0.15s;\n\t\t}\n\t\t.md-ref-content pre:hover .md-ref-copy-btn\n\t\t{\n\t\t\topacity: 1;\n\t\t}\n\t\t.md-ref-copy-btn:hover\n\t\t{\n\t\t\tbackground: #EDE9E3;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.md-ref-docs-link\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tgap: 6px;\n\t\t\tpadding: 8px 10px;\n\t\t\tbackground: #F0FAF8;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tfont-size: 0.8rem;\n\t\t\tfont-weight: 600;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.md-ref-docs-link a\n\t\t{\n\t\t\tcolor: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.md-ref-docs-link a:hover\n\t\t{\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t/* Search highlight */\n\t\tmark.md-ref-highlight\n\t\t{\n\t\t\tbackground: #FFEAA7;\n\t\t\tcolor: inherit;\n\t\t\tpadding: 0;\n\t\t\tborder-radius: 2px;\n\t\t}\n\t\tmark.md-ref-highlight-active\n\t\t{\n\t\t\tbackground: #E8A94D;\n\t\t\tcolor: #FFF;\n\t\t}\n\t",Templates:[{Hash:"ContentEditor-MarkdownReference-Template",Template:'\n<div class="md-ref-container">\n\t<div class="md-ref-docs-link">\n\t\t<span>📖</span>\n\t\t<a href="/docs/" target="_blank">Full Documentation</a>\n\t</div>\n\t<div class="md-ref-search-bar">\n\t\t<input type="text" class="md-ref-search-input"\n\t\t\tid="ContentEditor-MdRef-SearchInput"\n\t\t\tplaceholder="Search reference..."\n\t\t\toninput="{~P~}.views[\'ContentEditor-MarkdownReference\'].onSearchInput(this.value)"\n\t\t\tonkeydown="{~P~}.views[\'ContentEditor-MarkdownReference\'].onSearchKeydown(event)">\n\t\t<span class="md-ref-search-count" id="ContentEditor-MdRef-SearchCount"></span>\n\t\t<button class="md-ref-search-nav" id="ContentEditor-MdRef-SearchPrev"\n\t\t\tonclick="{~P~}.views[\'ContentEditor-MarkdownReference\'].navigateMatch(-1)" disabled>▲</button>\n\t\t<button class="md-ref-search-nav" id="ContentEditor-MdRef-SearchNext"\n\t\t\tonclick="{~P~}.views[\'ContentEditor-MarkdownReference\'].navigateMatch(1)" disabled>▼</button>\n\t</div>\n\t<div class="md-ref-content" id="ContentEditor-MdRef-Content">\n\n<h2>Headings</h2>\n<p>Use <code>#</code> through <code>######</code> for heading levels 1–6.</p>\n<pre><code># Heading 1\n## Heading 2\n### Heading 3\n#### Heading 4\n##### Heading 5\n###### Heading 6</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Emphasis</h2>\n<p>Bold, italic, strikethrough, and combinations.</p>\n<pre><code>**bold text**\n*italic text*\n***bold and italic***\n~~strikethrough~~\n**bold and ~~strikethrough~~**</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Inline Code</h2>\n<p>Wrap text in backticks for inline code.</p>\n<pre><code>Use `console.log()` to debug.\nUse ``double backticks for `literal` backticks``.</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Links</h2>\n<p>Inline links, reference links, and autolinks.</p>\n<pre><code>[Link text](https://example.com)\n[Link with title](https://example.com "Title text")\n\n[Reference link][1]\n[1]: https://example.com\n\nAutolink: https://example.com\nEmail: user@example.com</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Images</h2>\n<pre><code>\n\n\n[](https://example.com)</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Unordered Lists</h2>\n<p>Use <code>-</code>, <code>*</code>, or <code>+</code> for bullet items.</p>\n<pre><code>- Item one\n- Item two\n - Nested item\n - Another nested\n - Deeply nested\n- Item three</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Ordered Lists</h2>\n<pre><code>1. First item\n2. Second item\n3. Third item\n 1. Sub-item A\n 2. Sub-item B</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Task Lists</h2>\n<pre><code>- [x] Completed task\n- [ ] Incomplete task\n- [ ] Another task</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Blockquotes</h2>\n<pre><code>> This is a blockquote.\n>\n> It can span multiple paragraphs.\n>\n>> Nested blockquote.</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Code Blocks</h2>\n<p>Use triple backticks with an optional language identifier.</p>\n<pre><code>```javascript\nfunction hello()\n{\n console.log("Hello, world!");\n}\n```\n\n```python\ndef hello():\n print("Hello, world!")\n```\n\n```css\n.container {\n display: flex;\n gap: 16px;\n}\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Tables</h2>\n<p>Use pipes and hyphens. Colons control alignment.</p>\n<pre><code>| Left Align | Center Align | Right Align |\n|:-----------|:------------:|------------:|\n| Cell 1 | Cell 2 | Cell 3 |\n| Cell 4 | Cell 5 | Cell 6 |</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Horizontal Rules</h2>\n<p>Three or more hyphens, asterisks, or underscores.</p>\n<pre><code>---\n\n***\n\n___</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Footnotes</h2>\n<pre><code>Here is a footnote reference[^1] and another[^note].\n\n[^1]: This is the footnote content.\n[^note]: Footnotes can have any label.</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>HTML in Markdown</h2>\n<p>Raw HTML is allowed in GitHub-Flavored Markdown.</p>\n<pre><code><details>\n<summary>Click to expand</summary>\n\nHidden content here.\n\n</details>\n\n<kbd>Ctrl</kbd> + <kbd>S</kbd> to save.\n\n<mark>Highlighted text</mark>\n\n<sup>superscript</sup> and <sub>subscript</sub></code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Escaping Characters</h2>\n<p>Backslash-escape special markdown characters.</p>\n<pre><code>\\*not italic\\*\n\\# not a heading\n\\[not a link\\](url)\n\\`not code\\`</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Line Breaks</h2>\n<pre><code>End a line with two spaces\nto create a line break.\n\nOr use a blank line\n\nfor a new paragraph.</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>KaTeX — Inline Math</h2>\n<p>Wrap expressions with single dollar signs for inline math.</p>\n<pre><code>The equation $E = mc^2$ is famous.\n\nThe quadratic formula is $x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}$.\n\nGreek letters: $\\alpha$, $\\beta$, $\\gamma$, $\\delta$, $\\theta$, $\\pi$.\n\nSubscripts and superscripts: $x_i^2$ and $a_{n+1}$.</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>KaTeX — Display Math</h2>\n<p>Use double dollar signs on their own lines for display (block) math.</p>\n\n<h3>Integral</h3>\n<pre><code>$$\n\\int_{-\\infty}^{\\infty} e^{-x^2} \\, dx = \\sqrt{\\pi}\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h3>Summation</h3>\n<pre><code>$$\n\\sum_{n=1}^{\\infty} \\frac{1}{n^2} = \\frac{\\pi^2}{6}\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h3>Matrix</h3>\n<pre><code>$$\n\\begin{bmatrix}\na & b \\\\\nc & d\n\\end{bmatrix}\n\\begin{bmatrix}\nx \\\\\ny\n\\end{bmatrix}\n=\n\\begin{bmatrix}\nax + by \\\\\ncx + dy\n\\end{bmatrix}\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h3>Aligned Equations</h3>\n<pre><code>$$\n\\begin{aligned}\nf(x) &= x^2 + 2x + 1 \\\\\n &= (x + 1)^2\n\\end{aligned}\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h3>Cases (Piecewise)</h3>\n<pre><code>$$\nf(x) = \\begin{cases}\nx^2 & \\text{if } x \\geq 0 \\\\\n-x^2 & \\text{if } x < 0\n\\end{cases}\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h3>Fractions & Limits</h3>\n<pre><code>$$\n\\lim_{x \\to 0} \\frac{\\sin x}{x} = 1\n$$</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Mermaid — Flowchart</h2>\n<pre><code>```mermaid\ngraph TD\n A[Start] --> B{Decision}\n B -->|Yes| C[Do something]\n B -->|No| D[Do something else]\n C --> E[End]\n D --> E\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Mermaid — Sequence Diagram</h2>\n<pre><code>```mermaid\nsequenceDiagram\n participant A as Alice\n participant B as Bob\n A->>B: Hello Bob\n B-->>A: Hi Alice\n A->>B: How are you?\n B-->>A: Great!\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Mermaid — Gantt Chart</h2>\n<pre><code>```mermaid\ngantt\n title Project Timeline\n dateFormat YYYY-MM-DD\n section Phase 1\n Research :a1, 2024-01-01, 30d\n Design :a2, after a1, 20d\n section Phase 2\n Development :b1, after a2, 40d\n Testing :b2, after b1, 15d\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Mermaid — Class Diagram</h2>\n<pre><code>```mermaid\nclassDiagram\n Animal <|-- Duck\n Animal <|-- Fish\n Animal : +int age\n Animal : +String gender\n Animal : +swim()\n Duck : +String beakColor\n Duck : +quack()\n Fish : +int sizeInFeet\n Fish : +canEat()\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n<h2>Mermaid — State Diagram</h2>\n<pre><code>```mermaid\nstateDiagram-v2\n [*] --> Idle\n Idle --> Processing : Start\n Processing --> Done : Complete\n Processing --> Error : Fail\n Error --> Idle : Reset\n Done --> [*]\n```</code><button class="md-ref-copy-btn" onclick="pict.views[\'ContentEditor-MarkdownReference\'].copyCodeBlock(this)">Copy</button></pre>\n\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"ContentEditor-MarkdownReference-Display",TemplateHash:"ContentEditor-MarkdownReference-Template",DestinationAddress:"#ContentEditor-SidebarReference-Container",RenderMethod:"replace"}]},o=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._hasRendered=!1,o._searchMatches=[],o._currentMatchIndex=-1,o._originalContent="",o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){this._hasRendered=!0;var r=document.getElementById("ContentEditor-MdRef-Content");return r&&(this._originalContent=r.innerHTML),this.pict.CSSMap.injectCSS(),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"copyCodeBlock",value:function(t){var e=t.closest("pre");if(e){var n=e.querySelector("code");if(n){var i=n.textContent;navigator.clipboard&&navigator.clipboard.writeText(i).then(function(){t.textContent="Copied!",setTimeout(function(){t.textContent="Copy"},1500)})}}}},{key:"onSearchInput",value:function(t){this._performSearch(t)}},{key:"onSearchKeydown",value:function(t){"Enter"===t.key&&(t.preventDefault(),t.shiftKey?this.navigateMatch(-1):this.navigateMatch(1)),"Escape"===t.key&&(t.target.value="",this._clearSearch())}},{key:"navigateMatch",value:function(t){if(0!==this._searchMatches.length){this._currentMatchIndex>=0&&this._searchMatches[this._currentMatchIndex]&&this._searchMatches[this._currentMatchIndex].classList.remove("md-ref-highlight-active"),this._currentMatchIndex+=t,this._currentMatchIndex>=this._searchMatches.length&&(this._currentMatchIndex=0),this._currentMatchIndex<0&&(this._currentMatchIndex=this._searchMatches.length-1);var e=this._searchMatches[this._currentMatchIndex];e.classList.add("md-ref-highlight-active"),e.scrollIntoView({behavior:"smooth",block:"center"}),this._updateSearchCount()}}},{key:"_performSearch",value:function(t){var e=document.getElementById("ContentEditor-MdRef-Content");if(e){if(e.innerHTML=this._originalContent,this._searchMatches=[],this._currentMatchIndex=-1,!t||t.length<2)return this._updateSearchCount(),void this._updateNavButtons();for(var n,i=t.toLowerCase(),o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,!1),r=[];n=o.nextNode();)n.nodeValue.toLowerCase().indexOf(i)>=0&&r.push(n);for(var a=0;a<r.length;a++)this._highlightTextNode(r[a],i);this._searchMatches=Array.from(e.querySelectorAll("mark.md-ref-highlight")),this._searchMatches.length>0&&(this._currentMatchIndex=0,this._searchMatches[0].classList.add("md-ref-highlight-active"),this._searchMatches[0].scrollIntoView({behavior:"smooth",block:"center"})),this._updateSearchCount(),this._updateNavButtons()}}},{key:"_highlightTextNode",value:function(t,e){for(var n=t.nodeValue,i=n.toLowerCase(),o=t.parentNode,r=document.createDocumentFragment(),a=0,s=i.indexOf(e);s>=0;){s>a&&r.appendChild(document.createTextNode(n.substring(a,s)));var c=document.createElement("mark");c.className="md-ref-highlight",c.textContent=n.substring(s,s+e.length),r.appendChild(c),a=s+e.length,s=i.indexOf(e,a)}a<n.length&&r.appendChild(document.createTextNode(n.substring(a))),o.replaceChild(r,t)}},{key:"_updateSearchCount",value:function(){var t=document.getElementById("ContentEditor-MdRef-SearchCount");if(t)if(0===this._searchMatches.length){var e=document.getElementById("ContentEditor-MdRef-SearchInput");e&&e.value&&e.value.length>=2?t.textContent="0":t.textContent=""}else t.textContent=this._currentMatchIndex+1+"/"+this._searchMatches.length}},{key:"_updateNavButtons",value:function(){var t=document.getElementById("ContentEditor-MdRef-SearchPrev"),e=document.getElementById("ContentEditor-MdRef-SearchNext"),n=this._searchMatches.length>0;t&&(t.disabled=!n),e&&(e.disabled=!n)}},{key:"_clearSearch",value:function(){var t=document.getElementById("ContentEditor-MdRef-Content");t&&this._originalContent&&(t.innerHTML=this._originalContent),this._searchMatches=[],this._currentMatchIndex=-1,this._updateSearchCount(),this._updateNavButtons()}}])}(t("pict-view"));e.exports=o,e.exports.default_configuration=i},{"pict-view":88}],111:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._isOpen=!1,o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(t,n,i,o){var r=this.pict.AppData.ContentEditor,a=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-MarkdownWordWrap");a&&a[0]&&(a[0].checked=r.MarkdownWordWrap);var s=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-CodeWordWrap");s&&s[0]&&(s[0].checked=r.CodeWordWrap);var c=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-EditingControls");c&&c[0]&&(c[0].checked=r.MarkdownEditingControls);var l=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-ContentPreviewMode");l&&l[0]&&(l[0].value=r.ContentPreviewMode||"off");var d=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-AutoSegment");d&&d[0]&&(d[0].checked=r.AutoSegmentMarkdown);var p=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-SegmentDepth");p&&p[0]&&(p[0].value=String(r.AutoSegmentDepth),p[0].disabled=!r.AutoSegmentMarkdown);var u=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-AutoPreviewImages");u&&u[0]&&(u[0].checked=r.AutoPreviewImages);var h=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-AutoPreviewVideo");h&&h[0]&&(h[0].checked=r.AutoPreviewVideo);var f=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-AutoPreviewAudio");f&&f[0]&&(f[0].checked=r.AutoPreviewAudio);var v=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-ShowHiddenFiles");return v&&v[0]&&(v[0].checked=r.ShowHiddenFiles),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}},{key:"togglePanel",value:function(){this._isOpen?this.closePanel():this.openPanel()}},{key:"openPanel",value:function(){this._isOpen=!0;var t=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsFlyout"),e=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsOverlay"),n=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsGear");t&&t[0]&&t[0].classList.add("open"),e&&e[0]&&e[0].classList.add("open"),n&&n[0]&&n[0].classList.add("active")}},{key:"closePanel",value:function(){this._isOpen=!1;var t=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsFlyout"),e=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsOverlay"),n=this.pict.ContentAssignment.getElement("#ContentEditor-SettingsGear");t&&t[0]&&t[0].classList.remove("open"),e&&e[0]&&e[0].classList.remove("open"),n&&n[0]&&n[0].classList.remove("active")}},{key:"onMarkdownWordWrapChanged",value:function(t){this.pict.AppData.ContentEditor.MarkdownWordWrap=t,this.pict.PictApplication.saveSettings();var e=this.pict.views["ContentEditor-MarkdownEditor"];if(e&&"markdown"===this.pict.AppData.ContentEditor.ActiveEditor&&e._segmentEditors)for(var n in e._segmentEditors){var i=e._segmentEditors[n];i&&i.contentDOM&&(t?i.contentDOM.classList.add("cm-lineWrapping"):i.contentDOM.classList.remove("cm-lineWrapping"))}}},{key:"onCodeWordWrapChanged",value:function(t){this.pict.AppData.ContentEditor.CodeWordWrap=t,this.pict.PictApplication.saveSettings();var e=this.pict.views["ContentEditor-CodeEditor"];e&&e._editorElement&&"code"===this.pict.AppData.ContentEditor.ActiveEditor&&(t?(e._editorElement.style.whiteSpace="pre-wrap",e._editorElement.style.overflowWrap="break-word"):(e._editorElement.style.whiteSpace="pre",e._editorElement.style.overflowWrap="normal"))}},{key:"onEditingControlsChanged",value:function(t){this.pict.AppData.ContentEditor.MarkdownEditingControls=t,this.pict.PictApplication.saveSettings();var e=this.pict.views["ContentEditor-MarkdownEditor"];e&&"markdown"===this.pict.AppData.ContentEditor.ActiveEditor&&e.toggleControls(t)}},{key:"onContentPreviewModeChanged",value:function(t){this.pict.AppData.ContentEditor.ContentPreviewMode=t,this.pict.PictApplication.saveSettings();var e=this.pict.views["ContentEditor-MarkdownEditor"];e&&"markdown"===this.pict.AppData.ContentEditor.ActiveEditor&&e.setPreviewMode(t)}},{key:"onAutoSegmentChanged",value:function(t){this.pict.AppData.ContentEditor.AutoSegmentMarkdown=t,this.pict.PictApplication.saveSettings();var e=this.pict.ContentAssignment.getElement("#ContentEditor-Setting-SegmentDepth");e&&e[0]&&(e[0].disabled=!t)}},{key:"onSegmentDepthChanged",value:function(t){this.pict.AppData.ContentEditor.AutoSegmentDepth=parseInt(t,10)||1,this.pict.PictApplication.saveSettings()}},{key:"onAutoPreviewImagesChanged",value:function(t){this.pict.AppData.ContentEditor.AutoPreviewImages=t,this.pict.PictApplication.saveSettings()}},{key:"onAutoPreviewVideoChanged",value:function(t){this.pict.AppData.ContentEditor.AutoPreviewVideo=t,this.pict.PictApplication.saveSettings()}},{key:"onAutoPreviewAudioChanged",value:function(t){this.pict.AppData.ContentEditor.AutoPreviewAudio=t,this.pict.PictApplication.saveSettings()}},{key:"onShowHiddenFilesChanged",value:function(t){this.pict.AppData.ContentEditor.ShowHiddenFiles=t,this.pict.PictApplication.saveSettings();var e=this;this.pict.PictApplication.syncHiddenFilesSetting(function(){e.pict.PictApplication.loadFileList()})}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"ContentEditor-SettingsPanel",DefaultRenderable:"ContentEditor-SettingsPanel-Display",DefaultDestinationAddress:"#ContentEditor-SettingsPanel-Container",AutoRender:!1,CSS:"\n\t\t.content-editor-settings-wrap\n\t\t{\n\t\t\tposition: relative;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\t\t.content-editor-settings-gear\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 6px;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tborder-radius: 4px;\n\t\t\tcolor: #B8AFA4;\n\t\t\ttransition: color 0.15s;\n\t\t}\n\t\t.content-editor-settings-gear:hover,\n\t\t.content-editor-settings-gear.active\n\t\t{\n\t\t\tcolor: #E8E0D4;\n\t\t}\n\t\t.content-editor-settings-gear svg\n\t\t{\n\t\t\twidth: 20px;\n\t\t\theight: 20px;\n\t\t\tfill: currentColor;\n\t\t}\n\t\t/* Flyout overlay — covers viewport to catch clicks outside */\n\t\t.content-editor-settings-overlay\n\t\t{\n\t\t\tdisplay: none;\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tbottom: 0;\n\t\t\tz-index: 999;\n\t\t}\n\t\t.content-editor-settings-overlay.open\n\t\t{\n\t\t\tdisplay: block;\n\t\t}\n\t\t/* Flyout panel */\n\t\t.content-editor-settings-flyout\n\t\t{\n\t\t\tposition: absolute;\n\t\t\ttop: 44px;\n\t\t\tright: 0;\n\t\t\twidth: 270px;\n\t\t\tbackground: #FFF;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 8px;\n\t\t\tbox-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);\n\t\t\tz-index: 1000;\n\t\t\topacity: 0;\n\t\t\ttransform: translateY(-4px);\n\t\t\tpointer-events: none;\n\t\t\ttransition: opacity 0.15s ease, transform 0.15s ease;\n\t\t}\n\t\t.content-editor-settings-flyout.open\n\t\t{\n\t\t\topacity: 1;\n\t\t\ttransform: translateY(0);\n\t\t\tpointer-events: auto;\n\t\t}\n\t\t/* Speech bubble arrow */\n\t\t.content-editor-settings-flyout::before\n\t\t{\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop: -7px;\n\t\t\tright: 12px;\n\t\t\twidth: 12px;\n\t\t\theight: 12px;\n\t\t\tbackground: #FFF;\n\t\t\tborder-left: 1px solid #DDD6CA;\n\t\t\tborder-top: 1px solid #DDD6CA;\n\t\t\ttransform: rotate(45deg);\n\t\t}\n\t\t.content-editor-settings-flyout-body\n\t\t{\n\t\t\tpadding: 8px;\n\t\t}\n\t\t.content-editor-settings-flyout-link\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 8px;\n\t\t\tpadding: 10px 12px;\n\t\t\tborder-radius: 6px;\n\t\t\ttext-decoration: none;\n\t\t\tcolor: #3D3229;\n\t\t\tfont-size: 0.85rem;\n\t\t\tfont-weight: 500;\n\t\t\ttransition: background 0.1s;\n\t\t}\n\t\t.content-editor-settings-flyout-link:hover\n\t\t{\n\t\t\tbackground: #F5F3EE;\n\t\t}\n\t\t.content-editor-settings-flyout-link svg\n\t\t{\n\t\t\twidth: 16px;\n\t\t\theight: 16px;\n\t\t\tflex-shrink: 0;\n\t\t\tfill: #8A7F72;\n\t\t}\n\t\t.content-editor-settings-divider\n\t\t{\n\t\t\theight: 1px;\n\t\t\tbackground: #EDE9E3;\n\t\t\tmargin: 4px 8px;\n\t\t}\n\t\t/* Settings controls */\n\t\t.content-editor-settings-section\n\t\t{\n\t\t\tpadding: 8px 12px;\n\t\t}\n\t\t.content-editor-settings-label\n\t\t{\n\t\t\tfont-size: 0.72rem;\n\t\t\tfont-weight: 600;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.5px;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-bottom: 8px;\n\t\t}\n\t\t.content-editor-settings-row\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tgap: 8px;\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t\t.content-editor-settings-row:last-child\n\t\t{\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t\t.content-editor-settings-checkbox\n\t\t{\n\t\t\twidth: 16px;\n\t\t\theight: 16px;\n\t\t\taccent-color: #2E7D74;\n\t\t\tcursor: pointer;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.content-editor-settings-checkbox-label\n\t\t{\n\t\t\tfont: inherit;\n\t\t\tfont-size: 0.85rem;\n\t\t\tcolor: #3D3229;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.content-editor-settings-select\n\t\t{\n\t\t\twidth: 140px;\n\t\t\tpadding: 5px 8px;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 4px;\n\t\t\tbackground: #FFF;\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #3D3229;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.content-editor-settings-select:disabled\n\t\t{\n\t\t\topacity: 0.45;\n\t\t\tcursor: not-allowed;\n\t\t}\n\t\t.content-editor-settings-select-label\n\t\t{\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #5E5549;\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t/* ============================================\n\t\t RESPONSIVE: Tablet / Phone (max-width: 768px)\n\t\t ============================================ */\n\t\t@media (max-width: 768px)\n\t\t{\n\t\t\t/* Settings flyout: position from left edge for more room */\n\t\t\t.content-editor-settings-flyout\n\t\t\t{\n\t\t\t\tright: -8px;\n\t\t\t\twidth: 260px;\n\t\t\t}\n\t\t}\n\n\t\t/* ============================================\n\t\t RESPONSIVE: Small phone (max-width: 480px)\n\t\t ============================================ */\n\t\t@media (max-width: 480px)\n\t\t{\n\t\t\t/* Full-width settings flyout on small phones */\n\t\t\t.content-editor-settings-flyout\n\t\t\t{\n\t\t\t\tposition: fixed;\n\t\t\t\ttop: 48px;\n\t\t\t\tright: 0;\n\t\t\t\tleft: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\tborder-radius: 0 0 8px 8px;\n\t\t\t}\n\t\t\t.content-editor-settings-flyout::before\n\t\t\t{\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t",Templates:[{Hash:"ContentEditor-SettingsPanel-Template",Template:'\n<div class="content-editor-settings-wrap">\n\t<button class="content-editor-settings-gear" id="ContentEditor-SettingsGear"\n\t\tonclick="{~P~}.views[\'ContentEditor-SettingsPanel\'].togglePanel()">\n\t\t<svg viewBox="0 0 24 24"><path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.49.49 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.48.48 0 0 0-.48-.41h-3.84a.48.48 0 0 0-.48.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96a.49.49 0 0 0-.59.22L2.74 8.87a.48.48 0 0 0 .12.61l2.03 1.58c-.05.3-.07.62-.07.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.26.41.48.41h3.84c.24 0 .44-.17.48-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6A3.6 3.6 0 1 1 12 8.4a3.6 3.6 0 0 1 0 7.2z"/></svg>\n\t</button>\n\t<div class="content-editor-settings-overlay" id="ContentEditor-SettingsOverlay"\n\t\tonclick="{~P~}.views[\'ContentEditor-SettingsPanel\'].closePanel()"></div>\n\t<div class="content-editor-settings-flyout" id="ContentEditor-SettingsFlyout">\n\t\t<div class="content-editor-settings-flyout-body">\n\t\t\t<a class="content-editor-settings-flyout-link"\n\t\t\t\thref="/preview.html{~D:AppData.ContentEditor.ViewerHash~}" target="_blank">\n\t\t\t\t<svg viewBox="0 0 24 24"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>\n\t\t\t\tDocuserve Preview\n\t\t\t</a>\n\t\t\t<div class="content-editor-settings-divider"></div>\n\t\t\t<div class="content-editor-settings-section">\n\t\t\t\t<div class="content-editor-settings-label">Word Wrap</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-MarkdownWordWrap">Markdown Word Wrap</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-MarkdownWordWrap"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onMarkdownWordWrapChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-CodeWordWrap">Code Word Wrap</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-CodeWordWrap"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onCodeWordWrapChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="content-editor-settings-divider"></div>\n\t\t\t<div class="content-editor-settings-section">\n\t\t\t\t<div class="content-editor-settings-label">Markdown Editor</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-EditingControls">Editing Controls</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-EditingControls"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onEditingControlsChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<span class="content-editor-settings-select-label">Content Preview</span>\n\t\t\t\t\t<select class="content-editor-settings-select"\n\t\t\t\t\t\tid="ContentEditor-Setting-ContentPreviewMode"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onContentPreviewModeChanged(this.value)">\n\t\t\t\t\t\t<option value="off">Off</option>\n\t\t\t\t\t\t<option value="bottom">Underneath</option>\n\t\t\t\t\t\t<option value="side">Beside</option>\n\t\t\t\t\t\t<option value="tabbed">Tab</option>\n\t\t\t\t\t</select>\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-AutoSegment">Auto Segment Markdown</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-AutoSegment"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onAutoSegmentChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<span class="content-editor-settings-select-label">Segment Depth</span>\n\t\t\t\t\t<select class="content-editor-settings-select"\n\t\t\t\t\t\tid="ContentEditor-Setting-SegmentDepth"\n\t\t\t\t\t\tdisabled\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onSegmentDepthChanged(this.value)">\n\t\t\t\t\t\t<option value="1">Depth 1: Blocks</option>\n\t\t\t\t\t\t<option value="2">Depth 2: ##</option>\n\t\t\t\t\t\t<option value="3">Depth 3: ###</option>\n\t\t\t\t\t\t<option value="4">Depth 4: ####</option>\n\t\t\t\t\t\t<option value="5">Depth 5: #####</option>\n\t\t\t\t\t\t<option value="6">Depth 6: ######</option>\n\t\t\t\t\t</select>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="content-editor-settings-divider"></div>\n\t\t\t<div class="content-editor-settings-section">\n\t\t\t\t<div class="content-editor-settings-label">Media Preview</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-AutoPreviewImages">Auto-Preview Images</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-AutoPreviewImages"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onAutoPreviewImagesChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-AutoPreviewVideo">Auto-Preview Video</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-AutoPreviewVideo"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onAutoPreviewVideoChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-AutoPreviewAudio">Auto-Preview Audio</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-AutoPreviewAudio"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onAutoPreviewAudioChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="content-editor-settings-divider"></div>\n\t\t\t<div class="content-editor-settings-section">\n\t\t\t\t<div class="content-editor-settings-label">File Browser</div>\n\t\t\t\t<div class="content-editor-settings-row">\n\t\t\t\t\t<label class="content-editor-settings-checkbox-label"\n\t\t\t\t\t\tfor="ContentEditor-Setting-ShowHiddenFiles">Show Hidden Files</label>\n\t\t\t\t\t<input type="checkbox" class="content-editor-settings-checkbox"\n\t\t\t\t\t\tid="ContentEditor-Setting-ShowHiddenFiles"\n\t\t\t\t\t\tonchange="{~P~}.views[\'ContentEditor-SettingsPanel\'].onShowHiddenFilesChanged(this.checked)">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"ContentEditor-SettingsPanel-Display",TemplateHash:"ContentEditor-SettingsPanel-Template",DestinationAddress:"#ContentEditor-SettingsPanel-Container",RenderMethod:"replace"}]}},{"pict-view":88}],112:[function(t,e,n){var i=function(t){function e(t,n,i){return _classCallCheck(this,e),_callSuper(this,e,[t,n,i])}return _inherits(e,t),_createClass(e,[{key:"onBeforeRender",value:function(t,n,i){var o=this.pict.AppData.ContentEditor;if(o.DirtyIndicatorHTML=o.IsDirty?' <span class="content-editor-dirty-indicator">*</span>':"",o.SaveDisabledAttr=!o.CurrentFile||o.IsSaving?"disabled":"",o.SaveVisibilityAttr=o.IsDirty||o.IsSaving||o.SaveStatus?"":'style="display:none"',o.CloseVisibilityAttr=o.CurrentFile?"":'style="display:none"',o.CurrentFile){var r=o.CurrentFile.replace(/\.md$/,"");o.ViewerHash="#/page/"+r}else o.ViewerHash="";return _superPropGet(e,"onBeforeRender",this,3)([t,n,i])}},{key:"onAfterRender",value:function(t,n,i,o){var r=this.pict.views["ContentEditor-SettingsPanel"];return r&&r.render(),_superPropGet(e,"onAfterRender",this,3)([t,n,i,o])}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"ContentEditor-TopBar",DefaultRenderable:"ContentEditor-TopBar-Display",DefaultDestinationAddress:"#ContentEditor-TopBar-Container",AutoRender:!1,CSS:"\n\t\t.content-editor-topbar\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tbackground: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 0;\n\t\t\theight: 48px;\n\t\t\tborder-bottom: 3px solid #2E7D74;\n\t\t\tposition: relative;\n\t\t}\n\t\t.content-editor-topbar-brand\n\t\t{\n\t\t\tpadding: 0 16px;\n\t\t\tfont-size: 1rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #E8E0D4;\n\t\t\twhite-space: nowrap;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t/* Centered file name — absolutely positioned so it stays\n\t\t centered in the full bar regardless of left/right content */\n\t\t.content-editor-topbar-file\n\t\t{\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t\tmax-width: 50%;\n\t\t\ttext-align: center;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.content-editor-topbar-filename\n\t\t{\n\t\t\tfont-size: 0.9rem;\n\t\t\tfont-weight: 500;\n\t\t\tcolor: #E8E0D4;\n\t\t\tletter-spacing: 0.2px;\n\t\t}\n\t\t.content-editor-topbar-file .content-editor-dirty-indicator\n\t\t{\n\t\t\tcolor: #E8A94D;\n\t\t\tfont-weight: bold;\n\t\t}\n\t\t/* Left spacer pushes actions to the right */\n\t\t.content-editor-topbar-spacer\n\t\t{\n\t\t\tflex: 1;\n\t\t}\n\t\t.content-editor-topbar-status\n\t\t{\n\t\t\tpadding: 0 12px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.content-editor-status-saving\n\t\t{\n\t\t\tcolor: #E8A94D;\n\t\t}\n\t\t.content-editor-status-saved\n\t\t{\n\t\t\tcolor: #7BC47F;\n\t\t}\n\t\t.content-editor-status-error\n\t\t{\n\t\t\tcolor: #D9534F;\n\t\t}\n\t\t.content-editor-topbar-stats\n\t\t{\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\twhite-space: nowrap;\n\t\t\tpadding: 0 8px;\n\t\t\tflex-shrink: 0;\n\t\t\tletter-spacing: 0.2px;\n\t\t}\n\t\t.content-editor-topbar-actions\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 8px;\n\t\t\tpadding: 0 12px;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.content-editor-topbar-btn\n\t\t{\n\t\t\tpadding: 6px 14px;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tcursor: pointer;\n\t\t\tfont-size: 0.8rem;\n\t\t\tfont-weight: 600;\n\t\t}\n\t\t.content-editor-topbar-btn-save\n\t\t{\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t}\n\t\t.content-editor-topbar-btn-save:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t.content-editor-topbar-btn-save:disabled\n\t\t{\n\t\t\tbackground: #5E5549;\n\t\t\tcolor: #8A7F72;\n\t\t\tcursor: not-allowed;\n\t\t}\n\t\t.content-editor-topbar-btn-close\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tcolor: #B8AFA4;\n\t\t\tborder: 1px solid #5E5549;\n\t\t}\n\t\t.content-editor-topbar-btn-close:hover\n\t\t{\n\t\t\tcolor: #E8E0D4;\n\t\t\tborder-color: #8A7F72;\n\t\t\tbackground: rgba(255, 255, 255, 0.05);\n\t\t}\n\t\t/* Close-file confirmation overlay */\n\t\t.content-editor-confirm-overlay\n\t\t{\n\t\t\tdisplay: none;\n\t\t\tposition: fixed;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tbottom: 0;\n\t\t\tz-index: 1099;\n\t\t\tbackground: rgba(0, 0, 0, 0.35);\n\t\t}\n\t\t.content-editor-confirm-overlay.open\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.content-editor-confirm-panel\n\t\t{\n\t\t\tbackground: #FFF;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 10px;\n\t\t\tbox-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);\n\t\t\twidth: 360px;\n\t\t\tmax-width: 90vw;\n\t\t\toverflow: hidden;\n\t\t}\n\t\t.content-editor-confirm-body\n\t\t{\n\t\t\tpadding: 24px 22px 16px;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.content-editor-confirm-icon\n\t\t{\n\t\t\tfont-size: 2rem;\n\t\t\tmargin-bottom: 8px;\n\t\t\tcolor: #E8A94D;\n\t\t}\n\t\t.content-editor-confirm-title\n\t\t{\n\t\t\tfont-size: 0.95rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t\t.content-editor-confirm-message\n\t\t{\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #5E5549;\n\t\t\tmargin-bottom: 16px;\n\t\t\tline-height: 1.5;\n\t\t}\n\t\t.content-editor-confirm-actions\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tgap: 10px;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.content-editor-confirm-btn\n\t\t{\n\t\t\tpadding: 8px 20px;\n\t\t\tborder: none;\n\t\t\tborder-radius: 5px;\n\t\t\tfont-size: 0.82rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.content-editor-confirm-btn-discard\n\t\t{\n\t\t\tbackground: #D9534F;\n\t\t\tcolor: #FFF;\n\t\t}\n\t\t.content-editor-confirm-btn-discard:hover\n\t\t{\n\t\t\tbackground: #C9302C;\n\t\t}\n\t\t.content-editor-confirm-btn-cancel\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tcolor: #5E5549;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t}\n\t\t.content-editor-confirm-btn-cancel:hover\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t}\n\t\t.content-editor-confirm-footer\n\t\t{\n\t\t\tpadding: 10px 22px;\n\t\t\tborder-top: 1px solid #EDE9E3;\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.content-editor-confirm-kbd\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 1px 5px;\n\t\t\tfont-size: 0.68rem;\n\t\t\tfont-family: monospace;\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 3px;\n\t\t\tcolor: #5E5549;\n\t\t}\n\n\t\t/* ============================================\n\t\t RESPONSIVE: Tablet / Phone (max-width: 768px)\n\t\t ============================================ */\n\t\t@media (max-width: 768px)\n\t\t{\n\t\t\t.content-editor-topbar\n\t\t\t{\n\t\t\t\theight: auto;\n\t\t\t\tmin-height: 44px;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tpadding: 4px 0;\n\t\t\t}\n\n\t\t\t/* Brand text: shrink */\n\t\t\t.content-editor-topbar-brand\n\t\t\t{\n\t\t\t\tpadding: 0 8px;\n\t\t\t\tfont-size: 0.85rem;\n\t\t\t}\n\n\t\t\t/* File name: switch from absolute centering to flow layout */\n\t\t\t.content-editor-topbar-file\n\t\t\t{\n\t\t\t\tposition: static;\n\t\t\t\ttransform: none;\n\t\t\t\tmax-width: none;\n\t\t\t\tflex: 1;\n\t\t\t\tmin-width: 0;\n\t\t\t\tpadding: 0 4px;\n\t\t\t}\n\n\t\t\t/* Hide the spacer (not needed when file is in-flow) */\n\t\t\t.content-editor-topbar-spacer\n\t\t\t{\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t\t/* Hide word/line count stats on mobile to save space */\n\t\t\t.content-editor-topbar-stats\n\t\t\t{\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t\t/* Compact action buttons */\n\t\t\t.content-editor-topbar-actions\n\t\t\t{\n\t\t\t\tgap: 4px;\n\t\t\t\tpadding: 0 6px;\n\t\t\t}\n\n\t\t\t.content-editor-topbar-btn\n\t\t\t{\n\t\t\t\tpadding: 5px 10px;\n\t\t\t\tfont-size: 0.75rem;\n\t\t\t}\n\n\t\t\t/* Status text */\n\t\t\t.content-editor-topbar-status\n\t\t\t{\n\t\t\t\tpadding: 0 6px;\n\t\t\t\tfont-size: 0.72rem;\n\t\t\t}\n\n\t\t\t/* Confirm dialog: tighter for mobile */\n\t\t\t.content-editor-confirm-panel\n\t\t\t{\n\t\t\t\twidth: 95vw;\n\t\t\t\tmax-width: 95vw;\n\t\t\t}\n\t\t}\n\n\t\t/* ============================================\n\t\t RESPONSIVE: Small phone (max-width: 480px)\n\t\t ============================================ */\n\t\t@media (max-width: 480px)\n\t\t{\n\t\t\t/* Hide brand text entirely on very small screens */\n\t\t\t.content-editor-topbar-brand\n\t\t\t{\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t\t.content-editor-topbar-filename\n\t\t\t{\n\t\t\t\tfont-size: 0.8rem;\n\t\t\t}\n\n\t\t\t.content-editor-topbar-actions\n\t\t\t{\n\t\t\t\tpadding: 0 4px;\n\t\t\t}\n\t\t}\n\t",Templates:[{Hash:"ContentEditor-TopBar-Template",Template:'\n<div class="content-editor-topbar">\n\t<div class="content-editor-topbar-brand">Content Editor</div>\n\t<div class="content-editor-topbar-file">\n\t\t<span class="content-editor-topbar-filename">{~D:AppData.ContentEditor.CurrentFile~}</span>{~D:AppData.ContentEditor.DirtyIndicatorHTML~}\n\t</div>\n\t<div class="content-editor-topbar-spacer"></div>\n\t<div class="content-editor-topbar-status {~D:AppData.ContentEditor.SaveStatusClass~}">\n\t\t{~D:AppData.ContentEditor.SaveStatus~}\n\t</div>\n\t<span class="content-editor-topbar-stats" id="ContentEditor-Stats"></span>\n\t<div class="content-editor-topbar-actions">\n\t\t<button class="content-editor-topbar-btn content-editor-topbar-btn-save"\n\t\t\tonclick="{~P~}.PictApplication.saveCurrentFile()"\n\t\t\t{~D:AppData.ContentEditor.SaveDisabledAttr~} {~D:AppData.ContentEditor.SaveVisibilityAttr~}>Save</button>\n\t\t<button class="content-editor-topbar-btn content-editor-topbar-btn-close"\n\t\t\tonclick="{~P~}.PictApplication.closeCurrentFile()"\n\t\t\t{~D:AppData.ContentEditor.CloseVisibilityAttr~}>Close</button>\n\t\t<div id="ContentEditor-SettingsPanel-Container"></div>\n\t</div>\n</div>\n<div class="content-editor-confirm-overlay" id="ContentEditor-ConfirmOverlay"\n\tonclick="{~P~}.PictApplication.cancelCloseFile()">\n\t<div class="content-editor-confirm-panel" onclick="event.stopPropagation()">\n\t\t<div class="content-editor-confirm-body">\n\t\t\t<div class="content-editor-confirm-icon">⚠</div>\n\t\t\t<div class="content-editor-confirm-title">Unsaved Changes</div>\n\t\t\t<div class="content-editor-confirm-message">\n\t\t\t\tThis file has unsaved changes.<br>Close without saving?\n\t\t\t</div>\n\t\t\t<div class="content-editor-confirm-actions">\n\t\t\t\t<button class="content-editor-confirm-btn content-editor-confirm-btn-discard"\n\t\t\t\t\tonclick="{~P~}.PictApplication.confirmCloseFile()">Discard & Close</button>\n\t\t\t\t<button class="content-editor-confirm-btn content-editor-confirm-btn-cancel"\n\t\t\t\t\tonclick="{~P~}.PictApplication.cancelCloseFile()">Cancel</button>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="content-editor-confirm-footer">\n\t\t\t<span class="content-editor-confirm-kbd">Y</span> to discard ·\n\t\t\t<span class="content-editor-confirm-kbd">N</span> or\n\t\t\t<span class="content-editor-confirm-kbd">Esc</span> to cancel\n\t\t</div>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"ContentEditor-TopBar-Display",TemplateHash:"ContentEditor-TopBar-Template",DestinationAddress:"#ContentEditor-TopBar-Container",RenderMethod:"replace"}]}},{"pict-view":88}],113:[function(t,e,n){var i=function(t){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e,[t,n,i]))._topics={},o._topicsFilePath="",o._hasRendered=!1,o._editingTopicCode=null,o}return _inherits(e,t),_createClass(e,[{key:"onAfterRender",value:function(){this._hasRendered=!0,this.pict.CSSMap.injectCSS(),this._topicsFilePath?(this._updateHeaderTitle(),this.renderTopicList()):this._showEmptyState()}},{key:"loadTopicsFile",value:function(t,e){var n="function"==typeof e?e:function(){},i=this;if(!t)return n("No path specified");var o=this.pict.providers["ContentEditor-Provider"];if(!o)return n("Provider not available");o.loadFile(t,function(e,o){if(e)return i._topics={},i._topicsFilePath="",i._hasRendered&&i._showEmptyState(),n(e);try{var r=JSON.parse(o);"object"!==_typeof(r)||null===r||Array.isArray(r)?i._topics={}:i._topics=r}catch(t){i._topics={},i.log.warn("ContentEditor-Topics: Failed to parse topics JSON: "+t.message)}return i._topicsFilePath=t,i.pict.AppData.ContentEditor.TopicsFilePath=t,i.pict.PictApplication.saveSettings(),i._hasRendered&&(i._updateHeaderTitle(),i.renderTopicList(),i._showFooter(!0)),n(null)})}},{key:"saveTopicsFile",value:function(t){var e="function"==typeof t?t:function(){};if(!this._topicsFilePath)return e("No topics file loaded");var n=this.pict.providers["ContentEditor-Provider"];if(!n)return e("Provider not available");var i=JSON.stringify(this._topics,null,"\t");n.saveFile(this._topicsFilePath,i,e)}},{key:"closeTopicsFile",value:function(){this._topics={},this._topicsFilePath="",this._editingTopicCode=null,this.pict.AppData.ContentEditor.TopicsFilePath="",this.pict.PictApplication.saveSettings(),this._hasRendered&&this._showEmptyState()}},{key:"addTopic",value:function(t){var e=this;if(this._topicsFilePath){var n=t||{},i=n.TopicCode||this._generateUniqueCode("New-Topic"),o={TopicCode:i,TopicHelpFilePath:n.TopicHelpFilePath||"",TopicTitle:n.TopicTitle||""};"number"==typeof n.RelevantMarkdownLine&&(o.RelevantMarkdownLine=n.RelevantMarkdownLine),this._topics[i]=o;var r=this;this.saveTopicsFile(function(){r.renderTopicList(),r.startEditTopic(i)})}else this._createDefaultTopicsFile(function(){e.addTopic(t)})}},{key:"removeTopic",value:function(t){if(t&&this._topics[t]&&confirm('Remove topic "'+t+'"?')){delete this._topics[t],this._editingTopicCode=null;var e=this;this.saveTopicsFile(function(){e.renderTopicList()})}}},{key:"startEditTopic",value:function(t){if(t&&this._topics[t]){this._editingTopicCode=t,this.renderTopicList();var e=document.getElementById("topics-edit-code");e&&(e.focus(),e.select())}}},{key:"saveEditTopic",value:function(t){if(t&&this._topics[t]){var e=document.getElementById("topics-edit-code"),n=document.getElementById("topics-edit-title"),i=document.getElementById("topics-edit-path"),o=document.getElementById("topics-edit-line");if(e){var r=e.value.trim(),a=n?n.value.trim():"",s=i?i.value.trim():"",c=o?parseInt(o.value,10):NaN;if(r){if(r!==t&&this._topics[r])return e.style.borderColor="#D9534F",void alert('A topic with code "'+r+'" already exists.');r!==t&&delete this._topics[t];var l={TopicCode:r,TopicHelpFilePath:s,TopicTitle:a};!isNaN(c)&&c>0&&(l.RelevantMarkdownLine=c),this._topics[r]=l,this._editingTopicCode=null;var d=this;this.saveTopicsFile(function(){d.renderTopicList()})}else e.style.borderColor="#D9534F"}}}},{key:"cancelEditTopic",value:function(){this._editingTopicCode=null,this.renderTopicList()}},{key:"navigateToTopic",value:function(t){var e=this;if(t&&this._topics[t]){var n=this._topics[t],i=n.TopicHelpFilePath;if(i&&(this.pict.PictApplication.navigateToFile(i),"number"==typeof n.RelevantMarkdownLine&&n.RelevantMarkdownLine>0)){var o=n.RelevantMarkdownLine;setTimeout(function(){var t=e.pict.views["ContentEditor-MarkdownEditor"];if(t&&t._segmentEditors){var n=0;for(var i in t._segmentEditors){var r=t._segmentEditors[i];if(r&&r.state&&r.state.doc){var a=r.state.doc.lines;if(n+a>=o){var s=o-n;s<1&&(s=1),s>a&&(s=a);var c=r.state.doc.line(s);r.dispatch({selection:{anchor:c.from},scrollIntoView:!0}),r.focus();break}n+=a}}}},500)}}}},{key:"renderTopicList",value:function(){var t=document.getElementById("ContentEditor-Topics-List");if(t){var e=Object.keys(this._topics);if(0!==e.length){for(var n="",i=0;i<e.length;i++){var o=e[i],r=this._topics[o];this._editingTopicCode===o?n+=this._buildEditFormHTML(r):n+=this._buildTopicRowHTML(r)}t.innerHTML=n}else t.innerHTML='<div style="padding:16px;text-align:center;color:#8A7F72;font-size:0.78rem;">No topics yet. Click "+ Add Topic" to create one.</div>'}}},{key:"_buildTopicRowHTML",value:function(t){var e=this._escapeHTML(t.TopicCode||""),n=this._escapeHTML(t.TopicTitle||""),i=this._escapeHTML(t.TopicHelpFilePath||""),o="number"==typeof t.RelevantMarkdownLine?" :"+t.RelevantMarkdownLine:"",r=this._escapeAttr(t.TopicCode||""),a="<div class=\"topics-row\" ondblclick=\"pict.views['ContentEditor-Topics'].startEditTopic('"+r+"')\">";return a+='<div class="topics-row-info">',a+='<div class="topics-row-code">'+e+"</div>",n&&(a+='<div class="topics-row-title">'+n+"</div>"),i&&(a+='<div class="topics-row-path">'+i+o+"</div>"),a+="</div>",a+='<div class="topics-row-actions">',a+='<button class="topics-row-btn" title="Edit" onclick="event.stopPropagation();pict.views[\'ContentEditor-Topics\'].startEditTopic(\''+r+"')\">✎</button>",a+='<button class="topics-row-btn topics-row-btn-delete" title="Delete" onclick="event.stopPropagation();pict.views[\'ContentEditor-Topics\'].removeTopic(\''+r+"')\">✖</button>",i&&(a+='<button class="topics-row-btn" title="Go to file" onclick="event.stopPropagation();pict.views[\'ContentEditor-Topics\'].navigateToTopic(\''+r+"')\">→</button>"),a+="</div>",a+="</div>"}},{key:"_buildEditFormHTML",value:function(t){var e='<div class="topics-edit">';return e+='<div class="topics-edit-field">',e+='<label class="topics-edit-label">Topic Code</label>',e+='<input class="topics-edit-input" id="topics-edit-code" type="text" value="'+this._escapeAttr(t.TopicCode||"")+'" placeholder="My-Topic-Code">',e+="</div>",e+='<div class="topics-edit-field">',e+='<label class="topics-edit-label">Title</label>',e+='<input class="topics-edit-input" id="topics-edit-title" type="text" value="'+this._escapeAttr(t.TopicTitle||"")+'" placeholder="Topic title">',e+="</div>",e+='<div class="topics-edit-field">',e+='<label class="topics-edit-label">Help File Path</label>',e+='<input class="topics-edit-input" id="topics-edit-path" type="text" value="'+this._escapeAttr(t.TopicHelpFilePath||"")+'" placeholder="path/to/file.md">',e+="</div>",e+='<div class="topics-edit-field">',e+='<label class="topics-edit-label">Line Number (optional)</label>',e+='<input class="topics-edit-input" id="topics-edit-line" type="number" value="'+("number"==typeof t.RelevantMarkdownLine?t.RelevantMarkdownLine:"")+'" placeholder="e.g. 23" min="1">',e+="</div>",e+='<div class="topics-edit-actions">',e+="<button class=\"topics-edit-save\" onclick=\"pict.views['ContentEditor-Topics'].saveEditTopic('"+this._escapeAttr(t.TopicCode||"")+"')\">Save</button>",e+='<button class="topics-edit-cancel" onclick="pict.views[\'ContentEditor-Topics\'].cancelEditTopic()">Cancel</button>',e+="</div>",e+="</div>"}},{key:"_showEmptyState",value:function(){var t=document.getElementById("ContentEditor-Topics-Container");if(t)t.innerHTML=this._buildEmptyStateHTML();else{var e=document.getElementById("ContentEditor-SidebarTopics-Container");e&&(e.innerHTML=this._buildEmptyStateHTML())}}},{key:"_buildEmptyStateHTML",value:function(){return'<div class="topics-empty"><div class="topics-empty-icon">📑</div><div>No topics file loaded</div><button class="topics-empty-btn" onclick="pict.views[\'ContentEditor-Topics\'].loadDefaultTopicsFile()">Load .pict_documentation_topics.json</button><button class="topics-empty-btn topics-empty-btn-secondary" onclick="pict.views[\'ContentEditor-Topics\'].promptSelectTopicsFile()">Select file...</button></div>'}},{key:"loadDefaultTopicsFile",value:function(){var t=this;this.loadTopicsFile(".pict_documentation_topics.json",function(e){e&&t._createDefaultTopicsFile()})}},{key:"promptSelectTopicsFile",value:function(){var t=prompt("Enter the path to a topics JSON file:",".pict_documentation_topics.json");if(t&&t.trim()){var e=this;this.loadTopicsFile(t.trim(),function(n){n&&confirm('File not found. Create "'+t.trim()+'"?')&&(e._topicsFilePath=t.trim(),e._topics={},e.pict.AppData.ContentEditor.TopicsFilePath=t.trim(),e.pict.PictApplication.saveSettings(),e.saveTopicsFile(function(){e._hasRendered&&e.render()}))})}}},{key:"_createDefaultTopicsFile",value:function(t){var e="function"==typeof t?t:function(){},n=this,i=".pict_documentation_topics.json";this._topicsFilePath=i,this._topics={},this.pict.AppData.ContentEditor.TopicsFilePath=i,this.pict.PictApplication.saveSettings(),this.saveTopicsFile(function(){n._hasRendered&&n.render(),e()})}},{key:"_updateHeaderTitle",value:function(){var t=document.getElementById("ContentEditor-Topics-HeaderTitle");if(t){var e=this._topicsFilePath.replace(/^.*\//,"");t.textContent=e||"Topics",t.title=this._topicsFilePath}}},{key:"_showFooter",value:function(t){var e=document.getElementById("ContentEditor-Topics-Footer");e&&(e.style.display=t?"":"none")}},{key:"_generateUniqueCode",value:function(t){if(!this._topics[t])return t;for(var e=2;this._topics[t+"-"+e];)e++;return t+"-"+e}},{key:"_escapeHTML",value:function(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}},{key:"_escapeAttr",value:function(t){return String(t).replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}}])}(t("pict-view"));e.exports=i,e.exports.default_configuration={ViewIdentifier:"ContentEditor-Topics",DefaultRenderable:"Topics-Wrap",DefaultDestinationAddress:"#ContentEditor-SidebarTopics-Container",AutoRender:!1,CSS:"\n\t\t.topics-container\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\theight: 100%;\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.topics-header\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 6px;\n\t\t\tpadding: 8px 10px;\n\t\t\tborder-bottom: 1px solid #EDE9E3;\n\t\t\tbackground: #FAF8F4;\n\t\t\tflex-shrink: 0;\n\t\t}\n\t\t.topics-header-title\n\t\t{\n\t\t\tflex: 1;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.78rem;\n\t\t\tcolor: #5E5549;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t\t.topics-header-btn\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\t\t\tcursor: pointer;\n\t\t\tfont-size: 0.82rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tpadding: 2px 6px;\n\t\t\tborder-radius: 3px;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.topics-header-btn:hover\n\t\t{\n\t\t\tcolor: #3D3229;\n\t\t\tbackground: #EDE9E3;\n\t\t}\n\t\t.topics-list\n\t\t{\n\t\t\tflex: 1;\n\t\t\toverflow-y: auto;\n\t\t\toverflow-x: hidden;\n\t\t}\n\t\t.topics-row\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\talign-items: flex-start;\n\t\t\tgap: 6px;\n\t\t\tpadding: 8px 10px;\n\t\t\tborder-bottom: 1px solid #F0EDE8;\n\t\t\tcursor: pointer;\n\t\t\ttransition: background 0.1s;\n\t\t}\n\t\t.topics-row:hover\n\t\t{\n\t\t\tbackground: #F5F0EA;\n\t\t}\n\t\t.topics-row-info\n\t\t{\n\t\t\tflex: 1;\n\t\t\tmin-width: 0;\n\t\t}\n\t\t.topics-row-code\n\t\t{\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.78rem;\n\t\t\tcolor: #2E7D74;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t\t.topics-row-title\n\t\t{\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #5E5549;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tmargin-top: 1px;\n\t\t}\n\t\t.topics-row-path\n\t\t{\n\t\t\tfont-size: 0.68rem;\n\t\t\tcolor: #8A7F72;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\tmargin-top: 1px;\n\t\t}\n\t\t.topics-row-actions\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\tdisplay: flex;\n\t\t\tgap: 2px;\n\t\t\tpadding-top: 1px;\n\t\t}\n\t\t.topics-row-btn\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tborder: none;\n\t\t\tcursor: pointer;\n\t\t\tfont-size: 0.72rem;\n\t\t\tcolor: #8A7F72;\n\t\t\tpadding: 2px 4px;\n\t\t\tborder-radius: 3px;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.topics-row-btn:hover\n\t\t{\n\t\t\tcolor: #3D3229;\n\t\t\tbackground: #EDE9E3;\n\t\t}\n\t\t.topics-row-btn-delete:hover\n\t\t{\n\t\t\tcolor: #D9534F;\n\t\t\tbackground: #FDF0EF;\n\t\t}\n\t\t/* Inline edit form */\n\t\t.topics-edit\n\t\t{\n\t\t\tpadding: 8px 10px;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\n\t\t\tbackground: #FFF9F0;\n\t\t}\n\t\t.topics-edit-field\n\t\t{\n\t\t\tmargin-bottom: 6px;\n\t\t}\n\t\t.topics-edit-label\n\t\t{\n\t\t\tdisplay: block;\n\t\t\tfont-size: 0.68rem;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-bottom: 2px;\n\t\t}\n\t\t.topics-edit-input\n\t\t{\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t\tpadding: 4px 6px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 3px;\n\t\t\tbackground: #FFF;\n\t\t\tcolor: #3D3229;\n\t\t\tfont-family: inherit;\n\t\t}\n\t\t.topics-edit-input:focus\n\t\t{\n\t\t\toutline: none;\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.topics-edit-actions\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tgap: 6px;\n\t\t\tmargin-top: 8px;\n\t\t}\n\t\t.topics-edit-save\n\t\t{\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t\tborder: none;\n\t\t\tborder-radius: 3px;\n\t\t\tpadding: 4px 12px;\n\t\t\tfont-size: 0.72rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.topics-edit-save:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t.topics-edit-cancel\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tcolor: #5E5549;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 3px;\n\t\t\tpadding: 4px 12px;\n\t\t\tfont-size: 0.72rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.topics-edit-cancel:hover\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t}\n\t\t/* Footer add button */\n\t\t.topics-footer\n\t\t{\n\t\t\tflex-shrink: 0;\n\t\t\tpadding: 8px 10px;\n\t\t\tborder-top: 1px solid #EDE9E3;\n\t\t\tbackground: #FAF8F4;\n\t\t}\n\t\t.topics-add-btn\n\t\t{\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tpadding: 6px 0;\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t\ttext-align: center;\n\t\t}\n\t\t.topics-add-btn:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t/* Empty state */\n\t\t.topics-empty\n\t\t{\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tgap: 12px;\n\t\t\tpadding: 32px 16px;\n\t\t\ttext-align: center;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 0.82rem;\n\t\t}\n\t\t.topics-empty-icon\n\t\t{\n\t\t\tfont-size: 2rem;\n\t\t\tcolor: #C4BDB3;\n\t\t}\n\t\t.topics-empty-btn\n\t\t{\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 6px 14px;\n\t\t\tbackground: #2E7D74;\n\t\t\tcolor: #FFF;\n\t\t\tborder: none;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.78rem;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.topics-empty-btn:hover\n\t\t{\n\t\t\tbackground: #3A9E92;\n\t\t}\n\t\t.topics-empty-btn-secondary\n\t\t{\n\t\t\tbackground: transparent;\n\t\t\tcolor: #5E5549;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t}\n\t\t.topics-empty-btn-secondary:hover\n\t\t{\n\t\t\tbackground: #F0EDE8;\n\t\t\tborder-color: #8A7F72;\n\t\t}\n\t",Templates:[{Hash:"Topics-Container-Template",Template:'\n<div class="topics-container" id="ContentEditor-Topics-Container">\n\t<div class="topics-header">\n\t\t<span class="topics-header-title" id="ContentEditor-Topics-HeaderTitle">Topics</span>\n\t\t<button class="topics-header-btn" title="Close topics file"\n\t\t\tonclick="pict.views[\'ContentEditor-Topics\'].closeTopicsFile()">×</button>\n\t</div>\n\t<div class="topics-list" id="ContentEditor-Topics-List"></div>\n\t<div class="topics-footer" id="ContentEditor-Topics-Footer">\n\t\t<button class="topics-add-btn"\n\t\t\tonclick="pict.views[\'ContentEditor-Topics\'].addTopic()">+ Add Topic</button>\n\t</div>\n</div>\n'}],Renderables:[{RenderableHash:"Topics-Wrap",TemplateHash:"Topics-Container-Template",DestinationAddress:"#ContentEditor-SidebarTopics-Container"}]}},{"pict-view":88}]},{},[105])(105)});
|
|
89
89
|
//# sourceMappingURL=retold-content-system.compatible.min.js.map
|