a.top+a.height&&(c=a.top+a.height),l-=a.left,c-=a.top;}else n&&(l=n.x*a.width,c=n.y*a.height);"h"!==i&&(s.style.left=`calc(${l/a.width*100}% - ${s.offsetWidth/2}px)`),"v"!==i&&(s.style.top=`calc(${c/a.height*100}% - ${s.offsetHeight/2}px)`),e.cache={x:l/a.width,y:c/a.height};const p=k(l/a.width),h=k(c/a.height);switch(i){case"v":return o.onchange(p);case"h":return o.onchange(h);default:return o.onchange(p,h)}},_tapstop(){e.options.onstop(),s(document,["mouseup","touchend","touchcancel"],e._tapstop),s(document,["mousemove","touchmove"],e._tapmove);},trigger(){e._tapmove();},update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const{left:n,top:i,width:s,height:r}=e.options.wrapper.getBoundingClientRect();"h"===e.options.lock&&(o=t),e._tapmove({clientX:n+s*t,clientY:i+r*o});},destroy(){const{options:t,_tapstart:o,_keyboard:n}=e;s(document,["keydown","keyup"],n),s([t.wrapper,t.element],"mousedown",o),s([t.wrapper,t.element],"touchstart",o,{passive:!1});}},{options:o,_tapstart:n,_keyboard:r}=e;return i([o.wrapper,o.element],"mousedown",n),i([o.wrapper,o.element],"touchstart",n,{passive:!1}),i(document,["keydown","keyup"],r),e}function O(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=Object.assign({onchange:()=>0,className:"",elements:[]},t);const e=i(t.elements,"click",(e=>{t.elements.forEach((o=>o.classList[e.target===o?"add":"remove"](t.className))),t.onchange(e),e.stopPropagation();}));return {destroy:()=>s(...e)}}const E={variantFlipOrder:{start:"sme",middle:"mse",end:"ems"},positionFlipOrder:{top:"tbrl",right:"rltb",bottom:"btrl",left:"lrbt"},position:"bottom",margin:8},L=(t,e,o)=>{const{container:n,margin:i,position:s,variantFlipOrder:r,positionFlipOrder:a}={container:document.documentElement.getBoundingClientRect(),...E,...o},{left:l,top:c}=e.style;e.style.left="0",e.style.top="0";const p=t.getBoundingClientRect(),h=e.getBoundingClientRect(),u={t:p.top-h.height-i,b:p.bottom+i,r:p.right+i,l:p.left-h.width-i},d={vs:p.left,vm:p.left+p.width/2+-h.width/2,ve:p.left+p.width-h.width,hs:p.top,hm:p.bottom-p.height/2-h.height/2,he:p.bottom-h.height},[v,m="middle"]=s.split("-"),f=a[v],g=r[m],{top:b,left:y,bottom:_,right:w}=n;for(const t of f){const o="t"===t||"b"===t,n=u[t],[i,s]=o?["top","left"]:["left","top"],[r,a]=o?[h.height,h.width]:[h.width,h.height],[l,c]=o?[_,w]:[w,_],[p,v]=o?[b,y]:[y,b];if(!(nl))for(const r of g){const l=d[(o?"v":"h")+r];if(!(lc))return e.style[s]=l-h[s]+"px",e.style[i]=n-h[i]+"px",t+r}}return e.style.left=l,e.style.top=c,null};function P(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}class x{constructor(t){P(this,"_initializingActive",!0),P(this,"_recalc",!0),P(this,"_nanopop",null),P(this,"_root",null),P(this,"_color",$()),P(this,"_lastColor",$()),P(this,"_swatchColors",[]),P(this,"_setupAnimationFrame",null),P(this,"_eventListener",{init:[],save:[],hide:[],show:[],clear:[],change:[],changestop:[],cancel:[],swatchselect:[]}),this.options=t=Object.assign({...x.DEFAULT_OPTIONS},t);const{swatches:e,components:o,theme:n,sliders:i,lockOpacity:s,padding:r}=t;["nano","monolith"].includes(n)&&!i&&(t.sliders="h"),o.interaction||(o.interaction={});const{preview:a,opacity:l,hue:c,palette:p}=o;o.opacity=!s&&l,o.palette=p||a||l||c,this._preBuild(),this._buildComponents(),this._bindEvents(),this._finalBuild(),e&&e.length&&e.forEach((t=>this.addSwatch(t)));const{button:h,app:u}=this._root;this._nanopop=((t,e,o)=>{const n="object"!=typeof t||t instanceof HTMLElement?{reference:t,popper:e,...o}:t;return {update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n;const{reference:e,popper:o}=Object.assign(n,t);if(!o||!e)throw new Error("Popper- or reference-element missing.");return L(e,o,n)}}})(h,u,{margin:r}),h.setAttribute("role","button"),h.setAttribute("aria-label",this._t("btn:toggle"));const d=this;this._setupAnimationFrame=requestAnimationFrame((function e(){if(!u.offsetWidth)return d._setupAnimationFrame=requestAnimationFrame(e);d.setColor(t.default),d._rePositioningPicker(),t.defaultRepresentation&&(d._representation=t.defaultRepresentation,d.setColorRepresentation(d._representation)),t.showAlways&&d.show(),d._initializingActive=!1,d._emit("init");}));}_preBuild(){const{options:t}=this;for(const e of ["el","container"])t[e]=c(t[e]);this._root=(t=>{const{components:e,useAsButton:o,inline:n,appClass:i,theme:s,lockOpacity:r}=t.options,l=t=>t?"":'style="display:none" hidden',c=e=>t._t(e),p=a(`\n \n `),h=p.interaction;return h.options.find((t=>!t.hidden&&!t.classList.add("active"))),h.type=()=>h.options.find((t=>t.classList.contains("active"))),p})(this),t.useAsButton&&(this._root.button=t.el),t.container.appendChild(this._root.root);}_finalBuild(){const t=this.options,e=this._root;if(t.container.removeChild(e.root),t.inline){const o=t.el.parentElement;t.el.nextSibling?o.insertBefore(e.app,t.el.nextSibling):o.appendChild(e.app);}else t.container.appendChild(e.app);t.useAsButton?t.inline&&t.el.remove():t.el.parentNode.replaceChild(e.root,t.el),t.disabled&&this.disable(),t.comparison||(e.button.style.transition="none",t.useAsButton||(e.preview.lastColor.style.transition="none")),this.hide();}_buildComponents(){const t=this,e=this.options.components,o=(t.options.sliders||"v").repeat(2),[n,i]=o.match(/^[vh]+$/g)?o:[],s=()=>this._color||(this._color=this._lastColor.clone()),r={palette:S({element:t._root.palette.picker,wrapper:t._root.palette.palette,onstop:()=>t._emit("changestop","slider",t),onchange(o,n){if(!e.palette)return;const i=s(),{_root:r,options:a}=t,{lastColor:l,currentColor:c}=r.preview;t._recalc&&(i.s=100*o,i.v=100-100*n,i.v<0&&(i.v=0),t._updateOutput("slider"));const p=i.toRGBA().toString(0);this.element.style.background=p,this.wrapper.style.background=`\n linear-gradient(to top, rgba(0, 0, 0, ${i.a}), transparent),\n linear-gradient(to left, hsla(${i.h}, 100%, 50%, ${i.a}), rgba(255, 255, 255, ${i.a}))\n `,a.comparison?a.useAsButton||t._lastColor||l.style.setProperty("--pcr-color",p):(r.button.style.setProperty("--pcr-color",p),r.button.classList.remove("clear"));const h=i.toHEXA().toString();for(const{el:e,color:o}of t._swatchColors)e.classList[h===o.toHEXA().toString()?"add":"remove"]("pcr-active");c.style.setProperty("--pcr-color",p);}}),hue:S({lock:"v"===i?"h":"v",element:t._root.hue.picker,wrapper:t._root.hue.slider,onstop:()=>t._emit("changestop","slider",t),onchange(o){if(!e.hue||!e.palette)return;const n=s();t._recalc&&(n.h=360*o),this.element.style.backgroundColor=`hsl(${n.h}, 100%, 50%)`,r.palette.trigger();}}),opacity:S({lock:"v"===n?"h":"v",element:t._root.opacity.picker,wrapper:t._root.opacity.slider,onstop:()=>t._emit("changestop","slider",t),onchange(o){if(!e.opacity||!e.palette)return;const n=s();t._recalc&&(n.a=Math.round(100*o)/100),this.element.style.background=`rgba(0, 0, 0, ${n.a})`,r.palette.trigger();}}),selectable:O({elements:t._root.interaction.options,className:"active",onchange(e){t._representation=e.target.getAttribute("data-type").toUpperCase(),t._recalc&&t._updateOutput("swatch");}})};this._components=r;}_bindEvents(){const{_root:t,options:e}=this,o=[i(t.interaction.clear,"click",(()=>this._clearColor())),i([t.interaction.cancel,t.preview.lastColor],"click",(()=>{this.setHSVA(...(this._lastColor||this._color).toHSVA(),!0),this._emit("cancel");})),i(t.interaction.save,"click",(()=>{!this.applyColor()&&!e.showAlways&&this.hide();})),i(t.interaction.result,["keyup","input"],(t=>{this.setColor(t.target.value,!0)&&!this._initializingActive&&(this._emit("change",this._color,"input",this),this._emit("changestop","input",this)),t.stopImmediatePropagation();})),i(t.interaction.result,["focus","blur"],(t=>{this._recalc="blur"===t.type,this._recalc&&this._updateOutput(null);})),i([t.palette.palette,t.palette.picker,t.hue.slider,t.hue.picker,t.opacity.slider,t.opacity.picker],["mousedown","touchstart"],(()=>this._recalc=!0),{passive:!0})];if(!e.showAlways){const n=e.closeWithKey;o.push(i(t.button,"click",(()=>this.isOpen()?this.hide():this.show())),i(document,"keyup",(t=>this.isOpen()&&(t.key===n||t.code===n)&&this.hide())),i(document,["touchstart","mousedown"],(e=>{this.isOpen()&&!l(e).some((e=>e===t.app||e===t.button))&&this.hide();}),{capture:!0}));}if(e.adjustableNumbers){const e={rgba:[255,255,255,1],hsva:[360,100,100,1],hsla:[360,100,100,1],cmyk:[100,100,100,100]};p(t.interaction.result,((t,o,n)=>{const i=e[this.getColorRepresentation().toLowerCase()];if(i){const e=i[n],s=t+(e>=100?1e3*o:o);return s<=0?0:Number((s{n.isOpen()&&(e.closeOnScroll&&n.hide(),null===t?(t=setTimeout((()=>t=null),100),requestAnimationFrame((function e(){n._rePositioningPicker(),null!==t&&requestAnimationFrame(e);}))):(clearTimeout(t),t=setTimeout((()=>t=null),100)));}),{capture:!0}));}this._eventBindings=o;}_rePositioningPicker(){const{options:t}=this;if(!t.inline){if(!this._nanopop.update({container:document.body.getBoundingClientRect(),position:t.position})){const t=this._root.app,e=t.getBoundingClientRect();t.style.top=(window.innerHeight-e.height)/2+"px",t.style.left=(window.innerWidth-e.width)/2+"px";}}}_updateOutput(t){const{_root:e,_color:o,options:n}=this;if(e.interaction.type()){const t=`to${e.interaction.type().getAttribute("data-type")}`;e.interaction.result.value="function"==typeof o[t]?o[t]().toString(n.outputPrecision):"";}!this._initializingActive&&this._recalc&&this._emit("change",o,t,this);}_clearColor(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{_root:e,options:o}=this;o.useAsButton||e.button.style.setProperty("--pcr-color","rgba(0, 0, 0, 0.15)"),e.button.classList.add("clear"),o.showAlways||this.hide(),this._lastColor=null,this._initializingActive||t||(this._emit("save",null),this._emit("clear"));}_parseLocalColor(t){const{values:e,type:o,a:n}=C(t),{lockOpacity:i}=this.options,s=void 0!==n&&1!==n;return e&&3===e.length&&(e[3]=void 0),{values:!e||i&&s?null:e,type:o}}_t(t){return this.options.i18n[t]||x.I18N_DEFAULTS[t]}_emit(t){for(var e=arguments.length,o=new Array(e>1?e-1:0),n=1;nt(...o,this)));}on(t,e){return this._eventListener[t].push(e),this}off(t,e){const o=this._eventListener[t]||[],n=o.indexOf(e);return ~n&&o.splice(n,1),this}addSwatch(t){const{values:e}=this._parseLocalColor(t);if(e){const{_swatchColors:t,_root:o}=this,n=$(...e),s=r(``);return o.swatches.appendChild(s),t.push({el:s,color:n}),this._eventBindings.push(i(s,"click",(()=>{this.setHSVA(...n.toHSVA(),!0),this._emit("swatchselect",n),this._emit("change",n,"swatch",this);}))),!0}return !1}removeSwatch(t){const e=this._swatchColors[t];if(e){const{el:o}=e;return this._root.swatches.removeChild(o),this._swatchColors.splice(t,1),!0}return !1}applyColor(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{preview:e,button:o}=this._root,n=this._color.toRGBA().toString(0);return e.lastColor.style.setProperty("--pcr-color",n),this.options.useAsButton||o.style.setProperty("--pcr-color",n),o.classList.remove("clear"),this._lastColor=this._color.clone(),this._initializingActive||t||this._emit("save",this._color),this}destroy(){cancelAnimationFrame(this._setupAnimationFrame),this._eventBindings.forEach((t=>s(...t))),Object.keys(this._components).forEach((t=>this._components[t].destroy()));}destroyAndRemove(){this.destroy();const{root:t,app:e}=this._root;t.parentElement&&t.parentElement.removeChild(t),e.parentElement.removeChild(e),Object.keys(this).forEach((t=>this[t]=null));}hide(){return !!this.isOpen()&&(this._root.app.classList.remove("visible"),this._emit("hide"),!0)}show(){return !this.options.disabled&&!this.isOpen()&&(this._root.app.classList.add("visible"),this._rePositioningPicker(),this._emit("show",this._color),this)}isOpen(){return this._root.app.classList.contains("visible")}setHSVA(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:360,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const s=this._recalc;if(this._recalc=!1,t<0||t>360||e<0||e>100||o<0||o>100||n<0||n>1)return !1;this._color=$(t,e,o,n);const{hue:r,opacity:a,palette:l}=this._components;return r.update(t/360),a.update(n),l.update(e/100,1-o/100),i||this.applyColor(),s&&this._updateOutput(),this._recalc=s,!0}setColor(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null===t)return this._clearColor(e),!0;const{values:o,type:n}=this._parseLocalColor(t);if(o){const t=n.toUpperCase(),{options:i}=this._root.interaction,s=i.find((e=>e.getAttribute("data-type")===t));if(s&&!s.hidden)for(const t of i)t.classList[t===s?"add":"remove"]("active");return !!this.setHSVA(...o,e)&&this.setColorRepresentation(t)}return !1}setColorRepresentation(t){return t=t.toUpperCase(),!!this._root.interaction.options.find((e=>e.getAttribute("data-type").startsWith(t)&&!e.click()))}getColorRepresentation(){return this._representation}getColor(){return this._color}getSelectedColor(){return this._lastColor}getRoot(){return this._root}disable(){return this.hide(),this.options.disabled=!0,this._root.button.classList.add("disabled"),this}enable(){return this.options.disabled=!1,this._root.button.classList.remove("disabled"),this}}return P(x,"utils",o),P(x,"version","1.8.4"),P(x,"I18N_DEFAULTS",{"ui:dialog":"color picker dialog","btn:toggle":"toggle color picker dialog","btn:swatch":"color swatch","btn:last-color":"use previous color","btn:save":"Save","btn:cancel":"Cancel","btn:clear":"Clear","aria:btn:save":"save and close","aria:btn:cancel":"cancel and close","aria:btn:clear":"clear and close","aria:input":"color input field","aria:palette":"color selection area","aria:hue":"hue selection slider","aria:opacity":"selection slider"}),P(x,"DEFAULT_OPTIONS",{appClass:null,theme:"classic",useAsButton:!1,padding:8,disabled:!1,comparison:!0,closeOnScroll:!1,outputPrecision:0,lockOpacity:!1,autoReposition:!0,container:"body",components:{interaction:{}},i18n:{},swatches:null,inline:!1,sliders:null,default:"#42445a",defaultRepresentation:null,position:"bottom-middle",adjustableNumbers:!0,showAlways:!1,closeWithKey:"Escape"}),P(x,"create",(t=>new x(t))),e=e.default})()}));
+
+});
+
+var Pickr = /*@__PURE__*/getDefaultExportFromCjs(pickr_min);
+
+const ar = {};
+
+const cz = {};
+
+const da = {};
+
+const de = {
+ "Default:": "Standard:",
+ "Error:": "Fehler:",
+ "missing default light value, or value is not in a valid color format": "Fehlender heller standard Wert oder Wert ist in keinem validen Farb-Format",
+ "missing default dark value, or value is not in a valid color format": "Fehlender dunkler standard Wert oder Wert ist in keinem validen Farb-Format",
+ "missing default value, or value is not in a valid color format": "Fehlender standard Wert oder Wert ist in keinem validen Farb-Format",
+ "missing default value": "Fehlender standard Wert",
+};
+
+const en = {
+ "Default:": "Default:",
+ "Error:": "Error:",
+ "missing default light value, or value is not in a valid color format": "missing default light value, or value is not in a valid color format",
+ "missing default dark value, or value is not in a valid color format": "missing default dark value, or value is not in a valid color format",
+ "missing default value, or value is not in a valid color format": "missing default value, or value is not in a valid color format",
+ "missing default value": "missing default value",
+};
+
+const es = {};
+
+const fr = {};
+
+const hi = {};
+
+const id = {};
+
+const it = {};
+
+const ja = {};
+
+const ko = {};
+
+const nl = {
+ "Default:": "Standaard:",
+ "Error:": "Error:",
+ "missing default light value, or value is not in a valid color format": "Geen standaard waarde voor het lichte thema, of de waarde is niet in het goede formaat",
+ "missing default dark value, or value is not in a valid color format": "Geen standaard waarde voor het donkere thema, of de waarde is niet in het goede formaat",
+ "missing default value, or value is not in a valid color format": "Geen standaard waarde, of de waarde is niet in het goede formaat",
+ "missing default value": "Geen standaard waarde",
+};
+
+const no = {};
+
+const pl = {};
+
+const pt = {};
+
+const ptBr = {};
+
+const ro = {};
+
+const ru = {};
+
+const sq = {};
+
+const tr = {};
+
+const uk = {};
+
+const zh = {};
+
+const zhTw = {};
+
+const lang = window.localStorage.getItem("language");
+const localeMap = {
+ ar,
+ cz,
+ da,
+ de,
+ en,
+ es,
+ fr,
+ hi,
+ id,
+ it,
+ ja,
+ ko,
+ nl,
+ no,
+ pl,
+ "pt-BR": ptBr,
+ pt,
+ ro,
+ ru,
+ sq,
+ tr,
+ uk,
+ "zh-TW": zhTw,
+ zh,
+};
+const locale = localeMap[lang || "en"];
+function t(str) {
+ if (!locale) {
+ console.error("Error: Style Settings locale not found", lang);
+ }
+ return (locale && locale[str]) || en[str];
+}
+
+const resetTooltip = "Restore default";
+function sanitizeText(str) {
+ if (str === "") {
+ return `""`;
+ }
+ return str.replace(/[;<>]/g, "");
+}
+function createDescription(description, def, defLabel) {
+ const fragment = createFragment();
+ if (description) {
+ fragment.appendChild(document.createTextNode(description));
+ }
+ if (def) {
+ const small = createEl("small");
+ small.appendChild(createEl("strong", { text: `${t("Default:")} ` }));
+ small.appendChild(document.createTextNode(defLabel || def));
+ const div = createEl("div");
+ div.appendChild(small);
+ fragment.appendChild(div);
+ }
+ return fragment;
+}
+function getTitle(config) {
+ if (lang) {
+ return config[`title.${lang}`] || config.title;
+ }
+ return config.title;
+}
+function getDescription(config) {
+ if (lang) {
+ return (config[`description.${lang}`] ||
+ config.description);
+ }
+ return config.description;
+}
+function createHeading(opts) {
+ new obsidian.Setting(opts.containerEl)
+ .setHeading()
+ .setClass("style-settings-heading")
+ .setName(getTitle(opts.config))
+ .setDesc(getDescription(opts.config) ? getDescription(opts.config) : "")
+ .then((setting) => {
+ if (opts.config.collapsed)
+ setting.settingEl.addClass("is-collapsed");
+ setting.settingEl.dataset.level = opts.config.level.toString();
+ setting.settingEl.dataset.id = opts.config.id;
+ const iconContainer = createSpan({
+ cls: "style-settings-collapse-indicator",
+ });
+ obsidian.setIcon(iconContainer, "right-triangle");
+ setting.nameEl.prepend(iconContainer);
+ setting.settingEl.addEventListener("click", (e) => {
+ setting.settingEl.toggleClass("is-collapsed", !setting.settingEl.hasClass("is-collapsed"));
+ });
+ if (opts.config.resetFn) {
+ setting.addExtraButton((b) => {
+ b.setIcon("reset")
+ .setTooltip("Reset all settings to default")
+ .onClick(opts.config.resetFn);
+ });
+ }
+ setting.addExtraButton((b) => {
+ b.setIcon("install")
+ .setTooltip("Export settings")
+ .then((b) => {
+ b.extraSettingsEl.onClickEvent((e) => {
+ e.stopPropagation();
+ const title = opts.sectionName === getTitle(opts.config)
+ ? getTitle(opts.config)
+ : `${opts.sectionName} > ${getTitle(opts.config)}`;
+ opts.settingsManager.export(title, opts.settingsManager.getSettings(opts.sectionId, opts.children));
+ });
+ });
+ });
+ });
+}
+function createClassToggle(opts) {
+ const { sectionId, config, containerEl, settingsManager } = opts;
+ let toggleComponent;
+ new obsidian.Setting(containerEl)
+ .setName(getTitle(config))
+ .setDesc(getDescription(config) || "")
+ .addToggle((toggle) => {
+ const value = settingsManager.getSetting(sectionId, config.id);
+ toggle
+ .setValue(value !== undefined ? !!value : !!config.default)
+ .onChange((value) => {
+ settingsManager.setSetting(sectionId, config.id, value);
+ if (value) {
+ document.body.classList.add(config.id);
+ }
+ else {
+ document.body.classList.remove(config.id);
+ }
+ });
+ toggleComponent = toggle;
+ })
+ .addExtraButton((b) => {
+ b.setIcon("reset");
+ b.onClick(() => {
+ const value = !!config.default;
+ toggleComponent.setValue(value);
+ if (value) {
+ document.body.classList.add(config.id);
+ }
+ else {
+ document.body.classList.remove(config.id);
+ }
+ settingsManager.clearSetting(sectionId, config.id);
+ });
+ b.setTooltip(resetTooltip);
+ })
+ .then((setting) => {
+ setting.settingEl.dataset.id = opts.config.id;
+ });
+}
+function createClassMultiToggle(opts) {
+ const { sectionId, config, containerEl, settingsManager } = opts;
+ let dropdownComponent;
+ if (typeof config.default !== "string") {
+ return console.error(`${t("Error:")} ${getTitle(config)} ${t("missing default value")}`);
+ }
+ let prevValue = settingsManager.getSetting(sectionId, config.id);
+ if (prevValue === undefined && !!config.default) {
+ prevValue = config.default;
+ }
+ else if (prevValue === undefined) {
+ prevValue = "none";
+ }
+ const defaultOption = config.default
+ ? config.options.find((o) => {
+ if (typeof o === "string") {
+ return o === config.default;
+ }
+ return o.value === config.default;
+ })
+ : undefined;
+ let defaultLabel = undefined;
+ if (defaultOption && typeof defaultOption === "string") {
+ defaultLabel = defaultOption;
+ }
+ else if (defaultOption && typeof defaultOption === "object") {
+ defaultLabel = defaultOption.label;
+ }
+ new obsidian.Setting(containerEl)
+ .setName(getTitle(config))
+ .setDesc(createDescription(getDescription(config), config.default, defaultLabel))
+ .addDropdown((dropdown) => {
+ if (config.allowEmpty) {
+ dropdown.addOption("none", "");
+ }
+ config.options.forEach((o) => {
+ if (typeof o === "string") {
+ dropdown.addOption(o, o);
+ }
+ else {
+ dropdown.addOption(o.value, o.label);
+ }
+ });
+ dropdown.setValue(prevValue).onChange((value) => {
+ settingsManager.setSetting(sectionId, config.id, value);
+ if (value !== "none") {
+ document.body.classList.add(value);
+ }
+ if (prevValue) {
+ document.body.classList.remove(prevValue);
+ }
+ prevValue = value;
+ });
+ dropdownComponent = dropdown;
+ })
+ .addExtraButton((b) => {
+ b.setIcon("reset");
+ b.onClick(() => {
+ const value = config.default || "none";
+ dropdownComponent.setValue(config.default || "none");
+ if (value !== "none") {
+ document.body.classList.add(value);
+ }
+ if (prevValue) {
+ document.body.classList.remove(prevValue);
+ }
+ settingsManager.clearSetting(sectionId, config.id);
+ });
+ b.setTooltip(resetTooltip);
+ })
+ .then((setting) => {
+ setting.settingEl.dataset.id = opts.config.id;
+ });
+}
+function createVariableText(opts) {
+ const { sectionId, config, containerEl, settingsManager } = opts;
+ let textComponent;
+ if (typeof config.default !== "string") {
+ return console.error(`${t("Error:")} ${getTitle(config)} ${t("missing default value")}`);
+ }
+ new obsidian.Setting(containerEl)
+ .setName(getTitle(config))
+ .setDesc(createDescription(getDescription(config), config.default))
+ .addText((text) => {
+ let value = settingsManager.getSetting(sectionId, config.id);
+ const onChange = obsidian.debounce((value) => {
+ settingsManager.setSetting(sectionId, config.id, sanitizeText(value));
+ }, 250, true);
+ if (config.quotes && value === `""`) {
+ value = ``;
+ }
+ text
+ .setValue(value ? value.toString() : config.default)
+ .onChange(onChange);
+ textComponent = text;
+ })
+ .addExtraButton((b) => {
+ b.setIcon("reset");
+ b.onClick(() => {
+ textComponent.setValue(config.default);
+ settingsManager.clearSetting(sectionId, config.id);
+ });
+ b.setTooltip(resetTooltip);
+ })
+ .then((setting) => {
+ setting.settingEl.dataset.id = opts.config.id;
+ });
+}
+function createVariableNumber(opts) {
+ const { sectionId, config, containerEl, settingsManager } = opts;
+ let textComponent;
+ if (typeof config.default !== "number") {
+ return console.error(`${t("Error:")} ${getTitle(config)} ${t("missing default value")}`);
+ }
+ new obsidian.Setting(containerEl)
+ .setName(getTitle(config))
+ .setDesc(createDescription(getDescription(config), config.default.toString(10)))
+ .addText((text) => {
+ const value = settingsManager.getSetting(sectionId, config.id);
+ const onChange = obsidian.debounce((value) => {
+ const isFloat = /\./.test(value);
+ settingsManager.setSetting(sectionId, config.id, isFloat ? parseFloat(value) : parseInt(value, 10));
+ }, 250, true);
+ text
+ .setValue(value !== undefined ? value.toString() : config.default.toString())
+ .onChange(onChange);
+ textComponent = text;
+ })
+ .addExtraButton((b) => {
+ b.setIcon("reset");
+ b.onClick(() => {
+ textComponent.setValue(config.default.toString());
+ settingsManager.clearSetting(sectionId, config.id);
+ });
+ b.setTooltip(resetTooltip);
+ })
+ .then((setting) => {
+ setting.settingEl.dataset.id = opts.config.id;
+ });
+}
+function createVariableNumberSlider(opts) {
+ const { sectionId, config, containerEl, settingsManager } = opts;
+ let sliderComponent;
+ if (typeof config.default !== "number") {
+ return console.error(`${t("Error:")} ${getTitle(config)} ${t("missing default value")}`);
+ }
+ new obsidian.Setting(containerEl)
+ .setName(getTitle(config))
+ .setDesc(createDescription(getDescription(config), config.default.toString(10)))
+ .addSlider((slider) => {
+ const value = settingsManager.getSetting(sectionId, config.id);
+ const onChange = obsidian.debounce((value) => {
+ settingsManager.setSetting(sectionId, config.id, value);
+ }, 250, true);
+ slider
+ .setDynamicTooltip()
+ .setLimits(config.min, config.max, config.step)
+ .setValue(value !== undefined ? value : config.default)
+ .onChange(onChange);
+ sliderComponent = slider;
+ })
+ .addExtraButton((b) => {
+ b.setIcon("reset");
+ b.onClick(() => {
+ sliderComponent.setValue(config.default);
+ settingsManager.clearSetting(sectionId, config.id);
+ });
+ b.setTooltip(resetTooltip);
+ })
+ .then((setting) => {
+ setting.settingEl.dataset.id = opts.config.id;
+ });
+}
+function createVariableSelect(opts) {
+ const { sectionId, config, containerEl, settingsManager } = opts;
+ let dropdownComponent;
+ if (typeof config.default !== "string") {
+ return console.error(`${t("Error:")} ${getTitle(config)} ${t("missing default value")}`);
+ }
+ const defaultOption = config.default
+ ? config.options.find((o) => {
+ if (typeof o === "string") {
+ return o === config.default;
+ }
+ return o.value === config.default;
+ })
+ : undefined;
+ let defaultLabel = undefined;
+ if (defaultOption && typeof defaultOption === "string") {
+ defaultLabel = defaultOption;
+ }
+ else if (defaultOption && typeof defaultOption === "object") {
+ defaultLabel = defaultOption.label;
+ }
+ new obsidian.Setting(containerEl)
+ .setName(getTitle(config))
+ .setDesc(createDescription(getDescription(config), config.default, defaultLabel))
+ .addDropdown((dropdown) => {
+ const value = settingsManager.getSetting(sectionId, config.id);
+ config.options.forEach((o) => {
+ if (typeof o === "string") {
+ dropdown.addOption(o, o);
+ }
+ else {
+ dropdown.addOption(o.value, o.label);
+ }
+ });
+ dropdown
+ .setValue(value !== undefined ? value : config.default)
+ .onChange((value) => {
+ settingsManager.setSetting(sectionId, config.id, value);
+ });
+ dropdownComponent = dropdown;
+ })
+ .addExtraButton((b) => {
+ b.setIcon("reset");
+ b.onClick(() => {
+ dropdownComponent.setValue(config.default);
+ settingsManager.clearSetting(sectionId, config.id);
+ });
+ b.setTooltip(resetTooltip);
+ })
+ .then((setting) => {
+ setting.settingEl.dataset.id = opts.config.id;
+ });
+}
+function getPickrSettings(opts) {
+ const { el, isView, containerEl, swatches, opacity, defaultColor } = opts;
+ return {
+ el,
+ container: isView ? document.body : containerEl,
+ theme: "nano",
+ swatches,
+ lockOpacity: !opacity,
+ default: defaultColor,
+ position: "left-middle",
+ components: {
+ preview: true,
+ hue: true,
+ opacity: !!opacity,
+ interaction: {
+ hex: true,
+ rgba: true,
+ hsla: true,
+ input: true,
+ cancel: true,
+ save: true,
+ },
+ },
+ };
+}
+function onPickrCancel(instance) {
+ instance.hide();
+}
+function isValidDefaultColor(color) {
+ return /^(#|rgb|hsl)/.test(color);
+}
+function createVariableColor(opts) {
+ const { isView, sectionId, config, containerEl, settingsManager } = opts;
+ if (typeof config.default !== "string" ||
+ !isValidDefaultColor(config.default)) {
+ return console.error(`${t("Error:")} ${getTitle(config)} ${t("missing default value, or value is not in a valid color format")}`);
+ }
+ const value = settingsManager.getSetting(sectionId, config.id);
+ const swatches = [];
+ let pickr;
+ if (config.default) {
+ swatches.push(config.default);
+ }
+ if (value !== undefined) {
+ swatches.push(value);
+ }
+ new obsidian.Setting(containerEl)
+ .setName(getTitle(config))
+ .setDesc(createDescription(getDescription(config), config.default))
+ .then((setting) => {
+ setting.settingEl.dataset.id = opts.config.id;
+ pickr = Pickr.create(getPickrSettings({
+ isView,
+ el: setting.controlEl.createDiv({ cls: "picker" }),
+ containerEl,
+ swatches,
+ opacity: config.opacity,
+ defaultColor: value !== undefined ? value : config.default,
+ }))
+ .on("save", (color, instance) => {
+ if (!color)
+ return;
+ settingsManager.setSetting(sectionId, config.id, color.toHEXA().toString());
+ instance.hide();
+ instance.addSwatch(color.toHEXA().toString());
+ })
+ .on("show", () => {
+ const { result } = pickr.getRoot().interaction;
+ requestAnimationFrame(() => requestAnimationFrame(() => result.select()));
+ })
+ .on("cancel", onPickrCancel);
+ })
+ .addExtraButton((b) => {
+ b.setIcon("reset")
+ .onClick(() => {
+ pickr.setColor(config.default);
+ settingsManager.clearSetting(sectionId, config.id);
+ })
+ .setTooltip(resetTooltip);
+ });
+ return () => pickr.destroyAndRemove();
+}
+function createVariableThemedColor(opts) {
+ const { sectionId, isView, config, containerEl, settingsManager } = opts;
+ if (typeof config["default-light"] !== "string" ||
+ !isValidDefaultColor(config["default-light"])) {
+ return console.error(`${t("Error:")} ${getTitle(config)} ${t("missing default light value, or value is not in a valid color format")}`);
+ }
+ if (typeof config["default-dark"] !== "string" ||
+ !isValidDefaultColor(config["default-dark"])) {
+ return console.error(`${t("Error:")} ${getTitle(config)} ${t("missing default dark value, or value is not in a valid color format")}`);
+ }
+ const idLight = `${config.id}@@light`;
+ const idDark = `${config.id}@@dark`;
+ const valueLight = settingsManager.getSetting(sectionId, idLight);
+ const valueDark = settingsManager.getSetting(sectionId, idDark);
+ const swatchesLight = [];
+ const swatchesDark = [];
+ let pickrLight;
+ let pickrDark;
+ if (config["default-light"]) {
+ swatchesLight.push(config["default-light"]);
+ }
+ if (valueLight !== undefined) {
+ swatchesLight.push(valueLight);
+ }
+ if (config["default-dark"]) {
+ swatchesDark.push(config["default-dark"]);
+ }
+ if (valueDark !== undefined) {
+ swatchesDark.push(valueDark);
+ }
+ const onSave = (id) => (color, instance) => {
+ if (!color)
+ return;
+ settingsManager.setSetting(sectionId, id, color.toHEXA().toString());
+ instance.hide();
+ instance.addSwatch(color.toHEXA().toString());
+ };
+ new obsidian.Setting(containerEl)
+ .setName(getTitle(config))
+ .then((setting) => {
+ setting.settingEl.dataset.id = opts.config.id;
+ // Construct description
+ setting.descEl.createSpan({}, (span) => {
+ if (getDescription(config)) {
+ span.appendChild(document.createTextNode(getDescription(config)));
+ }
+ });
+ setting.descEl.createDiv({}, (div) => {
+ div.createEl("small", {}, (sm) => {
+ sm.appendChild(createEl("strong", { text: "Default (light): " }));
+ sm.appendChild(document.createTextNode(config["default-light"]));
+ });
+ div.createEl("br");
+ div.createEl("small", {}, (sm) => {
+ sm.appendChild(createEl("strong", { text: "Default (dark): " }));
+ sm.appendChild(document.createTextNode(config["default-dark"]));
+ });
+ });
+ })
+ .then((setting) => {
+ setting.controlEl.createDiv({ cls: "themed-color-wrapper" }, (wrapper) => {
+ // Create light color picker
+ wrapper.createDiv({ cls: "theme-light" }, (themeWrapper) => {
+ pickrLight = Pickr.create(getPickrSettings({
+ isView,
+ el: themeWrapper.createDiv({ cls: "picker" }),
+ containerEl,
+ swatches: swatchesLight,
+ opacity: config.opacity,
+ defaultColor: valueLight !== undefined
+ ? valueLight
+ : config["default-light"],
+ }))
+ .on("show", () => {
+ const { result } = pickrLight.getRoot().interaction;
+ requestAnimationFrame(() => requestAnimationFrame(() => result.select()));
+ })
+ .on("save", onSave(idLight))
+ .on("cancel", onPickrCancel);
+ new obsidian.ButtonComponent(themeWrapper.createDiv({ cls: "pickr-reset" }))
+ .setIcon("reset")
+ .onClick(() => {
+ pickrLight.setColor(config["default-light"]);
+ settingsManager.clearSetting(sectionId, idLight);
+ })
+ .setTooltip(resetTooltip);
+ });
+ // Create dark color picker
+ wrapper.createDiv({ cls: "theme-dark" }, (themeWrapper) => {
+ pickrDark = Pickr.create(getPickrSettings({
+ isView,
+ el: themeWrapper.createDiv({ cls: "picker" }),
+ containerEl,
+ swatches: swatchesDark,
+ opacity: config.opacity,
+ defaultColor: valueDark !== undefined
+ ? valueDark
+ : config["default-dark"],
+ }))
+ .on("show", () => {
+ const { result } = pickrDark.getRoot().interaction;
+ requestAnimationFrame(() => requestAnimationFrame(() => result.select()));
+ })
+ .on("save", onSave(idDark))
+ .on("cancel", onPickrCancel);
+ new obsidian.ButtonComponent(themeWrapper.createDiv({ cls: "pickr-reset" }))
+ .setIcon("reset")
+ .onClick(() => {
+ pickrDark.setColor(config["default-dark"]);
+ settingsManager.clearSetting(sectionId, idDark);
+ })
+ .setTooltip(resetTooltip);
+ });
+ });
+ });
+ return () => {
+ pickrLight.destroyAndRemove();
+ pickrDark.destroyAndRemove();
+ };
+}
+function createSettings(opts) {
+ const { isView, containerEl, sectionId, settings, settingsManager, sectionName, } = opts;
+ const containerStack = [containerEl];
+ const idStack = [sectionId];
+ const cleanup = [];
+ const settingGroups = {
+ [sectionId]: [],
+ };
+ let containerLevel = 0;
+ function getTargetContainer(stack) {
+ if (!stack.length)
+ return containerEl;
+ return stack[stack.length - 1];
+ }
+ function pushId(id) {
+ idStack.forEach((containerId) => {
+ if (settingGroups[containerId]) {
+ settingGroups[containerId].push(id);
+ }
+ else {
+ settingGroups[containerId] = [id];
+ }
+ });
+ }
+ settings.forEach((setting) => {
+ switch (setting.type) {
+ case "heading": {
+ const config = setting;
+ settingGroups[config.id] = [];
+ let targetContainer = getTargetContainer(containerStack);
+ if (config.level > containerLevel) {
+ // Nest one level
+ createHeading({
+ config,
+ containerEl: targetContainer,
+ children: settingGroups[config.id],
+ settingsManager,
+ sectionName,
+ sectionId,
+ });
+ }
+ else if (config.level === containerLevel) {
+ // Same level
+ containerStack.pop();
+ idStack.pop();
+ targetContainer = getTargetContainer(containerStack);
+ createHeading({
+ config,
+ containerEl: targetContainer,
+ children: settingGroups[config.id],
+ settingsManager,
+ sectionName,
+ sectionId,
+ });
+ }
+ else {
+ // Step up to the appropriate level
+ while (containerStack.length > 1 &&
+ parseInt(containerStack[containerStack.length - 1].dataset.level) >=
+ config.level) {
+ containerStack.pop();
+ idStack.pop();
+ }
+ targetContainer = getTargetContainer(containerStack);
+ createHeading({
+ config,
+ containerEl: targetContainer,
+ children: settingGroups[config.id],
+ settingsManager,
+ sectionName,
+ sectionId,
+ });
+ }
+ targetContainer.createDiv({ cls: "style-settings-container" }, (container) => {
+ container.dataset.level = config.level.toString();
+ containerStack.push(container);
+ idStack.push(config.id);
+ });
+ containerLevel = config.level;
+ break;
+ }
+ case "class-toggle": {
+ pushId(setting.id);
+ createClassToggle({
+ sectionId,
+ config: setting,
+ containerEl: getTargetContainer(containerStack),
+ settingsManager,
+ });
+ break;
+ }
+ case "class-select": {
+ pushId(setting.id);
+ createClassMultiToggle({
+ sectionId,
+ config: setting,
+ containerEl: getTargetContainer(containerStack),
+ settingsManager,
+ });
+ break;
+ }
+ case "variable-text": {
+ pushId(setting.id);
+ createVariableText({
+ sectionId,
+ config: setting,
+ containerEl: getTargetContainer(containerStack),
+ settingsManager,
+ });
+ break;
+ }
+ case "variable-number": {
+ pushId(setting.id);
+ createVariableNumber({
+ sectionId,
+ config: setting,
+ containerEl: getTargetContainer(containerStack),
+ settingsManager,
+ });
+ break;
+ }
+ case "variable-number-slider": {
+ pushId(setting.id);
+ createVariableNumberSlider({
+ sectionId,
+ config: setting,
+ containerEl: getTargetContainer(containerStack),
+ settingsManager,
+ });
+ break;
+ }
+ case "variable-select": {
+ pushId(setting.id);
+ createVariableSelect({
+ sectionId,
+ config: setting,
+ containerEl: getTargetContainer(containerStack),
+ settingsManager,
+ });
+ break;
+ }
+ case "variable-color": {
+ pushId(setting.id);
+ cleanup.push(createVariableColor({
+ sectionId,
+ config: setting,
+ containerEl: getTargetContainer(containerStack),
+ settingsManager,
+ isView,
+ }));
+ break;
+ }
+ case "variable-themed-color": {
+ // TODO: multiple ids?
+ pushId(setting.id);
+ cleanup.push(createVariableThemedColor({
+ sectionId,
+ config: setting,
+ containerEl: getTargetContainer(containerStack),
+ settingsManager,
+ isView,
+ }));
+ break;
+ }
+ }
+ });
+ return cleanup;
+}
+
+/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
+function isNothing(subject) {
+ return (typeof subject === 'undefined') || (subject === null);
+}
+
+
+function isObject(subject) {
+ return (typeof subject === 'object') && (subject !== null);
+}
+
+
+function toArray(sequence) {
+ if (Array.isArray(sequence)) return sequence;
+ else if (isNothing(sequence)) return [];
+
+ return [ sequence ];
+}
+
+
+function extend(target, source) {
+ var index, length, key, sourceKeys;
+
+ if (source) {
+ sourceKeys = Object.keys(source);
+
+ for (index = 0, length = sourceKeys.length; index < length; index += 1) {
+ key = sourceKeys[index];
+ target[key] = source[key];
+ }
+ }
+
+ return target;
+}
+
+
+function repeat(string, count) {
+ var result = '', cycle;
+
+ for (cycle = 0; cycle < count; cycle += 1) {
+ result += string;
+ }
+
+ return result;
+}
+
+
+function isNegativeZero(number) {
+ return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);
+}
+
+
+var isNothing_1 = isNothing;
+var isObject_1 = isObject;
+var toArray_1 = toArray;
+var repeat_1 = repeat;
+var isNegativeZero_1 = isNegativeZero;
+var extend_1 = extend;
+
+var common = {
+ isNothing: isNothing_1,
+ isObject: isObject_1,
+ toArray: toArray_1,
+ repeat: repeat_1,
+ isNegativeZero: isNegativeZero_1,
+ extend: extend_1
+};
+
+// YAML error class. http://stackoverflow.com/questions/8458984
+
+
+function formatError(exception, compact) {
+ var where = '', message = exception.reason || '(unknown reason)';
+
+ if (!exception.mark) return message;
+
+ if (exception.mark.name) {
+ where += 'in "' + exception.mark.name + '" ';
+ }
+
+ where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')';
+
+ if (!compact && exception.mark.snippet) {
+ where += '\n\n' + exception.mark.snippet;
+ }
+
+ return message + ' ' + where;
+}
+
+
+function YAMLException$1(reason, mark) {
+ // Super constructor
+ Error.call(this);
+
+ this.name = 'YAMLException';
+ this.reason = reason;
+ this.mark = mark;
+ this.message = formatError(this, false);
+
+ // Include stack trace in error object
+ if (Error.captureStackTrace) {
+ // Chrome and NodeJS
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ // FF, IE 10+ and Safari 6+. Fallback for others
+ this.stack = (new Error()).stack || '';
+ }
+}
+
+
+// Inherit from Error
+YAMLException$1.prototype = Object.create(Error.prototype);
+YAMLException$1.prototype.constructor = YAMLException$1;
+
+
+YAMLException$1.prototype.toString = function toString(compact) {
+ return this.name + ': ' + formatError(this, compact);
+};
+
+
+var exception = YAMLException$1;
+
+// get snippet for a single line, respecting maxLength
+function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
+ var head = '';
+ var tail = '';
+ var maxHalfLength = Math.floor(maxLineLength / 2) - 1;
+
+ if (position - lineStart > maxHalfLength) {
+ head = ' ... ';
+ lineStart = position - maxHalfLength + head.length;
+ }
+
+ if (lineEnd - position > maxHalfLength) {
+ tail = ' ...';
+ lineEnd = position + maxHalfLength - tail.length;
+ }
+
+ return {
+ str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail,
+ pos: position - lineStart + head.length // relative position
+ };
+}
+
+
+function padStart(string, max) {
+ return common.repeat(' ', max - string.length) + string;
+}
+
+
+function makeSnippet(mark, options) {
+ options = Object.create(options || null);
+
+ if (!mark.buffer) return null;
+
+ if (!options.maxLength) options.maxLength = 79;
+ if (typeof options.indent !== 'number') options.indent = 1;
+ if (typeof options.linesBefore !== 'number') options.linesBefore = 3;
+ if (typeof options.linesAfter !== 'number') options.linesAfter = 2;
+
+ var re = /\r?\n|\r|\0/g;
+ var lineStarts = [ 0 ];
+ var lineEnds = [];
+ var match;
+ var foundLineNo = -1;
+
+ while ((match = re.exec(mark.buffer))) {
+ lineEnds.push(match.index);
+ lineStarts.push(match.index + match[0].length);
+
+ if (mark.position <= match.index && foundLineNo < 0) {
+ foundLineNo = lineStarts.length - 2;
+ }
+ }
+
+ if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;
+
+ var result = '', i, line;
+ var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
+ var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
+
+ for (i = 1; i <= options.linesBefore; i++) {
+ if (foundLineNo - i < 0) break;
+ line = getLine(
+ mark.buffer,
+ lineStarts[foundLineNo - i],
+ lineEnds[foundLineNo - i],
+ mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),
+ maxLineLength
+ );
+ result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) +
+ ' | ' + line.str + '\n' + result;
+ }
+
+ line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
+ result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) +
+ ' | ' + line.str + '\n';
+ result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n';
+
+ for (i = 1; i <= options.linesAfter; i++) {
+ if (foundLineNo + i >= lineEnds.length) break;
+ line = getLine(
+ mark.buffer,
+ lineStarts[foundLineNo + i],
+ lineEnds[foundLineNo + i],
+ mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),
+ maxLineLength
+ );
+ result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) +
+ ' | ' + line.str + '\n';
+ }
+
+ return result.replace(/\n$/, '');
+}
+
+
+var snippet = makeSnippet;
+
+var TYPE_CONSTRUCTOR_OPTIONS = [
+ 'kind',
+ 'multi',
+ 'resolve',
+ 'construct',
+ 'instanceOf',
+ 'predicate',
+ 'represent',
+ 'representName',
+ 'defaultStyle',
+ 'styleAliases'
+];
+
+var YAML_NODE_KINDS = [
+ 'scalar',
+ 'sequence',
+ 'mapping'
+];
+
+function compileStyleAliases(map) {
+ var result = {};
+
+ if (map !== null) {
+ Object.keys(map).forEach(function (style) {
+ map[style].forEach(function (alias) {
+ result[String(alias)] = style;
+ });
+ });
+ }
+
+ return result;
+}
+
+function Type$1(tag, options) {
+ options = options || {};
+
+ Object.keys(options).forEach(function (name) {
+ if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
+ throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
+ }
+ });
+
+ // TODO: Add tag format check.
+ this.options = options; // keep original options in case user wants to extend this type later
+ this.tag = tag;
+ this.kind = options['kind'] || null;
+ this.resolve = options['resolve'] || function () { return true; };
+ this.construct = options['construct'] || function (data) { return data; };
+ this.instanceOf = options['instanceOf'] || null;
+ this.predicate = options['predicate'] || null;
+ this.represent = options['represent'] || null;
+ this.representName = options['representName'] || null;
+ this.defaultStyle = options['defaultStyle'] || null;
+ this.multi = options['multi'] || false;
+ this.styleAliases = compileStyleAliases(options['styleAliases'] || null);
+
+ if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
+ throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
+ }
+}
+
+var type = Type$1;
+
+/*eslint-disable max-len*/
+
+
+
+
+
+function compileList(schema, name) {
+ var result = [];
+
+ schema[name].forEach(function (currentType) {
+ var newIndex = result.length;
+
+ result.forEach(function (previousType, previousIndex) {
+ if (previousType.tag === currentType.tag &&
+ previousType.kind === currentType.kind &&
+ previousType.multi === currentType.multi) {
+
+ newIndex = previousIndex;
+ }
+ });
+
+ result[newIndex] = currentType;
+ });
+
+ return result;
+}
+
+
+function compileMap(/* lists... */) {
+ var result = {
+ scalar: {},
+ sequence: {},
+ mapping: {},
+ fallback: {},
+ multi: {
+ scalar: [],
+ sequence: [],
+ mapping: [],
+ fallback: []
+ }
+ }, index, length;
+
+ function collectType(type) {
+ if (type.multi) {
+ result.multi[type.kind].push(type);
+ result.multi['fallback'].push(type);
+ } else {
+ result[type.kind][type.tag] = result['fallback'][type.tag] = type;
+ }
+ }
+
+ for (index = 0, length = arguments.length; index < length; index += 1) {
+ arguments[index].forEach(collectType);
+ }
+ return result;
+}
+
+
+function Schema$1(definition) {
+ return this.extend(definition);
+}
+
+
+Schema$1.prototype.extend = function extend(definition) {
+ var implicit = [];
+ var explicit = [];
+
+ if (definition instanceof type) {
+ // Schema.extend(type)
+ explicit.push(definition);
+
+ } else if (Array.isArray(definition)) {
+ // Schema.extend([ type1, type2, ... ])
+ explicit = explicit.concat(definition);
+
+ } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
+ // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })
+ if (definition.implicit) implicit = implicit.concat(definition.implicit);
+ if (definition.explicit) explicit = explicit.concat(definition.explicit);
+
+ } else {
+ throw new exception('Schema.extend argument should be a Type, [ Type ], ' +
+ 'or a schema definition ({ implicit: [...], explicit: [...] })');
+ }
+
+ implicit.forEach(function (type$1) {
+ if (!(type$1 instanceof type)) {
+ throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');
+ }
+
+ if (type$1.loadKind && type$1.loadKind !== 'scalar') {
+ throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');
+ }
+
+ if (type$1.multi) {
+ throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.');
+ }
+ });
+
+ explicit.forEach(function (type$1) {
+ if (!(type$1 instanceof type)) {
+ throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');
+ }
+ });
+
+ var result = Object.create(Schema$1.prototype);
+
+ result.implicit = (this.implicit || []).concat(implicit);
+ result.explicit = (this.explicit || []).concat(explicit);
+
+ result.compiledImplicit = compileList(result, 'implicit');
+ result.compiledExplicit = compileList(result, 'explicit');
+ result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);
+
+ return result;
+};
+
+
+var schema = Schema$1;
+
+var str = new type('tag:yaml.org,2002:str', {
+ kind: 'scalar',
+ construct: function (data) { return data !== null ? data : ''; }
+});
+
+var seq = new type('tag:yaml.org,2002:seq', {
+ kind: 'sequence',
+ construct: function (data) { return data !== null ? data : []; }
+});
+
+var map = new type('tag:yaml.org,2002:map', {
+ kind: 'mapping',
+ construct: function (data) { return data !== null ? data : {}; }
+});
+
+var failsafe = new schema({
+ explicit: [
+ str,
+ seq,
+ map
+ ]
+});
+
+function resolveYamlNull(data) {
+ if (data === null) return true;
+
+ var max = data.length;
+
+ return (max === 1 && data === '~') ||
+ (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));
+}
+
+function constructYamlNull() {
+ return null;
+}
+
+function isNull(object) {
+ return object === null;
+}
+
+var _null = new type('tag:yaml.org,2002:null', {
+ kind: 'scalar',
+ resolve: resolveYamlNull,
+ construct: constructYamlNull,
+ predicate: isNull,
+ represent: {
+ canonical: function () { return '~'; },
+ lowercase: function () { return 'null'; },
+ uppercase: function () { return 'NULL'; },
+ camelcase: function () { return 'Null'; },
+ empty: function () { return ''; }
+ },
+ defaultStyle: 'lowercase'
+});
+
+function resolveYamlBoolean(data) {
+ if (data === null) return false;
+
+ var max = data.length;
+
+ return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||
+ (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));
+}
+
+function constructYamlBoolean(data) {
+ return data === 'true' ||
+ data === 'True' ||
+ data === 'TRUE';
+}
+
+function isBoolean(object) {
+ return Object.prototype.toString.call(object) === '[object Boolean]';
+}
+
+var bool = new type('tag:yaml.org,2002:bool', {
+ kind: 'scalar',
+ resolve: resolveYamlBoolean,
+ construct: constructYamlBoolean,
+ predicate: isBoolean,
+ represent: {
+ lowercase: function (object) { return object ? 'true' : 'false'; },
+ uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },
+ camelcase: function (object) { return object ? 'True' : 'False'; }
+ },
+ defaultStyle: 'lowercase'
+});
+
+function isHexCode(c) {
+ return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||
+ ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||
+ ((0x61/* a */ <= c) && (c <= 0x66/* f */));
+}
+
+function isOctCode(c) {
+ return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));
+}
+
+function isDecCode(c) {
+ return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));
+}
+
+function resolveYamlInteger(data) {
+ if (data === null) return false;
+
+ var max = data.length,
+ index = 0,
+ hasDigits = false,
+ ch;
+
+ if (!max) return false;
+
+ ch = data[index];
+
+ // sign
+ if (ch === '-' || ch === '+') {
+ ch = data[++index];
+ }
+
+ if (ch === '0') {
+ // 0
+ if (index + 1 === max) return true;
+ ch = data[++index];
+
+ // base 2, base 8, base 16
+
+ if (ch === 'b') {
+ // base 2
+ index++;
+
+ for (; index < max; index++) {
+ ch = data[index];
+ if (ch === '_') continue;
+ if (ch !== '0' && ch !== '1') return false;
+ hasDigits = true;
+ }
+ return hasDigits && ch !== '_';
+ }
+
+
+ if (ch === 'x') {
+ // base 16
+ index++;
+
+ for (; index < max; index++) {
+ ch = data[index];
+ if (ch === '_') continue;
+ if (!isHexCode(data.charCodeAt(index))) return false;
+ hasDigits = true;
+ }
+ return hasDigits && ch !== '_';
+ }
+
+
+ if (ch === 'o') {
+ // base 8
+ index++;
+
+ for (; index < max; index++) {
+ ch = data[index];
+ if (ch === '_') continue;
+ if (!isOctCode(data.charCodeAt(index))) return false;
+ hasDigits = true;
+ }
+ return hasDigits && ch !== '_';
+ }
+ }
+
+ // base 10 (except 0)
+
+ // value should not start with `_`;
+ if (ch === '_') return false;
+
+ for (; index < max; index++) {
+ ch = data[index];
+ if (ch === '_') continue;
+ if (!isDecCode(data.charCodeAt(index))) {
+ return false;
+ }
+ hasDigits = true;
+ }
+
+ // Should have digits and should not end with `_`
+ if (!hasDigits || ch === '_') return false;
+
+ return true;
+}
+
+function constructYamlInteger(data) {
+ var value = data, sign = 1, ch;
+
+ if (value.indexOf('_') !== -1) {
+ value = value.replace(/_/g, '');
+ }
+
+ ch = value[0];
+
+ if (ch === '-' || ch === '+') {
+ if (ch === '-') sign = -1;
+ value = value.slice(1);
+ ch = value[0];
+ }
+
+ if (value === '0') return 0;
+
+ if (ch === '0') {
+ if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);
+ if (value[1] === 'x') return sign * parseInt(value.slice(2), 16);
+ if (value[1] === 'o') return sign * parseInt(value.slice(2), 8);
+ }
+
+ return sign * parseInt(value, 10);
+}
+
+function isInteger(object) {
+ return (Object.prototype.toString.call(object)) === '[object Number]' &&
+ (object % 1 === 0 && !common.isNegativeZero(object));
+}
+
+var int = new type('tag:yaml.org,2002:int', {
+ kind: 'scalar',
+ resolve: resolveYamlInteger,
+ construct: constructYamlInteger,
+ predicate: isInteger,
+ represent: {
+ binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },
+ octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); },
+ decimal: function (obj) { return obj.toString(10); },
+ /* eslint-disable max-len */
+ hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }
+ },
+ defaultStyle: 'decimal',
+ styleAliases: {
+ binary: [ 2, 'bin' ],
+ octal: [ 8, 'oct' ],
+ decimal: [ 10, 'dec' ],
+ hexadecimal: [ 16, 'hex' ]
+ }
+});
+
+var YAML_FLOAT_PATTERN = new RegExp(
+ // 2.5e4, 2.5 and integers
+ '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +
+ // .2e4, .2
+ // special case, seems not from spec
+ '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +
+ // .inf
+ '|[-+]?\\.(?:inf|Inf|INF)' +
+ // .nan
+ '|\\.(?:nan|NaN|NAN))$');
+
+function resolveYamlFloat(data) {
+ if (data === null) return false;
+
+ if (!YAML_FLOAT_PATTERN.test(data) ||
+ // Quick hack to not allow integers end with `_`
+ // Probably should update regexp & check speed
+ data[data.length - 1] === '_') {
+ return false;
+ }
+
+ return true;
+}
+
+function constructYamlFloat(data) {
+ var value, sign;
+
+ value = data.replace(/_/g, '').toLowerCase();
+ sign = value[0] === '-' ? -1 : 1;
+
+ if ('+-'.indexOf(value[0]) >= 0) {
+ value = value.slice(1);
+ }
+
+ if (value === '.inf') {
+ return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
+
+ } else if (value === '.nan') {
+ return NaN;
+ }
+ return sign * parseFloat(value, 10);
+}
+
+
+var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
+
+function representYamlFloat(object, style) {
+ var res;
+
+ if (isNaN(object)) {
+ switch (style) {
+ case 'lowercase': return '.nan';
+ case 'uppercase': return '.NAN';
+ case 'camelcase': return '.NaN';
+ }
+ } else if (Number.POSITIVE_INFINITY === object) {
+ switch (style) {
+ case 'lowercase': return '.inf';
+ case 'uppercase': return '.INF';
+ case 'camelcase': return '.Inf';
+ }
+ } else if (Number.NEGATIVE_INFINITY === object) {
+ switch (style) {
+ case 'lowercase': return '-.inf';
+ case 'uppercase': return '-.INF';
+ case 'camelcase': return '-.Inf';
+ }
+ } else if (common.isNegativeZero(object)) {
+ return '-0.0';
+ }
+
+ res = object.toString(10);
+
+ // JS stringifier can build scientific format without dots: 5e-100,
+ // while YAML requres dot: 5.e-100. Fix it with simple hack
+
+ return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;
+}
+
+function isFloat(object) {
+ return (Object.prototype.toString.call(object) === '[object Number]') &&
+ (object % 1 !== 0 || common.isNegativeZero(object));
+}
+
+var float = new type('tag:yaml.org,2002:float', {
+ kind: 'scalar',
+ resolve: resolveYamlFloat,
+ construct: constructYamlFloat,
+ predicate: isFloat,
+ represent: representYamlFloat,
+ defaultStyle: 'lowercase'
+});
+
+var json = failsafe.extend({
+ implicit: [
+ _null,
+ bool,
+ int,
+ float
+ ]
+});
+
+var core = json;
+
+var YAML_DATE_REGEXP = new RegExp(
+ '^([0-9][0-9][0-9][0-9])' + // [1] year
+ '-([0-9][0-9])' + // [2] month
+ '-([0-9][0-9])$'); // [3] day
+
+var YAML_TIMESTAMP_REGEXP = new RegExp(
+ '^([0-9][0-9][0-9][0-9])' + // [1] year
+ '-([0-9][0-9]?)' + // [2] month
+ '-([0-9][0-9]?)' + // [3] day
+ '(?:[Tt]|[ \\t]+)' + // ...
+ '([0-9][0-9]?)' + // [4] hour
+ ':([0-9][0-9])' + // [5] minute
+ ':([0-9][0-9])' + // [6] second
+ '(?:\\.([0-9]*))?' + // [7] fraction
+ '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour
+ '(?::([0-9][0-9]))?))?$'); // [11] tz_minute
+
+function resolveYamlTimestamp(data) {
+ if (data === null) return false;
+ if (YAML_DATE_REGEXP.exec(data) !== null) return true;
+ if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;
+ return false;
+}
+
+function constructYamlTimestamp(data) {
+ var match, year, month, day, hour, minute, second, fraction = 0,
+ delta = null, tz_hour, tz_minute, date;
+
+ match = YAML_DATE_REGEXP.exec(data);
+ if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);
+
+ if (match === null) throw new Error('Date resolve error');
+
+ // match: [1] year [2] month [3] day
+
+ year = +(match[1]);
+ month = +(match[2]) - 1; // JS month starts with 0
+ day = +(match[3]);
+
+ if (!match[4]) { // no hour
+ return new Date(Date.UTC(year, month, day));
+ }
+
+ // match: [4] hour [5] minute [6] second [7] fraction
+
+ hour = +(match[4]);
+ minute = +(match[5]);
+ second = +(match[6]);
+
+ if (match[7]) {
+ fraction = match[7].slice(0, 3);
+ while (fraction.length < 3) { // milli-seconds
+ fraction += '0';
+ }
+ fraction = +fraction;
+ }
+
+ // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute
+
+ if (match[9]) {
+ tz_hour = +(match[10]);
+ tz_minute = +(match[11] || 0);
+ delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds
+ if (match[9] === '-') delta = -delta;
+ }
+
+ date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
+
+ if (delta) date.setTime(date.getTime() - delta);
+
+ return date;
+}
+
+function representYamlTimestamp(object /*, style*/) {
+ return object.toISOString();
+}
+
+var timestamp = new type('tag:yaml.org,2002:timestamp', {
+ kind: 'scalar',
+ resolve: resolveYamlTimestamp,
+ construct: constructYamlTimestamp,
+ instanceOf: Date,
+ represent: representYamlTimestamp
+});
+
+function resolveYamlMerge(data) {
+ return data === '<<' || data === null;
+}
+
+var merge = new type('tag:yaml.org,2002:merge', {
+ kind: 'scalar',
+ resolve: resolveYamlMerge
+});
+
+/*eslint-disable no-bitwise*/
+
+
+
+
+
+// [ 64, 65, 66 ] -> [ padding, CR, LF ]
+var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r';
+
+
+function resolveYamlBinary(data) {
+ if (data === null) return false;
+
+ var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;
+
+ // Convert one by one.
+ for (idx = 0; idx < max; idx++) {
+ code = map.indexOf(data.charAt(idx));
+
+ // Skip CR/LF
+ if (code > 64) continue;
+
+ // Fail on illegal characters
+ if (code < 0) return false;
+
+ bitlen += 6;
+ }
+
+ // If there are any bits left, source was corrupted
+ return (bitlen % 8) === 0;
+}
+
+function constructYamlBinary(data) {
+ var idx, tailbits,
+ input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan
+ max = input.length,
+ map = BASE64_MAP,
+ bits = 0,
+ result = [];
+
+ // Collect by 6*4 bits (3 bytes)
+
+ for (idx = 0; idx < max; idx++) {
+ if ((idx % 4 === 0) && idx) {
+ result.push((bits >> 16) & 0xFF);
+ result.push((bits >> 8) & 0xFF);
+ result.push(bits & 0xFF);
+ }
+
+ bits = (bits << 6) | map.indexOf(input.charAt(idx));
+ }
+
+ // Dump tail
+
+ tailbits = (max % 4) * 6;
+
+ if (tailbits === 0) {
+ result.push((bits >> 16) & 0xFF);
+ result.push((bits >> 8) & 0xFF);
+ result.push(bits & 0xFF);
+ } else if (tailbits === 18) {
+ result.push((bits >> 10) & 0xFF);
+ result.push((bits >> 2) & 0xFF);
+ } else if (tailbits === 12) {
+ result.push((bits >> 4) & 0xFF);
+ }
+
+ return new Uint8Array(result);
+}
+
+function representYamlBinary(object /*, style*/) {
+ var result = '', bits = 0, idx, tail,
+ max = object.length,
+ map = BASE64_MAP;
+
+ // Convert every three bytes to 4 ASCII characters.
+
+ for (idx = 0; idx < max; idx++) {
+ if ((idx % 3 === 0) && idx) {
+ result += map[(bits >> 18) & 0x3F];
+ result += map[(bits >> 12) & 0x3F];
+ result += map[(bits >> 6) & 0x3F];
+ result += map[bits & 0x3F];
+ }
+
+ bits = (bits << 8) + object[idx];
+ }
+
+ // Dump tail
+
+ tail = max % 3;
+
+ if (tail === 0) {
+ result += map[(bits >> 18) & 0x3F];
+ result += map[(bits >> 12) & 0x3F];
+ result += map[(bits >> 6) & 0x3F];
+ result += map[bits & 0x3F];
+ } else if (tail === 2) {
+ result += map[(bits >> 10) & 0x3F];
+ result += map[(bits >> 4) & 0x3F];
+ result += map[(bits << 2) & 0x3F];
+ result += map[64];
+ } else if (tail === 1) {
+ result += map[(bits >> 2) & 0x3F];
+ result += map[(bits << 4) & 0x3F];
+ result += map[64];
+ result += map[64];
+ }
+
+ return result;
+}
+
+function isBinary(obj) {
+ return Object.prototype.toString.call(obj) === '[object Uint8Array]';
+}
+
+var binary = new type('tag:yaml.org,2002:binary', {
+ kind: 'scalar',
+ resolve: resolveYamlBinary,
+ construct: constructYamlBinary,
+ predicate: isBinary,
+ represent: representYamlBinary
+});
+
+var _hasOwnProperty$3 = Object.prototype.hasOwnProperty;
+var _toString$2 = Object.prototype.toString;
+
+function resolveYamlOmap(data) {
+ if (data === null) return true;
+
+ var objectKeys = [], index, length, pair, pairKey, pairHasKey,
+ object = data;
+
+ for (index = 0, length = object.length; index < length; index += 1) {
+ pair = object[index];
+ pairHasKey = false;
+
+ if (_toString$2.call(pair) !== '[object Object]') return false;
+
+ for (pairKey in pair) {
+ if (_hasOwnProperty$3.call(pair, pairKey)) {
+ if (!pairHasKey) pairHasKey = true;
+ else return false;
+ }
+ }
+
+ if (!pairHasKey) return false;
+
+ if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);
+ else return false;
+ }
+
+ return true;
+}
+
+function constructYamlOmap(data) {
+ return data !== null ? data : [];
+}
+
+var omap = new type('tag:yaml.org,2002:omap', {
+ kind: 'sequence',
+ resolve: resolveYamlOmap,
+ construct: constructYamlOmap
+});
+
+var _toString$1 = Object.prototype.toString;
+
+function resolveYamlPairs(data) {
+ if (data === null) return true;
+
+ var index, length, pair, keys, result,
+ object = data;
+
+ result = new Array(object.length);
+
+ for (index = 0, length = object.length; index < length; index += 1) {
+ pair = object[index];
+
+ if (_toString$1.call(pair) !== '[object Object]') return false;
+
+ keys = Object.keys(pair);
+
+ if (keys.length !== 1) return false;
+
+ result[index] = [ keys[0], pair[keys[0]] ];
+ }
+
+ return true;
+}
+
+function constructYamlPairs(data) {
+ if (data === null) return [];
+
+ var index, length, pair, keys, result,
+ object = data;
+
+ result = new Array(object.length);
+
+ for (index = 0, length = object.length; index < length; index += 1) {
+ pair = object[index];
+
+ keys = Object.keys(pair);
+
+ result[index] = [ keys[0], pair[keys[0]] ];
+ }
+
+ return result;
+}
+
+var pairs = new type('tag:yaml.org,2002:pairs', {
+ kind: 'sequence',
+ resolve: resolveYamlPairs,
+ construct: constructYamlPairs
+});
+
+var _hasOwnProperty$2 = Object.prototype.hasOwnProperty;
+
+function resolveYamlSet(data) {
+ if (data === null) return true;
+
+ var key, object = data;
+
+ for (key in object) {
+ if (_hasOwnProperty$2.call(object, key)) {
+ if (object[key] !== null) return false;
+ }
+ }
+
+ return true;
+}
+
+function constructYamlSet(data) {
+ return data !== null ? data : {};
+}
+
+var set = new type('tag:yaml.org,2002:set', {
+ kind: 'mapping',
+ resolve: resolveYamlSet,
+ construct: constructYamlSet
+});
+
+var _default = core.extend({
+ implicit: [
+ timestamp,
+ merge
+ ],
+ explicit: [
+ binary,
+ omap,
+ pairs,
+ set
+ ]
+});
+
+/*eslint-disable max-len,no-use-before-define*/
+
+
+
+
+
+
+
+var _hasOwnProperty$1 = Object.prototype.hasOwnProperty;
+
+
+var CONTEXT_FLOW_IN = 1;
+var CONTEXT_FLOW_OUT = 2;
+var CONTEXT_BLOCK_IN = 3;
+var CONTEXT_BLOCK_OUT = 4;
+
+
+var CHOMPING_CLIP = 1;
+var CHOMPING_STRIP = 2;
+var CHOMPING_KEEP = 3;
+
+
+var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
+var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
+var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
+var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
+var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
+
+
+function _class(obj) { return Object.prototype.toString.call(obj); }
+
+function is_EOL(c) {
+ return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);
+}
+
+function is_WHITE_SPACE(c) {
+ return (c === 0x09/* Tab */) || (c === 0x20/* Space */);
+}
+
+function is_WS_OR_EOL(c) {
+ return (c === 0x09/* Tab */) ||
+ (c === 0x20/* Space */) ||
+ (c === 0x0A/* LF */) ||
+ (c === 0x0D/* CR */);
+}
+
+function is_FLOW_INDICATOR(c) {
+ return c === 0x2C/* , */ ||
+ c === 0x5B/* [ */ ||
+ c === 0x5D/* ] */ ||
+ c === 0x7B/* { */ ||
+ c === 0x7D/* } */;
+}
+
+function fromHexCode(c) {
+ var lc;
+
+ if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {
+ return c - 0x30;
+ }
+
+ /*eslint-disable no-bitwise*/
+ lc = c | 0x20;
+
+ if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {
+ return lc - 0x61 + 10;
+ }
+
+ return -1;
+}
+
+function escapedHexLen(c) {
+ if (c === 0x78/* x */) { return 2; }
+ if (c === 0x75/* u */) { return 4; }
+ if (c === 0x55/* U */) { return 8; }
+ return 0;
+}
+
+function fromDecimalCode(c) {
+ if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {
+ return c - 0x30;
+ }
+
+ return -1;
+}
+
+function simpleEscapeSequence(c) {
+ /* eslint-disable indent */
+ return (c === 0x30/* 0 */) ? '\x00' :
+ (c === 0x61/* a */) ? '\x07' :
+ (c === 0x62/* b */) ? '\x08' :
+ (c === 0x74/* t */) ? '\x09' :
+ (c === 0x09/* Tab */) ? '\x09' :
+ (c === 0x6E/* n */) ? '\x0A' :
+ (c === 0x76/* v */) ? '\x0B' :
+ (c === 0x66/* f */) ? '\x0C' :
+ (c === 0x72/* r */) ? '\x0D' :
+ (c === 0x65/* e */) ? '\x1B' :
+ (c === 0x20/* Space */) ? ' ' :
+ (c === 0x22/* " */) ? '\x22' :
+ (c === 0x2F/* / */) ? '/' :
+ (c === 0x5C/* \ */) ? '\x5C' :
+ (c === 0x4E/* N */) ? '\x85' :
+ (c === 0x5F/* _ */) ? '\xA0' :
+ (c === 0x4C/* L */) ? '\u2028' :
+ (c === 0x50/* P */) ? '\u2029' : '';
+}
+
+function charFromCodepoint(c) {
+ if (c <= 0xFFFF) {
+ return String.fromCharCode(c);
+ }
+ // Encode UTF-16 surrogate pair
+ // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF
+ return String.fromCharCode(
+ ((c - 0x010000) >> 10) + 0xD800,
+ ((c - 0x010000) & 0x03FF) + 0xDC00
+ );
+}
+
+var simpleEscapeCheck = new Array(256); // integer, for fast access
+var simpleEscapeMap = new Array(256);
+for (var i = 0; i < 256; i++) {
+ simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
+ simpleEscapeMap[i] = simpleEscapeSequence(i);
+}
+
+
+function State$1(input, options) {
+ this.input = input;
+
+ this.filename = options['filename'] || null;
+ this.schema = options['schema'] || _default;
+ this.onWarning = options['onWarning'] || null;
+ // (Hidden) Remove? makes the loader to expect YAML 1.1 documents
+ // if such documents have no explicit %YAML directive
+ this.legacy = options['legacy'] || false;
+
+ this.json = options['json'] || false;
+ this.listener = options['listener'] || null;
+
+ this.implicitTypes = this.schema.compiledImplicit;
+ this.typeMap = this.schema.compiledTypeMap;
+
+ this.length = input.length;
+ this.position = 0;
+ this.line = 0;
+ this.lineStart = 0;
+ this.lineIndent = 0;
+
+ // position of first leading tab in the current line,
+ // used to make sure there are no tabs in the indentation
+ this.firstTabInLine = -1;
+
+ this.documents = [];
+
+ /*
+ this.version;
+ this.checkLineBreaks;
+ this.tagMap;
+ this.anchorMap;
+ this.tag;
+ this.anchor;
+ this.kind;
+ this.result;*/
+
+}
+
+
+function generateError(state, message) {
+ var mark = {
+ name: state.filename,
+ buffer: state.input.slice(0, -1), // omit trailing \0
+ position: state.position,
+ line: state.line,
+ column: state.position - state.lineStart
+ };
+
+ mark.snippet = snippet(mark);
+
+ return new exception(message, mark);
+}
+
+function throwError(state, message) {
+ throw generateError(state, message);
+}
+
+function throwWarning(state, message) {
+ if (state.onWarning) {
+ state.onWarning.call(null, generateError(state, message));
+ }
+}
+
+
+var directiveHandlers = {
+
+ YAML: function handleYamlDirective(state, name, args) {
+
+ var match, major, minor;
+
+ if (state.version !== null) {
+ throwError(state, 'duplication of %YAML directive');
+ }
+
+ if (args.length !== 1) {
+ throwError(state, 'YAML directive accepts exactly one argument');
+ }
+
+ match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
+
+ if (match === null) {
+ throwError(state, 'ill-formed argument of the YAML directive');
+ }
+
+ major = parseInt(match[1], 10);
+ minor = parseInt(match[2], 10);
+
+ if (major !== 1) {
+ throwError(state, 'unacceptable YAML version of the document');
+ }
+
+ state.version = args[0];
+ state.checkLineBreaks = (minor < 2);
+
+ if (minor !== 1 && minor !== 2) {
+ throwWarning(state, 'unsupported YAML version of the document');
+ }
+ },
+
+ TAG: function handleTagDirective(state, name, args) {
+
+ var handle, prefix;
+
+ if (args.length !== 2) {
+ throwError(state, 'TAG directive accepts exactly two arguments');
+ }
+
+ handle = args[0];
+ prefix = args[1];
+
+ if (!PATTERN_TAG_HANDLE.test(handle)) {
+ throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');
+ }
+
+ if (_hasOwnProperty$1.call(state.tagMap, handle)) {
+ throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle');
+ }
+
+ if (!PATTERN_TAG_URI.test(prefix)) {
+ throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');
+ }
+
+ try {
+ prefix = decodeURIComponent(prefix);
+ } catch (err) {
+ throwError(state, 'tag prefix is malformed: ' + prefix);
+ }
+
+ state.tagMap[handle] = prefix;
+ }
+};
+
+
+function captureSegment(state, start, end, checkJson) {
+ var _position, _length, _character, _result;
+
+ if (start < end) {
+ _result = state.input.slice(start, end);
+
+ if (checkJson) {
+ for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
+ _character = _result.charCodeAt(_position);
+ if (!(_character === 0x09 ||
+ (0x20 <= _character && _character <= 0x10FFFF))) {
+ throwError(state, 'expected valid JSON character');
+ }
+ }
+ } else if (PATTERN_NON_PRINTABLE.test(_result)) {
+ throwError(state, 'the stream contains non-printable characters');
+ }
+
+ state.result += _result;
+ }
+}
+
+function mergeMappings(state, destination, source, overridableKeys) {
+ var sourceKeys, key, index, quantity;
+
+ if (!common.isObject(source)) {
+ throwError(state, 'cannot merge mappings; the provided source object is unacceptable');
+ }
+
+ sourceKeys = Object.keys(source);
+
+ for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
+ key = sourceKeys[index];
+
+ if (!_hasOwnProperty$1.call(destination, key)) {
+ destination[key] = source[key];
+ overridableKeys[key] = true;
+ }
+ }
+}
+
+function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode,
+ startLine, startLineStart, startPos) {
+
+ var index, quantity;
+
+ // The output is a plain object here, so keys can only be strings.
+ // We need to convert keyNode to a string, but doing so can hang the process
+ // (deeply nested arrays that explode exponentially using aliases).
+ if (Array.isArray(keyNode)) {
+ keyNode = Array.prototype.slice.call(keyNode);
+
+ for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {
+ if (Array.isArray(keyNode[index])) {
+ throwError(state, 'nested arrays are not supported inside keys');
+ }
+
+ if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {
+ keyNode[index] = '[object Object]';
+ }
+ }
+ }
+
+ // Avoid code execution in load() via toString property
+ // (still use its own toString for arrays, timestamps,
+ // and whatever user schema extensions happen to have @@toStringTag)
+ if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {
+ keyNode = '[object Object]';
+ }
+
+
+ keyNode = String(keyNode);
+
+ if (_result === null) {
+ _result = {};
+ }
+
+ if (keyTag === 'tag:yaml.org,2002:merge') {
+ if (Array.isArray(valueNode)) {
+ for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {
+ mergeMappings(state, _result, valueNode[index], overridableKeys);
+ }
+ } else {
+ mergeMappings(state, _result, valueNode, overridableKeys);
+ }
+ } else {
+ if (!state.json &&
+ !_hasOwnProperty$1.call(overridableKeys, keyNode) &&
+ _hasOwnProperty$1.call(_result, keyNode)) {
+ state.line = startLine || state.line;
+ state.lineStart = startLineStart || state.lineStart;
+ state.position = startPos || state.position;
+ throwError(state, 'duplicated mapping key');
+ }
+
+ // used for this specific key only because Object.defineProperty is slow
+ if (keyNode === '__proto__') {
+ Object.defineProperty(_result, keyNode, {
+ configurable: true,
+ enumerable: true,
+ writable: true,
+ value: valueNode
+ });
+ } else {
+ _result[keyNode] = valueNode;
+ }
+ delete overridableKeys[keyNode];
+ }
+
+ return _result;
+}
+
+function readLineBreak(state) {
+ var ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch === 0x0A/* LF */) {
+ state.position++;
+ } else if (ch === 0x0D/* CR */) {
+ state.position++;
+ if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {
+ state.position++;
+ }
+ } else {
+ throwError(state, 'a line break is expected');
+ }
+
+ state.line += 1;
+ state.lineStart = state.position;
+ state.firstTabInLine = -1;
+}
+
+function skipSeparationSpace(state, allowComments, checkIndent) {
+ var lineBreaks = 0,
+ ch = state.input.charCodeAt(state.position);
+
+ while (ch !== 0) {
+ while (is_WHITE_SPACE(ch)) {
+ if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {
+ state.firstTabInLine = state.position;
+ }
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (allowComments && ch === 0x23/* # */) {
+ do {
+ ch = state.input.charCodeAt(++state.position);
+ } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);
+ }
+
+ if (is_EOL(ch)) {
+ readLineBreak(state);
+
+ ch = state.input.charCodeAt(state.position);
+ lineBreaks++;
+ state.lineIndent = 0;
+
+ while (ch === 0x20/* Space */) {
+ state.lineIndent++;
+ ch = state.input.charCodeAt(++state.position);
+ }
+ } else {
+ break;
+ }
+ }
+
+ if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
+ throwWarning(state, 'deficient indentation');
+ }
+
+ return lineBreaks;
+}
+
+function testDocumentSeparator(state) {
+ var _position = state.position,
+ ch;
+
+ ch = state.input.charCodeAt(_position);
+
+ // Condition state.position === state.lineStart is tested
+ // in parent on each call, for efficiency. No needs to test here again.
+ if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&
+ ch === state.input.charCodeAt(_position + 1) &&
+ ch === state.input.charCodeAt(_position + 2)) {
+
+ _position += 3;
+
+ ch = state.input.charCodeAt(_position);
+
+ if (ch === 0 || is_WS_OR_EOL(ch)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function writeFoldedLines(state, count) {
+ if (count === 1) {
+ state.result += ' ';
+ } else if (count > 1) {
+ state.result += common.repeat('\n', count - 1);
+ }
+}
+
+
+function readPlainScalar(state, nodeIndent, withinFlowCollection) {
+ var preceding,
+ following,
+ captureStart,
+ captureEnd,
+ hasPendingContent,
+ _line,
+ _lineStart,
+ _lineIndent,
+ _kind = state.kind,
+ _result = state.result,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (is_WS_OR_EOL(ch) ||
+ is_FLOW_INDICATOR(ch) ||
+ ch === 0x23/* # */ ||
+ ch === 0x26/* & */ ||
+ ch === 0x2A/* * */ ||
+ ch === 0x21/* ! */ ||
+ ch === 0x7C/* | */ ||
+ ch === 0x3E/* > */ ||
+ ch === 0x27/* ' */ ||
+ ch === 0x22/* " */ ||
+ ch === 0x25/* % */ ||
+ ch === 0x40/* @ */ ||
+ ch === 0x60/* ` */) {
+ return false;
+ }
+
+ if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {
+ following = state.input.charCodeAt(state.position + 1);
+
+ if (is_WS_OR_EOL(following) ||
+ withinFlowCollection && is_FLOW_INDICATOR(following)) {
+ return false;
+ }
+ }
+
+ state.kind = 'scalar';
+ state.result = '';
+ captureStart = captureEnd = state.position;
+ hasPendingContent = false;
+
+ while (ch !== 0) {
+ if (ch === 0x3A/* : */) {
+ following = state.input.charCodeAt(state.position + 1);
+
+ if (is_WS_OR_EOL(following) ||
+ withinFlowCollection && is_FLOW_INDICATOR(following)) {
+ break;
+ }
+
+ } else if (ch === 0x23/* # */) {
+ preceding = state.input.charCodeAt(state.position - 1);
+
+ if (is_WS_OR_EOL(preceding)) {
+ break;
+ }
+
+ } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||
+ withinFlowCollection && is_FLOW_INDICATOR(ch)) {
+ break;
+
+ } else if (is_EOL(ch)) {
+ _line = state.line;
+ _lineStart = state.lineStart;
+ _lineIndent = state.lineIndent;
+ skipSeparationSpace(state, false, -1);
+
+ if (state.lineIndent >= nodeIndent) {
+ hasPendingContent = true;
+ ch = state.input.charCodeAt(state.position);
+ continue;
+ } else {
+ state.position = captureEnd;
+ state.line = _line;
+ state.lineStart = _lineStart;
+ state.lineIndent = _lineIndent;
+ break;
+ }
+ }
+
+ if (hasPendingContent) {
+ captureSegment(state, captureStart, captureEnd, false);
+ writeFoldedLines(state, state.line - _line);
+ captureStart = captureEnd = state.position;
+ hasPendingContent = false;
+ }
+
+ if (!is_WHITE_SPACE(ch)) {
+ captureEnd = state.position + 1;
+ }
+
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ captureSegment(state, captureStart, captureEnd, false);
+
+ if (state.result) {
+ return true;
+ }
+
+ state.kind = _kind;
+ state.result = _result;
+ return false;
+}
+
+function readSingleQuotedScalar(state, nodeIndent) {
+ var ch,
+ captureStart, captureEnd;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch !== 0x27/* ' */) {
+ return false;
+ }
+
+ state.kind = 'scalar';
+ state.result = '';
+ state.position++;
+ captureStart = captureEnd = state.position;
+
+ while ((ch = state.input.charCodeAt(state.position)) !== 0) {
+ if (ch === 0x27/* ' */) {
+ captureSegment(state, captureStart, state.position, true);
+ ch = state.input.charCodeAt(++state.position);
+
+ if (ch === 0x27/* ' */) {
+ captureStart = state.position;
+ state.position++;
+ captureEnd = state.position;
+ } else {
+ return true;
+ }
+
+ } else if (is_EOL(ch)) {
+ captureSegment(state, captureStart, captureEnd, true);
+ writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
+ captureStart = captureEnd = state.position;
+
+ } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
+ throwError(state, 'unexpected end of the document within a single quoted scalar');
+
+ } else {
+ state.position++;
+ captureEnd = state.position;
+ }
+ }
+
+ throwError(state, 'unexpected end of the stream within a single quoted scalar');
+}
+
+function readDoubleQuotedScalar(state, nodeIndent) {
+ var captureStart,
+ captureEnd,
+ hexLength,
+ hexResult,
+ tmp,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch !== 0x22/* " */) {
+ return false;
+ }
+
+ state.kind = 'scalar';
+ state.result = '';
+ state.position++;
+ captureStart = captureEnd = state.position;
+
+ while ((ch = state.input.charCodeAt(state.position)) !== 0) {
+ if (ch === 0x22/* " */) {
+ captureSegment(state, captureStart, state.position, true);
+ state.position++;
+ return true;
+
+ } else if (ch === 0x5C/* \ */) {
+ captureSegment(state, captureStart, state.position, true);
+ ch = state.input.charCodeAt(++state.position);
+
+ if (is_EOL(ch)) {
+ skipSeparationSpace(state, false, nodeIndent);
+
+ // TODO: rework to inline fn with no type cast?
+ } else if (ch < 256 && simpleEscapeCheck[ch]) {
+ state.result += simpleEscapeMap[ch];
+ state.position++;
+
+ } else if ((tmp = escapedHexLen(ch)) > 0) {
+ hexLength = tmp;
+ hexResult = 0;
+
+ for (; hexLength > 0; hexLength--) {
+ ch = state.input.charCodeAt(++state.position);
+
+ if ((tmp = fromHexCode(ch)) >= 0) {
+ hexResult = (hexResult << 4) + tmp;
+
+ } else {
+ throwError(state, 'expected hexadecimal character');
+ }
+ }
+
+ state.result += charFromCodepoint(hexResult);
+
+ state.position++;
+
+ } else {
+ throwError(state, 'unknown escape sequence');
+ }
+
+ captureStart = captureEnd = state.position;
+
+ } else if (is_EOL(ch)) {
+ captureSegment(state, captureStart, captureEnd, true);
+ writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
+ captureStart = captureEnd = state.position;
+
+ } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
+ throwError(state, 'unexpected end of the document within a double quoted scalar');
+
+ } else {
+ state.position++;
+ captureEnd = state.position;
+ }
+ }
+
+ throwError(state, 'unexpected end of the stream within a double quoted scalar');
+}
+
+function readFlowCollection(state, nodeIndent) {
+ var readNext = true,
+ _line,
+ _lineStart,
+ _pos,
+ _tag = state.tag,
+ _result,
+ _anchor = state.anchor,
+ following,
+ terminator,
+ isPair,
+ isExplicitPair,
+ isMapping,
+ overridableKeys = Object.create(null),
+ keyNode,
+ keyTag,
+ valueNode,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch === 0x5B/* [ */) {
+ terminator = 0x5D;/* ] */
+ isMapping = false;
+ _result = [];
+ } else if (ch === 0x7B/* { */) {
+ terminator = 0x7D;/* } */
+ isMapping = true;
+ _result = {};
+ } else {
+ return false;
+ }
+
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = _result;
+ }
+
+ ch = state.input.charCodeAt(++state.position);
+
+ while (ch !== 0) {
+ skipSeparationSpace(state, true, nodeIndent);
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch === terminator) {
+ state.position++;
+ state.tag = _tag;
+ state.anchor = _anchor;
+ state.kind = isMapping ? 'mapping' : 'sequence';
+ state.result = _result;
+ return true;
+ } else if (!readNext) {
+ throwError(state, 'missed comma between flow collection entries');
+ } else if (ch === 0x2C/* , */) {
+ // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4
+ throwError(state, "expected the node content, but found ','");
+ }
+
+ keyTag = keyNode = valueNode = null;
+ isPair = isExplicitPair = false;
+
+ if (ch === 0x3F/* ? */) {
+ following = state.input.charCodeAt(state.position + 1);
+
+ if (is_WS_OR_EOL(following)) {
+ isPair = isExplicitPair = true;
+ state.position++;
+ skipSeparationSpace(state, true, nodeIndent);
+ }
+ }
+
+ _line = state.line; // Save the current line.
+ _lineStart = state.lineStart;
+ _pos = state.position;
+ composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
+ keyTag = state.tag;
+ keyNode = state.result;
+ skipSeparationSpace(state, true, nodeIndent);
+
+ ch = state.input.charCodeAt(state.position);
+
+ if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {
+ isPair = true;
+ ch = state.input.charCodeAt(++state.position);
+ skipSeparationSpace(state, true, nodeIndent);
+ composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
+ valueNode = state.result;
+ }
+
+ if (isMapping) {
+ storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);
+ } else if (isPair) {
+ _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));
+ } else {
+ _result.push(keyNode);
+ }
+
+ skipSeparationSpace(state, true, nodeIndent);
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch === 0x2C/* , */) {
+ readNext = true;
+ ch = state.input.charCodeAt(++state.position);
+ } else {
+ readNext = false;
+ }
+ }
+
+ throwError(state, 'unexpected end of the stream within a flow collection');
+}
+
+function readBlockScalar(state, nodeIndent) {
+ var captureStart,
+ folding,
+ chomping = CHOMPING_CLIP,
+ didReadContent = false,
+ detectedIndent = false,
+ textIndent = nodeIndent,
+ emptyLines = 0,
+ atMoreIndented = false,
+ tmp,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch === 0x7C/* | */) {
+ folding = false;
+ } else if (ch === 0x3E/* > */) {
+ folding = true;
+ } else {
+ return false;
+ }
+
+ state.kind = 'scalar';
+ state.result = '';
+
+ while (ch !== 0) {
+ ch = state.input.charCodeAt(++state.position);
+
+ if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {
+ if (CHOMPING_CLIP === chomping) {
+ chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;
+ } else {
+ throwError(state, 'repeat of a chomping mode identifier');
+ }
+
+ } else if ((tmp = fromDecimalCode(ch)) >= 0) {
+ if (tmp === 0) {
+ throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');
+ } else if (!detectedIndent) {
+ textIndent = nodeIndent + tmp - 1;
+ detectedIndent = true;
+ } else {
+ throwError(state, 'repeat of an indentation width identifier');
+ }
+
+ } else {
+ break;
+ }
+ }
+
+ if (is_WHITE_SPACE(ch)) {
+ do { ch = state.input.charCodeAt(++state.position); }
+ while (is_WHITE_SPACE(ch));
+
+ if (ch === 0x23/* # */) {
+ do { ch = state.input.charCodeAt(++state.position); }
+ while (!is_EOL(ch) && (ch !== 0));
+ }
+ }
+
+ while (ch !== 0) {
+ readLineBreak(state);
+ state.lineIndent = 0;
+
+ ch = state.input.charCodeAt(state.position);
+
+ while ((!detectedIndent || state.lineIndent < textIndent) &&
+ (ch === 0x20/* Space */)) {
+ state.lineIndent++;
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (!detectedIndent && state.lineIndent > textIndent) {
+ textIndent = state.lineIndent;
+ }
+
+ if (is_EOL(ch)) {
+ emptyLines++;
+ continue;
+ }
+
+ // End of the scalar.
+ if (state.lineIndent < textIndent) {
+
+ // Perform the chomping.
+ if (chomping === CHOMPING_KEEP) {
+ state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
+ } else if (chomping === CHOMPING_CLIP) {
+ if (didReadContent) { // i.e. only if the scalar is not empty.
+ state.result += '\n';
+ }
+ }
+
+ // Break this `while` cycle and go to the funciton's epilogue.
+ break;
+ }
+
+ // Folded style: use fancy rules to handle line breaks.
+ if (folding) {
+
+ // Lines starting with white space characters (more-indented lines) are not folded.
+ if (is_WHITE_SPACE(ch)) {
+ atMoreIndented = true;
+ // except for the first content line (cf. Example 8.1)
+ state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
+
+ // End of more-indented block.
+ } else if (atMoreIndented) {
+ atMoreIndented = false;
+ state.result += common.repeat('\n', emptyLines + 1);
+
+ // Just one line break - perceive as the same line.
+ } else if (emptyLines === 0) {
+ if (didReadContent) { // i.e. only if we have already read some scalar content.
+ state.result += ' ';
+ }
+
+ // Several line breaks - perceive as different lines.
+ } else {
+ state.result += common.repeat('\n', emptyLines);
+ }
+
+ // Literal style: just add exact number of line breaks between content lines.
+ } else {
+ // Keep all line breaks except the header line break.
+ state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines);
+ }
+
+ didReadContent = true;
+ detectedIndent = true;
+ emptyLines = 0;
+ captureStart = state.position;
+
+ while (!is_EOL(ch) && (ch !== 0)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ captureSegment(state, captureStart, state.position, false);
+ }
+
+ return true;
+}
+
+function readBlockSequence(state, nodeIndent) {
+ var _line,
+ _tag = state.tag,
+ _anchor = state.anchor,
+ _result = [],
+ following,
+ detected = false,
+ ch;
+
+ // there is a leading tab before this token, so it can't be a block sequence/mapping;
+ // it can still be flow sequence/mapping or a scalar
+ if (state.firstTabInLine !== -1) return false;
+
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = _result;
+ }
+
+ ch = state.input.charCodeAt(state.position);
+
+ while (ch !== 0) {
+ if (state.firstTabInLine !== -1) {
+ state.position = state.firstTabInLine;
+ throwError(state, 'tab characters must not be used in indentation');
+ }
+
+ if (ch !== 0x2D/* - */) {
+ break;
+ }
+
+ following = state.input.charCodeAt(state.position + 1);
+
+ if (!is_WS_OR_EOL(following)) {
+ break;
+ }
+
+ detected = true;
+ state.position++;
+
+ if (skipSeparationSpace(state, true, -1)) {
+ if (state.lineIndent <= nodeIndent) {
+ _result.push(null);
+ ch = state.input.charCodeAt(state.position);
+ continue;
+ }
+ }
+
+ _line = state.line;
+ composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
+ _result.push(state.result);
+ skipSeparationSpace(state, true, -1);
+
+ ch = state.input.charCodeAt(state.position);
+
+ if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {
+ throwError(state, 'bad indentation of a sequence entry');
+ } else if (state.lineIndent < nodeIndent) {
+ break;
+ }
+ }
+
+ if (detected) {
+ state.tag = _tag;
+ state.anchor = _anchor;
+ state.kind = 'sequence';
+ state.result = _result;
+ return true;
+ }
+ return false;
+}
+
+function readBlockMapping(state, nodeIndent, flowIndent) {
+ var following,
+ allowCompact,
+ _line,
+ _keyLine,
+ _keyLineStart,
+ _keyPos,
+ _tag = state.tag,
+ _anchor = state.anchor,
+ _result = {},
+ overridableKeys = Object.create(null),
+ keyTag = null,
+ keyNode = null,
+ valueNode = null,
+ atExplicitKey = false,
+ detected = false,
+ ch;
+
+ // there is a leading tab before this token, so it can't be a block sequence/mapping;
+ // it can still be flow sequence/mapping or a scalar
+ if (state.firstTabInLine !== -1) return false;
+
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = _result;
+ }
+
+ ch = state.input.charCodeAt(state.position);
+
+ while (ch !== 0) {
+ if (!atExplicitKey && state.firstTabInLine !== -1) {
+ state.position = state.firstTabInLine;
+ throwError(state, 'tab characters must not be used in indentation');
+ }
+
+ following = state.input.charCodeAt(state.position + 1);
+ _line = state.line; // Save the current line.
+
+ //
+ // Explicit notation case. There are two separate blocks:
+ // first for the key (denoted by "?") and second for the value (denoted by ":")
+ //
+ if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {
+
+ if (ch === 0x3F/* ? */) {
+ if (atExplicitKey) {
+ storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
+ keyTag = keyNode = valueNode = null;
+ }
+
+ detected = true;
+ atExplicitKey = true;
+ allowCompact = true;
+
+ } else if (atExplicitKey) {
+ // i.e. 0x3A/* : */ === character after the explicit key.
+ atExplicitKey = false;
+ allowCompact = true;
+
+ } else {
+ throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');
+ }
+
+ state.position += 1;
+ ch = following;
+
+ //
+ // Implicit notation case. Flow-style node as the key first, then ":", and the value.
+ //
+ } else {
+ _keyLine = state.line;
+ _keyLineStart = state.lineStart;
+ _keyPos = state.position;
+
+ if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
+ // Neither implicit nor explicit notation.
+ // Reading is done. Go to the epilogue.
+ break;
+ }
+
+ if (state.line === _line) {
+ ch = state.input.charCodeAt(state.position);
+
+ while (is_WHITE_SPACE(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (ch === 0x3A/* : */) {
+ ch = state.input.charCodeAt(++state.position);
+
+ if (!is_WS_OR_EOL(ch)) {
+ throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');
+ }
+
+ if (atExplicitKey) {
+ storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
+ keyTag = keyNode = valueNode = null;
+ }
+
+ detected = true;
+ atExplicitKey = false;
+ allowCompact = false;
+ keyTag = state.tag;
+ keyNode = state.result;
+
+ } else if (detected) {
+ throwError(state, 'can not read an implicit mapping pair; a colon is missed');
+
+ } else {
+ state.tag = _tag;
+ state.anchor = _anchor;
+ return true; // Keep the result of `composeNode`.
+ }
+
+ } else if (detected) {
+ throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');
+
+ } else {
+ state.tag = _tag;
+ state.anchor = _anchor;
+ return true; // Keep the result of `composeNode`.
+ }
+ }
+
+ //
+ // Common reading code for both explicit and implicit notations.
+ //
+ if (state.line === _line || state.lineIndent > nodeIndent) {
+ if (atExplicitKey) {
+ _keyLine = state.line;
+ _keyLineStart = state.lineStart;
+ _keyPos = state.position;
+ }
+
+ if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
+ if (atExplicitKey) {
+ keyNode = state.result;
+ } else {
+ valueNode = state.result;
+ }
+ }
+
+ if (!atExplicitKey) {
+ storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);
+ keyTag = keyNode = valueNode = null;
+ }
+
+ skipSeparationSpace(state, true, -1);
+ ch = state.input.charCodeAt(state.position);
+ }
+
+ if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {
+ throwError(state, 'bad indentation of a mapping entry');
+ } else if (state.lineIndent < nodeIndent) {
+ break;
+ }
+ }
+
+ //
+ // Epilogue.
+ //
+
+ // Special case: last mapping's node contains only the key in explicit notation.
+ if (atExplicitKey) {
+ storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
+ }
+
+ // Expose the resulting mapping.
+ if (detected) {
+ state.tag = _tag;
+ state.anchor = _anchor;
+ state.kind = 'mapping';
+ state.result = _result;
+ }
+
+ return detected;
+}
+
+function readTagProperty(state) {
+ var _position,
+ isVerbatim = false,
+ isNamed = false,
+ tagHandle,
+ tagName,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch !== 0x21/* ! */) return false;
+
+ if (state.tag !== null) {
+ throwError(state, 'duplication of a tag property');
+ }
+
+ ch = state.input.charCodeAt(++state.position);
+
+ if (ch === 0x3C/* < */) {
+ isVerbatim = true;
+ ch = state.input.charCodeAt(++state.position);
+
+ } else if (ch === 0x21/* ! */) {
+ isNamed = true;
+ tagHandle = '!!';
+ ch = state.input.charCodeAt(++state.position);
+
+ } else {
+ tagHandle = '!';
+ }
+
+ _position = state.position;
+
+ if (isVerbatim) {
+ do { ch = state.input.charCodeAt(++state.position); }
+ while (ch !== 0 && ch !== 0x3E/* > */);
+
+ if (state.position < state.length) {
+ tagName = state.input.slice(_position, state.position);
+ ch = state.input.charCodeAt(++state.position);
+ } else {
+ throwError(state, 'unexpected end of the stream within a verbatim tag');
+ }
+ } else {
+ while (ch !== 0 && !is_WS_OR_EOL(ch)) {
+
+ if (ch === 0x21/* ! */) {
+ if (!isNamed) {
+ tagHandle = state.input.slice(_position - 1, state.position + 1);
+
+ if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
+ throwError(state, 'named tag handle cannot contain such characters');
+ }
+
+ isNamed = true;
+ _position = state.position + 1;
+ } else {
+ throwError(state, 'tag suffix cannot contain exclamation marks');
+ }
+ }
+
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ tagName = state.input.slice(_position, state.position);
+
+ if (PATTERN_FLOW_INDICATORS.test(tagName)) {
+ throwError(state, 'tag suffix cannot contain flow indicator characters');
+ }
+ }
+
+ if (tagName && !PATTERN_TAG_URI.test(tagName)) {
+ throwError(state, 'tag name cannot contain such characters: ' + tagName);
+ }
+
+ try {
+ tagName = decodeURIComponent(tagName);
+ } catch (err) {
+ throwError(state, 'tag name is malformed: ' + tagName);
+ }
+
+ if (isVerbatim) {
+ state.tag = tagName;
+
+ } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) {
+ state.tag = state.tagMap[tagHandle] + tagName;
+
+ } else if (tagHandle === '!') {
+ state.tag = '!' + tagName;
+
+ } else if (tagHandle === '!!') {
+ state.tag = 'tag:yaml.org,2002:' + tagName;
+
+ } else {
+ throwError(state, 'undeclared tag handle "' + tagHandle + '"');
+ }
+
+ return true;
+}
+
+function readAnchorProperty(state) {
+ var _position,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch !== 0x26/* & */) return false;
+
+ if (state.anchor !== null) {
+ throwError(state, 'duplication of an anchor property');
+ }
+
+ ch = state.input.charCodeAt(++state.position);
+ _position = state.position;
+
+ while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (state.position === _position) {
+ throwError(state, 'name of an anchor node must contain at least one character');
+ }
+
+ state.anchor = state.input.slice(_position, state.position);
+ return true;
+}
+
+function readAlias(state) {
+ var _position, alias,
+ ch;
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (ch !== 0x2A/* * */) return false;
+
+ ch = state.input.charCodeAt(++state.position);
+ _position = state.position;
+
+ while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (state.position === _position) {
+ throwError(state, 'name of an alias node must contain at least one character');
+ }
+
+ alias = state.input.slice(_position, state.position);
+
+ if (!_hasOwnProperty$1.call(state.anchorMap, alias)) {
+ throwError(state, 'unidentified alias "' + alias + '"');
+ }
+
+ state.result = state.anchorMap[alias];
+ skipSeparationSpace(state, true, -1);
+ return true;
+}
+
+function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
+ var allowBlockStyles,
+ allowBlockScalars,
+ allowBlockCollections,
+ indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) {
+ indentStatus = 1;
+ } else if (state.lineIndent === parentIndent) {
+ indentStatus = 0;
+ } else if (state.lineIndent < parentIndent) {
+ indentStatus = -1;
+ }
+ }
+ }
+
+ if (indentStatus === 1) {
+ while (readTagProperty(state) || readAnchorProperty(state)) {
+ if (skipSeparationSpace(state, true, -1)) {
+ atNewLine = true;
+ allowBlockCollections = allowBlockStyles;
+
+ if (state.lineIndent > parentIndent) {
+ indentStatus = 1;
+ } else if (state.lineIndent === parentIndent) {
+ indentStatus = 0;
+ } else if (state.lineIndent < parentIndent) {
+ indentStatus = -1;
+ }
+ } else {
+ allowBlockCollections = false;
+ }
+ }
+ }
+
+ if (allowBlockCollections) {
+ allowBlockCollections = atNewLine || allowCompact;
+ }
+
+ if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
+ if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
+ flowIndent = parentIndent;
+ } else {
+ flowIndent = parentIndent + 1;
+ }
+
+ blockIndent = state.position - state.lineStart;
+
+ if (indentStatus === 1) {
+ if (allowBlockCollections &&
+ (readBlockSequence(state, blockIndent) ||
+ readBlockMapping(state, blockIndent, flowIndent)) ||
+ readFlowCollection(state, flowIndent)) {
+ hasContent = true;
+ } else {
+ if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||
+ readSingleQuotedScalar(state, flowIndent) ||
+ readDoubleQuotedScalar(state, flowIndent)) {
+ hasContent = true;
+
+ } else if (readAlias(state)) {
+ hasContent = true;
+
+ if (state.tag !== null || state.anchor !== null) {
+ throwError(state, 'alias node should not have any properties');
+ }
+
+ } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
+ hasContent = true;
+
+ if (state.tag === null) {
+ state.tag = '?';
+ }
+ }
+
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = state.result;
+ }
+ }
+ } else if (indentStatus === 0) {
+ // Special case: block sequences are allowed to have same indentation level as the parent.
+ // http://www.yaml.org/spec/1.2/spec.html#id2799784
+ hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
+ }
+ }
+
+ if (state.tag === null) {
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = state.result;
+ }
+
+ } else if (state.tag === '?') {
+ // Implicit resolving is not allowed for non-scalar types, and '?'
+ // non-specific tag is only automatically assigned to plain scalars.
+ //
+ // We only need to check kind conformity in case user explicitly assigns '?'
+ // tag, for example like this: "!> [0]"
+ //
+ if (state.result !== null && state.kind !== 'scalar') {
+ throwError(state, 'unacceptable node kind for !> tag; it should be "scalar", not "' + state.kind + '"');
+ }
+
+ for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
+ type = state.implicitTypes[typeIndex];
+
+ if (type.resolve(state.result)) { // `state.result` updated in resolver if matched
+ state.result = type.construct(state.result);
+ state.tag = type.tag;
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = state.result;
+ }
+ break;
+ }
+ }
+ } else if (state.tag !== '!') {
+ if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) {
+ type = state.typeMap[state.kind || 'fallback'][state.tag];
+ } else {
+ // looking for multi type
+ type = null;
+ typeList = state.typeMap.multi[state.kind || 'fallback'];
+
+ for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {
+ if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
+ type = typeList[typeIndex];
+ break;
+ }
+ }
+ }
+
+ if (!type) {
+ throwError(state, 'unknown tag !<' + state.tag + '>');
+ }
+
+ if (state.result !== null && type.kind !== state.kind) {
+ throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"');
+ }
+
+ if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched
+ throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');
+ } else {
+ state.result = type.construct(state.result, state.tag);
+ if (state.anchor !== null) {
+ state.anchorMap[state.anchor] = state.result;
+ }
+ }
+ }
+
+ if (state.listener !== null) {
+ state.listener('close', state);
+ }
+ return state.tag !== null || state.anchor !== null || hasContent;
+}
+
+function readDocument(state) {
+ var documentStart = state.position,
+ _position,
+ directiveName,
+ directiveArgs,
+ hasDirectives = false,
+ ch;
+
+ state.version = null;
+ state.checkLineBreaks = state.legacy;
+ state.tagMap = Object.create(null);
+ state.anchorMap = Object.create(null);
+
+ while ((ch = state.input.charCodeAt(state.position)) !== 0) {
+ skipSeparationSpace(state, true, -1);
+
+ ch = state.input.charCodeAt(state.position);
+
+ if (state.lineIndent > 0 || ch !== 0x25/* % */) {
+ break;
+ }
+
+ hasDirectives = true;
+ ch = state.input.charCodeAt(++state.position);
+ _position = state.position;
+
+ while (ch !== 0 && !is_WS_OR_EOL(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ directiveName = state.input.slice(_position, state.position);
+ directiveArgs = [];
+
+ if (directiveName.length < 1) {
+ throwError(state, 'directive name must not be less than one character in length');
+ }
+
+ while (ch !== 0) {
+ while (is_WHITE_SPACE(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ if (ch === 0x23/* # */) {
+ do { ch = state.input.charCodeAt(++state.position); }
+ while (ch !== 0 && !is_EOL(ch));
+ break;
+ }
+
+ if (is_EOL(ch)) break;
+
+ _position = state.position;
+
+ while (ch !== 0 && !is_WS_OR_EOL(ch)) {
+ ch = state.input.charCodeAt(++state.position);
+ }
+
+ directiveArgs.push(state.input.slice(_position, state.position));
+ }
+
+ if (ch !== 0) readLineBreak(state);
+
+ if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) {
+ directiveHandlers[directiveName](state, directiveName, directiveArgs);
+ } else {
+ throwWarning(state, 'unknown document directive "' + directiveName + '"');
+ }
+ }
+
+ skipSeparationSpace(state, true, -1);
+
+ if (state.lineIndent === 0 &&
+ state.input.charCodeAt(state.position) === 0x2D/* - */ &&
+ state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&
+ state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {
+ state.position += 3;
+ skipSeparationSpace(state, true, -1);
+
+ } else if (hasDirectives) {
+ throwError(state, 'directives end mark is expected');
+ }
+
+ composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
+ skipSeparationSpace(state, true, -1);
+
+ if (state.checkLineBreaks &&
+ PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
+ throwWarning(state, 'non-ASCII line breaks are interpreted as content');
+ }
+
+ state.documents.push(state.result);
+
+ if (state.position === state.lineStart && testDocumentSeparator(state)) {
+
+ if (state.input.charCodeAt(state.position) === 0x2E/* . */) {
+ state.position += 3;
+ skipSeparationSpace(state, true, -1);
+ }
+ return;
+ }
+
+ if (state.position < (state.length - 1)) {
+ throwError(state, 'end of the stream or a document separator is expected');
+ } else {
+ return;
+ }
+}
+
+
+function loadDocuments(input, options) {
+ input = String(input);
+ options = options || {};
+
+ if (input.length !== 0) {
+
+ // Add tailing `\n` if not exists
+ if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&
+ input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {
+ input += '\n';
+ }
+
+ // Strip BOM
+ if (input.charCodeAt(0) === 0xFEFF) {
+ input = input.slice(1);
+ }
+ }
+
+ var state = new State$1(input, options);
+
+ var nullpos = input.indexOf('\0');
+
+ if (nullpos !== -1) {
+ state.position = nullpos;
+ throwError(state, 'null byte is not allowed in input');
+ }
+
+ // Use 0 as string terminator. That significantly simplifies bounds check.
+ state.input += '\0';
+
+ while (state.input.charCodeAt(state.position) === 0x20/* Space */) {
+ state.lineIndent += 1;
+ state.position += 1;
+ }
+
+ while (state.position < (state.length - 1)) {
+ readDocument(state);
+ }
+
+ return state.documents;
+}
+
+
+function loadAll$1(input, iterator, options) {
+ if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {
+ options = iterator;
+ iterator = null;
+ }
+
+ var documents = loadDocuments(input, options);
+
+ if (typeof iterator !== 'function') {
+ return documents;
+ }
+
+ for (var index = 0, length = documents.length; index < length; index += 1) {
+ iterator(documents[index]);
+ }
+}
+
+
+function load$1(input, options) {
+ var documents = loadDocuments(input, options);
+
+ if (documents.length === 0) {
+ /*eslint-disable no-undefined*/
+ return undefined;
+ } else if (documents.length === 1) {
+ return documents[0];
+ }
+ throw new exception('expected a single document in the stream, but found more');
+}
+
+
+var loadAll_1 = loadAll$1;
+var load_1 = load$1;
+
+var loader = {
+ loadAll: loadAll_1,
+ load: load_1
+};
+
+/*eslint-disable no-use-before-define*/
+
+
+
+
+
+var _toString = Object.prototype.toString;
+var _hasOwnProperty = Object.prototype.hasOwnProperty;
+
+var CHAR_BOM = 0xFEFF;
+var CHAR_TAB = 0x09; /* Tab */
+var CHAR_LINE_FEED = 0x0A; /* LF */
+var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */
+var CHAR_SPACE = 0x20; /* Space */
+var CHAR_EXCLAMATION = 0x21; /* ! */
+var CHAR_DOUBLE_QUOTE = 0x22; /* " */
+var CHAR_SHARP = 0x23; /* # */
+var CHAR_PERCENT = 0x25; /* % */
+var CHAR_AMPERSAND = 0x26; /* & */
+var CHAR_SINGLE_QUOTE = 0x27; /* ' */
+var CHAR_ASTERISK = 0x2A; /* * */
+var CHAR_COMMA = 0x2C; /* , */
+var CHAR_MINUS = 0x2D; /* - */
+var CHAR_COLON = 0x3A; /* : */
+var CHAR_EQUALS = 0x3D; /* = */
+var CHAR_GREATER_THAN = 0x3E; /* > */
+var CHAR_QUESTION = 0x3F; /* ? */
+var CHAR_COMMERCIAL_AT = 0x40; /* @ */
+var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */
+var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */
+var CHAR_GRAVE_ACCENT = 0x60; /* ` */
+var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */
+var CHAR_VERTICAL_LINE = 0x7C; /* | */
+var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */
+
+var ESCAPE_SEQUENCES = {};
+
+ESCAPE_SEQUENCES[0x00] = '\\0';
+ESCAPE_SEQUENCES[0x07] = '\\a';
+ESCAPE_SEQUENCES[0x08] = '\\b';
+ESCAPE_SEQUENCES[0x09] = '\\t';
+ESCAPE_SEQUENCES[0x0A] = '\\n';
+ESCAPE_SEQUENCES[0x0B] = '\\v';
+ESCAPE_SEQUENCES[0x0C] = '\\f';
+ESCAPE_SEQUENCES[0x0D] = '\\r';
+ESCAPE_SEQUENCES[0x1B] = '\\e';
+ESCAPE_SEQUENCES[0x22] = '\\"';
+ESCAPE_SEQUENCES[0x5C] = '\\\\';
+ESCAPE_SEQUENCES[0x85] = '\\N';
+ESCAPE_SEQUENCES[0xA0] = '\\_';
+ESCAPE_SEQUENCES[0x2028] = '\\L';
+ESCAPE_SEQUENCES[0x2029] = '\\P';
+
+var DEPRECATED_BOOLEANS_SYNTAX = [
+ 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',
+ 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'
+];
+
+var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
+
+function compileStyleMap(schema, map) {
+ var result, keys, index, length, tag, style, type;
+
+ if (map === null) return {};
+
+ result = {};
+ keys = Object.keys(map);
+
+ for (index = 0, length = keys.length; index < length; index += 1) {
+ tag = keys[index];
+ style = String(map[tag]);
+
+ if (tag.slice(0, 2) === '!!') {
+ tag = 'tag:yaml.org,2002:' + tag.slice(2);
+ }
+ type = schema.compiledTypeMap['fallback'][tag];
+
+ if (type && _hasOwnProperty.call(type.styleAliases, style)) {
+ style = type.styleAliases[style];
+ }
+
+ result[tag] = style;
+ }
+
+ return result;
+}
+
+function encodeHex(character) {
+ var string, handle, length;
+
+ string = character.toString(16).toUpperCase();
+
+ if (character <= 0xFF) {
+ handle = 'x';
+ length = 2;
+ } else if (character <= 0xFFFF) {
+ handle = 'u';
+ length = 4;
+ } else if (character <= 0xFFFFFFFF) {
+ handle = 'U';
+ length = 8;
+ } else {
+ throw new exception('code point within a string may not be greater than 0xFFFFFFFF');
+ }
+
+ return '\\' + handle + common.repeat('0', length - string.length) + string;
+}
+
+
+var QUOTING_TYPE_SINGLE = 1,
+ QUOTING_TYPE_DOUBLE = 2;
+
+function State(options) {
+ this.schema = options['schema'] || _default;
+ this.indent = Math.max(1, (options['indent'] || 2));
+ this.noArrayIndent = options['noArrayIndent'] || false;
+ this.skipInvalid = options['skipInvalid'] || false;
+ this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);
+ this.styleMap = compileStyleMap(this.schema, options['styles'] || null);
+ this.sortKeys = options['sortKeys'] || false;
+ this.lineWidth = options['lineWidth'] || 80;
+ this.noRefs = options['noRefs'] || false;
+ this.noCompatMode = options['noCompatMode'] || false;
+ this.condenseFlow = options['condenseFlow'] || false;
+ this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;
+ this.forceQuotes = options['forceQuotes'] || false;
+ this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null;
+
+ this.implicitTypes = this.schema.compiledImplicit;
+ this.explicitTypes = this.schema.compiledExplicit;
+
+ this.tag = null;
+ this.result = '';
+
+ this.duplicates = [];
+ this.usedDuplicates = null;
+}
+
+// Indents every line in a string. Empty lines (\n only) are not indented.
+function indentString(string, spaces) {
+ var ind = common.repeat(' ', spaces),
+ position = 0,
+ next = -1,
+ result = '',
+ line,
+ length = string.length;
+
+ while (position < length) {
+ next = string.indexOf('\n', position);
+ if (next === -1) {
+ line = string.slice(position);
+ position = length;
+ } else {
+ line = string.slice(position, next + 1);
+ position = next + 1;
+ }
+
+ if (line.length && line !== '\n') result += ind;
+
+ result += line;
+ }
+
+ return result;
+}
+
+function generateNextLine(state, level) {
+ return '\n' + common.repeat(' ', state.indent * level);
+}
+
+function testImplicitResolving(state, str) {
+ var index, length, type;
+
+ for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {
+ type = state.implicitTypes[index];
+
+ if (type.resolve(str)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+// [33] s-white ::= s-space | s-tab
+function isWhitespace(c) {
+ return c === CHAR_SPACE || c === CHAR_TAB;
+}
+
+// Returns true if the character can be printed without escaping.
+// From YAML 1.2: "any allowed characters known to be non-printable
+// should also be escaped. [However,] This isn’t mandatory"
+// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029.
+function isPrintable(c) {
+ return (0x00020 <= c && c <= 0x00007E)
+ || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)
+ || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM)
+ || (0x10000 <= c && c <= 0x10FFFF);
+}
+
+// [34] ns-char ::= nb-char - s-white
+// [27] nb-char ::= c-printable - b-char - c-byte-order-mark
+// [26] b-char ::= b-line-feed | b-carriage-return
+// Including s-white (for some reason, examples doesn't match specs in this aspect)
+// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark
+function isNsCharOrWhitespace(c) {
+ return isPrintable(c)
+ && c !== CHAR_BOM
+ // - b-char
+ && c !== CHAR_CARRIAGE_RETURN
+ && c !== CHAR_LINE_FEED;
+}
+
+// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out
+// c = flow-in ⇒ ns-plain-safe-in
+// c = block-key ⇒ ns-plain-safe-out
+// c = flow-key ⇒ ns-plain-safe-in
+// [128] ns-plain-safe-out ::= ns-char
+// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator
+// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” )
+// | ( /* An ns-char preceding */ “#” )
+// | ( “:” /* Followed by an ns-plain-safe(c) */ )
+function isPlainSafe(c, prev, inblock) {
+ var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);
+ var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);
+ return (
+ // ns-plain-safe
+ inblock ? // c = flow-in
+ cIsNsCharOrWhitespace
+ : cIsNsCharOrWhitespace
+ // - c-flow-indicator
+ && c !== CHAR_COMMA
+ && c !== CHAR_LEFT_SQUARE_BRACKET
+ && c !== CHAR_RIGHT_SQUARE_BRACKET
+ && c !== CHAR_LEFT_CURLY_BRACKET
+ && c !== CHAR_RIGHT_CURLY_BRACKET
+ )
+ // ns-plain-char
+ && c !== CHAR_SHARP // false on '#'
+ && !(prev === CHAR_COLON && !cIsNsChar) // false on ': '
+ || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#'
+ || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]'
+}
+
+// Simplified test for values allowed as the first character in plain style.
+function isPlainSafeFirst(c) {
+ // Uses a subset of ns-char - c-indicator
+ // where ns-char = nb-char - s-white.
+ // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part
+ return isPrintable(c) && c !== CHAR_BOM
+ && !isWhitespace(c) // - s-white
+ // - (c-indicator ::=
+ // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”
+ && c !== CHAR_MINUS
+ && c !== CHAR_QUESTION
+ && c !== CHAR_COLON
+ && c !== CHAR_COMMA
+ && c !== CHAR_LEFT_SQUARE_BRACKET
+ && c !== CHAR_RIGHT_SQUARE_BRACKET
+ && c !== CHAR_LEFT_CURLY_BRACKET
+ && c !== CHAR_RIGHT_CURLY_BRACKET
+ // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"”
+ && c !== CHAR_SHARP
+ && c !== CHAR_AMPERSAND
+ && c !== CHAR_ASTERISK
+ && c !== CHAR_EXCLAMATION
+ && c !== CHAR_VERTICAL_LINE
+ && c !== CHAR_EQUALS
+ && c !== CHAR_GREATER_THAN
+ && c !== CHAR_SINGLE_QUOTE
+ && c !== CHAR_DOUBLE_QUOTE
+ // | “%” | “@” | “`”)
+ && c !== CHAR_PERCENT
+ && c !== CHAR_COMMERCIAL_AT
+ && c !== CHAR_GRAVE_ACCENT;
+}
+
+// Simplified test for values allowed as the last character in plain style.
+function isPlainSafeLast(c) {
+ // just not whitespace or colon, it will be checked to be plain character later
+ return !isWhitespace(c) && c !== CHAR_COLON;
+}
+
+// Same as 'string'.codePointAt(pos), but works in older browsers.
+function codePointAt(string, pos) {
+ var first = string.charCodeAt(pos), second;
+ if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) {
+ second = string.charCodeAt(pos + 1);
+ if (second >= 0xDC00 && second <= 0xDFFF) {
+ // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
+ return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
+ }
+ }
+ return first;
+}
+
+// Determines whether block indentation indicator is required.
+function needIndentIndicator(string) {
+ var leadingSpaceRe = /^\n* /;
+ return leadingSpaceRe.test(string);
+}
+
+var STYLE_PLAIN = 1,
+ STYLE_SINGLE = 2,
+ STYLE_LITERAL = 3,
+ STYLE_FOLDED = 4,
+ STYLE_DOUBLE = 5;
+
+// Determines which scalar styles are possible and returns the preferred style.
+// lineWidth = -1 => no limit.
+// Pre-conditions: str.length > 0.
+// Post-conditions:
+// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string.
+// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).
+// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).
+function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth,
+ testAmbiguousType, quotingType, forceQuotes, inblock) {
+
+ var i;
+ var char = 0;
+ var prevChar = null;
+ var hasLineBreak = false;
+ var hasFoldableLine = false; // only checked if shouldTrackWidth
+ var shouldTrackWidth = lineWidth !== -1;
+ var previousLineBreak = -1; // count the first line correctly
+ var plain = isPlainSafeFirst(codePointAt(string, 0))
+ && isPlainSafeLast(codePointAt(string, string.length - 1));
+
+ if (singleLineOnly || forceQuotes) {
+ // Case: no block styles.
+ // Check for disallowed characters to rule out plain and single.
+ for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {
+ char = codePointAt(string, i);
+ if (!isPrintable(char)) {
+ return STYLE_DOUBLE;
+ }
+ plain = plain && isPlainSafe(char, prevChar, inblock);
+ prevChar = char;
+ }
+ } else {
+ // Case: block styles permitted.
+ for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {
+ char = codePointAt(string, i);
+ if (char === CHAR_LINE_FEED) {
+ hasLineBreak = true;
+ // Check if any line can be folded.
+ if (shouldTrackWidth) {
+ hasFoldableLine = hasFoldableLine ||
+ // Foldable line = too long, and not more-indented.
+ (i - previousLineBreak - 1 > lineWidth &&
+ string[previousLineBreak + 1] !== ' ');
+ previousLineBreak = i;
+ }
+ } else if (!isPrintable(char)) {
+ return STYLE_DOUBLE;
+ }
+ plain = plain && isPlainSafe(char, prevChar, inblock);
+ prevChar = char;
+ }
+ // in case the end is missing a \n
+ hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&
+ (i - previousLineBreak - 1 > lineWidth &&
+ string[previousLineBreak + 1] !== ' '));
+ }
+ // Although every style can represent \n without escaping, prefer block styles
+ // for multiline, since they're more readable and they don't add empty lines.
+ // Also prefer folding a super-long line.
+ if (!hasLineBreak && !hasFoldableLine) {
+ // Strings interpretable as another type have to be quoted;
+ // e.g. the string 'true' vs. the boolean true.
+ if (plain && !forceQuotes && !testAmbiguousType(string)) {
+ return STYLE_PLAIN;
+ }
+ return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
+ }
+ // Edge case: block indentation indicator can only have one digit.
+ if (indentPerLevel > 9 && needIndentIndicator(string)) {
+ return STYLE_DOUBLE;
+ }
+ // At this point we know block styles are valid.
+ // Prefer literal style unless we want to fold.
+ if (!forceQuotes) {
+ return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
+ }
+ return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
+}
+
+// Note: line breaking/folding is implemented for only the folded style.
+// NB. We drop the last trailing newline (if any) of a returned block scalar
+// since the dumper adds its own newline. This always works:
+// • No ending newline => unaffected; already using strip "-" chomping.
+// • Ending newline => removed then restored.
+// Importantly, this keeps the "+" chomp indicator from gaining an extra line.
+function writeScalar(state, string, level, iskey, inblock) {
+ state.dump = (function () {
+ if (string.length === 0) {
+ return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''";
+ }
+ if (!state.noCompatMode) {
+ if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {
+ return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'");
+ }
+ }
+
+ var indent = state.indent * Math.max(1, level); // no 0-indent scalars
+ // As indentation gets deeper, let the width decrease monotonically
+ // to the lower bound min(state.lineWidth, 40).
+ // Note that this implies
+ // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.
+ // state.lineWidth > 40 + state.indent: width decreases until the lower bound.
+ // This behaves better than a constant minimum width which disallows narrower options,
+ // or an indent threshold which causes the width to suddenly increase.
+ var lineWidth = state.lineWidth === -1
+ ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
+
+ // Without knowing if keys are implicit/explicit, assume implicit for safety.
+ var singleLineOnly = iskey
+ // No block styles in flow mode.
+ || (state.flowLevel > -1 && level >= state.flowLevel);
+ function testAmbiguity(string) {
+ return testImplicitResolving(state, string);
+ }
+
+ switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth,
+ testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {
+
+ case STYLE_PLAIN:
+ return string;
+ case STYLE_SINGLE:
+ return "'" + string.replace(/'/g, "''") + "'";
+ case STYLE_LITERAL:
+ return '|' + blockHeader(string, state.indent)
+ + dropEndingNewline(indentString(string, indent));
+ case STYLE_FOLDED:
+ return '>' + blockHeader(string, state.indent)
+ + dropEndingNewline(indentString(foldString(string, lineWidth), indent));
+ case STYLE_DOUBLE:
+ return '"' + escapeString(string) + '"';
+ default:
+ throw new exception('impossible error: invalid scalar style');
+ }
+ }());
+}
+
+// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.
+function blockHeader(string, indentPerLevel) {
+ var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';
+
+ // note the special case: the string '\n' counts as a "trailing" empty line.
+ var clip = string[string.length - 1] === '\n';
+ var keep = clip && (string[string.length - 2] === '\n' || string === '\n');
+ var chomp = keep ? '+' : (clip ? '' : '-');
+
+ return indentIndicator + chomp + '\n';
+}
+
+// (See the note for writeScalar.)
+function dropEndingNewline(string) {
+ return string[string.length - 1] === '\n' ? string.slice(0, -1) : string;
+}
+
+// Note: a long line without a suitable break point will exceed the width limit.
+// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.
+function foldString(string, width) {
+ // In folded style, $k$ consecutive newlines output as $k+1$ newlines—
+ // unless they're before or after a more-indented line, or at the very
+ // beginning or end, in which case $k$ maps to $k$.
+ // Therefore, parse each chunk as newline(s) followed by a content line.
+ var lineRe = /(\n+)([^\n]*)/g;
+
+ // first line (possibly an empty line)
+ var result = (function () {
+ var nextLF = string.indexOf('\n');
+ nextLF = nextLF !== -1 ? nextLF : string.length;
+ lineRe.lastIndex = nextLF;
+ return foldLine(string.slice(0, nextLF), width);
+ }());
+ // If we haven't reached the first content line yet, don't add an extra \n.
+ var prevMoreIndented = string[0] === '\n' || string[0] === ' ';
+ var moreIndented;
+
+ // rest of the lines
+ var match;
+ while ((match = lineRe.exec(string))) {
+ var prefix = match[1], line = match[2];
+ moreIndented = (line[0] === ' ');
+ result += prefix
+ + (!prevMoreIndented && !moreIndented && line !== ''
+ ? '\n' : '')
+ + foldLine(line, width);
+ prevMoreIndented = moreIndented;
+ }
+
+ return result;
+}
+
+// Greedy line breaking.
+// Picks the longest line under the limit each time,
+// otherwise settles for the shortest line over the limit.
+// NB. More-indented lines *cannot* be folded, as that would add an extra \n.
+function foldLine(line, width) {
+ if (line === '' || line[0] === ' ') return line;
+
+ // Since a more-indented line adds a \n, breaks can't be followed by a space.
+ var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.
+ var match;
+ // start is an inclusive index. end, curr, and next are exclusive.
+ var start = 0, end, curr = 0, next = 0;
+ var result = '';
+
+ // Invariants: 0 <= start <= length-1.
+ // 0 <= curr <= next <= max(0, length-2). curr - start <= width.
+ // Inside the loop:
+ // A match implies length >= 2, so curr and next are <= length-2.
+ while ((match = breakRe.exec(line))) {
+ next = match.index;
+ // maintain invariant: curr - start <= width
+ if (next - start > width) {
+ end = (curr > start) ? curr : next; // derive end <= length-2
+ result += '\n' + line.slice(start, end);
+ // skip the space that was output as \n
+ start = end + 1; // derive start <= length-1
+ }
+ curr = next;
+ }
+
+ // By the invariants, start <= length-1, so there is something left over.
+ // It is either the whole string or a part starting from non-whitespace.
+ result += '\n';
+ // Insert a break if the remainder is too long and there is a break available.
+ if (line.length - start > width && curr > start) {
+ result += line.slice(start, curr) + '\n' + line.slice(curr + 1);
+ } else {
+ result += line.slice(start);
+ }
+
+ return result.slice(1); // drop extra \n joiner
+}
+
+// Escapes a double-quoted string.
+function escapeString(string) {
+ var result = '';
+ var char = 0;
+ var escapeSeq;
+
+ for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {
+ char = codePointAt(string, i);
+ escapeSeq = ESCAPE_SEQUENCES[char];
+
+ if (!escapeSeq && isPrintable(char)) {
+ result += string[i];
+ if (char >= 0x10000) result += string[i + 1];
+ } else {
+ result += escapeSeq || encodeHex(char);
+ }
+ }
+
+ return result;
+}
+
+function writeFlowSequence(state, level, object) {
+ var _result = '',
+ _tag = state.tag,
+ index,
+ length,
+ value;
+
+ for (index = 0, length = object.length; index < length; index += 1) {
+ value = object[index];
+
+ if (state.replacer) {
+ value = state.replacer.call(object, String(index), value);
+ }
+
+ // Write only valid elements, put null instead of invalid elements.
+ if (writeNode(state, level, value, false, false) ||
+ (typeof value === 'undefined' &&
+ writeNode(state, level, null, false, false))) {
+
+ if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '');
+ _result += state.dump;
+ }
+ }
+
+ state.tag = _tag;
+ state.dump = '[' + _result + ']';
+}
+
+function writeBlockSequence(state, level, object, compact) {
+ var _result = '',
+ _tag = state.tag,
+ index,
+ length,
+ value;
+
+ for (index = 0, length = object.length; index < length; index += 1) {
+ value = object[index];
+
+ if (state.replacer) {
+ value = state.replacer.call(object, String(index), value);
+ }
+
+ // Write only valid elements, put null instead of invalid elements.
+ if (writeNode(state, level + 1, value, true, true, false, true) ||
+ (typeof value === 'undefined' &&
+ writeNode(state, level + 1, null, true, true, false, true))) {
+
+ if (!compact || _result !== '') {
+ _result += generateNextLine(state, level);
+ }
+
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
+ _result += '-';
+ } else {
+ _result += '- ';
+ }
+
+ _result += state.dump;
+ }
+ }
+
+ state.tag = _tag;
+ state.dump = _result || '[]'; // Empty sequence if no valid values.
+}
+
+function writeFlowMapping(state, level, object) {
+ var _result = '',
+ _tag = state.tag,
+ objectKeyList = Object.keys(object),
+ index,
+ length,
+ objectKey,
+ objectValue,
+ pairBuffer;
+
+ for (index = 0, length = objectKeyList.length; index < length; index += 1) {
+
+ pairBuffer = '';
+ if (_result !== '') pairBuffer += ', ';
+
+ if (state.condenseFlow) pairBuffer += '"';
+
+ objectKey = objectKeyList[index];
+ objectValue = object[objectKey];
+
+ if (state.replacer) {
+ objectValue = state.replacer.call(object, objectKey, objectValue);
+ }
+
+ if (!writeNode(state, level, objectKey, false, false)) {
+ continue; // Skip this pair because of invalid key;
+ }
+
+ if (state.dump.length > 1024) pairBuffer += '? ';
+
+ pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' ');
+
+ if (!writeNode(state, level, objectValue, false, false)) {
+ continue; // Skip this pair because of invalid value.
+ }
+
+ pairBuffer += state.dump;
+
+ // Both key and value are valid.
+ _result += pairBuffer;
+ }
+
+ state.tag = _tag;
+ state.dump = '{' + _result + '}';
+}
+
+function writeBlockMapping(state, level, object, compact) {
+ var _result = '',
+ _tag = state.tag,
+ objectKeyList = Object.keys(object),
+ index,
+ length,
+ objectKey,
+ objectValue,
+ explicitPair,
+ pairBuffer;
+
+ // Allow sorting keys so that the output file is deterministic
+ if (state.sortKeys === true) {
+ // Default sorting
+ objectKeyList.sort();
+ } else if (typeof state.sortKeys === 'function') {
+ // Custom sort function
+ objectKeyList.sort(state.sortKeys);
+ } else if (state.sortKeys) {
+ // Something is wrong
+ throw new exception('sortKeys must be a boolean or a function');
+ }
+
+ for (index = 0, length = objectKeyList.length; index < length; index += 1) {
+ pairBuffer = '';
+
+ if (!compact || _result !== '') {
+ pairBuffer += generateNextLine(state, level);
+ }
+
+ objectKey = objectKeyList[index];
+ objectValue = object[objectKey];
+
+ if (state.replacer) {
+ objectValue = state.replacer.call(object, objectKey, objectValue);
+ }
+
+ if (!writeNode(state, level + 1, objectKey, true, true, true)) {
+ continue; // Skip this pair because of invalid key.
+ }
+
+ explicitPair = (state.tag !== null && state.tag !== '?') ||
+ (state.dump && state.dump.length > 1024);
+
+ if (explicitPair) {
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
+ pairBuffer += '?';
+ } else {
+ pairBuffer += '? ';
+ }
+ }
+
+ pairBuffer += state.dump;
+
+ if (explicitPair) {
+ pairBuffer += generateNextLine(state, level);
+ }
+
+ if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
+ continue; // Skip this pair because of invalid value.
+ }
+
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
+ pairBuffer += ':';
+ } else {
+ pairBuffer += ': ';
+ }
+
+ pairBuffer += state.dump;
+
+ // Both key and value are valid.
+ _result += pairBuffer;
+ }
+
+ state.tag = _tag;
+ state.dump = _result || '{}'; // Empty mapping if no valid pairs.
+}
+
+function detectType(state, object, explicit) {
+ var _result, typeList, index, length, type, style;
+
+ typeList = explicit ? state.explicitTypes : state.implicitTypes;
+
+ for (index = 0, length = typeList.length; index < length; index += 1) {
+ type = typeList[index];
+
+ if ((type.instanceOf || type.predicate) &&
+ (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&
+ (!type.predicate || type.predicate(object))) {
+
+ if (explicit) {
+ if (type.multi && type.representName) {
+ state.tag = type.representName(object);
+ } else {
+ state.tag = type.tag;
+ }
+ } else {
+ state.tag = '?';
+ }
+
+ if (type.represent) {
+ style = state.styleMap[type.tag] || type.defaultStyle;
+
+ if (_toString.call(type.represent) === '[object Function]') {
+ _result = type.represent(object, style);
+ } else if (_hasOwnProperty.call(type.represent, style)) {
+ _result = type.represent[style](object, style);
+ } else {
+ throw new exception('!<' + type.tag + '> tag resolver accepts not "' + style + '" style');
+ }
+
+ state.dump = _result;
+ }
+
+ return true;
+ }
+ }
+
+ return false;
+}
+
+// Serializes `object` and writes it to global `result`.
+// Returns true on success, or false on invalid object.
+//
+function writeNode(state, level, object, block, compact, iskey, isblockseq) {
+ state.tag = null;
+ state.dump = object;
+
+ if (!detectType(state, object, false)) {
+ detectType(state, object, true);
+ }
+
+ var type = _toString.call(state.dump);
+ var inblock = block;
+ var tagStr;
+
+ if (block) {
+ block = (state.flowLevel < 0 || state.flowLevel > level);
+ }
+
+ var objectOrArray = type === '[object Object]' || type === '[object Array]',
+ duplicateIndex,
+ duplicate;
+
+ if (objectOrArray) {
+ duplicateIndex = state.duplicates.indexOf(object);
+ duplicate = duplicateIndex !== -1;
+ }
+
+ if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {
+ compact = false;
+ }
+
+ if (duplicate && state.usedDuplicates[duplicateIndex]) {
+ state.dump = '*ref_' + duplicateIndex;
+ } else {
+ if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
+ state.usedDuplicates[duplicateIndex] = true;
+ }
+ if (type === '[object Object]') {
+ if (block && (Object.keys(state.dump).length !== 0)) {
+ writeBlockMapping(state, level, state.dump, compact);
+ if (duplicate) {
+ state.dump = '&ref_' + duplicateIndex + state.dump;
+ }
+ } else {
+ writeFlowMapping(state, level, state.dump);
+ if (duplicate) {
+ state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
+ }
+ }
+ } else if (type === '[object Array]') {
+ if (block && (state.dump.length !== 0)) {
+ if (state.noArrayIndent && !isblockseq && level > 0) {
+ writeBlockSequence(state, level - 1, state.dump, compact);
+ } else {
+ writeBlockSequence(state, level, state.dump, compact);
+ }
+ if (duplicate) {
+ state.dump = '&ref_' + duplicateIndex + state.dump;
+ }
+ } else {
+ writeFlowSequence(state, level, state.dump);
+ if (duplicate) {
+ state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
+ }
+ }
+ } else if (type === '[object String]') {
+ if (state.tag !== '?') {
+ writeScalar(state, state.dump, level, iskey, inblock);
+ }
+ } else if (type === '[object Undefined]') {
+ return false;
+ } else {
+ if (state.skipInvalid) return false;
+ throw new exception('unacceptable kind of an object to dump ' + type);
+ }
+
+ if (state.tag !== null && state.tag !== '?') {
+ // Need to encode all characters except those allowed by the spec:
+ //
+ // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */
+ // [36] ns-hex-digit ::= ns-dec-digit
+ // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */
+ // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */
+ // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-”
+ // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#”
+ // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,”
+ // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]”
+ //
+ // Also need to encode '!' because it has special meaning (end of tag prefix).
+ //
+ tagStr = encodeURI(
+ state.tag[0] === '!' ? state.tag.slice(1) : state.tag
+ ).replace(/!/g, '%21');
+
+ if (state.tag[0] === '!') {
+ tagStr = '!' + tagStr;
+ } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') {
+ tagStr = '!!' + tagStr.slice(18);
+ } else {
+ tagStr = '!<' + tagStr + '>';
+ }
+
+ state.dump = tagStr + ' ' + state.dump;
+ }
+ }
+
+ return true;
+}
+
+function getDuplicateReferences(object, state) {
+ var objects = [],
+ duplicatesIndexes = [],
+ index,
+ length;
+
+ inspectNode(object, objects, duplicatesIndexes);
+
+ for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {
+ state.duplicates.push(objects[duplicatesIndexes[index]]);
+ }
+ state.usedDuplicates = new Array(length);
+}
+
+function inspectNode(object, objects, duplicatesIndexes) {
+ var objectKeyList,
+ index,
+ length;
+
+ if (object !== null && typeof object === 'object') {
+ index = objects.indexOf(object);
+ if (index !== -1) {
+ if (duplicatesIndexes.indexOf(index) === -1) {
+ duplicatesIndexes.push(index);
+ }
+ } else {
+ objects.push(object);
+
+ if (Array.isArray(object)) {
+ for (index = 0, length = object.length; index < length; index += 1) {
+ inspectNode(object[index], objects, duplicatesIndexes);
+ }
+ } else {
+ objectKeyList = Object.keys(object);
+
+ for (index = 0, length = objectKeyList.length; index < length; index += 1) {
+ inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
+ }
+ }
+ }
+ }
+}
+
+function dump$1(input, options) {
+ options = options || {};
+
+ var state = new State(options);
+
+ if (!state.noRefs) getDuplicateReferences(input, state);
+
+ var value = input;
+
+ if (state.replacer) {
+ value = state.replacer.call({ '': value }, '', value);
+ }
+
+ if (writeNode(state, 0, value, true, true)) return state.dump + '\n';
+
+ return '';
+}
+
+var dump_1 = dump$1;
+
+var dumper = {
+ dump: dump_1
+};
+
+function renamed(from, to) {
+ return function () {
+ throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' +
+ 'Use yaml.' + to + ' instead, which is now safe by default.');
+ };
+}
+
+
+var Type = type;
+var Schema = schema;
+var FAILSAFE_SCHEMA = failsafe;
+var JSON_SCHEMA = json;
+var CORE_SCHEMA = core;
+var DEFAULT_SCHEMA = _default;
+var load = loader.load;
+var loadAll = loader.loadAll;
+var dump = dumper.dump;
+var YAMLException = exception;
+
+// Re-export all types in case user wants to create custom schema
+var types = {
+ binary: binary,
+ float: float,
+ map: map,
+ null: _null,
+ pairs: pairs,
+ set: set,
+ timestamp: timestamp,
+ bool: bool,
+ int: int,
+ merge: merge,
+ omap: omap,
+ seq: seq,
+ str: str
+};
+
+// Removed functions from JS-YAML 3.0.x
+var safeLoad = renamed('safeLoad', 'load');
+var safeLoadAll = renamed('safeLoadAll', 'loadAll');
+var safeDump = renamed('safeDump', 'dump');
+
+var jsYaml = {
+ Type: Type,
+ Schema: Schema,
+ FAILSAFE_SCHEMA: FAILSAFE_SCHEMA,
+ JSON_SCHEMA: JSON_SCHEMA,
+ CORE_SCHEMA: CORE_SCHEMA,
+ DEFAULT_SCHEMA: DEFAULT_SCHEMA,
+ load: load,
+ loadAll: loadAll,
+ dump: dump,
+ YAMLException: YAMLException,
+ types: types,
+ safeLoad: safeLoad,
+ safeLoadAll: safeLoadAll,
+ safeDump: safeDump
+};
+
+// Detect either spaces or tabs but not both to properly handle tabs for indentation and spaces for alignment
+const INDENT_REGEX = /^(?:( )+|\t+)/;
+
+const INDENT_TYPE_SPACE = 'space';
+const INDENT_TYPE_TAB = 'tab';
+
+/**
+Make a Map that counts how many indents/unindents have occurred for a given size and how many lines follow a given indentation.
+
+The key is a concatenation of the indentation type (s = space and t = tab) and the size of the indents/unindents.
+
+```
+indents = {
+ t3: [1, 0],
+ t4: [1, 5],
+ s5: [1, 0],
+ s12: [1, 0],
+}
+```
+*/
+function makeIndentsMap(string, ignoreSingleSpaces) {
+ const indents = new Map();
+
+ // Remember the size of previous line's indentation
+ let previousSize = 0;
+ let previousIndentType;
+
+ // Indents key (ident type + size of the indents/unindents)
+ let key;
+
+ for (const line of string.split(/\n/g)) {
+ if (!line) {
+ // Ignore empty lines
+ continue;
+ }
+
+ let indent;
+ let indentType;
+ let weight;
+ let entry;
+ const matches = line.match(INDENT_REGEX);
+
+ if (matches === null) {
+ previousSize = 0;
+ previousIndentType = '';
+ } else {
+ indent = matches[0].length;
+ indentType = matches[1] ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB;
+
+ // Ignore single space unless it's the only indent detected to prevent common false positives
+ if (ignoreSingleSpaces && indentType === INDENT_TYPE_SPACE && indent === 1) {
+ continue;
+ }
+
+ if (indentType !== previousIndentType) {
+ previousSize = 0;
+ }
+
+ previousIndentType = indentType;
+
+ weight = 0;
+
+ const indentDifference = indent - previousSize;
+ previousSize = indent;
+
+ // Previous line have same indent?
+ if (indentDifference === 0) {
+ weight++;
+ // We use the key from previous loop
+ } else {
+ const absoluteIndentDifference = indentDifference > 0 ? indentDifference : -indentDifference;
+ key = encodeIndentsKey(indentType, absoluteIndentDifference);
+ }
+
+ // Update the stats
+ entry = indents.get(key);
+ entry = entry === undefined ? [1, 0] : [++entry[0], entry[1] + weight];
+
+ indents.set(key, entry);
+ }
+ }
+
+ return indents;
+}
+
+// Encode the indent type and amount as a string (e.g. 's4') for use as a compound key in the indents Map.
+function encodeIndentsKey(indentType, indentAmount) {
+ const typeCharacter = indentType === INDENT_TYPE_SPACE ? 's' : 't';
+ return typeCharacter + String(indentAmount);
+}
+
+// Extract the indent type and amount from a key of the indents Map.
+function decodeIndentsKey(indentsKey) {
+ const keyHasTypeSpace = indentsKey[0] === 's';
+ const type = keyHasTypeSpace ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB;
+
+ const amount = Number(indentsKey.slice(1));
+
+ return {type, amount};
+}
+
+// Return the key (e.g. 's4') from the indents Map that represents the most common indent,
+// or return undefined if there are no indents.
+function getMostUsedKey(indents) {
+ let result;
+ let maxUsed = 0;
+ let maxWeight = 0;
+
+ for (const [key, [usedCount, weight]] of indents) {
+ if (usedCount > maxUsed || (usedCount === maxUsed && weight > maxWeight)) {
+ maxUsed = usedCount;
+ maxWeight = weight;
+ result = key;
+ }
+ }
+
+ return result;
+}
+
+function makeIndentString(type, amount) {
+ const indentCharacter = type === INDENT_TYPE_SPACE ? ' ' : '\t';
+ return indentCharacter.repeat(amount);
+}
+
+function detectIndent(string) {
+ if (typeof string !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ // Identify indents while skipping single space indents to avoid common edge cases (e.g. code comments)
+ // If no indents are identified, run again and include all indents for comprehensive detection
+ let indents = makeIndentsMap(string, true);
+ if (indents.size === 0) {
+ indents = makeIndentsMap(string, false);
+ }
+
+ const keyOfMostUsedIndent = getMostUsedKey(indents);
+
+ let type;
+ let amount = 0;
+ let indent = '';
+
+ if (keyOfMostUsedIndent !== undefined) {
+ ({type, amount} = decodeIndentsKey(keyOfMostUsedIndent));
+ indent = makeIndentString(type, amount);
+ }
+
+ return {
+ amount,
+ type,
+ indent,
+ };
+}
+
+const settingRegExp = /\/\*\s*@settings[\r\n]+?([\s\S]+?)\*\//g;
+const nameRegExp = /^name:\s*(.+)$/m;
+class CSSSettingsPlugin extends obsidian.Plugin {
+ constructor() {
+ super(...arguments);
+ this.settingsList = [];
+ this.errorList = [];
+ this.debounceTimer = 0;
+ }
+ onload() {
+ return __awaiter(this, void 0, void 0, function* () {
+ this.settingsManager = new CSSSettingsManager(this);
+ yield this.settingsManager.load();
+ this.settingsTab = new CSSSettingsTab(this.app, this);
+ this.addSettingTab(this.settingsTab);
+ this.registerView(viewType, (leaf) => new SettingsView(this, leaf));
+ this.addCommand({
+ id: "show-style-settings-leaf",
+ name: "Show style settings view",
+ callback: () => {
+ this.activateView();
+ },
+ });
+ this.registerEvent(this.app.workspace.on("css-change", () => {
+ this.parseCSS();
+ }));
+ this.registerEvent(this.app.workspace.on("parse-style-settings", () => {
+ this.parseCSS();
+ }));
+ document.body.classList.add("css-settings-manager");
+ this.parseCSS();
+ });
+ }
+ parseCSS() {
+ clearTimeout(this.debounceTimer);
+ this.settingsList = [];
+ this.errorList = [];
+ this.debounceTimer = window.setTimeout(() => {
+ const styleSheets = document.styleSheets;
+ for (let i = 0, len = styleSheets.length; i < len; i++) {
+ const sheet = styleSheets.item(i);
+ const text = sheet.ownerNode.textContent.trim();
+ let match = settingRegExp.exec(text);
+ if (match && match.length) {
+ do {
+ const nameMatch = text.match(nameRegExp);
+ const name = nameMatch
+ ? nameMatch[1]
+ : undefined;
+ try {
+ const str = match[1].trim();
+ const indent = detectIndent(str);
+ const settings = jsYaml.load(str.replace(/\t/g, indent.type === "space" ? indent.indent : " "), {
+ filename: name,
+ });
+ if (!settings.settings)
+ continue;
+ settings.settings = settings.settings.filter((setting) => setting);
+ if (typeof settings === "object" &&
+ settings.name &&
+ settings.id &&
+ settings.settings &&
+ settings.settings.length) {
+ this.settingsList.push(settings);
+ }
+ }
+ catch (e) {
+ this.errorList.push({ name, error: `${e}` });
+ }
+ } while ((match = settingRegExp.exec(text)) !== null);
+ }
+ }
+ this.settingsTab.settingsMarkup.setSettings(this.settingsList, this.errorList);
+ this.app.workspace.getLeavesOfType(viewType).forEach((leaf) => {
+ leaf.view.settingsMarkup.setSettings(this.settingsList, this.errorList);
+ });
+ this.settingsManager.initClasses();
+ }, 100);
+ }
+ onunload() {
+ document.body.classList.remove("css-settings-manager");
+ this.settingsManager.cleanup();
+ this.settingsTab.settingsMarkup.cleanup();
+ this.deactivateView();
+ }
+ deactivateView() {
+ this.app.workspace.detachLeavesOfType(viewType);
+ }
+ activateView() {
+ return __awaiter(this, void 0, void 0, function* () {
+ this.deactivateView();
+ const leaf = this.app.workspace.createLeafBySplit(this.app.workspace.activeLeaf, "vertical");
+ yield leaf.setViewState({
+ type: viewType,
+ });
+ leaf.view.settingsMarkup.setSettings(this.settingsList, this.errorList);
+ });
+ }
+}
+class SettingsMarkup {
+ constructor(app, plugin, containerEl, isView) {
+ this.cleanupFns = [];
+ this.settings = [];
+ this.errorList = [];
+ this.app = app;
+ this.plugin = plugin;
+ this.containerEl = containerEl;
+ this.isView = !!isView;
+ }
+ display() {
+ this.generate(this.settings);
+ }
+ cleanup() {
+ Array.from(this.cleanupFns).forEach((fn) => {
+ fn && fn();
+ this.cleanupFns.remove(fn);
+ });
+ }
+ setSettings(settings, errorList) {
+ this.settings = settings;
+ this.errorList = errorList;
+ this.plugin.settingsManager.setConfig(settings);
+ if (this.containerEl.parentNode) {
+ this.generate(settings);
+ }
+ }
+ displayErrors() {
+ let { containerEl, errorList } = this;
+ errorList.forEach((err) => {
+ containerEl.createDiv({ cls: "style-settings-error" }, (wrapper) => {
+ wrapper.createDiv({
+ cls: "style-settings-error-name",
+ text: `Error: ${err.name}`,
+ });
+ wrapper.createDiv({
+ cls: "style-settings-error-desc",
+ text: err.error,
+ });
+ });
+ });
+ }
+ displayEmpty() {
+ let { containerEl } = this;
+ containerEl.createDiv({ cls: "style-settings-empty" }, (wrapper) => {
+ wrapper.createDiv({
+ cls: "style-settings-empty-name",
+ text: "No style settings found",
+ });
+ wrapper.createDiv({ cls: "style-settings-empty-desc" }).appendChild(createFragment((frag) => {
+ frag.appendText("Style settings configured by theme and plugin authors will show up here. You can also create your own configuration by creating a CSS snippet in your vault. ");
+ frag.createEl("a", {
+ text: "Click here for details and examples.",
+ href: "https://github.com/mgmeyers/obsidian-style-settings#obsidian-style-settings-plugin",
+ });
+ }));
+ });
+ }
+ generate(settings) {
+ let { containerEl, plugin } = this;
+ containerEl.empty();
+ this.cleanup();
+ this.displayErrors();
+ if (settings.length === 0) {
+ return this.displayEmpty();
+ }
+ new obsidian.Setting(containerEl).then((setting) => {
+ // Build and import link to open the import modal
+ setting.controlEl.createEl("a", {
+ cls: "style-settings-import",
+ text: "Import",
+ href: "#",
+ }, (el) => {
+ el.addEventListener("click", (e) => {
+ e.preventDefault();
+ this.plugin.settingsManager.import();
+ });
+ });
+ // Build and export link to open the export modal
+ setting.controlEl.createEl("a", {
+ cls: "style-settings-export",
+ text: "Export",
+ href: "#",
+ }, (el) => {
+ el.addEventListener("click", (e) => {
+ e.preventDefault();
+ this.plugin.settingsManager.export("All settings", this.plugin.settingsManager.settings);
+ });
+ });
+ });
+ const cleanupFns = [];
+ settings.forEach((s) => {
+ const options = [
+ {
+ id: s.id,
+ type: "heading",
+ title: s.name,
+ level: 0,
+ collapsed: true,
+ resetFn: () => {
+ plugin.settingsManager.clearSection(s.id);
+ this.generate(this.settings);
+ },
+ },
+ ...s.settings,
+ ];
+ const cleanup = createSettings({
+ containerEl,
+ isView: this.isView,
+ sectionId: s.id,
+ sectionName: s.name,
+ settings: options,
+ settingsManager: plugin.settingsManager,
+ });
+ if (cleanup.length)
+ cleanupFns.push(...cleanup);
+ });
+ this.cleanupFns = cleanupFns;
+ }
+}
+class CSSSettingsTab extends obsidian.PluginSettingTab {
+ constructor(app, plugin) {
+ super(app, plugin);
+ this.settingsMarkup = new SettingsMarkup(app, plugin, this.containerEl);
+ }
+ display() {
+ this.settingsMarkup.display();
+ }
+ hide() {
+ this.settingsMarkup.cleanup();
+ }
+}
+const viewType = "style-settings";
+class SettingsView extends obsidian.ItemView {
+ constructor(plugin, leaf) {
+ super(leaf);
+ this.plugin = plugin;
+ this.settingsMarkup = new SettingsMarkup(plugin.app, plugin, this.contentEl, true);
+ }
+ getViewType() {
+ return viewType;
+ }
+ getIcon() {
+ return "gear";
+ }
+ getDisplayText() {
+ return "Style Settings";
+ }
+ onOpen() {
+ return __awaiter(this, void 0, void 0, function* () {
+ return this.settingsMarkup.display();
+ });
+ }
+ onClose() {
+ return __awaiter(this, void 0, void 0, function* () {
+ return this.settingsMarkup.cleanup();
+ });
+ }
+}
+
+module.exports = CSSSettingsPlugin;
diff --git a/.obsidian/plugins/obsidian-style-settings/manifest.json b/.obsidian/plugins/obsidian-style-settings/manifest.json
new file mode 100644
index 0000000..7b7a93c
--- /dev/null
+++ b/.obsidian/plugins/obsidian-style-settings/manifest.json
@@ -0,0 +1,10 @@
+{
+ "id": "obsidian-style-settings",
+ "name": "Style Settings",
+ "version": "0.4.10",
+ "minAppVersion": "0.11.5",
+ "description": "Offers controls for adjusting theme, plugin, and snippet CSS variables.",
+ "author": "mgmeyers",
+ "authorUrl": "https://github.com/mgmeyers/obsidian-style-settings",
+ "isDesktopOnly": false
+}
diff --git a/.obsidian/plugins/obsidian-style-settings/styles.css b/.obsidian/plugins/obsidian-style-settings/styles.css
new file mode 100644
index 0000000..40863fe
--- /dev/null
+++ b/.obsidian/plugins/obsidian-style-settings/styles.css
@@ -0,0 +1,214 @@
+.pcr-app .pcr-swatches > button {
+ padding: 0;
+}
+
+.pickr .pcr-button {
+ margin-right: 0;
+}
+
+.themed-color-wrapper > div {
+ background: var(--background-primary);
+ padding: 10px;
+ display: flex;
+ align-items: center;
+ border-radius: 4px;
+}
+
+.themed-color-wrapper > div + div {
+ margin-top: 6px;
+}
+
+.themed-color-wrapper button {
+ display: block;
+}
+
+.themed-color-wrapper .pickr-reset > button {
+ margin: 0 0 0 10px;
+ padding: 9px;
+ line-height: 1;
+}
+
+.themed-color-wrapper .pickr-reset > button > svg {
+ display: block;
+}
+.style-settings-heading {
+ cursor: pointer;
+ margin-bottom: 18px;
+ padding-bottom: 6px;
+ border-bottom: 1px solid var(--background-modifier-border);
+}
+
+.style-settings-heading[data-level="0"] {
+ margin-bottom: 26px;
+}
+
+.style-settings-container {
+ padding-bottom: 16px;
+}
+
+.style-settings-heading[data-level="0"] + .style-settings-container {
+ padding-left: 34px;
+}
+
+.style-settings-heading.is-collapsed {
+ margin-bottom: 0;
+}
+
+.style-settings-heading.is-collapsed + .style-settings-container {
+ display: none;
+}
+
+.style-settings-collapse-indicator {
+ color: var(--text-faint);
+ display: inline-block;
+ margin-right: 8px;
+ position: relative;
+ top: -1px;
+}
+
+.style-settings-heading[data-level="0"]
+ + .style-settings-container
+ .style-settings-collapse-indicator {
+ margin-left: -17px;
+}
+
+.style-settings-collapse-indicator > svg {
+ height: 9px;
+ width: 9px;
+}
+
+.style-settings-heading.is-collapsed .style-settings-collapse-indicator > svg {
+ transform: rotate(-90deg);
+}
+
+.style-settings-error {
+ font-size: 14px;
+ border-radius: 6px;
+ background: rgba(var(--background-modifier-error-rgb), 0.2);
+ color: var(--text-error);
+ padding: 10px;
+ margin-bottom: 1rem;
+}
+
+.style-settings-error-name {
+ font-weight: bold;
+ margin-bottom: 5px;
+}
+
+.style-settings-error-desc {
+ white-space: pre;
+}
+
+.style-settings-empty {
+ font-size: 14px;
+ background: var(--background-secondary);
+ padding: 10px;
+}
+
+.style-settings-empty-name {
+ font-weight: bold;
+ margin-bottom: 5px;
+}
+
+.style-settings-import-input {
+ width: 0.1px;
+ height: 0.1px;
+ opacity: 0;
+ overflow: hidden;
+ position: absolute;
+ z-index: -1;
+}
+
+.style-settings-import-label {
+ cursor: pointer;
+ color: var(--text-accent);
+ text-decoration: underline;
+}
+
+.style-settings-import-label:hover {
+ color: var(--text-accent-hover);
+}
+
+.style-settings-export,
+.style-settings-import {
+ display: inline-block;
+ margin-right: 10px;
+}
+
+.style-settings-copy,
+.style-settings-download {
+ position: relative;
+ display: inline-block;
+ margin-left: 10px;
+}
+
+.style-settings-copy:before {
+ color: var(--interactive-success);
+ content: "✓";
+ position: absolute;
+ left: -18px;
+ font-weight: bold;
+ opacity: 0;
+ transition: 150ms opacity ease-in-out;
+}
+
+.style-settings-copy.success:before {
+ opacity: 1;
+}
+
+.modal-style-settings {
+ height: 70vh;
+ display: flex;
+ flex-direction: column;
+}
+
+.modal-style-settings .modal-content {
+ flex-grow: 1;
+ margin: 0;
+ display: flex;
+ flex-direction: column;
+}
+
+.modal-style-settings textarea {
+ display: block;
+ width: 100%;
+ height: 100%;
+ font-family: var(--font-monospace) !important;
+ font-size: 12px;
+ white-space: pre;
+ overflow-wrap: normal;
+ overflow-x: scroll;
+ margin-bottom: 5px;
+}
+
+.modal-style-settings .setting-item {
+ align-items: flex-start;
+}
+
+.modal-style-settings button {
+ margin: 10px 0 0;
+}
+
+.style-settings-import-error {
+ display: none;
+ color: var(--text-error);
+}
+
+.style-settings-import-error.active {
+ display: block;
+}
+
+.view-content .style-settings-container .setting-item:not(.setting-item-heading) {
+ flex-direction: column;
+ align-items: flex-start;
+}
+
+.view-content .style-settings-container .setting-item:not(.setting-item-heading) .setting-item-control {
+ padding-top: 0.5em;
+}
+
+.view-content .style-settings-container .setting-item:not(.setting-item-heading) .themed-color-wrapper {
+ display: flex;
+}/*! Pickr 1.8.4 MIT | https://github.com/Simonwep/pickr */
+.pickr{position:relative;overflow:visible;transform:translateY(0)}.pickr *{box-sizing:border-box;outline:none;border:none;-webkit-appearance:none}.pickr .pcr-button{position:relative;height:2em;width:2em;padding:0.5em;cursor:pointer;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Helvetica Neue",Arial,sans-serif;border-radius:.15em;background:url('data:image/svg+xml;utf8, ') no-repeat center;background-size:0;transition:all 0.3s}.pickr .pcr-button::before{position:absolute;content:'';top:0;left:0;width:100%;height:100%;background:url('data:image/svg+xml;utf8, ');background-size:.5em;border-radius:.15em;z-index:-1}.pickr .pcr-button::before{z-index:initial}.pickr .pcr-button::after{position:absolute;content:'';top:0;left:0;height:100%;width:100%;transition:background 0.3s;background:var(--pcr-color);border-radius:.15em}.pickr .pcr-button.clear{background-size:70%}.pickr .pcr-button.clear::before{opacity:0}.pickr .pcr-button.clear:focus{box-shadow:0 0 0 1px rgba(255,255,255,0.85),0 0 0 3px var(--pcr-color)}.pickr .pcr-button.disabled{cursor:not-allowed}.pickr *,.pcr-app *{box-sizing:border-box;outline:none;border:none;-webkit-appearance:none}.pickr input:focus,.pickr input.pcr-active,.pickr button:focus,.pickr button.pcr-active,.pcr-app input:focus,.pcr-app input.pcr-active,.pcr-app button:focus,.pcr-app button.pcr-active{box-shadow:0 0 0 1px rgba(255,255,255,0.85),0 0 0 3px var(--pcr-color)}.pickr .pcr-palette,.pickr .pcr-slider,.pcr-app .pcr-palette,.pcr-app .pcr-slider{transition:box-shadow 0.3s}.pickr .pcr-palette:focus,.pickr .pcr-slider:focus,.pcr-app .pcr-palette:focus,.pcr-app .pcr-slider:focus{box-shadow:0 0 0 1px rgba(255,255,255,0.85),0 0 0 3px rgba(0,0,0,0.25)}.pcr-app{position:fixed;display:flex;flex-direction:column;z-index:10000;border-radius:0.1em;background:#fff;opacity:0;visibility:hidden;transition:opacity 0.3s, visibility 0s 0.3s;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Helvetica Neue",Arial,sans-serif;box-shadow:0 0.15em 1.5em 0 rgba(0,0,0,0.1),0 0 1em 0 rgba(0,0,0,0.03);left:0;top:0}.pcr-app.visible{transition:opacity 0.3s;visibility:visible;opacity:1}.pcr-app .pcr-swatches{display:flex;flex-wrap:wrap;margin-top:0.75em}.pcr-app .pcr-swatches.pcr-last{margin:0}@supports (display: grid){.pcr-app .pcr-swatches{display:grid;align-items:center;grid-template-columns:repeat(auto-fit, 1.75em)}}.pcr-app .pcr-swatches>button{font-size:1em;position:relative;width:calc(1.75em - 5px);height:calc(1.75em - 5px);border-radius:0.15em;cursor:pointer;margin:2.5px;flex-shrink:0;justify-self:center;transition:all 0.15s;overflow:hidden;background:transparent;z-index:1}.pcr-app .pcr-swatches>button::before{position:absolute;content:'';top:0;left:0;width:100%;height:100%;background:url('data:image/svg+xml;utf8, ');background-size:6px;border-radius:.15em;z-index:-1}.pcr-app .pcr-swatches>button::after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background:var(--pcr-color);border:1px solid rgba(0,0,0,0.05);border-radius:0.15em;box-sizing:border-box}.pcr-app .pcr-swatches>button:hover{filter:brightness(1.05)}.pcr-app .pcr-swatches>button:not(.pcr-active){box-shadow:none}.pcr-app .pcr-interaction{display:flex;flex-wrap:wrap;align-items:center;margin:0 -0.2em 0 -0.2em}.pcr-app .pcr-interaction>*{margin:0 0.2em}.pcr-app .pcr-interaction input{letter-spacing:0.07em;font-size:0.75em;text-align:center;cursor:pointer;color:#75797e;background:#f1f3f4;border-radius:.15em;transition:all 0.15s;padding:0.45em 0.5em;margin-top:0.75em}.pcr-app .pcr-interaction input:hover{filter:brightness(0.975)}.pcr-app .pcr-interaction input:focus{box-shadow:0 0 0 1px rgba(255,255,255,0.85),0 0 0 3px rgba(66,133,244,0.75)}.pcr-app .pcr-interaction .pcr-result{color:#75797e;text-align:left;flex:1 1 8em;min-width:8em;transition:all 0.2s;border-radius:.15em;background:#f1f3f4;cursor:text}.pcr-app .pcr-interaction .pcr-result::-moz-selection{background:#4285f4;color:#fff}.pcr-app .pcr-interaction .pcr-result::selection{background:#4285f4;color:#fff}.pcr-app .pcr-interaction .pcr-type.active{color:#fff;background:#4285f4}.pcr-app .pcr-interaction .pcr-save,.pcr-app .pcr-interaction .pcr-cancel,.pcr-app .pcr-interaction .pcr-clear{color:#fff;width:auto}.pcr-app .pcr-interaction .pcr-save,.pcr-app .pcr-interaction .pcr-cancel,.pcr-app .pcr-interaction .pcr-clear{color:#fff}.pcr-app .pcr-interaction .pcr-save:hover,.pcr-app .pcr-interaction .pcr-cancel:hover,.pcr-app .pcr-interaction .pcr-clear:hover{filter:brightness(0.925)}.pcr-app .pcr-interaction .pcr-save{background:#4285f4}.pcr-app .pcr-interaction .pcr-clear,.pcr-app .pcr-interaction .pcr-cancel{background:#f44250}.pcr-app .pcr-interaction .pcr-clear:focus,.pcr-app .pcr-interaction .pcr-cancel:focus{box-shadow:0 0 0 1px rgba(255,255,255,0.85),0 0 0 3px rgba(244,66,80,0.75)}.pcr-app .pcr-selection .pcr-picker{position:absolute;height:18px;width:18px;border:2px solid #fff;border-radius:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pcr-app .pcr-selection .pcr-color-palette,.pcr-app .pcr-selection .pcr-color-chooser,.pcr-app .pcr-selection .pcr-color-opacity{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column;cursor:grab;cursor:-webkit-grab}.pcr-app .pcr-selection .pcr-color-palette:active,.pcr-app .pcr-selection .pcr-color-chooser:active,.pcr-app .pcr-selection .pcr-color-opacity:active{cursor:grabbing;cursor:-webkit-grabbing}.pcr-app[data-theme='nano']{width:14.25em;max-width:95vw}.pcr-app[data-theme='nano'] .pcr-swatches{margin-top:.6em;padding:0 .6em}.pcr-app[data-theme='nano'] .pcr-interaction{padding:0 .6em .6em .6em}.pcr-app[data-theme='nano'] .pcr-selection{display:grid;grid-gap:.6em;grid-template-columns:1fr 4fr;grid-template-rows:5fr auto auto;align-items:center;height:10.5em;width:100%;align-self:flex-start}.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-preview{grid-area:2 / 1 / 4 / 1;height:100%;width:100%;display:flex;flex-direction:row;justify-content:center;margin-left:.6em}.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-preview .pcr-last-color{display:none}.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-preview .pcr-current-color{position:relative;background:var(--pcr-color);width:2em;height:2em;border-radius:50em;overflow:hidden}.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-preview .pcr-current-color::before{position:absolute;content:'';top:0;left:0;width:100%;height:100%;background:url('data:image/svg+xml;utf8, ');background-size:.5em;border-radius:.15em;z-index:-1}.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-palette{grid-area:1 / 1 / 2 / 3;width:100%;height:100%;z-index:1}.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-palette .pcr-palette{border-radius:.15em;width:100%;height:100%}.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-palette .pcr-palette::before{position:absolute;content:'';top:0;left:0;width:100%;height:100%;background:url('data:image/svg+xml;utf8, ');background-size:.5em;border-radius:.15em;z-index:-1}.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-chooser{grid-area:2 / 2 / 2 / 2}.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-opacity{grid-area:3 / 2 / 3 / 2}.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-chooser,.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-opacity{height:0.5em;margin:0 .6em}.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-chooser .pcr-picker,.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-opacity .pcr-picker{top:50%;transform:translateY(-50%)}.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-chooser .pcr-slider,.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-opacity .pcr-slider{flex-grow:1;border-radius:50em}.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-chooser .pcr-slider{background:linear-gradient(to right, red, #ff0, lime, cyan, blue, #f0f, red)}.pcr-app[data-theme='nano'] .pcr-selection .pcr-color-opacity .pcr-slider{background:linear-gradient(to right, transparent, black),url('data:image/svg+xml;utf8, ');background-size:100%, 0.25em}
+
diff --git a/.obsidian/plugins/periodic-notes/data.json b/.obsidian/plugins/periodic-notes/data.json
new file mode 100644
index 0000000..c8a539f
--- /dev/null
+++ b/.obsidian/plugins/periodic-notes/data.json
@@ -0,0 +1,33 @@
+{
+ "showGettingStartedBanner": false,
+ "hasMigratedDailyNoteSettings": true,
+ "hasMigratedWeeklyNoteSettings": false,
+ "daily": {
+ "format": "DD.MM.YYYY",
+ "folder": "Periodische Notizen/Täglich",
+ "template": "Templates/t_DailyNote",
+ "enabled": true
+ },
+ "weekly": {
+ "format": "[KW]ww-yyyy",
+ "template": "",
+ "folder": "Periodische Notizen/Wöchentlich",
+ "enabled": true
+ },
+ "monthly": {
+ "format": "",
+ "template": "",
+ "folder": "",
+ "enabled": false
+ },
+ "quarterly": {
+ "format": "",
+ "template": "",
+ "folder": ""
+ },
+ "yearly": {
+ "format": "",
+ "template": "",
+ "folder": ""
+ }
+}
\ No newline at end of file
diff --git a/.obsidian/plugins/periodic-notes/main.js b/.obsidian/plugins/periodic-notes/main.js
new file mode 100644
index 0000000..8ea6df8
--- /dev/null
+++ b/.obsidian/plugins/periodic-notes/main.js
@@ -0,0 +1,5559 @@
+'use strict';
+
+var obsidian = require('obsidian');
+
+function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
+
+var obsidian__default = /*#__PURE__*/_interopDefaultLegacy(obsidian);
+
+const DEFAULT_DAILY_NOTE_FORMAT = "YYYY-MM-DD";
+const DEFAULT_WEEKLY_NOTE_FORMAT = "gggg-[W]ww";
+const DEFAULT_MONTHLY_NOTE_FORMAT = "YYYY-MM";
+const DEFAULT_QUARTERLY_NOTE_FORMAT = "YYYY-[Q]Q";
+const DEFAULT_YEARLY_NOTE_FORMAT = "YYYY";
+
+function shouldUsePeriodicNotesSettings(periodicity) {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const periodicNotes = window.app.plugins.getPlugin("periodic-notes");
+ return periodicNotes && periodicNotes.settings?.[periodicity]?.enabled;
+}
+/**
+ * Read the user settings for the `daily-notes` plugin
+ * to keep behavior of creating a new note in-sync.
+ */
+function getDailyNoteSettings() {
+ try {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const { internalPlugins, plugins } = window.app;
+ if (shouldUsePeriodicNotesSettings("daily")) {
+ const { format, folder, template } = plugins.getPlugin("periodic-notes")?.settings?.daily || {};
+ return {
+ format: format || DEFAULT_DAILY_NOTE_FORMAT,
+ folder: folder?.trim() || "",
+ template: template?.trim() || "",
+ };
+ }
+ const { folder, format, template } = internalPlugins.getPluginById("daily-notes")?.instance?.options || {};
+ return {
+ format: format || DEFAULT_DAILY_NOTE_FORMAT,
+ folder: folder?.trim() || "",
+ template: template?.trim() || "",
+ };
+ }
+ catch (err) {
+ console.info("No custom daily note settings found!", err);
+ }
+}
+/**
+ * Read the user settings for the `weekly-notes` plugin
+ * to keep behavior of creating a new note in-sync.
+ */
+function getWeeklyNoteSettings() {
+ try {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const pluginManager = window.app.plugins;
+ const calendarSettings = pluginManager.getPlugin("calendar")?.options;
+ const periodicNotesSettings = pluginManager.getPlugin("periodic-notes")?.settings?.weekly;
+ if (shouldUsePeriodicNotesSettings("weekly")) {
+ return {
+ format: periodicNotesSettings.format || DEFAULT_WEEKLY_NOTE_FORMAT,
+ folder: periodicNotesSettings.folder?.trim() || "",
+ template: periodicNotesSettings.template?.trim() || "",
+ };
+ }
+ const settings = calendarSettings || {};
+ return {
+ format: settings.weeklyNoteFormat || DEFAULT_WEEKLY_NOTE_FORMAT,
+ folder: settings.weeklyNoteFolder?.trim() || "",
+ template: settings.weeklyNoteTemplate?.trim() || "",
+ };
+ }
+ catch (err) {
+ console.info("No custom weekly note settings found!", err);
+ }
+}
+/**
+ * Read the user settings for the `periodic-notes` plugin
+ * to keep behavior of creating a new note in-sync.
+ */
+function getMonthlyNoteSettings() {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const pluginManager = window.app.plugins;
+ try {
+ const settings = (shouldUsePeriodicNotesSettings("monthly") &&
+ pluginManager.getPlugin("periodic-notes")?.settings?.monthly) ||
+ {};
+ return {
+ format: settings.format || DEFAULT_MONTHLY_NOTE_FORMAT,
+ folder: settings.folder?.trim() || "",
+ template: settings.template?.trim() || "",
+ };
+ }
+ catch (err) {
+ console.info("No custom monthly note settings found!", err);
+ }
+}
+/**
+ * Read the user settings for the `periodic-notes` plugin
+ * to keep behavior of creating a new note in-sync.
+ */
+function getQuarterlyNoteSettings() {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const pluginManager = window.app.plugins;
+ try {
+ const settings = (shouldUsePeriodicNotesSettings("quarterly") &&
+ pluginManager.getPlugin("periodic-notes")?.settings?.quarterly) ||
+ {};
+ return {
+ format: settings.format || DEFAULT_QUARTERLY_NOTE_FORMAT,
+ folder: settings.folder?.trim() || "",
+ template: settings.template?.trim() || "",
+ };
+ }
+ catch (err) {
+ console.info("No custom quarterly note settings found!", err);
+ }
+}
+/**
+ * Read the user settings for the `periodic-notes` plugin
+ * to keep behavior of creating a new note in-sync.
+ */
+function getYearlyNoteSettings() {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const pluginManager = window.app.plugins;
+ try {
+ const settings = (shouldUsePeriodicNotesSettings("yearly") &&
+ pluginManager.getPlugin("periodic-notes")?.settings?.yearly) ||
+ {};
+ return {
+ format: settings.format || DEFAULT_YEARLY_NOTE_FORMAT,
+ folder: settings.folder?.trim() || "",
+ template: settings.template?.trim() || "",
+ };
+ }
+ catch (err) {
+ console.info("No custom yearly note settings found!", err);
+ }
+}
+
+// Credit: @creationix/path.js
+function join(...partSegments) {
+ // Split the inputs into a list of path commands.
+ let parts = [];
+ for (let i = 0, l = partSegments.length; i < l; i++) {
+ parts = parts.concat(partSegments[i].split("/"));
+ }
+ // Interpret the path commands to get the new resolved path.
+ const newParts = [];
+ for (let i = 0, l = parts.length; i < l; i++) {
+ const part = parts[i];
+ // Remove leading and trailing slashes
+ // Also remove "." segments
+ if (!part || part === ".")
+ continue;
+ // Push new path segments.
+ else
+ newParts.push(part);
+ }
+ // Preserve the initial slash if there was one.
+ if (parts[0] === "")
+ newParts.unshift("");
+ // Turn back into a single string path.
+ return newParts.join("/");
+}
+async function ensureFolderExists(path) {
+ const dirs = path.replace(/\\/g, "/").split("/");
+ dirs.pop(); // remove basename
+ if (dirs.length) {
+ const dir = join(...dirs);
+ if (!window.app.vault.getAbstractFileByPath(dir)) {
+ await window.app.vault.createFolder(dir);
+ }
+ }
+}
+async function getNotePath(directory, filename) {
+ if (!filename.endsWith(".md")) {
+ filename += ".md";
+ }
+ const path = obsidian__default['default'].normalizePath(join(directory, filename));
+ await ensureFolderExists(path);
+ return path;
+}
+async function getTemplateInfo(template) {
+ const { metadataCache, vault } = window.app;
+ const templatePath = obsidian__default['default'].normalizePath(template);
+ if (templatePath === "/") {
+ return Promise.resolve(["", null]);
+ }
+ try {
+ const templateFile = metadataCache.getFirstLinkpathDest(templatePath, "");
+ const contents = await vault.cachedRead(templateFile);
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const IFoldInfo = window.app.foldManager.load(templateFile);
+ return [contents, IFoldInfo];
+ }
+ catch (err) {
+ console.error(`Failed to read the daily note template '${templatePath}'`, err);
+ new obsidian__default['default'].Notice("Failed to read the daily note template");
+ return ["", null];
+ }
+}
+
+/**
+ * dateUID is a way of weekly identifying daily/weekly/monthly notes.
+ * They are prefixed with the granularity to avoid ambiguity.
+ */
+function getDateUID(date, granularity = "day") {
+ const ts = date.clone().startOf(granularity).format();
+ return `${granularity}-${ts}`;
+}
+function removeEscapedCharacters(format) {
+ return format.replace(/\[[^\]]*\]/g, ""); // remove everything within brackets
+}
+/**
+ * XXX: When parsing dates that contain both week numbers and months,
+ * Moment choses to ignore the week numbers. For the week dateUID, we
+ * want the opposite behavior. Strip the MMM from the format to patch.
+ */
+function isFormatAmbiguous(format, granularity) {
+ if (granularity === "week") {
+ const cleanFormat = removeEscapedCharacters(format);
+ return (/w{1,2}/i.test(cleanFormat) &&
+ (/M{1,4}/.test(cleanFormat) || /D{1,4}/.test(cleanFormat)));
+ }
+ return false;
+}
+function getDateFromFile(file, granularity) {
+ return getDateFromFilename(file.basename, granularity);
+}
+function getDateFromFilename(filename, granularity) {
+ const getSettings = {
+ day: getDailyNoteSettings,
+ week: getWeeklyNoteSettings,
+ month: getMonthlyNoteSettings,
+ quarter: getQuarterlyNoteSettings,
+ year: getYearlyNoteSettings,
+ };
+ const format = getSettings[granularity]().format.split("/").pop();
+ const noteDate = window.moment(filename, format, true);
+ if (!noteDate.isValid()) {
+ return null;
+ }
+ if (isFormatAmbiguous(format, granularity)) {
+ if (granularity === "week") {
+ const cleanFormat = removeEscapedCharacters(format);
+ if (/w{1,2}/i.test(cleanFormat)) {
+ return window.moment(filename,
+ // If format contains week, remove day & month formatting
+ format.replace(/M{1,4}/g, "").replace(/D{1,4}/g, ""), false);
+ }
+ }
+ }
+ return noteDate;
+}
+
+class DailyNotesFolderMissingError extends Error {
+}
+/**
+ * This function mimics the behavior of the daily-notes plugin
+ * so it will replace {{date}}, {{title}}, and {{time}} with the
+ * formatted timestamp.
+ *
+ * Note: it has an added bonus that it's not 'today' specific.
+ */
+async function createDailyNote(date) {
+ const app = window.app;
+ const { vault } = app;
+ const moment = window.moment;
+ const { template, format, folder } = getDailyNoteSettings();
+ const [templateContents, IFoldInfo] = await getTemplateInfo(template);
+ const filename = date.format(format);
+ const normalizedPath = await getNotePath(folder, filename);
+ try {
+ const createdFile = await vault.create(normalizedPath, templateContents
+ .replace(/{{\s*date\s*}}/gi, filename)
+ .replace(/{{\s*time\s*}}/gi, moment().format("HH:mm"))
+ .replace(/{{\s*title\s*}}/gi, filename)
+ .replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_, _timeOrDate, calc, timeDelta, unit, momentFormat) => {
+ const now = moment();
+ const currentDate = date.clone().set({
+ hour: now.get("hour"),
+ minute: now.get("minute"),
+ second: now.get("second"),
+ });
+ if (calc) {
+ currentDate.add(parseInt(timeDelta, 10), unit);
+ }
+ if (momentFormat) {
+ return currentDate.format(momentFormat.substring(1).trim());
+ }
+ return currentDate.format(format);
+ })
+ .replace(/{{\s*yesterday\s*}}/gi, date.clone().subtract(1, "day").format(format))
+ .replace(/{{\s*tomorrow\s*}}/gi, date.clone().add(1, "d").format(format)));
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ app.foldManager.save(createdFile, IFoldInfo);
+ return createdFile;
+ }
+ catch (err) {
+ console.error(`Failed to create file: '${normalizedPath}'`, err);
+ new obsidian__default['default'].Notice("Unable to create new file.");
+ }
+}
+function getDailyNote(date, dailyNotes) {
+ return dailyNotes[getDateUID(date, "day")] ?? null;
+}
+function getAllDailyNotes() {
+ /**
+ * Find all daily notes in the daily note folder
+ */
+ const { vault } = window.app;
+ const { folder } = getDailyNoteSettings();
+ const dailyNotesFolder = vault.getAbstractFileByPath(obsidian__default['default'].normalizePath(folder));
+ if (!dailyNotesFolder) {
+ throw new DailyNotesFolderMissingError("Failed to find daily notes folder");
+ }
+ const dailyNotes = {};
+ obsidian__default['default'].Vault.recurseChildren(dailyNotesFolder, (note) => {
+ if (note instanceof obsidian__default['default'].TFile) {
+ const date = getDateFromFile(note, "day");
+ if (date) {
+ const dateString = getDateUID(date, "day");
+ dailyNotes[dateString] = note;
+ }
+ }
+ });
+ return dailyNotes;
+}
+
+class WeeklyNotesFolderMissingError extends Error {
+}
+function getDaysOfWeek() {
+ const { moment } = window;
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ let weekStart = moment.localeData()._week.dow;
+ const daysOfWeek = [
+ "sunday",
+ "monday",
+ "tuesday",
+ "wednesday",
+ "thursday",
+ "friday",
+ "saturday",
+ ];
+ while (weekStart) {
+ daysOfWeek.push(daysOfWeek.shift());
+ weekStart--;
+ }
+ return daysOfWeek;
+}
+function getDayOfWeekNumericalValue(dayOfWeekName) {
+ return getDaysOfWeek().indexOf(dayOfWeekName.toLowerCase());
+}
+async function createWeeklyNote(date) {
+ const { vault } = window.app;
+ const { template, format, folder } = getWeeklyNoteSettings();
+ const [templateContents, IFoldInfo] = await getTemplateInfo(template);
+ const filename = date.format(format);
+ const normalizedPath = await getNotePath(folder, filename);
+ try {
+ const createdFile = await vault.create(normalizedPath, templateContents
+ .replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_, _timeOrDate, calc, timeDelta, unit, momentFormat) => {
+ const now = window.moment();
+ const currentDate = date.clone().set({
+ hour: now.get("hour"),
+ minute: now.get("minute"),
+ second: now.get("second"),
+ });
+ if (calc) {
+ currentDate.add(parseInt(timeDelta, 10), unit);
+ }
+ if (momentFormat) {
+ return currentDate.format(momentFormat.substring(1).trim());
+ }
+ return currentDate.format(format);
+ })
+ .replace(/{{\s*title\s*}}/gi, filename)
+ .replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm"))
+ .replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi, (_, dayOfWeek, momentFormat) => {
+ const day = getDayOfWeekNumericalValue(dayOfWeek);
+ return date.weekday(day).format(momentFormat.trim());
+ }));
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ window.app.foldManager.save(createdFile, IFoldInfo);
+ return createdFile;
+ }
+ catch (err) {
+ console.error(`Failed to create file: '${normalizedPath}'`, err);
+ new obsidian__default['default'].Notice("Unable to create new file.");
+ }
+}
+function getWeeklyNote(date, weeklyNotes) {
+ return weeklyNotes[getDateUID(date, "week")] ?? null;
+}
+function getAllWeeklyNotes() {
+ const weeklyNotes = {};
+ if (!appHasWeeklyNotesPluginLoaded()) {
+ return weeklyNotes;
+ }
+ const { vault } = window.app;
+ const { folder } = getWeeklyNoteSettings();
+ const weeklyNotesFolder = vault.getAbstractFileByPath(obsidian__default['default'].normalizePath(folder));
+ if (!weeklyNotesFolder) {
+ throw new WeeklyNotesFolderMissingError("Failed to find weekly notes folder");
+ }
+ obsidian__default['default'].Vault.recurseChildren(weeklyNotesFolder, (note) => {
+ if (note instanceof obsidian__default['default'].TFile) {
+ const date = getDateFromFile(note, "week");
+ if (date) {
+ const dateString = getDateUID(date, "week");
+ weeklyNotes[dateString] = note;
+ }
+ }
+ });
+ return weeklyNotes;
+}
+
+class MonthlyNotesFolderMissingError extends Error {
+}
+/**
+ * This function mimics the behavior of the daily-notes plugin
+ * so it will replace {{date}}, {{title}}, and {{time}} with the
+ * formatted timestamp.
+ *
+ * Note: it has an added bonus that it's not 'today' specific.
+ */
+async function createMonthlyNote(date) {
+ const { vault } = window.app;
+ const { template, format, folder } = getMonthlyNoteSettings();
+ const [templateContents, IFoldInfo] = await getTemplateInfo(template);
+ const filename = date.format(format);
+ const normalizedPath = await getNotePath(folder, filename);
+ try {
+ const createdFile = await vault.create(normalizedPath, templateContents
+ .replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_, _timeOrDate, calc, timeDelta, unit, momentFormat) => {
+ const now = window.moment();
+ const currentDate = date.clone().set({
+ hour: now.get("hour"),
+ minute: now.get("minute"),
+ second: now.get("second"),
+ });
+ if (calc) {
+ currentDate.add(parseInt(timeDelta, 10), unit);
+ }
+ if (momentFormat) {
+ return currentDate.format(momentFormat.substring(1).trim());
+ }
+ return currentDate.format(format);
+ })
+ .replace(/{{\s*date\s*}}/gi, filename)
+ .replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm"))
+ .replace(/{{\s*title\s*}}/gi, filename));
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ window.app.foldManager.save(createdFile, IFoldInfo);
+ return createdFile;
+ }
+ catch (err) {
+ console.error(`Failed to create file: '${normalizedPath}'`, err);
+ new obsidian__default['default'].Notice("Unable to create new file.");
+ }
+}
+function getMonthlyNote(date, monthlyNotes) {
+ return monthlyNotes[getDateUID(date, "month")] ?? null;
+}
+function getAllMonthlyNotes() {
+ const monthlyNotes = {};
+ if (!appHasMonthlyNotesPluginLoaded()) {
+ return monthlyNotes;
+ }
+ const { vault } = window.app;
+ const { folder } = getMonthlyNoteSettings();
+ const monthlyNotesFolder = vault.getAbstractFileByPath(obsidian__default['default'].normalizePath(folder));
+ if (!monthlyNotesFolder) {
+ throw new MonthlyNotesFolderMissingError("Failed to find monthly notes folder");
+ }
+ obsidian__default['default'].Vault.recurseChildren(monthlyNotesFolder, (note) => {
+ if (note instanceof obsidian__default['default'].TFile) {
+ const date = getDateFromFile(note, "month");
+ if (date) {
+ const dateString = getDateUID(date, "month");
+ monthlyNotes[dateString] = note;
+ }
+ }
+ });
+ return monthlyNotes;
+}
+
+class QuarterlyNotesFolderMissingError extends Error {
+}
+/**
+ * This function mimics the behavior of the daily-notes plugin
+ * so it will replace {{date}}, {{title}}, and {{time}} with the
+ * formatted timestamp.
+ *
+ * Note: it has an added bonus that it's not 'today' specific.
+ */
+async function createQuarterlyNote(date) {
+ const { vault } = window.app;
+ const { template, format, folder } = getQuarterlyNoteSettings();
+ const [templateContents, IFoldInfo] = await getTemplateInfo(template);
+ const filename = date.format(format);
+ const normalizedPath = await getNotePath(folder, filename);
+ try {
+ const createdFile = await vault.create(normalizedPath, templateContents
+ .replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_, _timeOrDate, calc, timeDelta, unit, momentFormat) => {
+ const now = window.moment();
+ const currentDate = date.clone().set({
+ hour: now.get("hour"),
+ minute: now.get("minute"),
+ second: now.get("second"),
+ });
+ if (calc) {
+ currentDate.add(parseInt(timeDelta, 10), unit);
+ }
+ if (momentFormat) {
+ return currentDate.format(momentFormat.substring(1).trim());
+ }
+ return currentDate.format(format);
+ })
+ .replace(/{{\s*date\s*}}/gi, filename)
+ .replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm"))
+ .replace(/{{\s*title\s*}}/gi, filename));
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ window.app.foldManager.save(createdFile, IFoldInfo);
+ return createdFile;
+ }
+ catch (err) {
+ console.error(`Failed to create file: '${normalizedPath}'`, err);
+ new obsidian__default['default'].Notice("Unable to create new file.");
+ }
+}
+function getQuarterlyNote(date, quarterly) {
+ return quarterly[getDateUID(date, "quarter")] ?? null;
+}
+function getAllQuarterlyNotes() {
+ const quarterly = {};
+ if (!appHasQuarterlyNotesPluginLoaded()) {
+ return quarterly;
+ }
+ const { vault } = window.app;
+ const { folder } = getQuarterlyNoteSettings();
+ const quarterlyFolder = vault.getAbstractFileByPath(obsidian__default['default'].normalizePath(folder));
+ if (!quarterlyFolder) {
+ throw new QuarterlyNotesFolderMissingError("Failed to find quarterly notes folder");
+ }
+ obsidian__default['default'].Vault.recurseChildren(quarterlyFolder, (note) => {
+ if (note instanceof obsidian__default['default'].TFile) {
+ const date = getDateFromFile(note, "quarter");
+ if (date) {
+ const dateString = getDateUID(date, "quarter");
+ quarterly[dateString] = note;
+ }
+ }
+ });
+ return quarterly;
+}
+
+class YearlyNotesFolderMissingError extends Error {
+}
+/**
+ * This function mimics the behavior of the daily-notes plugin
+ * so it will replace {{date}}, {{title}}, and {{time}} with the
+ * formatted timestamp.
+ *
+ * Note: it has an added bonus that it's not 'today' specific.
+ */
+async function createYearlyNote(date) {
+ const { vault } = window.app;
+ const { template, format, folder } = getYearlyNoteSettings();
+ const [templateContents, IFoldInfo] = await getTemplateInfo(template);
+ const filename = date.format(format);
+ const normalizedPath = await getNotePath(folder, filename);
+ try {
+ const createdFile = await vault.create(normalizedPath, templateContents
+ .replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_, _timeOrDate, calc, timeDelta, unit, momentFormat) => {
+ const now = window.moment();
+ const currentDate = date.clone().set({
+ hour: now.get("hour"),
+ minute: now.get("minute"),
+ second: now.get("second"),
+ });
+ if (calc) {
+ currentDate.add(parseInt(timeDelta, 10), unit);
+ }
+ if (momentFormat) {
+ return currentDate.format(momentFormat.substring(1).trim());
+ }
+ return currentDate.format(format);
+ })
+ .replace(/{{\s*date\s*}}/gi, filename)
+ .replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm"))
+ .replace(/{{\s*title\s*}}/gi, filename));
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ window.app.foldManager.save(createdFile, IFoldInfo);
+ return createdFile;
+ }
+ catch (err) {
+ console.error(`Failed to create file: '${normalizedPath}'`, err);
+ new obsidian__default['default'].Notice("Unable to create new file.");
+ }
+}
+function getYearlyNote(date, yearlyNotes) {
+ return yearlyNotes[getDateUID(date, "year")] ?? null;
+}
+function getAllYearlyNotes() {
+ const yearlyNotes = {};
+ if (!appHasYearlyNotesPluginLoaded()) {
+ return yearlyNotes;
+ }
+ const { vault } = window.app;
+ const { folder } = getYearlyNoteSettings();
+ const yearlyNotesFolder = vault.getAbstractFileByPath(obsidian__default['default'].normalizePath(folder));
+ if (!yearlyNotesFolder) {
+ throw new YearlyNotesFolderMissingError("Failed to find yearly notes folder");
+ }
+ obsidian__default['default'].Vault.recurseChildren(yearlyNotesFolder, (note) => {
+ if (note instanceof obsidian__default['default'].TFile) {
+ const date = getDateFromFile(note, "year");
+ if (date) {
+ const dateString = getDateUID(date, "year");
+ yearlyNotes[dateString] = note;
+ }
+ }
+ });
+ return yearlyNotes;
+}
+
+function appHasDailyNotesPluginLoaded() {
+ const { app } = window;
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const dailyNotesPlugin = app.internalPlugins.plugins["daily-notes"];
+ if (dailyNotesPlugin && dailyNotesPlugin.enabled) {
+ return true;
+ }
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const periodicNotes = app.plugins.getPlugin("periodic-notes");
+ return periodicNotes && periodicNotes.settings?.daily?.enabled;
+}
+/**
+ * XXX: "Weekly Notes" live in either the Calendar plugin or the periodic-notes plugin.
+ * Check both until the weekly notes feature is removed from the Calendar plugin.
+ */
+function appHasWeeklyNotesPluginLoaded() {
+ const { app } = window;
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ if (app.plugins.getPlugin("calendar")) {
+ return true;
+ }
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const periodicNotes = app.plugins.getPlugin("periodic-notes");
+ return periodicNotes && periodicNotes.settings?.weekly?.enabled;
+}
+function appHasMonthlyNotesPluginLoaded() {
+ const { app } = window;
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const periodicNotes = app.plugins.getPlugin("periodic-notes");
+ return periodicNotes && periodicNotes.settings?.monthly?.enabled;
+}
+function appHasQuarterlyNotesPluginLoaded() {
+ const { app } = window;
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const periodicNotes = app.plugins.getPlugin("periodic-notes");
+ return periodicNotes && periodicNotes.settings?.quarterly?.enabled;
+}
+function appHasYearlyNotesPluginLoaded() {
+ const { app } = window;
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const periodicNotes = app.plugins.getPlugin("periodic-notes");
+ return periodicNotes && periodicNotes.settings?.yearly?.enabled;
+}
+
+var DEFAULT_DAILY_NOTE_FORMAT_1 = DEFAULT_DAILY_NOTE_FORMAT;
+var DEFAULT_MONTHLY_NOTE_FORMAT_1 = DEFAULT_MONTHLY_NOTE_FORMAT;
+var DEFAULT_QUARTERLY_NOTE_FORMAT_1 = DEFAULT_QUARTERLY_NOTE_FORMAT;
+var DEFAULT_WEEKLY_NOTE_FORMAT_1 = DEFAULT_WEEKLY_NOTE_FORMAT;
+var DEFAULT_YEARLY_NOTE_FORMAT_1 = DEFAULT_YEARLY_NOTE_FORMAT;
+var appHasDailyNotesPluginLoaded_1 = appHasDailyNotesPluginLoaded;
+var createDailyNote_1 = createDailyNote;
+var createMonthlyNote_1 = createMonthlyNote;
+var createQuarterlyNote_1 = createQuarterlyNote;
+var createWeeklyNote_1 = createWeeklyNote;
+var createYearlyNote_1 = createYearlyNote;
+var getAllDailyNotes_1 = getAllDailyNotes;
+var getAllMonthlyNotes_1 = getAllMonthlyNotes;
+var getAllQuarterlyNotes_1 = getAllQuarterlyNotes;
+var getAllWeeklyNotes_1 = getAllWeeklyNotes;
+var getAllYearlyNotes_1 = getAllYearlyNotes;
+var getDailyNote_1 = getDailyNote;
+var getDateFromFile_1 = getDateFromFile;
+var getMonthlyNote_1 = getMonthlyNote;
+var getQuarterlyNote_1 = getQuarterlyNote;
+var getWeeklyNote_1 = getWeeklyNote;
+var getYearlyNote_1 = getYearlyNote;
+
+const wrapAround = (value, size) => {
+ return ((value % size) + size) % size;
+};
+function orderedValues(unordered) {
+ return Object.keys(unordered)
+ .sort()
+ .reduce((acc, key) => {
+ acc.push(unordered[key]);
+ return acc;
+ }, []);
+}
+function getCalendarPlugin() {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ return window.app.plugins.getPlugin("calendar");
+}
+function getDailyNotesPlugin() {
+ var _a;
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ const { internalPlugins } = window.app;
+ return (_a = internalPlugins.getPluginById("daily-notes")) === null || _a === void 0 ? void 0 : _a.instance;
+}
+function capitalize(text) {
+ return text.charAt(0).toUpperCase() + text.slice(1);
+}
+function hasLegacyDailyNoteSettings() {
+ var _a;
+ if (!appHasDailyNotesPluginLoaded_1()) {
+ return false;
+ }
+ const options = (_a = getDailyNotesPlugin()) === null || _a === void 0 ? void 0 : _a.options;
+ return !!(options.format || options.folder || options.template);
+}
+function getLegacyDailyNoteSettings() {
+ var _a, _b;
+ const options = getDailyNotesPlugin().options || {};
+ return {
+ format: options.format,
+ folder: (_a = options.folder) === null || _a === void 0 ? void 0 : _a.trim(),
+ template: (_b = options.template) === null || _b === void 0 ? void 0 : _b.trim(),
+ };
+}
+function hasLegacyWeeklyNoteSettings() {
+ const calendarPlugin = getCalendarPlugin();
+ if (!calendarPlugin) {
+ return false;
+ }
+ const options = calendarPlugin.options || {};
+ return !!(options.weeklyNoteFormat ||
+ options.weeklyNoteFolder ||
+ options.weeklyNoteTemplate);
+}
+function getLegacyWeeklyNoteSettings() {
+ var _a, _b;
+ const options = getCalendarPlugin().options || {};
+ return {
+ format: options.weeklyNoteFormat || "",
+ folder: ((_a = options.weeklyNoteFolder) === null || _a === void 0 ? void 0 : _a.trim()) || "",
+ template: ((_b = options.weeklyNoteTemplate) === null || _b === void 0 ? void 0 : _b.trim()) || "",
+ };
+}
+function isMacOS() {
+ return navigator.appVersion.indexOf("Mac") !== -1;
+}
+function isMetaPressed(e) {
+ return isMacOS() ? e.metaKey : e.ctrlKey;
+}
+
+const periodConfigs = {
+ daily: {
+ unitOfTime: "day",
+ relativeUnit: "today",
+ createNote: createDailyNote_1,
+ getNote: getDailyNote_1,
+ getAllNotes: getAllDailyNotes_1,
+ },
+ weekly: {
+ unitOfTime: "week",
+ relativeUnit: "this week",
+ createNote: createWeeklyNote_1,
+ getNote: getWeeklyNote_1,
+ getAllNotes: getAllWeeklyNotes_1,
+ },
+ monthly: {
+ unitOfTime: "month",
+ relativeUnit: "this month",
+ createNote: createMonthlyNote_1,
+ getNote: getMonthlyNote_1,
+ getAllNotes: getAllMonthlyNotes_1,
+ },
+ quarterly: {
+ unitOfTime: "quarter",
+ relativeUnit: "this quarter",
+ createNote: createQuarterlyNote_1,
+ getNote: getQuarterlyNote_1,
+ getAllNotes: getAllQuarterlyNotes_1,
+ },
+ yearly: {
+ unitOfTime: "year",
+ relativeUnit: "this year",
+ createNote: createYearlyNote_1,
+ getNote: getYearlyNote_1,
+ getAllNotes: getAllYearlyNotes_1,
+ },
+};
+async function openPeriodicNote(periodicity, date, inNewSplit) {
+ const config = periodConfigs[periodicity];
+ const startOfPeriod = date.clone().startOf(config.unitOfTime);
+ let allNotes;
+ try {
+ allNotes = config.getAllNotes();
+ }
+ catch (err) {
+ console.error(`failed to find your ${periodicity} notes folder`, err);
+ new obsidian.Notice(`Failed to find your ${periodicity} notes folder`);
+ return;
+ }
+ let periodicNote = config.getNote(startOfPeriod, allNotes);
+ if (!periodicNote) {
+ periodicNote = await config.createNote(startOfPeriod);
+ }
+ await openFile(periodicNote, inNewSplit);
+}
+function getActiveFile() {
+ const { workspace } = window.app;
+ const activeView = workspace.getActiveViewOfType(obsidian.MarkdownView);
+ return activeView === null || activeView === void 0 ? void 0 : activeView.file;
+}
+async function openFile(file, inNewSplit) {
+ const { workspace } = window.app;
+ const leaf = inNewSplit
+ ? workspace.splitActiveLeaf()
+ : workspace.getUnpinnedLeaf();
+ await leaf.openFile(file, { active: true });
+}
+async function openNextNote(periodicity) {
+ const config = periodConfigs[periodicity];
+ const activeFile = getActiveFile();
+ try {
+ const allNotes = orderedValues(config.getAllNotes());
+ const activeNoteIndex = allNotes.findIndex((file) => file === activeFile);
+ const nextNote = allNotes[activeNoteIndex + 1];
+ if (nextNote) {
+ await openFile(nextNote, false);
+ }
+ }
+ catch (err) {
+ console.error(`failed to find your ${periodicity} notes folder`, err);
+ new obsidian.Notice(`Failed to find your ${periodicity} notes folder`);
+ }
+}
+async function openPrevNote(periodicity) {
+ const config = periodConfigs[periodicity];
+ const activeFile = getActiveFile();
+ try {
+ const allNotes = orderedValues(config.getAllNotes());
+ const activeNoteIndex = allNotes.findIndex((file) => file === activeFile);
+ const prevNote = allNotes[activeNoteIndex - 1];
+ if (prevNote) {
+ await openFile(prevNote, false);
+ }
+ }
+ catch (err) {
+ console.error(`failed to find your ${periodicity} notes folder`, err);
+ new obsidian.Notice(`Failed to find your ${periodicity} notes folder`);
+ }
+}
+function getCommands(periodicity) {
+ const config = periodConfigs[periodicity];
+ return [
+ {
+ id: `open-${periodicity}-note`,
+ name: `Open ${periodicity} note`,
+ callback: () => openPeriodicNote(periodicity, window.moment(), false),
+ },
+ {
+ id: `next-${periodicity}-note`,
+ name: `Open next ${periodicity} note`,
+ checkCallback: (checking) => {
+ if (checking) {
+ const activeFile = getActiveFile();
+ return !!(activeFile && getDateFromFile_1(activeFile, config.unitOfTime));
+ }
+ openNextNote(periodicity);
+ },
+ },
+ {
+ id: `prev-${periodicity}-note`,
+ name: `Open previous ${periodicity} note`,
+ checkCallback: (checking) => {
+ if (checking) {
+ const activeFile = getActiveFile();
+ return !!(activeFile && getDateFromFile_1(activeFile, config.unitOfTime));
+ }
+ openPrevNote(periodicity);
+ },
+ },
+ ];
+}
+
+const SETTINGS_UPDATED = "periodic-notes:settings-updated";
+
+const calendarDayIcon = `
+
+
+
+
+`;
+const calendarWeekIcon = `
+
+
+
+
+`;
+const calendarMonthIcon = `
+
+
+
+
+
+`;
+const calendarQuarterIcon = `
+
+`;
+const calendarYearIcon = `
+
+`;
+
+function showFileMenu(app, settings, position) {
+ const contextMenu = new obsidian.Menu(app);
+ ["daily", "weekly", "monthly"]
+ .filter((periodicity) => settings[periodicity].enabled)
+ .forEach((periodicity) => {
+ const config = periodConfigs[periodicity];
+ contextMenu.addItem((item) => item
+ .setTitle(`Open ${config.relativeUnit}`)
+ .setIcon(`calendar-${config.unitOfTime}`)
+ .onClick(() => {
+ openPeriodicNote(periodicity, window.moment(), false);
+ }));
+ });
+ contextMenu.showAtPosition(position);
+}
+
+function noop() { }
+const identity = x => x;
+function run(fn) {
+ return fn();
+}
+function blank_object() {
+ return Object.create(null);
+}
+function run_all(fns) {
+ fns.forEach(run);
+}
+function is_function(thing) {
+ return typeof thing === 'function';
+}
+function safe_not_equal(a, b) {
+ return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
+}
+function is_empty(obj) {
+ return Object.keys(obj).length === 0;
+}
+function subscribe(store, ...callbacks) {
+ if (store == null) {
+ return noop;
+ }
+ const unsub = store.subscribe(...callbacks);
+ return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
+}
+function component_subscribe(component, store, callback) {
+ component.$$.on_destroy.push(subscribe(store, callback));
+}
+function set_store_value(store, ret, value = ret) {
+ store.set(value);
+ return ret;
+}
+
+const is_client = typeof window !== 'undefined';
+let now = is_client
+ ? () => window.performance.now()
+ : () => Date.now();
+let raf = is_client ? cb => requestAnimationFrame(cb) : noop;
+
+const tasks = new Set();
+function run_tasks(now) {
+ tasks.forEach(task => {
+ if (!task.c(now)) {
+ tasks.delete(task);
+ task.f();
+ }
+ });
+ if (tasks.size !== 0)
+ raf(run_tasks);
+}
+/**
+ * Creates a new task that runs on each raf frame
+ * until it returns a falsy value or is aborted
+ */
+function loop(callback) {
+ let task;
+ if (tasks.size === 0)
+ raf(run_tasks);
+ return {
+ promise: new Promise(fulfill => {
+ tasks.add(task = { c: callback, f: fulfill });
+ }),
+ abort() {
+ tasks.delete(task);
+ }
+ };
+}
+
+function append(target, node) {
+ target.appendChild(node);
+}
+function insert(target, node, anchor) {
+ target.insertBefore(node, anchor || null);
+}
+function detach(node) {
+ node.parentNode.removeChild(node);
+}
+function destroy_each(iterations, detaching) {
+ for (let i = 0; i < iterations.length; i += 1) {
+ if (iterations[i])
+ iterations[i].d(detaching);
+ }
+}
+function element(name) {
+ return document.createElement(name);
+}
+function svg_element(name) {
+ return document.createElementNS('http://www.w3.org/2000/svg', name);
+}
+function text(data) {
+ return document.createTextNode(data);
+}
+function space() {
+ return text(' ');
+}
+function empty() {
+ return text('');
+}
+function listen(node, event, handler, options) {
+ node.addEventListener(event, handler, options);
+ return () => node.removeEventListener(event, handler, options);
+}
+function attr(node, attribute, value) {
+ if (value == null)
+ node.removeAttribute(attribute);
+ else if (node.getAttribute(attribute) !== value)
+ node.setAttribute(attribute, value);
+}
+function children(element) {
+ return Array.from(element.childNodes);
+}
+function set_data(text, data) {
+ data = '' + data;
+ if (text.wholeText !== data)
+ text.data = data;
+}
+function set_input_value(input, value) {
+ input.value = value == null ? '' : value;
+}
+function toggle_class(element, name, toggle) {
+ element.classList[toggle ? 'add' : 'remove'](name);
+}
+function custom_event(type, detail) {
+ const e = document.createEvent('CustomEvent');
+ e.initCustomEvent(type, false, false, detail);
+ return e;
+}
+
+const active_docs = new Set();
+let active = 0;
+// https://github.com/darkskyapp/string-hash/blob/master/index.js
+function hash$2(str) {
+ let hash = 5381;
+ let i = str.length;
+ while (i--)
+ hash = ((hash << 5) - hash) ^ str.charCodeAt(i);
+ return hash >>> 0;
+}
+function create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {
+ const step = 16.666 / duration;
+ let keyframes = '{\n';
+ for (let p = 0; p <= 1; p += step) {
+ const t = a + (b - a) * ease(p);
+ keyframes += p * 100 + `%{${fn(t, 1 - t)}}\n`;
+ }
+ const rule = keyframes + `100% {${fn(b, 1 - b)}}\n}`;
+ const name = `__svelte_${hash$2(rule)}_${uid}`;
+ const doc = node.ownerDocument;
+ active_docs.add(doc);
+ const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);
+ const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});
+ if (!current_rules[name]) {
+ current_rules[name] = true;
+ stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);
+ }
+ const animation = node.style.animation || '';
+ node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;
+ active += 1;
+ return name;
+}
+function delete_rule(node, name) {
+ const previous = (node.style.animation || '').split(', ');
+ const next = previous.filter(name
+ ? anim => anim.indexOf(name) < 0 // remove specific animation
+ : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations
+ );
+ const deleted = previous.length - next.length;
+ if (deleted) {
+ node.style.animation = next.join(', ');
+ active -= deleted;
+ if (!active)
+ clear_rules();
+ }
+}
+function clear_rules() {
+ raf(() => {
+ if (active)
+ return;
+ active_docs.forEach(doc => {
+ const stylesheet = doc.__svelte_stylesheet;
+ let i = stylesheet.cssRules.length;
+ while (i--)
+ stylesheet.deleteRule(i);
+ doc.__svelte_rules = {};
+ });
+ active_docs.clear();
+ });
+}
+
+let current_component;
+function set_current_component(component) {
+ current_component = component;
+}
+function get_current_component() {
+ if (!current_component)
+ throw new Error('Function called outside component initialization');
+ return current_component;
+}
+function onMount(fn) {
+ get_current_component().$$.on_mount.push(fn);
+}
+function onDestroy(fn) {
+ get_current_component().$$.on_destroy.push(fn);
+}
+
+const dirty_components = [];
+const binding_callbacks = [];
+const render_callbacks = [];
+const flush_callbacks = [];
+const resolved_promise = Promise.resolve();
+let update_scheduled = false;
+function schedule_update() {
+ if (!update_scheduled) {
+ update_scheduled = true;
+ resolved_promise.then(flush);
+ }
+}
+function add_render_callback(fn) {
+ render_callbacks.push(fn);
+}
+let flushing = false;
+const seen_callbacks = new Set();
+function flush() {
+ if (flushing)
+ return;
+ flushing = true;
+ do {
+ // first, call beforeUpdate functions
+ // and update components
+ for (let i = 0; i < dirty_components.length; i += 1) {
+ const component = dirty_components[i];
+ set_current_component(component);
+ update(component.$$);
+ }
+ set_current_component(null);
+ dirty_components.length = 0;
+ while (binding_callbacks.length)
+ binding_callbacks.pop()();
+ // then, once components are updated, call
+ // afterUpdate functions. This may cause
+ // subsequent updates...
+ for (let i = 0; i < render_callbacks.length; i += 1) {
+ const callback = render_callbacks[i];
+ if (!seen_callbacks.has(callback)) {
+ // ...so guard against infinite loops
+ seen_callbacks.add(callback);
+ callback();
+ }
+ }
+ render_callbacks.length = 0;
+ } while (dirty_components.length);
+ while (flush_callbacks.length) {
+ flush_callbacks.pop()();
+ }
+ update_scheduled = false;
+ flushing = false;
+ seen_callbacks.clear();
+}
+function update($$) {
+ if ($$.fragment !== null) {
+ $$.update();
+ run_all($$.before_update);
+ const dirty = $$.dirty;
+ $$.dirty = [-1];
+ $$.fragment && $$.fragment.p($$.ctx, dirty);
+ $$.after_update.forEach(add_render_callback);
+ }
+}
+
+let promise;
+function wait() {
+ if (!promise) {
+ promise = Promise.resolve();
+ promise.then(() => {
+ promise = null;
+ });
+ }
+ return promise;
+}
+function dispatch(node, direction, kind) {
+ node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));
+}
+const outroing = new Set();
+let outros;
+function group_outros() {
+ outros = {
+ r: 0,
+ c: [],
+ p: outros // parent group
+ };
+}
+function check_outros() {
+ if (!outros.r) {
+ run_all(outros.c);
+ }
+ outros = outros.p;
+}
+function transition_in(block, local) {
+ if (block && block.i) {
+ outroing.delete(block);
+ block.i(local);
+ }
+}
+function transition_out(block, local, detach, callback) {
+ if (block && block.o) {
+ if (outroing.has(block))
+ return;
+ outroing.add(block);
+ outros.c.push(() => {
+ outroing.delete(block);
+ if (callback) {
+ if (detach)
+ block.d(1);
+ callback();
+ }
+ });
+ block.o(local);
+ }
+}
+const null_transition = { duration: 0 };
+function create_in_transition(node, fn, params) {
+ let config = fn(node, params);
+ let running = false;
+ let animation_name;
+ let task;
+ let uid = 0;
+ function cleanup() {
+ if (animation_name)
+ delete_rule(node, animation_name);
+ }
+ function go() {
+ const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;
+ if (css)
+ animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);
+ tick(0, 1);
+ const start_time = now() + delay;
+ const end_time = start_time + duration;
+ if (task)
+ task.abort();
+ running = true;
+ add_render_callback(() => dispatch(node, true, 'start'));
+ task = loop(now => {
+ if (running) {
+ if (now >= end_time) {
+ tick(1, 0);
+ dispatch(node, true, 'end');
+ cleanup();
+ return running = false;
+ }
+ if (now >= start_time) {
+ const t = easing((now - start_time) / duration);
+ tick(t, 1 - t);
+ }
+ }
+ return running;
+ });
+ }
+ let started = false;
+ return {
+ start() {
+ if (started)
+ return;
+ delete_rule(node);
+ if (is_function(config)) {
+ config = config();
+ wait().then(go);
+ }
+ else {
+ go();
+ }
+ },
+ invalidate() {
+ started = false;
+ },
+ end() {
+ if (running) {
+ cleanup();
+ running = false;
+ }
+ }
+ };
+}
+function create_out_transition(node, fn, params) {
+ let config = fn(node, params);
+ let running = true;
+ let animation_name;
+ const group = outros;
+ group.r += 1;
+ function go() {
+ const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;
+ if (css)
+ animation_name = create_rule(node, 1, 0, duration, delay, easing, css);
+ const start_time = now() + delay;
+ const end_time = start_time + duration;
+ add_render_callback(() => dispatch(node, false, 'start'));
+ loop(now => {
+ if (running) {
+ if (now >= end_time) {
+ tick(0, 1);
+ dispatch(node, false, 'end');
+ if (!--group.r) {
+ // this will result in `end()` being called,
+ // so we don't need to clean up here
+ run_all(group.c);
+ }
+ return false;
+ }
+ if (now >= start_time) {
+ const t = easing((now - start_time) / duration);
+ tick(1 - t, t);
+ }
+ }
+ return running;
+ });
+ }
+ if (is_function(config)) {
+ wait().then(() => {
+ // @ts-ignore
+ config = config();
+ go();
+ });
+ }
+ else {
+ go();
+ }
+ return {
+ end(reset) {
+ if (reset && config.tick) {
+ config.tick(1, 0);
+ }
+ if (running) {
+ if (animation_name)
+ delete_rule(node, animation_name);
+ running = false;
+ }
+ }
+ };
+}
+function create_component(block) {
+ block && block.c();
+}
+function mount_component(component, target, anchor, customElement) {
+ const { fragment, on_mount, on_destroy, after_update } = component.$$;
+ fragment && fragment.m(target, anchor);
+ if (!customElement) {
+ // onMount happens before the initial afterUpdate
+ add_render_callback(() => {
+ const new_on_destroy = on_mount.map(run).filter(is_function);
+ if (on_destroy) {
+ on_destroy.push(...new_on_destroy);
+ }
+ else {
+ // Edge case - component was destroyed immediately,
+ // most likely as a result of a binding initialising
+ run_all(new_on_destroy);
+ }
+ component.$$.on_mount = [];
+ });
+ }
+ after_update.forEach(add_render_callback);
+}
+function destroy_component(component, detaching) {
+ const $$ = component.$$;
+ if ($$.fragment !== null) {
+ run_all($$.on_destroy);
+ $$.fragment && $$.fragment.d(detaching);
+ // TODO null out other refs, including component.$$ (but need to
+ // preserve final state?)
+ $$.on_destroy = $$.fragment = null;
+ $$.ctx = [];
+ }
+}
+function make_dirty(component, i) {
+ if (component.$$.dirty[0] === -1) {
+ dirty_components.push(component);
+ schedule_update();
+ component.$$.dirty.fill(0);
+ }
+ component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
+}
+function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {
+ const parent_component = current_component;
+ set_current_component(component);
+ const $$ = component.$$ = {
+ fragment: null,
+ ctx: null,
+ // state
+ props,
+ update: noop,
+ not_equal,
+ bound: blank_object(),
+ // lifecycle
+ on_mount: [],
+ on_destroy: [],
+ on_disconnect: [],
+ before_update: [],
+ after_update: [],
+ context: new Map(parent_component ? parent_component.$$.context : []),
+ // everything else
+ callbacks: blank_object(),
+ dirty,
+ skip_bound: false
+ };
+ let ready = false;
+ $$.ctx = instance
+ ? instance(component, options.props || {}, (i, ret, ...rest) => {
+ const value = rest.length ? rest[0] : ret;
+ if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
+ if (!$$.skip_bound && $$.bound[i])
+ $$.bound[i](value);
+ if (ready)
+ make_dirty(component, i);
+ }
+ return ret;
+ })
+ : [];
+ $$.update();
+ ready = true;
+ run_all($$.before_update);
+ // `false` as a special case of no DOM component
+ $$.fragment = create_fragment ? create_fragment($$.ctx) : false;
+ if (options.target) {
+ if (options.hydrate) {
+ const nodes = children(options.target);
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ $$.fragment && $$.fragment.l(nodes);
+ nodes.forEach(detach);
+ }
+ else {
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ $$.fragment && $$.fragment.c();
+ }
+ if (options.intro)
+ transition_in(component.$$.fragment);
+ mount_component(component, options.target, options.anchor, options.customElement);
+ flush();
+ }
+ set_current_component(parent_component);
+}
+/**
+ * Base class for Svelte components. Used when dev=false.
+ */
+class SvelteComponent {
+ $destroy() {
+ destroy_component(this, 1);
+ this.$destroy = noop;
+ }
+ $on(type, callback) {
+ const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
+ callbacks.push(callback);
+ return () => {
+ const index = callbacks.indexOf(callback);
+ if (index !== -1)
+ callbacks.splice(index, 1);
+ };
+ }
+ $set($$props) {
+ if (this.$$set && !is_empty($$props)) {
+ this.$$.skip_bound = true;
+ this.$$set($$props);
+ this.$$.skip_bound = false;
+ }
+ }
+}
+
+const subscriber_queue = [];
+/**
+ * Create a `Writable` store that allows both updating and reading by subscription.
+ * @param {*=}value initial value
+ * @param {StartStopNotifier=}start start and stop notifications for subscriptions
+ */
+function writable(value, start = noop) {
+ let stop;
+ const subscribers = [];
+ function set(new_value) {
+ if (safe_not_equal(value, new_value)) {
+ value = new_value;
+ if (stop) { // store is ready
+ const run_queue = !subscriber_queue.length;
+ for (let i = 0; i < subscribers.length; i += 1) {
+ const s = subscribers[i];
+ s[1]();
+ subscriber_queue.push(s, value);
+ }
+ if (run_queue) {
+ for (let i = 0; i < subscriber_queue.length; i += 2) {
+ subscriber_queue[i][0](subscriber_queue[i + 1]);
+ }
+ subscriber_queue.length = 0;
+ }
+ }
+ }
+ }
+ function update(fn) {
+ set(fn(value));
+ }
+ function subscribe(run, invalidate = noop) {
+ const subscriber = [run, invalidate];
+ subscribers.push(subscriber);
+ if (subscribers.length === 1) {
+ stop = start(set) || noop;
+ }
+ run(value);
+ return () => {
+ const index = subscribers.indexOf(subscriber);
+ if (index !== -1) {
+ subscribers.splice(index, 1);
+ }
+ if (subscribers.length === 0) {
+ stop();
+ stop = null;
+ }
+ };
+ }
+ return { set, update, subscribe };
+}
+
+function cubicOut(t) {
+ const f = t - 1.0;
+ return f * f * f + 1.0;
+}
+
+function slide(node, { delay = 0, duration = 400, easing = cubicOut } = {}) {
+ const style = getComputedStyle(node);
+ const opacity = +style.opacity;
+ const height = parseFloat(style.height);
+ const padding_top = parseFloat(style.paddingTop);
+ const padding_bottom = parseFloat(style.paddingBottom);
+ const margin_top = parseFloat(style.marginTop);
+ const margin_bottom = parseFloat(style.marginBottom);
+ const border_top_width = parseFloat(style.borderTopWidth);
+ const border_bottom_width = parseFloat(style.borderBottomWidth);
+ return {
+ delay,
+ duration,
+ easing,
+ css: t => 'overflow: hidden;' +
+ `opacity: ${Math.min(t * 20, 1) * opacity};` +
+ `height: ${t * height}px;` +
+ `padding-top: ${t * padding_top}px;` +
+ `padding-bottom: ${t * padding_bottom}px;` +
+ `margin-top: ${t * margin_top}px;` +
+ `margin-bottom: ${t * margin_bottom}px;` +
+ `border-top-width: ${t * border_top_width}px;` +
+ `border-bottom-width: ${t * border_bottom_width}px;`
+ };
+}
+
+/* src/settings/Checkmark.svelte generated by Svelte v3.35.0 */
+
+function add_css$1() {
+ var style = element("style");
+ style.id = "svelte-1q3q9tf-style";
+ style.textContent = ".check.svelte-1q3q9tf{margin-left:6px;width:12px;height:12px}";
+ append(document.head, style);
+}
+
+function create_fragment$5(ctx) {
+ let svg;
+ let path;
+
+ return {
+ c() {
+ svg = svg_element("svg");
+ path = svg_element("path");
+ attr(path, "fill", "currentColor");
+ attr(path, "d", "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z");
+ attr(svg, "aria-hidden", "true");
+ attr(svg, "focusable", "false");
+ attr(svg, "class", "check svelte-1q3q9tf");
+ attr(svg, "data-icon", "check");
+ attr(svg, "role", "img");
+ attr(svg, "xmlns", "http://www.w3.org/2000/svg");
+ attr(svg, "viewBox", "0 0 512 512");
+ },
+ m(target, anchor) {
+ insert(target, svg, anchor);
+ append(svg, path);
+ },
+ p: noop,
+ i: noop,
+ o: noop,
+ d(detaching) {
+ if (detaching) detach(svg);
+ }
+ };
+}
+
+class Checkmark extends SvelteComponent {
+ constructor(options) {
+ super();
+ if (!document.getElementById("svelte-1q3q9tf-style")) add_css$1();
+ init(this, options, null, create_fragment$5, safe_not_equal, {});
+ }
+}
+
+/* src/settings/GettingStartedBanner.svelte generated by Svelte v3.35.0 */
+
+function add_css() {
+ var style = element("style");
+ style.id = "svelte-1alo0m9-style";
+ style.textContent = "button.svelte-1alo0m9{display:flex;align-items:center}";
+ append(document.head, style);
+}
+
+// (20:2) {#if hasDailyNoteSettings}
+function create_if_block_3(ctx) {
+ let div2;
+ let div0;
+ let h4;
+ let t1;
+ let t2;
+ let div1;
+ let current_block_type_index;
+ let if_block1;
+ let current;
+
+ function select_block_type(ctx, dirty) {
+ if (/*$settings*/ ctx[5].hasMigratedDailyNoteSettings) return create_if_block_5;
+ return create_else_block_2;
+ }
+
+ let current_block_type = select_block_type(ctx);
+ let if_block0 = current_block_type(ctx);
+ const if_block_creators = [create_if_block_4, create_else_block_1];
+ const if_blocks = [];
+
+ function select_block_type_1(ctx, dirty) {
+ if (/*$settings*/ ctx[5].hasMigratedDailyNoteSettings) return 0;
+ return 1;
+ }
+
+ current_block_type_index = select_block_type_1(ctx);
+ if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
+
+ return {
+ c() {
+ div2 = element("div");
+ div0 = element("div");
+ h4 = element("h4");
+ h4.textContent = "Daily Notes plugin is enabled";
+ t1 = space();
+ if_block0.c();
+ t2 = space();
+ div1 = element("div");
+ if_block1.c();
+ attr(div0, "class", "setting-item-info");
+ attr(div1, "class", "setting-item-control");
+ attr(div2, "class", "setting-item");
+ },
+ m(target, anchor) {
+ insert(target, div2, anchor);
+ append(div2, div0);
+ append(div0, h4);
+ append(div0, t1);
+ if_block0.m(div0, null);
+ append(div2, t2);
+ append(div2, div1);
+ if_blocks[current_block_type_index].m(div1, null);
+ current = true;
+ },
+ p(ctx, dirty) {
+ if (current_block_type !== (current_block_type = select_block_type(ctx))) {
+ if_block0.d(1);
+ if_block0 = current_block_type(ctx);
+
+ if (if_block0) {
+ if_block0.c();
+ if_block0.m(div0, null);
+ }
+ }
+
+ let previous_block_index = current_block_type_index;
+ current_block_type_index = select_block_type_1(ctx);
+
+ if (current_block_type_index === previous_block_index) {
+ if_blocks[current_block_type_index].p(ctx, dirty);
+ } else {
+ group_outros();
+
+ transition_out(if_blocks[previous_block_index], 1, 1, () => {
+ if_blocks[previous_block_index] = null;
+ });
+
+ check_outros();
+ if_block1 = if_blocks[current_block_type_index];
+
+ if (!if_block1) {
+ if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
+ if_block1.c();
+ } else {
+ if_block1.p(ctx, dirty);
+ }
+
+ transition_in(if_block1, 1);
+ if_block1.m(div1, null);
+ }
+ },
+ i(local) {
+ if (current) return;
+ transition_in(if_block1);
+ current = true;
+ },
+ o(local) {
+ transition_out(if_block1);
+ current = false;
+ },
+ d(detaching) {
+ if (detaching) detach(div2);
+ if_block0.d();
+ if_blocks[current_block_type_index].d();
+ }
+ };
+}
+
+// (31:8) {:else}
+function create_else_block_2(ctx) {
+ let p;
+
+ return {
+ c() {
+ p = element("p");
+ p.textContent = "You are currently using the core Daily Notes plugin. You can migrate\n those settings over to Periodic Notes to enjoy the same\n functionality as well as some notable improvements";
+ attr(p, "class", "setting-item-description");
+ },
+ m(target, anchor) {
+ insert(target, p, anchor);
+ },
+ d(detaching) {
+ if (detaching) detach(p);
+ }
+ };
+}
+
+// (24:8) {#if $settings.hasMigratedDailyNoteSettings}
+function create_if_block_5(ctx) {
+ let p;
+
+ return {
+ c() {
+ p = element("p");
+
+ p.innerHTML = `You have successfully migrated your daily notes settings. You can
+ now disable the Daily Notes core plugin to avoid any confusion.
If you have an custom hotkeys for daily notes, make sure to update
+ them to use the new "Periodic Notes" commands.`;
+
+ attr(p, "class", "setting-item-description");
+ },
+ m(target, anchor) {
+ insert(target, p, anchor);
+ },
+ d(detaching) {
+ if (detaching) detach(p);
+ }
+ };
+}
+
+// (42:8) {:else}
+function create_else_block_1(ctx) {
+ let button;
+ let mounted;
+ let dispose;
+
+ return {
+ c() {
+ button = element("button");
+ button.textContent = "Migrate";
+ attr(button, "class", "mod-cta svelte-1alo0m9");
+ },
+ m(target, anchor) {
+ insert(target, button, anchor);
+
+ if (!mounted) {
+ dispose = listen(button, "click", function () {
+ if (is_function(/*migrateDailyNoteSettings*/ ctx[2])) /*migrateDailyNoteSettings*/ ctx[2].apply(this, arguments);
+ });
+
+ mounted = true;
+ }
+ },
+ p(new_ctx, dirty) {
+ ctx = new_ctx;
+ },
+ i: noop,
+ o: noop,
+ d(detaching) {
+ if (detaching) detach(button);
+ mounted = false;
+ dispose();
+ }
+ };
+}
+
+// (40:8) {#if $settings.hasMigratedDailyNoteSettings}
+function create_if_block_4(ctx) {
+ let button;
+ let t;
+ let checkmark;
+ let current;
+ checkmark = new Checkmark({});
+
+ return {
+ c() {
+ button = element("button");
+ t = text("Migrated ");
+ create_component(checkmark.$$.fragment);
+ button.disabled = true;
+ attr(button, "class", "svelte-1alo0m9");
+ },
+ m(target, anchor) {
+ insert(target, button, anchor);
+ append(button, t);
+ mount_component(checkmark, button, null);
+ current = true;
+ },
+ p: noop,
+ i(local) {
+ if (current) return;
+ transition_in(checkmark.$$.fragment, local);
+ current = true;
+ },
+ o(local) {
+ transition_out(checkmark.$$.fragment, local);
+ current = false;
+ },
+ d(detaching) {
+ if (detaching) detach(button);
+ destroy_component(checkmark);
+ }
+ };
+}
+
+// (51:2) {#if hasWeeklyNoteSettings}
+function create_if_block_1$2(ctx) {
+ let div2;
+ let div0;
+ let t3;
+ let div1;
+ let current_block_type_index;
+ let if_block;
+ let current;
+ const if_block_creators = [create_if_block_2, create_else_block];
+ const if_blocks = [];
+
+ function select_block_type_2(ctx, dirty) {
+ if (/*$settings*/ ctx[5].hasMigratedWeeklyNoteSettings) return 0;
+ return 1;
+ }
+
+ current_block_type_index = select_block_type_2(ctx);
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
+
+ return {
+ c() {
+ div2 = element("div");
+ div0 = element("div");
+
+ div0.innerHTML = `Weekly Note settings migrated
+ Your existing weekly-note settings from the Calendar plugin have been
+ migrated over automatically. The functionality will be removed from
+ the Calendar plugin in the future.
`;
+
+ t3 = space();
+ div1 = element("div");
+ if_block.c();
+ attr(div0, "class", "setting-item-info");
+ attr(div1, "class", "setting-item-control");
+ attr(div2, "class", "setting-item");
+ },
+ m(target, anchor) {
+ insert(target, div2, anchor);
+ append(div2, div0);
+ append(div2, t3);
+ append(div2, div1);
+ if_blocks[current_block_type_index].m(div1, null);
+ current = true;
+ },
+ p(ctx, dirty) {
+ let previous_block_index = current_block_type_index;
+ current_block_type_index = select_block_type_2(ctx);
+
+ if (current_block_type_index !== previous_block_index) {
+ group_outros();
+
+ transition_out(if_blocks[previous_block_index], 1, 1, () => {
+ if_blocks[previous_block_index] = null;
+ });
+
+ check_outros();
+ if_block = if_blocks[current_block_type_index];
+
+ if (!if_block) {
+ if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
+ if_block.c();
+ }
+
+ transition_in(if_block, 1);
+ if_block.m(div1, null);
+ }
+ },
+ i(local) {
+ if (current) return;
+ transition_in(if_block);
+ current = true;
+ },
+ o(local) {
+ transition_out(if_block);
+ current = false;
+ },
+ d(detaching) {
+ if (detaching) detach(div2);
+ if_blocks[current_block_type_index].d();
+ }
+ };
+}
+
+// (67:8) {:else}
+function create_else_block(ctx) {
+ let button;
+
+ return {
+ c() {
+ button = element("button");
+ button.textContent = "Migrate";
+ attr(button, "class", "mod-cta svelte-1alo0m9");
+ },
+ m(target, anchor) {
+ insert(target, button, anchor);
+ },
+ i: noop,
+ o: noop,
+ d(detaching) {
+ if (detaching) detach(button);
+ }
+ };
+}
+
+// (62:8) {#if $settings.hasMigratedWeeklyNoteSettings}
+function create_if_block_2(ctx) {
+ let button;
+ let t;
+ let checkmark;
+ let current;
+ checkmark = new Checkmark({});
+
+ return {
+ c() {
+ button = element("button");
+ t = text("Migrated\n ");
+ create_component(checkmark.$$.fragment);
+ button.disabled = true;
+ attr(button, "class", "svelte-1alo0m9");
+ },
+ m(target, anchor) {
+ insert(target, button, anchor);
+ append(button, t);
+ mount_component(checkmark, button, null);
+ current = true;
+ },
+ i(local) {
+ if (current) return;
+ transition_in(checkmark.$$.fragment, local);
+ current = true;
+ },
+ o(local) {
+ transition_out(checkmark.$$.fragment, local);
+ current = false;
+ },
+ d(detaching) {
+ if (detaching) detach(button);
+ destroy_component(checkmark);
+ }
+ };
+}
+
+// (74:2) {#if !hasDailyNoteSettings && !hasWeeklyNoteSettings}
+function create_if_block$4(ctx) {
+ let p;
+
+ return {
+ c() {
+ p = element("p");
+ p.textContent = "With this plugin, you can quickly create and navigate to daily, weekly,\n and monthly notes. Enable them below to get started.";
+ },
+ m(target, anchor) {
+ insert(target, p, anchor);
+ },
+ d(detaching) {
+ if (detaching) detach(p);
+ }
+ };
+}
+
+function create_fragment$4(ctx) {
+ let div;
+ let h3;
+ let t1;
+ let t2;
+ let t3;
+ let t4;
+ let button;
+ let div_outro;
+ let current;
+ let mounted;
+ let dispose;
+ let if_block0 = /*hasDailyNoteSettings*/ ctx[3] && create_if_block_3(ctx);
+ let if_block1 = /*hasWeeklyNoteSettings*/ ctx[4] && create_if_block_1$2(ctx);
+ let if_block2 = !/*hasDailyNoteSettings*/ ctx[3] && !/*hasWeeklyNoteSettings*/ ctx[4] && create_if_block$4();
+
+ return {
+ c() {
+ div = element("div");
+ h3 = element("h3");
+ h3.textContent = "Getting Started";
+ t1 = space();
+ if (if_block0) if_block0.c();
+ t2 = space();
+ if (if_block1) if_block1.c();
+ t3 = space();
+ if (if_block2) if_block2.c();
+ t4 = space();
+ button = element("button");
+ button.textContent = "Dismiss";
+ attr(button, "class", "svelte-1alo0m9");
+ attr(div, "class", "settings-banner");
+ },
+ m(target, anchor) {
+ insert(target, div, anchor);
+ append(div, h3);
+ append(div, t1);
+ if (if_block0) if_block0.m(div, null);
+ append(div, t2);
+ if (if_block1) if_block1.m(div, null);
+ append(div, t3);
+ if (if_block2) if_block2.m(div, null);
+ append(div, t4);
+ append(div, button);
+ current = true;
+
+ if (!mounted) {
+ dispose = listen(button, "click", function () {
+ if (is_function(/*handleTeardown*/ ctx[1])) /*handleTeardown*/ ctx[1].apply(this, arguments);
+ });
+
+ mounted = true;
+ }
+ },
+ p(new_ctx, [dirty]) {
+ ctx = new_ctx;
+
+ if (/*hasDailyNoteSettings*/ ctx[3]) {
+ if (if_block0) {
+ if_block0.p(ctx, dirty);
+
+ if (dirty & /*hasDailyNoteSettings*/ 8) {
+ transition_in(if_block0, 1);
+ }
+ } else {
+ if_block0 = create_if_block_3(ctx);
+ if_block0.c();
+ transition_in(if_block0, 1);
+ if_block0.m(div, t2);
+ }
+ } else if (if_block0) {
+ group_outros();
+
+ transition_out(if_block0, 1, 1, () => {
+ if_block0 = null;
+ });
+
+ check_outros();
+ }
+
+ if (/*hasWeeklyNoteSettings*/ ctx[4]) {
+ if (if_block1) {
+ if_block1.p(ctx, dirty);
+
+ if (dirty & /*hasWeeklyNoteSettings*/ 16) {
+ transition_in(if_block1, 1);
+ }
+ } else {
+ if_block1 = create_if_block_1$2(ctx);
+ if_block1.c();
+ transition_in(if_block1, 1);
+ if_block1.m(div, t3);
+ }
+ } else if (if_block1) {
+ group_outros();
+
+ transition_out(if_block1, 1, 1, () => {
+ if_block1 = null;
+ });
+
+ check_outros();
+ }
+
+ if (!/*hasDailyNoteSettings*/ ctx[3] && !/*hasWeeklyNoteSettings*/ ctx[4]) {
+ if (if_block2) ; else {
+ if_block2 = create_if_block$4();
+ if_block2.c();
+ if_block2.m(div, t4);
+ }
+ } else if (if_block2) {
+ if_block2.d(1);
+ if_block2 = null;
+ }
+ },
+ i(local) {
+ if (current) return;
+ transition_in(if_block0);
+ transition_in(if_block1);
+ if (div_outro) div_outro.end(1);
+ current = true;
+ },
+ o(local) {
+ transition_out(if_block0);
+ transition_out(if_block1);
+ div_outro = create_out_transition(div, slide, {});
+ current = false;
+ },
+ d(detaching) {
+ if (detaching) detach(div);
+ if (if_block0) if_block0.d();
+ if (if_block1) if_block1.d();
+ if (if_block2) if_block2.d();
+ if (detaching && div_outro) div_outro.end();
+ mounted = false;
+ dispose();
+ }
+ };
+}
+
+function instance$4($$self, $$props, $$invalidate) {
+ let $settings,
+ $$unsubscribe_settings = noop,
+ $$subscribe_settings = () => ($$unsubscribe_settings(), $$unsubscribe_settings = subscribe(settings, $$value => $$invalidate(5, $settings = $$value)), settings);
+
+ $$self.$$.on_destroy.push(() => $$unsubscribe_settings());
+
+
+ let { settings } = $$props;
+ $$subscribe_settings();
+ let { handleTeardown } = $$props;
+ let { migrateDailyNoteSettings } = $$props;
+ let hasDailyNoteSettings;
+ let hasWeeklyNoteSettings;
+
+ $$self.$$set = $$props => {
+ if ("settings" in $$props) $$subscribe_settings($$invalidate(0, settings = $$props.settings));
+ if ("handleTeardown" in $$props) $$invalidate(1, handleTeardown = $$props.handleTeardown);
+ if ("migrateDailyNoteSettings" in $$props) $$invalidate(2, migrateDailyNoteSettings = $$props.migrateDailyNoteSettings);
+ };
+
+ {
+ $$invalidate(3, hasDailyNoteSettings = hasLegacyDailyNoteSettings());
+ $$invalidate(4, hasWeeklyNoteSettings = hasLegacyWeeklyNoteSettings());
+ }
+
+ return [
+ settings,
+ handleTeardown,
+ migrateDailyNoteSettings,
+ hasDailyNoteSettings,
+ hasWeeklyNoteSettings,
+ $settings
+ ];
+}
+
+class GettingStartedBanner extends SvelteComponent {
+ constructor(options) {
+ super();
+ if (!document.getElementById("svelte-1alo0m9-style")) add_css();
+
+ init(this, options, instance$4, create_fragment$4, safe_not_equal, {
+ settings: 0,
+ handleTeardown: 1,
+ migrateDailyNoteSettings: 2
+ });
+ }
+}
+
+function getBasename(format) {
+ const isTemplateNested = format.indexOf("/") !== -1;
+ return isTemplateNested ? format.split("/").pop() : format;
+}
+function isValidFilename(filename) {
+ const illegalRe = /[?<>\\:*|"]/g;
+ const controlRe = /[\x00-\x1f\x80-\x9f]/g;
+ const reservedRe = /^\.+$/;
+ const windowsReservedRe = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i;
+ return (!illegalRe.test(filename) &&
+ !controlRe.test(filename) &&
+ !reservedRe.test(filename) &&
+ !windowsReservedRe.test(filename));
+}
+function validateFormat(format, periodicity) {
+ if (!format) {
+ return "";
+ }
+ if (!isValidFilename(format)) {
+ return "Format contains illegal characters";
+ }
+ if (periodicity === "daily" &&
+ !["m", "d", "y"].every((requiredChar) => getBasename(format)
+ .replace(/\[[^\]]*\]/g, "") // remove everything within brackets
+ .toLowerCase()
+ .indexOf(requiredChar) !== -1)) {
+ return "Filename must be unique";
+ }
+}
+function validateTemplate(template) {
+ if (!template) {
+ return "";
+ }
+ const { metadataCache } = window.app;
+ const file = metadataCache.getFirstLinkpathDest(template, "");
+ if (!file) {
+ return "Template file not found";
+ }
+ return "";
+}
+function validateFolder(folder) {
+ if (!folder || folder === "/") {
+ return "";
+ }
+ const { vault } = window.app;
+ if (!vault.getAbstractFileByPath(obsidian.normalizePath(folder))) {
+ return "Folder not found in vault";
+ }
+ return "";
+}
+
+/* src/settings/NoteFormatSetting.svelte generated by Svelte v3.35.0 */
+
+function create_if_block_1$1(ctx) {
+ let div;
+ let t0;
+ let strong0;
+ let t1;
+ let br;
+ let t2;
+ let strong1;
+ let t3;
+
+ return {
+ c() {
+ div = element("div");
+ t0 = text("New files will be created at ");
+ strong0 = element("strong");
+ t1 = text(/*value*/ ctx[2]);
+ br = element("br");
+ t2 = text("\n Format: ");
+ strong1 = element("strong");
+ t3 = text(/*basename*/ ctx[7]);
+ },
+ m(target, anchor) {
+ insert(target, div, anchor);
+ append(div, t0);
+ append(div, strong0);
+ append(strong0, t1);
+ append(div, br);
+ append(div, t2);
+ append(div, strong1);
+ append(strong1, t3);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*value*/ 4) set_data(t1, /*value*/ ctx[2]);
+ if (dirty & /*basename*/ 128) set_data(t3, /*basename*/ ctx[7]);
+ },
+ d(detaching) {
+ if (detaching) detach(div);
+ }
+ };
+}
+
+// (56:4) {#if error}
+function create_if_block$3(ctx) {
+ let div;
+ let t;
+
+ return {
+ c() {
+ div = element("div");
+ t = text(/*error*/ ctx[5]);
+ attr(div, "class", "has-error");
+ },
+ m(target, anchor) {
+ insert(target, div, anchor);
+ append(div, t);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*error*/ 32) set_data(t, /*error*/ ctx[5]);
+ },
+ d(detaching) {
+ if (detaching) detach(div);
+ }
+ };
+}
+
+function create_fragment$3(ctx) {
+ let div5;
+ let div3;
+ let div0;
+ let t1;
+ let div2;
+ let a;
+ let t3;
+ let div1;
+ let t4;
+ let b;
+ let t5_value = window.moment().format(/*value*/ ctx[2] || /*defaultFormat*/ ctx[8]) + "";
+ let t5;
+ let t6;
+ let t7;
+ let t8;
+ let div4;
+ let input;
+ let mounted;
+ let dispose;
+ let if_block0 = /*isTemplateNested*/ ctx[6] && create_if_block_1$1(ctx);
+ let if_block1 = /*error*/ ctx[5] && create_if_block$3(ctx);
+
+ return {
+ c() {
+ div5 = element("div");
+ div3 = element("div");
+ div0 = element("div");
+ div0.textContent = "Format";
+ t1 = space();
+ div2 = element("div");
+ a = element("a");
+ a.textContent = "Syntax Reference";
+ t3 = space();
+ div1 = element("div");
+ t4 = text("Your current syntax looks like this: ");
+ b = element("b");
+ t5 = text(t5_value);
+ t6 = space();
+ if (if_block0) if_block0.c();
+ t7 = space();
+ if (if_block1) if_block1.c();
+ t8 = space();
+ div4 = element("div");
+ input = element("input");
+ attr(div0, "class", "setting-item-name");
+ attr(a, "href", "https://momentjs.com/docs/#/displaying/format/");
+ attr(b, "class", "u-pop");
+ attr(div2, "class", "setting-item-description");
+ attr(div3, "class", "setting-item-info");
+ attr(input, "type", "text");
+ attr(input, "spellcheck", false);
+ attr(input, "placeholder", /*defaultFormat*/ ctx[8]);
+ toggle_class(input, "has-error", !!/*error*/ ctx[5]);
+ attr(div4, "class", "setting-item-control");
+ attr(div5, "class", "setting-item");
+ },
+ m(target, anchor) {
+ insert(target, div5, anchor);
+ append(div5, div3);
+ append(div3, div0);
+ append(div3, t1);
+ append(div3, div2);
+ append(div2, a);
+ append(div2, t3);
+ append(div2, div1);
+ append(div1, t4);
+ append(div1, b);
+ append(b, t5);
+ append(div2, t6);
+ if (if_block0) if_block0.m(div2, null);
+ append(div3, t7);
+ if (if_block1) if_block1.m(div3, null);
+ append(div5, t8);
+ append(div5, div4);
+ append(div4, input);
+ set_input_value(input, /*$settings*/ ctx[3][/*periodicity*/ ctx[1]].format);
+ /*input_binding*/ ctx[12](input);
+
+ if (!mounted) {
+ dispose = [
+ listen(input, "input", /*input_input_handler*/ ctx[11]),
+ listen(input, "change", /*onChange*/ ctx[10]),
+ listen(input, "input", /*clearError*/ ctx[9])
+ ];
+
+ mounted = true;
+ }
+ },
+ p(ctx, [dirty]) {
+ if (dirty & /*value*/ 4 && t5_value !== (t5_value = window.moment().format(/*value*/ ctx[2] || /*defaultFormat*/ ctx[8]) + "")) set_data(t5, t5_value);
+
+ if (/*isTemplateNested*/ ctx[6]) {
+ if (if_block0) {
+ if_block0.p(ctx, dirty);
+ } else {
+ if_block0 = create_if_block_1$1(ctx);
+ if_block0.c();
+ if_block0.m(div2, null);
+ }
+ } else if (if_block0) {
+ if_block0.d(1);
+ if_block0 = null;
+ }
+
+ if (/*error*/ ctx[5]) {
+ if (if_block1) {
+ if_block1.p(ctx, dirty);
+ } else {
+ if_block1 = create_if_block$3(ctx);
+ if_block1.c();
+ if_block1.m(div3, null);
+ }
+ } else if (if_block1) {
+ if_block1.d(1);
+ if_block1 = null;
+ }
+
+ if (dirty & /*$settings, periodicity*/ 10 && input.value !== /*$settings*/ ctx[3][/*periodicity*/ ctx[1]].format) {
+ set_input_value(input, /*$settings*/ ctx[3][/*periodicity*/ ctx[1]].format);
+ }
+
+ if (dirty & /*error*/ 32) {
+ toggle_class(input, "has-error", !!/*error*/ ctx[5]);
+ }
+ },
+ i: noop,
+ o: noop,
+ d(detaching) {
+ if (detaching) detach(div5);
+ if (if_block0) if_block0.d();
+ if (if_block1) if_block1.d();
+ /*input_binding*/ ctx[12](null);
+ mounted = false;
+ run_all(dispose);
+ }
+ };
+}
+
+function instance$3($$self, $$props, $$invalidate) {
+ let $settings,
+ $$unsubscribe_settings = noop,
+ $$subscribe_settings = () => ($$unsubscribe_settings(), $$unsubscribe_settings = subscribe(settings, $$value => $$invalidate(3, $settings = $$value)), settings);
+
+ $$self.$$.on_destroy.push(() => $$unsubscribe_settings());
+
+
+ let { settings } = $$props;
+ $$subscribe_settings();
+ let { periodicity } = $$props;
+
+ const DEFAULT_FORMATS = {
+ daily: DEFAULT_DAILY_NOTE_FORMAT_1,
+ weekly: DEFAULT_WEEKLY_NOTE_FORMAT_1,
+ monthly: DEFAULT_MONTHLY_NOTE_FORMAT_1,
+ quarterly: DEFAULT_QUARTERLY_NOTE_FORMAT_1,
+ yearly: DEFAULT_YEARLY_NOTE_FORMAT_1
+ };
+
+ const defaultFormat = DEFAULT_FORMATS[periodicity];
+ let inputEl;
+ let value;
+ let error;
+ let isTemplateNested;
+ let basename;
+
+ onMount(() => {
+ $$invalidate(5, error = validateFormat(inputEl.value, periodicity));
+ });
+
+ function clearError() {
+ $$invalidate(5, error = "");
+ }
+
+ function onChange() {
+ $$invalidate(5, error = validateFormat(inputEl.value, periodicity));
+ }
+
+ function input_input_handler() {
+ $settings[periodicity].format = this.value;
+ settings.set($settings);
+ $$invalidate(1, periodicity);
+ }
+
+ function input_binding($$value) {
+ binding_callbacks[$$value ? "unshift" : "push"](() => {
+ inputEl = $$value;
+ $$invalidate(4, inputEl);
+ });
+ }
+
+ $$self.$$set = $$props => {
+ if ("settings" in $$props) $$subscribe_settings($$invalidate(0, settings = $$props.settings));
+ if ("periodicity" in $$props) $$invalidate(1, periodicity = $$props.periodicity);
+ };
+
+ $$self.$$.update = () => {
+ if ($$self.$$.dirty & /*$settings, periodicity, value*/ 14) {
+ {
+ $$invalidate(2, value = $settings[periodicity].format || "");
+ $$invalidate(6, isTemplateNested = value.indexOf("/") !== -1);
+ $$invalidate(7, basename = getBasename(value));
+ }
+ }
+ };
+
+ return [
+ settings,
+ periodicity,
+ value,
+ $settings,
+ inputEl,
+ error,
+ isTemplateNested,
+ basename,
+ defaultFormat,
+ clearError,
+ onChange,
+ input_input_handler,
+ input_binding
+ ];
+}
+
+class NoteFormatSetting extends SvelteComponent {
+ constructor(options) {
+ super();
+ init(this, options, instance$3, create_fragment$3, safe_not_equal, { settings: 0, periodicity: 1 });
+ }
+}
+
+var top = 'top';
+var bottom = 'bottom';
+var right = 'right';
+var left = 'left';
+var auto = 'auto';
+var basePlacements = [top, bottom, right, left];
+var start = 'start';
+var end = 'end';
+var clippingParents = 'clippingParents';
+var viewport = 'viewport';
+var popper = 'popper';
+var reference = 'reference';
+var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
+ return acc.concat([placement + "-" + start, placement + "-" + end]);
+}, []);
+var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
+ return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
+}, []); // modifiers that need to read the DOM
+
+var beforeRead = 'beforeRead';
+var read = 'read';
+var afterRead = 'afterRead'; // pure-logic modifiers
+
+var beforeMain = 'beforeMain';
+var main = 'main';
+var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
+
+var beforeWrite = 'beforeWrite';
+var write = 'write';
+var afterWrite = 'afterWrite';
+var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
+
+function getNodeName(element) {
+ return element ? (element.nodeName || '').toLowerCase() : null;
+}
+
+function getWindow(node) {
+ if (node == null) {
+ return window;
+ }
+
+ if (node.toString() !== '[object Window]') {
+ var ownerDocument = node.ownerDocument;
+ return ownerDocument ? ownerDocument.defaultView || window : window;
+ }
+
+ return node;
+}
+
+function isElement(node) {
+ var OwnElement = getWindow(node).Element;
+ return node instanceof OwnElement || node instanceof Element;
+}
+
+function isHTMLElement(node) {
+ var OwnElement = getWindow(node).HTMLElement;
+ return node instanceof OwnElement || node instanceof HTMLElement;
+}
+
+function isShadowRoot(node) {
+ // IE 11 has no ShadowRoot
+ if (typeof ShadowRoot === 'undefined') {
+ return false;
+ }
+
+ var OwnElement = getWindow(node).ShadowRoot;
+ return node instanceof OwnElement || node instanceof ShadowRoot;
+}
+
+// and applies them to the HTMLElements such as popper and arrow
+
+function applyStyles(_ref) {
+ var state = _ref.state;
+ Object.keys(state.elements).forEach(function (name) {
+ var style = state.styles[name] || {};
+ var attributes = state.attributes[name] || {};
+ var element = state.elements[name]; // arrow is optional + virtual elements
+
+ if (!isHTMLElement(element) || !getNodeName(element)) {
+ return;
+ } // Flow doesn't support to extend this property, but it's the most
+ // effective way to apply styles to an HTMLElement
+ // $FlowFixMe[cannot-write]
+
+
+ Object.assign(element.style, style);
+ Object.keys(attributes).forEach(function (name) {
+ var value = attributes[name];
+
+ if (value === false) {
+ element.removeAttribute(name);
+ } else {
+ element.setAttribute(name, value === true ? '' : value);
+ }
+ });
+ });
+}
+
+function effect$2(_ref2) {
+ var state = _ref2.state;
+ var initialStyles = {
+ popper: {
+ position: state.options.strategy,
+ left: '0',
+ top: '0',
+ margin: '0'
+ },
+ arrow: {
+ position: 'absolute'
+ },
+ reference: {}
+ };
+ Object.assign(state.elements.popper.style, initialStyles.popper);
+ state.styles = initialStyles;
+
+ if (state.elements.arrow) {
+ Object.assign(state.elements.arrow.style, initialStyles.arrow);
+ }
+
+ return function () {
+ Object.keys(state.elements).forEach(function (name) {
+ var element = state.elements[name];
+ var attributes = state.attributes[name] || {};
+ var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
+
+ var style = styleProperties.reduce(function (style, property) {
+ style[property] = '';
+ return style;
+ }, {}); // arrow is optional + virtual elements
+
+ if (!isHTMLElement(element) || !getNodeName(element)) {
+ return;
+ }
+
+ Object.assign(element.style, style);
+ Object.keys(attributes).forEach(function (attribute) {
+ element.removeAttribute(attribute);
+ });
+ });
+ };
+} // eslint-disable-next-line import/no-unused-modules
+
+
+var applyStyles$1 = {
+ name: 'applyStyles',
+ enabled: true,
+ phase: 'write',
+ fn: applyStyles,
+ effect: effect$2,
+ requires: ['computeStyles']
+};
+
+function getBasePlacement(placement) {
+ return placement.split('-')[0];
+}
+
+function getBoundingClientRect(element) {
+ var rect = element.getBoundingClientRect();
+ return {
+ width: rect.width,
+ height: rect.height,
+ top: rect.top,
+ right: rect.right,
+ bottom: rect.bottom,
+ left: rect.left,
+ x: rect.left,
+ y: rect.top
+ };
+}
+
+// means it doesn't take into account transforms.
+
+function getLayoutRect(element) {
+ var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
+ // Fixes https://github.com/popperjs/popper-core/issues/1223
+
+ var width = element.offsetWidth;
+ var height = element.offsetHeight;
+
+ if (Math.abs(clientRect.width - width) <= 1) {
+ width = clientRect.width;
+ }
+
+ if (Math.abs(clientRect.height - height) <= 1) {
+ height = clientRect.height;
+ }
+
+ return {
+ x: element.offsetLeft,
+ y: element.offsetTop,
+ width: width,
+ height: height
+ };
+}
+
+function contains(parent, child) {
+ var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method
+
+ if (parent.contains(child)) {
+ return true;
+ } // then fallback to custom implementation with Shadow DOM support
+ else if (rootNode && isShadowRoot(rootNode)) {
+ var next = child;
+
+ do {
+ if (next && parent.isSameNode(next)) {
+ return true;
+ } // $FlowFixMe[prop-missing]: need a better way to handle this...
+
+
+ next = next.parentNode || next.host;
+ } while (next);
+ } // Give up, the result is false
+
+
+ return false;
+}
+
+function getComputedStyle$1(element) {
+ return getWindow(element).getComputedStyle(element);
+}
+
+function isTableElement(element) {
+ return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
+}
+
+function getDocumentElement(element) {
+ // $FlowFixMe[incompatible-return]: assume body is always available
+ return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
+ element.document) || window.document).documentElement;
+}
+
+function getParentNode(element) {
+ if (getNodeName(element) === 'html') {
+ return element;
+ }
+
+ return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
+ // $FlowFixMe[incompatible-return]
+ // $FlowFixMe[prop-missing]
+ element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
+ element.parentNode || ( // DOM Element detected
+ isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
+ getDocumentElement(element) // fallback
+
+ );
+}
+
+function getTrueOffsetParent(element) {
+ if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
+ getComputedStyle$1(element).position === 'fixed') {
+ return null;
+ }
+
+ return element.offsetParent;
+} // `.offsetParent` reports `null` for fixed elements, while absolute elements
+// return the containing block
+
+
+function getContainingBlock(element) {
+ var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;
+ var currentNode = getParentNode(element);
+
+ while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
+ var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that
+ // create a containing block.
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
+
+ if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
+ return currentNode;
+ } else {
+ currentNode = currentNode.parentNode;
+ }
+ }
+
+ return null;
+} // Gets the closest ancestor positioned element. Handles some edge cases,
+// such as table ancestors and cross browser bugs.
+
+
+function getOffsetParent(element) {
+ var window = getWindow(element);
+ var offsetParent = getTrueOffsetParent(element);
+
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
+ offsetParent = getTrueOffsetParent(offsetParent);
+ }
+
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static')) {
+ return window;
+ }
+
+ return offsetParent || getContainingBlock(element) || window;
+}
+
+function getMainAxisFromPlacement(placement) {
+ return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
+}
+
+var max = Math.max;
+var min = Math.min;
+var round = Math.round;
+
+function within(min$1, value, max$1) {
+ return max(min$1, min(value, max$1));
+}
+
+function getFreshSideObject() {
+ return {
+ top: 0,
+ right: 0,
+ bottom: 0,
+ left: 0
+ };
+}
+
+function mergePaddingObject(paddingObject) {
+ return Object.assign({}, getFreshSideObject(), paddingObject);
+}
+
+function expandToHashMap(value, keys) {
+ return keys.reduce(function (hashMap, key) {
+ hashMap[key] = value;
+ return hashMap;
+ }, {});
+}
+
+var toPaddingObject = function toPaddingObject(padding, state) {
+ padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {
+ placement: state.placement
+ })) : padding;
+ return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
+};
+
+function arrow(_ref) {
+ var _state$modifiersData$;
+
+ var state = _ref.state,
+ name = _ref.name,
+ options = _ref.options;
+ var arrowElement = state.elements.arrow;
+ var popperOffsets = state.modifiersData.popperOffsets;
+ var basePlacement = getBasePlacement(state.placement);
+ var axis = getMainAxisFromPlacement(basePlacement);
+ var isVertical = [left, right].indexOf(basePlacement) >= 0;
+ var len = isVertical ? 'height' : 'width';
+
+ if (!arrowElement || !popperOffsets) {
+ return;
+ }
+
+ var paddingObject = toPaddingObject(options.padding, state);
+ var arrowRect = getLayoutRect(arrowElement);
+ var minProp = axis === 'y' ? top : left;
+ var maxProp = axis === 'y' ? bottom : right;
+ var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
+ var startDiff = popperOffsets[axis] - state.rects.reference[axis];
+ var arrowOffsetParent = getOffsetParent(arrowElement);
+ var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
+ var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is
+ // outside of the popper bounds
+
+ var min = paddingObject[minProp];
+ var max = clientSize - arrowRect[len] - paddingObject[maxProp];
+ var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
+ var offset = within(min, center, max); // Prevents breaking syntax highlighting...
+
+ var axisProp = axis;
+ state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
+}
+
+function effect$1(_ref2) {
+ var state = _ref2.state,
+ options = _ref2.options;
+ var _options$element = options.element,
+ arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;
+
+ if (arrowElement == null) {
+ return;
+ } // CSS selector
+
+
+ if (typeof arrowElement === 'string') {
+ arrowElement = state.elements.popper.querySelector(arrowElement);
+
+ if (!arrowElement) {
+ return;
+ }
+ }
+
+ if (process.env.NODE_ENV !== "production") {
+ if (!isHTMLElement(arrowElement)) {
+ console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));
+ }
+ }
+
+ if (!contains(state.elements.popper, arrowElement)) {
+ if (process.env.NODE_ENV !== "production") {
+ console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', 'element.'].join(' '));
+ }
+
+ return;
+ }
+
+ state.elements.arrow = arrowElement;
+} // eslint-disable-next-line import/no-unused-modules
+
+
+var arrow$1 = {
+ name: 'arrow',
+ enabled: true,
+ phase: 'main',
+ fn: arrow,
+ effect: effect$1,
+ requires: ['popperOffsets'],
+ requiresIfExists: ['preventOverflow']
+};
+
+var unsetSides = {
+ top: 'auto',
+ right: 'auto',
+ bottom: 'auto',
+ left: 'auto'
+}; // Round the offsets to the nearest suitable subpixel based on the DPR.
+// Zooming can change the DPR, but it seems to report a value that will
+// cleanly divide the values into the appropriate subpixels.
+
+function roundOffsetsByDPR(_ref) {
+ var x = _ref.x,
+ y = _ref.y;
+ var win = window;
+ var dpr = win.devicePixelRatio || 1;
+ return {
+ x: round(round(x * dpr) / dpr) || 0,
+ y: round(round(y * dpr) / dpr) || 0
+ };
+}
+
+function mapToStyles(_ref2) {
+ var _Object$assign2;
+
+ var popper = _ref2.popper,
+ popperRect = _ref2.popperRect,
+ placement = _ref2.placement,
+ offsets = _ref2.offsets,
+ position = _ref2.position,
+ gpuAcceleration = _ref2.gpuAcceleration,
+ adaptive = _ref2.adaptive,
+ roundOffsets = _ref2.roundOffsets;
+
+ var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
+ _ref3$x = _ref3.x,
+ x = _ref3$x === void 0 ? 0 : _ref3$x,
+ _ref3$y = _ref3.y,
+ y = _ref3$y === void 0 ? 0 : _ref3$y;
+
+ var hasX = offsets.hasOwnProperty('x');
+ var hasY = offsets.hasOwnProperty('y');
+ var sideX = left;
+ var sideY = top;
+ var win = window;
+
+ if (adaptive) {
+ var offsetParent = getOffsetParent(popper);
+ var heightProp = 'clientHeight';
+ var widthProp = 'clientWidth';
+
+ if (offsetParent === getWindow(popper)) {
+ offsetParent = getDocumentElement(popper);
+
+ if (getComputedStyle$1(offsetParent).position !== 'static') {
+ heightProp = 'scrollHeight';
+ widthProp = 'scrollWidth';
+ }
+ } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
+
+
+ offsetParent = offsetParent;
+
+ if (placement === top) {
+ sideY = bottom; // $FlowFixMe[prop-missing]
+
+ y -= offsetParent[heightProp] - popperRect.height;
+ y *= gpuAcceleration ? 1 : -1;
+ }
+
+ if (placement === left) {
+ sideX = right; // $FlowFixMe[prop-missing]
+
+ x -= offsetParent[widthProp] - popperRect.width;
+ x *= gpuAcceleration ? 1 : -1;
+ }
+ }
+
+ var commonStyles = Object.assign({
+ position: position
+ }, adaptive && unsetSides);
+
+ if (gpuAcceleration) {
+ var _Object$assign;
+
+ return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
+ }
+
+ return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
+}
+
+function computeStyles(_ref4) {
+ var state = _ref4.state,
+ options = _ref4.options;
+ var _options$gpuAccelerat = options.gpuAcceleration,
+ gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
+ _options$adaptive = options.adaptive,
+ adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
+ _options$roundOffsets = options.roundOffsets,
+ roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
+
+ if (process.env.NODE_ENV !== "production") {
+ var transitionProperty = getComputedStyle$1(state.elements.popper).transitionProperty || '';
+
+ if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {
+ return transitionProperty.indexOf(property) >= 0;
+ })) {
+ console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: "transform", "top", "right", "bottom", "left".', '\n\n', 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\n\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));
+ }
+ }
+
+ var commonStyles = {
+ placement: getBasePlacement(state.placement),
+ popper: state.elements.popper,
+ popperRect: state.rects.popper,
+ gpuAcceleration: gpuAcceleration
+ };
+
+ if (state.modifiersData.popperOffsets != null) {
+ state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
+ offsets: state.modifiersData.popperOffsets,
+ position: state.options.strategy,
+ adaptive: adaptive,
+ roundOffsets: roundOffsets
+ })));
+ }
+
+ if (state.modifiersData.arrow != null) {
+ state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
+ offsets: state.modifiersData.arrow,
+ position: 'absolute',
+ adaptive: false,
+ roundOffsets: roundOffsets
+ })));
+ }
+
+ state.attributes.popper = Object.assign({}, state.attributes.popper, {
+ 'data-popper-placement': state.placement
+ });
+} // eslint-disable-next-line import/no-unused-modules
+
+
+var computeStyles$1 = {
+ name: 'computeStyles',
+ enabled: true,
+ phase: 'beforeWrite',
+ fn: computeStyles,
+ data: {}
+};
+
+var passive = {
+ passive: true
+};
+
+function effect(_ref) {
+ var state = _ref.state,
+ instance = _ref.instance,
+ options = _ref.options;
+ var _options$scroll = options.scroll,
+ scroll = _options$scroll === void 0 ? true : _options$scroll,
+ _options$resize = options.resize,
+ resize = _options$resize === void 0 ? true : _options$resize;
+ var window = getWindow(state.elements.popper);
+ var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
+
+ if (scroll) {
+ scrollParents.forEach(function (scrollParent) {
+ scrollParent.addEventListener('scroll', instance.update, passive);
+ });
+ }
+
+ if (resize) {
+ window.addEventListener('resize', instance.update, passive);
+ }
+
+ return function () {
+ if (scroll) {
+ scrollParents.forEach(function (scrollParent) {
+ scrollParent.removeEventListener('scroll', instance.update, passive);
+ });
+ }
+
+ if (resize) {
+ window.removeEventListener('resize', instance.update, passive);
+ }
+ };
+} // eslint-disable-next-line import/no-unused-modules
+
+
+var eventListeners = {
+ name: 'eventListeners',
+ enabled: true,
+ phase: 'write',
+ fn: function fn() {},
+ effect: effect,
+ data: {}
+};
+
+var hash$1 = {
+ left: 'right',
+ right: 'left',
+ bottom: 'top',
+ top: 'bottom'
+};
+function getOppositePlacement(placement) {
+ return placement.replace(/left|right|bottom|top/g, function (matched) {
+ return hash$1[matched];
+ });
+}
+
+var hash = {
+ start: 'end',
+ end: 'start'
+};
+function getOppositeVariationPlacement(placement) {
+ return placement.replace(/start|end/g, function (matched) {
+ return hash[matched];
+ });
+}
+
+function getWindowScroll(node) {
+ var win = getWindow(node);
+ var scrollLeft = win.pageXOffset;
+ var scrollTop = win.pageYOffset;
+ return {
+ scrollLeft: scrollLeft,
+ scrollTop: scrollTop
+ };
+}
+
+function getWindowScrollBarX(element) {
+ // If has a CSS width greater than the viewport, then this will be
+ // incorrect for RTL.
+ // Popper 1 is broken in this case and never had a bug report so let's assume
+ // it's not an issue. I don't think anyone ever specifies width on
+ // anyway.
+ // Browsers where the left scrollbar doesn't cause an issue report `0` for
+ // this (e.g. Edge 2019, IE11, Safari)
+ return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
+}
+
+function getViewportRect(element) {
+ var win = getWindow(element);
+ var html = getDocumentElement(element);
+ var visualViewport = win.visualViewport;
+ var width = html.clientWidth;
+ var height = html.clientHeight;
+ var x = 0;
+ var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper
+ // can be obscured underneath it.
+ // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
+ // if it isn't open, so if this isn't available, the popper will be detected
+ // to overflow the bottom of the screen too early.
+
+ if (visualViewport) {
+ width = visualViewport.width;
+ height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)
+ // In Chrome, it returns a value very close to 0 (+/-) but contains rounding
+ // errors due to floating point numbers, so we need to check precision.
+ // Safari returns a number <= 0, usually < -1 when pinch-zoomed
+ // Feature detection fails in mobile emulation mode in Chrome.
+ // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
+ // 0.001
+ // Fallback here: "Not Safari" userAgent
+
+ if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
+ x = visualViewport.offsetLeft;
+ y = visualViewport.offsetTop;
+ }
+ }
+
+ return {
+ width: width,
+ height: height,
+ x: x + getWindowScrollBarX(element),
+ y: y
+ };
+}
+
+// of the `` and `` rect bounds if horizontally scrollable
+
+function getDocumentRect(element) {
+ var _element$ownerDocumen;
+
+ var html = getDocumentElement(element);
+ var winScroll = getWindowScroll(element);
+ var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
+ var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
+ var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
+ var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
+ var y = -winScroll.scrollTop;
+
+ if (getComputedStyle$1(body || html).direction === 'rtl') {
+ x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
+ }
+
+ return {
+ width: width,
+ height: height,
+ x: x,
+ y: y
+ };
+}
+
+function isScrollParent(element) {
+ // Firefox wants us to check `-x` and `-y` variations as well
+ var _getComputedStyle = getComputedStyle$1(element),
+ overflow = _getComputedStyle.overflow,
+ overflowX = _getComputedStyle.overflowX,
+ overflowY = _getComputedStyle.overflowY;
+
+ return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
+}
+
+function getScrollParent(node) {
+ if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
+ // $FlowFixMe[incompatible-return]: assume body is always available
+ return node.ownerDocument.body;
+ }
+
+ if (isHTMLElement(node) && isScrollParent(node)) {
+ return node;
+ }
+
+ return getScrollParent(getParentNode(node));
+}
+
+/*
+given a DOM element, return the list of all scroll parents, up the list of ancesors
+until we get to the top window object. This list is what we attach scroll listeners
+to, because if any of these parent elements scroll, we'll need to re-calculate the
+reference element's position.
+*/
+
+function listScrollParents(element, list) {
+ var _element$ownerDocumen;
+
+ if (list === void 0) {
+ list = [];
+ }
+
+ var scrollParent = getScrollParent(element);
+ var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
+ var win = getWindow(scrollParent);
+ var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
+ var updatedList = list.concat(target);
+ return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
+ updatedList.concat(listScrollParents(getParentNode(target)));
+}
+
+function rectToClientRect(rect) {
+ return Object.assign({}, rect, {
+ left: rect.x,
+ top: rect.y,
+ right: rect.x + rect.width,
+ bottom: rect.y + rect.height
+ });
+}
+
+function getInnerBoundingClientRect(element) {
+ var rect = getBoundingClientRect(element);
+ rect.top = rect.top + element.clientTop;
+ rect.left = rect.left + element.clientLeft;
+ rect.bottom = rect.top + element.clientHeight;
+ rect.right = rect.left + element.clientWidth;
+ rect.width = element.clientWidth;
+ rect.height = element.clientHeight;
+ rect.x = rect.left;
+ rect.y = rect.top;
+ return rect;
+}
+
+function getClientRectFromMixedType(element, clippingParent) {
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
+} // A "clipping parent" is an overflowable container with the characteristic of
+// clipping (or hiding) overflowing elements with a position different from
+// `initial`
+
+
+function getClippingParents(element) {
+ var clippingParents = listScrollParents(getParentNode(element));
+ var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;
+ var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
+
+ if (!isElement(clipperElement)) {
+ return [];
+ } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
+
+
+ return clippingParents.filter(function (clippingParent) {
+ return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
+ });
+} // Gets the maximum area that the element is visible in due to any number of
+// clipping parents
+
+
+function getClippingRect(element, boundary, rootBoundary) {
+ var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
+ var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
+ var firstClippingParent = clippingParents[0];
+ var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
+ var rect = getClientRectFromMixedType(element, clippingParent);
+ accRect.top = max(rect.top, accRect.top);
+ accRect.right = min(rect.right, accRect.right);
+ accRect.bottom = min(rect.bottom, accRect.bottom);
+ accRect.left = max(rect.left, accRect.left);
+ return accRect;
+ }, getClientRectFromMixedType(element, firstClippingParent));
+ clippingRect.width = clippingRect.right - clippingRect.left;
+ clippingRect.height = clippingRect.bottom - clippingRect.top;
+ clippingRect.x = clippingRect.left;
+ clippingRect.y = clippingRect.top;
+ return clippingRect;
+}
+
+function getVariation(placement) {
+ return placement.split('-')[1];
+}
+
+function computeOffsets(_ref) {
+ var reference = _ref.reference,
+ element = _ref.element,
+ placement = _ref.placement;
+ var basePlacement = placement ? getBasePlacement(placement) : null;
+ var variation = placement ? getVariation(placement) : null;
+ var commonX = reference.x + reference.width / 2 - element.width / 2;
+ var commonY = reference.y + reference.height / 2 - element.height / 2;
+ var offsets;
+
+ switch (basePlacement) {
+ case top:
+ offsets = {
+ x: commonX,
+ y: reference.y - element.height
+ };
+ break;
+
+ case bottom:
+ offsets = {
+ x: commonX,
+ y: reference.y + reference.height
+ };
+ break;
+
+ case right:
+ offsets = {
+ x: reference.x + reference.width,
+ y: commonY
+ };
+ break;
+
+ case left:
+ offsets = {
+ x: reference.x - element.width,
+ y: commonY
+ };
+ break;
+
+ default:
+ offsets = {
+ x: reference.x,
+ y: reference.y
+ };
+ }
+
+ var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
+
+ if (mainAxis != null) {
+ var len = mainAxis === 'y' ? 'height' : 'width';
+
+ switch (variation) {
+ case start:
+ offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
+ break;
+
+ case end:
+ offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
+ break;
+ }
+ }
+
+ return offsets;
+}
+
+function detectOverflow(state, options) {
+ if (options === void 0) {
+ options = {};
+ }
+
+ var _options = options,
+ _options$placement = _options.placement,
+ placement = _options$placement === void 0 ? state.placement : _options$placement,
+ _options$boundary = _options.boundary,
+ boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
+ _options$rootBoundary = _options.rootBoundary,
+ rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
+ _options$elementConte = _options.elementContext,
+ elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
+ _options$altBoundary = _options.altBoundary,
+ altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
+ _options$padding = _options.padding,
+ padding = _options$padding === void 0 ? 0 : _options$padding;
+ var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
+ var altContext = elementContext === popper ? reference : popper;
+ var referenceElement = state.elements.reference;
+ var popperRect = state.rects.popper;
+ var element = state.elements[altBoundary ? altContext : elementContext];
+ var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
+ var referenceClientRect = getBoundingClientRect(referenceElement);
+ var popperOffsets = computeOffsets({
+ reference: referenceClientRect,
+ element: popperRect,
+ strategy: 'absolute',
+ placement: placement
+ });
+ var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
+ var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
+ // 0 or negative = within the clipping rect
+
+ var overflowOffsets = {
+ top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
+ bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
+ left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
+ right: elementClientRect.right - clippingClientRect.right + paddingObject.right
+ };
+ var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element
+
+ if (elementContext === popper && offsetData) {
+ var offset = offsetData[placement];
+ Object.keys(overflowOffsets).forEach(function (key) {
+ var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
+ var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
+ overflowOffsets[key] += offset[axis] * multiply;
+ });
+ }
+
+ return overflowOffsets;
+}
+
+function computeAutoPlacement(state, options) {
+ if (options === void 0) {
+ options = {};
+ }
+
+ var _options = options,
+ placement = _options.placement,
+ boundary = _options.boundary,
+ rootBoundary = _options.rootBoundary,
+ padding = _options.padding,
+ flipVariations = _options.flipVariations,
+ _options$allowedAutoP = _options.allowedAutoPlacements,
+ allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
+ var variation = getVariation(placement);
+ var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
+ return getVariation(placement) === variation;
+ }) : basePlacements;
+ var allowedPlacements = placements$1.filter(function (placement) {
+ return allowedAutoPlacements.indexOf(placement) >= 0;
+ });
+
+ if (allowedPlacements.length === 0) {
+ allowedPlacements = placements$1;
+
+ if (process.env.NODE_ENV !== "production") {
+ console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(' '));
+ }
+ } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
+
+
+ var overflows = allowedPlacements.reduce(function (acc, placement) {
+ acc[placement] = detectOverflow(state, {
+ placement: placement,
+ boundary: boundary,
+ rootBoundary: rootBoundary,
+ padding: padding
+ })[getBasePlacement(placement)];
+ return acc;
+ }, {});
+ return Object.keys(overflows).sort(function (a, b) {
+ return overflows[a] - overflows[b];
+ });
+}
+
+function getExpandedFallbackPlacements(placement) {
+ if (getBasePlacement(placement) === auto) {
+ return [];
+ }
+
+ var oppositePlacement = getOppositePlacement(placement);
+ return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
+}
+
+function flip(_ref) {
+ var state = _ref.state,
+ options = _ref.options,
+ name = _ref.name;
+
+ if (state.modifiersData[name]._skip) {
+ return;
+ }
+
+ var _options$mainAxis = options.mainAxis,
+ checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
+ _options$altAxis = options.altAxis,
+ checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,
+ specifiedFallbackPlacements = options.fallbackPlacements,
+ padding = options.padding,
+ boundary = options.boundary,
+ rootBoundary = options.rootBoundary,
+ altBoundary = options.altBoundary,
+ _options$flipVariatio = options.flipVariations,
+ flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,
+ allowedAutoPlacements = options.allowedAutoPlacements;
+ var preferredPlacement = state.options.placement;
+ var basePlacement = getBasePlacement(preferredPlacement);
+ var isBasePlacement = basePlacement === preferredPlacement;
+ var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
+ var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
+ return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {
+ placement: placement,
+ boundary: boundary,
+ rootBoundary: rootBoundary,
+ padding: padding,
+ flipVariations: flipVariations,
+ allowedAutoPlacements: allowedAutoPlacements
+ }) : placement);
+ }, []);
+ var referenceRect = state.rects.reference;
+ var popperRect = state.rects.popper;
+ var checksMap = new Map();
+ var makeFallbackChecks = true;
+ var firstFittingPlacement = placements[0];
+
+ for (var i = 0; i < placements.length; i++) {
+ var placement = placements[i];
+
+ var _basePlacement = getBasePlacement(placement);
+
+ var isStartVariation = getVariation(placement) === start;
+ var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
+ var len = isVertical ? 'width' : 'height';
+ var overflow = detectOverflow(state, {
+ placement: placement,
+ boundary: boundary,
+ rootBoundary: rootBoundary,
+ altBoundary: altBoundary,
+ padding: padding
+ });
+ var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
+
+ if (referenceRect[len] > popperRect[len]) {
+ mainVariationSide = getOppositePlacement(mainVariationSide);
+ }
+
+ var altVariationSide = getOppositePlacement(mainVariationSide);
+ var checks = [];
+
+ if (checkMainAxis) {
+ checks.push(overflow[_basePlacement] <= 0);
+ }
+
+ if (checkAltAxis) {
+ checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
+ }
+
+ if (checks.every(function (check) {
+ return check;
+ })) {
+ firstFittingPlacement = placement;
+ makeFallbackChecks = false;
+ break;
+ }
+
+ checksMap.set(placement, checks);
+ }
+
+ if (makeFallbackChecks) {
+ // `2` may be desired in some cases – research later
+ var numberOfChecks = flipVariations ? 3 : 1;
+
+ var _loop = function _loop(_i) {
+ var fittingPlacement = placements.find(function (placement) {
+ var checks = checksMap.get(placement);
+
+ if (checks) {
+ return checks.slice(0, _i).every(function (check) {
+ return check;
+ });
+ }
+ });
+
+ if (fittingPlacement) {
+ firstFittingPlacement = fittingPlacement;
+ return "break";
+ }
+ };
+
+ for (var _i = numberOfChecks; _i > 0; _i--) {
+ var _ret = _loop(_i);
+
+ if (_ret === "break") break;
+ }
+ }
+
+ if (state.placement !== firstFittingPlacement) {
+ state.modifiersData[name]._skip = true;
+ state.placement = firstFittingPlacement;
+ state.reset = true;
+ }
+} // eslint-disable-next-line import/no-unused-modules
+
+
+var flip$1 = {
+ name: 'flip',
+ enabled: true,
+ phase: 'main',
+ fn: flip,
+ requiresIfExists: ['offset'],
+ data: {
+ _skip: false
+ }
+};
+
+function getSideOffsets(overflow, rect, preventedOffsets) {
+ if (preventedOffsets === void 0) {
+ preventedOffsets = {
+ x: 0,
+ y: 0
+ };
+ }
+
+ return {
+ top: overflow.top - rect.height - preventedOffsets.y,
+ right: overflow.right - rect.width + preventedOffsets.x,
+ bottom: overflow.bottom - rect.height + preventedOffsets.y,
+ left: overflow.left - rect.width - preventedOffsets.x
+ };
+}
+
+function isAnySideFullyClipped(overflow) {
+ return [top, right, bottom, left].some(function (side) {
+ return overflow[side] >= 0;
+ });
+}
+
+function hide(_ref) {
+ var state = _ref.state,
+ name = _ref.name;
+ var referenceRect = state.rects.reference;
+ var popperRect = state.rects.popper;
+ var preventedOffsets = state.modifiersData.preventOverflow;
+ var referenceOverflow = detectOverflow(state, {
+ elementContext: 'reference'
+ });
+ var popperAltOverflow = detectOverflow(state, {
+ altBoundary: true
+ });
+ var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
+ var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
+ var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
+ var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
+ state.modifiersData[name] = {
+ referenceClippingOffsets: referenceClippingOffsets,
+ popperEscapeOffsets: popperEscapeOffsets,
+ isReferenceHidden: isReferenceHidden,
+ hasPopperEscaped: hasPopperEscaped
+ };
+ state.attributes.popper = Object.assign({}, state.attributes.popper, {
+ 'data-popper-reference-hidden': isReferenceHidden,
+ 'data-popper-escaped': hasPopperEscaped
+ });
+} // eslint-disable-next-line import/no-unused-modules
+
+
+var hide$1 = {
+ name: 'hide',
+ enabled: true,
+ phase: 'main',
+ requiresIfExists: ['preventOverflow'],
+ fn: hide
+};
+
+function distanceAndSkiddingToXY(placement, rects, offset) {
+ var basePlacement = getBasePlacement(placement);
+ var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
+
+ var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
+ placement: placement
+ })) : offset,
+ skidding = _ref[0],
+ distance = _ref[1];
+
+ skidding = skidding || 0;
+ distance = (distance || 0) * invertDistance;
+ return [left, right].indexOf(basePlacement) >= 0 ? {
+ x: distance,
+ y: skidding
+ } : {
+ x: skidding,
+ y: distance
+ };
+}
+
+function offset(_ref2) {
+ var state = _ref2.state,
+ options = _ref2.options,
+ name = _ref2.name;
+ var _options$offset = options.offset,
+ offset = _options$offset === void 0 ? [0, 0] : _options$offset;
+ var data = placements.reduce(function (acc, placement) {
+ acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
+ return acc;
+ }, {});
+ var _data$state$placement = data[state.placement],
+ x = _data$state$placement.x,
+ y = _data$state$placement.y;
+
+ if (state.modifiersData.popperOffsets != null) {
+ state.modifiersData.popperOffsets.x += x;
+ state.modifiersData.popperOffsets.y += y;
+ }
+
+ state.modifiersData[name] = data;
+} // eslint-disable-next-line import/no-unused-modules
+
+
+var offset$1 = {
+ name: 'offset',
+ enabled: true,
+ phase: 'main',
+ requires: ['popperOffsets'],
+ fn: offset
+};
+
+function popperOffsets(_ref) {
+ var state = _ref.state,
+ name = _ref.name;
+ // Offsets are the actual position the popper needs to have to be
+ // properly positioned near its reference element
+ // This is the most basic placement, and will be adjusted by
+ // the modifiers in the next step
+ state.modifiersData[name] = computeOffsets({
+ reference: state.rects.reference,
+ element: state.rects.popper,
+ strategy: 'absolute',
+ placement: state.placement
+ });
+} // eslint-disable-next-line import/no-unused-modules
+
+
+var popperOffsets$1 = {
+ name: 'popperOffsets',
+ enabled: true,
+ phase: 'read',
+ fn: popperOffsets,
+ data: {}
+};
+
+function getAltAxis(axis) {
+ return axis === 'x' ? 'y' : 'x';
+}
+
+function preventOverflow(_ref) {
+ var state = _ref.state,
+ options = _ref.options,
+ name = _ref.name;
+ var _options$mainAxis = options.mainAxis,
+ checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
+ _options$altAxis = options.altAxis,
+ checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,
+ boundary = options.boundary,
+ rootBoundary = options.rootBoundary,
+ altBoundary = options.altBoundary,
+ padding = options.padding,
+ _options$tether = options.tether,
+ tether = _options$tether === void 0 ? true : _options$tether,
+ _options$tetherOffset = options.tetherOffset,
+ tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
+ var overflow = detectOverflow(state, {
+ boundary: boundary,
+ rootBoundary: rootBoundary,
+ padding: padding,
+ altBoundary: altBoundary
+ });
+ var basePlacement = getBasePlacement(state.placement);
+ var variation = getVariation(state.placement);
+ var isBasePlacement = !variation;
+ var mainAxis = getMainAxisFromPlacement(basePlacement);
+ var altAxis = getAltAxis(mainAxis);
+ var popperOffsets = state.modifiersData.popperOffsets;
+ var referenceRect = state.rects.reference;
+ var popperRect = state.rects.popper;
+ var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
+ placement: state.placement
+ })) : tetherOffset;
+ var data = {
+ x: 0,
+ y: 0
+ };
+
+ if (!popperOffsets) {
+ return;
+ }
+
+ if (checkMainAxis || checkAltAxis) {
+ var mainSide = mainAxis === 'y' ? top : left;
+ var altSide = mainAxis === 'y' ? bottom : right;
+ var len = mainAxis === 'y' ? 'height' : 'width';
+ var offset = popperOffsets[mainAxis];
+ var min$1 = popperOffsets[mainAxis] + overflow[mainSide];
+ var max$1 = popperOffsets[mainAxis] - overflow[altSide];
+ var additive = tether ? -popperRect[len] / 2 : 0;
+ var minLen = variation === start ? referenceRect[len] : popperRect[len];
+ var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
+ // outside the reference bounds
+
+ var arrowElement = state.elements.arrow;
+ var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
+ width: 0,
+ height: 0
+ };
+ var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();
+ var arrowPaddingMin = arrowPaddingObject[mainSide];
+ var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want
+ // to include its full size in the calculation. If the reference is small
+ // and near the edge of a boundary, the popper can overflow even if the
+ // reference is not overflowing as well (e.g. virtual elements with no
+ // width or height)
+
+ var arrowLen = within(0, referenceRect[len], arrowRect[len]);
+ var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;
+ var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;
+ var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
+ var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
+ var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;
+ var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;
+ var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;
+
+ if (checkMainAxis) {
+ var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
+ popperOffsets[mainAxis] = preventedOffset;
+ data[mainAxis] = preventedOffset - offset;
+ }
+
+ if (checkAltAxis) {
+ var _mainSide = mainAxis === 'x' ? top : left;
+
+ var _altSide = mainAxis === 'x' ? bottom : right;
+
+ var _offset = popperOffsets[altAxis];
+
+ var _min = _offset + overflow[_mainSide];
+
+ var _max = _offset - overflow[_altSide];
+
+ var _preventedOffset = within(tether ? min(_min, tetherMin) : _min, _offset, tether ? max(_max, tetherMax) : _max);
+
+ popperOffsets[altAxis] = _preventedOffset;
+ data[altAxis] = _preventedOffset - _offset;
+ }
+ }
+
+ state.modifiersData[name] = data;
+} // eslint-disable-next-line import/no-unused-modules
+
+
+var preventOverflow$1 = {
+ name: 'preventOverflow',
+ enabled: true,
+ phase: 'main',
+ fn: preventOverflow,
+ requiresIfExists: ['offset']
+};
+
+function getHTMLElementScroll(element) {
+ return {
+ scrollLeft: element.scrollLeft,
+ scrollTop: element.scrollTop
+ };
+}
+
+function getNodeScroll(node) {
+ if (node === getWindow(node) || !isHTMLElement(node)) {
+ return getWindowScroll(node);
+ } else {
+ return getHTMLElementScroll(node);
+ }
+}
+
+// Composite means it takes into account transforms as well as layout.
+
+function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
+ if (isFixed === void 0) {
+ isFixed = false;
+ }
+
+ var documentElement = getDocumentElement(offsetParent);
+ var rect = getBoundingClientRect(elementOrVirtualElement);
+ var isOffsetParentAnElement = isHTMLElement(offsetParent);
+ var scroll = {
+ scrollLeft: 0,
+ scrollTop: 0
+ };
+ var offsets = {
+ x: 0,
+ y: 0
+ };
+
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
+ if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
+ isScrollParent(documentElement)) {
+ scroll = getNodeScroll(offsetParent);
+ }
+
+ if (isHTMLElement(offsetParent)) {
+ offsets = getBoundingClientRect(offsetParent);
+ offsets.x += offsetParent.clientLeft;
+ offsets.y += offsetParent.clientTop;
+ } else if (documentElement) {
+ offsets.x = getWindowScrollBarX(documentElement);
+ }
+ }
+
+ return {
+ x: rect.left + scroll.scrollLeft - offsets.x,
+ y: rect.top + scroll.scrollTop - offsets.y,
+ width: rect.width,
+ height: rect.height
+ };
+}
+
+function order(modifiers) {
+ var map = new Map();
+ var visited = new Set();
+ var result = [];
+ modifiers.forEach(function (modifier) {
+ map.set(modifier.name, modifier);
+ }); // On visiting object, check for its dependencies and visit them recursively
+
+ function sort(modifier) {
+ visited.add(modifier.name);
+ var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
+ requires.forEach(function (dep) {
+ if (!visited.has(dep)) {
+ var depModifier = map.get(dep);
+
+ if (depModifier) {
+ sort(depModifier);
+ }
+ }
+ });
+ result.push(modifier);
+ }
+
+ modifiers.forEach(function (modifier) {
+ if (!visited.has(modifier.name)) {
+ // check for visited object
+ sort(modifier);
+ }
+ });
+ return result;
+}
+
+function orderModifiers(modifiers) {
+ // order based on dependencies
+ var orderedModifiers = order(modifiers); // order based on phase
+
+ return modifierPhases.reduce(function (acc, phase) {
+ return acc.concat(orderedModifiers.filter(function (modifier) {
+ return modifier.phase === phase;
+ }));
+ }, []);
+}
+
+function debounce(fn) {
+ var pending;
+ return function () {
+ if (!pending) {
+ pending = new Promise(function (resolve) {
+ Promise.resolve().then(function () {
+ pending = undefined;
+ resolve(fn());
+ });
+ });
+ }
+
+ return pending;
+ };
+}
+
+function format(str) {
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+
+ return [].concat(args).reduce(function (p, c) {
+ return p.replace(/%s/, c);
+ }, str);
+}
+
+var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
+var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
+var VALID_PROPERTIES = ['name', 'enabled', 'phase', 'fn', 'effect', 'requires', 'options'];
+function validateModifiers(modifiers) {
+ modifiers.forEach(function (modifier) {
+ Object.keys(modifier).forEach(function (key) {
+ switch (key) {
+ case 'name':
+ if (typeof modifier.name !== 'string') {
+ console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', "\"" + String(modifier.name) + "\""));
+ }
+
+ break;
+
+ case 'enabled':
+ if (typeof modifier.enabled !== 'boolean') {
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', "\"" + String(modifier.enabled) + "\""));
+ }
+
+ case 'phase':
+ if (modifierPhases.indexOf(modifier.phase) < 0) {
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(', '), "\"" + String(modifier.phase) + "\""));
+ }
+
+ break;
+
+ case 'fn':
+ if (typeof modifier.fn !== 'function') {
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', "\"" + String(modifier.fn) + "\""));
+ }
+
+ break;
+
+ case 'effect':
+ if (typeof modifier.effect !== 'function') {
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', "\"" + String(modifier.fn) + "\""));
+ }
+
+ break;
+
+ case 'requires':
+ if (!Array.isArray(modifier.requires)) {
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', "\"" + String(modifier.requires) + "\""));
+ }
+
+ break;
+
+ case 'requiresIfExists':
+ if (!Array.isArray(modifier.requiresIfExists)) {
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', "\"" + String(modifier.requiresIfExists) + "\""));
+ }
+
+ break;
+
+ case 'options':
+ case 'data':
+ break;
+
+ default:
+ console.error("PopperJS: an invalid property has been provided to the \"" + modifier.name + "\" modifier, valid properties are " + VALID_PROPERTIES.map(function (s) {
+ return "\"" + s + "\"";
+ }).join(', ') + "; but \"" + key + "\" was provided.");
+ }
+
+ modifier.requires && modifier.requires.forEach(function (requirement) {
+ if (modifiers.find(function (mod) {
+ return mod.name === requirement;
+ }) == null) {
+ console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
+ }
+ });
+ });
+ });
+}
+
+function uniqueBy(arr, fn) {
+ var identifiers = new Set();
+ return arr.filter(function (item) {
+ var identifier = fn(item);
+
+ if (!identifiers.has(identifier)) {
+ identifiers.add(identifier);
+ return true;
+ }
+ });
+}
+
+function mergeByName(modifiers) {
+ var merged = modifiers.reduce(function (merged, current) {
+ var existing = merged[current.name];
+ merged[current.name] = existing ? Object.assign({}, existing, current, {
+ options: Object.assign({}, existing.options, current.options),
+ data: Object.assign({}, existing.data, current.data)
+ }) : current;
+ return merged;
+ }, {}); // IE11 does not support Object.values
+
+ return Object.keys(merged).map(function (key) {
+ return merged[key];
+ });
+}
+
+var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';
+var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';
+var DEFAULT_OPTIONS = {
+ placement: 'bottom',
+ modifiers: [],
+ strategy: 'absolute'
+};
+
+function areValidElements() {
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return !args.some(function (element) {
+ return !(element && typeof element.getBoundingClientRect === 'function');
+ });
+}
+
+function popperGenerator(generatorOptions) {
+ if (generatorOptions === void 0) {
+ generatorOptions = {};
+ }
+
+ var _generatorOptions = generatorOptions,
+ _generatorOptions$def = _generatorOptions.defaultModifiers,
+ defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
+ _generatorOptions$def2 = _generatorOptions.defaultOptions,
+ defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
+ return function createPopper(reference, popper, options) {
+ if (options === void 0) {
+ options = defaultOptions;
+ }
+
+ var state = {
+ placement: 'bottom',
+ orderedModifiers: [],
+ options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
+ modifiersData: {},
+ elements: {
+ reference: reference,
+ popper: popper
+ },
+ attributes: {},
+ styles: {}
+ };
+ var effectCleanupFns = [];
+ var isDestroyed = false;
+ var instance = {
+ state: state,
+ setOptions: function setOptions(options) {
+ cleanupModifierEffects();
+ state.options = Object.assign({}, defaultOptions, state.options, options);
+ state.scrollParents = {
+ reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
+ popper: listScrollParents(popper)
+ }; // Orders the modifiers based on their dependencies and `phase`
+ // properties
+
+ var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
+
+ state.orderedModifiers = orderedModifiers.filter(function (m) {
+ return m.enabled;
+ }); // Validate the provided modifiers so that the consumer will get warned
+ // if one of the modifiers is invalid for any reason
+
+ if (process.env.NODE_ENV !== "production") {
+ var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {
+ var name = _ref.name;
+ return name;
+ });
+ validateModifiers(modifiers);
+
+ if (getBasePlacement(state.options.placement) === auto) {
+ var flipModifier = state.orderedModifiers.find(function (_ref2) {
+ var name = _ref2.name;
+ return name === 'flip';
+ });
+
+ if (!flipModifier) {
+ console.error(['Popper: "auto" placements require the "flip" modifier be', 'present and enabled to work.'].join(' '));
+ }
+ }
+
+ var _getComputedStyle = getComputedStyle$1(popper),
+ marginTop = _getComputedStyle.marginTop,
+ marginRight = _getComputedStyle.marginRight,
+ marginBottom = _getComputedStyle.marginBottom,
+ marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
+ // cause bugs with positioning, so we'll warn the consumer
+
+
+ if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
+ return parseFloat(margin);
+ })) {
+ console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));
+ }
+ }
+
+ runModifierEffects();
+ return instance.update();
+ },
+ // Sync update – it will always be executed, even if not necessary. This
+ // is useful for low frequency updates where sync behavior simplifies the
+ // logic.
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
+ // prefer the async Popper#update method
+ forceUpdate: function forceUpdate() {
+ if (isDestroyed) {
+ return;
+ }
+
+ var _state$elements = state.elements,
+ reference = _state$elements.reference,
+ popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
+ // anymore
+
+ if (!areValidElements(reference, popper)) {
+ if (process.env.NODE_ENV !== "production") {
+ console.error(INVALID_ELEMENT_ERROR);
+ }
+
+ return;
+ } // Store the reference and popper rects to be read by modifiers
+
+
+ state.rects = {
+ reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
+ popper: getLayoutRect(popper)
+ }; // Modifiers have the ability to reset the current update cycle. The
+ // most common use case for this is the `flip` modifier changing the
+ // placement, which then needs to re-run all the modifiers, because the
+ // logic was previously ran for the previous placement and is therefore
+ // stale/incorrect
+
+ state.reset = false;
+ state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
+ // is filled with the initial data specified by the modifier. This means
+ // it doesn't persist and is fresh on each update.
+ // To ensure persistent data, use `${name}#persistent`
+
+ state.orderedModifiers.forEach(function (modifier) {
+ return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
+ });
+ var __debug_loops__ = 0;
+
+ for (var index = 0; index < state.orderedModifiers.length; index++) {
+ if (process.env.NODE_ENV !== "production") {
+ __debug_loops__ += 1;
+
+ if (__debug_loops__ > 100) {
+ console.error(INFINITE_LOOP_ERROR);
+ break;
+ }
+ }
+
+ if (state.reset === true) {
+ state.reset = false;
+ index = -1;
+ continue;
+ }
+
+ var _state$orderedModifie = state.orderedModifiers[index],
+ fn = _state$orderedModifie.fn,
+ _state$orderedModifie2 = _state$orderedModifie.options,
+ _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
+ name = _state$orderedModifie.name;
+
+ if (typeof fn === 'function') {
+ state = fn({
+ state: state,
+ options: _options,
+ name: name,
+ instance: instance
+ }) || state;
+ }
+ }
+ },
+ // Async and optimistically optimized update – it will not be executed if
+ // not necessary (debounced to run at most once-per-tick)
+ update: debounce(function () {
+ return new Promise(function (resolve) {
+ instance.forceUpdate();
+ resolve(state);
+ });
+ }),
+ destroy: function destroy() {
+ cleanupModifierEffects();
+ isDestroyed = true;
+ }
+ };
+
+ if (!areValidElements(reference, popper)) {
+ if (process.env.NODE_ENV !== "production") {
+ console.error(INVALID_ELEMENT_ERROR);
+ }
+
+ return instance;
+ }
+
+ instance.setOptions(options).then(function (state) {
+ if (!isDestroyed && options.onFirstUpdate) {
+ options.onFirstUpdate(state);
+ }
+ }); // Modifiers have the ability to execute arbitrary code before the first
+ // update cycle runs. They will be executed in the same order as the update
+ // cycle. This is useful when a modifier adds some persistent data that
+ // other modifiers need to use, but the modifier is run after the dependent
+ // one.
+
+ function runModifierEffects() {
+ state.orderedModifiers.forEach(function (_ref3) {
+ var name = _ref3.name,
+ _ref3$options = _ref3.options,
+ options = _ref3$options === void 0 ? {} : _ref3$options,
+ effect = _ref3.effect;
+
+ if (typeof effect === 'function') {
+ var cleanupFn = effect({
+ state: state,
+ name: name,
+ instance: instance,
+ options: options
+ });
+
+ var noopFn = function noopFn() {};
+
+ effectCleanupFns.push(cleanupFn || noopFn);
+ }
+ });
+ }
+
+ function cleanupModifierEffects() {
+ effectCleanupFns.forEach(function (fn) {
+ return fn();
+ });
+ effectCleanupFns = [];
+ }
+
+ return instance;
+ };
+}
+
+var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];
+var createPopper = /*#__PURE__*/popperGenerator({
+ defaultModifiers: defaultModifiers
+}); // eslint-disable-next-line import/no-unused-modules
+
+class Suggest {
+ constructor(owner, containerEl, scope) {
+ this.owner = owner;
+ this.containerEl = containerEl;
+ containerEl.on("click", ".suggestion-item", this.onSuggestionClick.bind(this));
+ containerEl.on("mousemove", ".suggestion-item", this.onSuggestionMouseover.bind(this));
+ scope.register([], "ArrowUp", (event) => {
+ if (!event.isComposing) {
+ this.setSelectedItem(this.selectedItem - 1, true);
+ return false;
+ }
+ });
+ scope.register([], "ArrowDown", (event) => {
+ if (!event.isComposing) {
+ this.setSelectedItem(this.selectedItem + 1, true);
+ return false;
+ }
+ });
+ scope.register([], "Enter", (event) => {
+ if (!event.isComposing) {
+ this.useSelectedItem(event);
+ return false;
+ }
+ });
+ }
+ onSuggestionClick(event, el) {
+ event.preventDefault();
+ const item = this.suggestions.indexOf(el);
+ this.setSelectedItem(item, false);
+ this.useSelectedItem(event);
+ }
+ onSuggestionMouseover(_event, el) {
+ const item = this.suggestions.indexOf(el);
+ this.setSelectedItem(item, false);
+ }
+ setSuggestions(values) {
+ this.containerEl.empty();
+ const suggestionEls = [];
+ values.forEach((value) => {
+ const suggestionEl = this.containerEl.createDiv("suggestion-item");
+ this.owner.renderSuggestion(value, suggestionEl);
+ suggestionEls.push(suggestionEl);
+ });
+ this.values = values;
+ this.suggestions = suggestionEls;
+ this.setSelectedItem(0, false);
+ }
+ useSelectedItem(event) {
+ const currentValue = this.values[this.selectedItem];
+ if (currentValue) {
+ this.owner.selectSuggestion(currentValue, event);
+ }
+ }
+ setSelectedItem(selectedIndex, scrollIntoView) {
+ const normalizedIndex = wrapAround(selectedIndex, this.suggestions.length);
+ const prevSelectedSuggestion = this.suggestions[this.selectedItem];
+ const selectedSuggestion = this.suggestions[normalizedIndex];
+ prevSelectedSuggestion === null || prevSelectedSuggestion === void 0 ? void 0 : prevSelectedSuggestion.removeClass("is-selected");
+ selectedSuggestion === null || selectedSuggestion === void 0 ? void 0 : selectedSuggestion.addClass("is-selected");
+ this.selectedItem = normalizedIndex;
+ if (scrollIntoView) {
+ selectedSuggestion.scrollIntoView(false);
+ }
+ }
+}
+class TextInputSuggest {
+ constructor(app, inputEl) {
+ this.app = app;
+ this.inputEl = inputEl;
+ this.scope = new obsidian.Scope();
+ this.suggestEl = createDiv("suggestion-container");
+ const suggestion = this.suggestEl.createDiv("suggestion");
+ this.suggest = new Suggest(this, suggestion, this.scope);
+ this.scope.register([], "Escape", this.close.bind(this));
+ this.inputEl.addEventListener("input", this.onInputChanged.bind(this));
+ this.inputEl.addEventListener("focus", this.onInputChanged.bind(this));
+ this.inputEl.addEventListener("blur", this.close.bind(this));
+ this.suggestEl.on("mousedown", ".suggestion-container", (event) => {
+ event.preventDefault();
+ });
+ }
+ onInputChanged() {
+ const inputStr = this.inputEl.value;
+ const suggestions = this.getSuggestions(inputStr);
+ if (suggestions.length > 0) {
+ this.suggest.setSuggestions(suggestions);
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ this.open(this.app.dom.appContainerEl, this.inputEl);
+ }
+ }
+ open(container, inputEl) {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ this.app.keymap.pushScope(this.scope);
+ container.appendChild(this.suggestEl);
+ this.popper = createPopper(inputEl, this.suggestEl, {
+ placement: "bottom-start",
+ modifiers: [
+ {
+ name: "sameWidth",
+ enabled: true,
+ fn: ({ state, instance }) => {
+ // Note: positioning needs to be calculated twice -
+ // first pass - positioning it according to the width of the popper
+ // second pass - position it with the width bound to the reference element
+ // we need to early exit to avoid an infinite loop
+ const targetWidth = `${state.rects.reference.width}px`;
+ if (state.styles.popper.width === targetWidth) {
+ return;
+ }
+ state.styles.popper.width = targetWidth;
+ instance.update();
+ },
+ phase: "beforeWrite",
+ requires: ["computeStyles"],
+ },
+ ],
+ });
+ }
+ close() {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ this.app.keymap.popScope(this.scope);
+ this.suggest.setSuggestions([]);
+ this.popper.destroy();
+ this.suggestEl.detach();
+ }
+}
+
+class FileSuggest extends TextInputSuggest {
+ getSuggestions(inputStr) {
+ const abstractFiles = this.app.vault.getAllLoadedFiles();
+ const files = [];
+ const lowerCaseInputStr = inputStr.toLowerCase();
+ abstractFiles.forEach((file) => {
+ if (file instanceof obsidian.TFile &&
+ file.extension === "md" &&
+ file.path.toLowerCase().contains(lowerCaseInputStr)) {
+ files.push(file);
+ }
+ });
+ return files;
+ }
+ renderSuggestion(file, el) {
+ el.setText(file.path);
+ }
+ selectSuggestion(file) {
+ this.inputEl.value = file.path;
+ this.inputEl.trigger("input");
+ this.close();
+ }
+}
+class FolderSuggest extends TextInputSuggest {
+ getSuggestions(inputStr) {
+ const abstractFiles = this.app.vault.getAllLoadedFiles();
+ const folders = [];
+ const lowerCaseInputStr = inputStr.toLowerCase();
+ abstractFiles.forEach((folder) => {
+ if (folder instanceof obsidian.TFolder &&
+ folder.path.toLowerCase().contains(lowerCaseInputStr)) {
+ folders.push(folder);
+ }
+ });
+ return folders;
+ }
+ renderSuggestion(file, el) {
+ el.setText(file.path);
+ }
+ selectSuggestion(file) {
+ this.inputEl.value = file.path;
+ this.inputEl.trigger("input");
+ this.close();
+ }
+}
+
+/* src/settings/NoteTemplateSetting.svelte generated by Svelte v3.35.0 */
+
+function create_if_block$2(ctx) {
+ let div;
+ let t;
+
+ return {
+ c() {
+ div = element("div");
+ t = text(/*error*/ ctx[3]);
+ attr(div, "class", "has-error");
+ },
+ m(target, anchor) {
+ insert(target, div, anchor);
+ append(div, t);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*error*/ 8) set_data(t, /*error*/ ctx[3]);
+ },
+ d(detaching) {
+ if (detaching) detach(div);
+ }
+ };
+}
+
+function create_fragment$2(ctx) {
+ let div4;
+ let div2;
+ let div0;
+ let t0_value = capitalize(/*periodicity*/ ctx[1]) + "";
+ let t0;
+ let t1;
+ let t2;
+ let div1;
+ let t4;
+ let t5;
+ let div3;
+ let input;
+ let mounted;
+ let dispose;
+ let if_block = /*error*/ ctx[3] && create_if_block$2(ctx);
+
+ return {
+ c() {
+ div4 = element("div");
+ div2 = element("div");
+ div0 = element("div");
+ t0 = text(t0_value);
+ t1 = text(" Note Template");
+ t2 = space();
+ div1 = element("div");
+ div1.textContent = "Choose the file to use as a template";
+ t4 = space();
+ if (if_block) if_block.c();
+ t5 = space();
+ div3 = element("div");
+ input = element("input");
+ attr(div0, "class", "setting-item-name");
+ attr(div1, "class", "setting-item-description");
+ attr(div2, "class", "setting-item-info");
+ attr(input, "type", "text");
+ attr(input, "spellcheck", false);
+ attr(input, "placeholder", "Example: folder/note");
+ toggle_class(input, "has-error", !!/*error*/ ctx[3]);
+ attr(div3, "class", "setting-item-control");
+ attr(div4, "class", "setting-item");
+ },
+ m(target, anchor) {
+ insert(target, div4, anchor);
+ append(div4, div2);
+ append(div2, div0);
+ append(div0, t0);
+ append(div0, t1);
+ append(div2, t2);
+ append(div2, div1);
+ append(div2, t4);
+ if (if_block) if_block.m(div2, null);
+ append(div4, t5);
+ append(div4, div3);
+ append(div3, input);
+ /*input_binding*/ ctx[7](input);
+ set_input_value(input, /*$settings*/ ctx[2][/*periodicity*/ ctx[1]].template);
+
+ if (!mounted) {
+ dispose = [
+ listen(input, "input", /*input_input_handler*/ ctx[8]),
+ listen(input, "change", /*validateOnBlur*/ ctx[5]),
+ listen(input, "input", /*clearError*/ ctx[6])
+ ];
+
+ mounted = true;
+ }
+ },
+ p(ctx, [dirty]) {
+ if (dirty & /*periodicity*/ 2 && t0_value !== (t0_value = capitalize(/*periodicity*/ ctx[1]) + "")) set_data(t0, t0_value);
+
+ if (/*error*/ ctx[3]) {
+ if (if_block) {
+ if_block.p(ctx, dirty);
+ } else {
+ if_block = create_if_block$2(ctx);
+ if_block.c();
+ if_block.m(div2, null);
+ }
+ } else if (if_block) {
+ if_block.d(1);
+ if_block = null;
+ }
+
+ if (dirty & /*$settings, periodicity*/ 6 && input.value !== /*$settings*/ ctx[2][/*periodicity*/ ctx[1]].template) {
+ set_input_value(input, /*$settings*/ ctx[2][/*periodicity*/ ctx[1]].template);
+ }
+
+ if (dirty & /*error*/ 8) {
+ toggle_class(input, "has-error", !!/*error*/ ctx[3]);
+ }
+ },
+ i: noop,
+ o: noop,
+ d(detaching) {
+ if (detaching) detach(div4);
+ if (if_block) if_block.d();
+ /*input_binding*/ ctx[7](null);
+ mounted = false;
+ run_all(dispose);
+ }
+ };
+}
+
+function instance$2($$self, $$props, $$invalidate) {
+ let $settings,
+ $$unsubscribe_settings = noop,
+ $$subscribe_settings = () => ($$unsubscribe_settings(), $$unsubscribe_settings = subscribe(settings, $$value => $$invalidate(2, $settings = $$value)), settings);
+
+ $$self.$$.on_destroy.push(() => $$unsubscribe_settings());
+
+
+ let { settings } = $$props;
+ $$subscribe_settings();
+ let { periodicity } = $$props;
+ let error;
+ let inputEl;
+
+ function validateOnBlur() {
+ $$invalidate(3, error = validateTemplate(inputEl.value));
+ }
+
+ function clearError() {
+ $$invalidate(3, error = "");
+ }
+
+ onMount(() => {
+ $$invalidate(3, error = validateTemplate(inputEl.value));
+ new FileSuggest(window.app, inputEl);
+ });
+
+ function input_binding($$value) {
+ binding_callbacks[$$value ? "unshift" : "push"](() => {
+ inputEl = $$value;
+ $$invalidate(4, inputEl);
+ });
+ }
+
+ function input_input_handler() {
+ $settings[periodicity].template = this.value;
+ settings.set($settings);
+ $$invalidate(1, periodicity);
+ }
+
+ $$self.$$set = $$props => {
+ if ("settings" in $$props) $$subscribe_settings($$invalidate(0, settings = $$props.settings));
+ if ("periodicity" in $$props) $$invalidate(1, periodicity = $$props.periodicity);
+ };
+
+ $$self.$$.update = () => {
+ if ($$self.$$.dirty & /*$settings, periodicity*/ 6) {
+ $settings[periodicity].template || "";
+ }
+ };
+
+ return [
+ settings,
+ periodicity,
+ $settings,
+ error,
+ inputEl,
+ validateOnBlur,
+ clearError,
+ input_binding,
+ input_input_handler
+ ];
+}
+
+class NoteTemplateSetting extends SvelteComponent {
+ constructor(options) {
+ super();
+ init(this, options, instance$2, create_fragment$2, safe_not_equal, { settings: 0, periodicity: 1 });
+ }
+}
+
+/* src/settings/NoteFolderSetting.svelte generated by Svelte v3.35.0 */
+
+function create_if_block$1(ctx) {
+ let div;
+ let t;
+
+ return {
+ c() {
+ div = element("div");
+ t = text(/*error*/ ctx[4]);
+ attr(div, "class", "has-error");
+ },
+ m(target, anchor) {
+ insert(target, div, anchor);
+ append(div, t);
+ },
+ p(ctx, dirty) {
+ if (dirty & /*error*/ 16) set_data(t, /*error*/ ctx[4]);
+ },
+ d(detaching) {
+ if (detaching) detach(div);
+ }
+ };
+}
+
+function create_fragment$1(ctx) {
+ let div4;
+ let div2;
+ let div0;
+ let t1;
+ let div1;
+ let t2;
+ let t3;
+ let t4;
+ let t5;
+ let t6;
+ let div3;
+ let input;
+ let mounted;
+ let dispose;
+ let if_block = /*error*/ ctx[4] && create_if_block$1(ctx);
+
+ return {
+ c() {
+ div4 = element("div");
+ div2 = element("div");
+ div0 = element("div");
+ div0.textContent = "Note Folder";
+ t1 = space();
+ div1 = element("div");
+ t2 = text("New ");
+ t3 = text(/*periodicity*/ ctx[1]);
+ t4 = text(" notes will be placed here");
+ t5 = space();
+ if (if_block) if_block.c();
+ t6 = space();
+ div3 = element("div");
+ input = element("input");
+ attr(div0, "class", "setting-item-name");
+ attr(div1, "class", "setting-item-description");
+ attr(div2, "class", "setting-item-info");
+ attr(input, "type", "text");
+ attr(input, "spellcheck", false);
+ attr(input, "placeholder", "Example: folder 1/folder 2");
+ toggle_class(input, "has-error", !!/*error*/ ctx[4]);
+ attr(div3, "class", "setting-item-control");
+ attr(div4, "class", "setting-item");
+ },
+ m(target, anchor) {
+ insert(target, div4, anchor);
+ append(div4, div2);
+ append(div2, div0);
+ append(div2, t1);
+ append(div2, div1);
+ append(div1, t2);
+ append(div1, t3);
+ append(div1, t4);
+ append(div2, t5);
+ if (if_block) if_block.m(div2, null);
+ append(div4, t6);
+ append(div4, div3);
+ append(div3, input);
+ set_input_value(input, /*$settings*/ ctx[2][/*periodicity*/ ctx[1]].folder);
+ /*input_binding*/ ctx[8](input);
+
+ if (!mounted) {
+ dispose = [
+ listen(input, "input", /*input_input_handler*/ ctx[7]),
+ listen(input, "change", /*onChange*/ ctx[5]),
+ listen(input, "input", /*clearError*/ ctx[6])
+ ];
+
+ mounted = true;
+ }
+ },
+ p(ctx, [dirty]) {
+ if (dirty & /*periodicity*/ 2) set_data(t3, /*periodicity*/ ctx[1]);
+
+ if (/*error*/ ctx[4]) {
+ if (if_block) {
+ if_block.p(ctx, dirty);
+ } else {
+ if_block = create_if_block$1(ctx);
+ if_block.c();
+ if_block.m(div2, null);
+ }
+ } else if (if_block) {
+ if_block.d(1);
+ if_block = null;
+ }
+
+ if (dirty & /*$settings, periodicity*/ 6 && input.value !== /*$settings*/ ctx[2][/*periodicity*/ ctx[1]].folder) {
+ set_input_value(input, /*$settings*/ ctx[2][/*periodicity*/ ctx[1]].folder);
+ }
+
+ if (dirty & /*error*/ 16) {
+ toggle_class(input, "has-error", !!/*error*/ ctx[4]);
+ }
+ },
+ i: noop,
+ o: noop,
+ d(detaching) {
+ if (detaching) detach(div4);
+ if (if_block) if_block.d();
+ /*input_binding*/ ctx[8](null);
+ mounted = false;
+ run_all(dispose);
+ }
+ };
+}
+
+function instance$1($$self, $$props, $$invalidate) {
+ let $settings,
+ $$unsubscribe_settings = noop,
+ $$subscribe_settings = () => ($$unsubscribe_settings(), $$unsubscribe_settings = subscribe(settings, $$value => $$invalidate(2, $settings = $$value)), settings);
+
+ $$self.$$.on_destroy.push(() => $$unsubscribe_settings());
+
+
+ let { settings } = $$props;
+ $$subscribe_settings();
+ let { periodicity } = $$props;
+ let inputEl;
+ let error;
+
+ function onChange() {
+ $$invalidate(4, error = validateFolder(inputEl.value));
+ }
+
+ function clearError() {
+ $$invalidate(4, error = "");
+ }
+
+ onMount(() => {
+ $$invalidate(4, error = validateFolder(inputEl.value));
+ new FolderSuggest(window.app, inputEl);
+ });
+
+ function input_input_handler() {
+ $settings[periodicity].folder = this.value;
+ settings.set($settings);
+ $$invalidate(1, periodicity);
+ }
+
+ function input_binding($$value) {
+ binding_callbacks[$$value ? "unshift" : "push"](() => {
+ inputEl = $$value;
+ $$invalidate(3, inputEl);
+ });
+ }
+
+ $$self.$$set = $$props => {
+ if ("settings" in $$props) $$subscribe_settings($$invalidate(0, settings = $$props.settings));
+ if ("periodicity" in $$props) $$invalidate(1, periodicity = $$props.periodicity);
+ };
+
+ $$self.$$.update = () => {
+ if ($$self.$$.dirty & /*$settings, periodicity*/ 6) {
+ $settings[periodicity].folder || "";
+ }
+ };
+
+ return [
+ settings,
+ periodicity,
+ $settings,
+ inputEl,
+ error,
+ onChange,
+ clearError,
+ input_input_handler,
+ input_binding
+ ];
+}
+
+class NoteFolderSetting extends SvelteComponent {
+ constructor(options) {
+ super();
+ init(this, options, instance$1, create_fragment$1, safe_not_equal, { settings: 0, periodicity: 1 });
+ }
+}
+
+/* src/settings/SettingsTab.svelte generated by Svelte v3.35.0 */
+
+function get_each_context(ctx, list, i) {
+ const child_ctx = ctx.slice();
+ child_ctx[9] = list[i];
+ return child_ctx;
+}
+
+// (33:0) {#if $settingsStore.showGettingStartedBanner}
+function create_if_block_1(ctx) {
+ let gettingstartedbanner;
+ let current;
+
+ gettingstartedbanner = new GettingStartedBanner({
+ props: {
+ migrateDailyNoteSettings: /*migrateDailyNoteSettings*/ ctx[2],
+ settings: /*settingsStore*/ ctx[1],
+ handleTeardown: /*func*/ ctx[6]
+ }
+ });
+
+ return {
+ c() {
+ create_component(gettingstartedbanner.$$.fragment);
+ },
+ m(target, anchor) {
+ mount_component(gettingstartedbanner, target, anchor);
+ current = true;
+ },
+ p(ctx, dirty) {
+ const gettingstartedbanner_changes = {};
+ if (dirty & /*$settingsStore*/ 1) gettingstartedbanner_changes.handleTeardown = /*func*/ ctx[6];
+ gettingstartedbanner.$set(gettingstartedbanner_changes);
+ },
+ i(local) {
+ if (current) return;
+ transition_in(gettingstartedbanner.$$.fragment, local);
+ current = true;
+ },
+ o(local) {
+ transition_out(gettingstartedbanner.$$.fragment, local);
+ current = false;
+ },
+ d(detaching) {
+ destroy_component(gettingstartedbanner, detaching);
+ }
+ };
+}
+
+// (62:2) {#if $settingsStore[periodicity].enabled}
+function create_if_block(ctx) {
+ let div;
+ let noteformatsetting;
+ let t0;
+ let notetemplatesetting;
+ let t1;
+ let notefoldersetting;
+ let t2;
+ let div_intro;
+ let div_outro;
+ let current;
+
+ noteformatsetting = new NoteFormatSetting({
+ props: {
+ periodicity: /*periodicity*/ ctx[9],
+ settings: /*settingsStore*/ ctx[1]
+ }
+ });
+
+ notetemplatesetting = new NoteTemplateSetting({
+ props: {
+ periodicity: /*periodicity*/ ctx[9],
+ settings: /*settingsStore*/ ctx[1]
+ }
+ });
+
+ notefoldersetting = new NoteFolderSetting({
+ props: {
+ periodicity: /*periodicity*/ ctx[9],
+ settings: /*settingsStore*/ ctx[1]
+ }
+ });
+
+ return {
+ c() {
+ div = element("div");
+ create_component(noteformatsetting.$$.fragment);
+ t0 = space();
+ create_component(notetemplatesetting.$$.fragment);
+ t1 = space();
+ create_component(notefoldersetting.$$.fragment);
+ t2 = space();
+ },
+ m(target, anchor) {
+ insert(target, div, anchor);
+ mount_component(noteformatsetting, div, null);
+ append(div, t0);
+ mount_component(notetemplatesetting, div, null);
+ append(div, t1);
+ mount_component(notefoldersetting, div, null);
+ append(div, t2);
+ current = true;
+ },
+ p: noop,
+ i(local) {
+ if (current) return;
+ transition_in(noteformatsetting.$$.fragment, local);
+ transition_in(notetemplatesetting.$$.fragment, local);
+ transition_in(notefoldersetting.$$.fragment, local);
+
+ add_render_callback(() => {
+ if (div_outro) div_outro.end(1);
+ if (!div_intro) div_intro = create_in_transition(div, slide, {});
+ div_intro.start();
+ });
+
+ current = true;
+ },
+ o(local) {
+ transition_out(noteformatsetting.$$.fragment, local);
+ transition_out(notetemplatesetting.$$.fragment, local);
+ transition_out(notefoldersetting.$$.fragment, local);
+ if (div_intro) div_intro.invalidate();
+ div_outro = create_out_transition(div, slide, {});
+ current = false;
+ },
+ d(detaching) {
+ if (detaching) detach(div);
+ destroy_component(noteformatsetting);
+ destroy_component(notetemplatesetting);
+ destroy_component(notefoldersetting);
+ if (detaching && div_outro) div_outro.end();
+ }
+ };
+}
+
+// (42:0) {#each periodicities as periodicity}
+function create_each_block(ctx) {
+ let div4;
+ let div1;
+ let div0;
+ let h3;
+ let t0_value = capitalize(/*periodicity*/ ctx[9]) + "";
+ let t0;
+ let t1;
+ let t2;
+ let div3;
+ let div2;
+ let t3;
+ let if_block_anchor;
+ let current;
+ let mounted;
+ let dispose;
+
+ function click_handler() {
+ return /*click_handler*/ ctx[7](/*periodicity*/ ctx[9]);
+ }
+
+ let if_block = /*$settingsStore*/ ctx[0][/*periodicity*/ ctx[9]].enabled && create_if_block(ctx);
+
+ return {
+ c() {
+ div4 = element("div");
+ div1 = element("div");
+ div0 = element("div");
+ h3 = element("h3");
+ t0 = text(t0_value);
+ t1 = text(" Notes");
+ t2 = space();
+ div3 = element("div");
+ div2 = element("div");
+ t3 = space();
+ if (if_block) if_block.c();
+ if_block_anchor = empty();
+ attr(div0, "class", "setting-item-name");
+ attr(div1, "class", "setting-item-info");
+ attr(div2, "class", "checkbox-container");
+ toggle_class(div2, "is-enabled", /*$settingsStore*/ ctx[0][/*periodicity*/ ctx[9]].enabled);
+ attr(div3, "class", "setting-item-control");
+ attr(div4, "class", "setting-item setting-item-heading");
+ },
+ m(target, anchor) {
+ insert(target, div4, anchor);
+ append(div4, div1);
+ append(div1, div0);
+ append(div0, h3);
+ append(h3, t0);
+ append(h3, t1);
+ append(div4, t2);
+ append(div4, div3);
+ append(div3, div2);
+ insert(target, t3, anchor);
+ if (if_block) if_block.m(target, anchor);
+ insert(target, if_block_anchor, anchor);
+ current = true;
+
+ if (!mounted) {
+ dispose = listen(div2, "click", click_handler);
+ mounted = true;
+ }
+ },
+ p(new_ctx, dirty) {
+ ctx = new_ctx;
+
+ if (dirty & /*$settingsStore, periodicities*/ 9) {
+ toggle_class(div2, "is-enabled", /*$settingsStore*/ ctx[0][/*periodicity*/ ctx[9]].enabled);
+ }
+
+ if (/*$settingsStore*/ ctx[0][/*periodicity*/ ctx[9]].enabled) {
+ if (if_block) {
+ if_block.p(ctx, dirty);
+
+ if (dirty & /*$settingsStore*/ 1) {
+ transition_in(if_block, 1);
+ }
+ } else {
+ if_block = create_if_block(ctx);
+ if_block.c();
+ transition_in(if_block, 1);
+ if_block.m(if_block_anchor.parentNode, if_block_anchor);
+ }
+ } else if (if_block) {
+ group_outros();
+
+ transition_out(if_block, 1, 1, () => {
+ if_block = null;
+ });
+
+ check_outros();
+ }
+ },
+ i(local) {
+ if (current) return;
+ transition_in(if_block);
+ current = true;
+ },
+ o(local) {
+ transition_out(if_block);
+ current = false;
+ },
+ d(detaching) {
+ if (detaching) detach(div4);
+ if (detaching) detach(t3);
+ if (if_block) if_block.d(detaching);
+ if (detaching) detach(if_block_anchor);
+ mounted = false;
+ dispose();
+ }
+ };
+}
+
+function create_fragment(ctx) {
+ let t;
+ let each_1_anchor;
+ let current;
+ let if_block = /*$settingsStore*/ ctx[0].showGettingStartedBanner && create_if_block_1(ctx);
+ let each_value = /*periodicities*/ ctx[3];
+ let each_blocks = [];
+
+ for (let i = 0; i < each_value.length; i += 1) {
+ each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
+ }
+
+ const out = i => transition_out(each_blocks[i], 1, 1, () => {
+ each_blocks[i] = null;
+ });
+
+ return {
+ c() {
+ if (if_block) if_block.c();
+ t = space();
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].c();
+ }
+
+ each_1_anchor = empty();
+ },
+ m(target, anchor) {
+ if (if_block) if_block.m(target, anchor);
+ insert(target, t, anchor);
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].m(target, anchor);
+ }
+
+ insert(target, each_1_anchor, anchor);
+ current = true;
+ },
+ p(ctx, [dirty]) {
+ if (/*$settingsStore*/ ctx[0].showGettingStartedBanner) {
+ if (if_block) {
+ if_block.p(ctx, dirty);
+
+ if (dirty & /*$settingsStore*/ 1) {
+ transition_in(if_block, 1);
+ }
+ } else {
+ if_block = create_if_block_1(ctx);
+ if_block.c();
+ transition_in(if_block, 1);
+ if_block.m(t.parentNode, t);
+ }
+ } else if (if_block) {
+ group_outros();
+
+ transition_out(if_block, 1, 1, () => {
+ if_block = null;
+ });
+
+ check_outros();
+ }
+
+ if (dirty & /*periodicities, settingsStore, $settingsStore, capitalize*/ 11) {
+ each_value = /*periodicities*/ ctx[3];
+ let i;
+
+ for (i = 0; i < each_value.length; i += 1) {
+ const child_ctx = get_each_context(ctx, each_value, i);
+
+ if (each_blocks[i]) {
+ each_blocks[i].p(child_ctx, dirty);
+ transition_in(each_blocks[i], 1);
+ } else {
+ each_blocks[i] = create_each_block(child_ctx);
+ each_blocks[i].c();
+ transition_in(each_blocks[i], 1);
+ each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
+ }
+ }
+
+ group_outros();
+
+ for (i = each_value.length; i < each_blocks.length; i += 1) {
+ out(i);
+ }
+
+ check_outros();
+ }
+ },
+ i(local) {
+ if (current) return;
+ transition_in(if_block);
+
+ for (let i = 0; i < each_value.length; i += 1) {
+ transition_in(each_blocks[i]);
+ }
+
+ current = true;
+ },
+ o(local) {
+ transition_out(if_block);
+ each_blocks = each_blocks.filter(Boolean);
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ transition_out(each_blocks[i]);
+ }
+
+ current = false;
+ },
+ d(detaching) {
+ if (if_block) if_block.d(detaching);
+ if (detaching) detach(t);
+ destroy_each(each_blocks, detaching);
+ if (detaching) detach(each_1_anchor);
+ }
+ };
+}
+
+function instance($$self, $$props, $$invalidate) {
+ let $settingsStore;
+
+ let { settings } = $$props;
+ let { onUpdateSettings } = $$props;
+ let settingsStore = writable(settings);
+ component_subscribe($$self, settingsStore, value => $$invalidate(0, $settingsStore = value));
+ const unsubscribeFromSettings = settingsStore.subscribe(onUpdateSettings);
+
+ function migrateDailyNoteSettings() {
+ const dailyNoteSettings = getLegacyDailyNoteSettings();
+
+ settingsStore.update(old => Object.assign(Object.assign({}, old), {
+ daily: Object.assign(Object.assign({}, dailyNoteSettings), { enabled: true }),
+ hasMigratedDailyNoteSettings: true
+ }));
+ }
+
+ const periodicities = ["daily", "weekly", "monthly", "quarterly", "yearly"];
+
+ onDestroy(() => {
+ unsubscribeFromSettings();
+ });
+
+ const func = () => {
+ set_store_value(settingsStore, $settingsStore.showGettingStartedBanner = false, $settingsStore);
+ };
+
+ const click_handler = periodicity => {
+ set_store_value(settingsStore, $settingsStore[periodicity].enabled = !$settingsStore[periodicity].enabled, $settingsStore);
+ };
+
+ $$self.$$set = $$props => {
+ if ("settings" in $$props) $$invalidate(4, settings = $$props.settings);
+ if ("onUpdateSettings" in $$props) $$invalidate(5, onUpdateSettings = $$props.onUpdateSettings);
+ };
+
+ return [
+ $settingsStore,
+ settingsStore,
+ migrateDailyNoteSettings,
+ periodicities,
+ settings,
+ onUpdateSettings,
+ func,
+ click_handler
+ ];
+}
+
+class SettingsTab extends SvelteComponent {
+ constructor(options) {
+ super();
+ init(this, options, instance, create_fragment, safe_not_equal, { settings: 4, onUpdateSettings: 5 });
+ }
+}
+
+const DEFAULT_SETTINGS = Object.freeze({
+ format: "",
+ template: "",
+ folder: "",
+});
+class PeriodicNotesSettingsTab extends obsidian.PluginSettingTab {
+ constructor(app, plugin) {
+ super(app, plugin);
+ this.plugin = plugin;
+ }
+ display() {
+ this.containerEl.empty();
+ this.view = new SettingsTab({
+ target: this.containerEl,
+ props: {
+ settings: this.plugin.settings,
+ onUpdateSettings: this.plugin.updateSettings,
+ },
+ });
+ }
+}
+
+class PeriodicNotesPlugin extends obsidian.Plugin {
+ async onload() {
+ this.ribbonEl = null;
+ this.updateSettings = this.updateSettings.bind(this);
+ await this.loadSettings();
+ this.addSettingTab(new PeriodicNotesSettingsTab(this.app, this));
+ this.app.workspace.onLayoutReady(this.onLayoutReady.bind(this));
+ obsidian.addIcon("calendar-day", calendarDayIcon);
+ obsidian.addIcon("calendar-week", calendarWeekIcon);
+ obsidian.addIcon("calendar-month", calendarMonthIcon);
+ obsidian.addIcon("calendar-quarter", calendarQuarterIcon);
+ obsidian.addIcon("calendar-year", calendarYearIcon);
+ }
+ onLayoutReady() {
+ // If the user has Calendar Weekly Notes settings, migrate them automatically,
+ // since the functionality will be deprecated.
+ if (this.isInitialLoad && hasLegacyWeeklyNoteSettings()) {
+ this.migrateWeeklySettings();
+ this.settings.weekly.enabled = true;
+ }
+ this.configureRibbonIcons();
+ this.configureCommands();
+ }
+ migrateWeeklySettings() {
+ const calendarSettings = getLegacyWeeklyNoteSettings();
+ this.updateSettings(Object.assign(Object.assign({}, this.settings), {
+ weekly: Object.assign(Object.assign({}, calendarSettings), { enabled: true }),
+ hasMigratedWeeklyNoteSettings: true,
+ }));
+ }
+ configureRibbonIcons() {
+ var _a;
+ (_a = this.ribbonEl) === null || _a === void 0 ? void 0 : _a.detach();
+ const configuredPeriodicities = [
+ "daily",
+ "weekly",
+ "monthly",
+ "quarterly",
+ "yearly",
+ ].filter((periodicity) => this.settings[periodicity].enabled);
+ if (configuredPeriodicities.length) {
+ const periodicity = configuredPeriodicities[0];
+ const config = periodConfigs[periodicity];
+ this.ribbonEl = this.addRibbonIcon(`calendar-${config.unitOfTime}`, `Open ${config.relativeUnit}`, (event) => openPeriodicNote(periodicity, window.moment(), isMetaPressed(event)));
+ this.ribbonEl.addEventListener("contextmenu", (ev) => {
+ showFileMenu(this.app, this.settings, {
+ x: ev.pageX,
+ y: ev.pageY,
+ });
+ });
+ }
+ }
+ configureCommands() {
+ // Remove disabled commands
+ ["daily", "weekly", "monthly", "quarterly", "yearly"]
+ .filter((periodicity) => !this.settings[periodicity].enabled)
+ .forEach((periodicity) => {
+ getCommands(periodicity).forEach((command) =>
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ this.app.commands.removeCommand(`periodic-notes:${command.id}`));
+ });
+ // register enabled commands
+ ["daily", "weekly", "monthly", "quarterly", "yearly"]
+ .filter((periodicity) => this.settings[periodicity].enabled)
+ .forEach((periodicity) => {
+ getCommands(periodicity).forEach(this.addCommand.bind(this));
+ });
+ }
+ async loadSettings() {
+ const settings = await this.loadData();
+ if (!settings) {
+ this.isInitialLoad = true;
+ }
+ this.settings = Object.assign({}, {
+ showGettingStartedBanner: true,
+ hasMigratedDailyNoteSettings: false,
+ hasMigratedWeeklyNoteSettings: false,
+ daily: Object.assign({}, DEFAULT_SETTINGS),
+ weekly: Object.assign({}, DEFAULT_SETTINGS),
+ monthly: Object.assign({}, DEFAULT_SETTINGS),
+ quarterly: Object.assign({}, DEFAULT_SETTINGS),
+ yearly: Object.assign({}, DEFAULT_SETTINGS),
+ }, settings || {});
+ }
+ onSettingsUpdate() {
+ this.configureCommands();
+ this.configureRibbonIcons();
+ // Integrations (i.e. Calendar Plugin) can listen for changes to settings
+ this.app.workspace.trigger(SETTINGS_UPDATED);
+ }
+ async updateSettings(val) {
+ this.settings = val;
+ await this.saveData(this.settings);
+ this.onSettingsUpdate();
+ }
+}
+
+module.exports = PeriodicNotesPlugin;
diff --git a/.obsidian/plugins/periodic-notes/manifest.json b/.obsidian/plugins/periodic-notes/manifest.json
new file mode 100644
index 0000000..f34394e
--- /dev/null
+++ b/.obsidian/plugins/periodic-notes/manifest.json
@@ -0,0 +1,10 @@
+{
+ "id": "periodic-notes",
+ "name": "Periodic Notes",
+ "description": "Create/manage your daily, weekly, and monthly notes",
+ "version": "0.0.17",
+ "author": "Liam Cain",
+ "authorUrl": "https://github.com/liamcain/",
+ "isDesktopOnly": false,
+ "minAppVersion": "0.10.11"
+}
diff --git a/.obsidian/plugins/periodic-notes/styles.css b/.obsidian/plugins/periodic-notes/styles.css
new file mode 100644
index 0000000..d388888
--- /dev/null
+++ b/.obsidian/plugins/periodic-notes/styles.css
@@ -0,0 +1,30 @@
+.periodic-modal {
+ min-width: 40vw;
+}
+
+.settings-banner {
+ background-color: var(--background-primary-alt);
+ border-radius: 8px;
+ border: 1px solid var(--background-modifier-border);
+ margin-bottom: 1em;
+ margin-top: 1em;
+ padding: 1.5em;
+ text-align: left;
+}
+
+.settings-banner h3 {
+ margin-top: 0;
+}
+
+.settings-banner h4 {
+ margin-bottom: 0.25em;
+}
+
+.has-error {
+ color: var(--text-error);
+}
+
+input.has-error {
+ color: var(--text-error);
+ border-color: var(--text-error);
+}
diff --git a/.obsidian/plugins/table-editor-obsidian/data.json b/.obsidian/plugins/table-editor-obsidian/data.json
index 9009465..6484fc0 100644
--- a/.obsidian/plugins/table-editor-obsidian/data.json
+++ b/.obsidian/plugins/table-editor-obsidian/data.json
@@ -1,6 +1,6 @@
{
"formatType": "normal",
- "showRibbonIcon": true,
+ "showRibbonIcon": false,
"bindEnter": true,
"bindTab": true
}
\ No newline at end of file
diff --git a/.obsidian/starred.json b/.obsidian/starred.json
new file mode 100644
index 0000000..5f27367
--- /dev/null
+++ b/.obsidian/starred.json
@@ -0,0 +1,14 @@
+{
+ "items": [
+ {
+ "type": "file",
+ "title": "dokumentationRTM",
+ "path": "Firmen/Steinemann Technology/dokumentationRTM.md"
+ },
+ {
+ "type": "file",
+ "title": "Änderungen",
+ "path": "Firmen/Steinemann Technology/Notes/Penta/Penta Übersicht.md"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/.obsidian/templates.json b/.obsidian/templates.json
new file mode 100644
index 0000000..92807a9
--- /dev/null
+++ b/.obsidian/templates.json
@@ -0,0 +1,5 @@
+{
+ "dateFormat": "DD.MM.YY",
+ "timeFormat": "hh:mm",
+ "folder": "Templates"
+}
\ No newline at end of file
diff --git a/.obsidian/themes/Deep Work.css b/.obsidian/themes/Deep Work.css
new file mode 100644
index 0000000..7030723
--- /dev/null
+++ b/.obsidian/themes/Deep Work.css
@@ -0,0 +1,1166 @@
+:root {
+ --border-radius: 8px;
+ --border-radius-small: 4px;
+}
+
+:root {
+ --color-black: #010409;
+ --color-white: #f7f9fc;
+ --color-gray-0: #e1e7ee;
+ --color-gray-1: #c9d1d9;
+ --color-gray-2: #b1bac4;
+ --color-gray-3: #8b949e;
+ --color-gray-4: #6e7681;
+ --color-gray-5: #484f58;
+ --color-gray-6: #30363d;
+ --color-gray-7: #21262d;
+ --color-gray-8: #161b22;
+ --color-gray-9: #0d1117;
+ --color-blue-0: #cae8ff;
+ --color-blue-1: #a5d6ff;
+ --color-blue-2: #79c0ff;
+ --color-blue-3: #58a6ff;
+ --color-blue-4: #388bfd;
+ --color-blue-5: #1f6feb;
+ --color-blue-6: #1158c7;
+ --color-blue-7: #0d419d;
+ --color-blue-8: #0c2d6b;
+ --color-blue-9: #051d4d;
+ --color-green-0: #aff5b4;
+ --color-green-1: #7ee787;
+ --color-green-2: #56d364;
+ --color-green-3: #3fb950;
+ --color-green-4: #2ea043;
+ --color-green-5: #238636;
+ --color-green-6: #196c2e;
+ --color-green-7: #0f5323;
+ --color-green-8: #033a16;
+ --color-green-9: #04260f;
+ --color-yellow-0: #f8e3a1;
+ --color-yellow-1: #f2cc60;
+ --color-yellow-2: #e3b341;
+ --color-yellow-3: #d29922;
+ --color-yellow-4: #bb8009;
+ --color-yellow-5: #9e6a03;
+ --color-yellow-6: #845306;
+ --color-yellow-7: #693e00;
+ --color-yellow-8: #4b2900;
+ --color-yellow-9: #341a00;
+ --color-orange-0: #ffdfb6;
+ --color-orange-1: #ffc680;
+ --color-orange-2: #ffa657;
+ --color-orange-3: #f0883e;
+ --color-orange-4: #db6d28;
+ --color-orange-5: #bd561d;
+ --color-orange-6: #9b4215;
+ --color-orange-7: #762d0a;
+ --color-orange-8: #5a1e02;
+ --color-orange-9: #3d1300;
+ --color-red-0: #ffdcd7;
+ --color-red-1: #ffc1ba;
+ --color-red-2: #ffa198;
+ --color-red-3: #ff7b72;
+ --color-red-4: #f85149;
+ --color-red-5: #da3633;
+ --color-red-6: #b62324;
+ --color-red-7: #8e1519;
+ --color-red-8: #67060c;
+ --color-red-9: #490202;
+ --color-purple-0: #eddeff;
+ --color-purple-1: #e2c5ff;
+ --color-purple-2: #d2a8ff;
+ --color-purple-3: #bc8cff;
+ --color-purple-4: #a371f7;
+ --color-purple-5: #8957e5;
+ --color-purple-6: #6e40c9;
+ --color-purple-7: #553098;
+ --color-purple-8: #3c1e70;
+ --color-purple-9: #271052;
+ --color-pink-0: #ffdaec;
+ --color-pink-1: #ffbedd;
+ --color-pink-2: #ff9bce;
+ --color-pink-3: #f778ba;
+ --color-pink-4: #db61a2;
+ --color-pink-5: #bf4b8a;
+ --color-pink-6: #9e3670;
+ --color-pink-7: #7d2457;
+ --color-pink-8: #5e103e;
+ --color-pink-9: #42062a;
+}
+
+@keyframes bounceIn {
+ from,
+ 20%,
+ 40%,
+ 60%,
+ 80%,
+ to {
+ animation-timing-function: cubic-bezier(
+ 0.215,
+ 0.61,
+ 0.355,
+ 1
+ );
+ }
+ 0% {
+ opacity: 0;
+ transform: scale3d(0.3, 0.3, 0.3);
+ }
+ 20% {
+ transform: scale3d(1.1, 1.1, 1.1);
+ }
+ 40% {
+ transform: scale3d(0.9, 0.9, 0.9);
+ }
+ 60% {
+ opacity: 1;
+ transform: scale3d(1.03, 1.03, 1.03);
+ }
+ 80% {
+ transform: scale3d(0.97, 0.97, 0.97);
+ }
+ to {
+ opacity: 1;
+ transform: scale3d(1, 1, 1);
+ }
+}
+body {
+ line-height: 1.5;
+ word-wrap: break-word;
+}
+
+:root {
+ --default-font: -apple-system, BlinkMacSystemFont, Segoe UI,
+ Helvetica, Arial, sans-serif, Apple Color Emoji,
+ Segoe UI Emoji;
+ --editor-font: ui-monospace, SFMono-Regular, SF Mono, Menlo,
+ Consolas, Liberation Mono, monospace;
+}
+
+.markdown-source-view {
+ font-family: var(--editor-font);
+ font-weight: var(--cm-font-weight, 400);
+}
+
+.markdown-preview-view {
+ font-family: var(--default-font);
+ font-weight: var(--cm-font-weight, 400);
+}
+
+body .dropdown {
+ border-width: 2px;
+ border-color: var(--background-modifier-border);
+ border-radius: 6px;
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOTIuNCIgaGVpZ2h0PSIyOTIuNCI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTI4NyA2OS40YTE3LjYgMTcuNiAwIDAgMC0xMy01LjRIMTguNGMtNSAwLTkuMyAxLjgtMTIuOSA1LjRBMTcuNiAxNy42IDAgMCAwIDAgODIuMmMwIDUgMS44IDkuMyA1LjQgMTIuOWwxMjggMTI3LjljMy42IDMuNiA3LjggNS40IDEyLjggNS40czkuMi0xLjggMTIuOC01LjRMMjg3IDk1YzMuNS0zLjUgNS40LTcuOCA1LjQtMTIuOCAwLTUtMS45LTkuMi01LjUtMTIuOHoiLz48L3N2Zz4=);
+ cursor: pointer;
+}
+
+body [data-type="file-explorer"] .nav-files-container {
+ padding: 1rem;
+}
+body
+ [data-type="file-explorer"]
+ .nav-files-container
+ .nav-folder-title,
+body
+ [data-type="file-explorer"]
+ .nav-files-container
+ .nav-file-title {
+ white-space: normal;
+ width: auto;
+ border-left: 5px solid transparent;
+ transition: background-color 0.75s
+ cubic-bezier(0.075, 0.82, 0.165, 1),
+ border-left 0.75s cubic-bezier(0.075, 0.82, 0.165, 1),
+ color 1s cubic-bezier(0.075, 0.82, 0.165, 1);
+ margin-bottom: 0.25rem;
+}
+body
+ [data-type="file-explorer"]
+ .nav-files-container
+ .nav-folder-title:hover,
+body
+ [data-type="file-explorer"]
+ .nav-files-container
+ .nav-file-title:hover {
+ border-left: 5px solid var(--interactive-hover);
+}
+body
+ [data-type="file-explorer"]
+ .nav-files-container
+ .nav-file-title.is-active {
+ border-left: 5px solid var(--interactive-accent);
+}
+
+body .suggestion-container {
+ border-radius: 6px;
+}
+
+body {
+ padding-top: 27px !important;
+}
+
+body .titlebar {
+ height: 27px !important;
+}
+body .titlebar-inner {
+ background: var(--background-secondary-alt);
+ color: var(--text-normal);
+}
+body .titlebar-text {
+ top: 5px;
+}
+body .titlebar-button-container {
+ top: 0px;
+}
+body .titlebar-button {
+ opacity: 1;
+}
+
+body .workspace-leaf .view-header {
+ transition: border-bottom 1s
+ cubic-bezier(0.075, 0.82, 0.165, 1),
+ background-color 1s cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+body .workspace-leaf .view-header-title {
+ transition: color 1s cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+body .workspace-leaf.mod-active .view-header {
+ background-color: var(--background-primary);
+}
+body
+ .workspace-leaf.mod-active
+ .view-header-title-container::before,
+body
+ .workspace-leaf.mod-active
+ .view-header-title-container::after {
+ background: none !important;
+}
+
+body .modal {
+ border-radius: 18px;
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
+}
+body .modal .prompt-results {
+ padding: calc((1rem * 2) * 1);
+}
+body .modal.mod-settings {
+ max-width: 1440px;
+}
+body .modal.mod-community-theme {
+ max-width: 1440px;
+}
+body .modal-bg {
+ backdrop-filter: blur(10px);
+}
+body .modal .vertical-tabs-container .vertical-tab-header {
+ flex: 0 0 300px;
+}
+body .modal .community-plugin-search {
+ border-radius: 18px 0 0 18px;
+}
+body .modal .community-plugin-details {
+ border-radius: 0 18px 18px 0;
+}
+
+body .prompt {
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
+ border-radius: 18px;
+ padding: calc((1rem * 2) * 1);
+}
+body .prompt-input {
+ background-color: var(--background-primary-alt);
+ border-radius: 18px;
+ margin-bottom: calc(1rem * 1);
+ padding: calc(1rem * 1) !important;
+ height: initial;
+ font-size: 1.15rem;
+ flex-shrink: 0;
+}
+body .prompt-results {
+ padding: calc(1rem * 1);
+}
+body .prompt-results .suggestion-item {
+ border-left: 5px solid transparent;
+ border-radius: 6px;
+ transition: border-left 0.25s
+ cubic-bezier(0.075, 0.82, 0.165, 1),
+ background-color 0.75s cubic-bezier(0.075, 0.82, 0.165, 1),
+ color 0.75s cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+body .prompt-results .suggestion-item .suggestion-hotkey {
+ position: relative;
+ top: 0.25em;
+}
+body .prompt-results .suggestion-item.is-selected {
+ background-color: var(--background-secondary-alt);
+ color: var(--interactive-accent);
+ border-left: 5px solid var(--interactive-accent);
+}
+
+body .frontmatter-container {
+ border: 1px solid var(--background-modifier-border);
+ background-color: var(--background-secondary);
+ border-radius: 10px;
+ padding: calc((1rem * 2) * 1) calc(1rem * 1);
+}
+body .frontmatter code[class*="language-"] {
+ padding: initial;
+}
+
+body button {
+ border-radius: 6px;
+ border: 1px solid var(--color-border);
+ font-weight: 600;
+}
+
+body input[type="text"],
+body input[type="search"],
+body input[type="email"],
+body input[type="password"],
+body input[type="number"] {
+ border-width: 2px;
+ border-radius: 12px;
+ padding: calc(1rem * 1) calc((1rem * 2) * 1) calc(1rem * 1)
+ calc(1rem * 1);
+}
+
+body .setting-item .setting-hotkey {
+ border-radius: 10px;
+ padding: calc((1rem / 8) * 1) calc(1rem * 1);
+ min-height: 24px;
+ line-height: 24px;
+}
+
+body .status-bar {
+ display: flex;
+ justify-content: flex-end;
+ align-self: center;
+ max-height: none;
+ height: 27px;
+ width: 100%;
+ background-color: var(--background-primary);
+ color: var(--text-muted);
+ font-size: 14px;
+ font-family: var(--editor-font);
+ line-height: 1;
+ border-top: 1px solid var(--background-secondary);
+ gap: calc(1rem * 1);
+ padding: calc((1rem / 4) * 1) calc(1rem * 1);
+ user-select: none;
+}
+body .status-bar-item,
+body .status-bar-item-segment {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ align-content: center;
+ line-height: 1;
+ padding: 0;
+}
+body .status-bar-item svg,
+body .status-bar-item-segment svg {
+ display: block;
+}
+
+body .workspace-tabs .workspace-tab-header-container {
+ display: flex;
+ justify-content: center;
+ height: fit-content;
+ padding-top: calc((1rem / 2) * 1);
+ padding-right: 0;
+ padding-left: 0;
+ padding-bottom: calc((1rem / 2) * 1);
+}
+body .workspace-tab-container-inner {
+ min-height: 35px;
+ background-color: var(--background-secondary);
+ border: 2px solid var(--interactive-normal);
+ border-radius: 6px;
+ flex-wrap: wrap;
+}
+body .workspace-tab-header-inner {
+ width: 35px;
+ align-items: center;
+ justify-content: center;
+ margin: auto;
+}
+body .workspace-tab-header-inner-icon {
+ display: flex;
+ align-items: center;
+}
+body .workspace-tab-header {
+ border: 2px solid var(--color-transparent);
+ color: var(--text-muted);
+ cursor: pointer;
+}
+body .workspace-tab-header svg {
+ width: 15px;
+ height: 15px;
+}
+body .workspace-tab-header.is-active {
+ background-color: var(--interactive-accent);
+ color: var(--text-on-accent);
+ border-radius: 6px;
+ border: 2px solid var(--interactive-accent-hover);
+}
+body .workspace-tab-header.is-active svg {
+ color: var(--text-bright);
+}
+body .workspace-tab-header.is-active:hover svg {
+ color: var(--text-bright);
+}
+body .workspace-tab-header:not(.is-active):hover {
+ color: var(--interactive-accent-hover);
+}
+body .workspace-tab-header.is-after-active,
+body
+ .workspace-tab-header.is-after-active
+ .workspace-tab-header-inner,
+body .workspace-tab-header.is-before-active,
+body
+ .workspace-tab-header.is-before-active
+ .workspace-tab-header-inner {
+ background-color: transparent;
+ box-shadow: none;
+ border-radius: 10px;
+}
+body .workspace-tab-container-after,
+body .workspace-tab-container-before,
+body .workspace-tab-container-after.is-after-active,
+body .workspace-tab-container-after.is-after-active,
+body .workspace-tab-container-before.is-before-active {
+ display: none;
+}
+
+body .workspace-leaf-resize-handle {
+ background-color: var(--color-transparent);
+}
+
+body .markdown-source-view .CodeMirror .CodeMirror-activeline {
+ background: var(--active-line-bg);
+}
+
+body .markdown-preview-view blockquote {
+ padding: calc(1rem * 1) calc((1rem * 4) * 1);
+ margin: 0 0 calc(1rem * 1) 0;
+ background: var(--background-primary-alt);
+ color: var(--text-normal);
+ font-style: italic;
+ line-height: 2;
+ border-radius: 6px;
+ border-width: 1px;
+ box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1);
+}
+
+body .markdown-preview-view code {
+ color: var(--text-code);
+ font-family: var(--font-monospace);
+ background-color: var(--background-secondary-alt);
+ border-radius: 6px;
+ font-size: 0.85em;
+}
+body .markdown-preview-view pre[class*="language-"] {
+ border-radius: 12px;
+ background-color: var(--background-secondary);
+}
+body
+ .markdown-preview-view
+ pre[class*="language-"]::-webkit-scrollbar {
+ background-color: var(--background-secondary-alt);
+ border-radius: 0 0 12px 12px;
+ height: 15px;
+}
+body
+ .markdown-preview-view
+ pre[class*="language-"]::-webkit-scrollbar-thumb {
+ background-color: var(--background-secondary);
+ border-radius: 0 0 12px 12px;
+}
+body
+ .markdown-preview-view
+ pre[class*="language-"]
+ *:not(.copy-code-button) {
+ background-color: transparent !important;
+}
+body
+ .markdown-preview-view
+ pre[class*="language-"]
+ .copy-code-button {
+ background-color: var(--background-secondary-alt);
+}
+body
+ .markdown-preview-view
+ pre[class*="language-"]
+ .copy-code-button:hover {
+ transition: background-color 0.75s
+ cubic-bezier(0.075, 0.82, 0.165, 1),
+ color 0.75s cubic-bezier(0.075, 0.82, 0.165, 1);
+ background-color: var(--interactive-accent);
+ color: var(--text-on-accent);
+}
+
+body .markdown-source-view .CodeMirror .HyperMD-codeblock {
+ color: var(--text-code);
+}
+body .markdown-source-view .CodeMirror .cm-inline-code {
+ color: var(--text-code);
+}
+
+body .markdown-source-view.mod-cm6 .HyperMD-codeblock {
+ color: var(--text-code);
+}
+body .markdown-source-view.mod-cm6 .cm-inline-code {
+ color: var(--text-code);
+}
+
+body .markdown-source-view .CodeMirror .CodeMirror-cursor {
+ background: var(--cursor-bg);
+}
+
+body .markdown-preview-view .external-link {
+ font-weight: 600;
+ text-decoration: none;
+ background-position-y: 60%;
+}
+body .markdown-preview-view .external-link:hover {
+ text-decoration: underline;
+}
+
+body .markdown-source-view .CodeMirror .cm-link {
+ font-weight: 700;
+}
+
+body .markdown-source-view.mod-cm6 .cm-link {
+ font-weight: 700;
+}
+
+body .markdown-preview-view .file-embed {
+ border: none;
+ border-radius: 4px;
+}
+body .markdown-preview-view .file-embed .file-embed-link {
+ top: 2rem;
+}
+
+body .markdown-preview-view h1 {
+ border-bottom: 1px solid var(--background-secondary-alt);
+ font-weight: 600;
+ line-height: 1.25;
+ padding-bottom: calc((1rem / 2) * 1);
+}
+body .markdown-preview-view h2 {
+ border-bottom: 1px solid var(--background-secondary-alt);
+ font-weight: 600;
+ line-height: 1.25;
+ padding-bottom: calc((1rem / 2) * 1);
+}
+body .markdown-preview-view h3 {
+ font-weight: 600;
+}
+body .markdown-preview-view h4 {
+ font-weight: 600;
+}
+body .markdown-preview-view h5 {
+ font-style: italic;
+}
+body .markdown-preview-view h6 {
+ font-style: italic;
+ font-weight: 400;
+}
+
+body .markdown-source-view.mod-cm6 .HyperMD-header-1 {
+ border-bottom: 1px solid var(--background-secondary-alt);
+ font-weight: 600;
+ line-height: 1.25;
+ padding-bottom: calc((1rem / 2) * 1);
+}
+body .markdown-source-view.mod-cm6 .HyperMD-header-2 {
+ border-bottom: 1px solid var(--background-secondary-alt);
+ font-weight: 600;
+ line-height: 1.25;
+ padding-bottom: calc((1rem / 2) * 1);
+}
+body .markdown-source-view.mod-cm6 .HyperMD-header-3 {
+ font-weight: 600;
+}
+body .markdown-source-view.mod-cm6 .HyperMD-header-4 {
+ font-weight: 600;
+}
+body .markdown-source-view.mod-cm6 .HyperMD-header-5 {
+ font-style: italic;
+}
+body .markdown-source-view.mod-cm6 .HyperMD-header-6 {
+ font-style: italic;
+ font-weight: 400;
+}
+
+body .markdown-preview-view .internal-link {
+ font-weight: 600;
+ color: var(--text-accent);
+ text-decoration: none;
+}
+body .markdown-preview-view .internal-link:hover {
+ text-decoration: underline;
+}
+
+body .markdown-source-view .CodeMirror .cm-hmd-internal-link {
+ font-weight: 700;
+}
+
+body .markdown-source-view.mod-cm6 .cm-hmd-internal-link {
+ font-weight: 700;
+}
+
+body .markdown-preview-view ul,
+body .markdown-preview-view ol {
+ position: relative;
+}
+body .markdown-preview-view ul ul::before,
+body .markdown-preview-view ul ol::before,
+body .markdown-preview-view ol ul::before,
+body .markdown-preview-view ol ol::before {
+ content: "";
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: -1em;
+ width: 2px;
+ background: linear-gradient(
+ to bottom,
+ transparent 0%,
+ var(--background-secondary-alt) 25%,
+ var(--background-secondary-alt) 75%,
+ transparent 100%
+ );
+}
+body .markdown-preview-view ul.contains-task-list ul::before,
+body .markdown-preview-view ul.contains-task-list ol::before,
+body .markdown-preview-view ol.contains-task-list ul::before,
+body .markdown-preview-view ol.contains-task-list ol::before {
+ content: "";
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: -0.8em;
+ width: 2px;
+ background: linear-gradient(
+ to bottom,
+ transparent 0%,
+ var(--background-secondary-alt) 25%,
+ var(--background-secondary-alt) 75%,
+ transparent 100%
+ );
+}
+
+body .markdown-preview-view .markdown-embed {
+ border-radius: 12px;
+ border: none;
+ padding: 0;
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
+ transition: box-shadow 0.75s
+ cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+body .markdown-preview-view .markdown-embed:hover {
+ box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
+}
+body .markdown-preview-view .markdown-embed:before {
+ background: linear-gradient(
+ to bottom,
+ var(--text-accent-hover) 0%,
+ var(--text-accent) 100%
+ );
+ border-radius: 12px 0 0 12px;
+ bottom: 0;
+ content: "";
+ display: block;
+ left: 0;
+ position: absolute;
+ top: 0;
+ width: 10px;
+}
+body
+ .markdown-preview-view
+ .markdown-embed
+ .markdown-embed-content::-webkit-scrollbar,
+body
+ .markdown-preview-view
+ .markdown-embed
+ .markdown-embed-content::-webkit-scrollbar-thumb {
+ border-radius: 0 12px 12px 0;
+}
+body
+ .markdown-preview-view
+ .markdown-embed
+ .markdown-embed-content::-webkit-scrollbar {
+ background: linear-gradient(
+ to bottom,
+ var(--background-secondary) 0%,
+ var(--background-primary) 100%
+ );
+}
+body
+ .markdown-preview-view
+ .markdown-embed
+ .markdown-preview-view {
+ padding-right: calc(1rem * 1);
+ border-radius: 12px;
+}
+body
+ .markdown-preview-view
+ .markdown-embed
+ .markdown-preview-view
+ .markdown-preview-sizer {
+ max-width: 90%;
+}
+body
+ .markdown-preview-view
+ .markdown-embed
+ .markdown-embed-link {
+ top: calc((1rem * 2) * 1);
+}
+
+body .markdown-source-view.mod-cm6 .markdown-embed {
+ padding: calc((1rem * 2) * 1) 0 calc((1rem * 2) * 1)
+ calc((1rem * 2) * 1);
+ border: none;
+}
+body
+ .markdown-source-view.mod-cm6
+ .markdown-embed
+ .markdown-preview-view {
+ padding-right: 40px;
+}
+body
+ .markdown-source-view.mod-cm6
+ .markdown-embed
+ .markdown-embed-link {
+ top: calc((1rem * 2) * 1);
+}
+body
+ .markdown-source-view.mod-cm6
+ .markdown-embed
+ .task-list-item-checkbox {
+ top: -1px;
+}
+
+body .markdown-preview-view p {
+ line-height: 1.5;
+}
+
+body .markdown-preview-view .tag:not(.token) {
+ background: var(--color-topic-tag-bg);
+ color: var(--text-accent-light);
+ font-size: 0.75rem;
+ text-decoration: none;
+ font-family: var(--editor-font);
+ padding-top: 2px;
+ padding-right: 5px;
+ padding-bottom: 2px;
+ padding-left: 5px;
+ border-radius: 8px;
+ border: 1px solid var(--text-accent-light);
+}
+
+body .markdown-source-view.mod-cm6 .cm-hashtag-begin,
+body .markdown-source-view.mod-cm6 .cm-hashtag-end {
+ background: var(--color-topic-tag-bg);
+ color: var(--text-accent-light);
+ font-size: 0.75rem;
+ text-decoration: none;
+ font-family: var(--editor-font);
+}
+body .markdown-source-view.mod-cm6 .cm-hashtag-begin {
+ padding-top: 2px;
+ padding-right: 0;
+ padding-bottom: 2px;
+ padding-left: 5px;
+ border-radius: 8px 0 0 8px;
+ border-top: 1px solid var(--text-accent-light);
+ border-right: none;
+ border-bottom: 1px solid var(--text-accent-light);
+ border-left: 1px solid var(--text-accent-light);
+}
+body .markdown-source-view.mod-cm6 .cm-hashtag-end {
+ padding-top: 2px;
+ padding-right: 5px;
+ padding-bottom: 2px;
+ padding-left: 0;
+ border-radius: 0 8px 8px 0;
+ border-top: 1px solid var(--text-accent-light);
+ border-right: 1px solid var(--text-accent-light);
+ border-bottom: 1px solid var(--text-accent-light);
+ border-left: none;
+}
+
+body
+ .markdown-preview-view
+ ul.contains-task-list
+ .task-list-item {
+ text-decoration: none;
+ color: var(--text-normal);
+ transition: color 0.75s cubic-bezier(0.075, 0.82, 0.165, 1),
+ filter 0.75s cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+body
+ .markdown-preview-view
+ ul.contains-task-list
+ .task-list-item.is-checked {
+ color: var(--text-muted);
+}
+body
+ .markdown-preview-view
+ ul.contains-task-list
+ .task-list-item.is-checked
+ .internal-link,
+body
+ .markdown-preview-view
+ ul.contains-task-list
+ .task-list-item.is-checked
+ .external-link {
+ filter: opacity(0.5);
+}
+body
+ .markdown-preview-view
+ ul.contains-task-list
+ .task-list-item-checkbox {
+ width: 16px;
+ height: 16px;
+ filter: none;
+ line-height: 0;
+ margin: 0;
+ margin-right: calc((1rem / 2) * 1);
+ appearance: none;
+ background-color: var(--color-white);
+ transition: background-color 0.75s
+ cubic-bezier(0.075, 0.82, 0.165, 1);
+ border-radius: 30%;
+ border: 2px solid var(--text-muted);
+ padding: 0;
+ position: relative;
+ top: 2px;
+}
+body
+ .markdown-preview-view
+ ul.contains-task-list
+ .task-list-item-checkbox:checked {
+ border: 2px solid var(--text-accent-hover);
+ background-color: var(--text-accent);
+ background-position: 50% 45%;
+ background-size: 68%;
+ background-repeat: no-repeat;
+ background-image: url('data:image/svg+xml; utf8, ');
+}
+
+body .markdown-source-view.mod-cm6 .HyperMD-task-line {
+ text-decoration: none !important;
+ transition: color 0.75s cubic-bezier(0.075, 0.82, 0.165, 1),
+ filter 0.75s cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+body
+ .markdown-source-view.mod-cm6
+ .HyperMD-task-line
+ .task-list-item-checkbox {
+ width: 16px;
+ height: 16px;
+ filter: none;
+ line-height: 0;
+ margin: 0;
+ margin-right: calc((1rem / 2) * 1);
+ appearance: none;
+ background-color: var(--color-white);
+ transition: background-color 0.75s
+ cubic-bezier(0.075, 0.82, 0.165, 1);
+ border-radius: 30%;
+ border: 2px solid var(--text-muted);
+ padding: 0;
+ position: relative;
+ top: -1px;
+}
+body
+ .markdown-source-view.mod-cm6
+ .HyperMD-task-line[data-task~="-"],
+body
+ .markdown-source-view.mod-cm6
+ .HyperMD-task-line[data-task~="x"] {
+ color: var(--text-normal);
+}
+body
+ .markdown-source-view.mod-cm6
+ .HyperMD-task-line[data-task~="-"]
+ *:not(.task-list-item-checkbox),
+body
+ .markdown-source-view.mod-cm6
+ .HyperMD-task-line[data-task~="x"]
+ *:not(.task-list-item-checkbox) {
+ filter: opacity(0.75);
+}
+body
+ .markdown-source-view.mod-cm6
+ .HyperMD-task-line[data-task~="-"]
+ .task-list-item-checkbox,
+body
+ .markdown-source-view.mod-cm6
+ .HyperMD-task-line[data-task~="x"]
+ .task-list-item-checkbox {
+ border: 2px solid var(--text-accent-hover);
+ background-color: var(--text-accent);
+ background-position: 50% 45%;
+ background-size: 68%;
+ background-repeat: no-repeat;
+ background-image: url('data:image/svg+xml; utf8, ');
+}
+
+body .markdown-preview-view .search-highlight > div.is-active {
+ border-bottom: 2px dashed var(--color-blue-3);
+}
+
+body .markdown-preview-view .admonition {
+ box-shadow: none;
+}
+
+body .markdown-preview-view .button-default {
+ box-shadow: none;
+}
+body .markdown-preview-view .button-default:hover {
+ background-color: inherit;
+}
+body .markdown-preview-view .button-default.white {
+ background: linear-gradient(
+ 45deg,
+ var(--color-gray-1),
+ var(--color-gray-2)
+ );
+ border: 1px solid var(--color-gray-1);
+ color: var(--color-gray-8);
+}
+body .markdown-preview-view .button-default.green {
+ background: linear-gradient(
+ 45deg,
+ var(--color-green-3),
+ var(--color-green-4)
+ );
+ border: 1px solid var(--color-green-2);
+}
+body .markdown-preview-view .button-default.blue {
+ background: linear-gradient(
+ 45deg,
+ var(--color-blue-3),
+ var(--color-blue-4)
+ );
+ border: 1px solid var(--color-blue-2);
+}
+body .markdown-preview-view .button-default.purple {
+ background: linear-gradient(
+ 45deg,
+ var(--color-purple-3),
+ var(--color-purple-4)
+ );
+ border: 1px solid var(--color-purple-2);
+}
+
+body.plugin-sliding-panes-stacking
+ .workspace
+ > .mod-root
+ > .workspace-leaf {
+ transition: box-shadow 0.75s
+ cubic-bezier(0.075, 0.82, 0.165, 1);
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
+}
+body.plugin-sliding-panes-stacking
+ .workspace
+ > .mod-root
+ > .workspace-leaf.mod-active {
+ box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25) !important;
+}
+body.plugin-sliding-panes-rotate-header
+ div.workspace
+ > .mod-root
+ > .workspace-leaf
+ > .workspace-leaf-content
+ > .view-header {
+ background: var(--background-primary);
+ border-left: 3px solid var(--interactive-normal);
+ border-right: 3px solid var(--background-primary);
+}
+body.plugin-sliding-panes-rotate-header
+ div.workspace
+ > .mod-root
+ > .workspace-leaf
+ > .workspace-leaf-content
+ > .view-header
+ .view-header-icon {
+ left: 4px;
+}
+body.plugin-sliding-panes-rotate-header
+ div.workspace
+ > .mod-root
+ > .workspace-leaf
+ > .workspace-leaf-content
+ > .view-header
+ .view-header-title-container:after,
+body.plugin-sliding-panes-rotate-header
+ div.workspace
+ > .mod-root
+ > .workspace-leaf
+ > .workspace-leaf-content
+ > .view-header
+ .view-header-title-container:before {
+ display: none;
+}
+body.plugin-sliding-panes-rotate-header
+ div.workspace
+ > .mod-root
+ > .workspace-leaf.mod-active
+ > .workspace-leaf-content
+ > .view-header {
+ background: var(--background-primary);
+ border-left: 3px solid var(--interactive-accent);
+ border-right: 3px solid var(--background-primary);
+}
+
+.workspace-leaf .kanban-plugin {
+ background-color: var(--background-primary);
+}
+.workspace-leaf .kanban-plugin__lane {
+ border-radius: 10px;
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
+}
+.workspace-leaf .kanban-plugin__item {
+ border-radius: 10px;
+}
+.workspace-leaf .kanban-plugin__item-title-wrapper {
+ padding: calc((1rem / 2) * 1) calc(1rem * 1);
+}
+.workspace-leaf .kanban-plugin__item-form textarea {
+ border-radius: 10px;
+}
+.workspace-leaf .kanban-plugin__item-form textarea:focus {
+ border-width: 2px;
+}
+
+.obsidian42-jump-to-date.flatpickr-calendar {
+ background-color: var(--background-primary);
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
+ border-radius: 12px;
+}
+.obsidian42-jump-to-date .flatpickr-months * {
+ color: var(--text-normal);
+}
+.obsidian42-jump-to-date .flatpickr-weekdays * {
+ color: var(--text-normal);
+}
+.obsidian42-jump-to-date .flatpickr-days .dayContainer {
+ padding: calc(1rem * 1);
+ border-radius: 12px;
+}
+.obsidian42-jump-to-date
+ .flatpickr-days
+ .dayContainer
+ .flatpickr-day {
+ color: var(--text-normal);
+ border: 1px solid var(--background-secondary);
+ border-radius: 4px !important;
+}
+.obsidian42-jump-to-date
+ .flatpickr-days
+ .dayContainer
+ .flatpickr-day:focus {
+ background-color: var(--background-secondary);
+}
+
+.theme-dark {
+ --background-primary: var(--color-gray-9);
+ --background-primary-alt: var(--color-gray-8);
+ --background-secondary: var(--color-gray-8);
+ --background-secondary-alt: var(--color-gray-7);
+ --background-modifier-border: var(--color-gray-7);
+ --background-modifier-form-field: var(--color-gray-8);
+ --background-modifier-form-field-highlighted: var(
+ --color-gray-8
+ );
+ --background-modifier-box-shadow: rgba(0, 0, 0, 0.3);
+ --background-modifier-success: var(--color-green-4);
+ --background-modifier-error: var(--color-red-6);
+ --background-modifier-error-rgb: 61, 0, 0;
+ --background-modifier-error-hover: var(--color-red-6);
+ --background-modifier-cover: rgba(0, 0, 0, 0.1);
+ --text-accent: var(--color-blue-4);
+ --text-accent-light: var(--color-blue-3);
+ --text-accent-hover: var(--text-accent-light);
+ --text-normal: var(--color-gray-1);
+ --text-code: var(--color-gray-1);
+ --text-muted: var(--color-gray-4);
+ --text-muted-rgb: 153, 153, 153;
+ --text-faint: var(--color-gray-4);
+ --text-bright: var(--color-gray-0);
+ --text-error: var(--color-red-4);
+ --text-error-hover: var(--color-red-5);
+ --text-highlight-bg: rgba(0, 63, 179, 0.75);
+ --text-highlight-bg-active: rgba(0, 123, 255, 0.15);
+ --text-selection: rgba(23, 48, 77, 0.99);
+ --text-on-accent: var(--color-white);
+ --interactive-normal: var(--color-gray-6);
+ --interactive-hover: var(--color-gray-5);
+ --interactive-accent: var(--color-green-4);
+ --interactive-accent-rgb: 46, 160, 67;
+ --interactive-accent-hover: var(--color-green-3);
+ --interactive-success: var(--color-green-5);
+ --scrollbar-active-thumb-bg: var(--text-accent);
+ --scrollbar-bg: var(--background-primary);
+ --scrollbar-thumb-bg: var(--background-primary-alt);
+ --highlight-mix-blend-mode: screen;
+ --color-topic-tag-bg: rgba(56, 139, 253, 0.1);
+ --cursor-bg: var(--color-green-3);
+ --active-line-bg: rgba(var(--text-muted-rgb), 0.1);
+ --color-transparent: rgba(255, 255, 255, 0);
+ --color-border: rgba(255, 255, 255, 0.2);
+}
+
+.theme-light {
+ --background-primary: var(--color-white);
+ --background-primary-alt: var(--color-gray-0);
+ --background-secondary: var(--color-gray-0);
+ --background-secondary-alt: var(--color-gray-1);
+ --background-modifier-border: var(--color-gray-1);
+ --background-modifier-form-field: var(--color-gray-0);
+ --background-modifier-form-field-highlighted: var(
+ --color-gray-0
+ );
+ --background-modifier-box-shadow: rgba(0, 0, 0, 0.3);
+ --background-modifier-success: var(--color-green-4);
+ --background-modifier-error: var(--color-red-6);
+ --background-modifier-error-rgb: 61, 0, 0;
+ --background-modifier-error-hover: var(--color-red-6);
+ --background-modifier-cover: rgba(0, 0, 0, 0.1);
+ --text-accent: var(--color-blue-5);
+ --text-accent-light: var(--color-blue-3);
+ --text-accent-hover: var(--text-accent-light);
+ --text-normal: var(--color-gray-8);
+ --text-code: var(--color-gray-7);
+ --text-muted: var(--color-gray-4);
+ --text-muted-rgb: 153, 153, 153;
+ --text-faint: var(--color-gray-4);
+ --text-bright: var(--color-gray-0);
+ --text-error: var(--color-red-4);
+ --text-error-hover: var(--color-red-5);
+ --text-highlight-bg: rgba(0, 89, 255, 0.2);
+ --text-highlight-bg-active: rgba(0, 89, 255, 0.05);
+ --text-selection: rgba(0, 89, 255, 0.1);
+ --text-on-accent: var(--color-white);
+ --interactive-normal: var(--color-gray-0);
+ --interactive-hover: var(--color-gray-3);
+ --interactive-accent: var(--color-blue-5);
+ --interactive-accent-rgb: 31, 111, 235;
+ --interactive-accent-hover: var(--color-blue-4);
+ --interactive-success: var(--color-green-5);
+ --scrollbar-active-thumb-bg: var(--text-accent);
+ --scrollbar-bg: var(--background-primary);
+ --scrollbar-thumb-bg: var(--background-primary-alt);
+ --highlight-mix-blend-mode: normal;
+ --color-topic-tag-bg: rgba(56, 139, 253, 0.1);
+ --cursor-bg: var(--color-blue-4);
+ --active-line-bg: rgba(var(--text-muted-rgb), 0.25);
+ --color-transparent: rgba(255, 255, 255, 0);
+ --color-border: rgba(0, 0, 0, 0.2);
+}
diff --git a/.obsidian/workspace b/.obsidian/workspace
index dfb02a4..70e3853 100644
--- a/.obsidian/workspace
+++ b/.obsidian/workspace
@@ -4,12 +4,12 @@
"type": "split",
"children": [
{
- "id": "1caf41d3ec6d93b4",
+ "id": "624fc6cedfec68e9",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
- "file": "atom/atom.md",
+ "file": "Periodische Notizen/Täglich/05.07.2022.md",
"mode": "source",
"source": false
}
@@ -34,21 +34,6 @@
"state": {}
}
},
- {
- "id": "cf8612b561ea8d18",
- "type": "leaf",
- "state": {
- "type": "search",
- "state": {
- "query": "_index_of_",
- "matchingCase": false,
- "explainSearch": false,
- "collapseAll": false,
- "extraContext": false,
- "sortOrder": "alphabetical"
- }
- }
- },
{
"id": "8bcd1b2b7f874b35",
"type": "leaf",
@@ -57,11 +42,26 @@
"state": {}
}
}
+ ],
+ "currentTab": 1
+ },
+ {
+ "id": "07d7f0c152a15b7e",
+ "type": "tabs",
+ "children": [
+ {
+ "id": "39650d5b939ff18b",
+ "type": "leaf",
+ "state": {
+ "type": "calendar",
+ "state": {}
+ }
+ }
]
}
],
"direction": "horizontal",
- "width": 300
+ "width": 326
},
"right": {
"id": "a54ca124d2689b37",
@@ -77,7 +77,7 @@
"state": {
"type": "backlink",
"state": {
- "file": "atom/atom.md",
+ "file": "Periodische Notizen/Täglich/05.07.2022.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
@@ -88,6 +88,33 @@
}
}
},
+ {
+ "id": "0ad8b5a5ec67ae37",
+ "type": "leaf",
+ "state": {
+ "type": "outgoing-link",
+ "state": {
+ "file": "Periodische Notizen/Täglich/05.07.2022.md",
+ "linksCollapsed": false,
+ "unlinkedCollapsed": true
+ }
+ }
+ },
+ {
+ "id": "cf8612b561ea8d18",
+ "type": "leaf",
+ "state": {
+ "type": "search",
+ "state": {
+ "query": "",
+ "matchingCase": true,
+ "explainSearch": false,
+ "collapseAll": false,
+ "extraContext": false,
+ "sortOrder": "alphabetical"
+ }
+ }
+ },
{
"id": "3e4f1e1a80e2d042",
"type": "leaf",
@@ -99,46 +126,57 @@
}
}
},
- {
- "id": "0ad8b5a5ec67ae37",
- "type": "leaf",
- "state": {
- "type": "outgoing-link",
- "state": {
- "file": "atom/atom.md",
- "linksCollapsed": false,
- "unlinkedCollapsed": false
- }
- }
- },
{
"id": "1a2599660c2f0844",
"type": "leaf",
"state": {
"type": "outline",
"state": {
- "file": "atom/atom.md"
+ "file": "Periodische Notizen/Täglich/05.07.2022.md"
}
}
+ },
+ {
+ "id": "073d6445c4950019",
+ "type": "leaf",
+ "state": {
+ "type": "Saved Queries View",
+ "state": {}
+ }
}
],
- "currentTab": 2
+ "currentTab": 4
+ },
+ {
+ "id": "7804475bf051d7e7",
+ "type": "tabs",
+ "children": [
+ {
+ "id": "e48062180002319b",
+ "type": "leaf",
+ "state": {
+ "type": "graph",
+ "state": {}
+ }
+ }
+ ]
}
],
"direction": "horizontal",
- "width": 300
+ "width": 303,
+ "collapsed": true
},
- "active": "1caf41d3ec6d93b4",
+ "active": "624fc6cedfec68e9",
"lastOpenFiles": [
- "atom/atom.md",
- "attachment/attachment.md",
- "Firmen/Firmen.md",
- "rapha/rapha.md",
- "Dashboard.md",
- "Firmen/Bewerbungen/Bewerbungen.md",
- "Firmen/Bewerbungen/bewerbung 22/bewerbung 22.md",
- "Firmen/Bewerbungen/bewerbung 22/firm/firm.md",
- "Firmen/steinemann technology/steinemann technology.md",
- "Firmen/steinemann technology/K2H/K2H.md"
+ "Periodische Notizen/Täglich/05.07.2022.md",
+ "Periodische Notizen/Täglich/12.07.2022.md",
+ "Firmen/Steinemann Technology/Notes/Penta/Penta Übersicht.md",
+ "Firmen/Steinemann Technology/Tickets/Monica Garcia/Erstellung der Penta Belege.md",
+ "Firmen/Steinemann Technology/Notes/Penta/toimprove.md",
+ "Private/Atom/atom.md",
+ "Private/Rapha/Aufgabenteilung.md",
+ "Firmen/Steinemann Technology/Tickets/Monica Garcia/Penta Belege termin definieren.md",
+ "Periodische Notizen/Täglich/04.07.2022.md",
+ "Firmen/Steinemann Technology/tickets/Monica Garcia/Erstellung der Penta Belege.md"
]
}
\ No newline at end of file
diff --git a/Attachment/BELEGE .msg b/Attachment/BELEGE .msg
new file mode 100644
index 0000000..bee4cbe
Binary files /dev/null and b/Attachment/BELEGE .msg differ
diff --git a/Attachment/Steinemann Technology/HighsystemsCM/datenTypen.png b/Attachment/Steinemann Technology/HighsystemsCM/datenTypen.png
new file mode 100644
index 0000000..f8cba4f
--- /dev/null
+++ b/Attachment/Steinemann Technology/HighsystemsCM/datenTypen.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:757dd9dc359a59a9c23191da26f7fe74ea0a2f58759d4d9059250f50871e545a
+size 22451
diff --git a/Attachment/Steinemann Technology/HighsystemsCM/dropdownEigenschaften.png b/Attachment/Steinemann Technology/HighsystemsCM/dropdownEigenschaften.png
new file mode 100644
index 0000000..9652e07
--- /dev/null
+++ b/Attachment/Steinemann Technology/HighsystemsCM/dropdownEigenschaften.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c5be0dceae939e7eb16e759f7394117fb6139d3af60b7b4817bfbfd951264695
+size 72890
diff --git a/Attachment/Steinemann Technology/HighsystemsCM/feldVerschiebung.png b/Attachment/Steinemann Technology/HighsystemsCM/feldVerschiebung.png
new file mode 100644
index 0000000..a5e9d6d
--- /dev/null
+++ b/Attachment/Steinemann Technology/HighsystemsCM/feldVerschiebung.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:00396d6158958dcb27428bda974fb1d1f39c87c31d32547db32e3c55ac8c4076
+size 117115
diff --git a/Attachment/Steinemann Technology/HighsystemsCM/klasseBearbeiten.png b/Attachment/Steinemann Technology/HighsystemsCM/klasseBearbeiten.png
new file mode 100644
index 0000000..e3ac12c
--- /dev/null
+++ b/Attachment/Steinemann Technology/HighsystemsCM/klasseBearbeiten.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7f889c2fa9d2f617c73f1c8e7e88e20ccf14ffcd092554e007e591799b459920
+size 72700
diff --git a/Attachment/Steinemann Technology/HighsystemsCM/klassenDefinition.png b/Attachment/Steinemann Technology/HighsystemsCM/klassenDefinition.png
new file mode 100644
index 0000000..d4a37a5
--- /dev/null
+++ b/Attachment/Steinemann Technology/HighsystemsCM/klassenDefinition.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a046071f818e78a481b94fe8911d7c9dba35a1770b692255de2a59f7727a5ce0
+size 48656
diff --git a/Attachment/Steinemann Technology/HighsystemsCM/neueFeldDefinition.png b/Attachment/Steinemann Technology/HighsystemsCM/neueFeldDefinition.png
new file mode 100644
index 0000000..af2e4ce
--- /dev/null
+++ b/Attachment/Steinemann Technology/HighsystemsCM/neueFeldDefinition.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3523df516a52260e99dac03fe4f02808f9c426f4ed49e41317c70df5b525ae86
+size 215083
diff --git a/Attachment/Steinemann Technology/HighsystemsCM/neueKlasseErstellen.png b/Attachment/Steinemann Technology/HighsystemsCM/neueKlasseErstellen.png
new file mode 100644
index 0000000..0e74cf6
--- /dev/null
+++ b/Attachment/Steinemann Technology/HighsystemsCM/neueKlasseErstellen.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2795e18056a544e36adb2e2f31936dbe9fadce3759355bb399c79be5d0421522
+size 79291
diff --git a/Attachment/Steinemann Technology/HighsystemsCM/uebersicht.png b/Attachment/Steinemann Technology/HighsystemsCM/uebersicht.png
new file mode 100644
index 0000000..4e7add7
--- /dev/null
+++ b/Attachment/Steinemann Technology/HighsystemsCM/uebersicht.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f68835c0dbcb3858f1373d5d89f0882eb43f780df18a9c7ac6471c53b2b2b72d
+size 196427
diff --git a/Attachment/Steinemann Technology/HighsystemsCM/variablenInFelder.png b/Attachment/Steinemann Technology/HighsystemsCM/variablenInFelder.png
new file mode 100644
index 0000000..44d9280
--- /dev/null
+++ b/Attachment/Steinemann Technology/HighsystemsCM/variablenInFelder.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:523534307bddc3c0093aed98aaf5bfb4a64762c79df1a98d1d1bfc720516e6e6
+size 101510
diff --git a/Attachment/Steinemann Technology/HighsystemsCM/vorlagen.png b/Attachment/Steinemann Technology/HighsystemsCM/vorlagen.png
new file mode 100644
index 0000000..e4a4ea9
--- /dev/null
+++ b/Attachment/Steinemann Technology/HighsystemsCM/vorlagen.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:935bbe794121fcad3464321cd1ea6ee208bc750371d2803e5b17af498495af04
+size 154221
diff --git a/Attachment/Steinemann Technology/Keeper/keeperKontoUebertragen.jpg b/Attachment/Steinemann Technology/Keeper/keeperKontoUebertragen.jpg
new file mode 100644
index 0000000..f5e786e
--- /dev/null
+++ b/Attachment/Steinemann Technology/Keeper/keeperKontoUebertragen.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d2be0e9133791add534ded320218b3d9d8b93ee69ff6a9c4ce392440840c4686
+size 66188
diff --git a/Attachment/Steinemann Technology/Mails/Spammails/teamsInviteFake.png b/Attachment/Steinemann Technology/Mails/Spammails/teamsInviteFake.png
new file mode 100644
index 0000000..3b3cacf
--- /dev/null
+++ b/Attachment/Steinemann Technology/Mails/Spammails/teamsInviteFake.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8fb12a3398fe8f5a5517e48d0a55c74aa1f9181a195d1496478e13d6e7b8a635
+size 226550
diff --git a/Attachment/Steinemann Technology/Mails/Spammails/teamsInviteFakeMarkup.png b/Attachment/Steinemann Technology/Mails/Spammails/teamsInviteFakeMarkup.png
new file mode 100644
index 0000000..1e7fbb6
--- /dev/null
+++ b/Attachment/Steinemann Technology/Mails/Spammails/teamsInviteFakeMarkup.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0e18ead79eb15eee308a34cf6b6a9c9fc21fec259986e188216c9c8b2fb7a810
+size 214369
diff --git a/Firmen/steinemann technology/Penta/img/parametererstellung.jpg b/Attachment/Steinemann Technology/Penta/parameterErstellung.jpg
similarity index 100%
rename from Firmen/steinemann technology/Penta/img/parametererstellung.jpg
rename to Attachment/Steinemann Technology/Penta/parameterErstellung.jpg
diff --git a/steinemann technology/Penta/img/error23.jpg b/Attachment/Steinemann Technology/Penta/reportError_doesNotExist.jpg
similarity index 100%
rename from steinemann technology/Penta/img/error23.jpg
rename to Attachment/Steinemann Technology/Penta/reportError_doesNotExist.jpg
diff --git a/Firmen/steinemann technology/Penta/img/subreportlinks.jpg b/Attachment/Steinemann Technology/Penta/subreportLinks.jpg
similarity index 100%
rename from Firmen/steinemann technology/Penta/img/subreportlinks.jpg
rename to Attachment/Steinemann Technology/Penta/subreportLinks.jpg
diff --git a/Firmen/steinemann technology/Penta/img/teilefamilie.jpg b/Attachment/Steinemann Technology/Penta/teileFamilie.jpg
similarity index 100%
rename from Firmen/steinemann technology/Penta/img/teilefamilie.jpg
rename to Attachment/Steinemann Technology/Penta/teileFamilie.jpg
diff --git a/Firmen/steinemann technology/Penta/img/ustfix_command.jpg b/Attachment/Steinemann Technology/Penta/ustfixCommand.jpg
similarity index 100%
rename from Firmen/steinemann technology/Penta/img/ustfix_command.jpg
rename to Attachment/Steinemann Technology/Penta/ustfixCommand.jpg
diff --git a/Firmen/steinemann technology/Penta/img/ustfix_Command-PUID.jpg b/Attachment/Steinemann Technology/Penta/ustfixCommandPUID.jpg
similarity index 100%
rename from Firmen/steinemann technology/Penta/img/ustfix_Command-PUID.jpg
rename to Attachment/Steinemann Technology/Penta/ustfixCommandPUID.jpg
diff --git a/Firmen/steinemann technology/Penta/img/ustfix_PKRK-PUID.jpg b/Attachment/Steinemann Technology/Penta/ustfixPKRK_PUID.jpg
similarity index 100%
rename from Firmen/steinemann technology/Penta/img/ustfix_PKRK-PUID.jpg
rename to Attachment/Steinemann Technology/Penta/ustfixPKRK_PUID.jpg
diff --git a/Firmen/steinemann technology/Penta/img/verknüpfungenPkrkPZBF.jpg b/Attachment/Steinemann Technology/Penta/verknüpfungenPKRK_PZBF.jpg
similarity index 100%
rename from Firmen/steinemann technology/Penta/img/verknüpfungenPkrkPZBF.jpg
rename to Attachment/Steinemann Technology/Penta/verknüpfungenPKRK_PZBF.jpg
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/auftragwechsel.jpg b/Attachment/Steinemann Technology/RTM Dokumentation/auftragwechsel.jpg
new file mode 100644
index 0000000..4a77733
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/auftragwechsel.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c7797a13f91320ee28beb3599ba2569c1cdff319cbcb9f5448d6dda4ad0a10ac
+size 16822
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/buchungen.jpg b/Attachment/Steinemann Technology/RTM Dokumentation/buchungen.jpg
new file mode 100644
index 0000000..7269ae1
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/buchungen.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:216007a449b26bf65db1a0fb91d6f40cae70b4638933fb33e85efbb44904011a
+size 21442
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/einsatzplan.jpg b/Attachment/Steinemann Technology/RTM Dokumentation/einsatzplan.jpg
new file mode 100644
index 0000000..bcfb8f9
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/einsatzplan.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e589c914858b033b3f8199264032a44dec95fcbaff3838c5a991770aded12e77
+size 12325
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/gehen.jpg b/Attachment/Steinemann Technology/RTM Dokumentation/gehen.jpg
new file mode 100644
index 0000000..ad4a49a
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/gehen.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6628002409dcb7e79f75227ee6f241377cf46b84fdb6875911b9977ecd287d6c
+size 10837
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/info.jpg b/Attachment/Steinemann Technology/RTM Dokumentation/info.jpg
new file mode 100644
index 0000000..ab22074
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/info.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8a8a282b46147f87215ef63948401f0689beb22997718184185ca1808cd0fa64
+size 12129
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/kommen.jpg b/Attachment/Steinemann Technology/RTM Dokumentation/kommen.jpg
new file mode 100644
index 0000000..0e1f82b
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/kommen.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c0eff30f815db0d2c0f4f84c23a9b72797cbd2b4e9e33e335c1243f67c22c7d3
+size 12175
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/mengen.jpg b/Attachment/Steinemann Technology/RTM Dokumentation/mengen.jpg
new file mode 100644
index 0000000..496f4e9
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/mengen.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:dacdd8a687b37c2f431a6cd2dbf0fd5a8bc30f730354652d132983216e60a522
+size 13078
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/pause.jpg b/Attachment/Steinemann Technology/RTM Dokumentation/pause.jpg
new file mode 100644
index 0000000..a045b55
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/pause.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:434de56456103b26c32f5b05a3f1e61dfec8f575bd117a4902813e469ddae080
+size 15423
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/planung.jpg b/Attachment/Steinemann Technology/RTM Dokumentation/planung.jpg
new file mode 100644
index 0000000..3397731
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/planung.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:eebf44371ddadca59f982fe787475f36f93470ad3b4d8be16bc0af1eb5aa0bff
+size 16050
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/qrCodeRTMAndroid.png b/Attachment/Steinemann Technology/RTM Dokumentation/qrCodeRTMAndroid.png
new file mode 100644
index 0000000..d473c48
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/qrCodeRTMAndroid.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:11052a233da8ad32a8894a8a77d803e12c90d7b0f9ab47c6c6f72126a4e779de
+size 2305
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/qrCodeRTMIPhone.png b/Attachment/Steinemann Technology/RTM Dokumentation/qrCodeRTMIPhone.png
new file mode 100644
index 0000000..e0d2330
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/qrCodeRTMIPhone.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:898781f49868df0ea3ff46d5b623d985fc3d504ff5c1598bc5c675be43b7238a
+size 2326
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/sso.png b/Attachment/Steinemann Technology/RTM Dokumentation/sso.png
new file mode 100644
index 0000000..f9b383a
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/sso.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:576eba787c5f539332a019f4c08bce5552893a1db4f5c9b7a4018ab8674ead15
+size 2357
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/terminals/Opera.png b/Attachment/Steinemann Technology/RTM Dokumentation/terminals/Opera.png
new file mode 100644
index 0000000..7f0ec35
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/terminals/Opera.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d08d75df159b7a4d38a05c7316ae7010967e91ee1f5186bba322723e9851ec5f
+size 983355
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/terminals/Sonata.png b/Attachment/Steinemann Technology/RTM Dokumentation/terminals/Sonata.png
new file mode 100644
index 0000000..9233650
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/terminals/Sonata.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5850214d55fd55c75c8712b30c3b9d29f0b63b32781a3b0c627232454d309bfe
+size 664444
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTM.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTM.png
new file mode 100644
index 0000000..7ad1b62
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTM.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a6a64044bab09cdadb14403d798afffaf20aeae9b8a039ee062b992c1835dbe9
+size 98709
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMHeader.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMHeader.png
new file mode 100644
index 0000000..aa6e755
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMHeader.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c6ee48709d8fda022f10fc25d016bbe5dcfd2c282cabf05fa9d75bdc7d5e8472
+size 9310
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMHeaderDateTime.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMHeaderDateTime.png
new file mode 100644
index 0000000..89646ef
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMHeaderDateTime.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:51b7e8ad3f989f4d77d262a9fb566b8f0c5cdcf3883b840c15e7045fd505bc48
+size 5493
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMHeaderEreignisse.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMHeaderEreignisse.png
new file mode 100644
index 0000000..f2ca9ab
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMHeaderEreignisse.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7336693492cdc87994de6fc5718d732918838aeb7aa9465d057f697e35fe0cd9
+size 1102
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMHeaderKommenGehen.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMHeaderKommenGehen.png
new file mode 100644
index 0000000..13e03b2
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMHeaderKommenGehen.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cf70f6a4302d8f69af3d3b0b4db4117f3c9d01fa279ff4c2ce71dbcb217d89e3
+size 899
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMHeaderZusammenfassung.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMHeaderZusammenfassung.png
new file mode 100644
index 0000000..f514a3a
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMHeaderZusammenfassung.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7bb3b4e857ac55535014cfcfd9b91a5105fd791518e70a29d677871f2b444823
+size 3388
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobile.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobile.png
new file mode 100644
index 0000000..fec54d6
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobile.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a6cd2946b8d884629f9836d22474e46fd2f85feca5847431090d4cb4e6595e56
+size 52283
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileAuftragszeit.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileAuftragszeit.png
new file mode 100644
index 0000000..b62416b
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileAuftragszeit.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fedc8566ca8e3f8713c4ba1dd35f85ed719f8934d4028494bbe3ba25fe460f17
+size 6263
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileBuchungen.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileBuchungen.png
new file mode 100644
index 0000000..954e03e
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileBuchungen.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a878ec947c978a0bb46b1a7601d7ba92950abb209cd59aa690cc3ebbfdf970e7
+size 4577
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileEinsatzplan.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileEinsatzplan.png
new file mode 100644
index 0000000..adba484
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileEinsatzplan.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:dfeeec91e2428759d74e8a3813c1486be28ea3aa82fd8622e044804456ff9f9b
+size 3572
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileGehen.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileGehen.png
new file mode 100644
index 0000000..acb2feb
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileGehen.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b3d1315ae45211046642d69521a9b547c18d285cfb896592ce623bcfbcdb6d83
+size 3087
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileKommen.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileKommen.png
new file mode 100644
index 0000000..a7ead3c
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileKommen.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:37b5de5830ac01bafbe70075790feae58493d6977b5d3db14665ecbae88c4e0b
+size 3959
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobilePause.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobilePause.png
new file mode 100644
index 0000000..7c06a39
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobilePause.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f0697a2dc99432fab008a44dedb7884c2578fcc2292f41978ded47310d909c05
+size 3765
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileSaldos.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileSaldos.png
new file mode 100644
index 0000000..b648aa9
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMMobileSaldos.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3d386e08494c06d3f29f2793c47629a09f381b20b3f0dd14d6fc55a4f5e5d4ee
+size 4206
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMSidebarAuftraege.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMSidebarAuftraege.png
new file mode 100644
index 0000000..5cb5397
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMSidebarAuftraege.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:057695ca0e9180725d0406e5d01e437b408923f692de40803e82964002bc22a8
+size 1586
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMSidebarCockpit.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMSidebarCockpit.png
new file mode 100644
index 0000000..6b7867f
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMSidebarCockpit.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:986d5063500de7d56fa229f408a4aaab1f1c29b79733248d02569812582edb3e
+size 1355
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMSidebarEinsatzplan.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMSidebarEinsatzplan.png
new file mode 100644
index 0000000..0e95ef7
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMSidebarEinsatzplan.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5a1b812484b91b4db0b63927efc65d37920bea906df8594cf8e81f9f828b5c0d
+size 1683
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMSidebarPerson.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMSidebarPerson.png
new file mode 100644
index 0000000..2913531
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMSidebarPerson.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f8c8175cf5ae176f6b8a881b45d8390cf695319da316a2782335d9a781f27a05
+size 14423
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMSidebarPersonen.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMSidebarPersonen.png
new file mode 100644
index 0000000..64fd28e
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMSidebarPersonen.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cfdcb15c43ca42a726e49c76cdf52856a8e2075e989e6b85275e5f7ab51aded2
+size 1531
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMUebersicht.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMUebersicht.png
new file mode 100644
index 0000000..60f1e45
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMUebersicht.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c5dbbe556671885b015427ed248534a6b2df88ebac316f2e0ac48fab08126a20
+size 157917
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMheaderAusloggen.png b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMheaderAusloggen.png
new file mode 100644
index 0000000..5f73e98
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webOberflächeRTMheaderAusloggen.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bd514d51ba8a11ba735acdf080efcb97df9b3460547f8a8c2228f6f9eb48a091
+size 723
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webRTMlogin.png b/Attachment/Steinemann Technology/RTM Dokumentation/webRTMlogin.png
new file mode 100644
index 0000000..3c46aa4
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webRTMlogin.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:68cbf511d09acaacd0ae56c92b13500c7ccb1b326114e80c20b3e335ebcf4ee8
+size 3137837
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webRTMloginBenutzerName.png b/Attachment/Steinemann Technology/RTM Dokumentation/webRTMloginBenutzerName.png
new file mode 100644
index 0000000..919615d
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webRTMloginBenutzerName.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b870a4a698dc7ebf9047c6dc10ddca880c8032c5f45e2b3ef3b13a30b5605230
+size 7381
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webRTMloginFirmenname.png b/Attachment/Steinemann Technology/RTM Dokumentation/webRTMloginFirmenname.png
new file mode 100644
index 0000000..04004b0
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webRTMloginFirmenname.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0f1ec94eb64c94b29555f460773de2e087877cef7a1c3c81ecef454a85794490
+size 7453
diff --git a/Attachment/Steinemann Technology/RTM Dokumentation/webRTMloginKennwort.png b/Attachment/Steinemann Technology/RTM Dokumentation/webRTMloginKennwort.png
new file mode 100644
index 0000000..ccf8753
--- /dev/null
+++ b/Attachment/Steinemann Technology/RTM Dokumentation/webRTMloginKennwort.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6a9d5edeb4e3a3d07099608663259c7520ece1075a4ccfca2b8c73971f75d6ab
+size 7368
diff --git a/Attachment/Steinemann Technology/monitoreStch.jpg b/Attachment/Steinemann Technology/monitoreStch.jpg
new file mode 100644
index 0000000..06aeb91
--- /dev/null
+++ b/Attachment/Steinemann Technology/monitoreStch.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1242d40a524f5572b0625c5cc37cc9c8fff9b2d32a8bf03a405d33d311f9bc31
+size 453515
diff --git a/Attachment/Steinemann Technology/oneDriveNichtAngemeldet.png b/Attachment/Steinemann Technology/oneDriveNichtAngemeldet.png
new file mode 100644
index 0000000..780dcc8
--- /dev/null
+++ b/Attachment/Steinemann Technology/oneDriveNichtAngemeldet.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:989e864976dc1ac02be8abb5aa7033c064fa212d22e64457f7592911d9a70424
+size 8121
diff --git a/Firmen/Bewerbungen/bewerbung 22/firm/acs.md b/Firmen/Bewerbungen/Bewerbung 2022/Firmen/ACS.md
similarity index 99%
rename from Firmen/Bewerbungen/bewerbung 22/firm/acs.md
rename to Firmen/Bewerbungen/Bewerbung 2022/Firmen/ACS.md
index 95edaa3..e028590 100644
--- a/Firmen/Bewerbungen/bewerbung 22/firm/acs.md
+++ b/Firmen/Bewerbungen/Bewerbung 2022/Firmen/ACS.md
@@ -1,3 +1,4 @@
+#bewerbung22
# ACS Handels GmbH
# CEO
diff --git a/Firmen/Bewerbungen/bewerbung 22/firm/bilfinger.md b/Firmen/Bewerbungen/Bewerbung 2022/Firmen/Bilfinger.md
similarity index 99%
rename from Firmen/Bewerbungen/bewerbung 22/firm/bilfinger.md
rename to Firmen/Bewerbungen/Bewerbung 2022/Firmen/Bilfinger.md
index 3287f70..45c4d5f 100644
--- a/Firmen/Bewerbungen/bewerbung 22/firm/bilfinger.md
+++ b/Firmen/Bewerbungen/Bewerbung 2022/Firmen/Bilfinger.md
@@ -1,5 +1,6 @@
+#bewerbung22
# Bilfinger
-#Notes
+## Notes
*Bilfinger industrial film*
*fliessender übergang zwischen den Stellen*
07:00-16:00
diff --git a/Firmen/Bewerbungen/bewerbung 22/firm/fronius.md b/Firmen/Bewerbungen/Bewerbung 2022/Firmen/Fronius.md
similarity index 98%
rename from Firmen/Bewerbungen/bewerbung 22/firm/fronius.md
rename to Firmen/Bewerbungen/Bewerbung 2022/Firmen/Fronius.md
index 9b717ad..4d9f2ca 100644
--- a/Firmen/Bewerbungen/bewerbung 22/firm/fronius.md
+++ b/Firmen/Bewerbungen/Bewerbung 2022/Firmen/Fronius.md
@@ -1,3 +1,4 @@
+#bewerbung22
# Fronius
# CEO1
diff --git a/Firmen/Bewerbungen/bewerbung 22/firm/hofer.md b/Firmen/Bewerbungen/Bewerbung 2022/Firmen/Hofer.md
similarity index 95%
rename from Firmen/Bewerbungen/bewerbung 22/firm/hofer.md
rename to Firmen/Bewerbungen/Bewerbung 2022/Firmen/Hofer.md
index 27585d4..e35f53c 100644
--- a/Firmen/Bewerbungen/bewerbung 22/firm/hofer.md
+++ b/Firmen/Bewerbungen/Bewerbung 2022/Firmen/Hofer.md
@@ -1,3 +1,4 @@
+#bewerbung22
# Hofer
## Gründungsdatum
Founded: 1962
diff --git a/Firmen/Bewerbungen/bewerbung 22/firm/world4you.md b/Firmen/Bewerbungen/Bewerbung 2022/Firmen/World4You.md
similarity index 99%
rename from Firmen/Bewerbungen/bewerbung 22/firm/world4you.md
rename to Firmen/Bewerbungen/Bewerbung 2022/Firmen/World4You.md
index 1a9fb6e..eaf6548 100644
--- a/Firmen/Bewerbungen/bewerbung 22/firm/world4you.md
+++ b/Firmen/Bewerbungen/Bewerbung 2022/Firmen/World4You.md
@@ -1,4 +1,5 @@
-# World4you <3
+#bewerbung22
+# World4you
# IT Kollektiv vertrag
Zeiten werden gleitzeit gegeben
diff --git a/Firmen/Bewerbungen/Bewerbungen.md b/Firmen/Bewerbungen/Bewerbungen.md
deleted file mode 100644
index 41e4bd4..0000000
--- a/Firmen/Bewerbungen/Bewerbungen.md
+++ /dev/null
@@ -1,2 +0,0 @@
-```folder-index-content
-```
\ No newline at end of file
diff --git a/Firmen/Bewerbungen/bewerbung 22/bewerbung 22.md b/Firmen/Bewerbungen/bewerbung 22/bewerbung 22.md
deleted file mode 100644
index 41e4bd4..0000000
--- a/Firmen/Bewerbungen/bewerbung 22/bewerbung 22.md
+++ /dev/null
@@ -1,2 +0,0 @@
-```folder-index-content
-```
\ No newline at end of file
diff --git a/Firmen/steinemann technology/Vimbackup restore.md b/Firmen/Bilfinger/Namen.md
similarity index 100%
rename from Firmen/steinemann technology/Vimbackup restore.md
rename to Firmen/Bilfinger/Namen.md
diff --git a/Firmen/Bilfinger/Tickets/Jesse James Isler/Dawn of the first day.md b/Firmen/Bilfinger/Tickets/Jesse James Isler/Dawn of the first day.md
new file mode 100644
index 0000000..4737f6a
--- /dev/null
+++ b/Firmen/Bilfinger/Tickets/Jesse James Isler/Dawn of the first day.md
@@ -0,0 +1,14 @@
+## Problem
+### Beschreibung
+>Problemschilderung
+
+### Lösungsdokumentation
+1. Lösungsansatz
+
+### Todo
+- [ ] Todo
+
+### Tags
+#problem
+
+---
\ No newline at end of file
diff --git a/Firmen/steinemann technology/adobe.md b/Firmen/Steinemann Technology/Notes/Adobe.md
similarity index 98%
rename from Firmen/steinemann technology/adobe.md
rename to Firmen/Steinemann Technology/Notes/Adobe.md
index 0612230..532e13a 100644
--- a/Firmen/steinemann technology/adobe.md
+++ b/Firmen/Steinemann Technology/Notes/Adobe.md
@@ -1,3 +1,4 @@
+#steinemann
Gespräch mit Herrn Vendossa
Account wird auf administrator@steinemann.com gesetzt
diff --git a/Firmen/steinemann technology/Auswertungen K2H.md b/Firmen/Steinemann Technology/Notes/Auswertungen K2H.md
similarity index 85%
rename from Firmen/steinemann technology/Auswertungen K2H.md
rename to Firmen/Steinemann Technology/Notes/Auswertungen K2H.md
index 9d92959..883324c 100644
--- a/Firmen/steinemann technology/Auswertungen K2H.md
+++ b/Firmen/Steinemann Technology/Notes/Auswertungen K2H.md
@@ -1,5 +1,6 @@
+#ky2help #steinemann #wip
# Reaktionszeit 2h: min./max. + durchschn. Reaktionszeit
-Möglich, wurde bereits abgesprochen mit Herr Cutieri, erste [[Änderungen]] schon ersichtlich
+Möglich, wurde bereits abgesprochen mit Herr Cutieri, erste [[Penta Übersicht]] schon ersichtlich
# Anzahl Tickets: Bestand zum Zeitpunkt t, neu eröffnet, abgeschlossen, Bestand t+1
@@ -12,7 +13,7 @@ Möglich; An sich auch schon erstellt;
- [ ] Reporting Fähigkeit anschauen
# Bearbeitungsdauer Tickets: min./max. + durchschn.
-Möglich, wurde bereits abgesprochen mit Herr Cutieri, erste [[Änderungen]] schon ersichtlich
+Möglich, wurde bereits abgesprochen mit Herr Cutieri, erste [[Penta Übersicht]] schon ersichtlich
- [ ] check with Cutieri (Gleich wie bei Anzahl Tickets )
- [ ] Check Reporting
diff --git a/Firmen/steinemann technology/K2H/Vorfall Abgeschlossen.html b/Firmen/Steinemann Technology/Notes/K2H/Vorfall Abgeschlossen.html
similarity index 100%
rename from Firmen/steinemann technology/K2H/Vorfall Abgeschlossen.html
rename to Firmen/Steinemann Technology/Notes/K2H/Vorfall Abgeschlossen.html
diff --git a/steinemann technology/Ky2Help.md b/Firmen/Steinemann Technology/Notes/Ky2Help.md
similarity index 90%
rename from steinemann technology/Ky2Help.md
rename to Firmen/Steinemann Technology/Notes/Ky2Help.md
index da76e18..b48b427 100644
--- a/steinemann technology/Ky2Help.md
+++ b/Firmen/Steinemann Technology/Notes/Ky2Help.md
@@ -1,3 +1,4 @@
+#ky2help #erledigt
# SLA Abstimmung
* Nach 2 Stunden gilt die SLA als "Nicht erfüllt".
diff --git a/Firmen/steinemann technology/Monitore.md b/Firmen/Steinemann Technology/Notes/Monitore.md
similarity index 94%
rename from Firmen/steinemann technology/Monitore.md
rename to Firmen/Steinemann Technology/Notes/Monitore.md
index f945442..dc9d721 100644
--- a/Firmen/steinemann technology/Monitore.md
+++ b/Firmen/Steinemann Technology/Notes/Monitore.md
@@ -1,3 +1,4 @@
+#steinemann #erledigt
# IT Lab Desk
3 Monitore Ready to use.
diff --git a/Firmen/steinemann technology/Penta/Änderungen.md b/Firmen/Steinemann Technology/Notes/Penta/Penta Übersicht.md
similarity index 96%
rename from Firmen/steinemann technology/Penta/Änderungen.md
rename to Firmen/Steinemann Technology/Notes/Penta/Penta Übersicht.md
index 6583313..df0634e 100644
--- a/Firmen/steinemann technology/Penta/Änderungen.md
+++ b/Firmen/Steinemann Technology/Notes/Penta/Penta Übersicht.md
@@ -1,3 +1,4 @@
+#penta #steinemann
# Penta Cheatsheet
> Ich brauch doch keine Notizen!
@@ -71,7 +72,7 @@ SDPE: [CHERP011](files://cherp011\sdpe_ful\share\report\forms)
1. Erstellen des Commands
`select 'K' "ZUORDNUNG K"`
- > ![a](ustfix_command.jpg)
+ > ![a](ustfixCommand.jpg)
# Verknüpfen von puid
@@ -80,8 +81,8 @@ SDPE: [CHERP011](files://cherp011\sdpe_ful\share\report\forms)
> pkvk.RECHNUNGS_ADRESS_FOLGE_NR - FOLGE_NR
> pkvk.RECHNUNGS_ADRESS_NR - NUMMER
> command.ZUORDNUNG_K - puid.ZUORDNUNG
- > ![a](ustfix_PKRK-PUID.jpg)
- > ![a](ustfix_Command-PUID.jpg)
+ > ![a](ustfixPKRK_PUID.jpg)
+ > ![a](ustfixCommandPUID.jpg)
## Bankverbindung
> Um die Bankverbindung zu fixen benutze folgenden Code in einem Feld:
@@ -129,7 +130,7 @@ LEFT({PKVK.PKVKGLOBALCREATEINFO, 8})
# netto_stg_pkbd_ab_D/GB
In Subreport teilefamilie,
-![standort](teilefamilie.jpg)
+![standort](teileFamilie.jpg)
> Feld Übergabetellertext muss mit folgendem Code geändert werden.
@@ -167,14 +168,13 @@ Auftragsmanagement -> Vertrieb -> Tabellen -> Vertriebsbeleg
> wenn TB13 vorhanden -> dann diesen andrucken, ansonsten {PZBF.BEZEICHNUNG_1}
> {PZBF.BEZEICHNUNG_1}
-
Zuerst muss im subreport zahlubngsbedingung der Parameter erstellt werden.
-![Bildkommentar, der niemand liest...](parametererstellung.jpg)
+![Bildkommentar, der niemand liest...](parameterErstellung.jpg)
Dann muss im MAIN report **PZBF** eingebunden werden. Diese *SOLLTE* sich (wenn crysstal brav ist...) selber mit **PKRK** verbinden.
>Verknüpfe **PKRK.Sprache** mit **PZBF.Zahlungsbedingung_sprache**
>Verknüpfe **PKRK.Zahlungsbedingung_KENNER** mit **PZBF.Zahlungsbedingung_KENNER**
->![Snails are great!](verknüpfungenPkrkPZBF.jpg)
+>![Snails are great!](verknüpfungenPKRK_PZBF.jpg)
Und jetzt der *Lustige* teil...
Wir müssen das Feld **VON DER DATENBANK** *(Du kannst gerne lange bei den Reportfields suchen...)* mit dem Parameter verknüpfen.
@@ -185,7 +185,7 @@ Crystal ist netterweise komplexer für das eigene Wohl, desshalb erklär ich es
1. Dann klickt man auf das **PZBF.BEZEICHNUNG_1** Feld in der Box RECHTS.
1. Hat man das geschafft, kann man in der BOX unten die Verbindung wählen.
-![soup](subreportlinks.jpg)
+![soup](subreportLinks.jpg)
Hat man das alles geschafft, darf man sich als erstes selbst gratulieren, danach aber direkt ein neues Feld erstellen, in dem folgender Code steht:
@@ -196,3 +196,7 @@ if isnull({XDMT.TEXT}) then {?Zahlungsbedingungstext} else {XDMT.TEXT}
So und jetzt gönn dir nen Kaffee! (Ja, jedes mal wenn du das getan hast :))
---
+
+# TODO
+
+- [ ] [[30.06.2022#MGA]]
\ No newline at end of file
diff --git a/steinemann technology/Penta/ticketMail.md b/Firmen/Steinemann Technology/Notes/Penta/ticketMail.md
similarity index 93%
rename from steinemann technology/Penta/ticketMail.md
rename to Firmen/Steinemann Technology/Notes/Penta/ticketMail.md
index e0c39d2..3af0a88 100644
--- a/steinemann technology/Penta/ticketMail.md
+++ b/Firmen/Steinemann Technology/Notes/Penta/ticketMail.md
@@ -1,7 +1,8 @@
+#penta #erledigt #steinemann
# Problem
**Beleg 23** mit der KV **02259 (Vorgangstyp: AU)** liefert eine Fehlermeldung, dass der Report nicht gefunden werden kann. Dies macht sinn, der Beleg existiert ja nicht.
-![Fehlermeldung](img/error23.jpg)
+![Fehlermeldung](reportError_doesNotExist.jpg)
```
REPORT ERROR
java.io.FileNotFoundException: Path [\\cherp011\stch_ful\share\report\forms\stg_pkbd_ab_gb_pfinv.rpt] does not exist
diff --git a/Firmen/steinemann technology/Penta/toimprove.md b/Firmen/Steinemann Technology/Notes/Penta/toimprove.md
similarity index 96%
rename from Firmen/steinemann technology/Penta/toimprove.md
rename to Firmen/Steinemann Technology/Notes/Penta/toimprove.md
index 3ed73b0..68472a7 100644
--- a/Firmen/steinemann technology/Penta/toimprove.md
+++ b/Firmen/Steinemann Technology/Notes/Penta/toimprove.md
@@ -1,3 +1,4 @@
+#penta #steinemann
# Improve this shit
> Einer der beiden scheiss Zahlen funktioniert.
diff --git a/Firmen/Steinemann Technology/Notes/Todos.md b/Firmen/Steinemann Technology/Notes/Todos.md
new file mode 100644
index 0000000..56ec0d4
--- /dev/null
+++ b/Firmen/Steinemann Technology/Notes/Todos.md
@@ -0,0 +1,2 @@
+# [[Auswertungen K2H]]
+#
\ No newline at end of file
diff --git a/Firmen/steinemann technology/aufsetzen der ABPs.md b/Firmen/Steinemann Technology/Notes/aufsetzen der ABPs.md
similarity index 86%
rename from Firmen/steinemann technology/aufsetzen der ABPs.md
rename to Firmen/Steinemann Technology/Notes/aufsetzen der ABPs.md
index 5430cd3..15703f4 100644
--- a/Firmen/steinemann technology/aufsetzen der ABPs.md
+++ b/Firmen/Steinemann Technology/Notes/aufsetzen der ABPs.md
@@ -1,3 +1,4 @@
+#erledigt #steinemann
# Done
* Jeanine Kirchhof
* Dynamischer ABP 1/6
diff --git a/Firmen/steinemann technology/fragen für keeper.md b/Firmen/Steinemann Technology/Notes/fragen für keeper.md
similarity index 93%
rename from Firmen/steinemann technology/fragen für keeper.md
rename to Firmen/Steinemann Technology/Notes/fragen für keeper.md
index 96bc039..734eba1 100644
--- a/Firmen/steinemann technology/fragen für keeper.md
+++ b/Firmen/Steinemann Technology/Notes/fragen für keeper.md
@@ -1,10 +1,11 @@
+#erledigt #steinemann #keeper
# IHA
* Wie läuft die Keeper verteilung für meinen Persönlichen haushalt ab?
* Wenn gewollt, kann man im Keeper selbst eine Verbindung mit einem Persönlichen Account erstellen. Dieser kann dann wiederum 4 weitere "Familienmitglieder" (oder Freunde) einladen.
Im Vault kann dies in den Kontoeinstellungen (Oben rechts auf den Namen klicken) aktiviert werden.
- ![Keeper Freunde](img/keeper_konto.jpg)
+ ![Keeper Freunde](keeperKontoUebertragen.jpg)
* Was passiert, sobald ich ausgetreten bin und die 30 Tage abgelaufen sind? Ist es möglich diesen Wechsel zum Privaten Zahlen nahtlos durchzuführen?
diff --git a/Firmen/steinemann technology/infomails/Achtung Phish!.md b/Firmen/Steinemann Technology/Notes/infomails/Achtung Phish!.md
similarity index 87%
rename from Firmen/steinemann technology/infomails/Achtung Phish!.md
rename to Firmen/Steinemann Technology/Notes/infomails/Achtung Phish!.md
index 9470555..66cae05 100644
--- a/Firmen/steinemann technology/infomails/Achtung Phish!.md
+++ b/Firmen/Steinemann Technology/Notes/infomails/Achtung Phish!.md
@@ -1,14 +1,15 @@
+#security #steinemann
# Achtung Phish! 🐟
Geehrte User,
Uns wurde eine E-Mail weitergeleitet, welche vorgibt, eine Einladung von MS Teams zu sein.
-![](img/fakeinvite.png)
+![](teamsInviteFake.png)
Die E-Mail versucht das Design von Microsoft Teams zu verwenden, um ahnungslose Nutzer auf diesen Link klicken zu lassen.
Erkennbar wäre dieser Versuch an der komischen E-Mail Adresse, den komischen Buchstaben im Banner oben, sowie die allgemein komische Schrift, welche verwendet wird. (Siehe rote Linien unten)
-![](img/fake.png)
+![](teamsInviteFakeMarkup.png)
Falls ihr auch einen Phish entdeckt habt, meldet uns diesen bitte direkt!
diff --git a/Firmen/Steinemann Technology/Notes/infomails/Infomail Letzte Erinnerung für Badge Übertragung.md b/Firmen/Steinemann Technology/Notes/infomails/Infomail Letzte Erinnerung für Badge Übertragung.md
new file mode 100644
index 0000000..100bcb4
--- /dev/null
+++ b/Firmen/Steinemann Technology/Notes/infomails/Infomail Letzte Erinnerung für Badge Übertragung.md
@@ -0,0 +1,3 @@
+# Letzte Erinnerung für Badge Übertragung
+
+#erledigt
\ No newline at end of file
diff --git a/Firmen/steinemann technology/infomails/Monitorausgabe.md b/Firmen/Steinemann Technology/Notes/infomails/Monitorausgabe.md
similarity index 97%
rename from Firmen/steinemann technology/infomails/Monitorausgabe.md
rename to Firmen/Steinemann Technology/Notes/infomails/Monitorausgabe.md
index 283088e..610ae23 100644
--- a/Firmen/steinemann technology/infomails/Monitorausgabe.md
+++ b/Firmen/Steinemann Technology/Notes/infomails/Monitorausgabe.md
@@ -1,3 +1,4 @@
+#steinemann
# Monitorausgabe
Guten Tag werte User
@@ -12,4 +13,4 @@ Da dies aber gebrauchte [[Monitore]] sind und wir diese so simpel wie möglich
Wir bitten euch zu unseren bekannten Servicezeiten zu kontaktieren, und mit uns die Übergabe des Monitors durchzuführen.
Freundliche Grüsse
-*Die IT!*
+*Die IT!*
\ No newline at end of file
diff --git a/Firmen/Steinemann Technology/Tickets/Andreas Dietrich/Plotter funktioniert nicht mehr.md b/Firmen/Steinemann Technology/Tickets/Andreas Dietrich/Plotter funktioniert nicht mehr.md
new file mode 100644
index 0000000..50a9374
--- /dev/null
+++ b/Firmen/Steinemann Technology/Tickets/Andreas Dietrich/Plotter funktioniert nicht mehr.md
@@ -0,0 +1,5 @@
+## Plotter funktioniert nicht mehr
+ [INC-1716 Plotter 0019 findet 2. Rolle nicht](https://steinemann.ky2help.com/incident/1716?12&selectedTask=22659&f155b1b0=11)
+
+11:05:31
+>Problem gelöst: Das Kabel wurde beim Umzug nicht wieder eingesteckt :/
diff --git a/Firmen/Steinemann Technology/Tickets/Andreas Koller/OneNote synchronisiert nicht mehr!.md b/Firmen/Steinemann Technology/Tickets/Andreas Koller/OneNote synchronisiert nicht mehr!.md
new file mode 100644
index 0000000..73858d6
--- /dev/null
+++ b/Firmen/Steinemann Technology/Tickets/Andreas Koller/OneNote synchronisiert nicht mehr!.md
@@ -0,0 +1,3 @@
+## [OneNote Synchronisiert nicht mehr!](https://steinemann.ky2help.com/incident/1750?15&selectedTask=22686&f155b1b0=11)
+1. Office war nicht mehr auf dem neusten Stand. Ich habe das Paket neu zugewiesen.
+2. Nächster versuch. Office online geöffnet und die Freigegebene Datei (das Notizbuch) neu herunter synchronisieren. #lösung
diff --git a/Firmen/Steinemann Technology/Tickets/Ilhan Hasdemir/Aufstellen der Audioanlage für Suvafest.md b/Firmen/Steinemann Technology/Tickets/Ilhan Hasdemir/Aufstellen der Audioanlage für Suvafest.md
new file mode 100644
index 0000000..eab1370
--- /dev/null
+++ b/Firmen/Steinemann Technology/Tickets/Ilhan Hasdemir/Aufstellen der Audioanlage für Suvafest.md
@@ -0,0 +1 @@
+### Aufstellen der Audioanlage für Suvafest
\ No newline at end of file
diff --git a/Firmen/Steinemann Technology/Tickets/Jürgen Stocker/OneDrive nicht angemeldet.md b/Firmen/Steinemann Technology/Tickets/Jürgen Stocker/OneDrive nicht angemeldet.md
new file mode 100644
index 0000000..6ebad53
--- /dev/null
+++ b/Firmen/Steinemann Technology/Tickets/Jürgen Stocker/OneDrive nicht angemeldet.md
@@ -0,0 +1,6 @@
+#oneDrive
+## OneNote Problem
+>Diese... "Fehlermeldung" hat Probleme gemacht...
+>![[oneDriveNichtAngemeldet.png]]
+
+1. Neu angemeldet... #lösung
diff --git a/Firmen/Steinemann Technology/Tickets/Jürgen Stocker/Teams Ram Probleme.md b/Firmen/Steinemann Technology/Tickets/Jürgen Stocker/Teams Ram Probleme.md
new file mode 100644
index 0000000..d6fbbc1
--- /dev/null
+++ b/Firmen/Steinemann Technology/Tickets/Jürgen Stocker/Teams Ram Probleme.md
@@ -0,0 +1,4 @@
+## Teams Ram Probleme
+>Teams konnte keine Verbindung mit dem Headset erstellen.
+
+1. Pc neustarten und headset neu verbinden #lösung
diff --git a/Firmen/Steinemann Technology/Tickets/Maik Förster/Neuer Laptop Installieren.md b/Firmen/Steinemann Technology/Tickets/Maik Förster/Neuer Laptop Installieren.md
new file mode 100644
index 0000000..7695f57
--- /dev/null
+++ b/Firmen/Steinemann Technology/Tickets/Maik Förster/Neuer Laptop Installieren.md
@@ -0,0 +1,42 @@
+## Neuer Laptop installieren
+>Ich habe einen neuen Laptop erhalten, und benötige diesen nun installiert.
+>Ebenfalls benötige ich Adminrechte für einige Software
+
+- [x] Installieren aller basis Software
+- [x] Installieren aller "exotischen software"
+- [x] Zusammensammeln "ultraexotischer software"
+ - [x] Verschieben nach file://C:\temp\installme
+ - [x] User instruieren.
+- [x] Admin rechte verteilen
+
+#problem #lösung
+
+---
+
+## Neuer Laptop installieren
+>Ich benötige:
+> Adobe Creative Cloud
+> Acrobat Reader
+> Gate Manager
+> Fortigate
+
+```dialogue
+l: Nils Ziermann
+
+< [08:27] Den Forti Client VPN habe ich noch vergessen
+< das sollte es dann gewesen sein
+> Alles klar!
+< Merci 🙂
+```
+
+### Checklist
+- [ ] Adobe Creative Cloud
+- [ ] Acrobat Reader
+- [ ] Gate Manager
+- [ ] Fortigate
+- [ ] Übergabe
+- [ ] Akzeptiert NZI
+
+#problem
+
+---
\ No newline at end of file
diff --git a/Firmen/Steinemann Technology/Tickets/Monica Garcia/Absprache mit CRO über das Erstellen der Belege.md b/Firmen/Steinemann Technology/Tickets/Monica Garcia/Absprache mit CRO über das Erstellen der Belege.md
new file mode 100644
index 0000000..634237f
--- /dev/null
+++ b/Firmen/Steinemann Technology/Tickets/Monica Garcia/Absprache mit CRO über das Erstellen der Belege.md
@@ -0,0 +1,2 @@
+### Absprache mit CRO über [[Firmen/Steinemann Technology/Tickets/Monica Garcia/Erstellung der Penta Belege|das Erstellen der Belege]]
+> Generelle Absprache, wie das nun durchgeführt werden soll...
\ No newline at end of file
diff --git a/Firmen/Steinemann Technology/Tickets/Monica Garcia/Erstellung der Penta Belege.md b/Firmen/Steinemann Technology/Tickets/Monica Garcia/Erstellung der Penta Belege.md
new file mode 100644
index 0000000..851a7aa
--- /dev/null
+++ b/Firmen/Steinemann Technology/Tickets/Monica Garcia/Erstellung der Penta Belege.md
@@ -0,0 +1,41 @@
+## Erstellung der Penta Belege
+> Wir müssen die Belege erstellen.
+
+- [ ] E-Mail [[BELEGE .msg|(E-Mail von 02.Mai)]] bis zum Meeting durchlesen
+![[BELEGE .msg]]
+
+#wip
+
+---
+### Penta Belege
+> Wiederholender Termin für Penta [[Penta Übersicht|Belege]] definieren.
+#erledigt
+
+Heute wird der folgende Beleg eingetragen:
+
+| Benutzer | Kenner | NR STCH | Name | Reportname Dutsch | Reportname Englisch | Testnummer STCH |
+| -------- |:------:|:-------:|:--------------------------------------- |:-------------------:|:---------------------:|:---------------:|
+| | | 7 | Versandanweisung [Rüstschein] | stg_pkbd_va_d | --- | |
+| | | 24 | Auftragsbestätigung (KUNDENAUFTRAG ETL) | stg_pkbd_ra_d | --- | |
+| | | 20 | Kundenauftrag | stg_pkbd_ka_d | --- | |
+| DCO | | 62 | Storno Anzahlung Maschinen (UBS) | stg_pkbd_arm_d | stg_pkbd_arm_gb | |
+| DCO | | 61 | Anzahlung Rechnung Maschinen (UBS) | stg_pkbd_arm_d | stg_pkbd_arm_gb | |
+| DCO | | 59 | Storno Gutschrift Maschinen (UBS) | stg_pkbd_arm_d | stg_pkbd_arm_gb | |
+| DCO | | 58 | Storno Rechnung Maschinen (UBS) | stg_pkbd_arm_d | stg_pkbd_arm_gb | |
+| DCO | | 55 | Gutschrift Maschinen (UBS) | stg_pkbd_arm_d | stg_pkbd_arm_gb | |
+| DCO | | 54 | Schlussrechnung Maschinen (UBS) | stg_pkbd_arm_d | stg_pkbd_arm_gb | |
+| | | 63 | Anzahlung Rechnung Maschinen (BTV) | stg_pkbd_arm_btv_d | stg_pkbd_arm_btv_gb | |
+| | | 56 | Schlussrechnung Maschinen (BTV) | stg_pkbd_arm_btv_d | stg_pkbd_arm_btv_gb | |
+| | | 11 | Anzahlungsrechnung | stg_pkbd_ar_d.AA | stg_pkbd_ar_gb.AA.rpt | |
+| | | 8 | Storno Ausgangsrechnung | stg_pkbd_ar_d | stg_pkbd_ar_gb | |
+| MGA/CRO | AR | 4 | Rechnung [Ausgangsrechnung] | stg_pkbd_ar_d | stg_pkbd_ar_gb | 21193894 |
+| MGA/CRO | | 23 | Auftragsbestätigung | stg_pkbd_ab_d | stg_pkbd_ab_gb | 22198110 |
+| MGA/CRO | | 21 | Angebot (Proforma Rechnung) | stg_pkbd_ab_d | stg_pkbd_ab_gb | 22198110 |
+| MGA/CRO | AU | 2 | Auftragsbestätigung | stg_pkbd_ab_d | stg_pkbd_ab_gb | 22198110 |
+| MGA/CRO | AN | 1 | Angebot | stg_pkbd_ab_d | stg_pkbd_ab_gb | KV 328245 |
+| | | 14 | Fertigungskarte | stg_pfak_karte | stg_pfak_karte | |
+| | | 3 | Bestellung | stg_pbdr_be_d | stg_pbdr_be_gb | |
+| | | 2 | Rüstschein | stg_lbew_bew_d | stg_lbew_bew_gb | |
+| | | 74 | Netto Rechnung | netto_stg_pkbd_ar_d | netto_stg_pkbd_ar_gb | |
+| | | 72 | Auftragsbestätigung [NETTO-AB] | netto_stg_pkbd_ab_d | netto_stg_pkbd_ab_gb | |
+| | | | | | | |
diff --git a/Firmen/Steinemann Technology/Tickets/Monica Garcia/Penta Belege termin definieren.md b/Firmen/Steinemann Technology/Tickets/Monica Garcia/Penta Belege termin definieren.md
new file mode 100644
index 0000000..683caa8
--- /dev/null
+++ b/Firmen/Steinemann Technology/Tickets/Monica Garcia/Penta Belege termin definieren.md
@@ -0,0 +1,4 @@
+### Penta Belege
+> Wiederholender Termin für Penta [[Penta Übersicht|Belege]] definieren.
+## Tags
+#erledigt
\ No newline at end of file
diff --git a/Firmen/Steinemann Technology/Tickets/Regina Zingerli/Kalender anzeigen.md b/Firmen/Steinemann Technology/Tickets/Regina Zingerli/Kalender anzeigen.md
new file mode 100644
index 0000000..464927b
--- /dev/null
+++ b/Firmen/Steinemann Technology/Tickets/Regina Zingerli/Kalender anzeigen.md
@@ -0,0 +1,14 @@
+## [INC-1728](https://steinemann.ky2help.com/incident/1728?f155b1b0=17) Kalender pmo
+>Der Kalender von Patrik Moser ist nach wie vor nicht ersichtlich. Wie kann ich diesen integrieren? Er muss mir jedes Mal einen Screenshot schicken, was auf Dauer mühsam ist.
+>Danke + Gruss
+>Regina
+
+1. Manuelle Einbindung über Berechtigungen
+2. Einladung über Outlook Web
+3. Outlook reset #untested
+
+> [!bug] Info von IT Firma der DPE erhalten
+> Zuerst in DPE nachfragen, wer neu Zuständig ist.
+> Dann abklären wie lösen.
+
+#ungelöst
diff --git a/Firmen/Steinemann Technology/Tickets/Stefanie Weilenmann/Installation von Monitor.md b/Firmen/Steinemann Technology/Tickets/Stefanie Weilenmann/Installation von Monitor.md
new file mode 100644
index 0000000..639237a
--- /dev/null
+++ b/Firmen/Steinemann Technology/Tickets/Stefanie Weilenmann/Installation von Monitor.md
@@ -0,0 +1,2 @@
+### Installation von Monitor
+> Mit Steffis Laptop kamen auch neue ~~Probleme~~ Herausforderungen. Beispielsweise die Dockingstation von
\ No newline at end of file
diff --git a/Firmen/Steinemann Technology/Tickets/Thomas Angehrm/Externer Mitarbeiter kann sich nicht mehr mit unserem Teams verbinden.md b/Firmen/Steinemann Technology/Tickets/Thomas Angehrm/Externer Mitarbeiter kann sich nicht mehr mit unserem Teams verbinden.md
new file mode 100644
index 0000000..97d5772
--- /dev/null
+++ b/Firmen/Steinemann Technology/Tickets/Thomas Angehrm/Externer Mitarbeiter kann sich nicht mehr mit unserem Teams verbinden.md
@@ -0,0 +1,8 @@
+### [INC-1825](https://steinemann.ky2help.com/incident/1825?3b07abb6=48) Externer Mitarbeiter kann sich nicht mehr mit unserem Teams verbinden
+> Externer Mitarbeiter ([leandro.hallauer@konzept-is.ch](mailto:leandro.hallauer@konzept-is.ch)) kann sich nicht mehr zum einem Teamskanal verbinden. Auf seiner Seite wurde ein Update durchgeführt und seither kann er sich nicht mehr verbinden. Ich habe Ihn bereits mehrfach aus dem Kanal entfernt und wieder hinzugefügt.
+>
+> Kontakt zur IT von Konzept IS: [philipp.waelischmiller@konzept-is.de](mailto:philipp.waelischmiller@konzept-is.de)
+
+
+1. Lösungsansatz
+2. Lösungsansatz #lösung
\ No newline at end of file
diff --git a/Firmen/Steinemann Technology/dokumentationRTM.docx b/Firmen/Steinemann Technology/dokumentationRTM.docx
new file mode 100644
index 0000000..1a1e622
Binary files /dev/null and b/Firmen/Steinemann Technology/dokumentationRTM.docx differ
diff --git a/Firmen/Steinemann Technology/dokumentationRTM.html b/Firmen/Steinemann Technology/dokumentationRTM.html
new file mode 100644
index 0000000..55880d1
--- /dev/null
+++ b/Firmen/Steinemann Technology/dokumentationRTM.html
@@ -0,0 +1,361 @@
+
+
+
+
+
+
+ dokumentationRTM
+
+
+
+
+Real Time Management (RTM)
+
+RTM-Terminals
+
+[!question] Wie stemple ich an den Terminals? Als Erstes muss die
+Funktion am Terminal gewählt werden, danach muss man den Badge unter dem
+WLAN Symbol (fas:Wifi
) hinhalten ### Aktionen auf den
+Terminals | Button | Bedeutung | Button | Bedeutung | | ———————– |
+————————————————————— | ——————– | —————————————- | | | Beginn der Arbeitszeit. | | Ende der Arbeitszeit. | | | Wechselt den momentan aktiven Auftrag.
+(Nur bei Auftragszeit) | | Pause innerhalb des
+Gebäudes. | | | Informationen zu Zeitsaldi,
+Feriensaldi etc. | | Beantragen von Ferien. |
+| | Einsehen der aktuellen Buchungen. | | Anzeigen der Schicht- und Ferienplanung. | |
+ | Mengenrückmeldung und Auftragsabschluss. (Nur
+bei Auftragszeit) | | |
+
+
+RTM-Web Login
+Im RTM Web können alle Funktionen, welche am Terminal möglich sind,
+durchgeführt werden.
+
+
+[!question] Wie logge ich mich beim RTM Web ein? Mit dem Link
+https://rtm.steinemann.com kommt man auf die Loginseite von RTM
+zugreifen [[webRTMlogin.png]]
+Mit dem Button “SSO” kann man sich direkt mit dem
+Microsoft / Windows Account anmelden. [[sso.png]]
+
+<!– > — > > Im Feld “Firma” muss (auch bei Steinemann
+DPE) “Steinemann” eingegeben werden. > > >
+[[webRTMloginFirmenname.png]] > > Im Feld “Benutzer” wird der
+Windows Benutzername angegeben. > >
+[[webRTMloginBenutzerName.png]] > > Im Feld “Passwort” wird das
+Windows Passwort angegeben. > > [[webRTMloginKennwort.png]]
+–>
+
+RTM-Web - Dashboard
+Übersicht
+[[webOberflächeRTMUebersicht.png]]
+Kopfzeile
+
+
+
+
+
+
+
+
+
+
+
+
+
+Kommen/Gehen |
+Aktueller Status von meinem Account |
+Ereignisse anzeigen |
+Abmelden |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[[webOberflächeRTMSidebarCockpit.png]] |
+Hauptseite anzeigen. |
+[[webOberflächeRTMSidebarPersonen.png]] |
+Mitarbeiter anzeigen. |
+
+
+[[webOberflächeRTMSidebarEinsatzplan.png]] |
+Einsatzplan und Ferien anzeigen. |
+[[webOberflächeRTMSidebarAuftraege.png]] |
+Aufträge anzeigen. |
+
+
+
+
+RTM Mobile für Reisende
+In der RTM Mobile App können die Zeiten vom Handy aus nachgetragen
+werden.
+
+
+
+
+
+
+
+
+
+
+
+
+[[qrCodeRTMAndroid.png]] |
+ris:ArrowLeftS Google
+Play Store ris:ArrowLeftS |
+ris:ArrowRightS Apple
+App Store ris:ArrowRightS |
+[[qrCodeRTMIPhone.png]] |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[[webOberflächeRTMMobileKommen.png]] |
+Beginn der Arbeitszeit. |
+[[webOberflächeRTMMobileGehen.png]] |
+Ende der Arbeitszeit. |
+
+
+[[webOberflächeRTMMobilePause.png]] |
+Pause innerhalb des Gebäudes. |
+ |
+ |
+
+
+[[webOberflächeRTMMobileAuftragszeit.png]] |
+Zeigt Informationen über den momentanen Auftrag an |
+[[webOberflächeRTMMobileEinsatzplan.png]] |
+Anzeigen der Planung (Schichten, Ferien, etc.) |
+
+
+[[webOberflächeRTMMobileSaldos.png]] |
+Informationen zu Zeitsaldi, Feriensaldi etc. |
+[[webOberflächeRTMMobileBuchungen.png]] |
+Einsehen der aktuellen Buchungen. |
+
+
+
+
+todo
+
+- Wie erfasse ich Abwesenheiten?
+- Wie erfasse/korrigiere ich Stempelungen?
+- Wie erfasse ich Home Office Tätigkeit?
+- Wie erfasse ich eine Auftragszeitbuchung (im Web und im App)?
+- Wie ändere ich mein Passwort (Web, Softterm)?
+- Wo sehe ich meine Saldi?
+- Vorgesetzen Funktionen wie: Korrektur Stempelungen,
+Genehmigungsverfahren, Einsatzplanung, Reportings, Cockpit, wie mache
+ich Stellvertreter, usw.
+- Allgemein: evtl. Mögliche Fehler und Korrekturen
+- Was bedeuten die Abwesenheitscodes (z.B. Durchschnittstag 6/12 Mt,
+Weiterbildung vs Weiterbildung extern) <- ggf. durch HR
+einzureichen
+
+
+
diff --git a/Firmen/Steinemann Technology/dokumentationRTM.md b/Firmen/Steinemann Technology/dokumentationRTM.md
new file mode 100644
index 0000000..2ac407f
--- /dev/null
+++ b/Firmen/Steinemann Technology/dokumentationRTM.md
@@ -0,0 +1,111 @@
+
+> [!danger] Neu in Word weitergeführt!!!
+> [Siehe Teams / Word](https://steinemanntech.sharepoint.com/:w:/r/sites/ZeiterfassungRTM/Shared%20Documents/General/RTM%20-%20Auftragszeiten%20erfassen.docx?d=wd04c9d8e8e0b4a5c963f0a331f4d2a48&csf=1&web=1&e=J1mlhg)
+> [!danger] Neu in Word weitergeführt!!!
+> [Siehe Teams / Word](https://steinemanntech.sharepoint.com/:w:/r/sites/ZeiterfassungRTM/Shared%20Documents/General/RTM%20-%20Auftragszeiten%20erfassen.docx?d=wd04c9d8e8e0b4a5c963f0a331f4d2a48&csf=1&web=1&e=J1mlhg)
+
+> [!danger] Neu in Word weitergeführt!!!
+> [Siehe Teams / Word](https://steinemanntech.sharepoint.com/:w:/r/sites/ZeiterfassungRTM/Shared%20Documents/General/RTM%20-%20Auftragszeiten%20erfassen.docx?d=wd04c9d8e8e0b4a5c963f0a331f4d2a48&csf=1&web=1&e=J1mlhg)
+
+> [!danger] Neu in Word weitergeführt!!!
+> [Siehe Teams / Word](https://steinemanntech.sharepoint.com/:w:/r/sites/ZeiterfassungRTM/Shared%20Documents/General/RTM%20-%20Auftragszeiten%20erfassen.docx?d=wd04c9d8e8e0b4a5c963f0a331f4d2a48&csf=1&web=1&e=J1mlhg)
+
+> [!danger] Neu in Word weitergeführt!!!
+> [Siehe Teams / Word](https://steinemanntech.sharepoint.com/:w:/r/sites/ZeiterfassungRTM/Shared%20Documents/General/RTM%20-%20Auftragszeiten%20erfassen.docx?d=wd04c9d8e8e0b4a5c963f0a331f4d2a48&csf=1&web=1&e=J1mlhg)
+
+> [!danger] Neu in Word weitergeführt!!!
+> [Siehe Teams / Word](https://steinemanntech.sharepoint.com/:w:/r/sites/ZeiterfassungRTM/Shared%20Documents/General/RTM%20-%20Auftragszeiten%20erfassen.docx?d=wd04c9d8e8e0b4a5c963f0a331f4d2a48&csf=1&web=1&e=J1mlhg)
+
+# (OLD) Real Time Management (RTM) (OLD)
+
+
+## RTM-Terminals
+> [!question] Wie stemple ich an den Terminals?
+> Als Erstes muss die Funktion am Terminal gewählt werden, danach muss man den Badge unter dem WLAN Symbol (`fas:Wifi`) hinhalten
+### Aktionen auf den Terminals
+| Button | Bedeutung | Button | Bedeutung |
+| ----------------------- | --------------------------------------------------------------- | -------------------- | ---------------------------------------- |
+| ![Kommen](kommen.jpg) | Beginn der Arbeitszeit. | ![](gehen.jpg) | Ende der Arbeitszeit. |
+| ![](auftragwechsel.jpg) | Wechselt den momentan aktiven Auftrag. (Nur bei Auftragszeit) | ![](pause.jpg) | Pause innerhalb des Gebäudes. |
+| ![](info.jpg) | Informationen zu Zeitsaldi, Feriensaldi etc. | ![](planung.jpg) | Beantragen von Ferien. |
+| ![](buchungen.jpg) | Einsehen der aktuellen Buchungen. | ![](einsatzplan.jpg) | Anzeigen der Schicht- und Ferienplanung. |
+| ![](mengen.jpg) | Mengenrückmeldung und Auftragsabschluss. (Nur bei Auftragszeit) | | |
+
+
+
+
+## RTM-Web Login
+Im RTM Web können alle Funktionen, welche am Terminal möglich sind, durchgeführt werden.
+
+
+> [!question] Wie logge ich mich beim RTM Web ein?
+> Mit dem Link https://rtm.steinemann.com kommt man auf die Loginseite von RTM zugreifen
+> ![[webRTMlogin.png]]
+>
+> Mit dem Button **"SSO"** kann man sich direkt mit dem Microsoft / Windows Account anmelden.
+> ![[sso.png]]
+
+
+
+
+
+## RTM-Web - Dashboard
+### Übersicht
+![[webOberflächeRTMUebersicht.png]]
+
+### Kopfzeile
+
+| ![[webOberflächeRTMHeaderKommenGehen.png]] | ![[webOberflächeRTMHeaderZusammenfassung.png]] | ![[webOberflächeRTMHeaderEreignisse.png]] | ![[webOberflächeRTMheaderAusloggen.png]] |
+| ------------------------------------------ | ---------------------------------------------- | ----------------------------------------- | ---------------------------------------- |
+| Kommen/Gehen | Aktueller Status von meinem Account | Ereignisse anzeigen | Abmelden |
+
+
+### Sidebar
+| Menüpunkt | Beschreibung | Menüpunkt | Beschreibung |
+| ------------------------------------------- | -------------------------------- | ----------------------------------------- | --------------------- |
+| ![[webOberflächeRTMSidebarCockpit.png]] | Hauptseite anzeigen. | ![[webOberflächeRTMSidebarPersonen.png]] | Mitarbeiter anzeigen. |
+| ![[webOberflächeRTMSidebarEinsatzplan.png]] | Einsatzplan und Ferien anzeigen. | ![[webOberflächeRTMSidebarAuftraege.png]] | Aufträge anzeigen. |
+
+
+
+
+
+
+## RTM Mobile für Reisende
+In der RTM Mobile App können die Zeiten vom Handy aus nachgetragen werden.
+
+| Android | | | iPhone |
+| ------------------------- |:------------------------------------------------------------- | ------------------------------------------------------------:| ------------------------ |
+| ![[qrCodeRTMAndroid.png]] | `ris:ArrowLeftS`
Google Play Store
`ris:ArrowLeftS` | `ris:ArrowRightS`
Apple App Store
`ris:ArrowRightS` | ![[qrCodeRTMIPhone.png]] |
+
+
+| Button | Beschreibung | Button | Beschreibung |
+| ------------------------------------------- | -------------------------------------------------- | ------------------------------------------ | --------------------------------------------- |
+| ![[webOberflächeRTMMobileKommen.png]] | Beginn der Arbeitszeit. | ![[webOberflächeRTMMobileGehen.png]] | Ende der Arbeitszeit. |
+| ![[webOberflächeRTMMobilePause.png]] | Pause innerhalb des Gebäudes. | | |
+| ![[webOberflächeRTMMobileAuftragszeit.png]] | Zeigt Informationen über den momentanen Auftrag an | ![[webOberflächeRTMMobileEinsatzplan.png]] | Anzeigen der Planung (Schichten, Ferien, etc.) |
+| ![[webOberflächeRTMMobileSaldos.png]] | Informationen zu Zeitsaldi, Feriensaldi etc. | ![[webOberflächeRTMMobileBuchungen.png]] | Einsehen der aktuellen Buchungen. |
+
+#dokumentation #steinemann
diff --git a/Firmen/steinemann technology/K2H/K2H.md b/Firmen/steinemann technology/K2H/K2H.md
deleted file mode 100644
index 41e4bd4..0000000
--- a/Firmen/steinemann technology/K2H/K2H.md
+++ /dev/null
@@ -1,2 +0,0 @@
-```folder-index-content
-```
\ No newline at end of file
diff --git a/Firmen/steinemann technology/Notes/Adobe.md b/Firmen/steinemann technology/Notes/Adobe.md
new file mode 100644
index 0000000..532e13a
--- /dev/null
+++ b/Firmen/steinemann technology/Notes/Adobe.md
@@ -0,0 +1,43 @@
+#steinemann
+Gespräch mit Herrn Vendossa
+
+Account wird auf administrator@steinemann.com gesetzt
+
+---
+
+# Lizenzzeugs
+
+Letzte möglichkeit zu kündigen im letzten Monat
+Bekomme eine Nachricht in den letzten 30 Tagen
+Nach der Verlängerung nochmals 14 Tage.
+
+Ansonsten Stornogebühren - 50% der Montatsrate
+
+# Jahreslaufzeit
+
+Jährliche vorauszahlung keine Rückerstattung
+Zugang aber bis Ende des Jahres - Keine Stornogebühren
+
+---
+# Angebot in E-Mail
+
+Bestätigen in E-Mail
+Zahlungsinformationen rekonfigurieren/bestätigen
+
+Informationen für die Administrationskonsole werden einkommen
+---
+Sobald die Bestätigung durch ist, kann s.kohlhase übernommen werden.
+
+---
+
+# Weitere Fragen?
+
+Bei Fragen oder wunsch auf Rückruf -> anfordern per E-Mail
+
+---
+
+# 1 Lizenz, 2 Installation - Pro User. 3 Lizenzen bereit.
+
+Nutzer können es auf 2 Geräten gleichzeitig benutzen.
+Für weitere muss auf einem anderen Gerät abgemeldet werden und neu angemeldet werden.
+---
diff --git a/Firmen/steinemann technology/Notes/Auswertungen K2H.md b/Firmen/steinemann technology/Notes/Auswertungen K2H.md
new file mode 100644
index 0000000..883324c
--- /dev/null
+++ b/Firmen/steinemann technology/Notes/Auswertungen K2H.md
@@ -0,0 +1,37 @@
+#ky2help #steinemann #wip
+# Reaktionszeit 2h: min./max. + durchschn. Reaktionszeit
+Möglich, wurde bereits abgesprochen mit Herr Cutieri, erste [[Penta Übersicht]] schon ersichtlich
+
+
+# Anzahl Tickets: Bestand zum Zeitpunkt t, neu eröffnet, abgeschlossen, Bestand t+1
+Möglich; An sich auch schon erstellt;
+
+* t = Wie viele Tickets sind Heute vorhanden?
+* t+1 = Wieviele Tickets sind in einer Woche noch da?
+
+- [ ] check with Cutieri
+- [ ] Reporting Fähigkeit anschauen
+
+# Bearbeitungsdauer Tickets: min./max. + durchschn.
+Möglich, wurde bereits abgesprochen mit Herr Cutieri, erste [[Penta Übersicht]] schon ersichtlich
+- [ ] check with Cutieri (Gleich wie bei Anzahl Tickets )
+- [ ] Check Reporting
+
+# Wer setzt wie viele Tickets ab? Personen und Abteilungen/Bereiche
+Erstellt, nach Abteilung muss mit Herr Cutieri abgesprochen werden.
+
+- Abtrennung durch "Steinemann" + "DPE" danach nach Abteilung
+- Sollte als Liste dargestellt werden
+- Titel aus Übersicht gneommen
+
+- [ ] Erstellen der Abteilungen als Subbereich für Auswertung
+
+# Wie werden die Tickets erstellt: Email, Tel./Call, Walk-in, etc.?
+Tricky, da walkins und Calls meist direkt bearbeitet werden und selten im Ticketsystem landen
+
+- [ ] Absprechen mit DHE ob Kategorien verwendet werden
+- [ ] Absprechen mit TEAM, was die Meinung zu den Walkins und Telefonsupports ist.
+
+# Wie viele Kunden bestätigen die Erledigung des Tickets? Total erledigte Tickets, %-Anteil ohne Bestätigung"
+Indirekt ersichtlich
+- [ ] Mailverkehr einfacher gestalten
diff --git a/Firmen/steinemann technology/Notes/K2H/Vorfall Abgeschlossen.html b/Firmen/steinemann technology/Notes/K2H/Vorfall Abgeschlossen.html
new file mode 100644
index 0000000..b20a8e3
--- /dev/null
+++ b/Firmen/steinemann technology/Notes/K2H/Vorfall Abgeschlossen.html
@@ -0,0 +1,24 @@
+Vorfall abgeschlossen - Bitte prüfen Sie das Ergebnis
+
+
+ Incident |
+ ${dataObjectLink} |
+
+
+ Betreff |
+ ${subject} |
+
+
+
+${solution}
+
+
+
+
+${description}
+
+