Last Sync: 2026-01-30 18:07 (Mobile)

This commit is contained in:
choibk committed 2026-01-30 18:07:09 +09:00
1 parent 191b2e16bc
commit 81ac1b7522
24 files changed
+11886 -4257

No files matched your search

+2 -1
View File
@@ -4,5 +4,6 @@
"dataview",
"obsidian-kanban",
"advanced-canvas",
"canvas-send-to-back"
"canvas-send-to-back",
"obsidian-excalidraw-plugin"
]
@@ -0,0 +1,83 @@
{
"nodeTypeOnDoubleClick": "text",
"alignNewNodesToGrid": true,
"defaultTextNodeDimensions": [
260,
60
],
"defaultFileNodeDimensions": [
400,
400
],
"minNodeSize": 60,
"maxNodeWidth": -1,
"disableFontSizeRelativeToZoom": false,
"canvasMetadataCompatibilityEnabled": true,
"treatFileNodeEdgesAsLinks": true,
"enableSingleNodeLinks": true,
"combineCustomStylesInDropdown": false,
"nodeStylingFeatureEnabled": true,
"customNodeStyleAttributes": [],
"defaultTextNodeColor": 0,
"defaultTextNodeStyleAttributes": {},
"edgesStylingFeatureEnabled": true,
"customEdgeStyleAttributes": [],
"inheritEdgeColorFromNode": false,
"defaultEdgeColor": 0,
"defaultEdgeLineDirection": "unidirectional",
"defaultEdgeStyleAttributes": {},
"edgeStyleUpdateWhileDragging": false,
"edgeStyleSquarePathRounded": true,
"edgeStylePathfinderAllowDiagonal": false,
"edgeStylePathfinderPathRounded": true,
"variableBreakpointFeatureEnabled": false,
"zOrderingControlFeatureEnabled": false,
"zOrderingControlShowOneLayerShiftOptions": false,
"aspectRatioControlFeatureEnabled": false,
"commandsFeatureEnabled": true,
"zoomToClonedNode": true,
"cloneNodeMargin": 20,
"expandNodeStepSize": 20,
"nativeFileSearchEnabled": true,
"floatingEdgeFeatureEnabled": true,
"allowFloatingEdgeCreation": false,
"newEdgeFromSideFloating": false,
"flipEdgeFeatureEnabled": true,
"betterExportFeatureEnabled": true,
"betterReadonlyEnabled": false,
"hideBackgroundGridWhenInReadonly": true,
"disableNodePopup": false,
"disableZoom": false,
"disablePan": false,
"autoResizeNodeFeatureEnabled": true,
"autoResizeNodeEnabledByDefault": false,
"autoResizeNodeMaxHeight": -1,
"autoResizeNodeSnapToGrid": true,
"collapsibleGroupsFeatureEnabled": true,
"collapsedGroupPreviewOnDrag": true,
"focusModeFeatureEnabled": false,
"presentationFeatureEnabled": true,
"showSetStartNodeInPopup": false,
"defaultSlideDimensions": [
1200,
675
],
"wrapInSlidePadding": 20,
"resetViewportOnPresentationEnd": true,
"useArrowKeysToChangeSlides": true,
"usePgUpPgDownKeysToChangeSlides": true,
"zoomToSlideWithoutPadding": true,
"useUnclampedZoomWhilePresenting": false,
"fullscreenPresentationEnabled": true,
"slideTransitionAnimationDuration": 0.5,
"slideTransitionAnimationIntensity": 1.25,
"canvasEncapsulationEnabled": false,
"portalsFeatureEnabled": true,
"showEdgesIntoDisabledPortals": true,
"autoFileNodeEdgesFeatureEnabled": false,
"autoFileNodeEdgesFrontmatterKey": "canvas-edges",
"edgeHighlightEnabled": false,
"highlightIncomingEdges": false,
"edgeSelectionEnabled": false,
"selectEdgeByDirection": false
}
@@ -0,0 +1,819 @@
{
"copyLinkToElemenetAnchorTo100": false,
"copyFrameLinkByName": false,
"disableDoubleClickTextEditing": false,
"folder": "Excalidraw",
"cropFolder": "",
"annotateFolder": "",
"embedUseExcalidrawFolder": false,
"templateFilePath": "Excalidraw/Template.excalidraw",
"scriptFolderPath": "Excalidraw/Scripts",
"fontAssetsPath": "Excalidraw/CJK Fonts",
"loadChineseFonts": false,
"loadJapaneseFonts": false,
"loadKoreanFonts": false,
"compress": true,
"decompressForMDView": false,
"onceOffCompressFlagReset": true,
"onceOffGPTVersionReset": true,
"autosave": true,
"autosaveIntervalDesktop": 60000,
"autosaveIntervalMobile": 30000,
"drawingFilenamePrefix": "Drawing ",
"drawingEmbedPrefixWithFilename": true,
"drawingFilnameEmbedPostfix": " ",
"drawingFilenameDateTime": "YYYY-MM-DD HH.mm.ss",
"useExcalidrawExtension": true,
"cropSuffix": "",
"cropPrefix": "cropped_",
"annotateSuffix": "",
"annotatePrefix": "annotated_",
"annotatePreserveSize": false,
"previewImageType": "SVGIMG",
"renderingConcurrency": 3,
"allowImageCache": true,
"allowImageCacheInScene": true,
"displayExportedImageIfAvailable": false,
"previewMatchObsidianTheme": false,
"width": "400",
"height": "",
"overrideObsidianFontSize": false,
"dynamicStyling": "colorful",
"isLeftHanded": false,
"desktopUIMode": "tray",
"tabletUIMode": "compact",
"iframeMatchExcalidrawTheme": true,
"matchTheme": false,
"matchThemeAlways": false,
"matchThemeTrigger": false,
"defaultMode": "normal",
"defaultPenMode": "never",
"penModeDoubleTapEraser": true,
"penModeSingleFingerPanning": true,
"penModeCrosshairVisible": true,
"panWithRightMouseButton": false,
"renderImageInMarkdownReadingMode": false,
"renderImageInHoverPreviewForMDNotes": false,
"renderImageInMarkdownToPDF": false,
"allowPinchZoom": false,
"allowWheelZoom": false,
"zoomToFitOnOpen": true,
"zoomToFitOnResize": false,
"zoomToFitMaxLevel": 2,
"zoomStep": 0.05,
"zoomMin": 0.1,
"zoomMax": 30,
"linkPrefix": "📍",
"urlPrefix": "🌐",
"parseTODO": false,
"todo": "☐",
"done": "🗹",
"hoverPreviewWithoutCTRL": false,
"linkOpacity": 1,
"openInAdjacentPane": true,
"showSecondOrderLinks": true,
"focusOnFileTab": true,
"openInMainWorkspace": true,
"showLinkBrackets": false,
"syncElementLinkWithText": false,
"allowCtrlClick": true,
"forceWrap": false,
"pageTransclusionCharLimit": 200,
"wordWrappingDefault": 0,
"removeTransclusionQuoteSigns": true,
"iframelyAllowed": true,
"pngExportScale": 1,
"exportWithTheme": true,
"exportWithBackground": true,
"exportPaddingSVG": 10,
"exportEmbedScene": false,
"keepInSync": false,
"autoexportSVG": false,
"autoexportPNG": false,
"autoExportLightAndDark": false,
"autoexportExcalidraw": false,
"embedType": "excalidraw",
"embedMarkdownCommentLinks": true,
"embedWikiLink": true,
"syncExcalidraw": false,
"experimentalFileType": false,
"experimentalFileTag": "✏️",
"experimentalLivePreview": true,
"fadeOutExcalidrawMarkup": false,
"loadPropertySuggestions": false,
"experimentalEnableFourthFont": false,
"experimantalFourthFont": "Virgil",
"addDummyTextElement": false,
"zoteroCompatibility": false,
"fieldSuggester": true,
"compatibilityMode": false,
"drawingOpenCount": 0,
"library": "deprecated",
"library2": {
"type": "excalidrawlib",
"version": 2,
"source": "https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/2.20.0",
"libraryItems": []
},
"imageElementNotice": true,
"mdSVGwidth": 500,
"mdSVGmaxHeight": 800,
"mdFont": "Virgil",
"mdFontColor": "Black",
"mdBorderColor": "Black",
"mdCSS": "",
"scriptEngineSettings": {},
"previousRelease": "2.20.0",
"showReleaseNotes": true,
"compareManifestToPluginVersion": true,
"showNewVersionNotification": true,
"latexBoilerplate": "\\color{blue}",
"latexPreambleLocation": "preamble.sty",
"taskboneEnabled": false,
"taskboneAPIkey": "",
"pinnedScripts": [],
"sidepanelTabs": [],
"customPens": [
{
"type": "default",
"freedrawOnly": false,
"strokeColor": "#000000",
"backgroundColor": "transparent",
"fillStyle": "hachure",
"strokeWidth": 0,
"roughness": 0,
"penOptions": {
"highlighter": false,
"constantPressure": false,
"hasOutline": false,
"outlineWidth": 1,
"options": {
"thinning": 0.6,
"smoothing": 0.5,
"streamline": 0.5,
"easing": "easeOutSine",
"start": {
"cap": true,
"taper": 0,
"easing": "linear"
},
"end": {
"cap": true,
"taper": 0,
"easing": "linear"
}
}
}
},
{
"type": "highlighter",
"freedrawOnly": true,
"strokeColor": "#FFC47C",
"backgroundColor": "#FFC47C",
"fillStyle": "solid",
"strokeWidth": 2,
"roughness": null,
"penOptions": {
"highlighter": true,
"constantPressure": true,
"hasOutline": true,
"outlineWidth": 4,
"options": {
"thinning": 1,
"smoothing": 0.5,
"streamline": 0.5,
"easing": "linear",
"start": {
"taper": 0,
"cap": true,
"easing": "linear"
},
"end": {
"taper": 0,
"cap": true,
"easing": "linear"
}
}
}
},
{
"type": "finetip",
"freedrawOnly": false,
"strokeColor": "#3E6F8D",
"backgroundColor": "transparent",
"fillStyle": "hachure",
"strokeWidth": 0.5,
"roughness": 0,
"penOptions": {
"highlighter": false,
"hasOutline": false,
"outlineWidth": 1,
"constantPressure": true,
"options": {
"smoothing": 0.4,
"thinning": -0.5,
"streamline": 0.4,
"easing": "linear",
"start": {
"taper": 5,
"cap": false,
"easing": "linear"
},
"end": {
"taper": 5,
"cap": false,
"easing": "linear"
}
}
}
},
{
"type": "fountain",
"freedrawOnly": false,
"strokeColor": "#000000",
"backgroundColor": "transparent",
"fillStyle": "hachure",
"strokeWidth": 2,
"roughness": 0,
"penOptions": {
"highlighter": false,
"constantPressure": false,
"hasOutline": false,
"outlineWidth": 1,
"options": {
"smoothing": 0.2,
"thinning": 0.6,
"streamline": 0.2,
"easing": "easeInOutSine",
"start": {
"taper": 150,
"cap": true,
"easing": "linear"
},
"end": {
"taper": 1,
"cap": true,
"easing": "linear"
}
}
}
},
{
"type": "marker",
"freedrawOnly": true,
"strokeColor": "#B83E3E",
"backgroundColor": "#FF7C7C",
"fillStyle": "dashed",
"strokeWidth": 2,
"roughness": 3,
"penOptions": {
"highlighter": false,
"constantPressure": true,
"hasOutline": true,
"outlineWidth": 4,
"options": {
"thinning": 1,
"smoothing": 0.5,
"streamline": 0.5,
"easing": "linear",
"start": {
"taper": 0,
"cap": true,
"easing": "linear"
},
"end": {
"taper": 0,
"cap": true,
"easing": "linear"
}
}
}
},
{
"type": "thick-thin",
"freedrawOnly": true,
"strokeColor": "#CECDCC",
"backgroundColor": "transparent",
"fillStyle": "hachure",
"strokeWidth": 0,
"roughness": null,
"penOptions": {
"highlighter": true,
"constantPressure": true,
"hasOutline": false,
"outlineWidth": 1,
"options": {
"thinning": 1,
"smoothing": 0.5,
"streamline": 0.5,
"easing": "linear",
"start": {
"taper": 0,
"cap": true,
"easing": "linear"
},
"end": {
"cap": true,
"taper": true,
"easing": "linear"
}
}
}
},
{
"type": "thin-thick-thin",
"freedrawOnly": true,
"strokeColor": "#CECDCC",
"backgroundColor": "transparent",
"fillStyle": "hachure",
"strokeWidth": 0,
"roughness": null,
"penOptions": {
"highlighter": true,
"constantPressure": true,
"hasOutline": false,
"outlineWidth": 1,
"options": {
"thinning": 1,
"smoothing": 0.5,
"streamline": 0.5,
"easing": "linear",
"start": {
"cap": true,
"taper": true,
"easing": "linear"
},
"end": {
"cap": true,
"taper": true,
"easing": "linear"
}
}
}
},
{
"type": "default",
"freedrawOnly": false,
"strokeColor": "#000000",
"backgroundColor": "transparent",
"fillStyle": "hachure",
"strokeWidth": 0,
"roughness": 0,
"penOptions": {
"highlighter": false,
"constantPressure": false,
"hasOutline": false,
"outlineWidth": 1,
"options": {
"thinning": 0.6,
"smoothing": 0.5,
"streamline": 0.5,
"easing": "easeOutSine",
"start": {
"cap": true,
"taper": 0,
"easing": "linear"
},
"end": {
"cap": true,
"taper": 0,
"easing": "linear"
}
}
}
},
{
"type": "default",
"freedrawOnly": false,
"strokeColor": "#000000",
"backgroundColor": "transparent",
"fillStyle": "hachure",
"strokeWidth": 0,
"roughness": 0,
"penOptions": {
"highlighter": false,
"constantPressure": false,
"hasOutline": false,
"outlineWidth": 1,
"options": {
"thinning": 0.6,
"smoothing": 0.5,
"streamline": 0.5,
"easing": "easeOutSine",
"start": {
"cap": true,
"taper": 0,
"easing": "linear"
},
"end": {
"cap": true,
"taper": 0,
"easing": "linear"
}
}
}
},
{
"type": "default",
"freedrawOnly": false,
"strokeColor": "#000000",
"backgroundColor": "transparent",
"fillStyle": "hachure",
"strokeWidth": 0,
"roughness": 0,
"penOptions": {
"highlighter": false,
"constantPressure": false,
"hasOutline": false,
"outlineWidth": 1,
"options": {
"thinning": 0.6,
"smoothing": 0.5,
"streamline": 0.5,
"easing": "easeOutSine",
"start": {
"cap": true,
"taper": 0,
"easing": "linear"
},
"end": {
"cap": true,
"taper": 0,
"easing": "linear"
}
}
}
}
],
"numberOfCustomPens": 0,
"pdfScale": 4,
"pdfBorderBox": true,
"pdfFrame": false,
"pdfGapSize": 20,
"pdfGroupPages": false,
"pdfLockAfterImport": true,
"pdfNumColumns": 1,
"pdfNumRows": 1,
"pdfDirection": "right",
"pdfImportScale": 0.3,
"gridSettings": {
"DYNAMIC_COLOR": true,
"COLOR": "#000000",
"OPACITY": 50,
"GRID_DIRECTION": {
"horizontal": true,
"vertical": true
}
},
"laserSettings": {
"DECAY_LENGTH": 50,
"DECAY_TIME": 1000,
"COLOR": "#ff0000"
},
"embeddableMarkdownDefaults": {
"useObsidianDefaults": false,
"backgroundMatchCanvas": false,
"backgroundMatchElement": true,
"backgroundColor": "#fff",
"backgroundOpacity": 60,
"borderMatchElement": true,
"borderColor": "#fff",
"borderOpacity": 0,
"filenameVisible": false
},
"markdownNodeOneClickEditing": false,
"canvasImmersiveEmbed": true,
"startupScriptPath": "",
"aiEnabled": true,
"openAIAPIToken": "",
"openAIDefaultTextModel": "gpt-5-mini",
"openAIDefaultTextModelMaxTokens": 4096,
"openAIDefaultVisionModel": "gpt-5-mini",
"openAIDefaultImageGenerationModel": "gpt-image-1",
"openAIURL": "https://api.openai.com/v1/chat/completions",
"openAIImageGenerationURL": "https://api.openai.com/v1/images/generations",
"openAIImageEditsURL": "https://api.openai.com/v1/images/edits",
"openAIImageVariationURL": "https://api.openai.com/v1/images/variations",
"modifierKeyConfig": {
"Mac": {
"LocalFileDragAction": {
"defaultAction": "image-import",
"rules": [
{
"shift": false,
"ctrl_cmd": false,
"alt_opt": false,
"meta_ctrl": false,
"result": "image-import"
},
{
"shift": true,
"ctrl_cmd": false,
"alt_opt": true,
"meta_ctrl": false,
"result": "link"
},
{
"shift": true,
"ctrl_cmd": false,
"alt_opt": false,
"meta_ctrl": false,
"result": "image-url"
},
{
"shift": false,
"ctrl_cmd": false,
"alt_opt": true,
"meta_ctrl": false,
"result": "embeddable"
}
]
},
"WebBrowserDragAction": {
"defaultAction": "image-url",
"rules": [
{
"shift": false,
"ctrl_cmd": false,
"alt_opt": false,
"meta_ctrl": false,
"result": "image-url"
},
{
"shift": true,
"ctrl_cmd": false,
"alt_opt": true,
"meta_ctrl": false,
"result": "link"
},
{
"shift": false,
"ctrl_cmd": false,
"alt_opt": true,
"meta_ctrl": false,
"result": "embeddable"
},
{
"shift": true,
"ctrl_cmd": false,
"alt_opt": false,
"meta_ctrl": false,
"result": "image-import"
}
]
},
"InternalDragAction": {
"defaultAction": "link",
"rules": [
{
"shift": false,
"ctrl_cmd": false,
"alt_opt": false,
"meta_ctrl": false,
"result": "link"
},
{
"shift": false,
"ctrl_cmd": false,
"alt_opt": false,
"meta_ctrl": true,
"result": "embeddable"
},
{
"shift": true,
"ctrl_cmd": false,
"alt_opt": false,
"meta_ctrl": false,
"result": "image"
},
{
"shift": true,
"ctrl_cmd": false,
"alt_opt": false,
"meta_ctrl": true,
"result": "image-fullsize"
}
]
},
"LinkClickAction": {
"defaultAction": "new-tab",
"rules": [
{
"shift": false,
"ctrl_cmd": false,
"alt_opt": false,
"meta_ctrl": false,
"result": "active-pane"
},
{
"shift": false,
"ctrl_cmd": true,
"alt_opt": false,
"meta_ctrl": false,
"result": "new-tab"
},
{
"shift": false,
"ctrl_cmd": true,
"alt_opt": true,
"meta_ctrl": false,
"result": "new-pane"
},
{
"shift": true,
"ctrl_cmd": true,
"alt_opt": true,
"meta_ctrl": false,
"result": "popout-window"
},
{
"shift": false,
"ctrl_cmd": true,
"alt_opt": false,
"meta_ctrl": true,
"result": "md-properties"
}
]
}
},
"Win": {
"LocalFileDragAction": {
"defaultAction": "image-import",
"rules": [
{
"shift": false,
"ctrl_cmd": false,
"alt_opt": false,
"meta_ctrl": false,
"result": "image-import"
},
{
"shift": false,
"ctrl_cmd": true,
"alt_opt": false,
"meta_ctrl": false,
"result": "link"
},
{
"shift": true,
"ctrl_cmd": false,
"alt_opt": false,
"meta_ctrl": false,
"result": "image-url"
},
{
"shift": true,
"ctrl_cmd": true,
"alt_opt": false,
"meta_ctrl": false,
"result": "embeddable"
}
]
},
"WebBrowserDragAction": {
"defaultAction": "image-url",
"rules": [
{
"shift": false,
"ctrl_cmd": false,
"alt_opt": false,
"meta_ctrl": false,
"result": "image-url"
},
{
"shift": false,
"ctrl_cmd": true,
"alt_opt": false,
"meta_ctrl": false,
"result": "link"
},
{
"shift": true,
"ctrl_cmd": true,
"alt_opt": false,
"meta_ctrl": false,
"result": "embeddable"
},
{
"shift": true,
"ctrl_cmd": false,
"alt_opt": false,
"meta_ctrl": false,
"result": "image-import"
}
]
},
"InternalDragAction": {
"defaultAction": "link",
"rules": [
{
"shift": false,
"ctrl_cmd": false,
"alt_opt": false,
"meta_ctrl": false,
"result": "link"
},
{
"shift": true,
"ctrl_cmd": true,
"alt_opt": false,
"meta_ctrl": false,
"result": "embeddable"
},
{
"shift": true,
"ctrl_cmd": false,
"alt_opt": false,
"meta_ctrl": false,
"result": "image"
},
{
"shift": false,
"ctrl_cmd": true,
"alt_opt": true,
"meta_ctrl": false,
"result": "image-fullsize"
}
]
},
"LinkClickAction": {
"defaultAction": "new-tab",
"rules": [
{
"shift": false,
"ctrl_cmd": false,
"alt_opt": false,
"meta_ctrl": false,
"result": "active-pane"
},
{
"shift": false,
"ctrl_cmd": true,
"alt_opt": false,
"meta_ctrl": false,
"result": "new-tab"
},
{
"shift": false,
"ctrl_cmd": true,
"alt_opt": true,
"meta_ctrl": false,
"result": "new-pane"
},
{
"shift": true,
"ctrl_cmd": true,
"alt_opt": true,
"meta_ctrl": false,
"result": "popout-window"
},
{
"shift": false,
"ctrl_cmd": true,
"alt_opt": false,
"meta_ctrl": true,
"result": "md-properties"
}
]
}
}
},
"slidingPanesSupport": false,
"areaZoomLimit": 1,
"longPressDesktop": 500,
"longPressMobile": 500,
"doubleClickLinkOpenViewMode": true,
"isDebugMode": false,
"rank": "Bronze",
"modifierKeyOverrides": [
{
"modifiers": [
"Mod"
],
"key": "Enter"
},
{
"modifiers": [
"Mod"
],
"key": "k"
},
{
"modifiers": [
"Mod"
],
"key": "G"
}
],
"showSplashscreen": true,
"pdfSettings": {
"pageSize": "A4",
"pageOrientation": "portrait",
"fitToPage": 1,
"paperColor": "white",
"customPaperColor": "#ffffff",
"alignment": "center",
"margin": "normal"
},
"disableContextMenu": false
}
@@ -0,0 +1,10 @@
"use strict";var obsidian_module=require("obsidian"),view=require("@codemirror/view"),commands=require("@codemirror/commands"),lr=require("@lezer/lr"),language=require("@codemirror/language"),state=require("@codemirror/state");;const INITIAL_TIMESTAMP=Date.now();var LZString=function(){var r=String.fromCharCode,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",e={};function t(r,o){if(!e[r]){e[r]={};for(var n=0;n<r.length;n++)e[r][r.charAt(n)]=n}return e[r][o]}var i={compressToBase64:function(r){if(null==r)return"";var n=i._compress(r,6,function(r){return o.charAt(r)});switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},decompressFromBase64:function(r){return null==r?"":""==r?null:i._decompress(r.length,32,function(n){return t(o,r.charAt(n))})},compressToUTF16:function(o){return null==o?"":i._compress(o,15,function(o){return r(o+32)})+" "},decompressFromUTF16:function(r){return null==r?"":""==r?null:i._decompress(r.length,16384,function(o){return r.charCodeAt(o)-32})},compressToUint8Array:function(r){for(var o=i.compress(r),n=new Uint8Array(2*o.length),e=0,t=o.length;e<t;e++){var s=o.charCodeAt(e);n[2*e]=s>>>8,n[2*e+1]=s%256}return n},decompressFromUint8Array:function(o){if(null==o)return i.decompress(o);for(var n=new Array(o.length/2),e=0,t=n.length;e<t;e++)n[e]=256*o[2*e]+o[2*e+1];var s=[];return n.forEach(function(o){s.push(r(o))}),i.decompress(s.join(""))},compressToEncodedURIComponent:function(r){return null==r?"":i._compress(r,6,function(r){return n.charAt(r)})},decompressFromEncodedURIComponent:function(r){return null==r?"":""==r?null:(r=r.replace(/ /g,"+"),i._decompress(r.length,32,function(o){return t(n,r.charAt(o))}))},compress:function(o){return i._compress(o,16,function(o){return r(o)})},_compress:function(r,o,n){if(null==r)return"";var e,t,i,s={},u={},a="",p="",c="",l=2,f=3,h=2,d=[],m=0,v=0;for(i=0;i<r.length;i+=1)if(a=r.charAt(i),Object.prototype.hasOwnProperty.call(s,a)||(s[a]=f++,u[a]=!0),p=c+a,Object.prototype.hasOwnProperty.call(s,p))c=p;else{if(Object.prototype.hasOwnProperty.call(u,c)){if(c.charCodeAt(0)<256){for(e=0;e<h;e++)m<<=1,v==o-1?(v=0,d.push(n(m)),m=0):v++;for(t=c.charCodeAt(0),e=0;e<8;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;e<h;e++)m=m<<1|t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=c.charCodeAt(0),e=0;e<16;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[c]}else for(t=s[c],e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;0==--l&&(l=Math.pow(2,h),h++),s[p]=f++,c=String(a)}if(""!==c){if(Object.prototype.hasOwnProperty.call(u,c)){if(c.charCodeAt(0)<256){for(e=0;e<h;e++)m<<=1,v==o-1?(v=0,d.push(n(m)),m=0):v++;for(t=c.charCodeAt(0),e=0;e<8;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;e<h;e++)m=m<<1|t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=c.charCodeAt(0),e=0;e<16;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[c]}else for(t=s[c],e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;0==--l&&(l=Math.pow(2,h),h++)}for(t=2,e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;for(;;){if(m<<=1,v==o-1){d.push(n(m));break}v++}return d.join("")},decompress:function(r){return null==r?"":""==r?null:i._decompress(r.length,32768,function(o){return r.charCodeAt(o)})},_decompress:function(o,n,e){var t,i,s,u,a,p,c,l=[],f=4,h=4,d=3,m="",v=[],g={val:e(0),position:n,index:1};for(t=0;t<3;t+=1)l[t]=t;for(s=0,a=Math.pow(2,2),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;switch(s){case 0:for(s=0,a=Math.pow(2,8),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;c=r(s);break;case 1:for(s=0,a=Math.pow(2,16),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;c=r(s);break;case 2:return""}for(l[3]=c,i=c,v.push(c);;){if(g.index>o)return"";for(s=0,a=Math.pow(2,d),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;switch(c=s){case 0:for(s=0,a=Math.pow(2,8),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;l[h++]=r(s),c=h-1,f--;break;case 1:for(s=0,a=Math.pow(2,16),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;l[h++]=r(s),c=h-1,f--;break;case 2:return v.join("")}if(0==f&&(f=Math.pow(2,d),d++),l[c])m=l[c];else{if(c!==h)return null;m=i+i.charAt(0)}v.push(m),l[h++]=i+m.charAt(0),i=m,0==--f&&(f=Math.pow(2,d),d++)}}};return i}();"function"==typeof define&&define.amd?define(function(){return LZString}):"undefined"!=typeof module&&null!=module?module.exports=LZString:"undefined"!=typeof angular&&null!=angular&&Line truncated
let REACT_PACKAGES = `!function(){var e,t;e=this,t=function(e){function M(e){return null!==e&&"object"==typeof e&&"function"==typeof(e=te&&e[te]||e["@@iterator"])?e:null}function t(e,t,n){this.props=e,this.context=t,this.refs=oe,this.updater=n||ne}function n(){}function r(e,t,n){this.props=e,this.context=t,this.refs=oe,this.updater=n||ne}function o(e,t,n){var r,o={},u=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(u=""+t.key),t)ae.call(t,r)&&!ie.hasOwnProperty(r)&&(o[r]=t[r]);var i=arguments.length-2;if(1===i)o.children=n;else if(1<i){for(var l=Array(i),c=0;c<i;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(r in i=e.defaultProps)void 0===o[r]&&(o[r]=i[r]);return{$$typeof:g,type:e,key:u,ref:a,props:o,_owner:w.current}}function D(e,t){return{$$typeof:g,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function c(e){return"object"==typeof e&&null!==e&&e.$$typeof===g}function U(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}function f(e,t){return"object"==typeof e&&null!==e&&null!=e.key?U(""+e.key):t.toString(36)}function s(e,t,n,r,o){var u=!1;if(null===(e="undefined"!==(i=typeof e)&&"boolean"!==i?e:null))u=!0;else switch(i){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case g:case H:u=!0}}if(u)return o=o(u=e),e=""===r?"."+f(u,0):r,ue(o)?(n="",s(o,t,n=null!=e?e.replace(le,"$&/")+"/":n,"",function(e){return e})):null!=o&&(c(o)&&(o=D(o,n+(!o.key||u&&u.key===o.key?"":(""+o.key).replace(le,"$&/")+"/")+e)),t.push(o)),1;if(u=0,r=""===r?".":r+":",ue(e))for(var a=0;a<e.length;a++){var i,l=r+f(i=e[a],a);u+=s(i,t,n,l,o)}else if("function"==typeof(l=M(e)))for(e=l.call(e),a=0;!(i=e.next()).done;)u+=s(i=i.value,t,n,l=r+f(i,a++),o);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return u}function u(e,t,n){var r;return null==e||(r=0,s(e,e=[],"","",function(e){return t.call(n,e,r++)})),e}function V(t){var e;if(-1===t._status&&((e=(e=t._result)()).then(function(e){0!==t._status&&-1!==t._status||(t._status=1,t._result=e)},function(e){0!==t._status&&-1!==t._status||(t._status=2,t._result=e)}),-1===t._status)&&(t._status=0,t._result=e),1===t._status)return t._result.default;throw t._result}function a(e,t){var n=e.length;for(e.push(t);0<n;){var r=n-1>>>1,o=e[r];if(!(0<p(o,t)))break;e[r]=t,e[n]=o,n=r}}function i(e){return 0===e.length?null:e[0]}function l(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;for(var r=0,o=e.length,u=o>>>1;r<u;){var a=2*(r+1)-1,i=e[a],l=a+1,c=e[l];if(p(i,n)<0)r=l<o&&p(c,i)<0?(e[r]=c,e[l]=n,l):(e[r]=i,e[a]=n,a);else{if(!(l<o&&p(c,n)<0))break;e[r]=c,e[l]=n,r=l}}}return t}function p(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}function y(e){for(var t=i(E);null!==t;){if(null===t.callback)l(E);else{if(!(t.startTime<=e))break;l(E),t.sortIndex=t.expirationTime,a(C,t)}t=i(E)}}function d(e){var t;j=!1,y(e),I||(null!==i(C)?(I=!0,m(b)):null!==(t=i(E))&&_(d,t.startTime-e))}function b(e,t){I=!1,j&&(j=!1,se(L),L=-1),$=!0;var n=P;try{for(y(t),R=i(C);null!==R&&(!(R.expirationTime>t)||e&&!q());){var r,o=R.callback;"function"==typeof o?(R.callback=null,P=R.priorityLevel,r=o(R.expirationTime<=t),t=v(),"function"==typeof r?R.callback=r:R===i(C)&&l(C),y(t)):l(C),R=i(C)}var u,a=null!==R||(null!==(u=i(E))&&_(d,u.startTime-t),!1);return a}finally{R=null,P=n,$=!1}}function q(){return!(v()-de<ye)}function m(e){O=e,T||(T=!0,be())}function _(e,t){L=fe(function(){e(v())},t)}function A(e){throw Error("act(...) is not supported in production builds of React.")}var N,h,B,v,z,g=Symbol.for("react.element"),H=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),J=Symbol.for("react.provider"),K=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),Z=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),te=Symbol.iterator,ne={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){},enqueueReplaceState:function(e,t,n,r){},enqueueSetState:function(e,t,n,r){}},re=Object.assign,oe={},k=(t.prototype.isReactComponent={},t.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},t.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},n.prototype=t.prototype,r.prototype=new n),ue=(k.constructor=r,re(k,t.prototype),k.isPureReactComponent=!0,Array.isArray),ae=Object.prototype.hasOwnProperty,w={current:null},ie={key:!0,ref:!0,__self:!0,__source:!0},le=/\\/+/g,S={current:null},x={transition:null},C=(v="object"==typeof performance&&"function"==typeof p Line truncated
const unpackExcalidraw = () => LZString.decompressFromBase64("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 truncated
let {react, reactDOM } = new Function(`${REACT_PACKAGES}; return {react: React, reactDOM: ReactDOM};`)();
let excalidrawLib = {};
const loadMathjaxToSVG = () => new Function(`${LZString.decompressFromBase64("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 truncated
const PLUGIN_LANGUAGES = {"ru": "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 truncated
const PLUGIN_VERSION="2.20.0";function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(i){if("default"!==i){var a=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,a.get?a:{enumerable:!0,get:function(){return e[i]}})}})),t.default=e,Object.freeze(t)}var obsidian_module__namespace=_interopNamespace(obsidian_module),React__namespace=_interopNamespace(React);let random$3=e=>crypto.getRandomValues(new Uint8Array(e)),customRandom=(e,t,i)=>{let a=(2<<Math.log(e.length-1)/Math.LN2)-1,n=-~(1.6*a*t/e.length);return(r=t)=>{let s="";for(;;){let t=i(n),o=n;for(;o--;)if(s+=e[t[o]&a]||"",s.length===r)return s}}},customAlphabet=(e,t=21)=>customRandom(e,t,random$3),nanoid$1=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),"");const durationTreshold=0;function setDebugging(e){DEBUGGING=!1}let DEBUGGING=!1;const log$2=console.log.bind(window.console),debug=(e,t,...i)=>{console.log(t,...i)};class CustomMutationObserver{originalCallback;observer;name;constructor(e,t){this.originalCallback=e,this.observer=null,this.name=t}observe(e,t){this.observer=new MutationObserver((async(e,t)=>{const i=performance.now();await this.originalCallback(e,t);const a=performance.now()-i;a>durationTreshold&&console.log(`Excalidraw ${this.name} MutationObserver callback took ${a}ms to execute`,t)})),this.observer.observe(e,t)}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null)}}class ErrorHandler{static instance;errorLog=[];errorNoticeTimeout=1e4;maxLogEntries=100;constructor(){}static getInstance(){return ErrorHandler.instance||(ErrorHandler.instance=new ErrorHandler),ErrorHandler.instance}handleError(e,t,i=!0,a){const n="string"==typeof e?new Error(e):e;if(console.error(`[Excalidraw Error] in ${t}:`,n),this.errorLog.push({error:n,context:t,timestamp:Date.now()}),this.errorLog.length>this.maxLogEntries&&(this.errorLog=this.errorLog.slice(this.errorLog.length-this.maxLogEntries)),i){const e=this.formatErrorForUser(n,t);new obsidian_module.Notice(e,a||this.errorNoticeTimeout)}}safeEval(e,t,i,a){try{return i.eval.call(i,e)}catch(e){if(this.handleError(e,`SafeEval in ${t}`),void 0!==a)return a;throw e}}wrapWithTryCatch(e,t,i){try{return e()}catch(e){if(this.handleError(e,t),void 0!==i)return i;throw e}}formatErrorForUser(e,t){let i=e.message;return i.includes("Cannot read properties of undefined")?i="A required object was not available. This might be due to a plugin loading issue.":i.includes("is not a function")?i="A required function was not available. This might be due to a plugin version mismatch.":i.length>100&&(i=i.substring(0,100)+"..."),`Excalidraw Error: ${i} (in ${t})`}getErrorLog(){return[...this.errorLog]}clearErrorLog(){this.errorLog=[]}}const errorHandler=ErrorHandler.getInstance();let EXCALIDRAW_PLUGIN=null;const setExcalidrawPlugin=e=>{EXCALIDRAW_PLUGIN=e},THEME={LIGHT:"light",DARK:"dark"},MD_EXCALIDRAW="# Excalidraw Data",MD_TEXTELEMENTS="## Text Elements",MD_ELEMENTLINKS="## Element Links",MD_EMBEDFILES="## Embedded Files",MD_DRAWING="## Drawing",MD_EX_SECTIONS=[MD_EXCALIDRAW,MD_TEXTELEMENTS,MD_ELEMENTLINKS,MD_EMBEDFILES,MD_DRAWING],ERROR_IFRAME_CONVERSION_CANCELED="iframe conversion canceled",LOCALE=localStorage.getItem("language")?.toLowerCase()||"en",CJK_FONTS="CJK Fonts",obsidianToExcalidrawMap={en:"en-US",af:"af-ZA",am:"am-ET",ar:"ar-SA",eu:"eu-ES",be:"be-BY",bg:"bg-BG",bn:"bn-BD",ca:"ca-ES",cs:"cs-CZ",da:"da-DK",de:"de-DE",el:"el-GR",eo:"eo-EO",es:"es-ES",fa:"fa-IR","fi-fi":"fi-FI",fr:"fr-FR",gl:"gl-ES",he:"he-IL",hi:"hi-IN",hu:"hu-HU",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",lv:"lv-LV",ml:"ml-IN",ms:"ms-MY",nl:"nl-NL",no:"nb-NO",oc:"oc-FR",pl:"pl-PL",pt:"pt-PT","pt-BR":"pt-BR",ro:"ro-RO",ru:"ru-RU",sr:"sr-RS",se:"sv-SE",sk:"sk-SK",sq:"sq-AL",ta:"ta-IN",te:"te-IN",th:"th-TH",tr:"tr-TR",uk:"uk-UA",ur:"ur-PK",vi:"vi-VN",zh:"zh-CN","zh-tw":"zh-TW"};let{sceneCoordsToViewportCoords:sceneCoordsToViewportCoords,viewportCoordsToSceneCoords:viewportCoordsToSceneCoords,intersectElementWithLine:intersectElementWithLine,getCommonBoundingBox:getCommonBoundingBox,getMaximumGroups:getMaximumGroups,measureText:measureText,getLineHeight:getLineHeight,wrapText:wrapText,getFontString:getFontString,getBoundTextMaxWidth:getBoundTextMaxWidth,exportToSvg:exportToSvg,exportToBlob:exportToBlob,mutateElement:mutateElement,restoreElements:restoreElements,mermaidToExcalidraw:mermaidToExcalidraw,getFontFamilyString:getFontFamilyString,getContainerElement:getContainerElement,refreshTextDimensions:refreshTextDimensions,getCSSFontDefinition:getCSSFontDefinition,loadSceneFonts:loadSceneFonts,loadMermaid:loadMermaid,syncInvalidIndices:syncInvalidIndices,getDefaultColorPalette:getDefaultColorPalette}=excalidrawLib;function updateExcalidrawLib(){try{if(!excalidrawLib)throw new Error("excalidrawLib is undefined");const e=["sceneCoordsToViewportCoords","viewpLine truncated
/* nosourcemap */
@@ -0,0 +1,12 @@
{
"id": "obsidian-excalidraw-plugin",
"name": "Excalidraw",
"version": "2.20.0",
"minAppVersion": "1.5.7",
"description": "Sketch Your Mind. An Obsidian plugin to edit and view Excalidraw drawings. Enter the world of 4D Visual PKM.",
"author": "Zsolt Viczian",
"authorUrl": "https://excalidraw-obsidian.online",
"fundingUrl": "https://ko-fi.com/zsolt",
"helpUrl": "https://github.com/zsviczian/obsidian-excalidraw-plugin#readme",
"isDesktopOnly": false
}
@@ -0,0 +1 @@
@font-face{font-family:Assistant;font-weight:400;src:url(https://unpkg.com/@zsviczian/excalidraw@0.17.6-2/dist/excalidraw-assets/Assistant-Regular.woff2) format("woff2");style:normal;display:swap}@font-face{font-family:Assistant;font-weight:500;src:url(https://unpkg.com/@zsviczian/excalidraw@0.17.6-2/dist/excalidraw-assets/Assistant-Medium.woff2) format("woff2");style:normal;display:swap}@font-face{font-family:Assistant;font-weight:600;src:url(https://unpkg.com/@zsviczian/excalidraw@0.17.6-2/dist/excalidraw-assets/Assistant-SemiBold.woff2) format("woff2");style:normal;display:swap}@font-face{font-family:Assistant;font-weight:700;src:url(https://unpkg.com/@zsviczian/excalidraw@0.17.6-2/dist/excalidraw-assets/Assistant-Bold.woff2) format("woff2");style:normal;display:swap}.excalidraw .ToolIcon{align-items:center;border-radius:var(--border-radius-lg);cursor:pointer;display:inline-flex;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;user-select:none}.excalidraw .ToolIcon__hidden{display:none!important}.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked+.ToolIcon__icon,.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked+.ToolIcon__icon{--icon-fill-color:var(--color-on-primary-container)}.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked+.ToolIcon__icon svg,.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked+.ToolIcon__icon svg{fill:var(--icon-fill-color)}.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon,.excalidraw .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon{background:var(--color-surface-primary-container);--keybinding-color:var(--color-on-primary-container);--icon-fill-color:var(--color-on-primary-container)}.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon svg,.excalidraw .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon svg{color:var(--color-on-primary-container)}.excalidraw .ToolIcon .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .ToolIcon .ToolIcon__icon:hover{background:var(--button-hover-bg)}.excalidraw .ToolIcon .ToolIcon__icon:active{background:var(--button-hover-bg);border:1px solid var(--button-active-border)}.excalidraw .ToolIcon .ToolIcon__icon:active svg{color:var(--color-on-primary-container)}.excalidraw .ToolIcon .ToolIcon__icon[aria-disabled=true]{background:initial;border:none}.excalidraw .ToolIcon .ToolIcon__icon[aria-disabled=true] svg{color:var(--color-disabled)}.excalidraw .ToolIcon--plain{background-color:transparent}.excalidraw .ToolIcon--plain .ToolIcon__icon{height:2rem;width:2rem}.excalidraw .ToolIcon_type_checkbox,.excalidraw .ToolIcon_type_radio{opacity:0;pointer-events:none;position:absolute}.excalidraw .ToolIcon__icon{align-items:center;border-radius:var(--border-radius-lg);box-sizing:border-box;color:var(--icon-fill-color);display:flex;height:var(--default-button-size);justify-content:center;width:var(--default-button-size)}.excalidraw .ToolIcon__icon+.ToolIcon__label{margin-inline-start:0}.excalidraw .ToolIcon__icon svg{color:var(--icon-fill-color);height:var(--default-icon-size);position:relative;width:var(--default-icon-size)}.excalidraw .ToolIcon__label{align-items:center;color:var(--icon-fill-color);display:flex;font-family:var(--ui-font);margin:0 .8em;text-overflow:ellipsis}.excalidraw .ToolIcon__label .Spinner{margin-left:.6em}.excalidraw .ToolIcon_size_small .ToolIcon__icon{font-size:.8em;height:2rem;width:2rem}.excalidraw .Modal .ToolIcon_type_button,.excalidraw .ToolIcon_type_button{background-color:initial;border:none;font-size:inherit;margin:0;padding:0}.excalidraw .Modal .ToolIcon_type_button:focus-visible,.excalidraw .ToolIcon_type_button:focus-visible{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected,.excalidraw .ToolIcon_type_button.ToolIcon--selected{background-color:var(--button-gray-2)}.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .Modal .ToolIcon_type_button:active,.excalidraw .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .ToolIcon_type_button:active{background-color:var(--button-gray-3)}.excalidraw .Modal .ToolIcon_type_button:disabled,.excalidraw .ToolIcon_type_button:disabled{cursor:default}.excalidraw .Modal .ToolIcon_type_button:disabled:active,.excalidraw .Modal .ToolIcon_type_button:disabled:focus-visible,.excalidraw .Modal .ToolIcon_type_button:disabled:hover,.excalidraw .ToolIcon_type_button:disabled:active,.excalidraw .ToolIcon_type_button:disabled:focus-visible,.excalidraw .ToolIcon_type_button:disabled:hover{background-color:initial;border:none;box-shadow:none}.excalidraw .Modal .ToolIcon_type_button:disabled svg,.excalidraw .ToolIcon_type_button:disabled svg{color:var(--color-disabled)}.excalidraw .Modal .ToolIcon_type_button--show,.excalidraw .ToolIcon_type_button--show{visibility:visible}.excalidraw .Modal .ToolIcon_type_button--hide,.excalidraw .ToolIcon_type_button--hide{display:none!important}.excalLine truncated
@@ -1,62 +0,0 @@
{
"commitMessage": "vault backup: {{date}}",
"autoCommitMessage": "vault backup: {{date}}",
"commitMessageScript": "",
"commitDateFormat": "YYYY-MM-DD HH:mm:ss",
"autoSaveInterval": 1,
"autoPushInterval": 1,
"autoPullInterval": 1,
"autoPullOnBoot": false,
"autoCommitOnlyStaged": false,
"disablePush": false,
"pullBeforePush": true,
"disablePopups": false,
"showErrorNotices": true,
"disablePopupsForNoChanges": false,
"listChangedFilesInMessageBody": false,
"showStatusBar": true,
"updateSubmodules": false,
"syncMethod": "merge",
"customMessageOnAutoBackup": false,
"autoBackupAfterFileChange": true,
"treeStructure": false,
"refreshSourceControl": false,
"basePath": "",
"differentIntervalCommitAndPush": false,
"changedFilesInStatusBar": false,
"showedMobileNotice": true,
"refreshSourceControlTimer": 7000,
"showBranchStatusBar": true,
"setLastSaveToLastCommit": false,
"submoduleRecurseCheckout": false,
"gitDir": "",
"showFileMenu": true,
"authorInHistoryView": "hide",
"dateInHistoryView": false,
"diffStyle": "split",
"lineAuthor": {
"show": false,
"followMovement": "inactive",
"authorDisplay": "initials",
"showCommitHash": false,
"dateTimeFormatOptions": "date",
"dateTimeFormatCustomString": "YYYY-MM-DD HH:mm",
"dateTimeTimezone": "viewer-local",
"coloringMaxAge": "1y",
"colorNew": {
"r": 255,
"g": 150,
"b": 150
},
"colorOld": {
"r": 120,
"g": 160,
"b": 255
},
"textColorCss": "var(--text-muted)",
"ignoreWhitespace": false,
"gutterSpacingFallbackLength": 5,
"lastShownAuthorDisplay": "initials",
"lastShownDateTimeFormatOptions": "date"
}
}
-442
View File
@@ -1,442 +0,0 @@
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source visit the plugins github repository (https://github.com/denolehov/obsidian-git)
*/
var zM=Object.create;var Rl=Object.defineProperty;var VM=Object.getOwnPropertyDescriptor;var WM=Object.getOwnPropertyNames;var YM=Object.getPrototypeOf,XM=Object.prototype.hasOwnProperty;var Jy=t=>{throw TypeError(t)};var ZM=(t,e,r)=>e in t?Rl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var KM=(t,e)=>()=>(t&&(e=t(t=0)),e);var I=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),JM=(t,e)=>{for(var r in e)Rl(t,r,{get:e[r],enumerable:!0})},Qy=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of WM(e))!XM.call(t,i)&&i!==r&&Rl(t,i,{get:()=>e[i],enumerable:!(n=VM(e,i))||n.enumerable});return t};var bt=(t,e,r)=>(r=t!=null?zM(YM(t)):{},Qy(e||!t||!t.__esModule?Rl(r,"default",{value:t,enumerable:!0}):r,t)),QM=t=>Qy(Rl({},"__esModule",{value:!0}),t);var vt=(t,e,r)=>ZM(t,typeof e!="symbol"?e+"":e,r),Gp=(t,e,r)=>e.has(t)||Jy("Cannot "+r);var le=(t,e,r)=>(Gp(t,e,"read from private field"),r?r.call(t):e.get(t)),wt=(t,e,r)=>e.has(t)?Jy("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),Ot=(t,e,r,n)=>(Gp(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),vi=(t,e,r)=>(Gp(t,e,"access private method"),r);var rb=I(Wu=>{"use strict";p();Wu.byteLength=tD;Wu.toByteArray=nD;Wu.fromByteArray=sD;var Dn=[],Yr=[],eD=typeof Uint8Array!="undefined"?Uint8Array:Array,qp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(La=0,eb=qp.length;La<eb;++La)Dn[La]=qp[La],Yr[qp.charCodeAt(La)]=La;var La,eb;Yr[45]=62;Yr[95]=63;function tb(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function tD(t){var e=tb(t),r=e[0],n=e[1];return(r+n)*3/4-n}function rD(t,e,r){return(e+r)*3/4-r}function nD(t){var e,r=tb(t),n=r[0],i=r[1],a=new eD(rD(t,n,i)),s=0,o=i>0?n-4:n,l;for(l=0;l<o;l+=4)e=Yr[t.charCodeAt(l)]<<18|Yr[t.charCodeAt(l+1)]<<12|Yr[t.charCodeAt(l+2)]<<6|Yr[t.charCodeAt(l+3)],a[s++]=e>>16&255,a[s++]=e>>8&255,a[s++]=e&255;return i===2&&(e=Yr[t.charCodeAt(l)]<<2|Yr[t.charCodeAt(l+1)]>>4,a[s++]=e&255),i===1&&(e=Yr[t.charCodeAt(l)]<<10|Yr[t.charCodeAt(l+1)]<<4|Yr[t.charCodeAt(l+2)]>>2,a[s++]=e>>8&255,a[s++]=e&255),a}function iD(t){return Dn[t>>18&63]+Dn[t>>12&63]+Dn[t>>6&63]+Dn[t&63]}function aD(t,e,r){for(var n,i=[],a=e;a<r;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(t[a+2]&255),i.push(iD(n));return i.join("")}function sD(t){for(var e,r=t.length,n=r%3,i=[],a=16383,s=0,o=r-n;s<o;s+=a)i.push(aD(t,s,s+a>o?o:s+a));return n===1?(e=t[r-1],i.push(Dn[e>>2]+Dn[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Dn[e>>10]+Dn[e>>4&63]+Dn[e<<2&63]+"=")),i.join("")}});var nb=I(zp=>{p();zp.read=function(t,e,r,n,i){var a,s,o=i*8-n-1,l=(1<<o)-1,u=l>>1,c=-7,f=r?i-1:0,d=r?-1:1,h=t[e+f];for(f+=d,a=h&(1<<-c)-1,h>>=-c,c+=o;c>0;a=a*256+t[e+f],f+=d,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=n;c>0;s=s*256+t[e+f],f+=d,c-=8);if(a===0)a=1-u;else{if(a===l)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-u}return(h?-1:1)*s*Math.pow(2,a-n)};zp.write=function(t,e,r,n,i,a){var s,o,l,u=a*8-i-1,c=(1<<u)-1,f=c>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,m=n?1:-1,g=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+f>=1?e+=d/l:e+=d*Math.pow(2,1-f),e*l>=2&&(s++,l/=2),s+f>=c?(o=0,s=c):s+f>=1?(o=(e*l-1)*Math.pow(2,i),s=s+f):(o=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+h]=o&255,h+=m,o/=256,i-=8);for(s=s<<i|o,u+=i;u>0;t[r+h]=s&255,h+=m,s/=256,u-=8);t[r+h-m]|=g*128}});var em=I(Ws=>{"use strict";p();var Vp=rb(),zs=nb(),ib=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ws.Buffer=$;Ws.SlowBuffer=dD;Ws.INSPECT_MAX_BYTES=50;var Yu=2147483647;Ws.kMaxLength=Yu;$.TYPED_ARRAY_SUPPORT=oD();!$.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function oD(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch(t){return!1}}Object.defineProperty($.prototype,"parent",{enumerable:!0,get:function(){if($.isBuffer(this))return this.buffer}});Object.defineProperty($.prototype,"offset",{enumerable:!0,get:function(){if($.isBuffer(this))return this.byteOffset}});function wi(t){if(t>Yu)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,$.prototype),e}function $(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Zp(t)}return lb(t,e,r)}$.poolSize=8192;function lb(t,e,r){if(typeof t=="string")return cD(t,e);if(ArrayBuffer.isView(t))return uD(t);if(t==null)throw new TypeError(Line truncated
`)}static async _entryToBuffer(e){let r=Buffer.from(e.path),n=Math.ceil((62+r.length+1)/8)*8,i=Buffer.alloc(n),a=new Jr(i),s=mo(e);return a.writeUInt32BE(s.ctimeSeconds),a.writeUInt32BE(s.ctimeNanoseconds),a.writeUInt32BE(s.mtimeSeconds),a.writeUInt32BE(s.mtimeNanoseconds),a.writeUInt32BE(s.dev),a.writeUInt32BE(s.ino),a.writeUInt32BE(s.mode),a.writeUInt32BE(s.uid),a.writeUInt32BE(s.gid),a.writeUInt32BE(s.size),a.write(e.oid,20,"hex"),a.writeUInt16BE(YH(e)),a.write(e.path,r.length,"utf8"),i}async toObject(){let e=Buffer.alloc(12),r=new Jr(e);r.write("DIRC",4,"utf8"),r.writeUInt32BE(2),r.writeUInt32BE(this.entriesFlat.length);let n=[];for(let o of this.entries)if(n.push(t._entryToBuffer(o)),o.stages.length>1)for(let l of o.stages)l&&l!==o&&n.push(t._entryToBuffer(l));n=await Promise.all(n);let i=Buffer.concat(n),a=Buffer.concat([e,i]),s=await ki(a);return Buffer.concat([a,Buffer.from(s,"hex")])}};function Uf(t,e,r=!0,n=!0){let i=mo(t),a=mo(e);return r&&i.mode!==a.mode||i.mtimeSeconds!==a.mtimeSeconds||i.ctimeSeconds!==a.ctimeSeconds||i.uid!==a.uid||i.gid!==a.gid||n&&i.ino!==a.ino||i.size!==a.size}var ug=null,fg=Symbol("IndexCache");function XH(){return{map:new Map,stats:new Map}}async function ZH(t,e,r){let[n,i]=await Promise.all([t.lstat(e),t.read(e)]),a=await _g.from(i);r.map.set(e,a),r.stats.set(e,n)}async function KH(t,e,r){let n=r.stats.get(e);if(n===void 0)return!0;if(n===null)return!1;let i=await t.lstat(e);return i===null?!1:Uf(n,i)}var ct=class{static async acquire({fs:e,gitdir:r,cache:n,allowUnmerged:i=!0},a){n[fg]||(n[fg]=XH());let s=`${r}/index`;ug===null&&(ug=new tc({maxPending:1/0}));let o,l=[];return await ug.acquire(s,async()=>{let u=n[fg];await KH(e,s,u)&&await ZH(e,s,u);let c=u.map.get(s);if(l=c.unmergedPaths,l.length&&!i)throw new rc(l);if(o=await a(c),c._dirty){let f=await c.toObject();await e.write(s,f),u.stats.set(s,await e.lstat(s)),c._dirty=!1}}),o}};function jf(t){let e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return e>-1&&(t=t.slice(e+1)),t}function go(t){let e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return e===-1?".":e===0?"/":t.slice(0,e)}function hE(t){let e=new Map,r=function(i){if(!e.has(i)){let a={type:"tree",fullpath:i,basename:jf(i),metadata:{},children:[]};e.set(i,a),a.parent=r(go(i)),a.parent&&a.parent!==a&&a.parent.children.push(a)}return e.get(i)},n=function(i,a){if(!e.has(i)){let s={type:"blob",fullpath:i,basename:jf(i),metadata:a,parent:r(go(i)),children:[]};s.parent&&s.parent.children.push(s),e.set(i,s)}return e.get(i)};r(".");for(let i of t)n(i.path,i);return e}function JH(t){switch(t){case 16384:return"tree";case 33188:return"blob";case 33261:return"blob";case 40960:return"blob";case 57344:return"commit"}throw new de(`Unexpected GitTree entry mode: ${t.toString(8)}`)}var xg=class{constructor({fs:e,gitdir:r,cache:n}){this.treePromise=ct.acquire({fs:e,gitdir:r,cache:n},async function(a){return hE(a.entries)});let i=this;this.ConstructEntry=class{constructor(s){this._fullpath=s,this._type=!1,this._mode=!1,this._stat=!1,this._oid=!1}async type(){return i.type(this)}async mode(){return i.mode(this)}async stat(){return i.stat(this)}async content(){return i.content(this)}async oid(){return i.oid(this)}}}async readdir(e){let r=e._fullpath,i=(await this.treePromise).get(r);if(!i||i.type==="blob")return null;if(i.type!=="tree")throw new Error(`ENOTDIR: not a directory, scandir '${r}'`);let a=i.children.map(s=>s.fullpath);return a.sort(Kf),a}async type(e){return e._type===!1&&await e.stat(),e._type}async mode(e){return e._mode===!1&&await e.stat(),e._mode}async stat(e){if(e._stat===!1){let n=(await this.treePromise).get(e._fullpath);if(!n)throw new Error(`ENOENT: no such file or directory, lstat '${e._fullpath}'`);let i=n.type==="tree"?{}:mo(n.metadata);e._type=n.type==="tree"?"tree":JH(i.mode),e._mode=i.mode,n.type==="tree"?e._stat=void 0:e._stat=i}return e._stat}async content(e){}async oid(e){if(e._oid===!1){let n=(await this.treePromise).get(e._fullpath);e._oid=n.metadata.oid}return e._oid}},Jf=Symbol("GitWalkSymbol");function ts(){let t=Object.create(null);return Object.defineProperty(t,Jf,{value:function({fs:e,gitdir:r,cache:n}){return new xg({fs:e,gitdir:r,cache:n})}}),Object.freeze(t),t}var Le=class t extends Ae{constructor(e){super(`Could not find ${e}.`),this.code=this.name=t.code,this.data={what:e}}};Le.code="NotFoundError";var rr=class t extends Ae{constructor(e,r,n,i){super(`Object ${e} ${i?`at ${i}`:""}was anticipated to be a ${n} but it is a ${r}.`),this.code=this.name=t.code,this.data={oid:e,actual:r,expected:n,filepath:i}}};rr.code="ObjectTypeError";var oa=class t extends Ae{constructor(e){super(`Expected a 40-char hex object id but saw "${e}".`),this.code=this.name=t.code,this.data={value:e}}};oa.code="InvalidOidError";var nc=class t extends Ae{constructor(e){super(`Could not find a fetch refspec for remote "${e}". Make sure the config file has an entry like the following:
[remote "${e}"]
fetch = +refs/heads/*:refs/remotes/origin/*
`),this.code=this.name=t.code,this.data={remote:e}}};nc.code="NoRefspecError";var Gf=class t{constructor(e){if(this.refs=new Map,this.parsedConfig=[],e){let r=null;this.parsedConfig=e.trim().split(`
`).map(n=>{if(/^\s*#/.test(n))return{line:n,comment:!0};let i=n.indexOf(" ");if(n.startsWith("^")){let a=n.slice(1);return this.refs.set(r+"^{}",a),{line:n,ref:r,peeled:a}}else{let a=n.slice(0,i);return r=n.slice(i+1),this.refs.set(r,a),{line:n,ref:r,oid:a}}})}return this}static from(e){return new t(e)}delete(e){this.parsedConfig=this.parsedConfig.filter(r=>r.ref!==e),this.refs.delete(e)}toString(){return this.parsedConfig.map(({line:e})=>e).join(`
`)+`
`}},qf=class t{constructor({remotePath:e,localPath:r,force:n,matchPrefix:i}){Object.assign(this,{remotePath:e,localPath:r,force:n,matchPrefix:i})}static from(e){let[r,n,i,a,s]=e.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1),o=r==="+",l=i==="*";if(l!==(s==="*"))throw new de("Invalid refspec");return new t({remotePath:n,localPath:a,force:o,matchPrefix:l})}translate(e){if(this.matchPrefix){if(e.startsWith(this.remotePath))return this.localPath+e.replace(this.remotePath,"")}else if(e===this.remotePath)return this.localPath;return null}reverseTranslate(e){if(this.matchPrefix){if(e.startsWith(this.localPath))return this.remotePath+e.replace(this.localPath,"")}else if(e===this.localPath)return this.remotePath;return null}},Sg=class t{constructor(e=[]){this.rules=e}static from(e){let r=[];for(let n of e)r.push(qf.from(n));return new t(r)}add(e){let r=qf.from(e);this.rules.push(r)}translate(e){let r=[];for(let n of this.rules)for(let i of e){let a=n.translate(i);a&&r.push([i,a])}return r}translateOne(e){let r=null;for(let n of this.rules){let i=n.translate(e);i&&(r=i)}return r}localNamespaces(){return this.rules.filter(e=>e.matchPrefix).map(e=>e.localPath.replace(/\/$/,""))}};function QH(t,e){let r=t.replace(/\^\{\}$/,""),n=e.replace(/\^\{\}$/,""),i=-(r<n)||+(r>n);return i===0?t.endsWith("^{}")?1:-1:i}var e3=t=>{if(typeof t=="number")return t;t=t.toLowerCase();let e=parseInt(t);return t.endsWith("k")&&(e*=1024),t.endsWith("m")&&(e*=1024*1024),t.endsWith("g")&&(e*=1024*1024*1024),e},ec=t=>{if(typeof t=="boolean")return t;if(t=t.trim().toLowerCase(),t==="true"||t==="yes"||t==="on")return!0;if(t==="false"||t==="no"||t==="off")return!1;throw Error(`Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${t}`)},jS={core:{filemode:ec,bare:ec,logallrefupdates:ec,symlinks:ec,ignorecase:ec,bigFileThreshold:e3}},t3=/^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/,r3=/^[A-Za-z0-9-.]+$/,n3=/^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/,i3=/^[A-Za-z][A-Za-z-]*$/,a3=/^(.*?)( *[#;].*)$/,s3=t=>{let e=t3.exec(t);if(e!=null){let[r,n]=e.slice(1);return[r,n]}return null},o3=t=>{let e=n3.exec(t);if(e!=null){let[r,n="true"]=e.slice(1),i=l3(n),a=c3(i);return[r,a]}return null},l3=t=>{let e=a3.exec(t);if(e==null)return t;let[r,n]=e.slice(1);return GS(r)&&GS(n)?`${r}${n}`:r},GS=t=>(t.match(/(?:^|[^\\])"/g)||[]).length%2!==0,c3=t=>t.split("").reduce((e,r,n,i)=>{let a=r==='"'&&i[n-1]!=="\\",s=r==="\\"&&i[n+1]==='"';return a||s?e:e+r},""),qS=t=>t!=null?t.toLowerCase():null,Eg=(t,e,r)=>[qS(t),e,qS(r)].filter(n=>n!=null).join("."),zS=t=>{let e=t.split("."),r=e.shift(),n=e.pop(),i=e.length?e.join("."):void 0;return{section:r,subsection:i,name:n,path:Eg(r,i,n),sectionPath:Eg(r,i,null),isSection:!!r}},u3=(t,e)=>t.reduce((r,n,i)=>e(n)?i:r,-1),kg=class t{constructor(e){let r=null,n=null;this.parsedConfig=e?e.split(`
`).map(i=>{let a=null,s=null,o=i.trim(),l=s3(o),u=l!=null;if(u)[r,n]=l;else{let f=o3(o);f!=null&&([a,s]=f)}let c=Eg(r,n,a);return{line:i,isSection:u,section:r,subsection:n,name:a,value:s,path:c}}):[]}static from(e){return new t(e)}async get(e,r=!1){let n=zS(e).path,i=this.parsedConfig.filter(a=>a.path===n).map(({section:a,name:s,value:o})=>{let l=jS[a]&&jS[a][s];return l?l(o):o});return r?i:i.pop()}async getall(e){return this.get(e,!0)}async getSubsections(e){return this.parsedConfig.filter(r=>r.isSection&&r.section===e).map(r=>r.subsection)}async deleteSection(e,r){this.parsedConfig=this.parsedConfig.filter(n=>!(n.section===e&&n.subsection===r))}async append(e,r){return this.set(e,r,!0)}async set(e,r,n=!1){let{section:i,subsection:a,name:s,path:o,sectionPath:l,isSection:u}=zS(e),c=u3(this.parsedConfig,f=>f.path===o);if(r==null)c!==-1&&this.parsedConfig.splice(c,1);else if(c!==-1){let f=this.parsedConfig[c],d=Object.assign({},f,{name:s,value:r,modified:!0});n?this.parsedConfig.splice(c+1,0,d):this.parsedConfig[c]=d}else{let f=this.parsedConfig.findIndex(h=>h.path===l),d={section:i,subsection:a,name:s,value:r,modified:!0,path:o};if(r3.test(i)&&i3.test(s))if(f>=0)this.parsedConfig.splice(f+1,0,d);else{let h={isSection:u,section:i,subsection:a,modified:!0,path:l};this.parsedConfig.push(h,d)}}}toString(){return this.parsedConfig.map(({line:e,section:r,subsection:n,name:i,value:a,modified:s=!1})=>s?i!=null&&a!=null?typeof a=="string"&&/[#;]/.test(a)?` ${i} = "${a}"`:` ${i} = ${a}`:n!=null?`[${r} "${n}"]`:`[${r}]`:e).join(`
`)}},nt=class{static async get({fs:e,gitdir:r}){let n=await e.read(`${r}/config`,{encoding:"utf8"});return kg.from(n)}static async save({fs:e,gitdir:r,config:n}){await e.write(`${r}/config`,n.toString(),{encoding:"utf8"})}},Bf=t=>[`${t}`,`refs/${t}`,`refs/tags/${t}`,`refs/heads/${t}`,`refs/remotes/${t}`,`refs/remotes/${t}/HEAD`],f3=["config","description","index","shallow","commondir"],dg;async function aa(t,e){return dg===void 0&&(dg=new tc),dg.acquire(t,e)}var z=class t{static async updateRemoteRefs({fs:e,gitdir:r,remote:n,refs:i,symrefs:a,tags:s,refspecs:o=void 0,prune:l=!1,pruneTags:u=!1}){for(let v of i.values())if(!v.match(/[0-9a-f]{40}/))throw new oa(v);let c=await nt.get({fs:e,gitdir:r});if(!o){if(o=await c.getall(`remote.${n}.fetch`),o.length===0)throw new nc(n);o.unshift(`+HEAD:refs/remotes/${n}/HEAD`)}let f=Sg.from(o),d=new Map;if(u){let v=await t.listRefs({fs:e,gitdir:r,filepath:"refs/tags"});await t.deleteRefs({fs:e,gitdir:r,refs:v.map(w=>`refs/tags/${w}`)})}if(s){for(let v of i.keys())if(v.startsWith("refs/tags")&&!v.endsWith("^{}")&&!await t.exists({fs:e,gitdir:r,ref:v})){let w=i.get(v);d.set(v,w)}}let h=f.translate([...i.keys()]);for(let[v,w]of h){let b=i.get(v);d.set(w,b)}let m=f.translate([...a.keys()]);for(let[v,w]of m){let b=a.get(v),E=f.translateOne(b);E&&d.set(w,`ref: ${E}`)}let g=[];if(l){for(let v of f.localNamespaces()){let w=(await t.listRefs({fs:e,gitdir:r,filepath:v})).map(b=>`${v}/${b}`);for(let b of w)d.has(b)||g.push(b)}g.length>0&&await t.deleteRefs({fs:e,gitdir:r,refs:g})}for(let[v,w]of d)await aa(v,async()=>e.write(O.join(r,v),`${w.trim()}
`,"utf8"));return{pruned:g}}static async writeRef({fs:e,gitdir:r,ref:n,value:i}){if(!i.match(/[0-9a-f]{40}/))throw new oa(i);await aa(n,async()=>e.write(O.join(r,n),`${i.trim()}
`,"utf8"))}static async writeSymbolicRef({fs:e,gitdir:r,ref:n,value:i}){await aa(n,async()=>e.write(O.join(r,n),`ref: ${i.trim()}
`,"utf8"))}static async deleteRef({fs:e,gitdir:r,ref:n}){return t.deleteRefs({fs:e,gitdir:r,refs:[n]})}static async deleteRefs({fs:e,gitdir:r,refs:n}){await Promise.all(n.map(o=>e.rm(O.join(r,o))));let i=await aa("packed-refs",async()=>e.read(`${r}/packed-refs`,{encoding:"utf8"})),a=Gf.from(i),s=a.refs.size;for(let o of n)a.refs.has(o)&&a.delete(o);a.refs.size<s&&(i=a.toString(),await aa("packed-refs",async()=>e.write(`${r}/packed-refs`,i,{encoding:"utf8"})))}static async resolve({fs:e,gitdir:r,ref:n,depth:i=void 0}){if(i!==void 0&&(i--,i===-1))return n;if(n.startsWith("ref: "))return n=n.slice(5),t.resolve({fs:e,gitdir:r,ref:n,depth:i});if(n.length===40&&/[0-9a-f]{40}/.test(n))return n;let a=await t.packedRefs({fs:e,gitdir:r}),s=Bf(n).filter(o=>!f3.includes(o));for(let o of s){let l=await aa(o,async()=>await e.read(`${r}/${o}`,{encoding:"utf8"})||a.get(o));if(l)return t.resolve({fs:e,gitdir:r,ref:l.trim(),depth:i})}throw new Le(n)}static async exists({fs:e,gitdir:r,ref:n}){try{return await t.expand({fs:e,gitdir:r,ref:n}),!0}catch(i){return!1}}static async expand({fs:e,gitdir:r,ref:n}){if(n.length===40&&/[0-9a-f]{40}/.test(n))return n;let i=await t.packedRefs({fs:e,gitdir:r}),a=Bf(n);for(let s of a)if(await aa(s,async()=>e.exists(`${r}/${s}`))||i.has(s))return s;throw new Le(n)}static async expandAgainstMap({ref:e,map:r}){let n=Bf(e);for(let i of n)if(await r.has(i))return i;throw new Le(e)}static resolveAgainstMap({ref:e,fullref:r=e,depth:n=void 0,map:i}){if(n!==void 0&&(n--,n===-1))return{fullref:r,oid:e};if(e.startsWith("ref: "))return e=e.slice(5),t.resolveAgainstMap({ref:e,fullref:r,depth:n,map:i});if(e.length===40&&/[0-9a-f]{40}/.test(e))return{fullref:r,oid:e};let a=Bf(e);for(let s of a){let o=i.get(s);if(o)return t.resolveAgainstMap({ref:o.trim(),fullref:s,depth:n,map:i})}throw new Le(e)}static async packedRefs({fs:e,gitdir:r}){let n=await aa("packed-refs",async()=>e.read(`${r}/packed-refs`,{encoding:"utf8"}));return Gf.from(n).refs}static async listRefs({fs:e,gitdir:r,filepath:n}){let i=t.packedRefs({fs:e,gitdir:r}),a=null;try{a=await e.readdirDeep(`${r}/${n}`),a=a.map(s=>s.replace(`${r}/${n}/`,""))}catch(s){a=[]}for(let s of(await i).keys())s.startsWith(n)&&(s=s.replace(n+"/",""),a.includes(s)||a.push(s));return a.sort(QH),a}static async listBranches({fs:e,gitdir:r,remote:n}){return n?t.listRefs({fs:e,gitdir:r,filepath:`refs/remotes/${n}`}):t.listRefs({fs:e,gitdir:r,filepath:"refs/heads"})}static async listTags({fs:e,gitdir:r}){return(await t.listRefs({fs:e,gitdir:r,filepath:"refs/tags"})).filter(i=>!i.endsWith("^{}"))}};function d3(t,e){return Kf(VS(t),VS(e))}function VS(t){return t.mode==="040000"?t.path+"/":t.path}function pE(t){switch(t){case"040000":return"tree";case"100644":return"blob";case"100755":return"blob";case"120000":return"blob";case"160000":return"commit"}throw new de(`Unexpected GitTree entry mode: ${t}`)}function h3(t){let e=[],r=0;for(;r<t.length;){let n=t.indexOf(32,r);if(n===-1)throw new de(`GitTree: Error parsing buffer at byte location ${r}: Could not find the next space character.`);let i=t.indexOf(0,r);if(i===-1)throw new de(`GitTree: Error parsing buffer at byte location ${r}: Could not find the next null character.`);let a=t.slice(r,n).toString("utf8");a==="40000"&&(a="040000");let s=pE(a),o=t.slice(n+1,i).toString("utf8");if(o.includes("\\")||o.includes("/"))throw new po(o);let l=t.slice(i+1,i+21).toString("hex");r=i+21,e.push({mode:a,path:o,oid:l,type:s})}return e}function p3(t){if(typeof t=="number"&&(t=t.toString(8)),t.match(/^0?4.*/))return"040000";if(t.match(/^1006.*/))return"100644";if(t.match(/^1007.*/))return"100755";if(t.match(/^120.*/))return"120000";if(t.match(/^160.*/))return"160000";throw new de(`Could not understand file mode: ${t}`)}function m3(t){return!t.oid&&t.sha&&(t.oid=t.sha),t.mode=p3(t.mode),t.type||(t.type=pE(t.mode)),t}var pr=class t{constructor(e){if(Buffer.isBuffer(e))this._entries=h3(e);else if(Array.isArray(e))this._entries=e.map(m3);else throw new de("invalid type passed to GitTree constructor");this._entries.sort(uE)}static from(e){return new t(e)}render(){return this._entries.map(e=>`${e.mode} ${e.type} ${e.oid} ${e.path}`).join(`
`)}toObject(){let e=[...this._entries];return e.sort(d3),Buffer.concat(e.map(r=>{let n=Buffer.from(r.mode.replace(/^0/,"")),i=Buffer.from(" "),a=Buffer.from(r.path,"utf8"),s=Buffer.from([0]),o=Buffer.from(r.oid,"hex");return Buffer.concat([n,i,a,s,o])}))}entries(){return this._entries}*[Symbol.iterator](){for(let e of this._entries)yield e}},la=class{static wrap({type:e,object:r}){return Buffer.concat([Buffer.from(`${e} ${r.byteLength.toString()}\0`),Buffer.from(r)])}static unwrap(e){let r=e.indexOf(32),n=e.indexOf(0),i=e.slice(0,r).toString("utf8"),a=e.slice(r+1,n).toString("utf8"),s=e.length-(n+1);if(parseInt(a)!==s)throw new de(`Length mismatch: expected ${a} bytes but got ${s} instead.`);return{type:i,object:Buffer.from(e.slice(n+1))}}};async function mE({fs:t,gitdir:e,oid:r}){let n=`objects/${r.slice(0,2)}/${r.slice(2)}`,i=await t.read(`${e}/${n}`);return i?{object:i,format:"deflated",source:n}:null}function g3(t,e){let r=new Jr(t),n=WS(r);if(n!==e.byteLength)throw new de(`applyDelta expected source buffer to be ${n} bytes but the provided buffer was ${e.length} bytes`);let i=WS(r),a,s=XS(r,e);if(s.byteLength===i)a=s;else{a=Buffer.alloc(i);let o=new Jr(a);for(o.copy(s);!r.eof();)o.copy(XS(r,e));let l=o.tell();if(i!==l)throw new de(`applyDelta expected target buffer to be ${i} bytes but the resulting buffer was ${l} bytes`)}return a}function WS(t){let e=0,r=0,n=null;do n=t.readUInt8(),e|=(n&127)<<r,r+=7;while(n&128);return e}function YS(t,e,r){let n=0,i=0;for(;r--;)e&1&&(n|=t.readUInt8()<<i),e>>=1,i+=8;return n}function XS(t,e){let r=t.readUInt8(),n=128,i=15,a=112;if(r&n){let s=YS(t,r&i,4),o=YS(t,(r&a)>>4,3);return o===0&&(o=65536),e.slice(s,s+o)}else return t.slice(r)}function v3(t){let e=[t];return{next(){return Promise.resolve({done:e.length===0,value:e.pop()})},return(){return e=[],{}},[Symbol.asyncIterator](){return this}}}function gE(t){return t[Symbol.asyncIterator]?t[Symbol.asyncIterator]():t[Symbol.iterator]?t[Symbol.iterator]():t.next?t:v3(t)}var zf=class{constructor(e){if(typeof Buffer=="undefined")throw new Error("Missing Buffer dependency");this.stream=gE(e),this.buffer=null,this.cursor=0,this.undoCursor=0,this.started=!1,this._ended=!1,this._discardedBytes=0}eof(){return this._ended&&this.cursor===this.buffer.length}tell(){return this._discardedBytes+this.cursor}async byte(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(1),this.buffer[this.undoCursor]}async chunk(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(this.buffer.length),this.buffer.slice(this.undoCursor,this.cursor)}async read(e){if(!this.eof())return this.started||await this._init(),this.cursor+e>this.buffer.length&&(this._trim(),await this._accumulate(e)),this._moveCursor(e),this.buffer.slice(this.undoCursor,this.cursor)}async skip(e){this.eof()||(this.started||await this._init(),this.cursor+e>this.buffer.length&&(this._trim(),await this._accumulate(e)),this._moveCursor(e))}async undo(){this.cursor=this.undoCursor}async _next(){this.started=!0;let{done:e,value:r}=await this.stream.next();return e&&(this._ended=!0,!r)?Buffer.alloc(0):(r&&(r=Buffer.from(r)),r)}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(e){this.undoCursor=this.cursor,this.cursor+=e,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}async _accumulate(e){if(this._ended)return;let r=[this.buffer];for(;this.cursor+e>w3(r);){let n=await this._next();if(this._ended)break;r.push(n)}this.buffer=Buffer.concat(r)}async _loadnext(){this._discardedBytes+=this.buffer.length,this.undoCursor=0,this.cursor=0,this.buffer=await this._next()}async _init(){this.buffer=await this._next()}};function w3(t){return t.reduce((e,r)=>e+r.length,0)}async function y3(t,e){let r=new zf(t),n=await r.read(4);if(n=n.toString("utf8"),n!=="PACK")throw new de(`Invalid PACK header '${n}'`);let i=await r.read(4);if(i=i.readUInt32BE(0),i!==2)throw new de(`Invalid packfile version: ${i}`);let a=await r.read(4);if(a=a.readUInt32BE(0),!(a<1))for(;!r.eof()&&a--;){let s=r.tell(),{type:o,length:l,ofs:u,reference:c}=await b3(r),f=new Fg.Inflate;for(;!f.result;){let d=await r.chunk();if(!d)break;if(f.push(d,!1),f.err)throw new de(`Pako error: ${f.msg}`);if(f.result){if(f.result.length!==l)throw new de("Inflated object size is different from that stated in packfile.");await r.undo(),await r.read(d.length-f.strm.avail_in);let h=r.tell();await e({data:f.result,type:o,num:a,offset:s,end:h,reference:c,ofs:u})}}}}async function b3(t){let e=await t.byte(),r=e>>4&7,n=e&15;if(e&128){let s=4;do e=await t.byte(),n|=(e&127)<<s,s+=7;while(e&128)}let i,a;if(r===6){let s=0;i=0;let o=[];do e=await t.byte(),i|=(e&127)<<s,s+=7,o.push(e);while(e&128);a=Buffer.from(o)}return r===7&&(a=await t.read(20)),{typ Line truncated
`,t}function Vf(t){let[,e,r,n,i]=t.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:e,email:r,timestamp:Number(n),timezoneOffset:R3(i)}}function R3(t){let[,e,r,n]=t.match(/(\+|-)(\d\d)(\d\d)/);return n=(e==="+"?1:-1)*(Number(r)*60+Number(n)),I3(n)}function I3(t){return t===0?t:-t}var Fr=class t{constructor(e){if(typeof e=="string")this._tag=e;else if(Buffer.isBuffer(e))this._tag=e.toString("utf8");else if(typeof e=="object")this._tag=t.render(e);else throw new de("invalid type passed to GitAnnotatedTag constructor")}static from(e){return new t(e)}static render(e){return`object ${e.object}
type ${e.type}
tag ${e.tag}
tagger ${Ag(e.tagger)}
${e.message}
${e.gpgsig?e.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf(`
`))}message(){let e=this.withoutSignature();return e.slice(e.indexOf(`
`)+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){let e=this.justHeaders().split(`
`),r=[];for(let i of e)i[0]===" "?r[r.length-1]+=`
`+i.slice(1):r.push(i);let n={};for(let i of r){let a=i.slice(0,i.indexOf(" ")),s=i.slice(i.indexOf(" ")+1);Array.isArray(n[a])?n[a].push(s):n[a]=s}return n.tagger&&(n.tagger=Vf(n.tagger)),n.committer&&(n.committer=Vf(n.committer)),n}withoutSignature(){let e=Ei(this._tag);return e.indexOf(`
-----BEGIN PGP SIGNATURE-----`)===-1?e:e.slice(0,e.lastIndexOf(`
-----BEGIN PGP SIGNATURE-----`))}gpgsig(){if(this._tag.indexOf(`
-----BEGIN PGP SIGNATURE-----`)===-1)return;let e=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+27);return Ei(e)}payload(){return this.withoutSignature()+`
`}toObject(){return Buffer.from(this._tag,"utf8")}static async sign(e,r,n){let i=e.payload(),{signature:a}=await r({payload:i,secretKey:n});a=Ei(a);let s=i+a;return t.from(s)}};function pg(t){return t.trim().split(`
`).map(e=>" "+e).join(`
`)+`
`}function $3(t){return t.split(`
`).map(e=>e.replace(/^ /,"")).join(`
`)}var mr=class t{constructor(e){if(typeof e=="string")this._commit=e;else if(Buffer.isBuffer(e))this._commit=e.toString("utf8");else if(typeof e=="object")this._commit=t.render(e);else throw new de("invalid type passed to GitCommit constructor")}static fromPayloadSignature({payload:e,signature:r}){let n=t.justHeaders(e),i=t.justMessage(e),a=Ei(n+`
gpgsig`+pg(r)+`
`+i);return new t(a)}static from(e){return new t(e)}toObject(){return Buffer.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return t.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(e){return Ei(e.slice(e.indexOf(`
`)+2))}static justHeaders(e){return e.slice(0,e.indexOf(`
`))}parseHeaders(){let e=t.justHeaders(this._commit).split(`
`),r=[];for(let i of e)i[0]===" "?r[r.length-1]+=`
`+i.slice(1):r.push(i);let n={parent:[]};for(let i of r){let a=i.slice(0,i.indexOf(" ")),s=i.slice(i.indexOf(" ")+1);Array.isArray(n[a])?n[a].push(s):n[a]=s}return n.author&&(n.author=Vf(n.author)),n.committer&&(n.committer=Vf(n.committer)),n}static renderHeaders(e){let r="";if(e.tree?r+=`tree ${e.tree}
`:r+=`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
`,e.parent){if(e.parent.length===void 0)throw new de("commit 'parent' property should be an array");for(let a of e.parent)r+=`parent ${a}
`}let n=e.author;r+=`author ${Ag(n)}
`;let i=e.committer||e.author;return r+=`committer ${Ag(i)}
`,e.gpgsig&&(r+="gpgsig"+pg(e.gpgsig)),r}static render(e){return t.renderHeaders(e)+`
`+Ei(e.message)}render(){return this._commit}withoutSignature(){let e=Ei(this._commit);if(e.indexOf(`
gpgsig`)===-1)return e;let r=e.slice(0,e.indexOf(`
gpgsig`)),n=e.slice(e.indexOf(`-----END PGP SIGNATURE-----
`)+28);return Ei(r+`
`+n)}isolateSignature(){let e=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+27);return $3(e)}static async sign(e,r,n){let i=e.withoutSignature(),a=t.justMessage(e._commit),{signature:s}=await r({payload:i,secretKey:n});s=Ei(s);let l=t.justHeaders(e._commit)+`
gpgsig`+pg(s)+`
`+a;return t.from(l)}};async function xo({fs:t,cache:e,gitdir:r,oid:n}){if(n==="4b825dc642cb6eb9a060e54bf8d69288fbee4904")return{tree:pr.from([]),oid:n};let{type:i,object:a}=await qe({fs:t,cache:e,gitdir:r,oid:n});if(i==="tag")return n=Fr.from(a).parse().object,xo({fs:t,cache:e,gitdir:r,oid:n});if(i==="commit")return n=mr.from(a).parse().tree,xo({fs:t,cache:e,gitdir:r,oid:n});if(i!=="tree")throw new rr(n,i,"tree");return{tree:pr.from(a),oid:n}}var Tg=class{constructor({fs:e,gitdir:r,ref:n,cache:i}){this.fs=e,this.cache=i,this.gitdir=r,this.mapPromise=(async()=>{let s=new Map,o;try{o=await z.resolve({fs:e,gitdir:r,ref:n})}catch(u){u instanceof Le&&(o="4b825dc642cb6eb9a060e54bf8d69288fbee4904")}let l=await xo({fs:e,cache:this.cache,gitdir:r,oid:o});return l.type="tree",l.mode="40000",s.set(".",l),s})();let a=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(e){let r=e._fullpath,{fs:n,cache:i,gitdir:a}=this,s=await this.mapPromise,o=s.get(r);if(!o)throw new Error(`No obj for ${r}`);let l=o.oid;if(!l)throw new Error(`No oid for obj ${JSON.stringify(o)}`);if(o.type!=="tree")return null;let{type:u,object:c}=await qe({fs:n,cache:i,gitdir:a,oid:l});if(u!==o.type)throw new rr(l,u,o.type);let f=pr.from(c);for(let d of f)s.set(O.join(r,d.path),d);return f.entries().map(d=>O.join(r,d.path))}async type(e){if(e._type===!1){let r=await this.mapPromise,{type:n}=r.get(e._fullpath);e._type=n}return e._type}async mode(e){if(e._mode===!1){let r=await this.mapPromise,{mode:n}=r.get(e._fullpath);e._mode=fE(parseInt(n,8))}return e._mode}async stat(e){}async content(e){if(e._content===!1){let r=await this.mapPromise,{fs:n,cache:i,gitdir:a}=this,o=r.get(e._fullpath).oid,{type:l,object:u}=await qe({fs:n,cache:i,gitdir:a,oid:o});l!=="blob"?e._content=void 0:e._content=new Uint8Array(u)}return e._content}async oid(e){if(e._oid===!1){let n=(await this.mapPromise).get(e._fullpath);e._oid=n.oid}return e._oid}};function $r({ref:t="HEAD"}={}){let e=Object.create(null);return Object.defineProperty(e,Jf,{value:function({fs:r,gitdir:n,cache:i}){return new Tg({fs:r,gitdir:n,ref:t,cache:i})}}),Object.freeze(e),e}var Cg=class{constructor({fs:e,dir:r,gitdir:n,cache:i}){this.fs=e,this.cache=i,this.dir=r,this.gitdir=n,this.config=null;let a=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(e){let r=e._fullpath,{fs:n,dir:i}=this,a=await n.readdir(O.join(i,r));return a===null?null:a.map(s=>O.join(r,s))}async type(e){return e._type===!1&&await e.stat(),e._type}async mode(e){return e._mode===!1&&await e.stat(),e._mode}async stat(e){if(e._stat===!1){let{fs:r,dir:n}=this,i=await r.lstat(`${n}/${e._fullpath}`);if(!i)throw new Error(`ENOENT: no such file or directory, lstat '${e._fullpath}'`);let a=i.isDirectory()?"tree":"blob";a==="blob"&&!i.isFile()&&!i.isSymbolicLink()&&(a="special"),e._type=a,i=mo(i),e._mode=i.mode,i.size===-1&&e._actualSize&&(i.size=e._actualSize),e._stat=i}return e._stat}async content(e){if(e._content===!1){let{fs:r,dir:n,gitdir:i}=this;if(await e.type()==="tree")e._content=void 0;else{let s=await(await this._getGitConfig(r,i)).get("core.autocrlf"),o=await r.read(`${n}/${e._fullpath}`,{autocrlf:s});e._actualSize=o.length,e._stat&&e._stat.size===-1&&(e._stat.size=e._actualSize),e._content=new Uint8Array(o)}}return e._content}async oid(e){if(e._oid===!1){let r=this,{fs:n,gitdir:i,cache:a}=this,s;await ct.acquire({fs:n,gitdir:i,cache:a},async function(o){let l=o.entriesMap.get(e._fullpath),u=await e.stat(),f=await(await r._getGitConfig(n,i)).get("core.filemode"),d=typeof process!="undefined"?process.platform!=="win32":!0;if(!l||Uf(u,l,f,d)){let h=await e.content();h===void 0?s=void 0:(s=await ki(la.wrap({type:"blob",object:h})),l&&s===l.oid&&(!f||u.mode===l.mode)&&Uf(u,l,f,d)&&o.insert({filepath:e._fullpath,stats:u,oid:s}))}else s=l.oid}),e._oid=s}return e._oid}async _getGitConfig(e,r){return this.config?this.config:(this.config=await nt.get({fs:e,gitdir:r}),this.config)}};function Co(){let t=Object.create(null);return Object.defineProperty(t,Jf,{value:function({fs:e,dir:r,gitdir:n,cache:i}){return new Cg({fs:e,dir:r,gitdir:n,cache:i})}}),Object.freeze(t),t}function F3(t,e){let r=e-t;return Array.from({length:r},(n,i)=>t+i)}var yE=typeof Array.prototype.flat=="undefined"?t=>t.reduce((e,r)=>e.concat(r),[]):t=>t.flat(),Pg=class{constructor(){this.value=null}consider(e){e!=null&&(this.value===null?this.value=e:e<this.value&&(this.value=e))}reset(){this.value=null}};function*O3(t){let e=new Pg,r,n=[],i=t.lengt Line truncated
`),n=new TextEncoder().encode(n)}catch(i){}return typeof n!="string"&&(n=Buffer.from(n)),n}catch(n){return null}}async write(e,r,n={}){try{await this._writeFile(e,r,n);return}catch(i){await this.mkdir(go(e)),await this._writeFile(e,r,n)}}async mkdir(e,r=!1){try{await this._mkdir(e);return}catch(n){if(n===null||n.code==="EEXIST")return;if(r)throw n;if(n.code==="ENOENT"){let i=go(e);if(i==="."||i==="/"||i===e)throw n;await this.mkdir(i),await this.mkdir(e,!0)}}}async rm(e){try{await this._unlink(e)}catch(r){if(r.code!=="ENOENT")throw r}}async rmdir(e,r){try{r&&r.recursive?await this._rm(e,r):await this._rmdir(e)}catch(n){if(n.code!=="ENOENT")throw n}}async readdir(e){try{let r=await this._readdir(e);return r.sort(Kf),r}catch(r){return r.code==="ENOTDIR"?null:[]}}async readdirDeep(e){let r=await this._readdir(e);return(await Promise.all(r.map(async i=>{let a=e+"/"+i;return(await this._stat(a)).isDirectory()?this.readdirDeep(a):a}))).reduce((i,a)=>i.concat(a),[])}async lstat(e){try{return await this._lstat(e)}catch(r){if(r.code==="ENOENT"||(r.code||"").includes("ENS"))return null;throw r}}async readlink(e,r={encoding:"buffer"}){try{let n=await this._readlink(e,r);return Buffer.isBuffer(n)?n:Buffer.from(n)}catch(n){if(n.code==="ENOENT"||(n.code||"").includes("ENS"))return null;throw n}}async writelink(e,r){return this._symlink(r.toString("utf8"),e)}};function C(t,e){if(e===void 0)throw new hr(t)}async function Wf(t,e){return!t&&!e?!1:t&&!e||!t&&e?!0:!(await t.type()==="tree"&&await e.type()==="tree"||await t.type()===await e.type()&&await t.mode()===await e.mode()&&await t.oid()===await e.oid())}async function bE({fs:t,dir:e,gitdir:r=O.join(e,".git"),commit:n="HEAD",cache:i={}}){try{C("fs",t),C("dir",e),C("gitdir",r);let a=new J(t),s=[$r({ref:n}),Co(),ts()],o=[];await ct.acquire({fs:a,gitdir:r,cache:i},async function(u){o=u.unmergedPaths});let l=await ua({fs:a,cache:i,dir:e,gitdir:r,trees:s,map:async function(u,[c,f,d]){let h=!await Wf(f,d),m=o.includes(u),g=!await Wf(d,c);if(h||m)return c?{path:u,mode:await c.mode(),oid:await c.oid(),type:await c.type(),content:await c.content()}:void 0;if(g)return!1;throw new gc(u)}});await ct.acquire({fs:a,gitdir:r,cache:i},async function(u){for(let c of l)if(c!==!1){if(!c){await a.rmdir(`${e}/${c.path}`,{recursive:!0}),u.delete({filepath:c.path});continue}if(c.type==="blob"){let f=new TextDecoder().decode(c.content);await a.write(`${e}/${c.path}`,f,{mode:c.mode}),u.insert({filepath:c.path,oid:c.oid,stage:0})}}})}catch(a){throw a.caller="git.abortMerge",a}}var fa=class{static async isIgnored({fs:e,dir:r,gitdir:n=O.join(r,".git"),filepath:i}){if(jf(i)===".git")return!0;if(i===".")return!1;let a="",s=O.join(n,"info","exclude");await e.exists(s)&&(a=await e.read(s,"utf8"));let o=[{gitignore:O.join(r,".gitignore"),filepath:i}],l=i.split("/").filter(Boolean);for(let c=1;c<l.length;c++){let f=l.slice(0,c).join("/"),d=l.slice(c).join("/");o.push({gitignore:O.join(r,f,".gitignore"),filepath:d})}let u=!1;for(let c of o){let f;try{f=await e.read(c.gitignore,"utf8")}catch(m){if(m.code==="NOENT")continue}let d=jH().add(a);d.add(f);let h=go(c.filepath);if(h!=="."&&d.ignores(h))return!0;u?u=!d.test(c.filepath).unignored:u=d.test(c.filepath).ignored}return u}};async function L3({fs:t,gitdir:e,object:r,format:n,oid:i}){if(n!=="deflated")throw new de("GitObjectStoreLoose expects objects to write to be in deflated format");let a=`objects/${i.slice(0,2)}/${i.slice(2)}`,s=`${e}/${a}`;await t.exists(s)||await t.write(s,r)}var mg=null;async function _E(t){return mg===null&&(mg=B3()),mg?N3(t):Fg.deflate(t)}async function N3(t){let e=new CompressionStream("deflate"),r=new Blob([t]).stream().pipeThrough(e);return new Uint8Array(await new Response(r).arrayBuffer())}function B3(){try{return new CompressionStream("deflate").writable.close(),new Blob([]).stream().cancel(),!0}catch(t){return!1}}async function gr({fs:t,gitdir:e,type:r,object:n,format:i="content",oid:a=void 0,dryRun:s=!1}){return i!=="deflated"&&(i!=="wrapped"&&(n=la.wrap({type:r,object:n})),a=await ki(n),n=Buffer.from(await _E(n))),s||await L3({fs:t,gitdir:e,object:n,format:"deflated",oid:a}),a}function xE(t){let e;for(;~(e=t.indexOf(92));)t[e]=47;return t}async function SE({fs:t,dir:e,gitdir:r=O.join(e,".git"),filepath:n,cache:i={},force:a=!1,parallel:s=!0}){try{C("fs",t),C("dir",e),C("gitdir",r),C("filepath",n);let o=new J(t);await ct.acquire({fs:o,gitdir:r,cache:i},async l=>{let c=await(await nt.get({fs:o,gitdir:r})).get("core.autocrlf");return Ig({dir:e,gitdir:r,fs:o,filepath:n,index:l,force:a,parallel:s,autocrlf:c})})}catch(o){throw o.caller="git.add",o}}async function Ig({dir:t,gitdir:e,fs:r,filepath:n,index:i,force:a,parallel:s,autocrlf:o}){n=Array.isArray(n)?n:[n];let l=n.map(async d=>{if(!a&&await fa.isIgnored({fs:r,dir:t,gitdir:e,filepath:d}))return;let h=await r.lstat(O.join(t,d));if(!h)throw new Le(d);if(h.isDirectory()){let m=await r.readdir(O.join(t,d));if(s){let g=m.map(v=>Ig({dir:t,gitdir:e,fs:r,filepath:[O.join(d,v)],inde Line truncated
`,author:l,committer:u,signingKey:c})}async function CE({fs:t,onSign:e,dir:r,gitdir:n=O.join(r,".git"),ref:i="refs/notes/commits",oid:a,note:s,force:o,author:l,committer:u,signingKey:c,cache:f={}}){try{C("fs",t),C("gitdir",n),C("oid",a),C("note",s),c&&C("onSign",e);let d=new J(t),h=await da({fs:d,gitdir:n,author:l});if(!h)throw new zt("author");let m=await So({fs:d,gitdir:n,author:h,committer:u});if(!m)throw new zt("committer");return await H3({fs:new J(d),cache:f,onSign:e,gitdir:n,ref:i,oid:a,note:s,force:o,author:h,committer:m,signingKey:c})}catch(d){throw d.caller="git.addNote",d}}async function PE({fs:t,gitdir:e,remote:r,url:n,force:i}){if(r!==Xn.clean(r))throw new wn(r,Xn.clean(r));let a=await nt.get({fs:t,gitdir:e});if(!i&&(await a.getSubsections("remote")).includes(r)&&n!==await a.get(`remote.${r}.url`))throw new vn("remote",r);await a.set(`remote.${r}.url`,n),await a.set(`remote.${r}.fetch`,`+refs/heads/*:refs/remotes/${r}/*`),await nt.save({fs:t,gitdir:e,config:a})}async function RE({fs:t,dir:e,gitdir:r=O.join(e,".git"),remote:n,url:i,force:a=!1}){try{return C("fs",t),C("gitdir",r),C("remote",n),C("url",i),await PE({fs:new J(t),gitdir:r,remote:n,url:i,force:a})}catch(s){throw s.caller="git.addRemote",s}}async function U3({fs:t,cache:e,onSign:r,gitdir:n,ref:i,tagger:a,message:s=i,gpgsig:o,object:l,signingKey:u,force:c=!1}){if(i=i.startsWith("refs/tags/")?i:`refs/tags/${i}`,!c&&await z.exists({fs:t,gitdir:n,ref:i}))throw new vn("tag",i);let f=await z.resolve({fs:t,gitdir:n,ref:l||"HEAD"}),{type:d}=await qe({fs:t,cache:e,gitdir:n,oid:f}),h=Fr.from({object:f,type:d,tag:i.replace("refs/tags/",""),tagger:a,message:s,gpgsig:o});u&&(h=await Fr.sign(h,r,u));let m=await gr({fs:t,gitdir:n,type:"tag",object:h.toObject()});await z.writeRef({fs:t,gitdir:n,ref:i,value:m})}async function IE({fs:t,onSign:e,dir:r,gitdir:n=O.join(r,".git"),ref:i,tagger:a,message:s=i,gpgsig:o,object:l,signingKey:u,force:c=!1,cache:f={}}){try{C("fs",t),C("gitdir",n),C("ref",i),u&&C("onSign",e);let d=new J(t),h=await da({fs:d,gitdir:n,author:a});if(!h)throw new zt("tagger");return await U3({fs:d,cache:f,onSign:e,gitdir:n,ref:i,tagger:h,message:s,gpgsig:o,object:l,signingKey:u,force:c})}catch(d){throw d.caller="git.annotatedTag",d}}async function j3({fs:t,gitdir:e,ref:r,object:n,checkout:i=!1,force:a=!1}){if(r!==Xn.clean(r))throw new wn(r,Xn.clean(r));let s=`refs/heads/${r}`;if(!a&&await z.exists({fs:t,gitdir:e,ref:s}))throw new vn("branch",r,!1);let o;try{o=await z.resolve({fs:t,gitdir:e,ref:n||"HEAD"})}catch(l){}o&&await z.writeRef({fs:t,gitdir:e,ref:s,value:o}),i&&await z.writeSymbolicRef({fs:t,gitdir:e,ref:"HEAD",value:s})}async function $E({fs:t,dir:e,gitdir:r=O.join(e,".git"),ref:n,object:i,checkout:a=!1,force:s=!1}){try{return C("fs",t),C("gitdir",r),C("ref",n),await j3({fs:new J(t),gitdir:r,ref:n,object:i,checkout:a,force:s})}catch(o){throw o.caller="git.branch",o}}var FE=(t,e)=>t==="."||e==null||e.length===0||e==="."?!0:e.length>=t.length?e.startsWith(t):t.startsWith(e);async function Mg({fs:t,cache:e,onProgress:r,onPostCheckout:n,dir:i,gitdir:a,remote:s,ref:o,filepaths:l,noCheckout:u,noUpdateHead:c,dryRun:f,force:d,track:h=!0,nonBlocking:m=!1,batchSize:g=100}){let v;if(n)try{v=await z.resolve({fs:t,gitdir:a,ref:"HEAD"})}catch(b){v="0000000000000000000000000000000000000000"}let w;try{w=await z.resolve({fs:t,gitdir:a,ref:o})}catch(b){if(o==="HEAD")throw b;let E=`${s}/${o}`;if(w=await z.resolve({fs:t,gitdir:a,ref:E}),h){let x=await nt.get({fs:t,gitdir:a});await x.set(`branch.${o}.remote`,s),await x.set(`branch.${o}.merge`,`refs/heads/${o}`),await nt.save({fs:t,gitdir:a,config:x})}await z.writeRef({fs:t,gitdir:a,ref:`refs/heads/${o}`,value:w})}if(!u){let b;try{b=await G3({fs:t,cache:e,onProgress:r,dir:i,gitdir:a,ref:o,force:d,filepaths:l})}catch(y){throw y instanceof Le&&y.data.what===w?new oc(o,w):y}let E=b.filter(([y])=>y==="conflict").map(([y,S])=>S);if(E.length>0)throw new sc(E);let x=b.filter(([y])=>y==="error").map(([y,S])=>S);if(x.length>0)throw new de(x.join(", "));if(f){n&&await n({previousHead:v,newHead:w,type:l!=null&&l.length>0?"file":"branch"});return}let k=0,A=b.length;if(await ct.acquire({fs:t,gitdir:a,cache:e},async function(y){await Promise.all(b.filter(([S])=>S==="delete"||S==="delete-index").map(async function([S,_]){let T=`${i}/${_}`;S==="delete"&&await t.rm(T),y.delete({filepath:_}),r&&await r({phase:"Updating workdir",loaded:++k,total:A})}))}),await ct.acquire({fs:t,gitdir:a,cache:e},async function(y){for(let[S,_]of b)if(S==="rmdir"||S==="rmdir-index"){let T=`${i}/${_}`;try{S==="rmdir"&&await t.rmdir(T),y.delete({filepath:_}),r&&await r({phase:"Updating workdir",loaded:++k,total:A})}catch(P){if(P.code==="ENOTEMPTY")console.log(`Did not delete ${_} because directory is not empty`);else throw P}}}),await Promise.all(b.filter(([y])=>y==="mkdir"||y==="mkdir-index").map(async function([y,S]){let _=`${i}/${S}`;await t.mkdir(_),r&&await r({phase:"Updating workdir",loaded:++k,total:A})})),m){let y=b.filter(([_])=>_== Line truncated
`).map(s=>i.add(s))}),i}static async write({fs:e,gitdir:r,oids:n}){Za===null&&(Za=new tc);let i=O.join(r,"shallow");if(n.size>0){let a=[...n].join(`
`)+`
`;await Za.acquire(i,async function(){await e.write(i,a,{encoding:"utf8"})})}else await Za.acquire(i,async function(){await e.rm(i)})}};async function X3({fs:t,gitdir:e,oid:r}){let n=`objects/${r.slice(0,2)}/${r.slice(2)}`;return t.exists(`${e}/${n}`)}async function Z3({fs:t,cache:e,gitdir:r,oid:n,getExternalRefDelta:i}){let a=await t.readdir(O.join(r,"objects/pack"));a=a.filter(s=>s.endsWith(".idx"));for(let s of a){let o=`${r}/objects/pack/${s}`,l=await Og({fs:t,cache:e,filename:o,getExternalRefDelta:i});if(l.error)throw new de(l.error);if(l.offsets.has(n))return!0}return!1}async function sE({fs:t,cache:e,gitdir:r,oid:n,format:i="content"}){let a=o=>qe({fs:t,cache:e,gitdir:r,oid:o}),s=await X3({fs:t,gitdir:r,oid:n});return s||(s=await Z3({fs:t,cache:e,gitdir:r,oid:n,getExternalRefDelta:a})),s}function K3(t){let i="5041434b"+"00000002"+"00000000";return t.slice(0,12).toString("hex")===i}function ME(t,e){let r=t.map(n=>n.split("=",1)[0]);return e.filter(n=>{let i=n.split("=",1)[0];return r.includes(i)})}var td={name:"isomorphic-git",version:"1.32.2",agent:"git/isomorphic-git@1.32.2"},ho=class{constructor(){this._queue=[]}write(e){if(this._ended)throw Error("You cannot write to a FIFO that has already been ended!");if(this._waiting){let r=this._waiting;this._waiting=null,r({value:e})}else this._queue.push(e)}end(){if(this._ended=!0,this._waiting){let e=this._waiting;this._waiting=null,e({done:!0})}}destroy(e){this.error=e,this.end()}async next(){if(this._queue.length>0)return{value:this._queue.shift()};if(this._ended)return{done:!0};if(this._waiting)throw Error("You cannot call read until the previous call to read has returned!");return new Promise(e=>{this._waiting=e})}};function J3(t){let e=t.indexOf("\r"),r=t.indexOf(`
`);return e===-1&&r===-1?-1:e===-1?r+1:r===-1?e+1:r===e+1?r+1:Math.min(e,r)+1}function DE(t){let e=new ho,r="";return(async()=>(await _c(t,n=>{for(n=n.toString("utf8"),r+=n;;){let i=J3(r);if(i===-1)break;e.write(r.slice(0,i)),r=r.slice(i)}}),r.length>0&&e.write(r),e.end()))(),e}var Xf=class{static demux(e){let r=Qe.streamReader(e),n=new ho,i=new ho,a=new ho,s=async function(){let o=await r();if(o===null)return s();if(o===!0){n.end(),a.end(),e.error?i.destroy(e.error):i.end();return}switch(o[0]){case 1:{i.write(o.slice(1));break}case 2:{a.write(o.slice(1));break}case 3:{let l=o.slice(1);a.write(l),n.end(),a.end(),i.destroy(new Error(l.toString("utf8")));return}default:n.write(o)}s()};return s(),{packetlines:n,packfile:i,progress:a}}};async function Q3(t){let{packetlines:e,packfile:r,progress:n}=Xf.demux(t),i=[],a=[],s=[],o=!1,l=!1;return new Promise((u,c)=>{_c(e,f=>{let d=f.toString("utf8").trim();if(d.startsWith("shallow")){let h=d.slice(-41).trim();h.length!==40&&c(new oa(h)),i.push(h)}else if(d.startsWith("unshallow")){let h=d.slice(-41).trim();h.length!==40&&c(new oa(h)),a.push(h)}else if(d.startsWith("ACK")){let[,h,m]=d.split(" ");s.push({oid:h,status:m}),m||(l=!0)}else d.startsWith("NAK")?(o=!0,l=!0):(l=!0,o=!0);l&&(t.error?c(t.error):u({shallows:i,unshallows:a,acks:s,nak:o,packfile:r,progress:n}))}).finally(()=>{l||(t.error?c(t.error):u({shallows:i,unshallows:a,acks:s,nak:o,packfile:r,progress:n}))})})}function e8({capabilities:t=[],wants:e=[],haves:r=[],shallows:n=[],depth:i=null,since:a=null,exclude:s=[]}){let o=[];e=[...new Set(e)];let l=` ${t.join(" ")}`;for(let u of e)o.push(Qe.encode(`want ${u}${l}
`)),l="";for(let u of n)o.push(Qe.encode(`shallow ${u}
`));i!==null&&o.push(Qe.encode(`deepen ${i}
`)),a!==null&&o.push(Qe.encode(`deepen-since ${Math.floor(a.valueOf()/1e3)}
`));for(let u of s)o.push(Qe.encode(`deepen-not ${u}
`));o.push(Qe.flush());for(let u of r)o.push(Qe.encode(`have ${u}
`));return o.push(Qe.encode(`done
`)),o}async function Lg({fs:t,cache:e,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:l,ref:u,remoteRef:c,remote:f,url:d,corsProxy:h,depth:m=null,since:g=null,exclude:v=[],relative:w=!1,tags:b=!1,singleBranch:E=!1,headers:x={},prune:k=!1,pruneTags:A=!1}){let y=u||await pa({fs:t,gitdir:l,test:!0}),S=await nt.get({fs:t,gitdir:l}),_=f||y&&await S.get(`branch.${y}.remote`)||"origin",T=d||await S.get(`remote.${_}.url`);if(typeof T=="undefined")throw new hr("remote OR url");let P=c||y&&await S.get(`branch.${y}.merge`)||u||"HEAD";h===void 0&&(h=await S.get("http.corsProxy"));let F=Ao.getRemoteHelperFor({url:T}),D=await F.discover({http:r,onAuth:a,onAuthSuccess:s,onAuthFailure:o,corsProxy:h,service:"git-upload-pack",url:T,headers:x,protocolVersion:1}),M=D.auth,re=D.refs;if(re.size===0)return{defaultBranch:null,fetchHead:null,fetchHeadDescription:null};if(m!==null&&!D.capabilities.has("shallow"))throw new sa("shallow","depth");if(g!==null&&!D.capabilities.has("deepen-since"))throw new sa("deepen-since","since");if(v.length>0&&!D.capabilities.has("deepen-not"))throw new sa("deepen-not","exclude");if(w===!0&&!D.capabilities.has("deepen-relative"))throw new sa("deepen-relative","relative");let{oid:ye,fullref:me}=z.resolveAgainstMap({ref:P,map:re});for(let G of re.keys())G===me||G==="HEAD"||G.startsWith("refs/heads/")||b&&G.startsWith("refs/tags/")||re.delete(G);let fe=ME([...D.capabilities],["multi_ack_detailed","no-done","side-band-64k","ofs-delta",`agent=${td.agent}`]);w&&fe.push("deepen-relative");let Ge=E?[ye]:re.values(),oe=E?[y]:await z.listRefs({fs:t,gitdir:l,filepath:"refs"}),B=[];for(let G of oe)try{G=await z.expand({fs:t,gitdir:l,ref:G});let Je=await z.resolve({fs:t,gitdir:l,ref:G});await sE({fs:t,cache:e,gitdir:l,oid:Je})&&B.push(Je)}catch(Je){}B=[...new Set(B)];let Z=await Qa.read({fs:t,gitdir:l}),H=D.capabilities.has("shallow")?[...Z]:[],Oe=e8({capabilities:fe,wants:Ge,haves:B,shallows:H,depth:m,since:g,exclude:v}),cr=Buffer.from(await Yf(Oe)),Gt=await F.connect({http:r,onProgress:n,corsProxy:h,service:"git-upload-pack",url:T,auth:M,body:[cr],headers:x}),Y=await Q3(Gt.body);Gt.headers&&(Y.headers=Gt.headers);for(let G of Y.shallows)if(!Z.has(G))try{let{object:Je}=await qe({fs:t,cache:e,gitdir:l,oid:G}),N=new mr(Je),X=await Promise.all(N.headers().parent.map(We=>sE({fs:t,cache:e,gitdir:l,oid:We})));X.length===0||X.every(We=>We)||Z.add(G)}catch(Je){Z.add(G)}for(let G of Y.unshallows)Z.delete(G);if(await Qa.write({fs:t,gitdir:l,oids:Z}),E){let G=new Map([[me,ye]]),Je=new Map,N=10,X=me;for(;N--;){let $t=D.symrefs.get(X);if($t===void 0)break;Je.set(X,$t),X=$t}let Ee=re.get(X);Ee&&G.set(X,Ee);let{pruned:We}=await z.updateRemoteRefs({fs:t,gitdir:l,remote:_,refs:G,symrefs:Je,tags:b,prune:k});k&&(Y.pruned=We)}else{let{pruned:G}=await z.updateRemoteRefs({fs:t,gitdir:l,remote:_,refs:re,symrefs:D.symrefs,tags:b,prune:k,pruneTags:A});k&&(Y.pruned=G)}if(Y.HEAD=D.symrefs.get("HEAD"),Y.HEAD===void 0){let{oid:G}=z.resolveAgainstMap({ref:"HEAD",map:re});for(let[Je,N]of re.entries())if(Je!=="HEAD"&&N===G){Y.HEAD=Je;break}}let Ie=me.startsWith("refs/tags")?"tag":"branch";if(Y.FETCH_HEAD={oid:ye,description:`${Ie} '${Ka(me)}' of ${T}`},n||i){let G=DE(Y.progress);_c(G,async Je=>{if(i&&await i(Je),n){let N=Je.match(/([^:]*).*\((\d+?)\/(\d+?)\)/);N&&await n({phase:N[1].trim(),loaded:parseInt(N[2],10),total:parseInt(N[3],10)})}})}let Me=Buffer.from(await Yf(Y.packfile));if(Gt.body.error)throw Gt.body.error;let It=Me.slice(-20).toString("hex"),De={defaultBranch:Y.HEAD,fetchHead:Y.FETCH_HEAD.oid,fetchHeadDescription:Y.FETCH_HEAD.description};if(Y.headers&&(De.headers=Y.headers),k&&(De.pruned=Y.pruned),It!==""&&!K3(Me)){De.packfile=`objects/pack/pack-${It}.pack`;let G=O.join(l,De.packfile);await t.write(G,Me);let Je=X=>qe({fs:t,cache:e,gitdir:l,oid:X}),N=await ic.fromPack({pack:Me,getExternalRefDelta:Je,onProgress:n});await t.write(G.replace(/\.pack$/,".idx"),await N.toBuffer())}return De}async function LE({fs:t,bare:e=!1,dir:r,gitdir:n=e?r:O.join(r,".git"),defaultBranch:i="master"}){if(await t.exists(n+"/config"))return;let a=["hooks","info","objects/info","objects/pack","refs/heads","refs/tags"];a=a.map(s=>n+"/"+s);for(let s of a)await t.mkdir(s);await t.write(n+"/config",`[core]
repositoryformatversion = 0
filemode = false
bare = ${e}
`+(e?"":` logallrefupdates = true
`)+` symlinks = false
ignorecase = true
`),await t.write(n+"/HEAD",`ref: refs/heads/${i}
`)}async function t8({fs:t,cache:e,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,onPostCheckout:l,dir:u,gitdir:c,url:f,corsProxy:d,ref:h,remote:m,depth:g,since:v,exclude:w,relative:b,singleBranch:E,noCheckout:x,noTags:k,headers:A,nonBlocking:y,batchSize:S=100}){try{if(await LE({fs:t,gitdir:c}),await PE({fs:t,gitdir:c,remote:m,url:f,force:!1}),d){let P=await nt.get({fs:t,gitdir:c});await P.set("http.corsProxy",d),await nt.save({fs:t,gitdir:c,config:P})}let{defaultBranch:_,fetchHead:T}=await Lg({fs:t,cache:e,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:c,ref:h,remote:m,corsProxy:d,depth:g,since:v,exclude:w,relative:b,singleBranch:E,headers:A,tags:!k});if(T===null)return;h=h||_,h=h.replace("refs/heads/",""),await Mg({fs:t,cache:e,onProgress:n,onPostCheckout:l,dir:u,gitdir:c,ref:h,remote:m,noCheckout:x,nonBlocking:y,batchSize:S})}catch(_){throw await t.rmdir(c,{recursive:!0,maxRetries:10}).catch(()=>{}),_}}async function NE({fs:t,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPostCheckout:o,dir:l,gitdir:u=O.join(l,".git"),url:c,corsProxy:f=void 0,ref:d=void 0,remote:h="origin",depth:m=void 0,since:g=void 0,exclude:v=[],relative:w=!1,singleBranch:b=!1,noCheckout:E=!1,noTags:x=!1,headers:k={},cache:A={},nonBlocking:y=!1,batchSize:S=100}){try{return C("fs",t),C("http",e),C("gitdir",u),E||C("dir",l),C("url",c),await t8({fs:new J(t),cache:A,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPostCheckout:o,dir:l,gitdir:u,url:c,corsProxy:f,ref:d,remote:h,depth:m,since:g,exclude:v,relative:w,singleBranch:b,noCheckout:E,noTags:x,headers:k,nonBlocking:y,batchSize:S})}catch(_){throw _.caller="git.clone",_}}async function BE({fs:t,onSign:e,dir:r,gitdir:n=O.join(r,".git"),message:i,author:a,committer:s,signingKey:o,amend:l=!1,dryRun:u=!1,noUpdateBranch:c=!1,ref:f,parent:d,tree:h,cache:m={}}){try{C("fs",t),l||C("message",i),o&&C("onSign",e);let g=new J(t);return await Qf({fs:g,cache:m,onSign:e,gitdir:n,message:i,author:a,committer:s,signingKey:o,amend:l,dryRun:u,noUpdateBranch:c,ref:f,parent:d,tree:h})}catch(g){throw g.caller="git.commit",g}}async function HE({fs:t,dir:e,gitdir:r=O.join(e,".git"),fullname:n=!1,test:i=!1}){try{return C("fs",t),C("gitdir",r),await pa({fs:new J(t),gitdir:r,fullname:n,test:i})}catch(a){throw a.caller="git.currentBranch",a}}async function r8({fs:t,gitdir:e,ref:r}){if(r=r.startsWith("refs/heads/")?r:`refs/heads/${r}`,!await z.exists({fs:t,gitdir:e,ref:r}))throw new Le(r);let i=await z.expand({fs:t,gitdir:e,ref:r}),a=await pa({fs:t,gitdir:e,fullname:!0});if(i===a){let l=await z.resolve({fs:t,gitdir:e,ref:i});await z.writeRef({fs:t,gitdir:e,ref:"HEAD",value:l})}await z.deleteRef({fs:t,gitdir:e,ref:i});let s=Ka(r),o=await nt.get({fs:t,gitdir:e});await o.deleteSection("branch",s),await nt.save({fs:t,gitdir:e,config:o})}async function UE({fs:t,dir:e,gitdir:r=O.join(e,".git"),ref:n}){try{return C("fs",t),C("ref",n),await r8({fs:new J(t),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteBranch",i}}async function jE({fs:t,dir:e,gitdir:r=O.join(e,".git"),ref:n}){try{C("fs",t),C("ref",n),await z.deleteRef({fs:new J(t),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteRef",i}}async function n8({fs:t,gitdir:e,remote:r}){let n=await nt.get({fs:t,gitdir:e});await n.deleteSection("remote",r),await nt.save({fs:t,gitdir:e,config:n})}async function GE({fs:t,dir:e,gitdir:r=O.join(e,".git"),remote:n}){try{return C("fs",t),C("remote",n),await n8({fs:new J(t),gitdir:r,remote:n})}catch(i){throw i.caller="git.deleteRemote",i}}async function i8({fs:t,gitdir:e,ref:r}){r=r.startsWith("refs/tags/")?r:`refs/tags/${r}`,await z.deleteRef({fs:t,gitdir:e,ref:r})}async function qE({fs:t,dir:e,gitdir:r=O.join(e,".git"),ref:n}){try{return C("fs",t),C("ref",n),await i8({fs:new J(t),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteTag",i}}async function a8({fs:t,gitdir:e,oid:r}){let n=r.slice(0,2);return(await t.readdir(`${e}/objects/${n}`)).map(a=>`${n}${a}`).filter(a=>a.startsWith(r))}async function s8({fs:t,cache:e,gitdir:r,oid:n,getExternalRefDelta:i}){let a=[],s=await t.readdir(O.join(r,"objects/pack"));s=s.filter(o=>o.endsWith(".idx"));for(let o of s){let l=`${r}/objects/pack/${o}`,u=await Og({fs:t,cache:e,filename:l,getExternalRefDelta:i});if(u.error)throw new de(u.error);for(let c of u.offsets.keys())c.startsWith(n)&&a.push(c)}return a}async function o8({fs:t,cache:e,gitdir:r,oid:n}){let i=o=>qe({fs:t,cache:e,gitdir:r,oid:o}),a=await a8({fs:t,gitdir:r,oid:n}),s=await s8({fs:t,cache:e,gitdir:r,oid:n,getExternalRefDelta:i});for(let o of s)a.indexOf(o)===-1&&a.push(o);if(a.length===1)return a[0];throw a.length>1?new ac("oids",n,a):new Le(`an object matching "${n}"`)}async function zE({fs:t,dir:e,gitdir:r=O.join(e,".git"),oid:n,cache:i={}}){try{return C("fs",t),C("gitdir",r),C("oid",n),await o8({fs:new J(t),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.expandOid",a}}async function VE({fs:t,dir:e,gitdir: Line truncated
`,d+=m.conflict.a.join(""),d+=`${"=".repeat(f)}
`,d+=m.conflict.b.join(""),d+=`${">".repeat(f)} ${n}
`);return{cleanMerge:h,mergedText:d}}async function c8({fs:t,cache:e,dir:r,gitdir:n=O.join(r,".git"),index:i,ourOid:a,baseOid:s,theirOid:o,ourName:l="ours",baseName:u="base",theirName:c="theirs",dryRun:f=!1,abortOnConflict:d=!0,mergeDriver:h}){let m=$r({ref:a}),g=$r({ref:s}),v=$r({ref:o}),w=[],b=[],E=[],x=[],k=await ua({fs:t,cache:e,dir:r,gitdir:n,trees:[m,g,v],map:async function(A,[y,S,_]){let T=jf(A),P=await Wf(y,S),F=await Wf(_,S);switch(`${P}-${F}`){case"false-false":return{mode:await S.mode(),path:T,oid:await S.oid(),type:await S.type()};case"false-true":return!_&&await y.type()==="tree"?{mode:await y.mode(),path:T,oid:await y.oid(),type:await y.type()}:_?{mode:await _.mode(),path:T,oid:await _.oid(),type:await _.type()}:void 0;case"true-false":return!y&&await _.type()==="tree"?{mode:await _.mode(),path:T,oid:await _.oid(),type:await _.type()}:y?{mode:await y.mode(),path:T,oid:await y.oid(),type:await y.type()}:void 0;case"true-true":{if(y&&_&&await y.type()==="tree"&&await _.type()==="tree")return{mode:await y.mode(),path:T,oid:await y.oid(),type:"tree"};if(y&&_&&await y.type()==="blob"&&await _.type()==="blob")return u8({fs:t,gitdir:n,path:T,ours:y,base:S,theirs:_,ourName:l,baseName:u,theirName:c,mergeDriver:h}).then(async D=>{if(D.cleanMerge)d||i.insert({filepath:A,oid:D.mergeResult.oid,stage:0});else if(w.push(A),b.push(A),!d){let M="";S&&await S.type()==="blob"&&(M=await S.oid());let re=await y.oid(),ye=await _.oid();i.delete({filepath:A}),M&&i.insert({filepath:A,oid:M,stage:1}),i.insert({filepath:A,oid:re,stage:2}),i.insert({filepath:A,oid:ye,stage:3})}return D.mergeResult});if(S&&!y&&_&&await S.type()==="blob"&&await _.type()==="blob"){if(w.push(A),E.push(A),!d){let D=await S.oid(),M=await _.oid();i.delete({filepath:A}),i.insert({filepath:A,oid:D,stage:1}),i.insert({filepath:A,oid:M,stage:3})}return{mode:await _.mode(),oid:await _.oid(),type:"blob",path:T}}if(S&&y&&!_&&await S.type()==="blob"&&await y.type()==="blob"){if(w.push(A),x.push(A),!d){let D=await S.oid(),M=await y.oid();i.delete({filepath:A}),i.insert({filepath:A,oid:D,stage:1}),i.insert({filepath:A,oid:M,stage:2})}return{mode:await y.mode(),oid:await y.oid(),type:"blob",path:T}}if(S&&!y&&!_&&(await S.type()==="blob"||await S.type()==="tree"))return;throw new wo}}},reduce:w.length!==0&&(!r||d)?void 0:async(A,y)=>{let S=y.filter(Boolean);if(A&&!(A&&A.type==="tree"&&S.length===0&&A.path!==".")){if(S.length>0||A.path==="."&&S.length===0){let T=new pr(S).toObject(),P=await gr({fs:t,gitdir:n,type:"tree",object:T,dryRun:f});A.oid=P}return A}}});return w.length!==0?(r&&!d&&await ua({fs:t,cache:e,dir:r,gitdir:n,trees:[$r({ref:k.oid})],map:async function(A,[y]){let S=`${r}/${A}`;if(await y.type()==="blob"){let _=await y.mode(),T=new TextDecoder().decode(await y.content());await t.write(S,T,{mode:_})}return!0}}),new yo(w,b,E,x)):k.oid}async function u8({fs:t,gitdir:e,path:r,ours:n,base:i,theirs:a,ourName:s,theirName:o,baseName:l,dryRun:u,mergeDriver:c=l8}){let f="blob",d="100755",h="",m="";i&&await i.type()==="blob"&&(d=await i.mode(),h=await i.oid(),m=Buffer.from(await i.content()).toString("utf8"));let g=d===await n.mode()?await a.mode():await n.mode();if(await n.oid()===await a.oid())return{cleanMerge:!0,mergeResult:{mode:g,path:r,oid:await n.oid(),type:f}};if(await n.oid()===h)return{cleanMerge:!0,mergeResult:{mode:g,path:r,oid:await a.oid(),type:f}};if(await a.oid()===h)return{cleanMerge:!0,mergeResult:{mode:g,path:r,oid:await n.oid(),type:f}};let v=Buffer.from(await n.content()).toString("utf8"),w=Buffer.from(await a.content()).toString("utf8"),{mergedText:b,cleanMerge:E}=await c({branches:[l,s,o],contents:[m,v,w],path:r}),x=await gr({fs:t,gitdir:e,type:"blob",object:Buffer.from(b,"utf8"),dryRun:u});return{cleanMerge:E,mergeResult:{mode:g,path:r,oid:x,type:f}}}async function WE({fs:t,cache:e,dir:r,gitdir:n,ours:i,theirs:a,fastForward:s=!0,fastForwardOnly:o=!1,dryRun:l=!1,noUpdateBranch:u=!1,abortOnConflict:c=!0,message:f,author:d,committer:h,signingKey:m,onSign:g,mergeDriver:v,allowUnrelatedHistories:w=!1}){i===void 0&&(i=await pa({fs:t,gitdir:n,fullname:!0})),i=await z.expand({fs:t,gitdir:n,ref:i}),a=await z.expand({fs:t,gitdir:n,ref:a});let b=await z.resolve({fs:t,gitdir:n,ref:i}),E=await z.resolve({fs:t,gitdir:n,ref:a}),x=await Ng({fs:t,cache:e,gitdir:n,oids:[b,E]});if(x.length!==1)if(x.length===0&&w)x.push("4b825dc642cb6eb9a060e54bf8d69288fbee4904");else throw new wo;let k=x[0];if(k===E)return{oid:b,alreadyMerged:!0};if(s&&k===b)return!l&&!u&&await z.writeRef({fs:t,gitdir:n,ref:i,value:E}),{oid:E,fastForward:!0};{if(o)throw new cc;let A=await ct.acquire({fs:t,gitdir:n,cache:e,allowUnmerged:!1},async S=>c8({fs:t,cache:e,dir:r,gitdir:n,index:S,ourOid:b,theirOid:E,baseOid:k,ourName:Ka(i),baseName:"base",theirName:Ka(a),dryRun:l,abortOnConflict:c,mergeDriver:v}));if(A instanceof yo)throw A;return f||(f=`Merge branch '${Ka(a)}' into ${Ka(i)}`),{oid:await Qf({fs:t,cache:e,gitdir:n,message:f,ref:i,tree:A,parent:[b,E],author:d,committer:h,sig Line truncated
`)),n.push(Qe.encode(`agent=${td.agent}
`)),(r||e||t)&&n.push(Qe.delim()),r&&n.push(Qe.encode("peel")),e&&n.push(Qe.encode("symrefs")),t&&n.push(Qe.encode(`ref-prefix ${t}`)),n.push(Qe.flush()),n}async function vk({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1,protocolVersion:l=2,prefix:u,symrefs:c,peelTags:f}){try{C("http",t),C("url",a);let d=await ko.discover({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:l});if(d.protocolVersion===1)return nk(d,u,c,f);let h=await w8({prefix:u,symrefs:c,peelTags:f}),m=await ko.connect({http:t,auth:d.auth,headers:s,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,body:h});return v8(m.body)}catch(d){throw d.caller="git.listServerRefs",d}}async function wk({fs:t,dir:e,gitdir:r=O.join(e,".git")}){try{return C("fs",t),C("gitdir",r),z.listTags({fs:new J(t),gitdir:r})}catch(n){throw n.caller="git.listTags",n}}function y8(t,e){return t.committer.timestamp-e.committer.timestamp}var b8="e69de29bb2d1d6434b8b29ae775ad8c2e48c5391";async function oE({fs:t,cache:e,gitdir:r,oid:n,fileId:i}){if(i===b8)return;let a=n,s,o=await xo({fs:t,cache:e,gitdir:r,oid:n}),l=o.tree;return i===o.oid?s=o.path:(s=await yk({fs:t,cache:e,gitdir:r,tree:l,fileId:i,oid:a}),Array.isArray(s)&&(s.length===0?s=void 0:s.length===1&&(s=s[0]))),s}async function yk({fs:t,cache:e,gitdir:r,tree:n,fileId:i,oid:a,filepaths:s=[],parentPath:o=""}){let l=n.entries().map(function(u){let c;return u.oid===i?(c=O.join(o,u.path),s.push(c)):u.type==="tree"&&(c=qe({fs:t,cache:e,gitdir:r,oid:u.oid}).then(function({object:f}){return yk({fs:t,cache:e,gitdir:r,tree:pr.from(f),fileId:i,oid:a,filepaths:s,parentPath:O.join(o,u.path)})})),c});return await Promise.all(l),s}async function _8({fs:t,cache:e,gitdir:r,filepath:n,ref:i,depth:a,since:s,force:o,follow:l}){let u=typeof s=="undefined"?void 0:Math.floor(s.valueOf()/1e3),c=[],f=await Qa.read({fs:t,gitdir:r}),d=await z.resolve({fs:t,gitdir:r,ref:i}),h=[await Eo({fs:t,cache:e,gitdir:r,oid:d})],m,g,v;function w(b){v&&n&&c.push(b)}for(;h.length>0;){let b=h.pop();if(u!==void 0&&b.commit.committer.timestamp<=u)break;if(n){let E;try{E=await yc({fs:t,cache:e,gitdir:r,oid:b.commit.tree,filepath:n}),g&&m!==E&&c.push(g),m=E,g=b,v=!0}catch(x){if(x instanceof Le){let k=l&&m;if(k&&(k=await oE({fs:t,cache:e,gitdir:r,oid:b.commit.tree,fileId:m}),k))if(Array.isArray(k)){if(g){let A=await oE({fs:t,cache:e,gitdir:r,oid:g.commit.tree,fileId:m});if(Array.isArray(A))if(k=k.filter(y=>A.indexOf(y)===-1),k.length===1)k=k[0],n=k,g&&c.push(g);else{k=!1,g&&c.push(g);break}}}else n=k,g&&c.push(g);if(!k){if(v&&m&&(c.push(g),!o))break;if(!o&&!l)throw x}g=b,v=!1}else throw x}}else c.push(b);if(a!==void 0&&c.length===a){w(b);break}if(!f.has(b.oid))for(let E of b.commit.parent){let x=await Eo({fs:t,cache:e,gitdir:r,oid:E});h.map(k=>k.oid).includes(x.oid)||h.push(x)}h.length===0&&w(b),h.sort((E,x)=>y8(E.commit,x.commit))}return c}async function bk({fs:t,dir:e,gitdir:r=O.join(e,".git"),filepath:n,ref:i="HEAD",depth:a,since:s,force:o,follow:l,cache:u={}}){try{return C("fs",t),C("gitdir",r),C("ref",i),await _8({fs:new J(t),cache:u,gitdir:r,filepath:n,ref:i,depth:a,since:s,force:o,follow:l})}catch(c){throw c.caller="git.log",c}}async function _k({fs:t,onSign:e,dir:r,gitdir:n=O.join(r,".git"),ours:i,theirs:a,fastForward:s=!0,fastForwardOnly:o=!1,dryRun:l=!1,noUpdateBranch:u=!1,abortOnConflict:c=!0,message:f,author:d,committer:h,signingKey:m,cache:g={},mergeDriver:v,allowUnrelatedHistories:w=!1}){try{C("fs",t),m&&C("onSign",e);let b=new J(t),E=await da({fs:b,gitdir:n,author:d});if(!E&&(!o||!s))throw new zt("author");let x=await So({fs:b,gitdir:n,author:E,committer:h});if(!x&&(!o||!s))throw new zt("committer");return await WE({fs:b,cache:g,dir:r,gitdir:n,ours:i,theirs:a,fastForward:s,fastForwardOnly:o,dryRun:l,noUpdateBranch:u,abortOnConflict:c,message:f,author:E,committer:x,signingKey:m,onSign:e,mergeDriver:v,allowUnrelatedHistories:w})}catch(b){throw b.caller="git.merge",b}}var x8={commit:16,tree:32,blob:48,tag:64,ofs_delta:96,ref_delta:112};async function xk({fs:t,cache:e,dir:r,gitdir:n=O.join(r,".git"),oids:i}){let a=new cE,s=[];function o(c,f){let d=Buffer.from(c,f);s.push(d),a.update(d)}async function l({stype:c,object:f}){let d=x8[c],h=f.length,m=h>15?128:0,g=h&15;h=h>>>4;let v=(m|d|g).toString(16);for(o(v,"hex");m;)m=h>127?128:0,v=m|h&127,o($g(2,v),"hex"),h=h>>>7;o(Buffer.from(await _E(f)))}o("PACK"),o("00000002","hex"),o($g(8,i.length),"hex");for(let c of i){let{type:f,object:d}=await qe({fs:t,cache:e,gitdir:n,oid:c});await l({write:o,object:d,stype:f})}let u=a.digest();return s.push(u),s}async function S8({fs:t,cache:e,gitdir:r,oids:n,write:i}){let a=await xk({fs:t,cache:e,gitdir:r,oids:n}),s=Buffer.from(await Yf(a)),l=`pack-${s.slice(-20).toString("hex")}.pack`;return i?(await t.write(O.join(r,`objects/pack/${l}`),s),{filename:l}):{filename:l,packfile:new Uint8Array(s)}}async function Sk({fs:t,dir:e,gi Line truncated
`),i=await n();let a=r.toString("utf8").split(`
`);if(i=a.shift(),!i.startsWith("unpack "))throw new Ja('unpack ok" or "unpack [error message]',i);e.ok=i==="unpack ok",e.ok||(e.error=i.slice(7)),e.refs={};for(let s of a){if(s.trim()==="")continue;let o=s.slice(0,2),l=s.slice(3),u=l.indexOf(" ");u===-1&&(u=l.length);let c=l.slice(0,u),f=l.slice(u+1);e.refs[c]={ok:o==="ok",error:f}}return e}async function A8({capabilities:t=[],triplets:e=[]}){let r=[],n=`\0 ${t.join(" ")}`;for(let i of e)r.push(Qe.encode(`${i.oldoid} ${i.oid} ${i.fullRef}${n}
`)),n="";return r.push(Qe.flush()),r}async function T8({fs:t,cache:e,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,onPrePush:l,gitdir:u,ref:c,remoteRef:f,remote:d,url:h,force:m=!1,delete:g=!1,corsProxy:v,headers:w={}}){let b=c||await pa({fs:t,gitdir:u});if(typeof b=="undefined")throw new hr("ref");let E=await nt.get({fs:t,gitdir:u});d=d||await E.get(`branch.${b}.pushRemote`)||await E.get("remote.pushDefault")||await E.get(`branch.${b}.remote`)||"origin";let x=h||await E.get(`remote.${d}.pushurl`)||await E.get(`remote.${d}.url`);if(typeof x=="undefined")throw new hr("remote OR url");let k=f||await E.get(`branch.${b}.merge`);if(typeof x=="undefined")throw new hr("remoteRef");v===void 0&&(v=await E.get("http.corsProxy"));let A=await z.expand({fs:t,gitdir:u,ref:b}),y=g?"0000000000000000000000000000000000000000":await z.resolve({fs:t,gitdir:u,ref:A}),S=Ao.getRemoteHelperFor({url:x}),_=await S.discover({http:r,onAuth:a,onAuthSuccess:s,onAuthFailure:o,corsProxy:v,service:"git-receive-pack",url:x,headers:w,protocolVersion:1}),T=_.auth,P;if(!k)P=A;else try{P=await z.expandAgainstMap({ref:k,map:_.refs})}catch(Z){if(Z instanceof Le)P=k.startsWith("refs/")?k:`refs/heads/${k}`;else throw Z}let F=_.refs.get(P)||"0000000000000000000000000000000000000000";if(l&&!await l({remote:d,url:x,localRef:{ref:g?"(delete)":A,oid:y},remoteRef:{ref:P,oid:F}}))throw new _o;let D=!_.capabilities.has("no-thin"),M=new Set;if(!g){let Z=[..._.refs.values()],H=new Set;if(F!=="0000000000000000000000000000000000000000"){let Oe=await Ng({fs:t,cache:e,gitdir:u,oids:[y,F]});for(let cr of Oe)Z.push(cr);D&&(H=await yg({fs:t,cache:e,gitdir:u,oids:Oe}))}if(!Z.includes(y)){let Oe=await E8({fs:t,cache:e,gitdir:u,start:[y],finish:Z});M=await yg({fs:t,cache:e,gitdir:u,oids:Oe})}if(D){try{let Oe=await z.resolve({fs:t,gitdir:u,ref:`refs/remotes/${d}/HEAD`,depth:2}),{oid:cr}=await z.resolveAgainstMap({ref:Oe.replace(`refs/remotes/${d}/`,""),fullref:Oe,map:_.refs}),Gt=[cr];for(let Y of await yg({fs:t,cache:e,gitdir:u,oids:Gt}))H.add(Y)}catch(Oe){}for(let Oe of H)M.delete(Oe)}if(y===F&&(m=!0),!m){if(A.startsWith("refs/tags")&&F!=="0000000000000000000000000000000000000000")throw new bo("tag-exists");if(y!=="0000000000000000000000000000000000000000"&&F!=="0000000000000000000000000000000000000000"&&!await lk({fs:t,cache:e,gitdir:u,oid:y,ancestor:F,depth:-1}))throw new bo("not-fast-forward")}}let re=ME([..._.capabilities],["report-status","side-band-64k",`agent=${td.agent}`]),ye=await A8({capabilities:re,triplets:[{oldoid:F,oid:y,fullRef:P}]}),me=g?[]:await xk({fs:t,cache:e,gitdir:u,oids:[...M]}),fe=await S.connect({http:r,onProgress:n,corsProxy:v,service:"git-receive-pack",url:x,auth:T,headers:w,body:[...ye,...me]}),{packfile:Ge,progress:oe}=await Xf.demux(fe.body);if(i){let Z=DE(oe);_c(Z,async H=>{await i(H)})}let B=await k8(Ge);if(fe.headers&&(B.headers=fe.headers),d&&B.ok&&B.refs[P].ok&&!A.startsWith("refs/tags")){let Z=`refs/remotes/${d}/${P.replace("refs/heads","")}`;g?await z.deleteRef({fs:t,gitdir:u,ref:Z}):await z.writeRef({fs:t,gitdir:u,ref:Z,value:y})}if(B.ok&&Object.values(B.refs).every(Z=>Z.ok))return B;{let Z=Object.entries(B.refs).filter(([H,Oe])=>!Oe.ok).map(([H,Oe])=>`
- ${H}: ${Oe.error}`).join("");throw new uc(Z,B)}}async function kk({fs:t,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPrePush:o,dir:l,gitdir:u=O.join(l,".git"),ref:c,remoteRef:f,remote:d="origin",url:h,force:m=!1,delete:g=!1,corsProxy:v,headers:w={},cache:b={}}){try{return C("fs",t),C("http",e),C("gitdir",u),await T8({fs:new J(t),cache:b,http:e,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPrePush:o,gitdir:u,ref:c,remoteRef:f,remote:d,url:h,force:m,delete:g,corsProxy:v,headers:w})}catch(E){throw E.caller="git.push",E}}async function Ak({fs:t,cache:e,gitdir:r,oid:n}){let{type:i,object:a}=await qe({fs:t,cache:e,gitdir:r,oid:n});if(i==="tag")return n=Fr.from(a).parse().object,Ak({fs:t,cache:e,gitdir:r,oid:n});if(i!=="blob")throw new rr(n,i,"blob");return{oid:n,blob:new Uint8Array(a)}}async function Tk({fs:t,cache:e,gitdir:r,oid:n,filepath:i=void 0}){return i!==void 0&&(n=await yc({fs:t,cache:e,gitdir:r,oid:n,filepath:i})),await Ak({fs:t,cache:e,gitdir:r,oid:n})}async function Ck({fs:t,dir:e,gitdir:r=O.join(e,".git"),oid:n,filepath:i,cache:a={}}){try{return C("fs",t),C("gitdir",r),C("oid",n),await Tk({fs:new J(t),cache:a,gitdir:r,oid:n,filepath:i})}catch(s){throw s.caller="git.readBlob",s}}async function Bg({fs:t,dir:e,gitdir:r=O.join(e,".git"),oid:n,cache:i={}}){try{return C("fs",t),C("gitdir",r),C("oid",n),await Eo({fs:new J(t),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.readCommit",a}}async function C8({fs:t,cache:e,gitdir:r,ref:n="refs/notes/commits",oid:i}){let a=await z.resolve({gitdir:r,fs:t,ref:n}),{blob:s}=await Tk({fs:t,cache:e,gitdir:r,oid:a,filepath:i});return s}async function Pk({fs:t,dir:e,gitdir:r=O.join(e,".git"),ref:n="refs/notes/commits",oid:i,cache:a={}}){try{return C("fs",t),C("gitdir",r),C("ref",n),C("oid",i),await C8({fs:new J(t),cache:a,gitdir:r,ref:n,oid:i})}catch(s){throw s.caller="git.readNote",s}}async function Rk({fs:t,dir:e,gitdir:r=O.join(e,".git"),oid:n,format:i="parsed",filepath:a=void 0,encoding:s=void 0,cache:o={}}){try{C("fs",t),C("gitdir",r),C("oid",n);let l=new J(t);a!==void 0&&(n=await yc({fs:l,cache:o,gitdir:r,oid:n,filepath:a}));let c=await qe({fs:l,cache:o,gitdir:r,oid:n,format:i==="parsed"?"content":i});if(c.oid=n,i==="parsed")switch(c.format="parsed",c.type){case"commit":c.object=mr.from(c.object).parse();break;case"tree":c.object=pr.from(c.object).entries();break;case"blob":s?c.object=c.object.toString(s):(c.object=new Uint8Array(c.object),c.format="content");break;case"tag":c.object=Fr.from(c.object).parse();break;default:throw new rr(c.oid,c.type,"blob|commit|tag|tree")}else(c.format==="deflated"||c.format==="wrapped")&&(c.type=c.format);return c}catch(l){throw l.caller="git.readObject",l}}async function P8({fs:t,cache:e,gitdir:r,oid:n}){let{type:i,object:a}=await qe({fs:t,cache:e,gitdir:r,oid:n,format:"content"});if(i!=="tag")throw new rr(n,i,"tag");let s=Fr.from(a);return{oid:n,tag:s.parse(),payload:s.payload()}}async function Ik({fs:t,dir:e,gitdir:r=O.join(e,".git"),oid:n,cache:i={}}){try{return C("fs",t),C("gitdir",r),C("oid",n),await P8({fs:new J(t),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.readTag",a}}async function $k({fs:t,dir:e,gitdir:r=O.join(e,".git"),oid:n,filepath:i=void 0,cache:a={}}){try{return C("fs",t),C("gitdir",r),C("oid",n),await Po({fs:new J(t),cache:a,gitdir:r,oid:n,filepath:i})}catch(s){throw s.caller="git.readTree",s}}async function Fk({fs:t,dir:e,gitdir:r=O.join(e,".git"),filepath:n,cache:i={}}){try{C("fs",t),C("gitdir",r),C("filepath",n),await ct.acquire({fs:new J(t),gitdir:r,cache:i},async function(a){a.delete({filepath:n})})}catch(a){throw a.caller="git.remove",a}}async function R8({fs:t,cache:e,onSign:r,gitdir:n,ref:i="refs/notes/commits",oid:a,author:s,committer:o,signingKey:l}){let u;try{u=await z.resolve({gitdir:n,fs:t,ref:i})}catch(m){if(!(m instanceof Le))throw m}let f=(await Po({fs:t,gitdir:n,oid:u||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;f=f.filter(m=>m.path!==a);let d=await bc({fs:t,gitdir:n,tree:f});return await Qf({fs:t,cache:e,onSign:r,gitdir:n,ref:i,tree:d,parent:u&&[u],message:`Note removed by 'isomorphic-git removeNote'
`,author:s,committer:o,signingKey:l})}async function Ok({fs:t,onSign:e,dir:r,gitdir:n=O.join(r,".git"),ref:i="refs/notes/commits",oid:a,author:s,committer:o,signingKey:l,cache:u={}}){try{C("fs",t),C("gitdir",n),C("oid",a);let c=new J(t),f=await da({fs:c,gitdir:n,author:s});if(!f)throw new zt("author");let d=await So({fs:c,gitdir:n,author:f,committer:o});if(!d)throw new zt("committer");return await R8({fs:c,cache:u,onSign:e,gitdir:n,ref:i,oid:a,author:f,committer:d,signingKey:l})}catch(c){throw c.caller="git.removeNote",c}}async function I8({fs:t,gitdir:e,oldref:r,ref:n,checkout:i=!1}){if(n!==Xn.clean(n))throw new wn(n,Xn.clean(n));if(r!==Xn.clean(r))throw new wn(r,Xn.clean(r));let a=`refs/heads/${r}`,s=`refs/heads/${n}`;if(await z.exists({fs:t,gitdir:e,ref:s}))throw new vn("branch",n,!1);let l=await z.resolve({fs:t,gitdir:e,ref:a,depth:1});await z.writeRef({fs:t,gitdir:e,ref:s,value:l}),await z.deleteRef({fs:t,gitdir:e,ref:a});let c=await pa({fs:t,gitdir:e,fullname:!0})===a;(i||c)&&await z.writeSymbolicRef({fs:t,gitdir:e,ref:"HEAD",value:s})}async function Mk({fs:t,dir:e,gitdir:r=O.join(e,".git"),ref:n,oldref:i,checkout:a=!1}){try{return C("fs",t),C("gitdir",r),C("ref",n),C("oldref",i),await I8({fs:new J(t),gitdir:r,ref:n,oldref:i,checkout:a})}catch(s){throw s.caller="git.renameBranch",s}}async function Dk({gitdir:t,type:e,object:r}){return ki(la.wrap({type:e,object:r}))}async function Lk({fs:t,dir:e,gitdir:r=O.join(e,".git"),filepath:n,ref:i,cache:a={}}){try{C("fs",t),C("gitdir",r),C("filepath",n);let s=new J(t),o,l;try{o=await z.resolve({fs:s,gitdir:r,ref:i||"HEAD"})}catch(f){if(i)throw f}if(o)try{o=await yc({fs:s,cache:a,gitdir:r,oid:o,filepath:n})}catch(f){o=null}let u={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:0,uid:0,gid:0,size:0},c=e&&await s.read(O.join(e,n));c&&(l=await Dk({gitdir:r,type:"blob",object:c}),o===l&&(u=await s.lstat(O.join(e,n)))),await ct.acquire({fs:s,gitdir:r,cache:a},async function(f){f.delete({filepath:n}),o&&f.insert({filepath:n,stats:u,oid:o})})}catch(s){throw s.caller="git.reset",s}}async function Nk({fs:t,dir:e,gitdir:r=O.join(e,".git"),ref:n,depth:i}){try{return C("fs",t),C("gitdir",r),C("ref",n),await z.resolve({fs:new J(t),gitdir:r,ref:n,depth:i})}catch(a){throw a.caller="git.resolveRef",a}}async function Bk({fs:t,dir:e,gitdir:r=O.join(e,".git"),path:n,value:i,append:a=!1}){try{C("fs",t),C("gitdir",r),C("path",n);let s=new J(t),o=await nt.get({fs:s,gitdir:r});a?await o.append(n,i):await o.set(n,i),await nt.save({fs:s,gitdir:r,config:o})}catch(s){throw s.caller="git.setConfig",s}}async function Hk({fs:t,gitdir:e,commit:r}){let n=mr.from(r).toObject();return await gr({fs:t,gitdir:e,type:"commit",object:n,format:"content"})}var Zf=class t{static get timezoneOffsetForRefLogEntry(){let e=new Date().getTimezoneOffset(),r=Math.abs(Math.floor(e/60)),n=Math.abs(e%60).toString().padStart(2,"0");return`${e>0?"-":"+"}${r.toString().padStart(2,"0")}${n}`}static createStashReflogEntry(e,r,n){let i=e.name.replace(/\s/g,""),a="0000000000000000000000000000000000000000",s=Math.floor(Date.now()/1e3),o=t.timezoneOffsetForRefLogEntry;return`${a} ${r} ${i} ${e.email} ${s} ${o} ${n}
`}static getStashReflogEntry(e,r=!1){return e.split(`
`).filter(a=>a).reverse().map((a,s)=>r?`stash@{${s}}: ${a.split(" ")[1]}`:a)}},$8={stage:ts,workdir:Co},bg;async function To(t,e){return bg===void 0&&(bg=new tc),bg.acquire(t,e)}async function F8(t,e,r,n,i=null){let a=O.join(r,n),s=await t.lstat(a);if(!s)throw new Le(a);if(s.isDirectory())throw new de(`${a}: file expected, but found directory`);let o=i?await mE({fs:t,gitdir:e,oid:i}):void 0,l=o?i:void 0;return o||await To({fs:t,gitdir:e,currentFilepath:a},async()=>{let u=s.isSymbolicLink()?await t.readlink(a).then(xE):await t.read(a);if(u===null)throw new Le(a);l=await gr({fs:t,gitdir:e,type:"blob",object:u})}),l}async function O8({fs:t,dir:e,gitdir:r,entries:n}){async function i(a){if(a.type==="tree"){if(!a.oid){let s=await Promise.all(a.children.map(i));a.oid=await bc({fs:t,gitdir:r,tree:s}),a.mode=16384}}else a.type==="blob"&&(a.oid=await F8(t,r,e,a.path,a.oid),a.mode=33188);return a.path=a.path.split("/").pop(),a}return Promise.all(n.map(i))}async function lE({fs:t,dir:e,gitdir:r,treePair:n}){let i=n[1]==="stage",a=n.map(h=>typeof h=="string"?$8[h]():h),s=[],c=await ua({fs:t,cache:{},dir:e,gitdir:r,trees:a,map:async(h,[m,g])=>{if(!(h==="."||await fa.isIgnored({fs:t,dir:e,gitdir:r,filepath:h}))&&g)return(!m||await m.oid()!==await g.oid()&&await g.oid()!==void 0)&&s.push([m,g]),{mode:await g.mode(),path:h,oid:await g.oid(),type:await g.type()}},reduce:async(h,m)=>(m=m.filter(Boolean),h?(h.children=m,h):m.length>0?m:void 0),iterate:async(h,m)=>{let g=[];for(let v of m){let[w,b]=v;i?b&&(await t.exists(`${e}/${b.toString()}`)?g.push(v):s.push([null,b])):w&&(b?g.push(v):s.push([w,null]))}return g.length?Promise.all(g.map(h)):[]}});if(s.length===0||c.length===0)return null;let d=(await O8({fs:t,dir:e,gitdir:r,entries:c})).filter(Boolean).map(h=>({mode:h.mode,path:h.path,oid:h.oid,type:h.type}));return bc({fs:t,gitdir:r,tree:d})}async function M8({fs:t,dir:e,gitdir:r,stashCommit:n,parentCommit:i,wasStaged:a}){let s=[],o=[],l=await ua({fs:t,cache:{},dir:e,gitdir:r,trees:[$r({ref:i}),$r({ref:n})],map:async(u,[c,f])=>{if(u==="."||await fa.isIgnored({fs:t,dir:e,gitdir:r,filepath:u}))return;let d=f?await f.type():await c.type();if(d!=="tree"&&d!=="blob")return;if(!f&&c){let m=d==="tree"?"rmdir":"rm";return d==="tree"&&s.push(u),d==="blob"&&a&&o.push({filepath:u,oid:await c.oid()}),{method:m,filepath:u}}let h=await f.oid();if(!c||await c.oid()!==h)return d==="tree"?{method:"mkdir",filepath:u}:(a&&o.push({filepath:u,oid:h,stats:await t.lstat(O.join(e,u))}),{method:"write",filepath:u,oid:h})}});await To({fs:t,gitdir:r,dirRemoved:s,ops:l},async()=>{for(let u of l){let c=O.join(e,u.filepath);switch(u.method){case"rmdir":await t.rmdir(c);break;case"mkdir":await t.mkdir(c);break;case"rm":await t.rm(c);break;case"write":if(!s.some(f=>c.startsWith(f))){let{object:f}=await qe({fs:t,cache:{},gitdir:r,oid:u.oid});await t.exists(c)&&await t.rm(c),await t.write(c,f)}break}}}),await ct.acquire({fs:t,gitdir:r,cache:{}},async u=>{o.forEach(({filepath:c,stats:f,oid:d})=>{u.insert({filepath:c,stats:f,oid:d})})})}var es=class t{constructor({fs:e,dir:r,gitdir:n=O.join(r,".git")}){Object.assign(this,{fs:e,dir:r,gitdir:n,_author:null})}static get refStash(){return"refs/stash"}static get refLogsStash(){return"logs/refs/stash"}get refStashPath(){return O.join(this.gitdir,t.refStash)}get refLogsStashPath(){return O.join(this.gitdir,t.refLogsStash)}async getAuthor(){if(!this._author&&(this._author=await da({fs:this.fs,gitdir:this.gitdir,author:{}}),!this._author))throw new zt("author");return this._author}async getStashSHA(e,r){return await this.fs.exists(this.refStashPath)?(r||await this.readStashReflogs({parsed:!1}))[e].split(" ")[1]:null}async writeStashCommit({message:e,tree:r,parent:n}){return Hk({fs:this.fs,gitdir:this.gitdir,commit:{message:e,tree:r,parent:n,author:await this.getAuthor(),committer:await this.getAuthor()}})}async readStashCommit(e){let r=await this.readStashReflogs({parsed:!1});if(e!==0&&(e<0||e>r.length-1))throw new wn(`stash@${e}`,"number that is in range of [0, num of stash pushed]");let n=await this.getStashSHA(e,r);return n?Eo({fs:this.fs,cache:{},gitdir:this.gitdir,oid:n}):{}}async writeStashRef(e){return z.writeRef({fs:this.fs,gitdir:this.gitdir,ref:t.refStash,value:e})}async writeStashReflogEntry({stashCommit:e,message:r}){let n=await this.getAuthor(),i=Zf.createStashReflogEntry(n,e,r),a=this.refLogsStashPath;await To({filepath:a,entry:i},async()=>{let s=await this.fs.exists(a)?await this.fs.read(a,"utf8"):"";await this.fs.write(a,s+i,"utf8")})}async readStashReflogs({parsed:e=!1}){if(!await this.fs.exists(this.refLogsStashPath))return[];let n=(await this.fs.read(this.refLogsStashPath)).toString();return Zf.getStashReflogEntry(n,e)}};async function D8({fs:t,dir:e,gitdir:r,message:n=""}){let i=new es({fs:t,dir:e,gitdir:r});await i.getAuthor();let a=await pa({fs:t,gitdir:r,fullname:!1}),s=await z.resolve({fs:t,gitdir:r,ref:"HEAD"}),l=(await Bg({fs:t,dir:e,gitdir:r,oid:s})).commit.message,u=[s],c=null,f=$r({ref:"H Line truncated
`),"utf8");let u=o[o.length-1].split(" ")[1];await i.writeStashRef(u)}else await t.rm(l)})}async function L8({fs:t,dir:e,gitdir:r}){return new es({fs:t,dir:e,gitdir:r}).readStashReflogs({parsed:!0})}async function N8({fs:t,dir:e,gitdir:r}){let n=new es({fs:t,dir:e,gitdir:r}),i=[n.refStashPath,n.refLogsStashPath];await To(i,async()=>{await Promise.all(i.map(async a=>{if(await t.exists(a))return t.rm(a)}))})}async function B8({fs:t,dir:e,gitdir:r,refIdx:n=0}){await Uk({fs:t,dir:e,gitdir:r,refIdx:n}),await jk({fs:t,dir:e,gitdir:r,refIdx:n})}async function Gk({fs:t,dir:e,gitdir:r=O.join(e,".git"),op:n="push",message:i="",refIdx:a=0}){C("fs",t),C("dir",e),C("gitdir",r),C("op",n);let s={push:D8,apply:Uk,drop:jk,list:L8,clear:N8,pop:B8},o=["apply","drop","pop"];try{let l=new J(t);["refs","logs","logs/refs"].map(f=>O.join(r,f)).forEach(async f=>{await l.exists(f)||await l.mkdir(f)});let c=s[n];if(c){if(o.includes(n)&&a<0)throw new wn(`stash@${a}`,"number that is in range of [0, num of stash pushed]");return await c({fs:l,dir:e,gitdir:r,message:i,refIdx:a})}throw new Error(`To be implemented: ${n}`)}catch(l){throw l.caller="git.stash",l}}async function qk({fs:t,dir:e,gitdir:r=O.join(e,".git"),filepath:n,cache:i={}}){try{C("fs",t),C("gitdir",r),C("filepath",n);let a=new J(t);if(await fa.isIgnored({fs:a,gitdir:r,dir:e,filepath:n}))return"ignored";let o=await H8({fs:a,cache:i,gitdir:r}),l=await zk({fs:a,cache:i,gitdir:r,tree:o,path:n}),u=await ct.acquire({fs:a,gitdir:r,cache:i},async function(g){for(let v of g)if(v.path===n)return v;return null}),c=await a.lstat(O.join(e,n)),f=l!==null,d=u!==null,h=c!==null,m=async()=>{if(d&&!Uf(u,c))return u.oid;{let g=await a.read(O.join(e,n)),v=await Dk({gitdir:r,type:"blob",object:g});return d&&u.oid===v&&c.size!==-1&&ct.acquire({fs:a,gitdir:r,cache:i},async function(w){w.insert({filepath:n,stats:c,oid:v})}),v}};if(!f&&!h&&!d)return"absent";if(!f&&!h&&d)return"*absent";if(!f&&h&&!d)return"*added";if(!f&&h&&d)return await m()===u.oid?"added":"*added";if(f&&!h&&!d)return"deleted";if(f&&!h&&d)return l===u.oid,"*deleted";if(f&&h&&!d)return await m()===l?"*undeleted":"*undeletemodified";if(f&&h&&d){let g=await m();return g===l?g===u.oid?"unmodified":"*unmodified":g===u.oid?"modified":"*modified"}}catch(a){throw a.caller="git.status",a}}async function zk({fs:t,cache:e,gitdir:r,tree:n,path:i}){typeof i=="string"&&(i=i.split("/"));let a=i.shift();for(let s of n)if(s.path===a){if(i.length===0)return s.oid;let{type:o,object:l}=await qe({fs:t,cache:e,gitdir:r,oid:s.oid});if(o==="tree"){let u=pr.from(l);return zk({fs:t,cache:e,gitdir:r,tree:u,path:i})}if(o==="blob")throw new rr(s.oid,o,"blob",i.join("/"))}return null}async function H8({fs:t,cache:e,gitdir:r}){let n;try{n=await z.resolve({fs:t,gitdir:r,ref:"HEAD"})}catch(a){if(a instanceof Le)return[]}let{tree:i}=await Po({fs:t,cache:e,gitdir:r,oid:n});return i}async function Vk({fs:t,dir:e,gitdir:r=O.join(e,".git"),ref:n="HEAD",filepaths:i=["."],filter:a,cache:s={},ignored:o=!1}){try{C("fs",t),C("gitdir",r),C("ref",n);let l=new J(t);return await ua({fs:l,cache:s,dir:e,gitdir:r,trees:[$r({ref:n}),Co(),ts()],map:async function(u,[c,f,d]){if(!c&&!d&&f&&!o&&await fa.isIgnored({fs:l,dir:e,filepath:u})||!i.some(A=>FE(u,A)))return null;if(a&&!a(u))return;let[h,m,g]=await Promise.all([c&&c.type(),f&&f.type(),d&&d.type()]),v=[h,m,g].includes("blob");if((h==="tree"||h==="special")&&!v)return;if(h==="commit")return null;if((m==="tree"||m==="special")&&!v)return;if(g==="commit")return null;if((g==="tree"||g==="special")&&!v)return;let w=h==="blob"?await c.oid():void 0,b=g==="blob"?await d.oid():void 0,E;h!=="blob"&&m==="blob"&&g!=="blob"?E="42":m==="blob"&&(E=await f.oid());let x=[void 0,w,E,b],k=x.map(A=>x.indexOf(A));return k.shift(),[u,...k]}})}catch(l){throw l.caller="git.statusMatrix",l}}async function Wk({fs:t,dir:e,gitdir:r=O.join(e,".git"),ref:n,object:i,force:a=!1}){try{C("fs",t),C("gitdir",r),C("ref",n);let s=new J(t);if(n===void 0)throw new hr("ref");n=n.startsWith("refs/tags/")?n:`refs/tags/${n}`;let o=await z.resolve({fs:s,gitdir:r,ref:i||"HEAD"});if(!a&&await z.exists({fs:s,gitdir:r,ref:n}))throw new vn("tag",n);await z.writeRef({fs:s,gitdir:r,ref:n,value:o})}catch(s){throw s.caller="git.tag",s}}async function Yk({fs:t,dir:e,gitdir:r=O.join(e,".git"),cache:n={},filepath:i,oid:a,mode:s,add:o,remove:l,force:u}){try{C("fs",t),C("gitdir",r),C("filepath",i);let c=new J(t);if(l)return await ct.acquire({fs:c,gitdir:r,cache:n},async function(d){if(!u){let h=await c.lstat(O.join(e,i));if(h){if(h.isDirectory())throw new ca("directory");return}}d.has({filepath:i})&&d.delete({filepath:i})});let f;if(!a){if(f=await c.lstat(O.join(e,i)),!f)throw new Le(`file at "${i}" on disk and "remove" not set`);if(f.isDirectory())throw new ca("directory")}return await ct.acquire({fs:c,gitdir:r,cache:n},async function(d){if(!o&&!d.has({filepath:i}))throw new Le(`file at "${i}" in index and "add" not set`);let h;if(a)h={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,m Line truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K8(t,e){if(t){if(typeof t=="string")return mA(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mA(t,e)}}function mA(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function J8(t,e){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(t)))){var r=[],n=!0,i=!1,a=void 0;try{for(var s=t[Symbol.iterator](),o;!(n=(o=s.next()).done)&&(r.push(o.value),!(e&&r.length===e));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&s.return!=null&&s.return()}finally{if(i)throw a}}return r}}function Q8(t){if(Array.isArray(t))return t}var vA=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?$/,wA=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])?$/,yA=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,bA=/^rgba?\(\s*(\d+)\s+(\d+)\s+(\d+)(?:\s*\/\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,_A=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,xA=/^rgba?\(\s*(\d+%)\s+(\d+%)\s+(\d+%)(?:\s*\/\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,SA=/^hsla?\(\s*(\d+)(deg|rad|grad|turn)?\s*,\s*(\d+)%\s*,\s*(\d+)%(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/;function Ec(t,e){return t.indexOf(e)>-1}function e6(t,e,r){var n=t/255,i=e/255,a=r/255,s=Math.max(n,i,a),o=Math.min(n,i,a),l=s-o,u=(s+o)/2;if(l===0)return[0,0,u*100];var c=l/(1-Math.abs(2*u-1)),f=function(){switch(s){case n:return(i-a)/l%6;case i:return(a-n)/l+2;default:return(n-i)/l+4}}();return[f*60,c*100,u*100]}function t6(t,e,r){var n=t/60,i=e/100,a=r/100,s=(1-Math.abs(2*a-1))*i,o=s*(1-Math.abs(n%2-1)),l=a-s/2,u=function(){return n<1?[s,o,0]:n<2?[o,s,0]:n<3?[0,s,o]:n<4?[0,o,s]:n<5?[o,0,s]:[s,0,o]}(),c=nr(u,3),f=c[0],d=c[1],h=c[2];return[(f+l)*255,(d+l)*255,(h+l)*255]}var r6=function(){function t(e){var r=nr(e,4),n=r[0],i=r[1],a=r[2],s=r[3];Y8(this,t),this.values=[Math.max(Math.min(parseInt(n,10),255),0),Math.max(Math.min(parseInt(i,10),255),0),Math.max(Math.min(parseInt(a,10),255),0),s==null?1:Math.max(Math.min(parseFloat(s),255),0)]}return X8(t,[{key:"toRgbString",value:function(){var r=nr(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3];return s===1?"rgb(".concat(n,", ").concat(i,", ").concat(a,")"):"rgba(".concat(n,", ").concat(i,", ").concat(a,", ").concat(s,")")}},{key:"toHslString",value:function(){var r=this.toHslaArray(),n=nr(r,4),i=n[0],a=n[1],s=n[2],o=n[3];return o===1?"hsl(".concat(i,", ").concat(a,"%, ").concat(s,"%)"):"hsla(".concat(i,", ").concat(a,"%, ").concat(s,"%, ").concat(o,")")}},{key:"toHexString",value:function(){var r=nr(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3];return n=Number(n).toString(16).padStart(2,"0"),i=Number(i).toString(16).padStart(2,"0"),a=Number(a).toString(16).padStart(2,"0"),s=s<1?parseInt(s*255,10).toString(16).padStart(2,"0"):"","#".concat(n).concat(i).concat(a).concat(s)}},{key:"toRgbaArray",value:function(){return this.values}},{key:"toHslaArray",value:function(){var r=nr(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3],o=e6(n,i,a),l=nr(o,3),u=l[0],c=l[1],f=l[2];return[u,c,f,s]}}]),t}();function $o(t){var e=nr(t,4),r=e[0],n=e[1],i=e[2],a=e[3];return new r6([r,n,i,a])}function Wg(t){var e=nr(t,3),r=e[0],n=e[1],i=e[2];return $o([r,n,i,1])}function ld(t){var e=nr(t,4),r=e[0],n=e[1],i=e[2],a=e[3],s=t6(r,n,i),o=nr(s,3),l=o[0],u=o[1],c=o[2];return $o([l,u,c,a])}function EA(t){var e=nr(t,3),r=e[0],n=e[1],i=e[2];return ld([r,n,i,1])}function n6(t){var e=vA.exec(t)||wA.exec(t),r=nr(e,5),n=r[1],i=r[2],a=r[3],s=r[4];return n=parseInt(n.length<2?n.repeat(2):n,16),i=parseInt(i.length<2?i.repeat(2):i,16),a=parseInt(a.length<2?a.repeat(2):a,16),s=s&&(parseInt(s.length<2?s.repeat(2):s,16)/255).toPrecision(1)||1,$o([n,i,a,s])}function i6(t){var e=yA.exec(t)||_A.exec(t)||bA.exec(t)||xA.exec(t),r=nr(e,5),n=r[1],i=r[2],a=r[3],s=r[4];return n=Ec(n,"%")?parseInt(n,10)*255/100:parseInt(n,10),i=Ec(i,"%")?parseInt(i,10)*255/100:parseInt(i,10),a=Ec(a,"%")>0?parseInt(a,10)*255/100:parseInt(a,10),s=s===void 0?1:parseFloat(s)/(Ec(s,"%")?100:1),$o([n,i,a,s])}function a6(t){var e=SA.exec(t),r=nr(e,6),n=r[1],i=r[2],a=r[3],s=r[4],o=r[5];return i=i||"deg",n=(0,W8.default)(parseFloat(n),i,"deg"),a=parseFloat(a),s=parseFloat(s),o=o===void 0?1:parseFloat(o)/(Ec(o,"%")?100:1),ld([n,a,s,o])}function kA(t){return hA.default[t]?Wg(hA.default[t]):vA.test(t)||wA.test(t)?n6(t):yA.test(t)||_A.test(t)||bA.test(t)||xA.test(t)?i6(t):SA.test(t)?a6(t):null}var s6={fromString:kA,fromRgb:Wg,fromRgba:$o,fromHsl:EA,fromHsla:ld};Ai.default=s6});var Yg=I((cZ,CA)=>{"use strict";p();var TA=Object.prototype.toString;CA.exports=function(e){var r=TA.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&TA.call(e.callee)==="[object Function]"),n}});var LA=I((fZ,DA)=>{" Line truncated
`)>=0)return!1;return!0}function E4(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=Kn.call(Array(t.indent+1)," ");else return null;return{base:r,prev:Kn.call(Array(e+1),r)}}function hv(t,e){if(t.length===0)return"";var r=`
`+e.prev+e.base;return r+Kn.call(t,","+r)+`
`+e.prev}function pd(t,e){var r=dv(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=Ti(t,i)?e(t[i],t):""}var a=typeof ov=="function"?ov(t):[],s;if(Fo){s={};for(var o=0;o<a.length;o++)s["$"+a[o]]=a[o]}for(var l in t)Ti(t,l)&&(r&&String(Number(l))===l&&l<t.length||Fo&&s["$"+l]instanceof Symbol||(OT.call(/[^\w$]/,l)?n.push(e(l,t)+": "+e(t[l],t)):n.push(l+": "+e(t[l],t))));if(typeof ov=="function")for(var u=0;u<a.length;u++)MT.call(t,a[u])&&n.push("["+e(a[u])+"]: "+e(t[a[u]],t));return n}});var GT=I((VZ,jT)=>{"use strict";p();var k4=Fc(),A4=fr(),vd=function(t,e,r){for(var n=t,i;(i=n.next)!=null;n=i)if(i.key===e)return n.next=i.next,r||(i.next=t.next,t.next=i),i},T4=function(t,e){if(t){var r=vd(t,e);return r&&r.value}},C4=function(t,e,r){var n=vd(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},P4=function(t,e){return t?!!vd(t,e):!1},R4=function(t,e){if(t)return vd(t,e,!0)};jT.exports=function(){var e,r={assert:function(n){if(!r.has(n))throw new A4("Side channel does not contain "+k4(n))},delete:function(n){var i=e&&e.next,a=R4(e,n);return a&&i&&i===a&&(e=void 0),!!a},get:function(n){return T4(e,n)},has:function(n){return P4(e,n)},set:function(n,i){e||(e={next:void 0}),C4(e,n,i)}};return r}});var vv=I((YZ,zT)=>{"use strict";p();var I4=Bn(),Oc=St(),$4=Fc(),F4=fr(),qT=I4("%Map%",!0),O4=Oc("Map.prototype.get",!0),M4=Oc("Map.prototype.set",!0),D4=Oc("Map.prototype.has",!0),L4=Oc("Map.prototype.delete",!0),N4=Oc("Map.prototype.size",!0);zT.exports=!!qT&&function(){var e,r={assert:function(n){if(!r.has(n))throw new F4("Side channel does not contain "+$4(n))},delete:function(n){if(e){var i=L4(e,n);return N4(e)===0&&(e=void 0),i}return!1},get:function(n){if(e)return O4(e,n)},has:function(n){return e?D4(e,n):!1},set:function(n,i){e||(e=new qT),M4(e,n,i)}};return r}});var WT=I((ZZ,VT)=>{"use strict";p();var B4=Bn(),yd=St(),H4=Fc(),wd=vv(),U4=fr(),Oo=B4("%WeakMap%",!0),j4=yd("WeakMap.prototype.get",!0),G4=yd("WeakMap.prototype.set",!0),q4=yd("WeakMap.prototype.has",!0),z4=yd("WeakMap.prototype.delete",!0);VT.exports=Oo?function(){var e,r,n={assert:function(i){if(!n.has(i))throw new U4("Side channel does not contain "+H4(i))},delete:function(i){if(Oo&&i&&(typeof i=="object"||typeof i=="function")){if(e)return z4(e,i)}else if(wd&&r)return r.delete(i);return!1},get:function(i){return Oo&&i&&(typeof i=="object"||typeof i=="function")&&e?j4(e,i):r&&r.get(i)},has:function(i){return Oo&&i&&(typeof i=="object"||typeof i=="function")&&e?q4(e,i):!!r&&r.has(i)},set:function(i,a){Oo&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new Oo),G4(e,i,a)):wd&&(r||(r=wd()),r.set(i,a))}};return n}:wd});var wv=I((JZ,YT)=>{"use strict";p();var V4=fr(),W4=Fc(),Y4=GT(),X4=vv(),Z4=WT(),K4=Z4||X4||Y4;YT.exports=function(){var e,r={assert:function(n){if(!r.has(n))throw new V4("Side channel does not contain "+W4(n))},delete:function(n){return!!e&&e.delete(n)},get:function(n){return e&&e.get(n)},has:function(n){return!!e&&e.has(n)},set:function(n,i){e||(e=K4()),e.set(n,i)}};return r}});var ZT=I((eK,XT)=>{"use strict";p();var J4=cf(),Mc=wv()(),Ci=fr(),yv={assert:function(t,e){if(!t||typeof t!="object"&&typeof t!="function")throw new Ci("`O` is not an object");if(typeof e!="string")throw new Ci("`slot` must be a string");if(Mc.assert(t),!yv.has(t,e))throw new Ci("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||typeof t!="object"&&typeof t!="function")throw new Ci("`O` is not an object");if(typeof e!="string")throw new Ci("`slot` must be a string");var r=Mc.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||typeof t!="object"&&typeof t!="function")throw new Ci("`O` is not an object");if(typeof e!="string")throw new Ci("`slot` must be a string");var r=Mc.get(t);return!!r&&J4(r,"$"+e)},set:function(t,e,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Ci("`O` is not an object");if(typeof e!="string")throw new Ci("`slot` must be a string");var n=Mc.get(t);n||(n={},Mc.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(yv);XT.exports=yv});var QT=I((rK,JT)=>{"use strict";p();var Dc=ZT(),Q4=ef(),KT=typeof StopIteration=="object"?StopIteration:null;JT.exports=function(e){if(!KT)throw new Q4("this environment lacks StopIteration");Dc.set(e,"[[Done]]",!1);var r={next:function(){var i=Dc.get(this,"[[Iterator]]"),a=!!Dc.get(i,"[[Done]]");try{return{done:a,value:a?void 0:i.next()}}catch(s){if(Dc.set(i,"[[Done]]",!0),s!==KT)throw s;return{done:!0,value:void 0}}}};return Dc.set(r,"[[Iterator]]",e),r}});var bv=I((iK,tC)=>{"use strict";p();var eC=St(),e5=eC("String.prototype.valueOf"),t5=function(e){try{return e5(e),!0}catch(r){return!1}},r5=eC("Object.prototype.toString"),n5="[object String]",i5=Ji()();tC.exports=function(e){return typeof e=="string"?!0:!e||typeof e!="object"?!1:i5?t5(e):r5(e)===n5}});var xv=I((sK,iC)=>{"use strict";p();var _v=typeof Map=="function"&&Map.prototype?Map:null,a5=typeof Set=="function"&&Set.prototype?Set:null,bd;_v||(bd=function(e){return!1});var nC=_v?Map.prototype.has:null,rC=a5?Set.prototyp Line truncated
`});Ge=!1,B=fe.length}function Y(Ie,Me){var It="="+H,De=Ie.indexOf(It,Me),G=u(Ie.substring(Ie.indexOf("=",Me)+1,De)).split(" ");return Z=G[0],H=G[G.length-1],De+It.length-1}for(_&&(_=_.split(" "),Z=_[0],H=_[1]),oe=0;oe<T;oe++)M==P?c(Z,S,oe)?(--oe,Oe(),M=F):S.charAt(oe)==`
`?Gt(Ge):me+=S.charAt(oe):M==F?(oe+=Z.length-1,ye=t.tags[S.charAt(oe+1)],re=ye?S.charAt(oe+1):"_v",re=="="?(oe=Y(S,oe),M=P):(ye&&oe++,M=D),Ge=oe):c(H,S,oe)?(fe.push({tag:re,n:u(me),otag:Z,ctag:H,i:re=="/"?Ge-Z.length:oe+H.length}),me="",oe+=H.length-1,M=P,re=="{"&&(H=="}}"?oe++:l(fe[fe.length-1]))):me+=S.charAt(oe);return Gt(Ge,!0),fe};function l(y){y.n.substr(y.n.length-1)==="}"&&(y.n=y.n.substring(0,y.n.length-1))}function u(y){return y.trim?y.trim():y.replace(/^\s*|\s*$/g,"")}function c(y,S,_){if(S.charAt(_)!=y.charAt(0))return!1;for(var T=1,P=y.length;T<P;T++)if(S.charAt(_+T)!=y.charAt(T))return!1;return!0}var f={_t:!0,"\n":!0,$:!0,"/":!0};function d(y,S,_,T){var P=[],F=null,D=null,M=null;for(D=_[_.length-1];y.length>0;){if(M=y.shift(),D&&D.tag=="<"&&!(M.tag in f))throw new Error("Illegal content in < super tag.");if(t.tags[M.tag]<=t.tags.$||h(M,T))_.push(M),M.nodes=d(y,M.tag,_,T);else if(M.tag=="/"){if(_.length===0)throw new Error("Closing tag without opener: /"+M.n);if(F=_.pop(),M.n!=F.n&&!m(M.n,F.n,T))throw new Error("Nesting error: "+F.n+" vs. "+M.n);return F.end=M.i,P}else M.tag==`
`&&(M.last=y.length==0||y[0].tag==`
`);P.push(M)}if(_.length>0)throw new Error("missing closing tag: "+_.pop().n);return P}function h(y,S){for(var _=0,T=S.length;_<T;_++)if(S[_].o==y.n)return y.tag="#",!0}function m(y,S,_){for(var T=0,P=_.length;T<P;T++)if(_[T].c==y&&_[T].o==S)return!0}function g(y){var S=[];for(var _ in y)S.push('"'+b(_)+'": function(c,p,t,i) {'+y[_]+"}");return"{ "+S.join(",")+" }"}function v(y){var S=[];for(var _ in y.partials)S.push('"'+b(_)+'":{name:"'+b(y.partials[_].name)+'", '+v(y.partials[_])+"}");return"partials: {"+S.join(",")+"}, subs: "+g(y.subs)}t.stringify=function(y,S,_){return"{code: function (c,p,i) { "+t.wrapMain(y.code)+" },"+v(y)+"}"};var w=0;t.generate=function(y,S,_){w=0;var T={code:"",subs:{},partials:{}};return t.walk(y,T),_.asString?this.stringify(T,S,_):this.makeTemplate(T,S,_)},t.wrapMain=function(y){return'var t=this;t.b(i=i||"");'+y+"return t.fl();"},t.template=t.Template,t.makeTemplate=function(y,S,_){var T=this.makePartials(y);return T.code=new Function("c","p","i",this.wrapMain(y.code)),new this.template(T,S,this,_)},t.makePartials=function(y){var S,_={subs:{},partials:y.partials,name:y.name};for(S in _.partials)_.partials[S]=this.makePartials(_.partials[S]);for(S in y.subs)_.subs[S]=new Function("c","p","t","i",y.subs[S]);return _};function b(y){return y.replace(a,"\\\\").replace(r,'\\"').replace(n,"\\n").replace(i,"\\r").replace(s,"\\u2028").replace(o,"\\u2029")}function E(y){return~y.indexOf(".")?"d":"f"}function x(y,S){var _="<"+(S.prefix||""),T=_+y.n+w++;return S.partials[T]={name:y.n,partials:{}},S.code+='t.b(t.rp("'+b(T)+'",c,p,"'+(y.indent||"")+'"));',T}t.codegen={"#":function(y,S){S.code+="if(t.s(t."+E(y.n)+'("'+b(y.n)+'",c,p,1),c,p,0,'+y.i+","+y.end+',"'+y.otag+" "+y.ctag+'")){t.rs(c,p,function(c,p,t){',t.walk(y.nodes,S),S.code+="});c.pop();}"},"^":function(y,S){S.code+="if(!t.s(t."+E(y.n)+'("'+b(y.n)+'",c,p,1),c,p,1,0,0,"")){',t.walk(y.nodes,S),S.code+="};"},">":x,"<":function(y,S){var _={partials:{},code:"",subs:{},inPartial:!0};t.walk(y.nodes,_);var T=S.partials[x(y,S)];T.subs=_.subs,T.partials=_.partials},$:function(y,S){var _={subs:{},code:"",partials:S.partials,prefix:y.n};t.walk(y.nodes,_),S.subs[y.n]=_.code,S.inPartial||(S.code+='t.sub("'+b(y.n)+'",c,p,i);')},"\n":function(y,S){S.code+=A('"\\n"'+(y.last?"":" + i"))},_v:function(y,S){S.code+="t.b(t.v(t."+E(y.n)+'("'+b(y.n)+'",c,p,0)));'},_t:function(y,S){S.code+=A('"'+b(y.text)+'"')},"{":k,"&":k};function k(y,S){S.code+="t.b(t.t(t."+E(y.n)+'("'+b(y.n)+'",c,p,0)));'}function A(y){return"t.b("+y+");"}t.walk=function(y,S){for(var _,T=0,P=y.length;T<P;T++)_=t.codegen[y[T].tag],_&&_(y[T],S);return S},t.parse=function(y,S,_){return _=_||{},d(y,"",[],_.sectionTags||[])},t.cache={},t.cacheKey=function(y,S){return[y,!!S.asString,!!S.disableLambda,S.delimiters,!!S.modelGet].join("||")},t.compile=function(y,S){S=S||{};var _=t.cacheKey(y,S),T=this.cache[_];if(T){var P=T.partials;for(var F in P)delete P[F].instance;return T}return T=this.generate(this.parse(this.scan(y,S.delimiters),y,S),y,S),this.cache[_]=T}})(typeof F0!="undefined"?F0:Hogan)});var BF=I(O0=>{p();var eV={};(function(t){t.Template=function(d,h,m,g){d=d||{},this.r=d.code||this.r,this.c=m,this.options=g||{},this.text=h||"",this.partials=d.partials||{},this.subs=d.subs||{},this.buf=""},t.Template.prototype={r:function(d,h,m){return""},v:c,t:u,render:function(h,m,g){return this.ri([h],m||{},g)},ri:function(d,h,m){return this.r(d,h,m)},ep:function(d,h){var m=this.partials[d],g=h[m.name];if(m.instance&&m.base==g)return m.instance;if(typeof g=="string"){if(!this.c)throw new Error("No compiler available.");g=this.c.compile(g,this.options)}if(!g)return null;if(this.partials[d].base=g,m.subs){h.stackText||(h.stackText={});for(key in m.subs)h.stackText[key]||(h.stackText[key]=this.activeSub!==void 0&&h.stackText[this.activeSub]?h.stackText[this.activeSub]:this.text);g=r(g,m.subs,m.partials,this.stackSubs,this.stackPartials,h.stackText)}return this.partials[d].instance=g,g},rp:function(d,h,m,g){var v=this.ep(d,m);return v?v.ri(h,m,g):""},rs:function(d,h,m){var g=d[d.length-1];if(!f(g)){m(d,h,this);return}for(var v=0;v<g.length;v++)d.push(g[v]),m(d,h,this),d.pop()},s:function(d,h,m,g,v,w,b){var E;return f(d)&&d.length===0?!1:(typeof d=="function"&&(d=this.ms(d,h,m,g,v,w,b)),E=!!d,!g&&E&&h&&h.push(typeof d=="object"?d:h[h.length-1]),E)},d:function(d,h,m,g){var v,w=d.split("."),b=this.f(w[0],h,m,g),E=this.options.modelGet,x=null;if(d==="."&&f(h[h.length-2]))b=h[h.length-1];else for(var k=1;k<w.length;k++)v=e(w[k],b,E),v!==void 0?(x=b,b=v):b="";return g&&!b?!1:(!g&&typeof b=="function"&&(h.push(x),b=this.mv(b,h,m),h.pop()),b)},f:function(d,h,m,g){for(var v=!1,w=null,b=!1,E=this.options.modelGet,x=h.length-1;x>=0;x--)if(w=h[x],v=e(d,w,E),v!==void 0){b=!0;break}return b?(!g&&typeof v=="function"&&(v=this.mv(v,h,m)),v):g?!1:""},ls:function(d,h,m,g,v){var w=this.options.delimiters;return this.options.delimiters=v,this.b(this.ct(u(d.call(h,g)),h,m)),this.options.delimiters=w,!1},ct:function(d, Line truncated
PROMPT="$1"
TEMP_FILE="$OBSIDIAN_GIT_CREDENTIALS_INPUT"
cleanup() {
rm -f "$TEMP_FILE" "$TEMP_FILE.response"
}
trap cleanup EXIT
echo "$PROMPT" > "$TEMP_FILE"
while [ ! -e "$TEMP_FILE.response" ]; do
if [ ! -e "$TEMP_FILE" ]; then
echo "Trigger file got removed: Abort" >&2
exit 1
fi
sleep 0.1
done
RESPONSE=$(cat "$TEMP_FILE.response")
echo "$RESPONSE"
`,aA=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];p();p();p();var xc=class{diff(e,r,n={}){let i;typeof n=="function"?(i=n,n={}):"callback"in n&&(i=n.callback);let a=this.castInput(e,n),s=this.castInput(r,n),o=this.removeEmpty(this.tokenize(a,n)),l=this.removeEmpty(this.tokenize(s,n));return this.diffWithOptionsObj(o,l,n,i)}diffWithOptionsObj(e,r,n,i){var a;let s=b=>{if(b=this.postProcess(b,n),i){setTimeout(function(){i(b)},0);return}else return b},o=r.length,l=e.length,u=1,c=o+l;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let f=(a=n.timeout)!==null&&a!==void 0?a:1/0,d=Date.now()+f,h=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(h[0],r,e,0,n);if(h[0].oldPos+1>=l&&m+1>=o)return s(this.buildValues(h[0].lastComponent,r,e));let g=-1/0,v=1/0,w=()=>{for(let b=Math.max(g,-u);b<=Math.min(v,u);b+=2){let E,x=h[b-1],k=h[b+1];x&&(h[b-1]=void 0);let A=!1;if(k){let S=k.oldPos-b;A=k&&0<=S&&S<o}let y=x&&x.oldPos+1<l;if(!A&&!y){h[b]=void 0;continue}if(!y||A&&x.oldPos<k.oldPos?E=this.addToPath(k,!0,!1,0,n):E=this.addToPath(x,!1,!0,1,n),m=this.extractCommon(E,r,e,b,n),E.oldPos+1>=l&&m+1>=o)return s(this.buildValues(E.lastComponent,r,e))||!0;h[b]=E,E.oldPos+1>=l&&(v=Math.min(v,b-1)),m+1>=o&&(g=Math.max(g,b+1))}u++};if(i)(function b(){setTimeout(function(){if(u>c||Date.now()>d)return i(void 0);w()||b()},0)})();else for(;u<=c&&Date.now()<=d;){let b=w();if(b)return b}}addToPath(e,r,n,i,a){let s=e.lastComponent;return s&&!a.oneChangePerToken&&s.added===r&&s.removed===n?{oldPos:e.oldPos+i,lastComponent:{count:s.count+1,added:r,removed:n,previousComponent:s.previousComponent}}:{oldPos:e.oldPos+i,lastComponent:{count:1,added:r,removed:n,previousComponent:s}}}extractCommon(e,r,n,i,a){let s=r.length,o=n.length,l=e.oldPos,u=l-i,c=0;for(;u+1<s&&l+1<o&&this.equals(n[l+1],r[u+1],a);)u++,l++,c++,a.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return c&&!a.oneChangePerToken&&(e.lastComponent={count:c,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=l,u}equals(e,r,n){return n.comparator?n.comparator(e,r):e===r||!!n.ignoreCase&&e.toLowerCase()===r.toLowerCase()}removeEmpty(e){let r=[];for(let n=0;n<e.length;n++)e[n]&&r.push(e[n]);return r}castInput(e,r){return e}tokenize(e,r){return Array.from(e)}join(e){return e.join("")}postProcess(e,r){return e}get useLongestToken(){return!1}buildValues(e,r,n){let i=[],a;for(;e;)i.push(e),a=e.previousComponent,delete e.previousComponent,e=a;i.reverse();let s=i.length,o=0,l=0,u=0;for(;o<s;o++){let c=i[o];if(c.removed)c.value=this.join(n.slice(u,u+c.count)),u+=c.count;else{if(!c.added&&this.useLongestToken){let f=r.slice(l,l+c.count);f=f.map(function(d,h){let m=n[u+h];return m.length>d.length?m:d}),c.value=this.join(f)}else c.value=this.join(r.slice(l,l+c.count));l+=c.count,c.added||(u+=c.count)}}return i}};p();var Gg=class extends xc{constructor(){super(...arguments),this.tokenize=q8}equals(e,r,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
`))&&(e=e.trim()),(!n.newlineIsToken||!r.includes(`
`))&&(r=r.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
`)&&(e=e.slice(0,-1)),r.endsWith(`
`)&&(r=r.slice(0,-1))),super.equals(e,r,n)}},G8=new Gg;function qg(t,e,r){return G8.diff(t,e,r)}function q8(t,e){e.stripTrailingCr&&(t=t.replace(/\r\n/g,`
`));let r=[],n=t.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(let i=0;i<n.length;i++){let a=n[i];i%2&&!e.newlineIsToken?r[r.length-1]+=a:r.push(a)}return r}p();function zg(t,e,r,n,i,a,s){let o;s?typeof s=="function"?o={callback:s}:o=s:o={},typeof o.context=="undefined"&&(o.context=4);let l=o.context;if(o.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(o.callback){let{callback:c}=o;qg(r,n,Object.assign(Object.assign({},o),{callback:f=>{let d=u(f);c(d)}}))}else return u(qg(r,n,o));function u(c){if(!c)return;c.push({value:"",lines:[]});function f(b){return b.map(function(E){return" "+E})}let d=[],h=0,m=0,g=[],v=1,w=1;for(let b=0;b<c.length;b++){let E=c[b],x=E.lines||z8(E.value);if(E.lines=x,E.added||E.removed){if(!h){let k=c[b-1];h=v,m=w,k&&(g=l>0?f(k.lines.slice(-l)):[],h-=g.length,m-=g.length)}for(let k of x)g.push((E.added?"+":"-")+k);E.added?w+=x.length:v+=x.length}else{if(h)if(x.length<=l*2&&b<c.length-2)for(let k of f(x))g.push(k);else{let k=Math.min(x.length,l);for(let y of f(x.slice(0,k)))g.push(y);let A={oldStart:h,oldLines:v-h+k,newStart:m,newLines:w-m+k,lines:g};d.push(A),h=0,m=0,g=[]}v+=x.length,w+=x.length}}for(let b of d)for(let E=0;E<b.lines.length;E++)b.lines[E].endsWith(`
`)?b.lines[E]=b.lines[E].slice(0,-1):(b.lines.splice(E+1,0,"\\ No newline at end of file"),E++);return{oldFileName:t,newFileName:e,oldHeader:i,newHeader:a,hunks:d}}}function od(t){if(Array.isArray(t))return t.map(od).join(`
`);let e=[];t.oldFileName==t.newFileName&&e.push("Index: "+t.oldFileName),e.push("==================================================================="),e.push("--- "+t.oldFileName+(typeof t.oldHeader=="undefined"?"":" "+t.oldHeader)),e.push("+++ "+t.newFileName+(typeof t.newHeader=="undefined"?"":" "+t.newHeader));for(let r=0;r<t.hunks.length;r++){let n=t.hunks[r];n.oldLines===0&&(n.oldStart-=1),n.newLines===0&&(n.newStart-=1),e.push("@@ -"+n.oldStart+","+n.oldLines+" +"+n.newStart+","+n.newLines+" @@");for(let i of n.lines)e.push(i)}return e.join(`
`)+`
`}function sA(t,e,r,n,i,a,s){if(typeof s=="function"&&(s={callback:s}),s!=null&&s.callback){let{callback:o}=s;zg(t,e,r,n,i,a,Object.assign(Object.assign({},s),{callback:l=>{o(l?od(l):void 0)}}))}else{let o=zg(t,e,r,n,i,a,s);return o?od(o):void 0}}function Sc(t,e,r,n,i,a){return sA(t,t,e,r,n,i,a)}function z8(t){let e=t.endsWith(`
`),r=t.split(`
`).map(n=>n+`
`);return e?r.pop():r.push(r.pop().slice(0,-1)),r}var te=bt(Hg()),is=require("obsidian");p();function oA(t,e){let r=Object.assign({},t.lineAuthor,e.lineAuthor);return Object.assign({},t,e,{lineAuthor:r})}var Io=class extends Error{constructor(r){super("No network connection available");this.originalError=r}};p();var lA=require("obsidian"),V8={options:[],placeholder:"",allowEmpty:!1,onlySelection:!1,initialValue:void 0,obscure:!1},ze=class extends lA.SuggestModal{constructor(e,r){if(super(e.app),this.config={...V8,...r},this.setPlaceholder(this.config.placeholder),this.config.obscure){this.inputEl.type="password";let n=this.containerEl.querySelector(".prompt-input-container");n.addClass("git-obscure-prompt"),n.setAttr("git-is-obscured","true");let i=n==null?void 0:n.createDiv({cls:"search-input-clear-button"});i.style.marginRight="32px",i.id="git-show-password",i.addEventListener("click",()=>{n.getAttr("git-is-obscured")==="true"?(this.inputEl.type="text",n.setAttr("git-is-obscured","false")):(this.inputEl.type="password",n.setAttr("git-is-obscured","true"))})}}openAndGetResult(){return new Promise(e=>{this.resolve=e,this.open(),this.config.initialValue!=null&&(this.inputEl.value=this.config.initialValue,this.inputEl.dispatchEvent(new Event("input")))})}onClose(){new Promise(e=>setTimeout(e,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(e){return this.config.onlySelection?this.config.options:this.config.allowEmpty?[e.length>0?e:" ",...this.config.options]:[e.length>0?e:"...",...this.config.options]}renderSuggestion(e,r){this.config.obscure?r.hide():r.setText(e)}onChooseSuggestion(e,r){if(this.resolve){let n;this.config.allowEmpty&&e===" "?n="":e==="..."?n=void 0:n=e,this.resolve(n)}}};p();var V2=bt(AA()),W2=require("child_process"),Y2=bt(z2()),Pi=require("obsidian");function Md(t){throw new Error(`Unexpected object: ${t}`)}function Lc(t,e,r){return t===1?`${t} ${e}`:`${t} ${r!=null?r:e+"s"}`}var Kv=(t,e)=>t==="."||e==null||e.length===0||e==="."?!0:e.length>=t.length?e.startsWith(t):t.startsWith(e);function bn(t,e){let r;if(e){if(e.button===0||e.button===1){let n=Pi.Keymap.isModEvent(e);r=t.workspace.getLeaf(n)}}else r=t.workspace.getLeaf(!1);return r}function Qn(t,e,r,n,i){if(e.button==2){let a=t.vault.getAbstractFileByPath(r);if(a!=null){let s=new Pi.Menu;t.workspace.trigger("file-menu",s,a,i,n),s.showAtPosition({x:e.pageX,y:e.pageY})}else{let s=new Pi.Menu;t.workspace.trigger("obsidian-git:menu",s,r,i,n),s.showAtPosition({x:e.pageX,y:e.pageY})}}}function ba(t){throw new Error("Impossible branch: "+t)}function Jv(t){return`rgb(${t.r},${t.g},${t.b})`}function X2(t){var a;let e=(a=V2.fromString(t))==null?void 0:a.toRgbaArray();if(e===void 0)return;let[r,n,i]=e;return{r,g:n,b:i}}function Z2(t){return t.diff(Pi.moment.unix(0),"seconds")}function K2(t){if(t.length!==0)return t.slice().sort()[Math.floor(t.length/2)]}function J2(t,e){return(0,Y2.default)(t,e,{strict:!0})}function Nc(t,e){return new Proxy(t,{get(r,n){return n==="length"?Math.min(e,r.length):r[n]}})}function Q2(t,e,r){return t.length<=e?new Array(e-t.length).fill(r).join("")+t:t.substring(t.length-e)}function eP(t,e){if(e<=0)return t;let r=new Array(e).fill(" ").join(""),n=t.substring(e,t.length);return r+n}function Qv(t,e,r){return t<=e&&e<=r}function Ri(t){let[e,...r]=t.split("/");return[e,r.length===0?void 0:r.join("/")]}function ei(t){return t.endsWith("/")?t:t.split("/").last().replace(/\.md$/,"")}function tP(t){return t===1?"1 minute":`${t} minutes`}function uU(t){let e=t.lastIndexOf(".");return t.substring(e+1)}function Do(t){if(t.endsWith(".md"))return!1;let e=uU(t);return aA.includes(e)}function ew(t){return(t.startsWith("https://github.com/")||t.startsWith("https://gitlab.com/"))&&(t.endsWith(".git")||(t=t+".git")),t}function Lo(t,e){let r=e.vault.getAbstractFileByPath(t);if(!(r instanceof Pi.TFile))return!1;try{return!!e.viewRegistry.getTypeByExtension(r.extension)}catch(n){return!0}}function rP({isFolder:t,gitRelativePath:e}){let r="/";return r+=e,t&&(r+="/"),r.replace(/([\\!#*?[\]])/g,String.raw`\$1`).replace(/\s(?=\s*$)/g,String.raw`\ `)}function No(t,e,r,n){let i=e.target;t.workspace.trigger("hover-link",{event:e,source:r.getViewType(),hoverParent:r,targetEl:i,linktext:n})}function Bc(t,e,r={}){return new Promise((n,i)=>{let a=(0,W2.spawn)(t,e,r),s="",o="";a.stdout.on("data",l=>{s+=l.toString()}),a.stderr.on("data",l=>{o+=l.toString()}),a.on("error",l=>{n({error:new Error(l.message),stdout:s,stderr:s,code:1})}),a.on("close",l=>{n({stdout:s,stderr:o,code:l!=null?l:1,error:void 0})})})}p();var nP=require("obsidian"),Bo=class{constructor(e){this.plugin=e,this.app=e.app}getRelativeVaultPath(e){return this.plugin.settings.basePath?this.plugin.settings.basePath+"/"+e:e}getRelativeRepoPath(e,r=!0){return r&&this.plugin.settings.basePath.length>0?e.substring(this.plugin.settings.basePath.length+1):e}unload(){}_getTreeStructure(e,r=0){let n=[];for(e=[...e];e.length>0;){let i=e.first(),a=i.path.substring(r);if(a.contains("/ Line truncated
`):i="Too many files to list",e=e+`
Affected files:
`+i}return e}};p();var _a=require("obsidian"),Dd=class{constructor(e,r){this.plugin=r;this.promises={};this.adapter=e.adapter,this.vault=e,this.lastBasePath=this.plugin.settings.basePath,this.promises.readFile=this.readFile.bind(this),this.promises.writeFile=this.writeFile.bind(this),this.promises.readdir=this.readdir.bind(this),this.promises.mkdir=this.mkdir.bind(this),this.promises.rmdir=this.rmdir.bind(this),this.promises.stat=this.stat.bind(this),this.promises.unlink=this.unlink.bind(this),this.promises.lstat=this.lstat.bind(this),this.promises.readlink=this.readlink.bind(this),this.promises.symlink=this.symlink.bind(this)}async readFile(e,r){var n;if(this.maybeLog("Read: "+e+JSON.stringify(r)),r=="utf8"||r.encoding=="utf8"){let i=this.vault.getAbstractFileByPath(e);return i instanceof _a.TFile?(this.maybeLog("Reuse"),this.vault.read(i)):this.adapter.read(e)}else{if(e.endsWith(this.gitDir+"/index"))return this.plugin.settings.basePath!=this.lastBasePath?(this.clearIndex(),this.lastBasePath=this.plugin.settings.basePath,this.adapter.readBinary(e)):(n=this.index)!=null?n:this.adapter.readBinary(e);let i=this.vault.getAbstractFileByPath(e);return i instanceof _a.TFile?(this.maybeLog("Reuse"),this.vault.readBinary(i)):this.adapter.readBinary(e)}}async writeFile(e,r){if(this.maybeLog("Write: "+e),typeof r=="string"){let n=this.vault.getAbstractFileByPath(e);return n instanceof _a.TFile?this.vault.modify(n,r):this.adapter.write(e,r)}else if(e.endsWith(this.gitDir+"/index"))this.index=r,this.indexmtime=Date.now();else{let n=this.vault.getAbstractFileByPath(e);return n instanceof _a.TFile?this.vault.modifyBinary(n,r):this.adapter.writeBinary(e,r)}}async readdir(e){e==="."&&(e="/");let r=await this.adapter.list(e),n=[...r.files,...r.folders],i;return e!=="/"?i=n.map(a=>(0,_a.normalizePath)(a.substring(e.length))):i=n,i}async mkdir(e){return this.adapter.mkdir(e)}async rmdir(e,r){var n,i;return this.adapter.rmdir(e,(i=(n=r==null?void 0:r.options)==null?void 0:n.recursive)!=null?i:!1)}async stat(e){if(e.endsWith(this.gitDir+"/index")){if(this.index!==void 0&&this.indexctime!=null&&this.indexmtime!=null)return{isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1,size:this.index.byteLength,type:"file",ctimeMs:this.indexctime,mtimeMs:this.indexmtime};{let n=await this.adapter.stat(e);if(n==null)throw{code:"ENOENT"};return this.indexctime=n.ctime,this.indexmtime=n.mtime,{ctimeMs:n.ctime,mtimeMs:n.mtime,size:n.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1}}}e==="."&&(e="/");let r=this.vault.getAbstractFileByPath(e);if(this.maybeLog("Stat: "+e),r instanceof _a.TFile)return this.maybeLog("Reuse stat"),{ctimeMs:r.stat.ctime,mtimeMs:r.stat.mtime,size:r.stat.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1};{let n=await this.adapter.stat(e);if(n)return{ctimeMs:n.ctime,mtimeMs:n.mtime,size:n.size,type:n.type==="folder"?"directory":n.type,isFile:()=>n.type==="file",isDirectory:()=>n.type==="folder",isSymbolicLink:()=>!1};throw{code:"ENOENT"}}}async unlink(e){return this.adapter.remove(e)}async lstat(e){return this.stat(e)}async readlink(e){throw new Error(`readlink of (${e}) is not implemented.`)}async symlink(e){throw new Error(`symlink of (${e}) is not implemented.`)}async saveAndClear(){this.index!==void 0&&await this.adapter.writeBinary(this.plugin.gitManager.getRelativeVaultPath(this.gitDir+"/index"),this.index,{ctime:this.indexctime,mtime:this.indexmtime}),this.clearIndex()}clearIndex(){this.index=void 0,this.indexctime=void 0,this.indexmtime=void 0}get gitDir(){return this.plugin.settings.gitDir||".git"}maybeLog(e){}};var cP=bt(lP()),_n=class extends Bo{constructor(r){super(r);this.FILE=0;this.HEAD=1;this.WORKDIR=2;this.STAGE=3;this.status_mapping={"000":" ","003":"AD","020":"??","022":"A ","023":"AM",100:"D ",101:" D",103:"MD",110:"DA",111:" ",113:"MM",120:"DA",121:" M",122:"M ",123:"MM"};this.noticeLength=999999;this.fs=new Dd(this.app.vault,this.plugin)}getRepo(){return{fs:this.fs,dir:this.plugin.settings.basePath,gitdir:this.plugin.settings.gitDir||void 0,onAuth:()=>{var r,n;return{username:(r=this.plugin.localStorage.getUsername())!=null?r:void 0,password:(n=this.plugin.localStorage.getPassword())!=null?n:void 0}},onAuthFailure:async()=>{new is.Notice("Authentication failed. Please try with different credentials");let r=await new ze(this.plugin,{placeholder:"Specify your username"}).openAndGetResult();if(r){let n=await new ze(this.plugin,{placeholder:"Specify your password/personal access token",obscure:!0}).openAndGetResult();if(n)return this.plugin.localStorage.setUsername(r),this.plugin.localStorage.setPassword(n),{username:r,password:n}}return{cancel:!0}},http:{async request({url:r,method:n,headers:i,body:a}){let s;a&&(s=await pU(a));let o=await(0,is.requestUrl)({url:r,method:n,headers:i,body:s,throw:!1});return{url:r,method:n,headers:o.headers,body:hU(o.arrayBuffer),statusCode:o.status,statusMessage:o.status.toString()}}}}}async wrapFS(r){try{let n=await r Line truncated
`);return{message:l[0],author:{name:o.commit.author.name,email:o.commit.author.email},body:l.slice(1).join(`
`),date:new Date(o.commit.committer.timestamp).toDateString(),diff:{changed:0,files:(await this.getFileChangesCount(o.commit.parent.first(),o.oid)).map(u=>({path:u.path,status:u.type,vaultPath:this.getRelativeVaultPath(u.path),hash:o.oid}))},hash:o.oid,refs:[]}}))}updateBasePath(r){return this.getRepo().dir=r,Promise.resolve()}async updateUpstreamBranch(r){let[n,i]=Ri(r),a=await this.branchInfo();await this.wrapFS(te.default.push({...this.getRepo(),remote:n,remoteRef:i})),await this.setConfig(`branch.${a.current}.merge`,`refs/heads/${i}`)}updateGitPath(r){return Promise.resolve()}async getFileChangesCount(r,n){return this.walkDifference({walkers:[te.default.TREE({ref:r}),te.default.TREE({ref:n})]})}async walkDifference({walkers:r,dir:n}){return await this.wrapFS(te.default.walk({...this.getRepo(),trees:r,map:async function(a,[s,o]){if(!Kv(a,n))return null;if(await(s==null?void 0:s.type())==="tree"||await(o==null?void 0:o.type())==="tree")return;let l=await(s==null?void 0:s.oid()),u=await(o==null?void 0:o.oid()),c="equal";if(l!==u&&(c="M"),l===void 0&&(c="A"),u===void 0&&(c="D"),l===void 0&&u===void 0&&(console.log("Something weird happened:"),console.log(s),console.log(o)),c!=="equal")return{path:a,type:c}}}))}async getStagedFiles(r="."){return(await this.walkDifference({walkers:[te.default.TREE({ref:"HEAD"}),te.default.STAGE()],dir:r})).map(i=>({vaultPath:this.getRelativeVaultPath(i.path),path:i.path}))}async getUnstagedFiles(r="."){let n,i=window.setTimeout(()=>{n=new is.Notice("This takes longer: Getting status",this.noticeLength)},2e4);try{let a=this.getRepo(),s=await this.wrapFS(te.default.walk({...a,trees:[te.default.WORKDIR(),te.default.STAGE()],map:async function(o,[l,u]){if(!u&&l&&await te.default.isIgnored({...a,filepath:o})||!Kv(o,r))return null;let[c,f]=await Promise.all([l&&l.type(),u&&u.type()]),d=[c,f].includes("blob");if((c==="tree"||c==="special")&&!d)return;if(f==="commit")return null;if((f==="tree"||f==="special")&&!d)return;let h=f==="blob"?await u.oid():void 0,m;return c==="blob"&&f!=="blob"?m="42":c==="blob"&&(m=await l.oid()),m?h?m!==h?{path:o,type:"M"}:null:{path:o,type:"A"}:{path:o,type:"D"}}}));return window.clearTimeout(i),n==null||n.hide(),s}catch(a){throw window.clearTimeout(i),n==null||n.hide(),this.plugin.displayError(a),a}}async getDiffString(r,n=!1,i){let a=this.getRelativeVaultPath(r),s=async(u,[c])=>{if(r==u){let f=await c.oid();return(await te.default.readBlob({...this.getRepo(),oid:f})).blob}};if(i){let u=await(0,te.readBlob)({...this.getRepo(),filepath:r,oid:i}).then(h=>new TextDecoder().decode(h.blob)).catch(h=>{if(!(h instanceof te.default.Errors.NotFoundError))throw h}),c=await te.default.readCommit({...this.getRepo(),oid:i}),f=await(0,te.readBlob)({...this.getRepo(),filepath:r,oid:c.commit.parent.first()}).then(h=>new TextDecoder().decode(h.blob)).catch(h=>{if(!(h instanceof te.default.Errors.NotFoundError))throw h});return Sc(a,f!=null?f:"",u!=null?u:"")}let o=(await te.default.walk({...this.getRepo(),trees:[te.default.STAGE()],map:s})).first(),l=new TextDecoder().decode(o);if(n){let u=await this.resolveRef("HEAD").then(f=>(0,te.readBlob)({...this.getRepo(),filepath:r,oid:f})).then(f=>new TextDecoder().decode(f.blob)).catch(f=>{if(!(f instanceof te.default.Errors.NotFoundError))throw f});return Sc(a,u!=null?u:"",l)}else{let u;return await this.app.vault.adapter.exists(a)?u=await this.app.vault.adapter.read(a):u="",Sc(a,l,u)}}async getLastCommitTime(){let r=this.getRepo(),n=await this.resolveRef("HEAD"),a=(await te.default.readCommit({...r,oid:n})).commit.committer.timestamp;return new Date(a*1e3)}getFileStatusResult(r){let n=this.status_mapping[`${r[this.HEAD]}${r[this.WORKDIR]}${r[this.STAGE]}`];return{index:n[0]=="?"?"U":n[0],workingDir:n[1]=="?"?"U":n[1],path:r[this.FILE],vaultPath:this.getRelativeVaultPath(r[this.FILE])}}async checkAuthorInfo(){let r=await this.getConfig("user.name"),n=await this.getConfig("user.email");if(!r||!n)throw Error("Git author name and email are not set. Please set both fields in the settings.")}showNotice(r,n=!0){if(!this.plugin.settings.disablePopups)return new is.Notice(r,n?this.noticeLength:void 0)}};async function*hU(t){yield new Uint8Array(t)}async function pU(t){let e=new ReadableStream({async start(n){for await(let i of t)n.enqueue(i);n.close()}});return await new Response(e).arrayBuffer()}p();var QI=bt(Bd()),Dr=bt(require("fs/promises")),$i=require("obsidian"),He=bt(require("path")),Xc=require("path");p();var Kd=bt(mP(),1),Yd=bt(Bd(),1),HR=require("child_process"),SI=bt(nw(),1),qo=bt(nw(),1),XI=require("node:events"),Sw=Object.defineProperty,FU=Object.getOwnPropertyDescriptor,Ew=Object.getOwnPropertyNames,OU=Object.prototype.hasOwnProperty,V=(t,e)=>function(){return t&&(e=(0,t[Ew(t)[0]])(t=0)),e},MU=(t,e)=>function(){return e||(0,t[Ew(t)[0]])((e={exports:{}}).exports,e),e.exports},ft=(t,e)=>{for(var r in e)Sw(t,r,{get:e[r],enumerable:!0})},DU=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ew(e))!OU.c Line truncated
`){return t.split(r).reduce((n,i)=>{let a=e?i.trim():i;return a&&n.push(a),n},[])}function kw(t,e){return zc(t,!0).map(r=>e(r))}function Aw(t){return(0,Kd.exists)(t,Kd.FOLDER)}function Re(t,e){return Array.isArray(t)?t.includes(e)||t.push(e):t.add(e),e}function eR(t,e){return Array.isArray(t)&&!t.includes(e)&&t.push(e),t}function Jd(t,e){if(Array.isArray(t)){let r=t.indexOf(e);r>=0&&t.splice(r,1)}else t.delete(e);return e}function ti(t){return Array.isArray(t)?t:[t]}function tR(t){return t.replace(/[\s-]+(.)/g,(e,r)=>r.toUpperCase())}function rR(t){return ti(t).map(String)}function Ue(t,e=0){if(t==null)return e;let r=parseInt(t,10);return isNaN(r)?e:r}function Uc(t,e){let r=[];for(let n=0,i=t.length;n<i;n++)r.push(e,t[n]);return r}function jc(t){return(Array.isArray(t)?Buffer.concat(t):t).toString("utf-8")}function nR(t,e){return Object.assign({},...e.map(r=>r in t?{[r]:t[r]}:{}))}function uw(t=0){return new Promise(e=>setTimeout(e,t))}function fw(t){if(t!==!1)return t}var zo,us,Vc,Qd=V({"src/lib/utils/util.ts"(){"use strict";zo="\0",us=()=>{},Vc=Object.prototype.toString.call.bind(Object.prototype.toString)}});function ri(t,e,r){return e(t)?t:arguments.length>2?r:void 0}function dw(t,e){let r=zd(t)?"string":typeof t;return/number|string|boolean/.test(r)&&(!e||!e.includes(r))}function eh(t){return!!t&&Vc(t)==="[object Object]"}function iR(t){return typeof t=="function"}var Wc,Vt,aR,Vd,Tw,sR=V({"src/lib/utils/argument-filters.ts"(){"use strict";Qd(),Gc(),Wc=t=>Array.isArray(t),Vt=t=>typeof t=="string",aR=t=>Array.isArray(t)&&t.every(Vt),Vd=t=>Vt(t)||Array.isArray(t)&&t.every(Vt),Tw=t=>t==null||"number|boolean|function".includes(typeof t)?!1:Array.isArray(t)||typeof t=="string"||typeof t.length=="number"}}),hw,NU=V({"src/lib/utils/exit-codes.ts"(){"use strict";hw=(t=>(t[t.SUCCESS=0]="SUCCESS",t[t.ERROR=1]="ERROR",t[t.NOT_FOUND=-2]="NOT_FOUND",t[t.UNCLEAN=128]="UNCLEAN",t))(hw||{})}}),Wd,BU=V({"src/lib/utils/git-output-streams.ts"(){"use strict";Wd=class oR{constructor(e,r){this.stdOut=e,this.stdErr=r}asStrings(){return new oR(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),he,xa,HU=V({"src/lib/utils/line-parser.ts"(){"use strict";he=class{constructor(t,e){this.matches=[],this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((i,a)=>this.addMatch(i,a,r(a)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(t)?t:[t],e&&(this.useMatches=e)}useMatches(t,e){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(t,e,r){let n=r&&t.exec(r);return n&&this.pushMatch(e,n),!!n}pushMatch(t,e){this.matches.push(...e.slice(1))}},xa=class extends he{addMatch(t,e,r){return/^remote:\s/.test(String(r))&&super.addMatch(t,e,r)}pushMatch(t,e){(t>0||e.length>1)&&super.pushMatch(t,e)}}}});function lR(...t){let e=process.cwd(),r=Object.assign({baseDir:e,...cR},...t.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||e,r.trimmed=r.trimmed===!0,r}var cR,UU=V({"src/lib/utils/simple-git-options.ts"(){"use strict";cR={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function Cw(t,e=[]){return eh(t)?Object.keys(t).reduce((r,n)=>{let i=t[n];if(zd(i))r.push(i);else if(dw(i,["boolean"]))r.push(n+"="+i);else if(Array.isArray(i))for(let a of i)dw(a,["string","number"])||r.push(n+"="+a);else r.push(n);return r},e):e}function wr(t,e=0,r=!1){let n=[];for(let i=0,a=e<0?t.length:e;i<a;i++)"string|number".includes(typeof t[i])&&n.push(String(t[i]));return Cw(Pw(t),n),r||n.push(...jU(t)),n}function jU(t){let e=typeof cs(t)=="function";return ri(cs(t,e?1:0),Wc,[])}function Pw(t){let e=iR(cs(t));return ri(cs(t,e?1:0),eh)}function at(t,e=!0){let r=XP(cs(t));return e||ZP(r)?r:void 0}var GU=V({"src/lib/utils/task-options.ts"(){"use strict";sR(),Qd(),Gc()}});function pw(t,e){return t(e.stdOut,e.stdErr)}function _r(t,e,r,n=!0){return ti(r).forEach(i=>{for(let a=zc(i,n),s=0,o=a.length;s<o;s++){let l=(u=0)=>{if(!(s+u>=o))return a[s+u]};e.some(({parse:u})=>u(l,t))}}),t}var qU=V({"src/lib/utils/task-parser.ts"(){"use strict";Qd()}}),uR={};ft(uR,{ExitCodes:()=>hw,GitOutputStreams:()=>Wd,LineParser:()=>he,NOOP:()=>us,NULL:()=>zo,RemoteLineParser:()=>xa,append:()=>Re,appendTaskOptions:()=>Cw,asArray:()=>ti,asCamelCase:()=>tR,asFunction:()=>XP,asNumber:()=>Ue,asStringArray:()=>rR,bufferToString:()=>jc,callTaskParser:()=>pw,createInstanceConfig:()=>lR,delay:()=>uw,filterArray:()=>Wc,filterFunction:()=>iR,filterHasLength:()=>Tw,filterPlainObject:()=>eh,filterPrimitives:()=>dw,filterString:()=>Vt,filterStringArray:()=>aR,filterStringOrStringArray:()=>Vd,filterType:()=>ri,first:()=>JP,folderExists:()=>Aw,forEachLineWithContent:()=>kw,getTrailingOptions:()=>wr,including:()=>eR,isUserFunction:()=>ZP,last:()=>cs,objectToString:()=>Vc,orVoid:()=>fw,parseStringResponse:()=>_r,pick:()=>nR,prefixedArray:()=>Uc,remove:()=>Jd,splitOn:()=>KP,toLinesWithContent:()=>zc,trailingFunctionArgument:()=>at,trailingOptionsArgument:()=> Line truncated
`)){let l=KP(s,`
`);o=l[0],s=l[1]}yield{file:a,key:o,value:s}}}var TR,ij=V({"src/lib/responses/ConfigList.ts"(){"use strict";ue(),TR=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((t,e)=>Object.assign(t,this.values[e]),{})),this._all}addFile(t){if(!(t in this.values)){let e=cs(this.files);this.values[t]=e?Object.create(this.values[e]):{},this.files.push(t)}return this.values[t]}addValue(t,e,r){let n=this.addFile(t);n.hasOwnProperty(e)?Array.isArray(n[e])?n[e].push(r):n[e]=[n[e],r]:n[e]=r,this._all=void 0}}}});function iw(t,e){return typeof t=="string"&&vw.hasOwnProperty(t)?t:e}function aj(t,e,r,n){let i=["config",`--${n}`];return r&&i.push("--add"),i.push(t,e),{commands:i,format:"utf-8",parser(a){return a}}}function sj(t,e){let r=["config","--null","--show-origin","--get-all",t];return e&&r.splice(1,0,`--${e}`),{commands:r,format:"utf-8",parser(n){return rj(n,t)}}}function oj(t){let e=["config","--list","--show-origin","--null"];return t&&e.push(`--${t}`),{commands:e,format:"utf-8",parser(r){return tj(r)}}}function lj(){return{addConfig(t,e,...r){return this._runTask(aj(t,e,r[0]===!0,iw(r[1],"local")),at(arguments))},getConfig(t,e){return this._runTask(sj(t,iw(e,void 0)),at(arguments))},listConfig(...t){return this._runTask(oj(iw(t[0],void 0)),at(arguments))}}}var vw,CR=V({"src/lib/tasks/config.ts"(){"use strict";ij(),ue(),vw=(t=>(t.system="system",t.global="global",t.local="local",t.worktree="worktree",t))(vw||{})}});function cj(t){return PR.has(t)}var aw,PR,RR=V({"src/lib/tasks/diff-name-status.ts"(){"use strict";aw=(t=>(t.ADDED="A",t.COPIED="C",t.DELETED="D",t.MODIFIED="M",t.RENAMED="R",t.CHANGED="T",t.UNMERGED="U",t.UNKNOWN="X",t.BROKEN="B",t))(aw||{}),PR=new Set(Object.values(aw))}});function uj(...t){return new $R().param(...t)}function fj(t){let e=new Set,r={};return kw(t,n=>{let[i,a,s]=n.split(zo);e.add(i),(r[i]=r[i]||[]).push({line:Ue(a),path:i,preview:s})}),{paths:e,results:r}}function dj(){return{grep(t){let e=at(arguments),r=wr(arguments);for(let i of IR)if(r.includes(i))return this._runTask(yr(`git.grep: use of "${i}" is not supported.`),e);typeof t=="string"&&(t=uj().param(t));let n=["grep","--null","-n","--full-name",...r,...t];return this._runTask({commands:n,format:"utf-8",parser(i){return fj(i)}},e)}}}var IR,Hc,vP,$R,FR=V({"src/lib/tasks/grep.ts"(){"use strict";ue(),ut(),IR=["-h"],Hc=Symbol("grepQuery"),$R=class{constructor(){this[vP]=[]}*[(vP=Hc,Symbol.iterator)](){for(let t of this[Hc])yield t}and(...t){return t.length&&this[Hc].push("--and","(",...Uc(t,"-e"),")"),this}param(...t){return this[Hc].push(...Uc(t,"-e")),this}}}}),OR={};ft(OR,{ResetMode:()=>jd,getResetMode:()=>pj,resetTask:()=>hj});function hj(t,e){let r=["reset"];return MR(t)&&r.push(`--${t}`),r.push(...e),ir(r)}function pj(t){if(MR(t))return t;switch(typeof t){case"string":case"undefined":return"soft"}}function MR(t){return DR.includes(t)}var jd,DR,LR=V({"src/lib/tasks/reset.ts"(){"use strict";ut(),jd=(t=>(t.MIXED="mixed",t.SOFT="soft",t.HARD="hard",t.MERGE="merge",t.KEEP="keep",t))(jd||{}),DR=Array.from(Object.values(jd))}});function mj(){return(0,Yd.default)("simple-git")}function wP(t,e,r){return!e||!String(e).replace(/\s*/,"")?r?(n,...i)=>{t(n,...i),r(n,...i)}:t:(n,...i)=>{t(`%s ${n}`,e,...i),r&&r(n,...i)}}function gj(t,e,{namespace:r}){if(typeof t=="string")return t;let n=e&&e.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}function Mw(t,e,r,n=mj()){let i=t&&`[${t}]`||"",a=[],s=typeof e=="string"?n.extend(e):e,o=gj(ri(e,Vt),s,n);return u(r);function l(c,f){return Re(a,Mw(t,o.replace(/^[^:]+/,c),f,n))}function u(c){let f=c&&`[${c}]`||"",d=s&&wP(s,f)||us,h=wP(n,`${i} ${f}`,d);return Object.assign(s?d:h,{label:t,sibling:l,info:h,step:u})}}var NR=V({"src/lib/git-logger.ts"(){"use strict";ue(),Yd.default.formatters.L=t=>String(Tw(t)?t.length:"-"),Yd.default.formatters.B=t=>Buffer.isBuffer(t)?t.toString("utf8"):Vc(t)}}),BR,vj=V({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";var t;Sa(),NR(),BR=(t=class{constructor(r="GitExecutor"){this.logLabel=r,this._queue=new Map}withProgress(r){return this._queue.get(r)}createProgress(r){let n=t.getName(r.commands[0]),i=Mw(this.logLabel,n);return{task:r,logger:i,name:n}}push(r){let n=this.createProgress(r);return n.logger("Adding task to the queue, commands = %o",r.commands),this._queue.set(r,n),n}fatal(r){for(let[n,{logger:i}]of Array.from(this._queue.entries()))n===r.task?(i.info("Failed %o",r),i("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):i.info("A fatal exception occurred in a previous task, the queue has been purged: %o",r.message),this.complete(n);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(r){this.withProgress(r)&&this._queue.delete(r)}attempt(r){let n=this.withProgress(r);if(!n)throw new br(void 0,"TasksPendingQueue: attempt called for an unknown task");return n.logger("Starting Line truncated
`).map(dq).filter(Boolean);e||r.sort(function(i,a){let s=i.split("."),o=a.split(".");if(s.length===1||o.length===1)return fq(Ud(s[0]),Ud(o[0]));for(let l=0,u=Math.max(s.length,o.length);l<u;l++){let c=VI(Ud(s[l]),Ud(o[l]));if(c)return c}return 0});let n=e?r[0]:[...r].reverse().find(i=>i.indexOf(".")>=0);return new jP(r,n)}}}),YI={};ft(YI,{addAnnotatedTagTask:()=>gq,addTagTask:()=>mq,tagListTask:()=>pq});function pq(t=[]){let e=t.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...t],parser(r){return WI(r,e)}}}function mq(t){return{format:"utf-8",commands:["tag",t],parser(){return{name:t}}}}function gq(t,e){return{format:"utf-8",commands:["tag","-a","-m",e,t],parser(){return{name:t}}}}var vq=V({"src/lib/tasks/tag.ts"(){"use strict";hq()}}),wq=MU({"src/git.js"(t,e){"use strict";var{GitExecutor:r}=(bj(),it(UR)),{SimpleGitApi:n}=(wG(),it(_I)),{Scheduler:i}=(yG(),it(xI)),{configurationErrorTask:a}=(ut(),it(gw)),{asArray:s,filterArray:o,filterPrimitives:l,filterString:u,filterStringOrStringArray:c,filterType:f,getTrailingOptions:d,trailingFunctionArgument:h,trailingOptionsArgument:m}=(ue(),it(uR)),{applyPatchTask:g}=(_G(),it(kI)),{branchTask:v,branchLocalTask:w,deleteBranchesTask:b,deleteBranchTask:E}=($G(),it(II)),{checkIgnoreTask:x}=(MG(),it(OI)),{checkIsRepoTask:k}=(pR(),it(fR)),{cloneTask:A,cloneMirrorTask:y}=(NG(),it(MI)),{cleanWithOptionsTask:S,isCleanOptionsArray:_}=(kR(),it(SR)),{diffSummaryTask:T}=(jw(),it(eI)),{fetchTask:P}=(GG(),it(NI)),{moveTask:F}=(WG(),it(HI)),{pullTask:D}=(XG(),it(UI)),{pushTagsTask:M}=(mI(),it(pI)),{addRemoteTask:re,getRemotesTask:ye,listRemotesTask:me,remoteTask:fe,removeRemoteTask:Ge}=(iq(),it(GI)),{getResetMode:oe,resetTask:B}=(LR(),it(OR)),{stashListTask:Z}=(sq(),it(qI)),{addSubModuleTask:H,initSubModuleTask:Oe,subModuleTask:cr,updateSubModuleTask:Gt}=(uq(),it(zI)),{addAnnotatedTagTask:Y,addTagTask:Ie,tagListTask:Me}=(vq(),it(YI)),{straightThroughBufferTask:It,straightThroughStringTask:De}=(ut(),it(gw));function G(N,X){this._plugins=X,this._executor=new r(N.baseDir,new i(N.maxConcurrentProcesses),X),this._trimmed=N.trimmed}(G.prototype=Object.create(n.prototype)).constructor=G,G.prototype.customBinary=function(N){return this._plugins.reconfigure("binary",N),this},G.prototype.env=function(N,X){return arguments.length===1&&typeof N=="object"?this._executor.env=N:(this._executor.env=this._executor.env||{})[N]=X,this},G.prototype.stashList=function(N){return this._runTask(Z(m(arguments)||{},o(N)&&N||[]),h(arguments))};function Je(N,X,Ee,We){return typeof Ee!="string"?a(`git.${N}() requires a string 'repoPath'`):X(Ee,f(We,u),d(arguments))}G.prototype.clone=function(){return this._runTask(Je("clone",A,...arguments),h(arguments))},G.prototype.mirror=function(){return this._runTask(Je("mirror",y,...arguments),h(arguments))},G.prototype.mv=function(N,X){return this._runTask(F(N,X),h(arguments))},G.prototype.checkoutLatestTag=function(N){var X=this;return this.pull(function(){X.tags(function(Ee,We){X.checkout(We.latest,N)})})},G.prototype.pull=function(N,X,Ee,We){return this._runTask(D(f(N,u),f(X,u),d(arguments)),h(arguments))},G.prototype.fetch=function(N,X){return this._runTask(P(f(N,u),f(X,u),d(arguments)),h(arguments))},G.prototype.silent=function(N){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},G.prototype.tags=function(N,X){return this._runTask(Me(d(arguments)),h(arguments))},G.prototype.rebase=function(){return this._runTask(De(["rebase",...d(arguments)]),h(arguments))},G.prototype.reset=function(N){return this._runTask(B(oe(N),d(arguments)),h(arguments))},G.prototype.revert=function(N){let X=h(arguments);return typeof N!="string"?this._runTask(a("Commit must be a string"),X):this._runTask(De(["revert",...d(arguments,0,!0),N]),X)},G.prototype.addTag=function(N){let X=typeof N=="string"?Ie(N):a("Git.addTag requires a tag name");return this._runTask(X,h(arguments))},G.prototype.addAnnotatedTag=function(N,X){return this._runTask(Y(N,X),h(arguments))},G.prototype.deleteLocalBranch=function(N,X,Ee){return this._runTask(E(N,typeof X=="boolean"?X:!1),h(arguments))},G.prototype.deleteLocalBranches=function(N,X,Ee){return this._runTask(b(N,typeof X=="boolean"?X:!1),h(arguments))},G.prototype.branch=function(N,X){return this._runTask(v(d(arguments)),h(arguments))},G.prototype.branchLocal=function(N){return this._runTask(w(),h(arguments))},G.prototype.raw=function(N){let X=!Array.isArray(N),Ee=[].slice.call(X?arguments:N,0);for(let $t=0;$t<Ee.length&&X;$t++)if(!l(Ee[$t])){Ee.splice($t,Ee.length-$t);break}Ee.push(...d(arguments,0,!0));var We=h(arguments);return Ee.length?this._runTask(De(Ee,this._trimmed),We):this._runTask(a("Raw: must supply one or more command to execute"),We)},G.prototype.submoduleAdd=function(N,X,Ee){return this._runTask(H(N,X),h(arguments))},G.prototype.submoduleUpdate=function(N,X){return this._runTas Line truncated
`).some(l=>l.contains(i))||await Dr.appendFile(r,i+`
`)}catch(r){console.error("Error while adding askpass script to exclude file:",r)}}unload(){var r;(r=this.watchAbortController)==null||r.abort()}async status(r){let n=r==null?void 0:r.path;this.plugin.setPluginState({gitAction:1});let i=await this.git.status(n!=null?["--",n]:[]);this.plugin.setPluginState({gitAction:0});let a=i.files.map(s=>{let o=this.formatPath(s);return{path:o.path,from:o.from,index:s.index==="?"?"U":s.index,workingDir:s.working_dir==="?"?"U":s.working_dir,vaultPath:this.getRelativeVaultPath(o.path)}});return{all:a,changed:a.filter(s=>s.workingDir!==" "),staged:a.filter(s=>s.index!==" "&&s.index!="U"),conflicted:i.conflicted.map(s=>this.formatPath({path:s}).path)}}async submoduleAwareHeadRevisonInContainingDirectory(r){let n=this.getRelativeRepoPath(r),a=["-C",He.dirname(n),"rev-parse","HEAD"],s=this.git.raw(a);return s.catch(o=>console.warn("obsidian-git: rev-parse error:",o)),(await s).trim()}async getSubmodulePaths(){return new Promise(r=>{this.git.outputHandler((n,i,a,s)=>{if(!(s.contains("submodule")&&s.contains("foreach")))return;let o="",l=this.app.vault.adapter.getBasePath()+(this.plugin.settings.basePath?"/"+this.plugin.settings.basePath:"");i.on("data",u=>{o+=u.toString("utf8")}),i.on("end",()=>{let c=o.split(`
`).map(f=>{let d=f.match(/'([^']*)'/);if(d!=null)return l+"/"+d[1]+Xc.sep}).filter(f=>!!f);c.reverse(),r(c)})}),this.git.subModule(["foreach","--recursive",""]).then(()=>{this.git.outputHandler(()=>{})},n=>this.plugin.displayError(n))})}formatPath(r){function n(i){if(i!=null)return i.startsWith('"')&&i.endsWith('"')?i.substring(1,i.length-1):i}return r.from!=null?{from:n(r.from),path:n(r.path)}:{path:n(r.path)}}async blame(r,n,i){if(r=this.getRelativeRepoPath(r),!await this.isTracked(r))return"untracked";let a=await this.getSubmoduleOfFile(r),s=a?["-C",a.submodule]:[],o=a?a.relativeFilepath:r;s.push("blame","--porcelain"),i&&s.push("-w");let l=`-C${id}`;switch(n){case"inactive":break;case"same-commit":s.push("-C",l);break;case"all-commits":s.push("-C","-C",l);break;default:ba(n)}s.push("--",o);let u=await this.git.raw(s);return Uq(u)}async isTracked(r){let n=await this.getSubmoduleOfFile(r),i=n?["-C",n.submodule]:[],a=n?n.relativeFilepath:r;return i.push("ls-files","--",a),this.git.raw(i).then(s=>s.trim()!=="")}async commitAll({message:r}){if(this.plugin.settings.updateSubmodules){this.plugin.setPluginState({gitAction:4});let i=await this.getSubmodulePaths();for(let a of i)await this.git.cwd({path:a,root:!1}).add("-A"),await this.git.cwd({path:a,root:!1}).commit(await this.formatCommitMessage(r))}this.plugin.setPluginState({gitAction:3}),await this.git.add("-A"),this.plugin.setPluginState({gitAction:4});let n=await this.git.commit(await this.formatCommitMessage(r));return this.app.workspace.trigger("obsidian-git:head-change"),n.summary.changes}async commit({message:r,amend:n}){this.plugin.setPluginState({gitAction:4});let i=(await this.git.commit(await this.formatCommitMessage(r),n?["--amend"]:[])).summary.changes;return this.app.workspace.trigger("obsidian-git:head-change"),this.plugin.setPluginState({gitAction:0}),i}async stage(r,n){this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.git.add(["--",r]),this.plugin.setPluginState({gitAction:0})}async stageAll({dir:r}){this.plugin.setPluginState({gitAction:3}),await this.git.add(r!=null?r:"-A"),this.plugin.setPluginState({gitAction:0})}async unstageAll({dir:r}){this.plugin.setPluginState({gitAction:3}),await this.git.reset(r!=null?["--",r]:[]),this.plugin.setPluginState({gitAction:0})}async unstage(r,n){this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.git.reset(["--",r]),this.plugin.setPluginState({gitAction:0})}async discard(r){this.plugin.setPluginState({gitAction:3}),await this.isTracked(r)&&await this.git.checkout(["--",r]),this.plugin.setPluginState({gitAction:0})}async applyPatch(r){let n=He.join(this.relPluginConfigPath,"patch");await this.app.vault.adapter.write(n,r),await this.git.applyPatch(n,{"--cached":null,"--unidiff-zero":null,"--whitespace":"nowarn"}),await this.app.vault.adapter.remove(n)}async getUntrackedPaths(r){let n=r==null?void 0:r.path;this.plugin.setPluginState({gitAction:1});let i=[];n!=null&&i.push("--",n);let a=await this.git.clean(ls.RECURSIVE+ls.DRY_RUN,i);return this.plugin.setPluginState({gitAction:0}),a.paths}async hashObject(r){r=this.getRelativeRepoPath(r);let n=await this.getSubmoduleOfFile(r),i=n?["-C",n.submodule]:[],a=n?n.relativeFilepath:r;return i.push("hash-object","--",a),this.git.raw(i)}async discardAll({dir:r}){return this.discard(r!=null?r:".")}async pull(){this.plugin.setPluginState({gitAction:2});try{this.plugin.settings.updateSubmodules&&await this.git.subModule(["update","--remote","--merge","--recursive"]);let r=await this.branchInfo(),n=await this.git.revparse([r.current]);if(!r.tracking&&this.plugin.settings.updateSubmodules){this.plugin.log("No tracking branch found. Ignoring pull of main repo and updating submodules only.");return}await this.git.fetch();let i=await this.git.revparse([r.tracking]);if(n!==i){if(this.plugin.settings.syncMethod==="merge"||this.plugin.settings.syncMethod==="rebase")try{let o=[r.tracking];switch(this.plugin.settings.mergeStrategy!=="none"&&o.push(`--strategy-option=${this.plugin.settings.mergeStrategy}`),this.plugin.settings.syncMethod){case"merge":await this.git.merge(o);break;case"rebase":await this.git.rebase(o)}}catch(o){this.plugin.displayError(`Pull failed (${this.plugin.settings.syncMethod}): ${"message"in o?o.message:o}`);return}else if(this.plugin.settings.syncMethod==="reset")try{await this.git.raw(["update-ref",`refs/heads/${r.current}`,i]),await this.unstageAll({})}catch(o){this.plugin.displayError(`Sync failed (${this.plugin.settings.syncMethod}): ${"message"in o?o.message:o}`)}this.app.workspace.trigger("obsidian-git:head-change");let a=await this.git.revparse([r.current]);return(await this.git.diff([`${n}..${a}`,"--name-only"])).split(/\r\n|\r|\n/).filter(o=>o.length>0).map(o=>({path:o,workingDir:"P",vaultPath:this.getRelativeVaultPath(o)}))}else return[]}catch(r){this.convertErrors(r)}}async push(){this.plugin.setPluginState({gitAction:5});try{if(this.plugin.settings.updateSubmodules){let s=aw Line truncated
`):[]}async removeRemote(r){await this.git.removeRemote(r)}async updateUpstreamBranch(r){try{await this.git.branch(["--set-upstream-to",r])}catch(n){try{await this.git.branch(["--set-upstream",r])}catch(i){let[a,s]=Ri(r),o=await this.branchInfo();await this.git.push(["--set-upstream",a,`${o.current}:${s}`])}}}updateGitPath(r){return this.setGitInstance()}updateBasePath(r){return this.setGitInstance(!0)}async getDiffString(r,n=!1,i){return n?await this.git.diff(["--cached","--",r]):i?await this.git.show([`${i}`,"--",r]):await this.git.diff(["--",r])}async diff(r,n,i){return await this.git.diff([`${n}..${i}`,"--",r])}async rawCommand(r){let n=r.split(" ");return await this.git.raw(n[0],...n.slice(1))}async getSubmoduleOfFile(r){if(!await this.app.vault.adapter.exists(He.dirname(r)))return;let n=await this.git.raw(["-C",He.dirname(r),"rev-parse","--show-toplevel"],l=>l&&console.warn("get-submodule-of-file",l==null?void 0:l.message));if(n=n.trim(),(await this.git.raw(["-C",He.dirname(r),"rev-parse","--show-superproject-working-tree"],l=>l&&console.warn("get-submodule-of-file",l==null?void 0:l.message))).trim()==="")return;let s=this.app.vault.adapter.getFullPath(He.normalize(r)),o=He.relative(n,s);return{submodule:n,relativeFilepath:o}}async getLastCommitTime(){try{let r=await this.git.log({n:1});if(r!=null&&r.latest!=null)return new Date(r.latest.date)}catch(r){if(r instanceof br){if(r.message.contains("does not have any commits yet"))return}else throw r}}async isGitInstalled(){let r=this.plugin.localStorage.getGitPath(),n=await Bc(r||"git",["--version"],{});if(n.error)if($i.Platform.isWin&&!r){this.plugin.log(`Git not found in PATH. Checking standard installation path(${ad}) of Git for Windows.`);let i=await Bc(ad,["--version"]);if(i.error)return console.error(i.error),!1;this.useDefaultWindowsGitPath=!0}else return console.error(n.error),!1;else this.useDefaultWindowsGitPath=!1;return!0}convertErrors(r){if(r instanceof br){let n=String(r.message);if(n.contains("Could not resolve host")||n.contains("Unable to resolve host")||n.contains("Unable to open connection")||n.match(/ssh: connect to host .*? port .*?: Operation timed out/)!=null||n.match(/ssh: connect to host .*? port .*?: Network is unreachable/)!=null||n.match(/ssh: connect to host .*? port .*?: Undefined error: 0/)!=null)throw new Io(n)}throw r}async isFileTrackedByLFS(r){try{return(await this.git.raw(["check-attr","filter",r])).includes("filter: lfs")}catch(n){let i=n instanceof Error?n.message:String(n);return this.plugin.displayError(`Error checking LFS status: ${i}`),!1}}},e$={hash:"000000",isZeroCommit:!0,summary:""};function Uq(t){let r=t.replace(`\r
`,`
`).split(`
`),n={commits:new Map,hashPerLine:[void 0],originalFileLineNrPerLine:[void 0],finalFileLineNrPerLine:[void 0],groupSizePerStartingLine:new Map},i=1;for(let a=0;a<r.length;){if(KI(r[a])){let s=r[a].split(" "),o=jq(s,i,n);for(a++;KI(r[a]);a++){let l=r[a].split(" ");Gq(l,n,i)}qq(n.commits.get(o)),i+=1}else if(!(r[a]===""&&a===r.length-1))throw Error(`Expected non-whitespace line or EOF, but found: ${r[a]}`);a++}return n}function jq(t,e,r){let n=t[0];if(r.hashPerLine.push(n),r.originalFileLineNrPerLine.push(parseInt(t[1])),r.finalFileLineNrPerLine.push(parseInt(t[2])),t.length>=4&&r.groupSizePerStartingLine.set(e,parseInt(t[3])),parseInt(t[2])!==e)throw Error(`git-blame output is out of order: ${e} vs ${t[2]}`);return n}function Gq(t,e,r){let n=t[0],i=t.slice(1).join(" "),a=e.hashPerLine[r],s=e.commits.get(a)||{hash:a,author:{},committer:{},previous:{}};switch(n){case"summary":s.summary=i;break;case"author":s.author.name=i;break;case"author-mail":s.author.email=JI(i);break;case"author-time":s.author.epochSeconds=parseInt(i);break;case"author-tz":s.author.tz=i;break;case"committer":s.committer.name=i;break;case"committer-mail":s.committer.email=JI(i);break;case"committer-time":s.committer.epochSeconds=parseInt(i);break;case"committer-tz":s.committer.tz=i;break;case"previous":s.previous.commitHash=i;break;case"filename":s.previous.filename=i;break}e.commits.set(a,s)}function qq(t){if(t.summary===void 0)throw Error(`Summary not provided for commit: ${t.hash}`);Vw(t.author)&&(t.author=void 0),Vw(t.committer)&&(t.committer=void 0),Vw(t.previous)&&(t.previous=void 0),t.isZeroCommit=!!t.hash.match(/^0*$/)}function Vw(t){return!t||Object.keys(t).length===0}function KI(t){return t.length>0&&t[0].trim()===t[0]}function JI(t){let e=t.startsWith("<")?t.substring(1):t;return e.endsWith(">")?e.substring(0,e.length-1):e}p();var k$=require("@codemirror/state");p();var Ww=class{constructor(){this.eventsPerFilepath=new Map;this.startRemoveStalesSubscribersInterval()}ifFilepathDefinedTransformSubscribers(e,r){if(e)return this.ensureInitialized(e),r(this.eventsPerFilepath.get(e))}forEachSubscriber(e){this.eventsPerFilepath.forEach(r=>r.forEach(e))}ensureInitialized(e){this.eventsPerFilepath.get(e)||this.eventsPerFilepath.set(e,new Set)}startRemoveStalesSubscribersInterval(){this.removeStalesSubscribersTimer=window.setInterval(()=>this==null?void 0:this.forEachSubscriber(e=>e==null?void 0:e.removeIfStale()),6e4)}clear(){window.clearInterval(this.removeStalesSubscribersTimer),this.eventsPerFilepath.clear()}},Fi=new Ww;p();var oh=require("@codemirror/state"),t$=bt(Yw());function r$(t,e,r){if(!(t===void 0||e===void 0||r===void 0))return`head${t}-obj${e}-path${r}`}var n$=oh.StateEffect.define();function i$(t,e,r){return r.update({effects:n$.of({key:t,la:e,lineOffsetsFromUnsavedChanges:new Map})})}var Wo=oh.StateField.define({create:t=>{},update:(t,e)=>{for(let r of e.effects)if(r.is(n$))return r.value;return zq(e,t)},compare:(t,e)=>(t==null?void 0:t.key)===(e==null?void 0:e.key)});function lh(t){var a;let e=t$.sha256.create();if(!t)return e;let{la:r,key:n,lineOffsetsFromUnsavedChanges:i}=t;e.update(r==="untracked"?"t":"f"),e.update(n);for(let[s,o]of(a=i.entries())!=null?a:[])e.update([s,o]);return e}var tn={get:void 0,save:void 0};function a$(t,e){tn.get=t,tn.save=e}function ch(t){var e,r;return(r=(e=sh(t.coloringMaxAge))==null?void 0:e.asDays())!=null?r:sh(Xe.lineAuthor.coloringMaxAge).asDays()}function zq(t,e){if(e)return t.changes.empty||t.changes.iterChanges((r,n,i,a)=>{var m;let s=t.startState.doc,{newDoc:o}=t,l=s.lineAt(r).number,u=s.lineAt(n).number,c=o.lineAt(i).number,f=o.lineAt(a).number,d=u-l+1,h=f-c+1;for(let g=c;g<=f;g++){let v=(m=e.lineOffsetsFromUnsavedChanges.get(g))!=null?m:0,w=f===g,b=h-d;w&&(v+=b),e.lineOffsetsFromUnsavedChanges.set(g,v)}}),e}p();function s$(){Yo=void 0,Xw=[],uh=0,dh.clear(),hh.clear(),Xo.clear()}var Yo,fh=()=>Yo;function o$(t,e){var i;let r=e.length;if(r<((i=Yo==null?void 0:Yo.length)!=null?i:0))return;Yo={gutter:t,length:r,text:e};let n=tn.get();r!==n.gutterSpacingFallbackLength&&(n.gutterSpacingFallbackLength=r,tn.save(n))}var Xw=[],Vq=15,uh=0;function l$(t){Xw[uh]=t,uh=(uh+1)%Vq}function c$(){return K2(Xw)}var dh=new Map,hh=new Map,Xo=new Set;p();var x$=require("@codemirror/state"),S$=require("@codemirror/view");p();var Qw=require("@codemirror/view"),w$=bt(Yw()),vh=require("obsidian");p();p();var ph={x:-10,y:-10};function u$(){ph.x===-10&&window.addEventListener("mousedown",t=>{ph.x=t.clientX,ph.y=t.clientY})}function f$(){for(let t of Xo)if(Wq(t,ph))return t}function Wq(t,e){let{x:r,y:n,width:i,height:a}=t.getBoundingClientRect();return r<=e.x&&e.x<=r+i&&n<=e.y&&e.y<=n+a}var d$="data-commit";function h$(t,e,r){if(e.hasFocus())return;let n=f$();if(!n)return;let i=Xq(n);i&&(!i.isZeroCommit&&!i.isWaitingGutter&&Yq(i,t),Zw("showCommitHash",t),Zw("authorDisplay",t),Zw("dateTimeFormatOptions",t))}function Yq(t,e){e.addItem(r=>r.setTitle("Copy commit hash").setIcon("copy").setSection("obs-git-line-aut Line truncated
If turned on, do auto ${i} every ${tP(n.settings.autoSaveInterval)} after stopping file edits.
This also prevents auto ${i} while editing a file. If turned off, it's independent from the last file edit.`).addToggle(c=>c.setValue(n.settings.autoBackupAfterFileChange).onChange(async f=>{n.settings.autoBackupAfterFileChange=f,this.refreshDisplayWithDelay(),await n.saveSettings(),n.automaticsManager.reload("commit")})),this.mayDisableSetting(s,n.settings.setLastSaveToLastCommit),s=new U.Setting(r).setName(`Auto ${i} after latest commit`).setDesc(`If turned on, sets last auto ${i} timestamp to the latest commit timestamp. This reduces the frequency of auto ${i} when doing manual commits.`).addToggle(c=>c.setValue(n.settings.setLastSaveToLastCommit).onChange(async f=>{n.settings.setLastSaveToLastCommit=f,await n.saveSettings(),n.automaticsManager.reload("commit"),this.refreshDisplayWithDelay()})),this.mayDisableSetting(s,n.settings.autoBackupAfterFileChange),s=new U.Setting(r).setName("Auto push interval (minutes)").setDesc("Push commits every X minutes. Set to 0 (default) to disable.").addText(c=>{c.inputEl.type="number",this.setNonDefaultValue({text:c,settingsProperty:"autoPushInterval"}),c.setPlaceholder(String(Xe.autoPushInterval)),c.onChange(async f=>{f!==""?n.settings.autoPushInterval=Number(f):n.settings.autoPushInterval=Xe.autoPushInterval,await n.saveSettings(),n.automaticsManager.reload("push")})}),this.mayDisableSetting(s,!n.settings.differentIntervalCommitAndPush),new U.Setting(r).setName("Auto pull interval (minutes)").setDesc("Pull changes every X minutes. Set to 0 (default) to disable.").addText(c=>{c.inputEl.type="number",this.setNonDefaultValue({text:c,settingsProperty:"autoPullInterval"}),c.setPlaceholder(String(Xe.autoPullInterval)),c.onChange(async f=>{f!==""?n.settings.autoPullInterval=Number(f):n.settings.autoPullInterval=Xe.autoPullInterval,await n.saveSettings(),n.automaticsManager.reload("pull")})}),new U.Setting(r).setName(`Auto ${i} only staged files`).setDesc(`If turned on, only staged files are committed on ${i}. If turned off, all changed files are committed.`).addToggle(c=>c.setValue(n.settings.autoCommitOnlyStaged).onChange(async f=>{n.settings.autoCommitOnlyStaged=f,await n.saveSettings()})),new U.Setting(r).setName(`Specify custom commit message on auto ${i}`).setDesc("You will get a pop up to specify your message.").addToggle(c=>c.setValue(n.settings.customMessageOnAutoBackup).onChange(async f=>{n.settings.customMessageOnAutoBackup=f,await n.saveSettings(),this.refreshDisplayWithDelay()})),s=new U.Setting(r).setName(`Commit message on auto ${i}`).setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(c=>{c.setPlaceholder(Xe.autoCommitMessage).onChange(async f=>{f===""?n.settings.autoCommitMessage=Xe.autoCommitMessage:n.settings.autoCommitMessage=f,await n.saveSettings()}),this.setNonDefaultValue({text:c,settingsProperty:"autoCommitMessage"})}),this.mayDisableSetting(s,n.settings.customMessageOnAutoBackup),new U.Setting(r).setName("Commit message").setHeading(),new U.Setting(r).setName("Commit message on manual commit").setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(c=>{c.setPlaceholder(Xe.commitMessage).onChange(async f=>{f===""?n.settings.commitMessage=Xe.commitMessage:n.settings.commitMessage=f,await n.saveSettings()}),this.setNonDefaultValue({text:c,settingsProperty:"commitMessage"})}),new U.Setting(r).setName("Commit message script").setDesc("A script that is run using 'sh -c' to generate the commit message. May be used to generate commit messages using AI tools. Available placeholders: {{hostname}}, {{date}}.").addText(c=>{c.onChange(async f=>{f===""?n.settings.commitMessageScript=Xe.commitMessageScript:n.settings.commitMessageScript=f,await n.saveSettings()}),this.setNonDefaultValue({text:c,settingsProperty:"commitMessageScript"})});let u=new U.Setting(r).setName("{{date}} placeholder format").addMomentFormat(c=>c.setDefaultFormat(n.settings.commitDateFormat).setValue(n.settings.commitDateFormat).onChange(async f=>{n.settings.commitDateFormat=f,await n.saveSettings()}));u.descEl.innerHTML=`
Specify custom date format. E.g. "${jg}. See <a href="https://momentjs.com">Moment.js</a> for more formats.`,new U.Setting(r).setName("{{hostname}} placeholder replacement").setDesc("Specify custom hostname for every device.").addText(c=>{var f;return c.setValue((f=n.localStorage.getHostname())!=null?f:"").onChange(d=>{n.localStorage.setHostname(d)})}),new U.Setting(r).setName("Preview commit message").addButton(c=>c.setButtonText("Preview").onClick(async()=>{let f=await n.gitManager.formatCommitMessage(n.settings.commitMessage);new U.Notice(`${f}`)})),new U.Setting(r).setName("List filenames affected by commit in the commit body").addToggle(c=>c.setValue(n.settings.listChangedFilesInMessageBody).onChange(async f=>{n.settings.listChangedFilesInMessageBody=f,await n.saveSettings()})),new U.Setting(r).setName("Pull").setHeading(),n.gitManager instanceof _e&&new U.Setting(r).setName("Merge strategy").setDesc("Decide how to integrate commits from your remote branch into your local branch.").addDropdown(c=>{let f={merge:"Merge",rebase:"Rebase",reset:"Other sync service (Only updates the HEAD without touching the working directory)"};c.addOptions(f),c.setValue(n.settings.syncMethod),c.onChange(async d=>{n.settings.syncMethod=d,await n.saveSettings()})}),new U.Setting(r).setName("Merge strategy on conflicts").setDesc("Decide how to solve conflicts when pulling remote changes. This can be used to favor your local changes or the remote changes automatically.").addDropdown(c=>{let f={none:"None (git default)",ours:"Our changes",theirs:"Their changes"};c.addOptions(f),c.setValue(n.settings.mergeStrategy),c.onChange(async d=>{n.settings.mergeStrategy=d,await n.saveSettings()})}),new U.Setting(r).setName("Pull on startup").setDesc("Automatically pull commits when Obsidian starts.").addToggle(c=>c.setValue(n.settings.autoPullOnBoot).onChange(async f=>{n.settings.autoPullOnBoot=f,await n.saveSettings()})),new U.Setting(r).setName("Commit-and-sync").setDesc("Commit-and-sync with default settings means staging everything -> committing -> pulling -> pushing. Ideally this is a single action that you do regularly to keep your local and remote repository in sync.").setHeading(),s=new U.Setting(r).setName("Push on commit-and-sync").setDesc(`Most of the time you want to push after committing. Turning this off turns a commit-and-sync action into commit ${n.settings.pullBeforePush?"and pull ":""}only. It will still be called commit-and-sync.`).addToggle(c=>c.setValue(!n.settings.disablePush).onChange(async f=>{n.settings.disablePush=!f,this.refreshDisplayWithDelay(),await n.saveSettings()})),new U.Setting(r).setName("Pull on commit-and-sync").setDesc(`On commit-and-sync, pull commits as well. Turning this off turns a commit-and-sync action into commit ${n.settings.disablePush?"":"and push "}only.`).addToggle(c=>c.setValue(n.settings.pullBeforePush).onChange(async f=>{n.settings.pullBeforePush=f,this.refreshDisplayWithDelay(),await n.saveSettings()})),n.gitManager instanceof _e&&(new U.Setting(r).setName("Hunk management").setDesc("Hunks are sections of grouped line changes right in your editor.").setHeading(),new U.Setting(r).setName("Signs").setDesc("This allows you to see your changes right in your editor via colored markers and stage/reset/preview individual hunks.").addToggle(c=>c.setValue(n.settings.hunks.showSigns).onChange(async f=>{n.settings.hunks.showSigns=f,await n.saveSettings(),n.editorIntegration.refreshSignsSettings()})),new U.Setting(r).setName("Hunk commands").setDesc("Adds commands to stage/reset individual Git diff hunks and navigate between them via 'Go to next/prev hunk' commands.").addToggle(c=>c.setValue(n.settings.hunks.hunkCommands).onChange(async f=>{n.settings.hunks.hunkCommands=f,await n.saveSettings(),n.editorIntegration.refreshSignsSettings()})),new U.Setting(r).setName("Status bar with summary of line changes").addDropdown(c=>c.addOptions({disabled:"Disabled",colored:"Colored",monochrome:"Monochrome"}).setValue(n.settings.hunks.statusBar).onChange(async f=>{n.settings.hunks.statusBar=f,await n.saveSettings(),n.editorIntegration.refreshSignsSettings()})),new U.Setting(r).setName("Line author information").setHeading(),this.addLineAuthorInfoSettings())}new U.Setting(r).setName("History view").setHeading(),new U.Setting(r).setName("Show Author").setDesc("Show the author of the commit in the history view.").addDropdown(u=>{let c={hide:"Hide",full:"Full",initials:"Initials"};u.addOptions(c),u.setValue(n.settings.authorInHistoryView),u.onChange(async f=>{n.settings.authorInHistoryView=f,await n.saveSettings(),await n.refresh()})}),new U.Setting(r).setName("Show Date").setDesc("Show the date of the commit in the history view. The {{date}} placeholder format is used to display the date.").addToggle(u=>u.setValue(n.settings.dateInHistoryView).onChange(async c=>{n.settings.dateInHistoryView=c,await n.saveSettings(),await n.refresh()})),new U.Setting(r).setName("Source control view").setHeading(),ne Line truncated
`)),u.onChange(c=>{n.localStorage.setEnvVars(c.split(`
`))})}),n.gitManager instanceof _e&&new U.Setting(r).setName("Additional PATH environment variable paths").setDesc("Use each line for one path").addTextArea(u=>{u.setValue(n.localStorage.getPATHPaths().join(`
`)),u.onChange(c=>{n.localStorage.setPATHPaths(c.split(`
`))})}),n.gitManager instanceof _e&&new U.Setting(r).setName("Reload with new environment variables").setDesc("Removing previously added environment variables will not take effect until Obsidian is restarted.").addButton(u=>{u.setButtonText("Reload"),u.setCta(),u.onClick(async()=>{await n.gitManager.setGitInstance()})}),new U.Setting(r).setName("Custom base path (Git repository path)").setDesc(`
Sets the relative path to the vault from which the Git binary should be executed.
Mostly used to set the path to the Git repository, which is only required if the Git repository is below the vault root directory. Use "\\" instead of "/" on Windows.
`).addText(u=>{u.setValue(n.settings.basePath),u.setPlaceholder("directory/directory-with-git-repo"),u.onChange(async c=>{n.settings.basePath=c,await n.saveSettings(),n.gitManager.updateBasePath(c||"").catch(f=>n.displayError(f))})}),new U.Setting(r).setName("Custom Git directory path (Instead of '.git')").setDesc('Corresponds to the GIT_DIR environment variable. Requires restart of Obsidian to take effect. Use "\\" instead of "/" on Windows.').addText(u=>{u.setValue(n.settings.gitDir),u.setPlaceholder(".git"),u.onChange(async c=>{n.settings.gitDir=c,await n.saveSettings()})}),new U.Setting(r).setName("Disable on this device").setDesc("Disables the plugin on this device. This setting is not synced.").addToggle(u=>u.setValue(n.localStorage.getPluginDisabled()).onChange(c=>{n.localStorage.setPluginDisabled(c),c?n.unloadPlugin():n.init({fromReload:!0}).catch(f=>n.displayError(f)),new U.Notice("Obsidian must be restarted for the changes to take affect.")})),new U.Setting(r).setName("Support").setHeading(),new U.Setting(r).setName("Donate").setDesc("If you like this Plugin, consider donating to support continued development.").addButton(u=>{u.buttonEl.outerHTML="<a href='https://ko-fi.com/F1F195IQ5' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi3.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>"});let o=r.createDiv();o.setAttr("align","center"),o.setAttr("style","margin: var(--size-4-2)");let l=o.createEl("button");if(l.setText("Copy Debug Information"),l.onclick=async()=>{await window.navigator.clipboard.writeText(JSON.stringify({settings:this.plugin.settings,pluginVersion:this.plugin.manifest.version},null,4)),new U.Notice("Debug information copied to clipboard. May contain sensitive information!")},U.Platform.isDesktopApp){let u=r.createDiv();u.setAttr("align","center"),u.setText(`Debugging and logging:
You can always see the logs of this and every other plugin by opening the console with`);let c=r.createDiv();c.setAttr("align","center"),c.addClass("obsidian-git-shortcuts"),U.Platform.isMacOS===!0?c.createEl("kbd",{text:"CMD (\u2318) + OPTION (\u2325) + I"}):c.createEl("kbd",{text:"CTRL + SHIFT + I"})}}mayDisableSetting(r,n){n&&(r.setDisabled(n),r.setClass("obsidian-git-disabled"))}configureLineAuthorShowStatus(r){this.settings.lineAuthor.show=r,this.plugin.saveSettings(),r?this.plugin.editorIntegration.activateLineAuthoring():this.plugin.editorIntegration.deactiveLineAuthoring()}async lineAuthorSettingHandler(r,n){this.settings.lineAuthor[r]=n,await this.plugin.saveSettings(),this.plugin.editorIntegration.lineAuthoringFeature.refreshLineAuthorViews()}beforeSaveSettings(){let r=this.settings.lineAuthor;r.authorDisplay!=="hide"&&(r.lastShownAuthorDisplay=r.authorDisplay),r.dateTimeFormatOptions!=="hide"&&(r.lastShownDateTimeFormatOptions=r.dateTimeFormatOptions)}addLineAuthorInfoSettings(){let r=new U.Setting(this.containerEl).setName("Show commit authoring information next to each line");if(this.plugin.editorIntegration.lineAuthoringFeature.isAvailableOnCurrentPlatform()||r.setDesc("Only available on desktop currently.").setDisabled(!0),r.descEl.innerHTML=`
<a href="${lz}">Feature guide and quick examples</a></br>
The commit hash, author name and authoring date can all be individually toggled.</br>Hide everything, to only show the age-colored sidebar.`,r.addToggle(n=>n.setValue(this.settings.lineAuthor.show).onChange(i=>{this.configureLineAuthorShowStatus(i),this.refreshDisplayWithDelay()})),this.settings.lineAuthor.show){let n=new U.Setting(this.containerEl).setName("Follow movement and copies across files and commits").setDesc("").addDropdown(a=>{a.addOptions({inactive:"Do not follow (default)","same-commit":"Follow within same commit","all-commits":"Follow within all commits (maybe slow)"}),a.setValue(this.settings.lineAuthor.followMovement),a.onChange(s=>this.lineAuthorSettingHandler("followMovement",s))});if(n.descEl.innerHTML=`
By default (deactivated), each line only shows the newest commit where it was changed.
<br/>
With <i>same commit</i>, cut-copy-paste-ing of text is followed within the same commit and the original commit of authoring will be shown.
<br/>
With <i>all commits</i>, cut-copy-paste-ing text inbetween multiple commits will be detected.
<br/>
It uses <a href="https://git-scm.com/docs/git-blame">git-blame</a> and
for matches (at least ${id} characters) within the same (or all) commit(s), <em>the originating</em> commit's information is shown.`,new U.Setting(this.containerEl).setName("Show commit hash").addToggle(a=>{a.setValue(this.settings.lineAuthor.showCommitHash),a.onChange(s=>this.lineAuthorSettingHandler("showCommitHash",s))}),new U.Setting(this.containerEl).setName("Author name display").setDesc("If and how the author is displayed").addDropdown(a=>{let s={hide:"Hide",initials:"Initials (default)","first name":"First name","last name":"Last name",full:"Full name"};a.addOptions(s),a.setValue(this.settings.lineAuthor.authorDisplay),a.onChange(async o=>this.lineAuthorSettingHandler("authorDisplay",o))}),new U.Setting(this.containerEl).setName("Authoring date display").setDesc("If and how the date and time of authoring the line is displayed").addDropdown(a=>{let s={hide:"Hide",date:"Date (default)",datetime:"Date and time","natural language":"Natural language",custom:"Custom"};a.addOptions(s),a.setValue(this.settings.lineAuthor.dateTimeFormatOptions),a.onChange(async o=>{await this.lineAuthorSettingHandler("dateTimeFormatOptions",o),this.refreshDisplayWithDelay()})}),this.settings.lineAuthor.dateTimeFormatOptions==="custom"){let a=new U.Setting(this.containerEl);a.setName("Custom authoring date format").addText(s=>{s.setValue(this.settings.lineAuthor.dateTimeFormatCustomString),s.setPlaceholder("YYYY-MM-DD HH:mm"),s.onChange(async o=>{await this.lineAuthorSettingHandler("dateTimeFormatCustomString",o),a.descEl.innerHTML=this.previewCustomDateTimeDescriptionHtml(o)})}),a.descEl.innerHTML=this.previewCustomDateTimeDescriptionHtml(this.settings.lineAuthor.dateTimeFormatCustomString)}new U.Setting(this.containerEl).setName("Authoring date display timezone").addDropdown(a=>{let s={"viewer-local":"My local (default)","author-local":"Author's local",utc0000:"UTC+0000/Z"};a.addOptions(s),a.setValue(this.settings.lineAuthor.dateTimeTimezone),a.onChange(async o=>this.lineAuthorSettingHandler("dateTimeTimezone",o))}).descEl.innerHTML=`
The time-zone in which the authoring date should be shown.
Either your local time-zone (default),
the author's time-zone during commit creation or
<a href="https://en.wikipedia.org/wiki/UTC%C2%B100:00">UTC\xB100:00</a>.
`;let i=new U.Setting(this.containerEl).setName("Oldest age in coloring");i.descEl.innerHTML=this.previewOldestAgeDescriptionHtml(this.settings.lineAuthor.coloringMaxAge)[0],i.addText(a=>{a.setPlaceholder("1y"),a.setValue(this.settings.lineAuthor.coloringMaxAge),a.onChange(async s=>{let[o,l]=this.previewOldestAgeDescriptionHtml(s);i.descEl.innerHTML=o,l&&(await this.lineAuthorSettingHandler("coloringMaxAge",s),this.refreshColorSettingsName("oldest"))})}),this.createColorSetting("newest"),this.createColorSetting("oldest"),new U.Setting(this.containerEl).setName("Text color").addText(a=>{a.setValue(this.settings.lineAuthor.textColorCss),a.onChange(async s=>{await this.lineAuthorSettingHandler("textColorCss",s)})}).descEl.innerHTML=`
The CSS color of the gutter text.<br/>
It is highly recommended to use
<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties">
CSS variables</a>
defined by themes
(e.g. <pre style="display:inline">var(--text-muted)</pre> or
<pre style="display:inline">var(--text-on-accent)</pre>,
because they automatically adapt to theme changes.<br/>
See: <a href="https://github.com/obsidian-community/obsidian-theme-template/blob/main/obsidian.css">
List of available CSS variables in Obsidian
<a/>
`,new U.Setting(this.containerEl).setName("Ignore whitespace and newlines in changes").addToggle(a=>{a.setValue(this.settings.lineAuthor.ignoreWhitespace),a.onChange(s=>this.lineAuthorSettingHandler("ignoreWhitespace",s))}).descEl.innerHTML=`
Whitespace and newlines are interpreted as
part of the document and in changes
by default (hence not ignored).
This makes the last line being shown as 'changed'
when a new subsequent line is added,
even if the previously last line's text is the same.
<br>
If you don't care about purely-whitespace changes
(e.g. list nesting / quote indentation changes),
then activating this will provide more meaningful change detection.
`}}createColorSetting(r){let n=new U.Setting(this.containerEl).setName("").addText(i=>{let a=n0(r,this.settings.lineAuthor),s=n0(r,Xe.lineAuthor);i.setPlaceholder(Jv(s)),i.setValue(Jv(a)),i.onChange(async o=>{let l=X2(o);if(l!==void 0){let u=r==="newest"?"colorNew":"colorOld";await this.lineAuthorSettingHandler(u,l)}this.refreshColorSettingsDesc(r,l)})});this.lineAuthorColorSettings.set(r,n),this.refreshColorSettingsName(r),this.refreshColorSettingsDesc(r,n0(r,this.settings.lineAuthor))}refreshColorSettingsName(r){let n=this.lineAuthorColorSettings.get(r);if(n){let i=r==="oldest"?`oldest (${this.settings.lineAuthor.coloringMaxAge} or older)`:"newest";n.nameEl.innerText=`Color for ${i} commits`}}refreshColorSettingsDesc(r,n){let i=this.lineAuthorColorSettings.get(r);i&&(i.descEl.innerHTML=this.colorSettingPreviewDescHtml(r,this.settings.lineAuthor,n!==void 0))}colorSettingPreviewDescHtml(r,n,i){let a=i?gh(r,n):"rgba(127,127,127,0.3)",s=U.moment.unix(U.moment.now()/1e3).format("YYYY-MM-DD"),o=i?`abcdef Author Name ${s}`:"invalid color";return`Supports 'rgb(r,g,b)', 'hsl(h,s,l)', hex (#) and
named colors (e.g. 'black', 'purple'). Color preview: ${`<div
class="line-author-settings-preview"
style="background-color: ${a}; width: 30ch;"
>${o}</div>`}`}previewCustomDateTimeDescriptionHtml(r){let n=(0,U.moment)().format(r);return`<a href="${oz}">Format string</a> to display the authoring date.</br>Currently: ${n}`}previewOldestAgeDescriptionHtml(r){let n=sh(r);return[`The oldest age in the line author coloring. Everything older will have the same color.
</br>Smallest valid age is "1d". Currently: ${n!==void 0?`${n.asDays()} days`:"invalid!"}`,n]}setNonDefaultValue({settingsProperty:r,text:n}){let i=this.plugin.settings[r];Xe[r]!==i&&(typeof i=="string"||typeof i=="number"||typeof i=="boolean"?n.setValue(String(i)):n.setValue(JSON.stringify(i)))}refreshDisplayWithDelay(r=80){setTimeout(()=>this.display(),r)}};function n0(t,e){return t==="oldest"?e.colorOld:e.colorNew}function sh(t){let e=U.moment.duration("P"+t.toUpperCase());return e.isValid()&&e.asDays()&&e.asDays()>=1?e:void 0}p();var Lr=require("obsidian");var bh=class{constructor(e,r){this.statusBarEl=e;this.plugin=r;this.messages=[];this.base="obsidian-git-statusbar-";this.statusBarEl.setAttribute("data-tooltip-position","top"),r.registerEvent(r.app.workspace.on("obsidian-git:refreshed",()=>{this.refreshCommitTimestamp().catch(console.error)}))}displayMessage(e,r){this.messages.push({message:`Git: ${e.slice(0,100)}`,timeout:r}),this.display()}display(){this.messages.length>0&&!this.currentMessage?(this.currentMessage=this.messages.shift(),this.statusBarEl.addClass(this.base+"message"),this.statusBarEl.ariaLabel="",this.statusBarEl.setText(this.currentMessage.message),this.lastMessageTimestamp=Date.now()):this.currentMessage?Date.now()-this.lastMessageTimestamp>=this.currentMessage.timeout&&(this.currentMessage=null,this.lastMessageTimestamp=null):this.displayState()}displayState(){switch((this.statusBarEl.getText().length>3||!this.statusBarEl.hasChildNodes())&&(this.statusBarEl.empty(),this.conflictEl=this.statusBarEl.createDiv(),this.conflictEl.setAttribute("data-tooltip-position","top"),this.conflictEl.style.float="left",this.pausedEl=this.statusBarEl.createDiv(),this.pausedEl.setAttribute("data-tooltip-position","top"),this.pausedEl.style.float="left",this.iconEl=this.statusBarEl.createDiv(),this.iconEl.style.float="left",this.textEl=this.statusBarEl.createDiv(),this.textEl.style.float="right",this.textEl.style.marginLeft="5px"),this.plugin.localStorage.getConflict()?((0,Lr.setIcon)(this.conflictEl,"alert-circle"),this.conflictEl.ariaLabel="You have merge conflicts. Resolve them and commit afterwards.",this.conflictEl.style.marginRight="5px",this.conflictEl.addClass(this.base+"conflict")):(this.conflictEl.empty(),this.conflictEl.style.marginRight=""),this.plugin.localStorage.getPausedAutomatics()?((0,Lr.setIcon)(this.pausedEl,"pause-circle"),this.pausedEl.ariaLabel="Automatic routines are currently paused.",this.pausedEl.style.marginRight="5px",this.pausedEl.addClass(this.base+"paused")):(this.pausedEl.empty(),this.pausedEl.style.marginRight=""),this.plugin.state.gitAction){case 0:this.displayFromNow();break;case 1:this.statusBarEl.ariaLabel="Checking repository status...",(0,Lr.setIcon)(this.iconEl,"refresh-cw"),this.statusBarEl.addClass(this.base+"status");break;case 3:this.statusBarEl.ariaLabel="Adding files...",(0,Lr.setIcon)(this.iconEl,"archive"),this.statusBarEl.addClass(this.base+"add");break;case 4:this.statusBarEl.ariaLabel="Committing changes...",(0,Lr.setIcon)(this.iconEl,"git-commit"),this.statusBarEl.addClass(this.base+"commit");break;case 5:this.statusBarEl.ariaLabel="Pushing changes...",(0,Lr.setIcon)(this.iconEl,"upload"),this.statusBarEl.addClass(this.base+"push");break;case 2:this.statusBarEl.ariaLabel="Pulling changes...",(0,Lr.setIcon)(this.iconEl,"download"),this.statusBarEl.addClass(this.base+"pull");break;default:this.statusBarEl.ariaLabel="Failed on initialization!",(0,Lr.setIcon)(this.iconEl,"alert-triangle"),this.statusBarEl.addClass(this.base+"failed-init");break}}displayFromNow(){var n;let e=this.lastCommitTimestamp,r=this.plugin.state.offlineMode;if(e){let i=(0,Lr.moment)(e).fromNow();this.statusBarEl.ariaLabel=`${r?"Offline: ":""}Last Commit: ${i}`,(n=this.unPushedCommits)!=null&&n&&(this.statusBarEl.ariaLabel+=`
(${this.unPushedCommits} unpushed commits)`)}else this.statusBarEl.ariaLabel=r?"Git is offline":"Git is ready";r?(0,Lr.setIcon)(this.iconEl,"globe"):(0,Lr.setIcon)(this.iconEl,"check"),this.plugin.settings.changedFilesInStatusBar&&this.plugin.cachedStatus&&this.textEl.setText(this.plugin.cachedStatus.changed.length.toString()),this.statusBarEl.addClass(this.base+"idle")}async refreshCommitTimestamp(){this.lastCommitTimestamp=await this.plugin.gitManager.getLastCommitTime(),this.unPushedCommits=await this.plugin.gitManager.getUnpushedCommits()}remove(){this.statusBarEl.remove()}};p();var xh=require("obsidian"),_h=class extends xh.SuggestModal{constructor(r){super(r.app);this.plugin=r;this.resolve=null;this.setPlaceholder("Type your message and select optional the version with the added date.")}openAndGetResult(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(r){let n=(0,xh.moment)().format(this.plugin.settings.commitDateFormat);return r==""&&(r="..."),[r,`${n}: ${r}`,`${r}: ${n}`]}renderSuggestion(r,n){n.innerText=r}onChooseSuggestion(r,n){this.resolve&&this.resolve(r)}};p();var T$=require("obsidian"),Zc=class{constructor(e){this.plugin=e}saveLastAuto(e,r){r==="backup"?this.plugin.localStorage.setLastAutoBackup(e.toString()):r==="pull"?this.plugin.localStorage.setLastAutoPull(e.toString()):r==="push"&&this.plugin.localStorage.setLastAutoPush(e.toString())}loadLastAuto(){var e,r,n;return{backup:new Date((e=this.plugin.localStorage.getLastAutoBackup())!=null?e:""),pull:new Date((r=this.plugin.localStorage.getLastAutoPull())!=null?r:""),push:new Date((n=this.plugin.localStorage.getLastAutoPush())!=null?n:"")}}async init(){await this.setUpAutoCommitAndSync();let e=this.loadLastAuto();if(this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0){let r=this.diff(this.plugin.settings.autoPushInterval,e.push);this.startAutoPush(r)}if(this.plugin.settings.autoPullInterval>0){let r=this.diff(this.plugin.settings.autoPullInterval,e.pull);this.startAutoPull(r)}}unload(){this.clearAutoPull(),this.clearAutoPush(),this.clearAutoCommitAndSync()}reload(...e){this.plugin.localStorage.getPausedAutomatics()||(e.contains("commit")&&(this.clearAutoCommitAndSync(),this.plugin.settings.autoSaveInterval>0&&this.startAutoCommitAndSync(this.plugin.settings.autoSaveInterval)),e.contains("push")&&(this.clearAutoPush(),this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0&&this.startAutoPush(this.plugin.settings.autoPushInterval)),e.contains("pull")&&(this.clearAutoPull(),this.plugin.settings.autoPullInterval>0&&this.startAutoPull(this.plugin.settings.autoPullInterval)))}async setUpAutoCommitAndSync(){if(this.plugin.settings.setLastSaveToLastCommit){this.clearAutoCommitAndSync();let e=await this.plugin.gitManager.getLastCommitTime();e&&this.saveLastAuto(e,"backup")}if(!this.timeoutIDCommitAndSync&&!this.plugin.autoCommitDebouncer){let e=this.loadLastAuto();if(this.plugin.settings.autoSaveInterval>0){let r=this.diff(this.plugin.settings.autoSaveInterval,e.backup);this.startAutoCommitAndSync(r)}}}startAutoCommitAndSync(e){let r=(e!=null?e:this.plugin.settings.autoSaveInterval)*6e4;this.plugin.settings.autoBackupAfterFileChange?e===0?this.doAutoCommitAndSync():this.plugin.autoCommitDebouncer=(0,T$.debounce)(()=>this.doAutoCommitAndSync(),r,!0):(r>2147483647&&(r=2147483647),this.timeoutIDCommitAndSync=window.setTimeout(()=>this.doAutoCommitAndSync(),r))}doAutoCommitAndSync(){this.plugin.promiseQueue.addTask(async()=>{if(this.plugin.settings.setLastSaveToLastCommit){let r=await this.plugin.gitManager.getLastCommitTime();if(r){this.saveLastAuto(r,"backup");let n=this.diff(this.plugin.settings.autoSaveInterval,r);if(n>0)return this.startAutoCommitAndSync(n),!1}}let e=this.plugin.settings.autoCommitOnlyStaged;return this.plugin.settings.differentIntervalCommitAndPush?await this.plugin.commit({fromAuto:!0,onlyStaged:e}):await this.plugin.commitAndSync({fromAutoBackup:!0,onlyStaged:e}),!0},e=>{e!==!1&&(this.saveLastAuto(new Date,"backup"),this.startAutoCommitAndSync())})}startAutoPull(e){let r=(e!=null?e:this.plugin.settings.autoPullInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPull=window.setTimeout(()=>this.doAutoPull(),r)}doAutoPull(){this.plugin.promiseQueue.addTask(()=>this.plugin.pullChangesFromRemote(),()=>{this.saveLastAuto(new Date,"pull"),this.startAutoPull()})}startAutoPush(e){let r=(e!=null?e:this.plugin.settings.autoPushInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPush=window.setTimeout(()=>this.doAutoPush(),r)}doAutoPush(){this.plugin.promiseQueue.addTask(()=>this.plugin.push(),()=>{this.saveLastAuto(new Date,"push"),this.startAutoPush()})}clearAutoCommitAndSync(){var r;let e=!1;return this.timeoutIDCommitAndSync&&(window.clearTimeout(this.timeoutIDCommitAndSync),this.timeoutIDCommitAndSync=void 0,e=!0),this.plugin.autoCommitDebo Line truncated
`)}static newName(){let e=O$[F$]||1;return O$[F$]=e+1,i0+e.toString(36)}static mount(e,r,n){let i=e[a0],a=n&&n.nonce;i?a&&i.setNonce(a):i=new s0(e,a),i.mount(Array.isArray(r)?r:[r],e)}},M$=new Map,s0=class{constructor(e,r){let n=e.ownerDocument||e,i=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let a=M$.get(n);if(a)return e[a0]=a;this.sheet=new i.CSSStyleSheet,M$.set(n,this)}else this.styleTag=n.createElement("style"),r&&this.styleTag.setAttribute("nonce",r);this.modules=[],e[a0]=this}mount(e,r){let n=this.sheet,i=0,a=0;for(let s=0;s<e.length;s++){let o=e[s],l=this.modules.indexOf(o);if(l<a&&l>-1&&(this.modules.splice(l,1),a--,l=-1),l==-1){if(this.modules.splice(a++,0,o),n)for(let u=0;u<o.rules.length;u++)n.insertRule(o.rules[u],i++)}else{for(;a<l;)i+=this.modules[a++].rules.length;i+=o.rules.length,a++}}if(n)r.adoptedStyleSheets.indexOf(this.sheet)<0&&(r.adoptedStyleSheets=[this.sheet,...r.adoptedStyleSheets]);else{let s="";for(let l=0;l<this.modules.length;l++)s+=this.modules[l].getRules()+`
`;this.styleTag.textContent=s;let o=r.head||r;this.styleTag.parentNode!=o&&o.insertBefore(this.styleTag,o.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}};var Q$=require("@codemirror/language"),cz=require("@lezer/highlight"),ht=class t{constructor(e,r,n,i){this.fromA=e,this.toA=r,this.fromB=n,this.toB=i}offset(e,r=e){return new t(this.fromA+e,this.toA+e,this.fromB+r,this.toB+r)}};function hs(t,e,r,n,i,a){if(t==n)return[];let s=p0(t,e,r,n,i,a),o=m0(t,e+s,r,n,i+s,a);e+=s,r-=o,i+=s,a-=o;let l=r-e,u=a-i;if(!l||!u)return[new ht(e,r,i,a)];if(l>u){let f=t.slice(e,r).indexOf(n.slice(i,a));if(f>-1)return[new ht(e,e+f,i,i),new ht(e+f+u,r,a,a)]}else if(u>l){let f=n.slice(i,a).indexOf(t.slice(e,r));if(f>-1)return[new ht(e,e,i,i+f),new ht(r,r,i+f+l,a)]}if(l==1||u==1)return[new ht(e,r,i,a)];let c=tF(t,e,r,n,i,a);if(c){let[f,d,h]=c;return hs(t,e,f,n,i,d).concat(hs(t,f+h,r,n,d+h,a))}return uz(t,e,r,n,i,a)}var Jc=1e9,Qc=0,h0=!1;function uz(t,e,r,n,i,a){let s=r-e,o=a-i;if(Jc<1e9&&Math.min(s,o)>Jc*16||Qc>0&&Date.now()>Qc)return Math.min(s,o)>Jc*64?[new ht(e,r,i,a)]:D$(t,e,r,n,i,a);let l=Math.ceil((s+o)/2);o0.reset(l),l0.reset(l);let u=(h,m)=>t.charCodeAt(e+h)==n.charCodeAt(i+m),c=(h,m)=>t.charCodeAt(r-h-1)==n.charCodeAt(a-m-1),f=(s-o)%2!=0?l0:null,d=f?null:o0;for(let h=0;h<l;h++){if(h>Jc||Qc>0&&!(h&63)&&Date.now()>Qc)return D$(t,e,r,n,i,a);let m=o0.advance(h,s,o,l,f,!1,u)||l0.advance(h,s,o,l,d,!0,c);if(m)return fz(t,e,r,e+m[0],n,i,a,i+m[1])}return[new ht(e,r,i,a)]}var Rh=class{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let r=0;r<this.len;r++)this.vec[r]=-1;this.vec[e+1]=0,this.start=this.end=0}advance(e,r,n,i,a,s,o){for(let l=-e+this.start;l<=e-this.end;l+=2){let u=i+l,c=l==-e||l!=e&&this.vec[u-1]<this.vec[u+1]?this.vec[u+1]:this.vec[u-1]+1,f=c-l;for(;c<r&&f<n&&o(c,f);)c++,f++;if(this.vec[u]=c,c>r)this.end+=2;else if(f>n)this.start+=2;else if(a){let d=i+(r-n)-l;if(d>=0&&d<this.len&&a.vec[d]!=-1)if(s){let h=a.vec[d];if(h>=r-c)return[h,i+h-d]}else{let h=r-a.vec[d];if(c>=h)return[c,f]}}}return null}},o0=new Rh,l0=new Rh;function fz(t,e,r,n,i,a,s,o){let l=!1;return!Jo(t,n)&&++n==r&&(l=!0),!Jo(i,o)&&++o==s&&(l=!0),l?[new ht(e,r,a,s)]:hs(t,e,n,i,a,o).concat(hs(t,n,r,i,o,s))}function eF(t,e){let r=1,n=Math.min(t,e);for(;r<n;)r=r<<1;return r}function p0(t,e,r,n,i,a){if(e==r||e==a||t.charCodeAt(e)!=n.charCodeAt(i))return 0;let s=eF(r-e,a-i);for(let o=e,l=i;;){let u=o+s,c=l+s;if(u>r||c>a||t.slice(o,u)!=n.slice(l,c)){if(s==1)return o-e-(Jo(t,o)?0:1);s=s>>1}else{if(u==r||c==a)return u-e;o=u,l=c}}}function m0(t,e,r,n,i,a){if(e==r||i==a||t.charCodeAt(r-1)!=n.charCodeAt(a-1))return 0;let s=eF(r-e,a-i);for(let o=r,l=a;;){let u=o-s,c=l-s;if(u<e||c<i||t.slice(u,o)!=n.slice(c,l)){if(s==1)return r-o-(Jo(t,o)?0:1);s=s>>1}else{if(u==e||c==i)return r-u;o=u,l=c}}}function c0(t,e,r,n,i,a,s,o){let l=n.slice(i,a),u=null;for(;;){if(u||s<o)return u;for(let c=e+s;;){Jo(t,c)||c++;let f=c+s;if(Jo(t,f)||(f+=f==c+1?1:-1),f>=r)break;let d=t.slice(c,f),h=-1;for(;(h=l.indexOf(d,h+1))!=-1;){let m=p0(t,f,r,n,i+h+d.length,a),g=m0(t,e,c,n,i,i+h),v=d.length+m+g;(!u||u[2]<v)&&(u=[c-g,i+h-g,v])}c=f}if(o<0)return u;s=s>>1}}function tF(t,e,r,n,i,a){let s=r-e,o=a-i;if(s<o){let l=tF(n,i,a,t,e,r);return l&&[l[1],l[0],l[2]]}return s<4||o*2<s?null:c0(t,e,r,n,i,a,Math.floor(s/4),-1)}function D$(t,e,r,n,i,a){h0=!0;let s=r-e,o=a-i,l;if(s<o){let d=c0(n,i,a,t,e,r,Math.floor(s/6),50);l=d&&[d[1],d[0],d[2]]}else l=c0(t,e,r,n,i,a,Math.floor(o/6),50);if(!l)return[new ht(e,r,i,a)];let[u,c,f]=l;return hs(t,e,u,n,i,c).concat(hs(t,u+f,r,n,c+f,a))}function rF(t,e){for(let r=1;r<t.length;r++){let n=t[r-1],i=t[r];n.toA>i.fromA-e&&n.toB>i.fromB-e&&(t[r-1]=new ht(n.fromA,i.toA,n.fromB,i.toB),t.splice(r--,1))}}function dz(t,e,r){for(;;){rF(r,1);let n=!1;for(let i=0;i<r.length;i++){let a=r[i],s,o;(s=p0(t,a.fromA,a.toA,e,a.fromB,a.toB))&&(a=r[i]=new ht(a.fromA+s,a.toA,a.fromB+s,a.toB)),(o=m0(t,a.fromA,a.toA,e,a.fromB,a.toB))&&(a=r[i]=new ht(a.fromA,a.toA-o,a.fromB,a.toB-o));let l=a.toA-a.fromA,u=a.toB-a.fromB;if(l&&u)continue;let c=a.fromA-(i?r[i-1].toA:0),f=(i<r.length-1?r[i+1].fromA:t.length)-a.toA;if(!c||!f)continue;let d=l?t.slice(a.fromA,a.toA):e.slice(a.fromB,a.toB);c<=d.length&&t.slice(a.fromA-c,a.fromA)==d.slice(d.length-c)?(r[i]=new ht(a.fromA-c,a.toA-c,a.fromB-c,a.toB-c),n=!0):f<=d.length&&t.slice(a.toA,a.toA+f)==d.slice(0,f)&&(r[i]=new ht(a.fromA+f,a.toA+f,a.fromB+f,a.toB+f),n=!0)}if(!n)break}return r}function hz(t,e,r){for(let n=0,i=0;i<t.length;i++){let a=t[i],s=a.toA-a.fromA,o=a.toB-a.fromB;if(s&&o||s>3||o>3){let l=i==t.length-1?e.length:t[i+1].fromA,u=a.fromA-n,c=l-a.toA,f=N$(e,a.fromA,u),d=L$(e,a.toA,c),h=a.fromA-f,m=d-a.toA;if((!s||!o)&&h&&m){let g=Math.max(s,o),[v,w,b]=s?[e,a.fromA,a.toA]:[r,a.fromB,a.toB];g>h&&e.slice(f,a.fromA)==v.slice(b-h,b)?(a=t[i]=new ht(f,f+s,a.fromB-h,a.toB-h),f=a.fromA,d=L$(e,a.toA,l-a.toA)):g>m&&e.slice(a.toA,d)==v.slice(w,w+m)&&(a=t[i]=new ht(d-s,d,a.fromB+m,a.toB+m),d=a. Line truncated
`),a=e.split(`
`);for(let s of r){let{oldStart:o,oldLines:l,newStart:u,newLines:c}=s,f=Et.createHunk(o,l,u,c);if(s.oldLines>0){for(let d=o;d<o+l;d++)f.removed.lines.push(i[d-1]);o+l>i.length&&i.last()!=""&&(f.removed.no_nl_at_eof=!0)}if(s.newLines>0){for(let d=u;d<u+c;d++)f.added.lines.push(a[d-1]);u+c>a.length&&a.last()!=""&&(f.added.no_nl_at_eof=!0)}n.push(f)}return n}function y0(t,e,r){let n=e.lineAt(t.fromA).number,i=t.fromA==t.toA?0:Fh(e,t.endA)-n+1,a=r.lineAt(t.fromB).number,s=t.fromB==t.toB?0:Fh(r,t.endB)-a+1,o={oldStart:n,oldLines:i,newStart:a,newLines:s};return o.oldLines==0&&(o.oldStart-=1),o.newLines==0&&(o.newStart-=1),o}var hF={scanLimit:1e3,timeout:200};function Pz(t,e,r,n){let i=v0.Text.of(t.split(`
`)),a=v0.Text.of(e.split(`
`)),s=r&&n?Oi.updateB(r,i,a,n,hF):Oi.build(i,a,hF),o=[];for(let l=0;l<s.length;l++){let u=s[l],c=y0(u,i,a);o.push(c)}return{hunks:w0(t,e,o),chunks:s}}function pF(t,e,r,n){return Pz(t,e,r,n)}var el=require("obsidian");function Fh(t,e){let r=t.lineAt(e);return!(r.text.length==0&&r.number==t.lines)?r.number:r.number-1}var Sn=class{static hasHunksData(e){let r=e.field(xr,!1);return!!r&&!r.isDirty}static getHunks(e,r){let n=e.field(xr);return n?r?n.stagedHunks:n.hunks:[]}static getHunkAtPos(e,r,n){if(!e.field(xr))return;let a=e.doc.lineAt(r).number,s=this.getHunks(e,n);return Et.findHunk(a,s)[0]}static getCursorHunk(e,r){if(!e.field(xr))return;let i=e.selection.main.head;return this.getHunkAtPos(e,i,r)}static getHunk(e,r,n){if(n!=null)return this.getHunkAtPos(e,n,r);if(e.selection.main.empty)return this.getCursorHunk(e,r);let i=e.selection.main.from,a=e.selection.main.to,s=e.doc.lineAt(i).number,o=Fh(e.doc,a),l=this.getHunks(e,r),u=Et.createPartialHunk(l,s,o);if(!u)return;let c=e.field(xr);if(r){let f=s,d=o;for(let h of c.hunks)s>h.vend&&(f=f-(h.added.count-h.removed.count)),o>h.vend&&(d=d-(h.added.count-h.removed.count));u.added.lines=c.compareText.split(`
`).slice(f-1,d),c.compareTextHead?u.removed.lines=c.compareTextHead.split(`
`).slice(u.removed.start-1,u.removed.start-1+u.removed.count):u.removed.lines=[]}else u.added.lines=e.doc.toString().split(`
`).slice(s-1,o),o===e.doc.lines&&!e.doc.toString().endsWith(`
`)&&(u.added.no_nl_at_eof=!0),u.removed.lines=c.compareText.split(`
`).slice(u.removed.start-1,u.removed.start-1+u.removed.count),u.removed.start+u.removed.count-1===c.compareText.split(`
`).length&&!c.compareText.endsWith(`
`)&&(u.removed.no_nl_at_eof=!0);return u}},xr=Qo.StateField.define({create:t=>{},update:(t,e)=>{let r=t?{...t}:{maxDiffTimeMs:0,hunks:[],stagedHunks:[],chunks:void 0,isDirty:!1},n=!1;for(let i of e.effects)i.is(tl)&&(r.compareText=i.value.compareText,r.compareTextHead=i.value.compareTextHead,n=(t==null?void 0:t.compareText)!==i.value.compareText,n&&(r.chunks=void 0)),i.is(tu)&&mF(r,i.value,e.state);if(r.compareText!==void 0){if(n||e.docChanged){r.isDirty=!0;let i=Rz(e,r.compareText,r.chunks,r.maxDiffTimeMs);i&&mF(r,i,e.state)}}else r.compareText=void 0,r.compareTextHead=void 0,r.chunks=void 0,r.hunks=[],r.stagedHunks=[],r.isDirty=!1;return r}});function mF(t,e,r){var i,a;t.hunks=e.hunks,t.chunks=e.chunks,t.isDirty=!1,t.maxDiffTimeMs=Math.max(.95*t.maxDiffTimeMs,e.diffDuration);let n=r.field(el.editorInfoField).file;(a=(i=Zn.plugin)==null?void 0:i.editorIntegration.signsFeature.changeStatusBar)==null||a.display(t.hunks,n)}var b0=Qo.StateField.define({create:()=>({debouncer:(0,el.debounce)(t=>{let{state:e,compareText:r,previousChunks:n,changeDesc:i}=t,a=gF(e,r,n,i);e.field(el.editorEditorField).dispatch({effects:tu.of(a)})},1e3,!0),maxDiffTimeMs:0}),update:(t,e)=>{var r;for(let n of e.effects)if(n.is(tu))return t.changeDesc=void 0,t;return!t.changeDesc&&e.changes?t.changeDesc=e.changes:t.changeDesc=(r=t.changeDesc)==null?void 0:r.composeDesc(e.changes),t}});function gF(t,e,r,n){let i=t.doc.toString(),a=performance.now(),{hunks:s,chunks:o}=pF(e,i,r,n),l=performance.now()-a;return{hunks:s,chunks:o,diffDuration:l}}function Rz(t,e,r,n){let i=t.state,a=Math.abs(t.changes.length-t.changes.newLength),s=i.field(b0);if(a>1e3||n>16)s.debouncer({state:i,compareText:e,previousChunks:r,changeDesc:s.changeDesc});else return s.changeDesc=void 0,gF(i,e,r,t.changes)}var tl=Qo.StateEffect.define(),tu=Qo.StateEffect.define();function vF(t,e){return e.update({effects:tl.of(t)})}p();p();p();var Ze;(function(t){t.INSERT="insert",t.DELETE="delete",t.CONTEXT="context"})(Ze||(Ze={}));var wF={LINE_BY_LINE:"line-by-line",SIDE_BY_SIDE:"side-by-side"},yF={LINES:"lines",WORDS:"words",NONE:"none"},bF={WORD:"word",CHAR:"char"},ms;(function(t){t.AUTO="auto",t.DARK="dark",t.LIGHT="light"})(ms||(ms={}));p();var Iz=["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"],$z=RegExp("["+Iz.join("\\")+"]","g");function _F(t){return t.replace($z,"\\$&")}function _0(t){return t&&t.replace(/\\/g,"/")}function xF(t){let e,r,n,i=0;for(e=0,n=t.length;e<n;e++)r=t.charCodeAt(e),i=(i<<5)-i+r,i|=0;return i}function Oh(t){let e=t.length,r=-1/0;for(let n=0;n<e;n++)r=Math.max(r,t[n]);return r}function SF(t,e){let r=t.split(".");return r.length>1?r[r.length-1]:e}function EF(t,e){return e.reduce((r,n)=>r||t.startsWith(n),!1)}var kF=["a/","b/","i/","w/","c/","o/"];function Ea(t,e,r){let n=r!==void 0?[...kF,r]:kF,i=e?new RegExp(`^${_F(e)} "?(.+?)"?$`):new RegExp('^"?(.+?)"?$'),[,a=""]=i.exec(t)||[],s=n.find(l=>a.indexOf(l)===0);return(s?a.slice(s.length):a).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function Fz(t,e){return Ea(t,"---",e)}function Oz(t,e){return Ea(t,"+++",e)}function AF(t,e={}){let r=[],n=null,i=null,a=null,s=null,o=null,l=null,u=null,c="--- ",f="+++ ",d="@@",h=/^old mode (\d{6})/,m=/^new mode (\d{6})/,g=/^deleted file mode (\d{6})/,v=/^new file mode (\d{6})/,w=/^copy from "?(.+)"?/,b=/^copy to "?(.+)"?/,E=/^rename from "?(.+)"?/,x=/^rename to "?(.+)"?/,k=/^similarity index (\d+)%/,A=/^dissimilarity index (\d+)%/,y=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,S=/^Binary files (.*) and (.*) differ/,_=/^GIT binary patch/,T=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,P=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,F=/^new file mode (\d{6})/,D=/^deleted file mode (\d{6}),(\d{6})/,M=t.replace(/\\ No newline at end of file/g,"").replace(/\r\n?/g,`
`).split(`
`);function re(){i!==null&&n!==null&&(n.blocks.push(i),i=null)}function ye(){n!==null&&(!n.oldName&&l!==null&&(n.oldName=l),!n.newName&&u!==null&&(n.newName=u),n.newName&&(r.push(n),n=null)),l=null,u=null}function me(){re(),ye(),n={blocks:[],deletedLines:0,addedLines:0}}function fe(B){re();let Z;n!==null&&((Z=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(B))?(n.isCombined=!1,a=parseInt(Z[1],10),o=parseInt(Z[2],10)):(Z=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(B))?(n.isCombined=!0,a=parseInt(Z[1],10),s=parseInt(Z[2],10),o=parseInt(Z[3],10)):(B.startsWith(d)&&console.error("Failed to parse lines, starting in 0!"),a=0,o=0,n.isCombined=!1)),i={lines:[],oldStartLine:a,oldStartLine2:s,newStartLine:o,header:B}}function Ge(B){if(n===null||i===null||a===null||o===null)return;let Z={content:B},H=n.isCombined?["+ "," +","++"]:["+"],Oe=n.isCombined?["- "," -","--"]:["-"];EF(B,H)?(n.addedLines++,Z.type=Ze.INSERT,Z.oldNumber=void 0,Z.newNumber=o++):EF(B,Oe)?(n.deletedLines++,Z.type=Ze.DELETE,Z.oldNumber=a++,Z.newNumber=void 0):(Z.type=Ze.CONTEXT,Z.oldNumber=a++,Z.newNumber=o++),i.lines.push(Z)}function oe(B,Z){let H=Z;for(;H<M.length-3;){if(B.startsWith("diff"))return!1;if(M[H].startsWith(c)&&M[H+1].startsWith(f)&&M[H+2].startsWith(d))return!0;H++}return!1}return M.forEach((B,Z)=>{if(!B||B.startsWith("*"))return;let H,Oe=M[Z-1],cr=M[Z+1],Gt=M[Z+2];if(B.startsWith("diff --git")||B.startsWith("diff --combined")){if(me(),(H=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(B))&&(l=Ea(H[1],void 0,e.dstPrefix),u=Ea(H[2],void 0,e.srcPrefix)),n===null)throw new Error("Where is my file !!!");n.isGitDiff=!0;return}if(B.startsWith("Binary files")&&!(n!=null&&n.isGitDiff)){if(me(),(H=/^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(B))&&(l=Ea(H[1],void 0,e.dstPrefix),u=Ea(H[2],void 0,e.srcPrefix)),n===null)throw new Error("Where is my file !!!");n.isBinary=!0;return}if((!n||!n.isGitDiff&&n&&B.startsWith(c)&&cr.startsWith(f)&&Gt.startsWith(d))&&me(),n!=null&&n.isTooBig)return;if(n&&(typeof e.diffMaxChanges=="number"&&n.addedLines+n.deletedLines>e.diffMaxChanges||typeof e.diffMaxLineLength=="number"&&B.length>e.diffMaxLineLength)){n.isTooBig=!0,n.addedLines=0,n.deletedLines=0,n.blocks=[],i=null;let Ie=typeof e.diffTooBigMessage=="function"?e.diffTooBigMessage(r.length):"Diff too big to be displayed";fe(Ie);return}if(B.startsWith(c)&&cr.startsWith(f)||B.startsWith(f)&&Oe.startsWith(c)){if(n&&!n.oldName&&B.startsWith("--- ")&&(H=Fz(B,e.srcPrefix))){n.oldName=H,n.language=SF(n.oldName,n.language);return}if(n&&!n.newName&&B.startsWith("+++ ")&&(H=Oz(B,e.dstPrefix))){n.newName=H,n.language=SF(n.newName,n.language);return}}if(n&&(B.startsWith(d)||n.isGitDiff&&n.oldName&&n.newName&&!i)){fe(B);return}if(i&&(B.startsWith("+")||B.startsWith("-")||B.startsWith(" "))){Ge(B);return}let Y=!oe(B,Z);if(n===null)throw new Error("Where is my file !!!");(H=h.exec(B))?n.oldMode=H[1]:(H=m.exec(B))?n.newMode=H[1]:(H=g.exec(B))?(n.deletedFileMode=H[1],n.isDeleted=!0):(H=v.exec(B))?(n.newFileMode=H[1],n.isNew=!0):(H=w.exec(B))?(Y&&(n.oldName=H[1]),n.isCopy=!0):(H=b.exec(B))?(Y&&(n.newName=H[1]),n.isCopy=!0):(H=E.exec(B))?(Y&&(n.oldName=H[1]),n.isRename=!0):(H=x.exec(B))?(Y&&(n.newName=H[1]),n.isRename=!0):(H=S.exec(B))?(n.isBinary=!0,n.oldName=Ea(H[1],void 0,e.srcPrefix),n.newName=Ea(H[2],void 0,e.dstPrefix),fe("Binary file")):_.test(B)?(n.isBinary=!0,fe(B)):(H=k.exec(B))?n.unchangedPercentage=parseInt(H[1],10):(H=A.exec(B))?n.changedPercentage=parseInt(H[1],10):(H=y.exec(B))?(n.checksumBefore=H[1],n.checksumAfter=H[2],H[3]&&(n.mode=H[3])):(H=T.exec(B))?(n.checksumBefore=[H[2],H[3]],n.checksumAfter=H[1]):(H=P.exec(B))?(n.oldMode=[H[2],H[3]],n.newMode=H[1]):(H=F.exec(B))?(n.newFileMode=H[1],n.isNew=!0):(H=D.exec(B))&&(n.deletedFileMode=H[1],n.isDeleted=!0)}),re(),ye(),r}p();p();p();function En(){}En.prototype={diff:function(e,r){var n,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i.callback;typeof i=="function"&&(a=i,i={});var s=this;function o(x){return x=s.postProcess(x,i),a?(setTimeout(function(){a(x)},0),!0):x}e=this.castInput(e,i),r=this.castInput(r,i),e=this.removeEmpty(this.tokenize(e,i)),r=this.removeEmpty(this.tokenize(r,i));var l=r.length,u=e.length,c=1,f=l+u;i.maxEditLength!=null&&(f=Math.min(f,i.maxEditLength));var d=(n=i.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+d,m=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(m[0],r,e,0,i);if(m[0].oldPos+1>=u&&g+1>=l)return o(TF(s,m[0].lastComponent,r,e,s.useLongestToken));var v=-1/0,w=1/0;function b(){for(var x=Math.max(v,-c);x<=Math.min(w,c);x+=2){var k=void 0,A=m[x-1],y=m[x+1];A&&(m[x-1]=void 0);var S=!1;if(y){var _=y.oldPos-x;S=y&&0<=_&&_<l}var T=A&&A.oldPos+1<u;if(!S&&!T){m[x]=void 0;continue}if(!T||S&&A.oldPos<y.oldPos?k=s.addToPath(y,!0,!1,0,i):k=s.addToPath(A,!1,!0,1,i),g=s.extractCommon(k,r,e,x,i),k.oldPos+1>=u&&g+1>=l)return o(TF(s,k.lastComponent,r,e,s.useLongestToken));m[x]=k,k.oldPos+1>=u&&(w=Math.min(w,x-1)),g Line truncated
`));var r=[],n=t.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var a=n[i];i%2&&!e.newlineIsToken?r[r.length-1]+=a:r.push(a)}return r};T0.equals=function(t,e,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
`))&&(t=t.trim()),(!r.newlineIsToken||!e.includes(`
`))&&(e=e.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
`)&&(t=t.slice(0,-1)),e.endsWith(`
`)&&(e=e.slice(0,-1))),En.prototype.equals.call(this,t,e,r)};var Bz=new En;Bz.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};var Hz=new En;Hz.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};function E0(t){"@babel/helpers - typeof";return E0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E0(t)}var nu=new En;nu.useLongestToken=!0;nu.tokenize=T0.tokenize;nu.castInput=function(t,e){var r=e.undefinedReplacement,n=e.stringifyReplacer,i=n===void 0?function(a,s){return typeof s=="undefined"?r:s}:n;return typeof t=="string"?t:JSON.stringify(k0(t,null,null,i),i," ")};nu.equals=function(t,e,r){return En.prototype.equals.call(nu,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"),r)};function k0(t,e,r,n,i){e=e||[],r=r||[],n&&(t=n(i,t));var a;for(a=0;a<e.length;a+=1)if(e[a]===t)return r[a];var s;if(Object.prototype.toString.call(t)==="[object Array]"){for(e.push(t),s=new Array(t.length),r.push(s),a=0;a<t.length;a+=1)s[a]=k0(t[a],e,r,n,i);return e.pop(),r.pop(),s}if(t&&t.toJSON&&(t=t.toJSON()),E0(t)==="object"&&t!==null){e.push(t),s={},r.push(s);var o=[],l;for(l in t)Object.prototype.hasOwnProperty.call(t,l)&&o.push(l);for(o.sort(),a=0;a<o.length;a+=1)l=o[a],s[l]=k0(t[l],e,r,n,l);e.pop(),r.pop()}else s=t;return s}var A0=new En;A0.tokenize=function(t){return t.slice()};A0.join=A0.removeEmpty=function(t){return t};p();function jz(t,e){if(t.length===0)return e.length;if(e.length===0)return t.length;let r=[],n;for(n=0;n<=e.length;n++)r[n]=[n];let i;for(i=0;i<=t.length;i++)r[0][i]=i;for(n=1;n<=e.length;n++)for(i=1;i<=t.length;i++)e.charAt(n-1)===t.charAt(i-1)?r[n][i]=r[n-1][i-1]:r[n][i]=Math.min(r[n-1][i-1]+1,Math.min(r[n][i-1]+1,r[n-1][i]+1));return r[e.length][t.length]}function rl(t){return(e,r)=>{let n=t(e).trim(),i=t(r).trim();return jz(n,i)/(n.length+i.length)}}function nl(t){function e(n,i,a=new Map){let s=1/0,o;for(let l=0;l<n.length;++l)for(let u=0;u<i.length;++u){let c=JSON.stringify([n[l],i[u]]),f;a.has(c)&&(f=a.get(c))||(f=t(n[l],i[u]),a.set(c,f)),f<s&&(s=f,o={indexA:l,indexB:u,score:s})}return o}function r(n,i,a=0,s=new Map){let o=e(n,i,s);if(!o||n.length+i.length<3)return[[n,i]];let l=n.slice(0,o.indexA),u=i.slice(0,o.indexB),c=[n[o.indexA]],f=[i[o.indexB]],d=o.indexA+1,h=o.indexB+1,m=n.slice(d),g=i.slice(h),v=r(l,u,a+1,s),w=r(c,f,a+1,s),b=r(m,g,a+1,s),E=w;return(o.indexA>0||o.indexB>0)&&(E=v.concat(E)),(n.length>d||i.length>h)&&(E=E.concat(b)),E}return r}var Lt={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},gs={matching:yF.NONE,matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:bF.WORD,colorScheme:ms.LIGHT},ni="/",MF=rl(t=>t.value),Gz=nl(MF);function P0(t){return t.indexOf("dev/null")!==-1}function qz(t){return t.replace(/(<ins[^>]*>((.|\n)*?)<\/ins>)/g,"")}function zz(t){return t.replace(/(<del[^>]*>((.|\n)*?)<\/del>)/g,"")}function il(t){switch(t){case Ze.CONTEXT:return Lt.CONTEXT;case Ze.INSERT:return Lt.INSERTS;case Ze.DELETE:return Lt.DELETES}}function al(t){switch(t){case ms.DARK:return"d2h-dark-color-scheme";case ms.AUTO:return"d2h-auto-color-scheme";case ms.LIGHT:default:return"d2h-light-color-scheme"}}function Vz(t){return t?2:1}function ka(t){return t.slice(0).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")}function rn(t,e,r=!0){let n=Vz(e);return{prefix:t.substring(0,n),content:r?ka(t.substring(n)):t.substring(n)}}function vs(t){let e=_0(t.oldName),r=_0(t.newName);if(e!==r&&!P0(e)&&!P0(r)){let n=[],i=[],a=e.split(ni),s=r.split(ni),o=a.length,l=s.length,u=0,c=o-1,f=l-1;for(;u<c&&u<f&&a[u]===s[u];)n.push(s[u]),u+=1;for(;c>u&&f>u&&a[c]===s[f];)i.unshift(s[f]),c-=1,f-=1;let d=n.join(ni),h=i.join(ni),m=a.slice(u,c+1).join(ni),g=s.slice(u,f+1).join(ni);return d.length&&h.length?d+ni+"{"+m+" \u2192 "+g+"}"+ni+h:d.length?d+ni+"{"+m+" \u2192 "+g+"}":h.length?"{"+m+" \u2192 "+g+"}"+ni+h:e+" \u2192 "+r}else return P0(r)?e:r}function sl(t){return`d2h-${xF(vs(t)).toString().slice(-6)}`}function ol(t){let e="file-changed";return t.isRename||t.isCopy?e="file-renamed":t.isNew?e="file-added":t.isDeleted?e="file-deleted":t.newName!==t.oldName&&(e="file-renamed"),e}function Nh(t,e,r,n={}){let{matching:i,maxLineLengthHighlight:a,matchWordsThreshold:s,diffStyle:o}=Object.assign(Object.assign({},gs),n),l=rn(t,r,!1),u=rn(e,r,!1);if(l.content.length>a||u.content.length>a)return{oldLine:{prefix:l.prefix,content:ka(l.content)},newLine:{prefix:u.prefix,content:ka(u.content)}};let c=o==="char"?$F(l.content,u.content):OF(l.content,u.content),f=[];if(o==="word"&&i==="words"){let h=c.filter(v=>v.removed),m=c.filter(v=>v.added);Gz(m,h).forEach(v=>{v[0].length===1&&v[1].length===1&&MF(v[0][0],v[1][0])<s&&(f.push(v[0][0]),f.push(v[1][0]))})}let d=c.reduce((h,m)=> Line truncated
`);return this.hoganUtils.render(DF,"wrapper",{colorScheme:al(this.config.colorScheme),filesNumber:e.length,files:r})}};p();var I0=Object.assign(Object.assign({},gs),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),iu="generic",LF="line-by-line",Xz="icon",Zz="tag",au=class{constructor(e,r={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},I0),r)}render(e){let r=e.map(n=>{let i;return n.blocks.length?i=this.generateFileHtml(n):i=this.generateEmptyDiff(),this.makeFileDiffHtml(n,i)}).join(`
`);return this.hoganUtils.render(iu,"wrapper",{colorScheme:al(this.config.colorScheme),content:r})}makeFileDiffHtml(e,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&e.blocks.length===0)return"";let n=this.hoganUtils.template(LF,"file-diff"),i=this.hoganUtils.template(iu,"file-path"),a=this.hoganUtils.template(Xz,"file"),s=this.hoganUtils.template(Zz,ol(e));return n.render({file:e,fileHtmlId:sl(e),diffs:r,filePath:i.render({fileDiffName:vs(e)},{fileIcon:a,fileTag:s})})}generateEmptyDiff(){return this.hoganUtils.render(iu,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:Lt})}generateFileHtml(e){let r=nl(rl(n=>rn(n.content,e.isCombined).content));return e.blocks.map(n=>{let i=this.hoganUtils.render(iu,"block-header",{CSSLineClass:Lt,blockHeader:e.isTooBig?n.header:ka(n.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return this.applyLineGroupping(n).forEach(([a,s,o])=>{if(s.length&&o.length&&!a.length)this.applyRematchMatching(s,o,r).map(([l,u])=>{let{left:c,right:f}=this.processChangedLines(e,e.isCombined,l,u);i+=c,i+=f});else if(a.length)a.forEach(l=>{let{prefix:u,content:c}=rn(l.content,e.isCombined);i+=this.generateSingleLineHtml(e,{type:Lt.CONTEXT,prefix:u,content:c,oldNumber:l.oldNumber,newNumber:l.newNumber})});else if(s.length||o.length){let{left:l,right:u}=this.processChangedLines(e,e.isCombined,s,o);i+=l,i+=u}else console.error("Unknown state reached while processing groups of lines",a,s,o)}),i}).join(`
`)}applyLineGroupping(e){let r=[],n=[],i=[];for(let a=0;a<e.lines.length;a++){let s=e.lines[a];(s.type!==Ze.INSERT&&i.length||s.type===Ze.CONTEXT&&n.length>0)&&(r.push([[],n,i]),n=[],i=[]),s.type===Ze.CONTEXT?r.push([[s],[],[]]):s.type===Ze.INSERT&&n.length===0?r.push([[],[],[s]]):s.type===Ze.INSERT&&n.length>0?i.push(s):s.type===Ze.DELETE&&n.push(s)}return(n.length||i.length)&&(r.push([[],n,i]),n=[],i=[]),r}applyRematchMatching(e,r,n){let i=e.length*r.length,a=Oh(e.concat(r).map(o=>o.content.length));return i<this.config.matchingMaxComparisons&&a<this.config.maxLineSizeInBlockForComparison&&(this.config.matching==="lines"||this.config.matching==="words")?n(e,r):[[e,r]]}processChangedLines(e,r,n,i){let a={right:"",left:""},s=Math.max(n.length,i.length);for(let o=0;o<s;o++){let l=n[o],u=i[o],c=l!==void 0&&u!==void 0?Nh(l.content,u.content,r,this.config):void 0,f=l!==void 0&&l.oldNumber!==void 0?Object.assign(Object.assign({},c!==void 0?{prefix:c.oldLine.prefix,content:c.oldLine.content,type:Lt.DELETE_CHANGES}:Object.assign(Object.assign({},rn(l.content,r)),{type:il(l.type)})),{oldNumber:l.oldNumber,newNumber:l.newNumber}):void 0,d=u!==void 0&&u.newNumber!==void 0?Object.assign(Object.assign({},c!==void 0?{prefix:c.newLine.prefix,content:c.newLine.content,type:Lt.INSERT_CHANGES}:Object.assign(Object.assign({},rn(u.content,r)),{type:il(u.type)})),{oldNumber:u.oldNumber,newNumber:u.newNumber}):void 0,{left:h,right:m}=this.generateLineHtml(e,f,d);a.left+=h,a.right+=m}return a}generateLineHtml(e,r,n){return{left:this.generateSingleLineHtml(e,r),right:this.generateSingleLineHtml(e,n)}}generateSingleLineHtml(e,r){if(r===void 0)return"";let n=this.hoganUtils.render(LF,"numbers",{oldNumber:r.oldNumber||"",newNumber:r.newNumber||""});return this.hoganUtils.render(iu,"line",{type:r.type,lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line",prefix:r.prefix===" "?"&nbsp;":r.prefix,content:r.content,lineNumber:n,line:r,file:e})}};p();var $0=Object.assign(Object.assign({},gs),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),su="generic",Kz="side-by-side",Jz="icon",Qz="tag",ou=class{constructor(e,r={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},$0),r)}render(e){let r=e.map(n=>{let i;return n.blocks.length?i=this.generateFileHtml(n):i=this.generateEmptyDiff(),this.makeFileDiffHtml(n,i)}).join(`
`);return this.hoganUtils.render(su,"wrapper",{colorScheme:al(this.config.colorScheme),content:r})}makeFileDiffHtml(e,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&e.blocks.length===0)return"";let n=this.hoganUtils.template(Kz,"file-diff"),i=this.hoganUtils.template(su,"file-path"),a=this.hoganUtils.template(Jz,"file"),s=this.hoganUtils.template(Qz,ol(e));return n.render({file:e,fileHtmlId:sl(e),diffs:r,filePath:i.render({fileDiffName:vs(e)},{fileIcon:a,fileTag:s})})}generateEmptyDiff(){return{right:"",left:this.hoganUtils.render(su,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:Lt})}}generateFileHtml(e){let r=nl(rl(n=>rn(n.content,e.isCombined).content));return e.blocks.map(n=>{let i={left:this.makeHeaderHtml(n.header,e),right:this.makeHeaderHtml("")};return this.applyLineGroupping(n).forEach(([a,s,o])=>{if(s.length&&o.length&&!a.length)this.applyRematchMatching(s,o,r).map(([l,u])=>{let{left:c,right:f}=this.processChangedLines(e.isCombined,l,u);i.left+=c,i.right+=f});else if(a.length)a.forEach(l=>{let{prefix:u,content:c}=rn(l.content,e.isCombined),{left:f,right:d}=this.generateLineHtml({type:Lt.CONTEXT,prefix:u,content:c,number:l.oldNumber},{type:Lt.CONTEXT,prefix:u,content:c,number:l.newNumber});i.left+=f,i.right+=d});else if(s.length||o.length){let{left:l,right:u}=this.processChangedLines(e.isCombined,s,o);i.left+=l,i.right+=u}else console.error("Unknown state reached while processing groups of lines",a,s,o)}),i}).reduce((n,i)=>({left:n.left+i.left,right:n.right+i.right}),{left:"",right:""})}applyLineGroupping(e){let r=[],n=[],i=[];for(let a=0;a<e.lines.length;a++){let s=e.lines[a];(s.type!==Ze.INSERT&&i.length||s.type===Ze.CONTEXT&&n.length>0)&&(r.push([[],n,i]),n=[],i=[]),s.type===Ze.CONTEXT?r.push([[s],[],[]]):s.type===Ze.INSERT&&n.length===0?r.push([[],[],[s]]):s.type===Ze.INSERT&&n.length>0?i.push(s):s.type===Ze.DELETE&&n.push(s)}return(n.length||i.length)&&(r.push([[],n,i]),n=[],i=[]),r}applyRematchMatching(e,r,n){let i=e.length*r.length,a=Oh(e.concat(r).map(o=>o.content.length));return i<this.config.matchingMaxComparisons&&a<this.config.maxLineSizeInBlockForComparison&&(this.config.matching==="lines"||this.config.matching==="words")?n(e,r):[[e,r]]}makeHeaderHtml(e,r){return this.hoganUtils.render(su,"block-header",{CSSLineClass:Lt,blockHeader:r!=null&&r.isTooBig?e:ka(e),lineClass:"d2h-code-side-linenumber",contentClass:"d2h-code-side-line"})}processChangedLines(e,r,n){let i={right:"",left:""},a=Math.max(r.length,n.length);for(let s=0;s<a;s++){let o=r[s],l=n[s],u=o!==void 0&&l!==void 0?Nh(o.content,l.content,e,this.config):void 0,c=o!==void 0&&o.oldNumber!==void 0?Object.assign(Object.assign({},u!==void 0?{prefix:u.oldLine.prefix,content:u.oldLine.content,type:Lt.DELETE_CHANGES}:Object.assign(Object.assign({},rn(o.content,e)),{type:il(o.type)})),{number:o.oldNumber}):void 0,f=l!==void 0&&l.newNumber!==void 0?Object.assign(Object.assign({},u!==void 0?{prefix:u.newLine.prefix,content:u.newLine.content,type:Lt.INSERT_CHANGES}:Object.assign(Object.assign({},rn(l.content,e)),{type:il(l.type)})),{number:l.newNumber}):void 0,{left:d,right:h}=this.generateLineHtml(c,f);i.left+=d,i.right+=h}return i}generateLineHtml(e,r){return{left:this.generateSingleHtml(e),right:this.generateSingleHtml(r)}}generateSingleHtml(e){let r="d2h-code-side-linenumber",n="d2h-code-side-line";return this.hoganUtils.render(su,"line",{type:(e==null?void 0:e.type)||`${Lt.CONTEXT} d2h-emptyplaceholder`,lineClass:e!==void 0?r:`${r} d2h-code-side-emptyplaceholder`,contentClass:e!==void 0?n:`${n} d2h-code-side-emptyplaceholder`,prefix:(e==null?void 0:e.prefix)===" "?"&nbsp;":e==null?void 0:e.prefix,content:e==null?void 0:e.content,lineNumber:e==null?void 0:e.number})}};p();var D0=bt(M0());p();var pt=bt(M0()),dt={};dt["file-summary-line"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('<li class="d2h-file-list-line">'),n.b(`
`+r),n.b(' <span class="d2h-file-name-wrapper">'),n.b(`
`+r),n.b(n.rp("<fileIcon0",t,e," ")),n.b(' <a href="#'),n.b(n.v(n.f("fileHtmlId",t,e,0))),n.b('" class="d2h-file-name">'),n.b(n.v(n.f("fileName",t,e,0))),n.b("</a>"),n.b(`
`+r),n.b(' <span class="d2h-file-stats">'),n.b(`
`+r),n.b(' <span class="d2h-lines-added">'),n.b(n.v(n.f("addedLines",t,e,0))),n.b("</span>"),n.b(`
`+r),n.b(' <span class="d2h-lines-deleted">'),n.b(n.v(n.f("deletedLines",t,e,0))),n.b("</span>"),n.b(`
`+r),n.b(" </span>"),n.b(`
`+r),n.b(" </span>"),n.b(`
`+r),n.b("</li>"),n.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}}},subs:{}});dt["file-summary-wrapper"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('<div class="d2h-file-list-wrapper '),n.b(n.v(n.f("colorScheme",t,e,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="d2h-file-list-header">'),n.b(`
`+r),n.b(' <span class="d2h-file-list-title">Files changed ('),n.b(n.v(n.f("filesNumber",t,e,0))),n.b(")</span>"),n.b(`
`+r),n.b(' <a class="d2h-file-switch d2h-hide">hide</a>'),n.b(`
`+r),n.b(' <a class="d2h-file-switch d2h-show">show</a>'),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(' <ol class="d2h-file-list">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("files",t,e,0))),n.b(`
`+r),n.b(" </ol>"),n.b(`
`+r),n.b("</div>"),n.fl()},partials:{},subs:{}});dt["generic-block-header"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b("<tr>"),n.b(`
`+r),n.b(' <td class="'),n.b(n.v(n.f("lineClass",t,e,0))),n.b(" "),n.b(n.v(n.d("CSSLineClass.INFO",t,e,0))),n.b('"></td>'),n.b(`
`+r),n.b(' <td class="'),n.b(n.v(n.d("CSSLineClass.INFO",t,e,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="'),n.b(n.v(n.f("contentClass",t,e,0))),n.b('">'),n.s(n.f("blockHeader",t,e,1),t,e,0,156,173,"{{ }}")&&(n.rs(t,e,function(i,a,s){s.b(s.t(s.f("blockHeader",i,a,0)))}),t.pop()),n.s(n.f("blockHeader",t,e,1),t,e,1,0,0,"")||n.b("&nbsp;"),n.b("</div>"),n.b(`
`+r),n.b(" </td>"),n.b(`
`+r),n.b("</tr>"),n.fl()},partials:{},subs:{}});dt["generic-empty-diff"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b("<tr>"),n.b(`
`+r),n.b(' <td class="'),n.b(n.v(n.d("CSSLineClass.INFO",t,e,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="'),n.b(n.v(n.f("contentClass",t,e,0))),n.b('">'),n.b(`
`+r),n.b(" File without changes"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(" </td>"),n.b(`
`+r),n.b("</tr>"),n.fl()},partials:{},subs:{}});dt["generic-file-path"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-file-name-wrapper">'),n.b(`
`+r),n.b(n.rp("<fileIcon0",t,e," ")),n.b(' <span class="d2h-file-name">'),n.b(n.v(n.f("fileDiffName",t,e,0))),n.b("</span>"),n.b(`
`+r),n.b(n.rp("<fileTag1",t,e," ")),n.b("</span>"),n.b(`
`+r),n.b('<label class="d2h-file-collapse">'),n.b(`
`+r),n.b(' <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">'),n.b(`
`+r),n.b(" Viewed"),n.b(`
`+r),n.b("</label>"),n.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}},"<fileTag1":{name:"fileTag",partials:{},subs:{}}},subs:{}});dt["generic-line"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b("<tr>"),n.b(`
`+r),n.b(' <td class="'),n.b(n.v(n.f("lineClass",t,e,0))),n.b(" "),n.b(n.v(n.f("type",t,e,0))),n.b('">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("lineNumber",t,e,0))),n.b(`
`+r),n.b(" </td>"),n.b(`
`+r),n.b(' <td class="'),n.b(n.v(n.f("type",t,e,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="'),n.b(n.v(n.f("contentClass",t,e,0))),n.b('">'),n.b(`
`+r),n.s(n.f("prefix",t,e,1),t,e,0,162,238,"{{ }}")&&(n.rs(t,e,function(i,a,s){s.b(' <span class="d2h-code-line-prefix">'),s.b(s.t(s.f("prefix",i,a,0))),s.b("</span>"),s.b(`
`+r)}),t.pop()),n.s(n.f("prefix",t,e,1),t,e,1,0,0,"")||(n.b(' <span class="d2h-code-line-prefix">&nbsp;</span>'),n.b(`
`+r)),n.s(n.f("content",t,e,1),t,e,0,371,445,"{{ }}")&&(n.rs(t,e,function(i,a,s){s.b(' <span class="d2h-code-line-ctn">'),s.b(s.t(s.f("content",i,a,0))),s.b("</span>"),s.b(`
`+r)}),t.pop()),n.s(n.f("content",t,e,1),t,e,1,0,0,"")||(n.b(' <span class="d2h-code-line-ctn"><br></span>'),n.b(`
`+r)),n.b(" </div>"),n.b(`
`+r),n.b(" </td>"),n.b(`
`+r),n.b("</tr>"),n.fl()},partials:{},subs:{}});dt["generic-wrapper"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('<div class="d2h-wrapper '),n.b(n.v(n.f("colorScheme",t,e,0))),n.b('">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("content",t,e,0))),n.b(`
`+r),n.b("</div>"),n.fl()},partials:{},subs:{}});dt["icon-file-added"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16"'),n.b(`
`+r),n.b(' width="14">'),n.b(`
`+r),n.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z"></path>'),n.b(`
`+r),n.b("</svg>"),n.fl()},partials:{},subs:{}});dt["icon-file-changed"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"'),n.b(`
`+r),n.b(' viewBox="0 0 14 16" width="14">'),n.b(`
`+r),n.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path>'),n.b(`
`+r),n.b("</svg>"),n.fl()},partials:{},subs:{}});dt["icon-file-deleted"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1"'),n.b(`
`+r),n.b(' viewBox="0 0 14 16" width="14">'),n.b(`
`+r),n.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z"></path>'),n.b(`
`+r),n.b("</svg>"),n.fl()},partials:{},subs:{}});dt["icon-file-renamed"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1"'),n.b(`
`+r),n.b(' viewBox="0 0 14 16" width="14">'),n.b(`
`+r),n.b(' <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path>'),n.b(`
`+r),n.b("</svg>"),n.fl()},partials:{},subs:{}});dt["icon-file"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">'),n.b(`
`+r),n.b(' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>'),n.b(`
`+r),n.b("</svg>"),n.fl()},partials:{},subs:{}});dt["line-by-line-file-diff"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('<div id="'),n.b(n.v(n.f("fileHtmlId",t,e,0))),n.b('" class="d2h-file-wrapper" data-lang="'),n.b(n.v(n.d("file.language",t,e,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="d2h-file-header">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("filePath",t,e,0))),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(' <div class="d2h-file-diff">'),n.b(`
`+r),n.b(' <div class="d2h-code-wrapper">'),n.b(`
`+r),n.b(' <table class="d2h-diff-table">'),n.b(`
`+r),n.b(' <tbody class="d2h-diff-tbody">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("diffs",t,e,0))),n.b(`
`+r),n.b(" </tbody>"),n.b(`
`+r),n.b(" </table>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b("</div>"),n.fl()},partials:{},subs:{}});dt["line-by-line-numbers"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('<div class="line-num1">'),n.b(n.v(n.f("oldNumber",t,e,0))),n.b("</div>"),n.b(`
`+r),n.b('<div class="line-num2">'),n.b(n.v(n.f("newNumber",t,e,0))),n.b("</div>"),n.fl()},partials:{},subs:{}});dt["side-by-side-file-diff"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('<div id="'),n.b(n.v(n.f("fileHtmlId",t,e,0))),n.b('" class="d2h-file-wrapper" data-lang="'),n.b(n.v(n.d("file.language",t,e,0))),n.b('">'),n.b(`
`+r),n.b(' <div class="d2h-file-header">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.f("filePath",t,e,0))),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(' <div class="d2h-files-diff">'),n.b(`
`+r),n.b(' <div class="d2h-file-side-diff">'),n.b(`
`+r),n.b(' <div class="d2h-code-wrapper">'),n.b(`
`+r),n.b(' <table class="d2h-diff-table">'),n.b(`
`+r),n.b(' <tbody class="d2h-diff-tbody">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.d("diffs.left",t,e,0))),n.b(`
`+r),n.b(" </tbody>"),n.b(`
`+r),n.b(" </table>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(' <div class="d2h-file-side-diff">'),n.b(`
`+r),n.b(' <div class="d2h-code-wrapper">'),n.b(`
`+r),n.b(' <table class="d2h-diff-table">'),n.b(`
`+r),n.b(' <tbody class="d2h-diff-tbody">'),n.b(`
`+r),n.b(" "),n.b(n.t(n.d("diffs.right",t,e,0))),n.b(`
`+r),n.b(" </tbody>"),n.b(`
`+r),n.b(" </table>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b(" </div>"),n.b(`
`+r),n.b("</div>"),n.fl()},partials:{},subs:{}});dt["tag-file-added"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-added d2h-added-tag">ADDED</span>'),n.fl()},partials:{},subs:{}});dt["tag-file-changed"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span>'),n.fl()},partials:{},subs:{}});dt["tag-file-deleted"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-deleted d2h-deleted-tag">DELETED</span>'),n.fl()},partials:{},subs:{}});dt["tag-file-renamed"]=new pt.Template({code:function(t,e,r){var n=this;return n.b(r=r||""),n.b('<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span>'),n.fl()},partials:{},subs:{}});var lu=class{constructor({compiledTemplates:e={},rawTemplates:r={}}){let n=Object.entries(r).reduce((i,[a,s])=>{let o=D0.compile(s,{asString:!1});return Object.assign(Object.assign({},i),{[a]:o})},{});this.preCompiledTemplates=Object.assign(Object.assign(Object.assign({},dt),e),n)}static compile(e){return D0.compile(e,{asString:!1})}render(e,r,n,i,a){let s=this.templateKey(e,r);try{return this.preCompiledTemplates[s].render(n,i,a)}catch(o){throw new Error(`Could not find template to render '${s}'`)}}template(e,r){return this.preCompiledTemplates[this.templateKey(e,r)]}templateKey(e,r){return`${e}-${r}`}};var tV=Object.assign(Object.assign(Object.assign({},I0),$0),{outputFormat:wF.LINE_BY_LINE,drawFileList:!0});function Uh(t,e={}){let r=Object.assign(Object.assign({},tV),e),n=typeof t=="string"?AF(t,r):t,i=new lu(r),{colorScheme:a}=r,s={colorScheme:a},o=r.drawFileList?new Bh(i,s).render(n):"",l=r.outputFormat==="side-by-side"?new ou(i,r).render(n):new au(i,r).render(n);return o+l}var zF=bt(GF());var uu=require("obsidian"),L0=cu.StateEffect.define();function ws(t,e){let r=t.state,n=r.field(Gh),i=r.field(xr),a=r.doc.lineAt(e!=null?e:r.selection.main.head).number,s=Et.findHunk(a,i==null?void 0:i.hunks)[0];if(!s)return;let o=r.doc.line(Math.max(1,s.added.start)).from,l=n.has(o);return r.field(uu.editorEditorField).dispatch({effects:L0.of({pos:o,add:!l})})}var Gh=cu.StateField.define({create:()=>new Set,update(t,e){let r=new Set;for(let n of e.effects)n.is(L0)&&(n.value.add?t.add(n.value.pos):t.delete(n.value.pos));for(let n of t)r.add(e.changes.mapPos(n));return r}}),VF=cu.StateField.define({create:t=>qF(t),update(t,e){return e.docChanged||e.effects.some(r=>r.is(tl)||r.is(L0))?qF(e.state):t},provide:t=>jh.showTooltip.computeN([t],e=>e.field(t))}),WF=jh.EditorView.baseTheme({".cm-tooltip.git-diff-tooltip":{"z-index":"var(--layer-popover)",backgroundColor:"var(--background-primary-alt)",border:"var(--border-width) solid var(--background-primary-alt)",borderRadius:"var(--radius-s)"},".cm-tooltip.git-diff-tooltip .tooltip-toolbar":{display:"flex",padding:"var(--size-2-1)"}});function qF(t){let e=t.field(xr);return e?[...t.field(Gh)].map(n=>{let i=t.doc.lineAt(n),a=Et.findHunk(i.number,e.hunks)[0];if(a)return{pos:n,above:!1,arrow:!1,strictSide:!0,clip:!1,create:()=>rV(a,t,n)}}).filter(n=>n!==void 0):[]}function rV(t,e,r){let n=Et.createPatch("file",[t],"10064",!1).join(`
`)+`
`,i=Uh(n,{colorScheme:zF.ColorSchemeType.AUTO,diffStyle:"word",drawFileList:!1}),a=new DOMParser().parseFromString(i,"text/html").querySelector(".d2h-file-diff"),s=document.createElement("div"),o=document.createElement("div");o.addClass("tooltip-toolbar");let l=(h,m)=>{let g=document.createElement("div");return(0,uu.setIcon)(g,h),g.setAttr("aria-label",m),g.addClass("clickable-icon"),g},u=l("x","Close hunk"),c=l("plus","Stage hunk"),f=l("undo","Reset hunk");o.appendChild(u),o.appendChild(c),o.appendChild(f),s.appendChild(o),s.appendChild(a),s.addClass("git-diff-tooltip","git-diff");let d=e.field(uu.editorEditorField);return u.onclick=()=>{ws(d,r)},c.onclick=()=>{let h=Zn.plugin;h&&(h.promiseQueue.addTask(()=>h.hunkActions.stageHunk(r)),ws(d,r))},f.onclick=()=>{let h=Zn.plugin;h&&(h.hunkActions.resetHunk(r),ws(d,r))},{dom:s,update:h=>{r=h.changes.mapPos(r)}}}function YF(t){let e=t.app;t.addCommand({id:"edit-gitignore",name:"Edit .gitignore",callback:async()=>{let r=t.gitManager.getRelativeVaultPath(".gitignore");await e.vault.adapter.exists(r)||await e.vault.adapter.write(r,"");let n=await e.vault.adapter.read(r),a=await new Eh(e,n).openAndGetReslt();a!==void 0&&(await e.vault.adapter.write(r,a),await t.refresh())}}),t.addCommand({id:"open-git-view",name:"Open source control view",callback:async()=>{var i;let r=e.workspace.getLeavesOfType(Dt.type),n;r.length===0?(n=(i=e.workspace.getRightLeaf(!1))!=null?i:e.workspace.getLeaf(),await n.setViewState({type:Dt.type})):n=r.first(),await e.workspace.revealLeaf(n),e.workspace.trigger("obsidian-git:refresh")}}),t.addCommand({id:"open-history-view",name:"Open history view",callback:async()=>{var i;let r=e.workspace.getLeavesOfType(Qr.type),n;r.length===0?(n=(i=e.workspace.getRightLeaf(!1))!=null?i:e.workspace.getLeaf(),await n.setViewState({type:Qr.type})):n=r.first(),await e.workspace.revealLeaf(n),e.workspace.trigger("obsidian-git:refresh")}}),t.addCommand({id:"open-diff-view",name:"Open diff view",checkCallback:r=>{let n=e.workspace.getActiveFile();if(r)return n!==null;{let i=t.gitManager.getRelativeRepoPath(n.path,!0);t.tools.openDiff({aFile:i,aRef:""})}}}),t.addCommand({id:"view-file-on-github",name:"Open file on GitHub",editorCallback:(r,{file:n})=>{if(n)return C$(r,n,t.gitManager)}}),t.addCommand({id:"view-history-on-github",name:"Open file history on GitHub",editorCallback:(r,{file:n})=>{if(n)return P$(n,t.gitManager)}}),t.addCommand({id:"pull",name:"Pull",callback:()=>t.promiseQueue.addTask(()=>t.pullChangesFromRemote())}),t.addCommand({id:"fetch",name:"Fetch",callback:()=>t.promiseQueue.addTask(()=>t.fetch())}),t.addCommand({id:"switch-to-remote-branch",name:"Switch to remote branch",callback:()=>t.promiseQueue.addTask(()=>t.switchRemoteBranch())}),t.addCommand({id:"add-to-gitignore",name:"Add file to .gitignore",checkCallback:r=>{let n=e.workspace.getActiveFile();if(r)return n!==null;t.addFileToGitignore(n.path,n instanceof kn.TFolder).catch(i=>t.displayError(i))}}),t.addCommand({id:"push",name:"Commit-and-sync",callback:()=>t.promiseQueue.addTask(()=>t.commitAndSync({fromAutoBackup:!1}))}),t.addCommand({id:"backup-and-close",name:"Commit-and-sync and then close Obsidian",callback:()=>t.promiseQueue.addTask(async()=>{await t.commitAndSync({fromAutoBackup:!1}),window.close()})}),t.addCommand({id:"commit-push-specified-message",name:"Commit-and-sync with specific message",callback:()=>t.promiseQueue.addTask(()=>t.commitAndSync({fromAutoBackup:!1,requestCustomMessage:!0}))}),t.addCommand({id:"commit",name:"Commit all changes",callback:()=>t.promiseQueue.addTask(()=>t.commit({fromAuto:!1}))}),t.addCommand({id:"commit-specified-message",name:"Commit all changes with specific message",callback:()=>t.promiseQueue.addTask(()=>t.commit({fromAuto:!1,requestCustomMessage:!0}))}),t.addCommand({id:"commit-smart",name:"Commit",callback:()=>t.promiseQueue.addTask(async()=>{let n=(await t.updateCachedStatus()).staged.length>0;return t.commit({fromAuto:!1,requestCustomMessage:!1,onlyStaged:n})})}),t.addCommand({id:"commit-staged",name:"Commit staged",checkCallback:function(r){if(r)return!1;t.promiseQueue.addTask(async()=>t.commit({fromAuto:!1,requestCustomMessage:!1}))}}),kn.Platform.isDesktopApp&&t.addCommand({id:"commit-amend-staged-specified-message",name:"Amend staged",callback:()=>t.promiseQueue.addTask(()=>t.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:!0,amend:!0}))}),t.addCommand({id:"commit-smart-specified-message",name:"Commit with specific message",callback:()=>t.promiseQueue.addTask(async()=>{let n=(await t.updateCachedStatus()).staged.length>0;return t.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:n})})}),t.addCommand({id:"commit-staged-specified-message",name:"Commit staged with specific message",checkCallback:function(r){return r?!1:t.promiseQueue.addTask(()=>t.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:!0}))}}),t.addCommand({id:"push2",name:"Push",callback:()=>t.promiseQueue.addTask(()=>t.push())}),t.addCommand({id:"stage-cur Line truncated
- ${a.map(o=>o.vaultPath).join(`
- `)}
Please remove them or add to .gitignore.`),!0}return!1}async writeAndOpenFile(e){e!==void 0&&await this.plugin.app.vault.adapter.write(Ro,e);let r=!1;this.plugin.app.workspace.iterateAllLeaves(n=>{n.getDisplayText()!=""&&Ro.startsWith(n.getDisplayText())&&(r=!0)}),r||await this.plugin.app.workspace.openLinkText(Ro,"/",!0)}openDiff({aFile:e,bFile:r,aRef:n,bRef:i,event:a}){var l,u;let s=this.plugin.settings.diffStyle;ll.Platform.isMobileApp&&(s="git_unified");let o={aFile:e,bFile:r!=null?r:e,aRef:n,bRef:i};s=="split"?(l=bn(this.plugin.app,a))==null||l.setViewState({type:ma.type,active:!0,state:o}):s=="git_unified"&&((u=bn(this.plugin.app,a))==null||u.setViewState({type:ga.type,active:!0,state:o}))}async runRawCommand(){let e=this.plugin.gitManager;if(!(e instanceof _e))return;let n=await new ze(this.plugin,{placeholder:"push origin master",allowEmpty:!1}).openAndGetResult();n!==void 0&&this.plugin.promiseQueue.addTask(async()=>{let i=new ll.Notice(`Running '${n}'...`,999999);try{let a=await e.rawCommand(n);a?(i.setMessage(a),window.setTimeout(()=>i.hide(),5e3)):i.hide()}catch(a){throw i.hide(),a}})}};p();var zh=require("obsidian");var ys=class extends zh.ItemView{constructor(r,n){super(r);this.plugin=n;this.gettingDiff=!1;this.parser=new DOMParser,this.navigation=!0,this.contentEl.addClass("git-diff"),this.gitRefreshRef=this.app.workspace.on("obsidian-git:status-changed",()=>{this.refresh().catch(console.error)})}getViewType(){return ga.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let n=this.state.bFile.split("/").last();return n!=null&&n.endsWith(".md")&&(n=n.slice(0,-3)),`Diff: ${n}`}return ga.name}getIcon(){return ga.icon}async setState(r,n){this.state=r,zh.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await this.refresh()}getState(){return this.state}onClose(){return this.app.workspace.offref(this.gitRefreshRef),this.app.workspace.offref(this.gitViewRefreshRef),super.onClose()}async onOpen(){return await this.refresh(),super.onOpen()}async refresh(){var r;if((r=this.state)!=null&&r.bFile&&!this.gettingDiff&&this.plugin.gitManager){this.gettingDiff=!0;try{let n=await this.plugin.gitManager.getDiffString(this.state.bFile,this.state.aRef=="HEAD",this.state.bRef);this.contentEl.empty();let i=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);if(!n){if(this.plugin.gitManager instanceof _e&&await this.plugin.gitManager.isTracked(this.state.bFile))n=[`--- ${this.state.aFile}`,`+++ ${this.state.bFile}`,""].join(`
`);else if(await this.app.vault.adapter.exists(i)){let a=await this.app.vault.adapter.read(i);n=[...`--- /dev/null
+++ ${this.state.bFile}
@@ -0,0 +1,${a.split(`
`).length} @@`.split(`
`),...a.split(`
`).map(o=>`+${o}`)].join(`
`)}}if(n){let a=this.parser.parseFromString(Uh(n),"text/html").querySelector(".d2h-file-diff");this.contentEl.append(a)}else{let a=this.contentEl.createDiv({cls:"obsidian-git-center"});a.createSpan({text:"\u26A0\uFE0F",attr:{style:"font-size: 2em"}}),a.createEl("br"),a.createSpan({text:"File not found: "+this.state.bFile})}}finally{this.gettingDiff=!1}}}};p();var Mi=require("obsidian");var ul=require("@codemirror/commands");var Vh=require("@codemirror/search"),cl=require("@codemirror/state"),an=require("@codemirror/view");var bs=class extends Mi.ItemView{constructor(r,n){super(r);this.plugin=n;this.refreshing=!1;this.ignoreNextModification=!1;this.navigation=!0,this.registerEvent(this.app.workspace.on("obsidian-git:status-changed",()=>{this.mergeView?this.updateRefEditors().catch(console.error):this.createMergeView().catch(console.error)})),this.intervalRef=window.setInterval(()=>{this.mergeView&&this.updateRefEditors().catch(console.error)},30*1e3),this.registerEvent(this.app.vault.on("modify",i=>{this.state.bRef==null&&i.path===this.state.bFile&&(this.ignoreNextModification?this.ignoreNextModification=!1:this.updateModifiableEditor().catch(console.error))})),this.registerEvent(this.app.vault.on("delete",i=>{this.state.bRef==null&&i.path===this.state.bFile&&this.createMergeView().catch(console.error)})),this.registerEvent(this.app.vault.on("create",i=>{this.state.bRef==null&&i.path===this.state.bFile&&this.createMergeView().catch(console.error)})),this.registerEvent(this.app.vault.on("rename",(i,a)=>{this.state.bRef==null&&(i.path===this.state.bFile||a===this.state.bFile)&&this.createMergeView().catch(console.error)})),this.fileSaveDebouncer=(0,Mi.debounce)(i=>{let a=this.state.bFile;a&&(this.ignoreNextModification=!0,this.plugin.app.vault.adapter.write(this.plugin.gitManager.getRelativeVaultPath(a),i).catch(s=>this.plugin.displayError(s)))},1e3,!1)}getViewType(){return ma.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let n=this.state.bFile.split("/").last();n!=null&&n.endsWith(".md")&&(n=n.slice(0,-3));let i;return this.state.bRef==null?i=" (Working Tree)":this.state.bRef==""?i=" (Index)":i="("+this.state.bRef.substring(0,7)+")",`Diff: ${n} ${i}`}return ma.name}getIcon(){return ma.icon}async setState(r,n){this.state=r,Mi.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await super.setState(r,n),await this.createMergeView()}getState(){return this.state}onClose(){return window.clearInterval(this.intervalRef),super.onClose()}async onOpen(){return await this.createMergeView(),super.onOpen()}async gitShow(r,n){try{return await this.plugin.gitManager.show(r,n,!1)}catch(i){if(i instanceof br&&(i.message.includes("does not exist")||i.message.includes("unknown revision or path")||i.message.includes("exists on disk, but not in")||i.message.includes("fatal: bad object")))return i.message.includes("fatal: bad object")&&this.plugin.displayError(i.message),"";throw i}}async bShouldBeEditable(){if(this.state.bRef!=null)return!1;let r=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);return await this.app.vault.adapter.exists(r)}async updateModifiableEditor(){if(!this.mergeView||this.refreshing)return;let r=this.mergeView.b;this.refreshing=!0;let n=await this.app.vault.adapter.read(this.state.bFile);if(n!=r.state.doc.toString()){let i=r.state.update({changes:{from:0,to:r.state.doc.length,insert:n},annotations:[cl.Transaction.remote.of(!0)]});r.dispatch(i)}this.refreshing=!1}async updateRefEditors(){if(!this.mergeView||this.refreshing)return;let r=this.mergeView.a,n=this.mergeView.b;this.refreshing=!0;let i=await this.gitShow(this.state.aRef,this.state.aFile),a;if(this.state.bRef!=null&&(a=await this.gitShow(this.state.bRef,this.state.bFile)),i!=r.state.doc.toString()){let s=r.state.update({changes:{from:0,to:r.state.doc.length,insert:i}});r.dispatch(s)}if(a!=null&&a!=n.state.doc.toString()){let s=n.state.update({changes:{from:0,to:n.state.doc.length,insert:a}});n.dispatch(s)}this.refreshing=!1}renderButtons(){let r=document.createElement("div"),n=r.createDiv();if(n.addClass("clickable-icon"),n.setAttr("aria-label",this.state.bRef==null?"Stage hunk":"Unstage hunk"),(0,Mi.setIcon)(n,this.state.bRef==null?"plus":"minus"),n.onmousedown=async i=>{var h;let a=this.mergeView.b,s=this.mergeView.a,o=g0(a.state),l=(h=r.parentElement)==null?void 0:h.indexOf(r),u=o.chunks[l],c=y0(u,s.state.doc,a.state.doc),f=w0(this.mergeView.a.state.doc.toString(),this.mergeView.b.state.doc.toString(),[c])[0],d=Et.createPatch(this.state.bFile,[f],"100644",this.state.bRef!=null).join(`
`)+`
`;await this.plugin.gitManager.applyPatch(d),this.plugin.app.workspace.trigger("obsidian-git:refresh")},this.state.bRef==null){let i=r.createDiv();i.addClass("clickable-icon"),i.setAttr("aria-label","Reset hunk"),(0,Mi.setIcon)(i,"undo"),i.onmousedown=a=>{var f;let s=this.mergeView.a,o=this.mergeView.b,l=g0(o.state),u=(f=r.parentElement)==null?void 0:f.indexOf(r),c=l.chunks[u];if(c){let d=c.fromA,h=c.toA,m=c.fromB,g=c.toB,v=s.state.sliceDoc(d,Math.max(d,h-1));d!=h&&g<=o.state.doc.length&&(v+=s.state.lineBreak),o.dispatch({changes:{from:m,to:Math.min(o.state.doc.length,g),insert:v},userEvent:"revert"})}}}return r.onmousedown=i=>{i.preventDefault(),i.stopPropagation()},r}async createMergeView(){var r,n,i;if((r=this.state)!=null&&r.aFile&&((n=this.state)!=null&&n.bFile)&&!this.refreshing&&this.plugin.gitManager){this.refreshing=!0,(i=this.mergeView)==null||i.destroy();let a=this.containerEl.children[1];a.empty(),this.contentEl.addClass("git-split-diff-view","git-diff"),this.bIsEditable=await this.bShouldBeEditable();let s=await this.gitShow(this.state.aRef,this.state.aFile),o;if(this.state.bRef!=null)o=await this.gitShow(this.state.bRef,this.state.bFile);else{let g=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);await this.app.vault.adapter.exists(g)?o=await this.app.vault.adapter.read(g):o=""}let l=[(0,an.lineNumbers)(),(0,Vh.highlightSelectionMatches)(),(0,an.drawSelection)(),an.keymap.of([...ul.standardKeymap,ul.indentWithTab]),(0,ul.history)(),(0,Vh.search)(),an.EditorView.lineWrapping],u=this,c=an.ViewPlugin.define(g=>({update(v){if(v.docChanged&&!v.transactions.some(w=>w.annotation(cl.Transaction.remote))){let w=g.state.doc.toString();u.fileSaveDebouncer(w)}}})),f={doc:s,extensions:[...l,an.EditorView.editable.of(!1),cl.EditorState.readOnly.of(!0)]},d=[...l];this.bIsEditable?d.push(c):d.push(an.EditorView.editable.of(!1),cl.EditorState.readOnly.of(!0));let h={doc:o,extensions:d};a.addClasses(["cm-s-obsidian","mod-cm6","markdown-source-view","cm-content"]);let m=this.plugin.gitManager instanceof _e&&(this.state.bRef===void 0||this.state.bRef==="");this.mergeView=new $h({b:h,a:f,collapseUnchanged:{minSize:6,margin:4},renderRevertControl:m?()=>this.renderButtons():void 0,revertControls:m?"a-to-b":void 0,diffConfig:{scanLimit:this.bIsEditable?1e3:1e4},parent:a}),this.refreshing=!1}}};p();var yM=require("obsidian");p();p();p();var XF="5";var ZF,KF,JF;typeof window!="undefined"&&((JF=(KF=(ZF=window.__svelte)!=null?ZF:window.__svelte={}).v)!=null?JF:KF.v=new Set).add(XF);p();p();p();var fl="[",Aa="[!",_s="]",Di={};var Ve=Symbol(),sn=Symbol("filename"),QF=Symbol("hmr"),eO="http://www.w3.org/1999/xhtml";p();p();p();p();var Wh=!0;p();var L=!1;p();var on=Array.isArray,tO=Array.prototype.indexOf,du=Array.from,N0=Object.keys,Wt=Object.defineProperty,Sr=Object.getOwnPropertyDescriptor,B0=Object.getOwnPropertyDescriptors,H0=Object.prototype,rO=Array.prototype,dl=Object.getPrototypeOf,U0=Object.isExtensible;function j0(t){return typeof t=="function"}var ar=()=>{};function hu(t){for(var e=0;e<t.length;e++)t[e]()}function nO(){var t,e,r=new Promise((n,i)=>{t=n,e=i});return{promise:r,resolve:t,reject:e}}p();p();var Er=Symbol("$state"),pu=Symbol("legacy props"),iO=Symbol(""),Yh=Symbol("proxy path"),hl=new class extends Error{constructor(){super(...arguments);vt(this,"name","StaleReactionError");vt(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};var mu=3,ln=8;p();p();function aO(){if(L){let t=new Error("await_outside_boundary\nCannot await outside a `<svelte:boundary>` with a `pending` snippet\nhttps://svelte.dev/e/await_outside_boundary");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/await_outside_boundary")}function gu(t){if(L){let e=new Error(`lifecycle_outside_component
\`${t}(...)\` can only be used during component initialisation
https://svelte.dev/e/lifecycle_outside_component`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function sO(){if(L){let t=new Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/async_derived_orphan")}function G0(){if(L){let t=new Error("bind_invalid_checkbox_value\nUsing `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function oO(){if(L){let t=new Error(`derived_references_self
A derived value cannot reference itself recursively
https://svelte.dev/e/derived_references_self`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/derived_references_self")}function lO(t){if(L){let e=new Error(`effect_in_teardown
\`${t}\` cannot be used inside an effect cleanup function
https://svelte.dev/e/effect_in_teardown`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function cO(){if(L){let t=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function uO(t){if(L){let e=new Error(`effect_orphan
\`${t}\` can only be used inside an effect (e.g. during component initialisation)
https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function fO(){if(L){let t=new Error(`effect_update_depth_exceeded
Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
https://svelte.dev/e/effect_update_depth_exceeded`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function dO(){if(L){let t=new Error("flush_sync_in_effect\nCannot use `flushSync` inside an effect\nhttps://svelte.dev/e/flush_sync_in_effect");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/flush_sync_in_effect")}function hO(){if(L){let t=new Error(`hydration_failed
Failed to hydrate the application
https://svelte.dev/e/hydration_failed`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/hydration_failed")}function pO(t){if(L){let e=new Error(`props_invalid_value
Cannot do \`bind:${t}={undefined}\` when \`${t}\` has a fallback value
https://svelte.dev/e/props_invalid_value`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_invalid_value")}function mO(t){if(L){let e=new Error(`rune_outside_svelte
The \`${t}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
https://svelte.dev/e/rune_outside_svelte`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function gO(){if(L){let t=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function vO(){if(L){let t=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function wO(){if(L){let t=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}p();p();p();var xs="font-weight: bold",Ss="font-weight: normal";function yO(t){L?console.warn(`%c[svelte] await_reactivity_loss
%cDetected reactivity loss when reading \`${t}\`. This happens when state is read in an async function after an earlier \`await\`
https://svelte.dev/e/await_reactivity_loss`,xs,Ss):console.warn("https://svelte.dev/e/await_reactivity_loss")}function bO(t,e){L?console.warn(`%c[svelte] await_waterfall
%cAn async derived, \`${t}\` (${e}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app
https://svelte.dev/e/await_waterfall`,xs,Ss):console.warn("https://svelte.dev/e/await_waterfall")}function _O(t,e,r){L?console.warn(`%c[svelte] hydration_attribute_changed
%cThe \`${t}\` attribute on \`${e}\` changed its value between server and client renders. The client value, \`${r}\`, will be ignored in favour of the server value
https://svelte.dev/e/hydration_attribute_changed`,xs,Ss):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Es(t){L?console.warn(`%c[svelte] hydration_mismatch
%c${t?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${t}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
https://svelte.dev/e/hydration_mismatch`,xs,Ss):console.warn("https://svelte.dev/e/hydration_mismatch")}function xO(){L?console.warn(`%c[svelte] lifecycle_double_unmount
%cTried to unmount a component that was not mounted
https://svelte.dev/e/lifecycle_double_unmount`,xs,Ss):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Xh(t){L?console.warn(`%c[svelte] state_proxy_equality_mismatch
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${t}\` will produce unexpected results
https://svelte.dev/e/state_proxy_equality_mismatch`,xs,Ss):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function SO(t){L?console.warn(`%c[svelte] transition_slide_display
%cThe \`slide\` transition does not work correctly for elements with \`display: ${t}\`
https://svelte.dev/e/transition_slide_display`,xs,Ss):console.warn("https://svelte.dev/e/transition_slide_display")}var ae=!1;function Xt(t){ae=t}var pe;function et(t){if(t===null)throw Es(),Di;return pe=t}function Zt(){return et(Bt(pe))}function j(t){if(ae){if(Bt(pe)!==null)throw Es(),Di;pe=t}}function pl(t=1){if(ae){for(var e=t,r=pe;e--;)r=Bt(r);pe=r}}function ks(){for(var t=0,e=pe;;){if(e.nodeType===ln){var r=e.data;if(r===_s){if(t===0)return e;t-=1}else(r===fl||r===Aa)&&(t+=1)}var n=Bt(e);e.remove(),e=n}}function Zh(t){if(!t||t.nodeType!==ln)throw Es(),Di;return t.data}p();p();p();p();function Kh(t){return t===this.v}function Jh(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Qh(t){return!Jh(t,this.v)}p();var An=!1,Li=!1,ii=!1;p();p();p();var vu=null;function ai(t){let e=Error(),r=e.stack;if(!r)return null;let n=r.split(`
`),i=[`
`];for(let a=0;a<n.length;a++){let s=n[a];if(s!=="Error"){if(s.includes("validate_each_keys"))return null;s.includes("svelte/src/internal")||i.push(s)}}return i.length===1?null:(Wt(e,"stack",{value:i.join(`
`)}),Wt(e,"name",{value:`${t}Error`}),e)}function cn(t,e){return t.label=e,ep(t.v,e),t}function ep(t,e){var r;return(r=t==null?void 0:t[Yh])==null||r.call(t,e),t}p();var ve=null;function Ca(t){ve=t}var Bi=null;function tp(t){Bi=t}var Tn=null;function wu(t){Tn=t}function tt(t,e=!1,r){ve={p:ve,c:null,e:null,s:t,x:null,l:Li&&!e?{s:null,u:null,$:[]}:null},L&&(ve.function=r,Tn=r)}function rt(t){var i;var e=ve,r=e.e;if(r!==null){e.e=null;for(var n of r)z0(n)}return t!==void 0&&(e.x=t),ve=e.p,L&&(Tn=(i=ve==null?void 0:ve.function)!=null?i:null),t!=null?t:{}}function un(){return!Li||ve!==null&&ve.l===null}p();p();p();var V0=new WeakMap;function W0(t){var e=Q;if(e===null)return se.f|=8388608,t;if(L&&t instanceof Error&&!V0.has(t)&&V0.set(t,iV(t,e)),e.f&32768)ml(t,e);else{if(!(e.f&128))throw!e.parent&&t instanceof Error&&AO(t),t;e.b.error(t)}}function ml(t,e){for(;e!==null;){if(e.f&128)try{e.b.error(t);return}catch(r){t=r}e=e.parent}throw t instanceof Error&&AO(t),t}function iV(t,e){var s,o,l;let r=Sr(t,"message");if(!(r&&!r.configurable)){for(var n=yu?" ":" ",i=`
${n}in ${((s=e.fn)==null?void 0:s.name)||"<unknown>"}`,a=e.ctx;a!==null;)i+=`
${n}in ${(o=a.function)==null?void 0:o[sn].split("/").pop()}`,a=a.p;return{message:t.message+`
${i}
`,stack:(l=t.stack)==null?void 0:l.split(`
`).filter(u=>!u.includes("svelte/src/internal")).join(`
`)}}}function AO(t){let e=V0.get(t);e&&(Wt(t,"message",{value:e.message}),Wt(t,"stack",{value:e.stack}))}p();var bu=[],Y0=[];function TO(){var t=bu;bu=[],hu(t)}function aV(){var t=Y0;Y0=[],hu(t)}function Br(t){bu.length===0&&queueMicrotask(TO),bu.push(t)}function CO(){bu.length>0&&TO(),Y0.length>0&&aV()}p();var Pie=589952;function np(){for(var t=Q.b;t!==null&&!t.has_pending_snippet();)t=t.parent;return t===null&&aO(),t}p();p();var Ui=null;function J0(t){Ui=t}var xu=new Set;function As(t){var e=2050,r=se!==null&&se.f&2?se:null;Q===null||r!==null&&r.f&256?e|=256:Q.f|=524288;let n={ctx:ve,deps:null,effects:null,equals:Kh,f:e,fn:t,reactions:null,rv:0,v:Ve,wv:0,parent:r!=null?r:Q,ac:null};return L&&ii&&(n.created=ai("CreatedAt")),n}function Q0(t,e){let r=Q;r===null&&sO();var n=r.b,i=void 0,a=Hr(Ve),s=null,o=!se;return PO(()=>{var h;L&&(Ui=Q);try{var l=t()}catch(m){l=Promise.reject(m)}L&&(Ui=null);var u=()=>l;i=(h=s==null?void 0:s.then(u,u))!=null?h:Promise.resolve(l),s=i;var c=Se,f=n.pending;o&&(n.update_pending_count(1),f||c.increment());let d=(m,g=void 0)=>{s=null,Ui=null,f||c.activate(),g?g!==hl&&(a.f|=8388608,oi(a,g)):(a.f&8388608&&(a.f^=8388608),oi(a,m),L&&e!==void 0&&(xu.add(a),setTimeout(()=>{xu.has(a)&&(bO(a.label,e),xu.delete(a))}))),o&&(n.update_pending_count(-1),f||c.decrement()),sp()};if(i.then(d,m=>d(null,m||"unknown")),c)return()=>{queueMicrotask(()=>c.neuter())}}),L&&(a.f|=4194304),new Promise(l=>{function u(c){function f(){c===i?l(a):u(i)}c.then(f,f)}u(i)})}function Rt(t){let e=As(t);return op(e),e}function Ts(t){let e=As(t);return e.equals=Qh,e}function ip(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)Tt(e[r])}}var Z0=[];function sV(t){for(var e=t.parent;e!==null;){if(!(e.f&2))return e;e=e.parent}return null}function Su(t){var e,r=Q;if(Ht(sV(t)),L){let n=Cs;K0(new Set);try{Z0.includes(t)&&oO(),Z0.push(t),ip(t),e=ap(t)}finally{Ht(r),K0(n),Z0.pop()}}else try{ip(t),e=ap(t)}finally{Ht(r)}return e}function ey(t){var e=Su(t);if(t.equals(e)||(t.v=e,t.wv=Eu()),!Cn)if(Pa!==null)Pa.set(t,t.v);else{var r=(ji||t.f&256)&&t.deps!==null?4096:1024;mt(t,r)}}function lp(t,e,r){let n=un()?As:Ts;if(e.length===0){r(t.map(n));return}var i=Se,a=Q,s=oV(),o=np();Promise.all(e.map(l=>Q0(l))).then(l=>{i==null||i.activate(),s();try{r([...t.map(n),...l])}catch(u){a.f&16384||ml(u,a)}i==null||i.deactivate(),sp()}).catch(l=>{o.error(l)})}function oV(){var t=Q,e=se,r=ve;return function(){Ht(t),Ct(e),Ca(r),L&&J0(null)}}function sp(){Ht(null),Ct(null),Ca(null),L&&J0(null)}var ku=new Set,Se=null,Au=null,Pa=null,X0=new Set,fp=[];function IO(){let t=fp.shift();fp.length>0&&queueMicrotask(IO),t()}var Rs=[],pp=null,ty=!1,cp=!1,vl,wl,Ra,Tu,Cu,Ps,yl,Ia,$a,bl,Pu,Ru,Rn,$O,up,ry,dp=class dp{constructor(){wt(this,Rn);vt(this,"current",new Map);wt(this,vl,new Map);wt(this,wl,new Set);wt(this,Ra,0);wt(this,Tu,null);wt(this,Cu,!1);wt(this,Ps,[]);wt(this,yl,[]);wt(this,Ia,[]);wt(this,$a,[]);wt(this,bl,[]);wt(this,Pu,[]);wt(this,Ru,[]);vt(this,"skipped_effects",new Set)}process(e){var a;Rs=[],Au=null;var r=null;if(ku.size>1){r=new Map,Pa=new Map;for(let[s,o]of this.current)r.set(s,{v:s.v,wv:s.wv}),s.v=o;for(let s of ku)if(s!==this)for(let[o,l]of le(s,vl))r.has(o)||(r.set(o,{v:o.v,wv:o.wv}),o.v=l)}for(let s of e)vi(this,Rn,$O).call(this,s);if(le(this,Ps).length===0&&le(this,Ra)===0){vi(this,Rn,ry).call(this);var n=le(this,Ia),i=le(this,$a);Ot(this,Ia,[]),Ot(this,$a,[]),Ot(this,bl,[]),Au=Se,Se=null,RO(n),RO(i),Se===null?Se=this:ku.delete(this),(a=le(this,Tu))==null||a.resolve()}else vi(this,Rn,up).call(this,le(this,Ia)),vi(this,Rn,up).call(this,le(this,$a)),vi(this,Rn,up).call(this,le(this,bl));if(r){for(let[s,{v:o,wv:l}]of r)s.wv<=l&&(s.v=o);Pa=null}for(let s of le(this,Ps))Gi(s);for(let s of le(this,yl))Gi(s);Ot(this,Ps,[]),Ot(this,yl,[])}capture(e,r){le(this,vl).has(e)||le(this,vl).set(e,r),this.current.set(e,e.v)}activate(){Se=this}deactivate(){Se=null,Au=null;for(let e of X0)if(X0.delete(e),e(),Se!==null)break}neuter(){Ot(this,Cu,!0)}flush(){Rs.length>0?ny():vi(this,Rn,ry).call(this),Se===this&&(le(this,Ra)===0&&ku.delete(this),this.deactivate())}increment(){Ot(this,Ra,le(this,Ra)+1)}decrement(){if(Ot(this,Ra,le(this,Ra)-1),le(this,Ra)===0){for(let e of le(this,Pu))mt(e,2048),ci(e);for(let e of le(this,Ru))mt(e,4096),ci(e);Ot(this,Ia,[]),Ot(this,$a,[]),this.flush()}else this.deactivate()}add_callback(e){le(this,wl).add(e)}settled(){var e;return((e=le(this,Tu))!=null?e:Ot(this,Tu,nO())).promise}static ensure(){if(Se===null){let e=Se=new dp;ku.add(Se),cp||dp.enqueue(()=>{Se===e&&e.flush()})}return Se}static enqueue(e){fp.length===0&&queueMicrotask(IO),fp.unshift(e)}};vl=new WeakMap,wl=new WeakMap,Ra=new WeakMap,Tu=new WeakMap,Cu=new WeakMap,Ps=new WeakMap,yl=new WeakMap,Ia=new WeakMap,$a=new WeakMap,bl=new WeakMap,Pu=new WeakMap,Ru=new WeakMap,Rn=new WeakSet,$O=function(e){var c;e.f^=1024;for(var r=e.first;r!==null;){var n=r.f,i=(n&96)!==0,a=i&&(n&1024)!==0,s=a||(n&8192)!==0||this.skipped_effects.has(r);if(!s&&r.fn Line truncated
\r\f\xA0\v\uFEFF`];function fM(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var i in r)if(r[i])n=n?n+" "+i:i;else if(n.length)for(var a=i.length,s=0;(s=n.indexOf(i,s))>=0;){var o=s+a;(s===0||uM.includes(n[s-1]))&&(o===n.length||uM.includes(n[o]))?n=(s===0?"":n.substring(0,s))+n.substring(o+1):s=o}}return n===""?null:n}p();function ot(t,e,r,n,i,a){var s=t.__className;if(ae||s!==r||s===void 0){var o=fM(r,n,a);(!ae||o!==t.getAttribute("class"))&&(o==null?t.removeAttribute("class"):e?t.className=o:t.setAttribute("class",o)),t.__className=r}else if(a&&i!==a)for(var l in a){var u=!!a[l];(i==null||u!==!!i[l])&&t.classList.toggle(l,u)}return a}p();p();var BV=Symbol("class"),HV=Symbol("style"),UV=Symbol("is custom element"),jV=Symbol("is html");function ge(t,e,r,n){var i=GV(t);if(ae&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){n||zV(t,e,r!=null?r:"");return}i[e]!==(i[e]=r)&&(e==="loading"&&(t[iO]=r),r==null?t.removeAttribute(e):typeof r!="string"&&qV(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function GV(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[UV]:t.nodeName.includes("-"),[jV]:t.namespaceURI===eO}}var dM=new Map;function qV(t){var e=dM.get(t.nodeName);if(e)return e;dM.set(t.nodeName,e=[]);for(var r,n=t,i=Element.prototype;i!==n;){r=B0(n);for(var a in r)r[a].set&&e.push(a);n=dl(n)}return e}function zV(t,e,r){var n;L&&(e==="srcset"&&VV(t,r)||ky((n=t.getAttribute(e))!=null?n:"",r)||_O(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(r)))}function ky(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function hM(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function VV(t,e){var r=hM(t.srcset),n=hM(e);return n.length===r.length&&n.every(([i,a],s)=>a===r[s][1]&&(ky(r[s][0],i)||ky(i,r[s][0])))}p();p();p();var WV=Wh?()=>performance.now():()=>Date.now(),Fn={tick:t=>(Wh?requestAnimationFrame:ar)(t),now:()=>WV(),tasks:new Set};function pM(){let t=Fn.now();Fn.tasks.forEach(e=>{e.c(t)||(Fn.tasks.delete(e),e.f())}),Fn.tasks.size!==0&&Fn.tick(pM)}function mM(t){let e;return Fn.tasks.size===0&&Fn.tick(pM),{promise:new Promise(r=>{Fn.tasks.add(e={c:t,f:r})}),abort(){Fn.tasks.delete(e)}}}function kp(t,e){Ms(()=>{t.dispatchEvent(new CustomEvent(e))})}function KV(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;let e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function gM(t){let e={},r=t.split(";");for(let n of r){let[i,a]=n.split(":");if(!i||a===void 0)break;let s=KV(i.trim());e[s]=a.trim()}return e}var JV=t=>t;function On(t,e,r,n){var E;var i=(t&1)!==0,a=(t&2)!==0,s=i&&a,o=(t&4)!==0,l=s?"both":i?"in":"out",u,c=e.inert,f=e.style.overflow,d,h;function m(){return Ms(()=>{var x;return u!=null?u:u=r()(e,(x=n==null?void 0:n())!=null?x:{},{direction:l})})}var g={is_global:o,in(){var x;if(e.inert=c,!i){h==null||h.abort(),(x=h==null?void 0:h.reset)==null||x.call(h);return}a||d==null||d.abort(),kp(e,"introstart"),d=Ay(e,m(),h,1,()=>{kp(e,"introend"),d==null||d.abort(),d=u=void 0,e.style.overflow=f})},out(x){if(!a){x==null||x(),u=void 0;return}e.inert=!0,kp(e,"outrostart"),h=Ay(e,m(),d,0,()=>{kp(e,"outroend"),x==null||x()})},stop:()=>{d==null||d.abort(),h==null||h.abort()}},v=Q;if(((E=v.transitions)!=null?E:v.transitions=[]).push(g),i&&xp){var w=o;if(!w){for(var b=v.parent;b&&b.f&65536;)for(;(b=b.parent)&&!(b.f&16););w=!b||(b.f&32768)!==0}w&&Pr(()=>{je(()=>g.in())})}}function Ay(t,e,r,n,i){var a=n===1;if(j0(e)){var s,o=!1;return Br(()=>{if(!o){var v=e({direction:a?"in":"out"});s=Ay(t,v,r,n,i)}}),{abort:()=>{o=!0,s==null||s.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(r==null||r.deactivate(),!(e!=null&&e.duration))return i(),{abort:ar,deactivate:ar,reset:ar,t:()=>n};let{delay:l=0,css:u,tick:c,easing:f=JV}=e;var d=[];if(a&&r===void 0&&(c&&c(0,1),u)){var h=gM(u(0,1));d.push(h,h)}var m=()=>1-n,g=t.animate(d,{duration:l,fill:"forwards"});return g.onfinish=()=>{var _;g.cancel();var v=(_=r==null?void 0:r.t())!=null?_:1-n;r==null||r.abort();var w=n-v,b=e.duration*Math.abs(w),E=[];if(b>0){var x=!1;if(u)for(var k=Math.ceil(b/16.666666666666668),A=0;A<=k;A+=1){var y=v+w*f(A/k),S=gM(u(y,1-y));E.push(S),x||(x=S.overflow==="hidden")}x&&(t.style.overflow="hidden"),m=()=>{var T=g.currentTime;return v+w*f(T/b)},c&&mM(()=>{if(g.playState!=="running")return!1;var T=m();return c(T,1-T),!0})}g=t.animate(E,{duration:b,fill:"forwards"}),g.onfinish=()=>{m=()=>n,c==null||c(n,1-n),i()}},{abort:()=>{g&&(g.cancel(),g.effect=null,g.onfinish=ar)},deactivate:()=>{i=ar},reset:()=>{n===0&&(c==null||c(1,0))},t:()=>m()}}p();p();function Py(t,e,r=e){var n=un(),i=new WeakSet;wy(t,"input",a=>{L&&t.type==="checkbox"&&G0();var s=a?t.defaultValue:t.value;if(s=Ty(t)?Cy(s):s,r(s),Se!==null&&i.add(Se),n&&s!==(s=e())){var o=t.selectionStart,l=t.selectionEnd;t.value=s!=null?s:"",l!==null&&(t.selectionStart=o,t.sel Line truncated
`:""}${(S=e.log.author)==null?void 0:S.name}
${(0,My.moment)(e.log.date).format(e.plugin.settings.commitDateFormat)}
${e.log.message}`},()=>({"is-collapsed":R(i)})]),ie(t,o),rt()}gt(["click"]);function IW(t,e){e().catch(console.error)}var $W=(t,e,r,n)=>{ne(e,!R(e)),(0,Ly.setIcon)(r[0],R(e)?"list":"folder"),n(n().settings.treeStructure=R(e),!0),n().saveSettings()},FW=ce('<div class="tree-item nav-folder mod-root"></div>'),OW=ce('<main class="git-view"><div class="nav-header"><div class="nav-buttons-container"><div id="layoutChange" class="clickable-icon nav-action-button" aria-label="Change Layout"></div> <div id="refresh" data-icon="refresh-cw" aria-label="Refresh"></div></div></div> <div class="nav-files-container" style="position: relative;"><!> <div id="sentinel"></div> <div style="margin-bottom:40px"></div></div></main>'),MW={hash:"svelte-45h",code:""};function Ny(t,e){tt(e,!0),$n(t,MW);let r=dn(e,"plugin",15),n=Ce(!1),i=Ne([]),a=Ce(void 0),s=Ce(Ne(r().settings.treeStructure)),o,l;Jt(()=>{l&&l.empty()}),o=e.view.app.workspace.on("obsidian-git:head-change",()=>void u().catch(console.error)),Jt(()=>{i.forEach(x=>(0,Ly.setIcon)(x,x.getAttr("data-icon")))}),nM(()=>{e.view.app.workspace.offref(o)}),xy(()=>{let x=new IntersectionObserver(A=>{A[0].isIntersecting&&!R(n)&&c().catch(console.error)}),k=document.querySelector("#sentinel");return k&&x.observe(k),()=>{x.disconnect()}}),u().catch(console.error);function u(){return Ds(this,void 0,void 0,function*(){var x;if(!r().gitReady){ne(a,void 0);return}ne(n,!0);let k=r().gitManager instanceof _e,A;((x=R(a)===null||R(a)===void 0?void 0:R(a).length)!==null&&x!==void 0?x:0)==0?A=k?50:10:A=R(a).length,ne(a,yield r().gitManager.log(void 0,!1,A),!0),ne(n,!1)})}function c(){return Ds(this,void 0,void 0,function*(){var x;if(!r().gitReady||R(a)===void 0)return;ne(n,!0);let A=r().gitManager instanceof _e?50:10,y=yield r().gitManager.log(void 0,!1,A,(x=R(a).last())===null||x===void 0?void 0:x.hash);R(a).push(...y.slice(1)),ne(n,!1)})}var f=OW(),d=q(f),h=q(d),m=q(h);m.__click=[$W,s,i,r],Ke(m,x=>i[0]=x,()=>i==null?void 0:i[0]);var g=ee(m,2);let v;g.__click=[IW,u],Ke(g,x=>i[1]=x,()=>i==null?void 0:i[1]),j(h),j(d);var w=ee(d,2),b=q(w);{var E=x=>{var k=FW();Wr(k,21,()=>R(a),Vr,(A,y)=>{Dy(A,{get view(){return e.view},get showTree(){return R(s)},get log(){return R(y)},get plugin(){return r()}})}),j(k),ie(x,k)};xe(b,x=>{R(a)&&x(E)})}pl(4),j(w),j(f),Fe(x=>{ge(m,"data-icon",R(s)?"list":"folder"),v=ot(g,1,"clickable-icon nav-action-button",null,v,x)},[()=>({loading:R(n)})]),ie(t,f),rt()}gt(["click"]);var Nu=class extends yM.ItemView{constructor(e,r){super(e),this.plugin=r,this.hoverPopover=null}getViewType(){return Qr.type}getDisplayText(){return Qr.name}getIcon(){return Qr.icon}onClose(){return this._view&&Vi(this._view),super.onClose()}reload(){this._view&&Vi(this._view),this._view=Ma(Ny,{target:this.contentEl,props:{plugin:this.plugin,view:this}})}onOpen(){return this.reload(),super.onOpen()}};p();var bM=require("obsidian"),Pp=class extends bM.FuzzySuggestModal{constructor(r,n){super(r.app);this.branches=n;this.setPlaceholder("Select branch to checkout")}getItems(){return this.branches}getItemText(r){return r}onChooseItem(r,n){this.resolve(r)}openAndGetReslt(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}};p();var kM=require("obsidian");p();var Bs=require("obsidian");p();var Bu=require("obsidian");p();var _M=require("obsidian");var Al=class extends _M.Modal{constructor({app:r,path:n,filesToDeleteCount:i,filesToDiscardCount:a}){super(r);this.resolve=null;this.path=n,this.deleteCount=i,this.discardCount=a}openAndGetResult(){return this.open(),new Promise(r=>{this.resolve=r})}onOpen(){let r=this.deleteCount+this.discardCount,{contentEl:n,titleEl:i}=this,a="";this.path!=""&&(r>1?a=`files in "${this.path}"`:a=`"${this.path}"`),i.setText(`${this.discardCount==0?"Delete":"Discard"} ${a}`),this.deleteCount>0&&n.createEl("p").setText(`Are you sure you want to DELETE the ${Lc(this.deleteCount,"untracked file")}? They are deleted according to your Obsidian trash settting.`),this.discardCount>0&&n.createEl("p").setText(`Are you sure you want to discard ALL changes in ${Lc(this.discardCount,"tracked file")}?`);let s=n.createDiv({cls:"modal-button-container"});if(this.deleteCount>0){let l=s.createEl("button",{cls:"mod-warning",text:`${this.discardCount>0?"Discard":"Delete"} all ${Lc(r,"file")}`});l.addEventListener("click",()=>{this.resolve&&this.resolve("delete"),this.close()}),l.addEventListener("keypress",()=>{this.resolve&&this.resolve("delete"),this.close()})}if(this.discardCount>0){let l=s.createEl("button",{cls:"mod-warning",text:`Discard all ${Lc(this.discardCount,"tracked file")}`});l.addEventListener("click",()=>{this.resolve&&this.resolve("discard"),this.close()}),l.addEventListener("keypress",()=>{this.resolve&&this.resolve("discard"),this.close()})}let o=s.createEl("button",{text:"Cancel"});o.addEventListener("click",()=>(this.resolve&&this.resolve(!1),this.close())),o.addEventListener("keypress",()=> Line truncated
`);i.removed.lines.length>0&&!i.removed.no_nl_at_eof&&(u+=`
`),n.replaceRange(u,n.offsetToPos(o),n.offsetToPos(l)),n.setSelection(n.offsetToPos(o))}}async stageHunk(e){if(!await this.plugin.isAllInitialized()||!this.editor)return;let{editor:r}=this.editor,n=Sn.getHunk(r.state,!1,e),i=!1;if(n||(n=Sn.getHunk(r.state,!0,e),i=!0),!n)return;let a=r.state.field(AM.editorInfoField).file.path,s=Et.createPatch(a,[n],"100644",i).join(`
`)+`
`;await this.gitManager.applyPatch(s),this.plugin.app.workspace.trigger("obsidian-git:refresh")}goToHunk(e){if(!this.editor)return;let{editor:r,obEditor:n}=this.editor,i=Sn.getHunks(r.state,!1),a=n.getCursor().line+1,s=Et.findNearestHunk(a,i,e,!0);if(s==null)return;let o=i[s];if(o){let l=o.added.start-1;n.setCursor(l,0),n.scrollIntoView({from:{line:l,ch:0},to:{line:l+1,ch:0}},!0)}}};p();p();var Hs=require("obsidian");var Fp=class{constructor(e){this.plg=e;this.codeMirrorExtensions=[];this.handleWorkspaceLeaf=e=>{if(!this.lineAuthorInfoProvider){console.warn("Git: undefined lineAuthorInfoProvider. Unexpected situation.");return}let r=e==null?void 0:e.view;!(r instanceof Hs.MarkdownView)||r.file==null||(r==null?void 0:r.allowNoFile)===!0||this.lineAuthorInfoProvider.trackChanged(r.file).catch(console.error)}}onLoadPlugin(){this.plg.registerEditorExtension(this.codeMirrorExtensions),a$(()=>this.plg.settings.lineAuthor,e=>{this.plg.settings.lineAuthor=e,this.plg.saveSettings()})}conditionallyActivateBySettings(){this.plg.settings.lineAuthor.show&&this.activateFeature()}activateFeature(){try{if(!this.isAvailableOnCurrentPlatform().available)return;m$(this.plg.settings.lineAuthor),this.lineAuthorInfoProvider=new wh(this.plg),this.createEventHandlers(),this.activateCodeMirrorExtensions(),console.log(this.plg.manifest.name+": Enabled line authoring.")}catch(e){console.warn("Git: Error while loading line authoring feature.",e),this.deactivateFeature()}}deactivateFeature(){var e;this.destroyEventHandlers(),this.deactivateCodeMirrorExtensions(),(e=this.lineAuthorInfoProvider)==null||e.destroy(),this.lineAuthorInfoProvider=void 0,console.log(this.plg.manifest.name+": Disabled line authoring.")}isAvailableOnCurrentPlatform(){return{available:this.plg.useSimpleGit&&Hs.Platform.isDesktopApp,gitManager:this.plg.gitManager instanceof _e?this.plg.gitManager:void 0}}refreshLineAuthorViews(){this.plg.settings.lineAuthor.show&&(this.deactivateFeature(),this.activateFeature())}activateCodeMirrorExtensions(){this.codeMirrorExtensions.push(A$),this.plg.app.workspace.updateOptions(),this.plg.app.workspace.iterateAllLeaves(this.handleWorkspaceLeaf)}deactivateCodeMirrorExtensions(){for(let e of this.codeMirrorExtensions)this.codeMirrorExtensions.remove(e);this.plg.app.workspace.updateOptions()}createEventHandlers(){this.gutterContextMenuEvent=this.createGutterContextMenuHandler(),this.fileOpenEvent=this.createFileOpenEvent(),this.workspaceLeafChangeEvent=this.createWorkspaceLeafChangeEvent(),this.fileModificationEvent=this.createVaultFileModificationHandler(),this.headChangeEvent=this.createHeadChangeEvent(),this.refreshOnCssChangeEvent=this.createCssRefreshHandler(),this.fileRenameEvent=this.createFileRenameEvent(),u$(),this.plg.registerEvent(this.gutterContextMenuEvent),this.plg.registerEvent(this.refreshOnCssChangeEvent),this.plg.registerEvent(this.fileOpenEvent),this.plg.registerEvent(this.workspaceLeafChangeEvent),this.plg.registerEvent(this.fileModificationEvent),this.plg.registerEvent(this.headChangeEvent),this.plg.registerEvent(this.fileRenameEvent)}destroyEventHandlers(){this.plg.app.workspace.offref(this.gutterContextMenuEvent),this.plg.app.workspace.offref(this.refreshOnCssChangeEvent),this.plg.app.workspace.offref(this.fileOpenEvent),this.plg.app.workspace.offref(this.workspaceLeafChangeEvent),this.plg.app.workspace.offref(this.refreshOnCssChangeEvent),this.plg.app.vault.offref(this.fileModificationEvent),this.plg.app.workspace.offref(this.headChangeEvent),this.plg.app.vault.offref(this.fileRenameEvent)}createFileOpenEvent(){return this.plg.app.workspace.on("file-open",e=>{var r;return void((r=this.lineAuthorInfoProvider)==null?void 0:r.trackChanged(e).catch(console.error))})}createWorkspaceLeafChangeEvent(){return this.plg.app.workspace.on("active-leaf-change",this.handleWorkspaceLeaf)}createFileRenameEvent(){return this.plg.app.vault.on("rename",(e,r)=>{var n;return e instanceof Hs.TFile&&((n=this.lineAuthorInfoProvider)==null?void 0:n.trackChanged(e))})}createVaultFileModificationHandler(){return this.plg.app.vault.on("modify",e=>{var r;return e instanceof Hs.TFile&&((r=this.lineAuthorInfoProvider)==null?void 0:r.trackChanged(e))})}createHeadChangeEvent(){return this.plg.app.workspace.on("obsidian-git:head-change",()=>{this.refreshLineAuthorViews()})}createCssRefreshHandler(){return this.plg.app.workspace.on("css-change",()=>this.refreshLineAuthorViews())}createGutterContextMenuHandler(){return this.plg.app.workspace.on("editor-menu",h$)}};p();var Tl=require("obsidian");p();p();var Us=require("@codemirror/state"),Mp=require("@codemirror/view");var Op=class extends Mp.GutterMarker{constructor(r,n){super();this.type=r;this.staged=n}toDOM(r){let n=document.createElement("div");return n.className=`git-gutter-marker git-${this.type} ${this.staged?"staged":"unstaged"}`,this.type=="changedelete"&&n.setText("~"),n}},Hy=Us.StateField.define({create:()=>Us.RangeSet.empty,update:(t,e)=>{let r=e.state.field(xr,!1);if(!r)return Us Line truncated
`+a),this.app.workspace.trigger("obsidian-git:refresh")}handleFileMenu(r,n,i,a){if(!this.gitReady||!this.settings.showFileMenu||!n)return;let s;if(typeof n=="string"?s=n:s=n.path,i=="file-explorer-context-menu"&&(r.addItem(o=>{o.setTitle("Git: Stage").setIcon("plus-circle").setSection("action").onClick(l=>{this.promiseQueue.addTask(async()=>{n instanceof we.TFile?await this.stageFile(n):(await this.gitManager.stageAll({dir:this.gitManager.getRelativeRepoPath(s,!0)}),this.app.workspace.trigger("obsidian-git:refresh"))})})}),r.addItem(o=>{o.setTitle("Git: Unstage").setIcon("minus-circle").setSection("action").onClick(l=>{this.promiseQueue.addTask(async()=>{n instanceof we.TFile?await this.unstageFile(n):(await this.gitManager.unstageAll({dir:this.gitManager.getRelativeRepoPath(s,!0)}),this.app.workspace.trigger("obsidian-git:refresh"))})})}),r.addItem(o=>{o.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(l=>{this.addFileToGitignore(s,n instanceof we.TFolder).catch(u=>this.displayError(u))})})),i=="git-source-control"){r.addItem(l=>{l.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(u=>{this.addFileToGitignore(s,n instanceof we.TFolder).catch(c=>this.displayError(c))})});let o=this.app.vault.adapter;a==="obsidian-git:menu"&&o instanceof we.FileSystemAdapter&&(r.addItem(l=>{l.setTitle("Open in default app").setIcon("arrow-up-right").setSection("action").onClick(u=>{this.app.openWithDefaultApp(s)})}),r.addItem(l=>{l.setTitle("Show in system explorer").setIcon("arrow-up-right").setSection("action").onClick(u=>{window.electron.shell.showItemInFolder(FM.join(o.getBasePath(),s))})}))}}async migrateSettings(){this.settings.mergeOnPull!=null&&(this.settings.syncMethod=this.settings.mergeOnPull?"merge":"rebase",this.settings.mergeOnPull=void 0,await this.saveSettings()),this.settings.autoCommitMessage===void 0&&(this.settings.autoCommitMessage=this.settings.commitMessage,await this.saveSettings()),this.settings.gitPath!=null&&(this.localStorage.setGitPath(this.settings.gitPath),this.settings.gitPath=void 0,await this.saveSettings()),this.settings.username!=null&&(this.localStorage.setPassword(this.settings.username),this.settings.username=void 0,await this.saveSettings())}unloadPlugin(){var r,n;this.gitReady=!1,this.editorIntegration.onUnloadPlugin(),this.automaticsManager.unload(),(r=this.branchBar)==null||r.remove(),(n=this.statusBar)==null||n.remove(),this.statusBar=void 0,this.branchBar=void 0,this.gitManager.unload(),this.promiseQueue.clear();for(let i of this.intervalsToClear)window.clearInterval(i);this.intervalsToClear=[],this.debRefresh.cancel()}onunload(){this.unloadPlugin(),console.log("unloading "+this.manifest.name+" plugin")}async loadSettings(){let r=await this.loadData();r==null&&(r={showedMobileNotice:!0}),this.settings=oA(Xe,r)}async saveSettings(){var r;(r=this.settingsTab)==null||r.beforeSaveSettings(),await this.saveData(this.settings)}get useSimpleGit(){return we.Platform.isDesktopApp}async init({fromReload:r=!1}){var n;if(this.settings.showStatusBar&&!this.statusBar){let i=this.addStatusBarItem();this.statusBar=new bh(i,this),this.intervalsToClear.push(window.setInterval(()=>{var a;return(a=this.statusBar)==null?void 0:a.display()},1e3))}try{this.useSimpleGit?(this.gitManager=new _e(this),await this.gitManager.setGitInstance()):this.gitManager=new _n(this);let i=await this.gitManager.checkRequirements(),a=this.localStorage.getPausedAutomatics();switch(i){case"missing-git":this.displayError(`Cannot run git command. Trying to run: '${this.localStorage.getGitPath()||"git"}' .`);break;case"missing-repo":new we.Notice("Can't find a valid git repository. Please create one via the given command or clone an existing repo.",1e4);break;case"valid":if(this.gitReady=!0,this.setPluginState({gitAction:0}),we.Platform.isDesktop&&this.settings.showBranchStatusBar&&!this.branchBar){let s=this.addStatusBarItem();this.branchBar=new Ip(s,this),this.intervalsToClear.push(window.setInterval(()=>{var o;return void((o=this.branchBar)==null?void 0:o.display().catch(console.error))},6e4))}await((n=this.branchBar)==null?void 0:n.display()),this.editorIntegration.onReady(),this.app.workspace.trigger("obsidian-git:refresh"),this.app.workspace.trigger("obsidian-git:head-change"),!r&&this.settings.autoPullOnBoot&&!a&&this.promiseQueue.addTask(()=>this.pullChangesFromRemote()),a||await this.automaticsManager.init(),a&&new we.Notice("Automatic routines are currently paused.");break;default:this.log("Something weird happened. The 'checkRequirements' result is "+i)}}catch(i){this.displayError(i),console.error(i)}}async createNewRepo(){try{await this.gitManager.init(),new we.Notice("Initialized new repo"),await this.init({fromReload:!0})}catch(r){this.displayError(r)}}async cloneNewRepo(){let n=await new ze(this,{placeholder:"Enter remote URL"}).openAndGetResult();if(n){let i="Vault Root",a=await new ze(this,{options:this.gitManager instanceof _n?[i]:[],placeholder Line truncated
# Additional Instructions
I strongly recommend to use "Source mode" for viewing the conflicted files. For simple conflicts, in each file listed above replace every occurrence of the following text blocks with the desired text.
\`\`\`diff
<<<<<<< HEAD
File changes in local repository
=======
File changes in remote repository
>>>>>>> origin/main
\`\`\``]),await this.tools.writeAndOpenFile(n==null?void 0:n.join(`
`))}async editRemotes(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),i=await new ze(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}).openAndGetResult();if(i){let a=await this.gitManager.getRemoteUrl(i),o=await new ze(this,{initialValue:a,placeholder:"Enter remote URL"}).openAndGetResult();if(o)return await this.gitManager.setRemote(i,ew(o)),i}}async selectRemoteBranch(){let r=await this.gitManager.getRemotes(),n;r.length===0&&(n=await this.editRemotes(),n==null&&(r=await this.gitManager.getRemotes()));let i=new ze(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}),a=n!=null?n:await i.openAndGetResult();if(a){this.displayMessage("Fetching remote branches"),await this.gitManager.fetch(a);let s=await this.gitManager.getRemoteBranches(a),l=await new ze(this,{options:s,placeholder:"Select or create a new remote branch by typing its name and selecting it"}).openAndGetResult();return l==null?void 0:l.startsWith(a+"/")?l:`${a}/${l}`}}async removeRemote(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),i=await new ze(this,{options:r,placeholder:"Select a remote"}).openAndGetResult();i&&await this.gitManager.removeRemote(i)}onActiveLeafChange(r){var s,o;let n=r==null?void 0:r.view;if(!(n!=null&&n.getState().file)&&!(n instanceof ys||n instanceof bs))return;let i=this.app.workspace.getLeavesOfType(Dt.type).first(),a=this.app.workspace.getLeavesOfType(Qr.type).first();if((s=i==null?void 0:i.view.containerEl.querySelector("div.tree-item-self.is-active"))==null||s.removeClass("is-active"),(o=a==null?void 0:a.view.containerEl.querySelector("div.tree-item-self.is-active"))==null||o.removeClass("is-active"),(r==null?void 0:r.view)instanceof ys||(r==null?void 0:r.view)instanceof bs){let u=r.view.state.bFile.replace(/["\\]/g,"\\$&");this.lastDiffViewState=r.view.getState();let c;i&&r.view.state.aRef=="HEAD"?c=i.view.containerEl.querySelector(`div.staged div.tree-item-self[data-path="${u}"]`):i&&r.view.state.aRef==""?c=i.view.containerEl.querySelector(`div.changes div.tree-item-self[data-path="${u}"]`):a&&(c=a.view.containerEl.querySelector(`div.tree-item-self[data-path='${u}']`)),c==null||c.addClass("is-active")}else this.lastDiffViewState=void 0}handleNoNetworkError(r){this.state.offlineMode?this.log("Encountered network error, but already in offline mode"):this.displayError("Git: Going into offline mode. Future network errors will no longer be displayed.",2e3),this.setPluginState({gitAction:0,offlineMode:!0})}displayMessage(r,n=4*1e3){var i;(i=this.statusBar)==null||i.displayMessage(r.toLowerCase(),n),this.settings.disablePopups||(!this.settings.disablePopupsForNoChanges||!r.startsWith("No changes"))&&new we.Notice(r,5*1e3),this.log(r)}displayError(r,n=10*1e3){var a;if(r instanceof $M.Errors.UserCanceledError){new we.Notice("Aborted");return}let i;r instanceof Error?i=r:i=new Error(String(r)),this.setPluginState({gitAction:0}),this.settings.showErrorNotices&&new we.Notice(i.message,n),console.error(`${this.manifest.id}:`,i.stack),(a=this.statusBar)==null||a.displayMessage(i.message.toLowerCase(),n)}log(...r){console.log(`${this.manifest.id}:`,...r)}};
/*! Bundled license information:
ieee754/index.js:
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
buffer/index.js:
(*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*)
safe-buffer/index.js:
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
crc-32/crc32.js:
(*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *)
js-sha256/src/sha256.js:
(**
* [js-sha256]{@link https://github.com/emn178/js-sha256}
*
* @version 0.9.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2017
* @license MIT
*)
*/
/* nosourcemap */
@@ -1,10 +0,0 @@
{
"author": "Vinzent",
"authorUrl": "https://github.com/Vinzent03",
"id": "obsidian-git",
"name": "Git",
"description": "Integrate Git version control with automatic backup and other advanced features.",
"isDesktopOnly": false,
"fundingUrl": "https://ko-fi.com/vinzent",
"version": "2.36.1"
}
@@ -1,705 +0,0 @@
@keyframes loading {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.git-signs-gutter {
.cm-gutterElement {
/* Needed to align the sign properly for different line heigts. Such as
* when having a heading or list item.
*/
padding-top: 0 !important;
}
}
.workspace-leaf-content[data-type="git-view"] .button-border {
border: 2px solid var(--interactive-accent);
border-radius: var(--radius-s);
}
.workspace-leaf-content[data-type="git-view"] .view-content {
padding-left: 0;
padding-top: 0;
padding-right: 0;
}
.workspace-leaf-content[data-type="git-history-view"] .view-content {
padding-left: 0;
padding-top: 0;
padding-right: 0;
}
.loading {
overflow: hidden;
}
.loading > svg {
animation: 2s linear infinite loading;
transform-origin: 50% 50%;
display: inline-block;
}
.obsidian-git-center {
margin: auto;
text-align: center;
width: 50%;
}
.obsidian-git-textarea {
display: block;
margin-left: auto;
margin-right: auto;
}
.obsidian-git-disabled {
opacity: 0.5;
}
.obsidian-git-center-button {
display: block;
margin: 20px auto;
}
.tooltip.mod-left {
overflow-wrap: break-word;
}
.tooltip.mod-right {
overflow-wrap: break-word;
}
/* Limits the scrollbar to the view body */
.git-view {
display: flex;
flex-direction: column;
position: relative;
height: 100%;
}
.git-tools {
display: flex;
margin-left: auto;
}
.git-tools .type {
padding-left: var(--size-2-1);
display: flex;
align-items: center;
justify-content: center;
width: 11px;
}
.git-tools .type[data-type="M"] {
color: orange;
}
.git-tools .type[data-type="D"] {
color: red;
}
.git-tools .buttons {
display: flex;
}
.git-tools .buttons > * {
padding: 0 0;
height: auto;
}
.workspace-leaf-content[data-type="git-view"] .tree-item-self,
.workspace-leaf-content[data-type="git-history-view"] .tree-item-self {
align-items: center;
}
.workspace-leaf-content[data-type="git-view"]
.tree-item-self:hover
.clickable-icon,
.workspace-leaf-content[data-type="git-history-view"]
.tree-item-self:hover
.clickable-icon {
color: var(--icon-color-hover);
}
/* Highlight an item as active if it's diff is currently opened */
.is-active .git-tools .buttons > * {
color: var(--nav-item-color-active);
}
.git-author {
color: var(--text-accent);
}
.git-date {
color: var(--text-accent);
}
.git-ref {
color: var(--text-accent);
}
/* ====== diff2html ======
The following styles are adapted from the obsidian-version-history plugin by
@kometenstaub https://github.com/kometenstaub/obsidian-version-history-diff/blob/main/src/styles.scss
which itself is adapted from the diff2html library with the following original license:
https://github.com/rtfpessoa/diff2html/blob/master/LICENSE.md
Copyright 2014-2016 Rodrigo Fernandes https://rtfpessoa.github.io/
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
.theme-dark,
.theme-light {
--git-delete-bg: #ff475040;
--git-delete-hl: #96050a75;
--git-insert-bg: #68d36840;
--git-insert-hl: #23c02350;
--git-change-bg: #ffd55840;
--git-selected: #3572b0;
--git-delete: #c33;
--git-insert: #399839;
--git-change: #d0b44c;
--git-move: #3572b0;
}
.git-diff {
.d2h-d-none {
display: none;
}
.d2h-wrapper {
text-align: left;
border-radius: 0.25em;
overflow: auto;
}
.d2h-file-header.d2h-file-header {
background-color: var(--background-secondary);
border-bottom: 1px solid var(--background-modifier-border);
font-family:
Source Sans Pro,
Helvetica Neue,
Helvetica,
Arial,
sans-serif;
height: 35px;
padding: 5px 10px;
}
.d2h-file-header,
.d2h-file-stats {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.d2h-file-header {
display: none;
}
.d2h-file-stats {
font-size: 14px;
margin-left: auto;
}
.d2h-lines-added {
border: 1px solid var(--color-green);
border-radius: 5px 0 0 5px;
color: var(--color-green);
padding: 2px;
text-align: right;
vertical-align: middle;
}
.d2h-lines-deleted {
border: 1px solid var(--color-red);
border-radius: 0 5px 5px 0;
color: var(--color-red);
margin-left: 1px;
padding: 2px;
text-align: left;
vertical-align: middle;
}
.d2h-file-name-wrapper {
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
font-size: 15px;
width: 100%;
}
.d2h-file-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--text-normal);
font-size: var(--h5-size);
}
.d2h-file-wrapper {
border: 1px solid var(--background-secondary-alt);
border-radius: 3px;
margin-bottom: 1em;
max-height: 100%;
}
.d2h-file-collapse {
-webkit-box-pack: end;
-ms-flex-pack: end;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
border: 1px solid var(--background-secondary-alt);
border-radius: 3px;
cursor: pointer;
display: none;
font-size: 12px;
justify-content: flex-end;
padding: 4px 8px;
}
.d2h-file-collapse.d2h-selected {
background-color: var(--git-selected);
}
.d2h-file-collapse-input {
margin: 0 4px 0 0;
}
.d2h-diff-table {
border-collapse: collapse;
font-family: var(--font-monospace);
font-size: var(--code-size);
width: 100%;
}
.d2h-files-diff {
width: 100%;
}
.d2h-file-diff {
/*
overflow-y: scroll;
*/
border-radius: 5px;
font-size: var(--font-text-size);
line-height: var(--line-height-normal);
}
.d2h-file-side-diff {
display: inline-block;
margin-bottom: -8px;
margin-right: -4px;
overflow-x: scroll;
overflow-y: hidden;
width: 50%;
}
.d2h-code-line {
padding-left: 6em;
padding-right: 1.5em;
}
.d2h-code-line,
.d2h-code-side-line {
display: inline-block;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
white-space: nowrap;
width: 100%;
}
.d2h-code-side-line {
/* needed to be changed */
padding-left: 0.5em;
padding-right: 0.5em;
}
.d2h-code-line-ctn {
word-wrap: normal;
background: none;
display: inline-block;
padding: 0;
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
vertical-align: middle;
width: 100%;
/* only works for line-by-line */
white-space: pre-wrap;
}
.d2h-code-line del,
.d2h-code-side-line del {
background-color: var(--git-delete-hl);
color: var(--text-normal);
}
.d2h-code-line del,
.d2h-code-line ins,
.d2h-code-side-line del,
.d2h-code-side-line ins {
border-radius: 0.2em;
display: inline-block;
margin-top: -1px;
text-decoration: none;
vertical-align: middle;
}
.d2h-code-line ins,
.d2h-code-side-line ins {
background-color: var(--git-insert-hl);
text-align: left;
}
.d2h-code-line-prefix {
word-wrap: normal;
background: none;
display: inline;
padding: 0;
white-space: pre;
}
.line-num1 {
float: left;
}
.line-num1,
.line-num2 {
-webkit-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden;
/*
padding: 0 0.5em;
*/
text-overflow: ellipsis;
width: 2.5em;
padding-left: 0;
}
.line-num2 {
float: right;
}
.d2h-code-linenumber {
background-color: var(--background-primary);
border: solid var(--background-modifier-border);
border-width: 0 1px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: var(--text-faint);
cursor: pointer;
display: inline-block;
position: absolute;
text-align: right;
width: 5.5em;
}
.d2h-code-linenumber:after {
content: "\200b";
}
.d2h-code-side-linenumber {
background-color: var(--background-primary);
border: solid var(--background-modifier-border);
border-width: 0 1px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: var(--text-faint);
cursor: pointer;
overflow: hidden;
padding: 0 0.5em;
text-align: right;
text-overflow: ellipsis;
width: 4em;
/* needed to be changed */
display: table-cell;
position: relative;
}
.d2h-code-side-linenumber:after {
content: "\200b";
}
.d2h-code-side-emptyplaceholder,
.d2h-emptyplaceholder {
background-color: var(--background-primary);
border-color: var(--background-modifier-border);
}
.d2h-code-line-prefix,
.d2h-code-linenumber,
.d2h-code-side-linenumber,
.d2h-emptyplaceholder {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.d2h-code-linenumber,
.d2h-code-side-linenumber {
direction: rtl;
}
.d2h-del {
background-color: var(--git-delete-bg);
border-color: var(--git-delete-hl);
}
.d2h-ins {
background-color: var(--git-insert-bg);
border-color: var(--git-insert-hl);
}
.d2h-info {
background-color: var(--background-primary);
border-color: var(--background-modifier-border);
color: var(--text-faint);
}
.d2h-del,
.d2h-ins,
.d2h-file-diff .d2h-change {
color: var(--text-normal);
}
.d2h-file-diff .d2h-del.d2h-change {
background-color: var(--git-change-bg);
}
.d2h-file-diff .d2h-ins.d2h-change {
background-color: var(--git-insert-bg);
}
.d2h-file-list-wrapper {
a {
text-decoration: none;
cursor: default;
-webkit-user-drag: none;
}
svg {
display: none;
}
}
.d2h-file-list-header {
text-align: left;
}
.d2h-file-list-title {
display: none;
}
.d2h-file-list-line {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
text-align: left;
}
.d2h-file-list {
}
.d2h-file-list > li {
border-bottom: 1px solid var(--background-modifier-border);
margin: 0;
padding: 5px 10px;
}
.d2h-file-list > li:last-child {
border-bottom: none;
}
.d2h-file-switch {
cursor: pointer;
display: none;
font-size: 10px;
}
.d2h-icon {
fill: currentColor;
margin-right: 10px;
vertical-align: middle;
}
.d2h-deleted {
color: var(--git-delete);
}
.d2h-added {
color: var(--git-insert);
}
.d2h-changed {
color: var(--git-change);
}
.d2h-moved {
color: var(--git-move);
}
.d2h-tag {
background-color: var(--background-secondary);
display: -webkit-box;
display: -ms-flexbox;
display: flex;
font-size: 10px;
margin-left: 5px;
padding: 0 2px;
}
.d2h-deleted-tag {
border: 1px solid var(--git-delete);
}
.d2h-added-tag {
border: 1px solid var(--git-insert);
}
.d2h-changed-tag {
border: 1px solid var(--git-change);
}
.d2h-moved-tag {
border: 1px solid var(--git-move);
}
/* needed for line-by-line*/
.d2h-diff-tbody {
position: relative;
}
}
/* ====================== Line Authoring Information ====================== */
.cm-gutterElement.obs-git-blame-gutter {
/* Add background color to spacing inbetween and around the gutter for better aesthetics */
border-width: 0px 2px 0.2px 2px;
border-style: solid;
border-color: var(--background-secondary);
background-color: var(--background-secondary);
}
.cm-gutterElement.obs-git-blame-gutter > div,
.line-author-settings-preview {
/* delegate text color to settings */
color: var(--obs-git-gutter-text);
font-family: monospace;
height: 100%; /* ensure, that age-based background color occupies entire parent */
text-align: right;
padding: 0px 6px 0px 6px;
white-space: pre; /* Keep spaces and do not collapse them. */
}
@media (max-width: 800px) {
/* hide git blame gutter not to superpose text */
.cm-gutterElement.obs-git-blame-gutter {
display: none;
}
}
.git-unified-diff-view,
.git-split-diff-view .cm-deletedLine .cm-changedText {
background-color: #ee443330;
}
.git-unified-diff-view,
.git-split-diff-view .cm-insertedLine .cm-changedText {
background-color: #22bb2230;
}
.git-obscure-prompt[git-is-obscured="true"] #git-show-password:after {
-webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-eye"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"></path><circle cx="12" cy="12" r="3"></circle></svg>');
}
.git-obscure-prompt[git-is-obscured="false"] #git-show-password:after {
-webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-eye-off"><path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"></path><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"></path><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"></path><path d="m2 2 20 20"></path></svg>');
}
/* Override styling of Codemirror merge view "collapsed lines" indicator */
.git-split-diff-view .ͼ2 .cm-collapsedLines {
background: var(--interactive-normal);
border-radius: var(--radius-m);
color: var(--text-accent);
font-size: var(--font-small);
padding: var(--size-4-1) var(--size-4-1);
}
.git-split-diff-view .ͼ2 .cm-collapsedLines:hover {
background: var(--interactive-hover);
color: var(--text-accent-hover);
}
.git-signs-gutter {
.cm-gutterElement {
display: grid;
}
}
.git-gutter-marker:hover {
border-radius: 2px;
}
.git-gutter-marker.git-add {
background-color: var(--color-green);
justify-self: center;
height: inherit;
width: 0.2rem;
}
.git-gutter-marker.git-change {
background-color: var(--color-yellow);
justify-self: center;
height: inherit;
width: 0.2rem;
}
.git-gutter-marker.git-changedelete {
color: var(--color-yellow);
font-weight: var(--font-bold);
font-size: 1rem;
justify-self: center;
height: inherit;
}
.git-gutter-marker.git-delete {
background-color: var(--color-red);
height: 0.2rem;
width: 0.8rem;
align-self: end;
}
.git-gutter-marker.git-topdelete {
background-color: var(--color-red);
height: 0.2rem;
width: 0.8rem;
align-self: start;
}
div:hover > .git-gutter-marker.git-change {
width: 0.6rem;
}
div:hover > .git-gutter-marker.git-add {
width: 0.6rem;
}
div:hover > .git-gutter-marker.git-delete {
height: 0.6rem;
}
div:hover > .git-gutter-marker.git-topdelete {
height: 0.6rem;
}
div:hover > .git-gutter-marker.git-changedelete {
font-weight: var(--font-bold);
}
.git-gutter-marker.staged {
opacity: 0.5;
}
.git-diff {
.cm-merge-revert {
width: 4em;
}
/* Ensure that merge revert markers are positioned correctly */
.cm-merge-revert > * {
position: absolute;
background-color: var(--background-secondary);
display: flex;
}
}
/* Prevent shifting of the editor when git signs gutter is the only gutter present */
.cm-gutters.cm-gutters-before:has(> .git-signs-gutter:only-child) {
margin-inline-end: 0;
.git-signs-gutter {
margin-inline-start: -1rem;
}
}
.git-changes-status-bar-colored {
.git-add {
color: var(--color-green);
}
.git-change {
color: var(--color-yellow);
}
.git-delete {
color: var(--color-red);
}
}
.git-changes-status-bar .git-add {
margin-right: 0.3em;
}
.git-changes-status-bar .git-change {
margin-right: 0.3em;
}
@@ -3,23 +3,23 @@ THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var ja=Object.create;var Rn=Object.defineProperty;var va=Object.getOwnPropertyDescriptor;var wa=Object.getOwnPropertyNames;var ba=Object.getPrototypeOf,Ea=Object.prototype.hasOwnProperty;var Vi=n=>Rn(n,"__esModule",{value:!0});var Ta=(n,e)=>{Vi(n);for(var t in e)Rn(n,t,{get:e[t],enumerable:!0})},ka=(n,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of wa(e))!Ea.call(n,r)&&r!=="default"&&Rn(n,r,{get:()=>e[r],enumerable:!(t=va(e,r))||t.enumerable});return n},X=n=>ka(Vi(Rn(n!=null?ja(ba(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var zi=(()=>{for(var n=new Uint8Array(128),e=0;e<64;e++)n[e<26?e+65:e<52?e+71:e<62?e-4:e*4-205]=e;return t=>{for(var r=t.length,i=new Uint8Array((r-(t[r-1]=="=")-(t[r-2]=="="))*3/4|0),o=0,a=0;o<r;){var l=n[t.charCodeAt(o++)],c=n[t.charCodeAt(o++)],d=n[t.charCodeAt(o++)],m=n[t.charCodeAt(o++)];i[a++]=l<<2|c>>4,i[a++]=c<<4|d>>2,i[a++]=d<<6|m}return i}})();Ta(exports,{default:()=>Fi});var Er=X(require("obsidian"));var L=X(require("obsidian"));var Ji=X(require("obsidian"));function oe(n){let e=new Ji.Notice("",8e3),t=createFragment(r=>{r.createEl("b",{text:"Templater Error"}),r.createEl("span",{text:":"}),r.createEl("br"),r.createEl("span",{text:n.message}),n instanceof P&&n.console_msg&&(r.createEl("br"),r.createEl("span",{text:"Check console for more information"}),console.error("Templater Error:",n.message,`
`,n.console_msg))});e.noticeEl.appendChild(t)}var P=class extends Error{constructor(e,t){super(e);this.console_msg=t;this.name=this.constructor.name,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}};async function Se(n,e){try{return await n()}catch(t){return t instanceof P?oe(t):oe(new P(e,t.message)),null}}function Ce(n,e){try{return n()}catch(t){return oe(new P(e,t.message)),null}}var re=function(){function n(){}return n.explainIfInvalidTSDocTagName=function(e){if(e[0]!=="@")return'A TSDoc tag name must start with an "@" symbol';if(!n._tsdocTagNameRegExp.test(e))return"A TSDoc tag name must start with a letter and contain only letters and numbers"},n.validateTSDocTagName=function(e){var t=n.explainIfInvalidTSDocTagName(e);if(t)throw new Error(t)},n.explainIfInvalidLinkUrl=function(e){if(e.length===0)return"The URL cannot be empty";if(!n._urlSchemeRegExp.test(e))return'An @link URL must begin with a scheme comprised only of letters and numbers followed by "://". (For general URLs, use an HTML "<a>" tag instead.)';if(!n._urlSchemeAfterRegExp.test(e))return'An @link URL must have at least one character after "://"'},n.explainIfInvalidHtmlName=function(e){if(!n._htmlNameRegExp.test(e))return"An HTML name must be an ASCII letter followed by zero or more letters, digits, or hyphens"},n.validateHtmlName=function(e){var t=n.explainIfInvalidHtmlName(e);if(t)throw new Error(t)},n.explainIfInvalidPackageName=function(e){if(e.length===0)return"The package name cannot be an empty string";if(!n._validPackageNameRegExp.test(e))return"The package name ".concat(JSON.stringify(e)," is not a valid package name")},n.explainIfInvalidImportPath=function(e,t){if(e.length>0){if(e.indexOf("//")>=0)return'An import path must not contain "//"';if(e[e.length-1]==="/")return'An import path must not end with "/"';if(!t&&e[0]==="/")return'An import path must not start with "/" unless prefixed by a package name'}},n.isSystemSelector=function(e){return n._systemSelectors.has(e)},n.explainIfInvalidUnquotedIdentifier=function(e){if(e.length===0)return"The identifier cannot be an empty string";if(n._identifierBadCharRegExp.test(e))return"The identifier cannot non-word characters";if(n._identifierNumberStartRegExp.test(e))return"The identifier must not start with a number"},n.explainIfInvalidUnquotedMemberIdentifier=function(e){var t=n.explainIfInvalidUnquotedIdentifier(e);if(t!==void 0)return t;if(n.isSystemSelector(e))return'The identifier "'.concat(e,'" must be quoted because it is a TSDoc system selector name')},n._tsdocTagNameRegExp=/^@[a-z][a-z0-9]*$/i,n._urlSchemeRegExp=/^[a-z][a-z0-9]*\:\/\//i,n._urlSchemeAfterRegExp=/^[a-z][a-z0-9]*\:\/\/./i,n._htmlNameRegExp=/^[a-z]+[a-z0-9\-]*$/i,n._identifierBadCharRegExp=/[^a-z0-9_$]/i,n._identifierNumberStartRegExp=/^[0-9]/,n._validPackageNameRegExp=/^(?:@[a-z0-9\-_\.]+\/)?[a-z0-9\-_\.]+$/i,n._systemSelectors=new Set(["instance","static","constructor","class","enum","function","interface","namespace","type","variable"]),n}();var Pr=function(){function n(){this._docNodeDefinitionsByKind=new Map,this._docNodeDefinitionsByConstructor=new Map}return n.prototype.registerDocNodes=function(e,t){var r=re.explainIfInvalidPackageName(e);if(r)throw new Error("Invalid NPM package name: "+r);for(var i=0,o=t;i<o.length;i++){var a=o[i];if(!n._nodeKindRegExp.test(a.docNodeKind))throw new Error("The DocNode kind ".concat(JSON.stringify(a.docNodeKind)," is not a valid identifier.")+" It must start with an underscore or letter, and be comprised of letters, numbers, and underscores");var l=this._docNodeDefinitionsByKind.get(a.docNodeKind);if(l!==void 0)throw new Error('The DocNode kind "'.concat(a.docNodeKind,'" was already registered')+" by ".concat(l.packageName));if(l=this._docNodeDefinitionsByConstructor.get(a.constructor),l!==void 0)throw new Error("This DocNode constructor was already registered by ".concat(l.packageName)+" as ".concat(l.docNodeKind));var c={docNodeKind:a.docNodeKind,constructor:a.constructor,packageName:e,allowedChildKinds:new Set};this._docNodeDefinitionsByKind.set(a.docNodeKind,c),this._docNodeDefinitionsByConstructor.set(a.constructor,c)}},n.prototype.throwIfNotRegisteredKind=function(e){if(!this._docNodeDefinitionsByKind.has(e))throw new Error('The DocNode kind "'.concat(e,'" was not registered with this TSDocConfiguration'))},n.prototype.registerAllowableChildren=function(e,t){for(var r=this._getDefinition(e),i=0,o=t;i<o.length;i++){var a=o[i];this._getDefinition(a),r.allowedChildKinds.add(a)}},n.prototype.isAllowedChild=function(e,t){var r=this._getDefinition(e);return r.allowedChildKinds.has(t)},n.prototype._getDefinition=function(e){var t=this._docNodeDefinitionsByKind.get(e);if(t===void 0)throw new Error('The DocNode kind "'.concat(e,'" was not registered with this TSDocConfiguration'));return t},n._nodeKindRegExp=/^[_a-z][_a-z0-9]*$/i,n}();var U;(function(n){n.Core="Core",n.Extended="Extended",n.Discretionary="Discretionary",n.None="None"})(U||(U={}));var Line truncated
`:this.range.toString()},n}();var Ma=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),y;(function(n){n.Spacing="Spacing",n.BlockTag="BlockTag",n.CodeSpan_OpeningDelimiter="CodeSpan_OpeningDelimiter",n.CodeSpan_Code="CodeSpan_Code",n.CodeSpan_ClosingDelimiter="CodeSpan_ClosingDelimiter",n.DeclarationReference_PackageName="DeclarationReference_PackageName",n.DeclarationReference_ImportPath="DeclarationReference_ImportPath",n.DeclarationReference_ImportHash="DeclarationReference_ImportHash",n.ErrorText="ErrorText",n.NonstandardText="NonstandardText",n.EscapedText="EscapedText",n.FencedCode_OpeningFence="FencedCode_OpeningFence",n.FencedCode_Language="FencedCode_Language",n.FencedCode_Code="FencedCode_Code",n.FencedCode_ClosingFence="FencedCode_ClosingFence",n.HtmlAttribute_Name="HtmlAttribute_Name",n.HtmlAttribute_Equals="HtmlAttribute_Equals",n.HtmlAttribute_Value="HtmlAttribute_Value",n.HtmlEndTag_OpeningDelimiter="HtmlEndTag_OpeningDelimiter",n.HtmlEndTag_Name="HtmlEndTag_Name",n.HtmlEndTag_ClosingDelimiter="HtmlEndTag_ClosingDelimiter",n.HtmlStartTag_OpeningDelimiter="HtmlStartTag_OpeningDelimiter",n.HtmlStartTag_Name="HtmlStartTag_Name",n.HtmlStartTag_ClosingDelimiter="HtmlStartTag_ClosingDelimiter",n.InlineTag_OpeningDelimiter="InlineTag_OpeningDelimiter",n.InlineTag_TagName="InlineTag_TagName",n.InlineTag_TagContent="InlineTag_TagContent",n.InlineTag_ClosingDelimiter="InlineTag_ClosingDelimiter",n.LinkTag_UrlDestination="LinkTag_UrlDestination",n.LinkTag_Pipe="LinkTag_Pipe",n.LinkTag_LinkText="LinkTag_LinkText",n.MemberIdentifier_LeftQuote="MemberIdentifier_LeftQuote",n.MemberIdentifier_Identifier="MemberIdentifier_Identifier",n.MemberIdentifier_RightQuote="MemberIdentifier_RightQuote",n.MemberReference_Dot="MemberReference_Dot",n.MemberReference_LeftParenthesis="MemberReference_LeftParenthesis",n.MemberReference_Colon="MemberReference_Colon",n.MemberReference_RightParenthesis="MemberReference_RightParenthesis",n.MemberSelector="MemberSelector",n.DocMemberSymbol_LeftBracket="DocMemberSymbol_LeftBracket",n.DocMemberSymbol_RightBracket="DocMemberSymbol_RightBracket",n.ParamBlock_ParameterName="ParamBlock_ParameterName",n.ParamBlock_Hyphen="ParamBlock_Hyphen",n.PlainText="PlainText",n.SoftBreak="SoftBreak"})(y||(y={}));var j=function(n){Ma(e,n);function e(t){var r=n.call(this,t)||this;if(t.excerptKind===y.Spacing)for(var i=0,o=t.content.tokens;i<o.length;i++){var a=o[i];switch(a.kind){case u.Spacing:case u.Newline:case u.EndOfInput:break;default:throw new Error("The excerptKind=Spacing but the range contains a non-whitespace token")}}return r._excerptKind=t.excerptKind,r._content=t.content,r}return Object.defineProperty(e.prototype,"kind",{get:function(){return g.Excerpt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"excerptKind",{get:function(){return this._excerptKind},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"content",{get:function(){return this._content},enumerable:!1,configurable:!0}),e}(T);var Oa=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Yn=function(n){Oa(e,n);function e(t){var r=n.call(this,t)||this;return re.validateTSDocTagName(t.tagName),r._tagName=t.tagName,r._tagNameWithUpperCase=t.tagName.toUpperCase(),T.isParsedParameters(t)&&(r._tagNameExcerpt=new j({configuration:r.configuration,excerptKind:y.BlockTag,content:t.tagNameExcerpt})),r}return Object.defineProperty(e.prototype,"kind",{get:function(){return g.BlockTag},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this._tagName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagNameWithUpperCase",{get:function(){return this._tagNameWithUpperCase},enumerable:!1,configurable:!0}),e.prototype.onGetChildNodes=function(){return[this._tagNameExcerpt]},e.prototype.getTokenSequence=function(){if(!this._tagNameExcerpt)throw new Error("DocBlockTag.getTokenSequence() failed because this object did not originate from a parsed input");return this._tagNameExcerpt.content},e}(T);var Ba=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}| Line truncated
`,this._emitCommentFraming=!0,this._lineState=he.Closed,this._previousLineHadContent=!1,this._hangingParagraph=!1}return n.prototype.renderComment=function(e,t){this._emitCommentFraming=!0,this._renderCompleteObject(e,t)},n.prototype.renderHtmlTag=function(e,t){this._emitCommentFraming=!1,this._renderCompleteObject(e,t)},n.prototype.renderDeclarationReference=function(e,t){this._emitCommentFraming=!1,this._renderCompleteObject(e,t)},n.prototype._renderCompleteObject=function(e,t){this._output=e,this._lineState=he.Closed,this._previousLineHadContent=!1,this._hangingParagraph=!1,this._renderNode(t),this._writeEnd()},n.prototype._renderNode=function(e){var t=this;if(e!==void 0)switch(e.kind){case g.Block:var r=e;this._ensureLineSkipped(),this._renderNode(r.blockTag),r.blockTag.tagNameWithUpperCase===G.returns.tagNameWithUpperCase&&(this._writeContent(" "),this._hangingParagraph=!0),this._renderNode(r.content);break;case g.BlockTag:var i=e;this._lineState===he.MiddleOfLine&&this._writeContent(" "),this._writeContent(i.tagName);break;case g.CodeSpan:var o=e;this._writeContent("`"),this._writeContent(o.code),this._writeContent("`");break;case g.Comment:var a=e;this._renderNodes(qr(qr(qr([a.summarySection,a.remarksBlock,a.privateRemarks,a.deprecatedBlock,a.params,a.typeParams,a.returnsBlock],a.customBlocks,!0),a.seeBlocks,!0),[a.inheritDocTag],!1)),a.modifierTagSet.nodes.length>0&&(this._ensureLineSkipped(),this._renderNodes(a.modifierTagSet.nodes));break;case g.DeclarationReference:var l=e;this._writeContent(l.packageName),this._writeContent(l.importPath),(l.packageName!==void 0||l.importPath!==void 0)&&this._writeContent("#"),this._renderNodes(l.memberReferences);break;case g.ErrorText:var c=e;this._writeContent(c.text);break;case g.EscapedText:var d=e;this._writeContent(d.encodedText);break;case g.FencedCode:var m=e;this._ensureAtStartOfLine(),this._writeContent("```"),this._writeContent(m.language),this._writeNewline(),this._writeContent(m.code),this._writeContent("```"),this._writeNewline(),this._writeNewline();break;case g.HtmlAttribute:var _=e;this._writeContent(_.name),this._writeContent(_.spacingAfterName),this._writeContent("="),this._writeContent(_.spacingAfterEquals),this._writeContent(_.value),this._writeContent(_.spacingAfterValue);break;case g.HtmlEndTag:var w=e;this._writeContent("</"),this._writeContent(w.name),this._writeContent(">");break;case g.HtmlStartTag:var b=e;this._writeContent("<"),this._writeContent(b.name),this._writeContent(b.spacingAfterName);for(var S=b.spacingAfterName===void 0||b.spacingAfterName.length===0,k=0,E=b.htmlAttributes;k<E.length;k++){var O=E[k];S&&this._writeContent(" "),this._renderNode(O),S=O.spacingAfterValue===void 0||O.spacingAfterValue.length===0}this._writeContent(b.selfClosingTag?"/>":">");break;case g.InheritDocTag:var $=e;this._renderInlineTag($,function(){$.declarationReference&&(t._writeContent(" "),t._renderNode($.declarationReference))});break;case g.InlineTag:var K=e;this._renderInlineTag(K,function(){K.tagContent.length>0&&(t._writeContent(" "),t._writeContent(K.tagContent))});break;case g.LinkTag:var D=e;this._renderInlineTag(D,function(){(D.urlDestination!==void 0||D.codeDestination!==void 0)&&(D.urlDestination!==void 0?(t._writeContent(" "),t._writeContent(D.urlDestination)):D.codeDestination!==void 0&&(t._writeContent(" "),t._renderNode(D.codeDestination))),D.linkText!==void 0&&(t._writeContent(" "),t._writeContent("|"),t._writeContent(" "),t._writeContent(D.linkText))});break;case g.MemberIdentifier:var H=e;H.hasQuotes?(this._writeContent('"'),this._writeContent(H.identifier),this._writeContent('"')):this._writeContent(H.identifier);break;case g.MemberReference:var F=e;F.hasDot&&this._writeContent("."),F.selector&&this._writeContent("("),F.memberSymbol?this._renderNode(F.memberSymbol):this._renderNode(F.memberIdentifier),F.selector&&(this._writeContent(":"),this._renderNode(F.selector),this._writeContent(")"));break;case g.MemberSelector:var J=e;this._writeContent(J.selector);break;case g.MemberSymbol:var te=e;this._writeContent("["),this._renderNode(te.symbolReference),this._writeContent("]");break;case g.Section:var ne=e;this._renderNodes(ne.nodes);break;case g.Paragraph:var Q=Fr.trimSpacesInParagraph(e);Q.nodes.length>0&&(this._hangingParagraph?this._hangingParagraph=!1:this._ensureLineSkipped(),this._renderNodes(Q.nodes),this._writeNewline());break;case g.ParamBlock:var h=e;this._ensureLineSkipped(),this._renderNode(h.blockTag),this._writeContent(" "),this._writeContent(h.parameterName),this._writeContent(" - "),this._hangingParagraph=!0,this._renderNode(h.content),this._hangingParagraph=!1;break;case g.ParamCollection:var C=e;this._renderNodes(C.blocks);break;case g.PlainText:var f=e;this._writeContent(f.text);break}},n.prototype._renderInlineTag=function(e,t){this._writeContent("{"),this._writeContent(e.tagName),t(),this._writeContent("}")},n.prototype._renderNodes=function(e){for(var t=0,r=e;t<r.length;t++){var i=r[t];this._renderNode(i)}}, Line truncated
`?(++t,r=1):++r)}return{line:t,column:r}},n.prototype._validateBounds=function(){if(this.pos<0)throw new Error("TextRange.pos cannot be negative");if(this.end<0)throw new Error("TextRange.end cannot be negative");if(this.end<this.pos)throw new Error("TextRange.end cannot be smaller than TextRange.pos");if(this.pos>this.buffer.length)throw new Error("TextRange.pos cannot exceed the associated text buffer length");if(this.end>this.buffer.length)throw new Error("TextRange.end cannot exceed the associated text buffer length")},n.empty=new n("",0,0),n}();var hn=function(){function n(e){this.messageId=e.messageId,this.unformattedText=e.messageText,this.textRange=e.textRange,this.tokenSequence=e.tokenSequence,this.docNode=e.docNode,this._text=void 0}return n._formatMessageText=function(e,t){if(e||(e="An unknown error occurred"),t.pos!==0||t.end!==0){var r=t.getLocation(t.pos);if(r.line)return"(".concat(r.line,",").concat(r.column,"): ")+e}return e},Object.defineProperty(n.prototype,"text",{get:function(){return this._text===void 0&&(this._text=n._formatMessageText(this.unformattedText,this.textRange)),this._text},enumerable:!1,configurable:!0}),n.prototype.toString=function(){return this.text},n}();var Lr=function(){function n(){this._messages=[]}return Object.defineProperty(n.prototype,"messages",{get:function(){return this._messages},enumerable:!1,configurable:!0}),n.prototype.addMessage=function(e){this._messages.push(e)},n.prototype.addMessageForTextRange=function(e,t,r){this.addMessage(new hn({messageId:e,messageText:t,textRange:r}))},n.prototype.addMessageForTokenSequence=function(e,t,r,i){this.addMessage(new hn({messageId:e,messageText:t,textRange:r.getContainingTextRange(),tokenSequence:r,docNode:i}))},n.prototype.addMessageForDocErrorText=function(e){var t;e.textExcerpt?t=e.textExcerpt:t=e.errorLocation,this.addMessage(new hn({messageId:e.messageId,messageText:e.errorMessage,textRange:t.getContainingTextRange(),tokenSequence:t,docNode:e}))},n}();var Hr=function(){function n(e,t){this.commentRange=ze.empty,this.lines=[],this.tokens=[],this.configuration=e,this.sourceRange=t,this.docComment=new Gn({configuration:this.configuration}),this.log=new Lr}return n}();var yt=function(){function n(e){this.parserContext=e.parserContext,this._startIndex=e.startIndex,this._endIndex=e.endIndex,this._validateBounds()}return n.createEmpty=function(e){return new n({parserContext:e,startIndex:0,endIndex:0})},Object.defineProperty(n.prototype,"startIndex",{get:function(){return this._startIndex},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"endIndex",{get:function(){return this._endIndex},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tokens",{get:function(){return this.parserContext.tokens.slice(this._startIndex,this._endIndex)},enumerable:!1,configurable:!0}),n.prototype.getNewSequence=function(e,t){return new n({parserContext:this.parserContext,startIndex:e,endIndex:t})},n.prototype.getContainingTextRange=function(){return this.isEmpty()?ze.empty:this.parserContext.sourceRange.getNewRange(this.parserContext.tokens[this._startIndex].range.pos,this.parserContext.tokens[this._endIndex-1].range.end)},n.prototype.isEmpty=function(){return this._startIndex===this._endIndex},n.prototype.toString=function(){return this.tokens.map(function(e){return e.toString()}).join("")},n.prototype._validateBounds=function(){if(this.startIndex<0)throw new Error("TokenSequence.startIndex cannot be negative");if(this.endIndex<0)throw new Error("TokenSequence.endIndex cannot be negative");if(this.endIndex<this.startIndex)throw new Error("TokenSequence.endIndex cannot be smaller than TokenSequence.startIndex");if(this.startIndex>this.parserContext.tokens.length)throw new Error("TokenSequence.startIndex cannot exceed the associated token array");if(this.endIndex>this.parserContext.tokens.length)throw new Error("TokenSequence.endIndex cannot exceed the associated token array")},n}();var pe;(function(n){n[n.BeginComment1=0]="BeginComment1",n[n.BeginComment2=1]="BeginComment2",n[n.CollectingFirstLine=2]="CollectingFirstLine",n[n.CollectingLine=3]="CollectingLine",n[n.AdvancingLine=4]="AdvancingLine",n[n.Done=5]="Done"})(pe||(pe={}));var no=function(){function n(){}return n.extract=function(e){for(var t=e.sourceRange,r=t.buffer,i=0,o=0,a=0,l=0,c=t.pos,d=pe.BeginComment1,m=[];d!==pe.Done;){if(c>=t.end)switch(d){case pe.BeginComment1:case pe.BeginComment2:return e.log.addMessageForTextRange(v.CommentNotFound,'Expecting a "/**" comment',t),!1;default:return e.log.addMessageForTextRange(v.CommentMissingClosingDelimiter,"Unexpected end of input",t),!1}var _=r[c],w=c;++c;var b=c<t.end?r[c]:"";switch(d){case pe.BeginComment1:if(_==="/"&&b==="*")i=w,++c,d=pe.BeginComment2;else if(!n._whitespaceCharacterRegExp.test(_))return e.log.addMessageForTextRange(v.CommentOpeningDelimiterSyntax,'Expecting a leading "/**"',t.getNewRange(w,w+1)),!1;break;case pe.BeginComment2:if(_==="*")b===" "&&++c,a=c,l=c,d=pe.CollectingFirstLine Line truncated
var ja=Object.create;var Yn=Object.defineProperty;var va=Object.getOwnPropertyDescriptor;var wa=Object.getOwnPropertyNames;var ba=Object.getPrototypeOf,Ea=Object.prototype.hasOwnProperty;var zi=n=>Yn(n,"__esModule",{value:!0});var Ta=(n,e)=>{zi(n);for(var t in e)Yn(n,t,{get:e[t],enumerable:!0})},ka=(n,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of wa(e))!Ea.call(n,r)&&r!=="default"&&Yn(n,r,{get:()=>e[r],enumerable:!(t=va(e,r))||t.enumerable});return n},X=n=>ka(zi(Yn(n!=null?ja(ba(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var Ji=(()=>{for(var n=new Uint8Array(128),e=0;e<64;e++)n[e<26?e+65:e<52?e+71:e<62?e-4:e*4-205]=e;return t=>{for(var r=t.length,i=new Uint8Array((r-(t[r-1]=="=")-(t[r-2]=="="))*3/4|0),o=0,a=0;o<r;){var l=n[t.charCodeAt(o++)],c=n[t.charCodeAt(o++)],d=n[t.charCodeAt(o++)],m=n[t.charCodeAt(o++)];i[a++]=l<<2|c>>4,i[a++]=c<<4|d>>2,i[a++]=d<<6|m}return i}})();Ta(exports,{default:()=>qi});var Tr=X(require("obsidian"));var L=X(require("obsidian"));var Qi=X(require("obsidian"));function oe(n){let e=new Qi.Notice("",8e3),t=createFragment(r=>{r.createEl("b",{text:"Templater Error"}),r.createEl("span",{text:":"}),r.createEl("br"),r.createEl("span",{text:n.message}),n instanceof P&&n.console_msg&&(r.createEl("br"),r.createEl("span",{text:"Check console for more information"}),console.error("Templater Error:",n.message,`
`,n.console_msg))});e.noticeEl.appendChild(t)}var P=class extends Error{constructor(e,t){super(e);this.console_msg=t;this.name=this.constructor.name,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}};async function Se(n,e){try{return await n()}catch(t){return t instanceof P?oe(t):oe(new P(e,t.message)),null}}function Ce(n,e){try{return n()}catch(t){return oe(new P(e,t.message)),null}}var re=function(){function n(){}return n.explainIfInvalidTSDocTagName=function(e){if(e[0]!=="@")return'A TSDoc tag name must start with an "@" symbol';if(!n._tsdocTagNameRegExp.test(e))return"A TSDoc tag name must start with a letter and contain only letters and numbers"},n.validateTSDocTagName=function(e){var t=n.explainIfInvalidTSDocTagName(e);if(t)throw new Error(t)},n.explainIfInvalidLinkUrl=function(e){if(e.length===0)return"The URL cannot be empty";if(!n._urlSchemeRegExp.test(e))return'An @link URL must begin with a scheme comprised only of letters and numbers followed by "://". (For general URLs, use an HTML "<a>" tag instead.)';if(!n._urlSchemeAfterRegExp.test(e))return'An @link URL must have at least one character after "://"'},n.explainIfInvalidHtmlName=function(e){if(!n._htmlNameRegExp.test(e))return"An HTML name must be an ASCII letter followed by zero or more letters, digits, or hyphens"},n.validateHtmlName=function(e){var t=n.explainIfInvalidHtmlName(e);if(t)throw new Error(t)},n.explainIfInvalidPackageName=function(e){if(e.length===0)return"The package name cannot be an empty string";if(!n._validPackageNameRegExp.test(e))return"The package name ".concat(JSON.stringify(e)," is not a valid package name")},n.explainIfInvalidImportPath=function(e,t){if(e.length>0){if(e.indexOf("//")>=0)return'An import path must not contain "//"';if(e[e.length-1]==="/")return'An import path must not end with "/"';if(!t&&e[0]==="/")return'An import path must not start with "/" unless prefixed by a package name'}},n.isSystemSelector=function(e){return n._systemSelectors.has(e)},n.explainIfInvalidUnquotedIdentifier=function(e){if(e.length===0)return"The identifier cannot be an empty string";if(n._identifierBadCharRegExp.test(e))return"The identifier cannot non-word characters";if(n._identifierNumberStartRegExp.test(e))return"The identifier must not start with a number"},n.explainIfInvalidUnquotedMemberIdentifier=function(e){var t=n.explainIfInvalidUnquotedIdentifier(e);if(t!==void 0)return t;if(n.isSystemSelector(e))return'The identifier "'.concat(e,'" must be quoted because it is a TSDoc system selector name')},n._tsdocTagNameRegExp=/^@[a-z][a-z0-9]*$/i,n._urlSchemeRegExp=/^[a-z][a-z0-9]*\:\/\//i,n._urlSchemeAfterRegExp=/^[a-z][a-z0-9]*\:\/\/./i,n._htmlNameRegExp=/^[a-z]+[a-z0-9\-]*$/i,n._identifierBadCharRegExp=/[^a-z0-9_$]/i,n._identifierNumberStartRegExp=/^[0-9]/,n._validPackageNameRegExp=/^(?:@[a-z0-9\-_\.]+\/)?[a-z0-9\-_\.]+$/i,n._systemSelectors=new Set(["instance","static","constructor","class","enum","function","interface","namespace","type","variable"]),n}();var Nr=function(){function n(){this._docNodeDefinitionsByKind=new Map,this._docNodeDefinitionsByConstructor=new Map}return n.prototype.registerDocNodes=function(e,t){var r=re.explainIfInvalidPackageName(e);if(r)throw new Error("Invalid NPM package name: "+r);for(var i=0,o=t;i<o.length;i++){var a=o[i];if(!n._nodeKindRegExp.test(a.docNodeKind))throw new Error("The DocNode kind ".concat(JSON.stringify(a.docNodeKind)," is not a valid identifier.")+" It must start with an underscore or letter, and be comprised of letters, numbers, and underscores");var l=this._docNodeDefinitionsByKind.get(a.docNodeKind);if(l!==void 0)throw new Error('The DocNode kind "'.concat(a.docNodeKind,'" was already registered')+" by ".concat(l.packageName));if(l=this._docNodeDefinitionsByConstructor.get(a.constructor),l!==void 0)throw new Error("This DocNode constructor was already registered by ".concat(l.packageName)+" as ".concat(l.docNodeKind));var c={docNodeKind:a.docNodeKind,constructor:a.constructor,packageName:e,allowedChildKinds:new Set};this._docNodeDefinitionsByKind.set(a.docNodeKind,c),this._docNodeDefinitionsByConstructor.set(a.constructor,c)}},n.prototype.throwIfNotRegisteredKind=function(e){if(!this._docNodeDefinitionsByKind.has(e))throw new Error('The DocNode kind "'.concat(e,'" was not registered with this TSDocConfiguration'))},n.prototype.registerAllowableChildren=function(e,t){for(var r=this._getDefinition(e),i=0,o=t;i<o.length;i++){var a=o[i];this._getDefinition(a),r.allowedChildKinds.add(a)}},n.prototype.isAllowedChild=function(e,t){var r=this._getDefinition(e);return r.allowedChildKinds.has(t)},n.prototype._getDefinition=function(e){var t=this._docNodeDefinitionsByKind.get(e);if(t===void 0)throw new Error('The DocNode kind "'.concat(e,'" was not registered with this TSDocConfiguration'));return t},n._nodeKindRegExp=/^[_a-z][_a-z0-9]*$/i,n}();var U;(function(n){n.Core="Core",n.Extended="Extended",n.Discretionary="Discretionary",n.None="None"})(U||(U={}));var Line truncated
`:this.range.toString()},n}();var Ma=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),y;(function(n){n.Spacing="Spacing",n.BlockTag="BlockTag",n.CodeSpan_OpeningDelimiter="CodeSpan_OpeningDelimiter",n.CodeSpan_Code="CodeSpan_Code",n.CodeSpan_ClosingDelimiter="CodeSpan_ClosingDelimiter",n.DeclarationReference_PackageName="DeclarationReference_PackageName",n.DeclarationReference_ImportPath="DeclarationReference_ImportPath",n.DeclarationReference_ImportHash="DeclarationReference_ImportHash",n.ErrorText="ErrorText",n.NonstandardText="NonstandardText",n.EscapedText="EscapedText",n.FencedCode_OpeningFence="FencedCode_OpeningFence",n.FencedCode_Language="FencedCode_Language",n.FencedCode_Code="FencedCode_Code",n.FencedCode_ClosingFence="FencedCode_ClosingFence",n.HtmlAttribute_Name="HtmlAttribute_Name",n.HtmlAttribute_Equals="HtmlAttribute_Equals",n.HtmlAttribute_Value="HtmlAttribute_Value",n.HtmlEndTag_OpeningDelimiter="HtmlEndTag_OpeningDelimiter",n.HtmlEndTag_Name="HtmlEndTag_Name",n.HtmlEndTag_ClosingDelimiter="HtmlEndTag_ClosingDelimiter",n.HtmlStartTag_OpeningDelimiter="HtmlStartTag_OpeningDelimiter",n.HtmlStartTag_Name="HtmlStartTag_Name",n.HtmlStartTag_ClosingDelimiter="HtmlStartTag_ClosingDelimiter",n.InlineTag_OpeningDelimiter="InlineTag_OpeningDelimiter",n.InlineTag_TagName="InlineTag_TagName",n.InlineTag_TagContent="InlineTag_TagContent",n.InlineTag_ClosingDelimiter="InlineTag_ClosingDelimiter",n.LinkTag_UrlDestination="LinkTag_UrlDestination",n.LinkTag_Pipe="LinkTag_Pipe",n.LinkTag_LinkText="LinkTag_LinkText",n.MemberIdentifier_LeftQuote="MemberIdentifier_LeftQuote",n.MemberIdentifier_Identifier="MemberIdentifier_Identifier",n.MemberIdentifier_RightQuote="MemberIdentifier_RightQuote",n.MemberReference_Dot="MemberReference_Dot",n.MemberReference_LeftParenthesis="MemberReference_LeftParenthesis",n.MemberReference_Colon="MemberReference_Colon",n.MemberReference_RightParenthesis="MemberReference_RightParenthesis",n.MemberSelector="MemberSelector",n.DocMemberSymbol_LeftBracket="DocMemberSymbol_LeftBracket",n.DocMemberSymbol_RightBracket="DocMemberSymbol_RightBracket",n.ParamBlock_ParameterName="ParamBlock_ParameterName",n.ParamBlock_Hyphen="ParamBlock_Hyphen",n.PlainText="PlainText",n.SoftBreak="SoftBreak"})(y||(y={}));var j=function(n){Ma(e,n);function e(t){var r=n.call(this,t)||this;if(t.excerptKind===y.Spacing)for(var i=0,o=t.content.tokens;i<o.length;i++){var a=o[i];switch(a.kind){case u.Spacing:case u.Newline:case u.EndOfInput:break;default:throw new Error("The excerptKind=Spacing but the range contains a non-whitespace token")}}return r._excerptKind=t.excerptKind,r._content=t.content,r}return Object.defineProperty(e.prototype,"kind",{get:function(){return g.Excerpt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"excerptKind",{get:function(){return this._excerptKind},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"content",{get:function(){return this._content},enumerable:!1,configurable:!0}),e}(T);var Oa=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Un=function(n){Oa(e,n);function e(t){var r=n.call(this,t)||this;return re.validateTSDocTagName(t.tagName),r._tagName=t.tagName,r._tagNameWithUpperCase=t.tagName.toUpperCase(),T.isParsedParameters(t)&&(r._tagNameExcerpt=new j({configuration:r.configuration,excerptKind:y.BlockTag,content:t.tagNameExcerpt})),r}return Object.defineProperty(e.prototype,"kind",{get:function(){return g.BlockTag},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this._tagName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagNameWithUpperCase",{get:function(){return this._tagNameWithUpperCase},enumerable:!1,configurable:!0}),e.prototype.onGetChildNodes=function(){return[this._tagNameExcerpt]},e.prototype.getTokenSequence=function(){if(!this._tagNameExcerpt)throw new Error("DocBlockTag.getTokenSequence() failed because this object did not originate from a parsed input");return this._tagNameExcerpt.content},e}(T);var Ba=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}| Line truncated
`,this._emitCommentFraming=!0,this._lineState=he.Closed,this._previousLineHadContent=!1,this._hangingParagraph=!1}return n.prototype.renderComment=function(e,t){this._emitCommentFraming=!0,this._renderCompleteObject(e,t)},n.prototype.renderHtmlTag=function(e,t){this._emitCommentFraming=!1,this._renderCompleteObject(e,t)},n.prototype.renderDeclarationReference=function(e,t){this._emitCommentFraming=!1,this._renderCompleteObject(e,t)},n.prototype._renderCompleteObject=function(e,t){this._output=e,this._lineState=he.Closed,this._previousLineHadContent=!1,this._hangingParagraph=!1,this._renderNode(t),this._writeEnd()},n.prototype._renderNode=function(e){var t=this;if(e!==void 0)switch(e.kind){case g.Block:var r=e;this._ensureLineSkipped(),this._renderNode(r.blockTag),r.blockTag.tagNameWithUpperCase===G.returns.tagNameWithUpperCase&&(this._writeContent(" "),this._hangingParagraph=!0),this._renderNode(r.content);break;case g.BlockTag:var i=e;this._lineState===he.MiddleOfLine&&this._writeContent(" "),this._writeContent(i.tagName);break;case g.CodeSpan:var o=e;this._writeContent("`"),this._writeContent(o.code),this._writeContent("`");break;case g.Comment:var a=e;this._renderNodes(Lr(Lr(Lr([a.summarySection,a.remarksBlock,a.privateRemarks,a.deprecatedBlock,a.params,a.typeParams,a.returnsBlock],a.customBlocks,!0),a.seeBlocks,!0),[a.inheritDocTag],!1)),a.modifierTagSet.nodes.length>0&&(this._ensureLineSkipped(),this._renderNodes(a.modifierTagSet.nodes));break;case g.DeclarationReference:var l=e;this._writeContent(l.packageName),this._writeContent(l.importPath),(l.packageName!==void 0||l.importPath!==void 0)&&this._writeContent("#"),this._renderNodes(l.memberReferences);break;case g.ErrorText:var c=e;this._writeContent(c.text);break;case g.EscapedText:var d=e;this._writeContent(d.encodedText);break;case g.FencedCode:var m=e;this._ensureAtStartOfLine(),this._writeContent("```"),this._writeContent(m.language),this._writeNewline(),this._writeContent(m.code),this._writeContent("```"),this._writeNewline(),this._writeNewline();break;case g.HtmlAttribute:var _=e;this._writeContent(_.name),this._writeContent(_.spacingAfterName),this._writeContent("="),this._writeContent(_.spacingAfterEquals),this._writeContent(_.value),this._writeContent(_.spacingAfterValue);break;case g.HtmlEndTag:var w=e;this._writeContent("</"),this._writeContent(w.name),this._writeContent(">");break;case g.HtmlStartTag:var b=e;this._writeContent("<"),this._writeContent(b.name),this._writeContent(b.spacingAfterName);for(var S=b.spacingAfterName===void 0||b.spacingAfterName.length===0,k=0,E=b.htmlAttributes;k<E.length;k++){var O=E[k];S&&this._writeContent(" "),this._renderNode(O),S=O.spacingAfterValue===void 0||O.spacingAfterValue.length===0}this._writeContent(b.selfClosingTag?"/>":">");break;case g.InheritDocTag:var $=e;this._renderInlineTag($,function(){$.declarationReference&&(t._writeContent(" "),t._renderNode($.declarationReference))});break;case g.InlineTag:var K=e;this._renderInlineTag(K,function(){K.tagContent.length>0&&(t._writeContent(" "),t._writeContent(K.tagContent))});break;case g.LinkTag:var D=e;this._renderInlineTag(D,function(){(D.urlDestination!==void 0||D.codeDestination!==void 0)&&(D.urlDestination!==void 0?(t._writeContent(" "),t._writeContent(D.urlDestination)):D.codeDestination!==void 0&&(t._writeContent(" "),t._renderNode(D.codeDestination))),D.linkText!==void 0&&(t._writeContent(" "),t._writeContent("|"),t._writeContent(" "),t._writeContent(D.linkText))});break;case g.MemberIdentifier:var H=e;H.hasQuotes?(this._writeContent('"'),this._writeContent(H.identifier),this._writeContent('"')):this._writeContent(H.identifier);break;case g.MemberReference:var F=e;F.hasDot&&this._writeContent("."),F.selector&&this._writeContent("("),F.memberSymbol?this._renderNode(F.memberSymbol):this._renderNode(F.memberIdentifier),F.selector&&(this._writeContent(":"),this._renderNode(F.selector),this._writeContent(")"));break;case g.MemberSelector:var J=e;this._writeContent(J.selector);break;case g.MemberSymbol:var te=e;this._writeContent("["),this._renderNode(te.symbolReference),this._writeContent("]");break;case g.Section:var ne=e;this._renderNodes(ne.nodes);break;case g.Paragraph:var Q=qr.trimSpacesInParagraph(e);Q.nodes.length>0&&(this._hangingParagraph?this._hangingParagraph=!1:this._ensureLineSkipped(),this._renderNodes(Q.nodes),this._writeNewline());break;case g.ParamBlock:var h=e;this._ensureLineSkipped(),this._renderNode(h.blockTag),this._writeContent(" "),this._writeContent(h.parameterName),this._writeContent(" - "),this._hangingParagraph=!0,this._renderNode(h.content),this._hangingParagraph=!1;break;case g.ParamCollection:var C=e;this._renderNodes(C.blocks);break;case g.PlainText:var f=e;this._writeContent(f.text);break}},n.prototype._renderInlineTag=function(e,t){this._writeContent("{"),this._writeContent(e.tagName),t(),this._writeContent("}")},n.prototype._renderNodes=function(e){for(var t=0,r=e;t<r.length;t++){var i=r[t];this._renderNode(i)}}, Line truncated
`?(++t,r=1):++r)}return{line:t,column:r}},n.prototype._validateBounds=function(){if(this.pos<0)throw new Error("TextRange.pos cannot be negative");if(this.end<0)throw new Error("TextRange.end cannot be negative");if(this.end<this.pos)throw new Error("TextRange.end cannot be smaller than TextRange.pos");if(this.pos>this.buffer.length)throw new Error("TextRange.pos cannot exceed the associated text buffer length");if(this.end>this.buffer.length)throw new Error("TextRange.end cannot exceed the associated text buffer length")},n.empty=new n("",0,0),n}();var _n=function(){function n(e){this.messageId=e.messageId,this.unformattedText=e.messageText,this.textRange=e.textRange,this.tokenSequence=e.tokenSequence,this.docNode=e.docNode,this._text=void 0}return n._formatMessageText=function(e,t){if(e||(e="An unknown error occurred"),t.pos!==0||t.end!==0){var r=t.getLocation(t.pos);if(r.line)return"(".concat(r.line,",").concat(r.column,"): ")+e}return e},Object.defineProperty(n.prototype,"text",{get:function(){return this._text===void 0&&(this._text=n._formatMessageText(this.unformattedText,this.textRange)),this._text},enumerable:!1,configurable:!0}),n.prototype.toString=function(){return this.text},n}();var Hr=function(){function n(){this._messages=[]}return Object.defineProperty(n.prototype,"messages",{get:function(){return this._messages},enumerable:!1,configurable:!0}),n.prototype.addMessage=function(e){this._messages.push(e)},n.prototype.addMessageForTextRange=function(e,t,r){this.addMessage(new _n({messageId:e,messageText:t,textRange:r}))},n.prototype.addMessageForTokenSequence=function(e,t,r,i){this.addMessage(new _n({messageId:e,messageText:t,textRange:r.getContainingTextRange(),tokenSequence:r,docNode:i}))},n.prototype.addMessageForDocErrorText=function(e){var t;e.textExcerpt?t=e.textExcerpt:t=e.errorLocation,this.addMessage(new _n({messageId:e.messageId,messageText:e.errorMessage,textRange:t.getContainingTextRange(),tokenSequence:t,docNode:e}))},n}();var $r=function(){function n(e,t){this.commentRange=ze.empty,this.lines=[],this.tokens=[],this.configuration=e,this.sourceRange=t,this.docComment=new Wn({configuration:this.configuration}),this.log=new Hr}return n}();var yt=function(){function n(e){this.parserContext=e.parserContext,this._startIndex=e.startIndex,this._endIndex=e.endIndex,this._validateBounds()}return n.createEmpty=function(e){return new n({parserContext:e,startIndex:0,endIndex:0})},Object.defineProperty(n.prototype,"startIndex",{get:function(){return this._startIndex},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"endIndex",{get:function(){return this._endIndex},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tokens",{get:function(){return this.parserContext.tokens.slice(this._startIndex,this._endIndex)},enumerable:!1,configurable:!0}),n.prototype.getNewSequence=function(e,t){return new n({parserContext:this.parserContext,startIndex:e,endIndex:t})},n.prototype.getContainingTextRange=function(){return this.isEmpty()?ze.empty:this.parserContext.sourceRange.getNewRange(this.parserContext.tokens[this._startIndex].range.pos,this.parserContext.tokens[this._endIndex-1].range.end)},n.prototype.isEmpty=function(){return this._startIndex===this._endIndex},n.prototype.toString=function(){return this.tokens.map(function(e){return e.toString()}).join("")},n.prototype._validateBounds=function(){if(this.startIndex<0)throw new Error("TokenSequence.startIndex cannot be negative");if(this.endIndex<0)throw new Error("TokenSequence.endIndex cannot be negative");if(this.endIndex<this.startIndex)throw new Error("TokenSequence.endIndex cannot be smaller than TokenSequence.startIndex");if(this.startIndex>this.parserContext.tokens.length)throw new Error("TokenSequence.startIndex cannot exceed the associated token array");if(this.endIndex>this.parserContext.tokens.length)throw new Error("TokenSequence.endIndex cannot exceed the associated token array")},n}();var pe;(function(n){n[n.BeginComment1=0]="BeginComment1",n[n.BeginComment2=1]="BeginComment2",n[n.CollectingFirstLine=2]="CollectingFirstLine",n[n.CollectingLine=3]="CollectingLine",n[n.AdvancingLine=4]="AdvancingLine",n[n.Done=5]="Done"})(pe||(pe={}));var ro=function(){function n(){}return n.extract=function(e){for(var t=e.sourceRange,r=t.buffer,i=0,o=0,a=0,l=0,c=t.pos,d=pe.BeginComment1,m=[];d!==pe.Done;){if(c>=t.end)switch(d){case pe.BeginComment1:case pe.BeginComment2:return e.log.addMessageForTextRange(v.CommentNotFound,'Expecting a "/**" comment',t),!1;default:return e.log.addMessageForTextRange(v.CommentMissingClosingDelimiter,"Unexpected end of input",t),!1}var _=r[c],w=c;++c;var b=c<t.end?r[c]:"";switch(d){case pe.BeginComment1:if(_==="/"&&b==="*")i=w,++c,d=pe.BeginComment2;else if(!n._whitespaceCharacterRegExp.test(_))return e.log.addMessageForTextRange(v.CommentOpeningDelimiterSyntax,'Expecting a leading "/**"',t.getNewRange(w,w+1)),!1;break;case pe.BeginComment2:if(_==="*")b===" "&&++c,a=c,l=c,d=pe.CollectingFirstLine Line truncated
`?((d!==pe.CollectingFirstLine||l>a)&&m.push(t.getNewRange(a,l)),a=c,l=c,d=pe.AdvancingLine):_==="*"&&b==="/"?(l>a&&m.push(t.getNewRange(a,l)),a=0,l=0,++c,o=c,d=pe.Done):n._whitespaceCharacterRegExp.test(_)||(l=c);break;case pe.AdvancingLine:_==="*"?b==="/"?(a=0,l=0,++c,o=c,d=pe.Done):(b===" "&&++c,a=c,l=c,d=pe.CollectingLine):_===`
`?(m.push(t.getNewRange(w,w)),a=c):n._whitespaceCharacterRegExp.test(_)||(l=c,d=pe.CollectingLine);break}}return e.commentRange=t.getNewRange(i,o),e.lines=m,!0},n._whitespaceCharacterRegExp=/^\s$/,n}();var An=function(){function n(){}return n.readTokens=function(e){n._ensureInitialized();for(var t=[],r=void 0,i=0,o=e;i<o.length;i++){var a=o[i];n._pushTokensForLine(t,a),r=a}return r?t.push(new Pt(u.EndOfInput,r.getNewRange(r.end,r.end),r)):t.push(new Pt(u.EndOfInput,ze.empty,ze.empty)),t},n.isPunctuation=function(e){return n._ensureInitialized(),n._punctuationTokens[e]||!1},n._pushTokensForLine=function(e,t){for(var r=t.buffer,i=t.end,o=t.pos,a=void 0,l=o;o<i;){var c=r.charCodeAt(o),d=n._charCodeMap[c];d===void 0&&(d=u.Other),a!==void 0&&d===a&&n._isMultiCharacterToken(a)||(a!==void 0&&e.push(new Pt(a,t.getNewRange(l,o),t)),l=o,a=d),++o}a!==void 0&&e.push(new Pt(a,t.getNewRange(l,o),t)),e.push(new Pt(u.Newline,t.getNewRange(t.end,t.end),t))},n._isMultiCharacterToken=function(e){switch(e){case u.Spacing:case u.AsciiWord:case u.Other:return!0}return!1},n._ensureInitialized=function(){if(!n._charCodeMap){n._charCodeMap={},n._punctuationTokens={};for(var e=n._commonMarkPunctuationCharacters,t=0;t<e.length;++t){var r=e.charCodeAt(t);n._charCodeMap[r]=u.OtherPunctuation}for(var i={"\\":u.Backslash,"<":u.LessThan,">":u.GreaterThan,"=":u.Equals,"'":u.SingleQuote,'"':u.DoubleQuote,"/":u.Slash,"-":u.Hyphen,"@":u.AtSign,"{":u.LeftCurlyBracket,"}":u.RightCurlyBracket,"`":u.Backtick,".":u.Period,":":u.Colon,",":u.Comma,"[":u.LeftSquareBracket,"]":u.RightSquareBracket,"|":u.Pipe,"(":u.LeftParenthesis,")":u.RightParenthesis,"#":u.PoundSymbol,"+":u.Plus,$:u.DollarSign},o=0,a=Object.getOwnPropertyNames(i);o<a.length;o++){var l=a[o];n._charCodeMap[l.charCodeAt(0)]=i[l],n._punctuationTokens[i[l]]=!0}n._punctuationTokens[u.OtherPunctuation]=!0;for(var c=n._wordCharacters,t=0;t<c.length;++t){var r=c.charCodeAt(t);n._charCodeMap[r]=u.AsciiWord}n._charCodeMap[" ".charCodeAt(0)]=u.Spacing,n._charCodeMap[" ".charCodeAt(0)]=u.Spacing}},n._commonMarkPunctuationCharacters="!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~",n._wordCharacters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_",n}();var $r=function(){function n(e,t){if(this._parserContext=e,this.tokens=e.tokens,t){if(t.parserContext!==this._parserContext)throw new Error("The embeddedTokenSequence must use the same parser context");this._readerStartIndex=t.startIndex,this._readerEndIndex=t.endIndex}else this._readerStartIndex=0,this._readerEndIndex=this.tokens.length;this._currentIndex=this._readerStartIndex,this._accumulatedStartIndex=this._readerStartIndex}return n.prototype.extractAccumulatedSequence=function(){if(this._accumulatedStartIndex===this._currentIndex)throw new Error("Parser assertion failed: The queue should not be empty when extractAccumulatedSequence() is called");var e=new yt({parserContext:this._parserContext,startIndex:this._accumulatedStartIndex,endIndex:this._currentIndex});return this._accumulatedStartIndex=this._currentIndex,e},n.prototype.isAccumulatedSequenceEmpty=function(){return this._accumulatedStartIndex===this._currentIndex},n.prototype.tryExtractAccumulatedSequence=function(){if(!this.isAccumulatedSequenceEmpty())return this.extractAccumulatedSequence()},n.prototype.assertAccumulatedSequenceIsEmpty=function(){if(!this.isAccumulatedSequenceEmpty()){var e=new yt({parserContext:this._parserContext,startIndex:this._accumulatedStartIndex,endIndex:this._currentIndex}),t=e.tokens.map(function(r){return r.toString()});throw new Error(`Parser assertion failed: The queue should be empty, but it contains:
`+JSON.stringify(t))}},n.prototype.peekToken=function(){return this.tokens[this._currentIndex]},n.prototype.peekTokenKind=function(){return this._currentIndex>=this._readerEndIndex?u.EndOfInput:this.tokens[this._currentIndex].kind},n.prototype.peekTokenAfterKind=function(){return this._currentIndex+1>=this._readerEndIndex?u.EndOfInput:this.tokens[this._currentIndex+1].kind},n.prototype.peekTokenAfterAfterKind=function(){return this._currentIndex+2>=this._readerEndIndex?u.EndOfInput:this.tokens[this._currentIndex+2].kind},n.prototype.readToken=function(){if(this._currentIndex>=this._readerEndIndex)throw new Error("Cannot read past end of stream");var e=this.tokens[this._currentIndex];if(e.kind===u.EndOfInput)throw new Error("The EndOfInput token cannot be read");return this._currentIndex++,e},n.prototype.peekPreviousTokenKind=function(){return this._currentIndex===0?u.EndOfInput:this.tokens[this._currentIndex-1].kind},n.prototype.createMarker=function(){return this._currentIndex},n.prototype.backtrackToMarker=function(e){if(e>this._currentIndex)throw new Error("The marker has expired");this._currentIndex=e,e<this._accumulatedStartIndex&&(this._accumulatedStartIndex=e)},n}();var lr=function(){return lr=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},lr.apply(this,arguments)};function _n(n){return n!==void 0&&Object.hasOwnProperty.call(n,"failureMessage")}var ro=function(){function n(e){this._parserContext=e,this._configuration=e.configuration,this._currentSection=e.docComment.summarySection}return n.prototype.parse=function(){for(var e=new $r(this._parserContext),t=!1;!t;)switch(e.peekTokenKind()){case u.EndOfInput:t=!0;break;case u.Newline:this._pushAccumulatedPlainText(e),e.readToken(),this._pushNode(new rr({parsed:!0,configuration:this._configuration,softBreakExcerpt:e.extractAccumulatedSequence()}));break;case u.Backslash:this._pushAccumulatedPlainText(e),this._pushNode(this._parseBackslashEscape(e));break;case u.AtSign:this._pushAccumulatedPlainText(e),this._parseAndPushBlock(e);break;case u.LeftCurlyBracket:{this._pushAccumulatedPlainText(e);var r=e.createMarker(),i=this._parseInlineTag(e),o=this._parserContext.docComment;if(i instanceof dn){var a=e.createMarker()-1;o.inheritDocTag===void 0?this._parserContext.docComment.inheritDocTag=i:this._pushNode(this._backtrackAndCreateErrorRange(e,r,a,v.ExtraInheritDocTag,"A doc comment cannot have more than one @inheritDoc tag"))}else this._pushNode(i);break}case u.RightCurlyBracket:this._pushAccumulatedPlainText(e),this._pushNode(this._createError(e,v.EscapeRightBrace,'The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag'));break;case u.LessThan:this._pushAccumulatedPlainText(e),e.peekTokenAfterKind()===u.Slash?this._pushNode(this._parseHtmlEndTag(e)):this._pushNode(this._parseHtmlStartTag(e));break;case u.GreaterThan:this._pushAccumulatedPlainText(e),this._pushNode(this._createError(e,v.EscapeGreaterThan,'The ">" character should be escaped using a backslash to avoid confusion with an HTML tag'));break;case u.Backtick:this._pushAccumulatedPlainText(e),e.peekTokenAfterKind()===u.Backtick&&e.peekTokenAfterAfterKind()===u.Backtick?this._pushNode(this._parseFencedCode(e)):this._pushNode(this._parseCodeSpan(e));break;default:e.readToken();break}this._pushAccumulatedPlainText(e),this._performValidationChecks()},n.prototype._performValidationChecks=function(){var e=this._parserContext.docComment;e.deprecatedBlock&&(cr.hasAnyTextContent(e.deprecatedBlock)||this._parserContext.log.addMessageForTokenSequence(v.MissingDeprecationMessage,"The ".concat(e.deprecatedBlock.blockTag.tagName," block must include a deprecation message,")+" e.g. describing the recommended alternative",e.deprecatedBlock.blockTag.getTokenSequence(),e.deprecatedBlock)),e.inheritDocTag&&(e.remarksBlock&&this._parserContext.log.addMessageForTokenSequence(v.InheritDocIncompatibleTag,'A "'.concat(e.remarksBlock.blockTag.tagName,'" block must not be used, because that')+" content is provided by the @inheritDoc tag",e.remarksBlock.blockTag.getTokenSequence(),e.remarksBlock.blockTag),cr.hasAnyTextContent(e.summarySection)&&this._parserContext.log.addMessageForTextRange(v.InheritDocIncompatibleSummary,"The summary section must not have any content, because that content is provided by the @inheritDoc tag",this._parserContext.commentRange))},n.prototype._validateTagDefinition=function(e,t,r,i,o){if(e){var a=e.syntaxKind===R.InlineTag;a!==r?r?this._parserContext.log.addMessageForTokenSequence(v.TagShouldNotHaveBraces,'The TSDoc tag "'.concat(t,'" is not an inline tag; it must not be enclosed in "{ }" braces'),i,o):this._parserContext.log.addMessageForTokenSequence(v.InlineTagMissingBraces,'The TSDoc tag "'.concat(t,'" is an inline tag; it must be enclosed in "{ }" braces'),i,o):this._parserContext.configuration.validation.reportUnsupportedTags&&(this._ Line truncated
`?(m.push(t.getNewRange(w,w)),a=c):n._whitespaceCharacterRegExp.test(_)||(l=c,d=pe.CollectingLine);break}}return e.commentRange=t.getNewRange(i,o),e.lines=m,!0},n._whitespaceCharacterRegExp=/^\s$/,n}();var xn=function(){function n(){}return n.readTokens=function(e){n._ensureInitialized();for(var t=[],r=void 0,i=0,o=e;i<o.length;i++){var a=o[i];n._pushTokensForLine(t,a),r=a}return r?t.push(new Nt(u.EndOfInput,r.getNewRange(r.end,r.end),r)):t.push(new Nt(u.EndOfInput,ze.empty,ze.empty)),t},n.isPunctuation=function(e){return n._ensureInitialized(),n._punctuationTokens[e]||!1},n._pushTokensForLine=function(e,t){for(var r=t.buffer,i=t.end,o=t.pos,a=void 0,l=o;o<i;){var c=r.charCodeAt(o),d=n._charCodeMap[c];d===void 0&&(d=u.Other),a!==void 0&&d===a&&n._isMultiCharacterToken(a)||(a!==void 0&&e.push(new Nt(a,t.getNewRange(l,o),t)),l=o,a=d),++o}a!==void 0&&e.push(new Nt(a,t.getNewRange(l,o),t)),e.push(new Nt(u.Newline,t.getNewRange(t.end,t.end),t))},n._isMultiCharacterToken=function(e){switch(e){case u.Spacing:case u.AsciiWord:case u.Other:return!0}return!1},n._ensureInitialized=function(){if(!n._charCodeMap){n._charCodeMap={},n._punctuationTokens={};for(var e=n._commonMarkPunctuationCharacters,t=0;t<e.length;++t){var r=e.charCodeAt(t);n._charCodeMap[r]=u.OtherPunctuation}for(var i={"\\":u.Backslash,"<":u.LessThan,">":u.GreaterThan,"=":u.Equals,"'":u.SingleQuote,'"':u.DoubleQuote,"/":u.Slash,"-":u.Hyphen,"@":u.AtSign,"{":u.LeftCurlyBracket,"}":u.RightCurlyBracket,"`":u.Backtick,".":u.Period,":":u.Colon,",":u.Comma,"[":u.LeftSquareBracket,"]":u.RightSquareBracket,"|":u.Pipe,"(":u.LeftParenthesis,")":u.RightParenthesis,"#":u.PoundSymbol,"+":u.Plus,$:u.DollarSign},o=0,a=Object.getOwnPropertyNames(i);o<a.length;o++){var l=a[o];n._charCodeMap[l.charCodeAt(0)]=i[l],n._punctuationTokens[i[l]]=!0}n._punctuationTokens[u.OtherPunctuation]=!0;for(var c=n._wordCharacters,t=0;t<c.length;++t){var r=c.charCodeAt(t);n._charCodeMap[r]=u.AsciiWord}n._charCodeMap[" ".charCodeAt(0)]=u.Spacing,n._charCodeMap[" ".charCodeAt(0)]=u.Spacing}},n._commonMarkPunctuationCharacters="!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~",n._wordCharacters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_",n}();var Kr=function(){function n(e,t){if(this._parserContext=e,this.tokens=e.tokens,t){if(t.parserContext!==this._parserContext)throw new Error("The embeddedTokenSequence must use the same parser context");this._readerStartIndex=t.startIndex,this._readerEndIndex=t.endIndex}else this._readerStartIndex=0,this._readerEndIndex=this.tokens.length;this._currentIndex=this._readerStartIndex,this._accumulatedStartIndex=this._readerStartIndex}return n.prototype.extractAccumulatedSequence=function(){if(this._accumulatedStartIndex===this._currentIndex)throw new Error("Parser assertion failed: The queue should not be empty when extractAccumulatedSequence() is called");var e=new yt({parserContext:this._parserContext,startIndex:this._accumulatedStartIndex,endIndex:this._currentIndex});return this._accumulatedStartIndex=this._currentIndex,e},n.prototype.isAccumulatedSequenceEmpty=function(){return this._accumulatedStartIndex===this._currentIndex},n.prototype.tryExtractAccumulatedSequence=function(){if(!this.isAccumulatedSequenceEmpty())return this.extractAccumulatedSequence()},n.prototype.assertAccumulatedSequenceIsEmpty=function(){if(!this.isAccumulatedSequenceEmpty()){var e=new yt({parserContext:this._parserContext,startIndex:this._accumulatedStartIndex,endIndex:this._currentIndex}),t=e.tokens.map(function(r){return r.toString()});throw new Error(`Parser assertion failed: The queue should be empty, but it contains:
`+JSON.stringify(t))}},n.prototype.peekToken=function(){return this.tokens[this._currentIndex]},n.prototype.peekTokenKind=function(){return this._currentIndex>=this._readerEndIndex?u.EndOfInput:this.tokens[this._currentIndex].kind},n.prototype.peekTokenAfterKind=function(){return this._currentIndex+1>=this._readerEndIndex?u.EndOfInput:this.tokens[this._currentIndex+1].kind},n.prototype.peekTokenAfterAfterKind=function(){return this._currentIndex+2>=this._readerEndIndex?u.EndOfInput:this.tokens[this._currentIndex+2].kind},n.prototype.readToken=function(){if(this._currentIndex>=this._readerEndIndex)throw new Error("Cannot read past end of stream");var e=this.tokens[this._currentIndex];if(e.kind===u.EndOfInput)throw new Error("The EndOfInput token cannot be read");return this._currentIndex++,e},n.prototype.peekPreviousTokenKind=function(){return this._currentIndex===0?u.EndOfInput:this.tokens[this._currentIndex-1].kind},n.prototype.createMarker=function(){return this._currentIndex},n.prototype.backtrackToMarker=function(e){if(e>this._currentIndex)throw new Error("The marker has expired");this._currentIndex=e,e<this._accumulatedStartIndex&&(this._accumulatedStartIndex=e)},n}();var pr=function(){return pr=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},pr.apply(this,arguments)};function yn(n){return n!==void 0&&Object.hasOwnProperty.call(n,"failureMessage")}var io=function(){function n(e){this._parserContext=e,this._configuration=e.configuration,this._currentSection=e.docComment.summarySection}return n.prototype.parse=function(){for(var e=new Kr(this._parserContext),t=!1;!t;)switch(e.peekTokenKind()){case u.EndOfInput:t=!0;break;case u.Newline:this._pushAccumulatedPlainText(e),e.readToken(),this._pushNode(new ir({parsed:!0,configuration:this._configuration,softBreakExcerpt:e.extractAccumulatedSequence()}));break;case u.Backslash:this._pushAccumulatedPlainText(e),this._pushNode(this._parseBackslashEscape(e));break;case u.AtSign:this._pushAccumulatedPlainText(e),this._parseAndPushBlock(e);break;case u.LeftCurlyBracket:{this._pushAccumulatedPlainText(e);var r=e.createMarker(),i=this._parseInlineTag(e),o=this._parserContext.docComment;if(i instanceof gn){var a=e.createMarker()-1;o.inheritDocTag===void 0?this._parserContext.docComment.inheritDocTag=i:this._pushNode(this._backtrackAndCreateErrorRange(e,r,a,v.ExtraInheritDocTag,"A doc comment cannot have more than one @inheritDoc tag"))}else this._pushNode(i);break}case u.RightCurlyBracket:this._pushAccumulatedPlainText(e),this._pushNode(this._createError(e,v.EscapeRightBrace,'The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag'));break;case u.LessThan:this._pushAccumulatedPlainText(e),e.peekTokenAfterKind()===u.Slash?this._pushNode(this._parseHtmlEndTag(e)):this._pushNode(this._parseHtmlStartTag(e));break;case u.GreaterThan:this._pushAccumulatedPlainText(e),this._pushNode(this._createError(e,v.EscapeGreaterThan,'The ">" character should be escaped using a backslash to avoid confusion with an HTML tag'));break;case u.Backtick:this._pushAccumulatedPlainText(e),e.peekTokenAfterKind()===u.Backtick&&e.peekTokenAfterAfterKind()===u.Backtick?this._pushNode(this._parseFencedCode(e)):this._pushNode(this._parseCodeSpan(e));break;default:e.readToken();break}this._pushAccumulatedPlainText(e),this._performValidationChecks()},n.prototype._performValidationChecks=function(){var e=this._parserContext.docComment;e.deprecatedBlock&&(lr.hasAnyTextContent(e.deprecatedBlock)||this._parserContext.log.addMessageForTokenSequence(v.MissingDeprecationMessage,"The ".concat(e.deprecatedBlock.blockTag.tagName," block must include a deprecation message,")+" e.g. describing the recommended alternative",e.deprecatedBlock.blockTag.getTokenSequence(),e.deprecatedBlock)),e.inheritDocTag&&(e.remarksBlock&&this._parserContext.log.addMessageForTokenSequence(v.InheritDocIncompatibleTag,'A "'.concat(e.remarksBlock.blockTag.tagName,'" block must not be used, because that')+" content is provided by the @inheritDoc tag",e.remarksBlock.blockTag.getTokenSequence(),e.remarksBlock.blockTag),lr.hasAnyTextContent(e.summarySection)&&this._parserContext.log.addMessageForTextRange(v.InheritDocIncompatibleSummary,"The summary section must not have any content, because that content is provided by the @inheritDoc tag",this._parserContext.commentRange))},n.prototype._validateTagDefinition=function(e,t,r,i,o){if(e){var a=e.syntaxKind===R.InlineTag;a!==r?r?this._parserContext.log.addMessageForTokenSequence(v.TagShouldNotHaveBraces,'The TSDoc tag "'.concat(t,'" is not an inline tag; it must not be enclosed in "{ }" braces'),i,o):this._parserContext.log.addMessageForTokenSequence(v.InlineTagMissingBraces,'The TSDoc tag "'.concat(t,'" is an inline tag; it must be enclosed in "{ }" braces'),i,o):this._parserContext.configuration.validation.reportUnsupportedTags&&(this._ Line truncated
`)).join(`
`)}catch{console.error("Failed to parse summary section")}}function as(n){if(!n)return"";try{return n.content.nodes[0].getChildNodes()[0].text.trim()}catch{return""}}function ss(n){try{return n.blocks.map(r=>{let i=r.parameterName,o=r.content.getChildNodes()[0].getChildNodes().filter(a=>a instanceof Ve).map(a=>a.text).join(" ");return new Yr(i,o)})}catch{return[]}}function Mt(n,e,t){if(t<0||t===n.length)return;let r=n[e];n[e]=n[t],n[t]=r}function Xt(n){return n.workspace.activeEditor?.file??n.workspace.getActiveFile()}function co(n){let e=n.lastIndexOf("/");return e!==-1?n.slice(0,e):""}function xn(n){return n!==null&&typeof n=="object"}function lo(n){let e=n.toString(),t=e.indexOf("(");return e.substring(t+1,e.indexOf(")")).replace(/ /g,"").split(",")}function Ur(n,e,t){let r=n instanceof HTMLOListElement?"li":"p",i=n.createEl(r),o=n.createEl("b",{text:e});return i.appendChild(o),i.appendChild(document.createTextNode(`: ${t}`)),i}function pr(n,e){if(Object.keys(e).length!==0){for(let t in e)if(e.hasOwnProperty(t))if(n.hasOwnProperty(t)){let r=n[t],i=e[t];if(Array.isArray(r)||Array.isArray(i)){let o=Array.isArray(r)?r:[r],a=Array.isArray(i)?i:[i];n[t]=o.concat(a).unique()}else xn(r)&&xn(i)?pr(r,i):i!=null&&i!==""&&(n[t]=i)}else n[t]=e[t]}}function yn(n){let e={},t=(0,Te.getFrontMatterInfo)(n);return t.frontmatter&&(e=(0,Te.parseYaml)(t.frontmatter)),{frontmatter:e,content:n.slice(t.contentStart)}}var Oo=X(require("obsidian"));var No=X(require("obsidian"));var ie="top",ue="bottom",ce="right",ae="left",ur="auto",vt=[ie,ue,ce,ae],pt="start",Ot="end",po="clippingParents",fr="viewport",Zt="popper",uo="reference",Gr=vt.reduce(function(n,e){return n.concat([e+"-"+pt,e+"-"+Ot])},[]),dr=[].concat(vt,[ur]).reduce(function(n,e){return n.concat([e,e+"-"+pt,e+"-"+Ot])},[]),cs="beforeRead",ls="read",ps="afterRead",us="beforeMain",fs="main",ds="afterMain",ms="beforeWrite",gs="write",hs="afterWrite",fo=[cs,ls,ps,us,fs,ds,ms,gs,hs];function me(n){return n?(n.nodeName||"").toLowerCase():null}function Z(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function Me(n){var e=Z(n).Element;return n instanceof e||n instanceof Element}function fe(n){var e=Z(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function en(n){if(typeof ShadowRoot=="undefined")return!1;var e=Z(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function As(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var r=e.styles[t]||{},i=e.attributes[t]||{},o=e.elements[t];!fe(o)||!me(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var l=i[a];l===!1?o.removeAttribute(a):o.setAttribute(a,l===!0?"":l)}))})}function _s(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:t[r]),l=a.reduce(function(c,d){return c[d]="",c},{});!fe(i)||!me(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}var mo={name:"applyStyles",enabled:!0,phase:"write",fn:As,effect:_s,requires:["computeStyles"]};function ge(n){return n.split("-")[0]}var qe=Math.max,Bt=Math.min,ut=Math.round;function tn(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function jn(){return!/^((?!chrome|android).)*safari/i.test(tn())}function Oe(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=n.getBoundingClientRect(),i=1,o=1;e&&fe(n)&&(i=n.offsetWidth>0&&ut(r.width)/n.offsetWidth||1,o=n.offsetHeight>0&&ut(r.height)/n.offsetHeight||1);var a=Me(n)?Z(n):window,l=a.visualViewport,c=!jn()&&t,d=(r.left+(c&&l?l.offsetLeft:0))/i,m=(r.top+(c&&l?l.offsetTop:0))/o,_=r.width/i,w=r.height/o;return{width:_,height:w,top:m,right:d+_,bottom:m+w,left:d,x:d,y:m}}function It(n){var e=Oe(n),t=n.offsetWidth,r=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:r}}function vn(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&en(t)){var r=e;do{if(r&&n.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function we(n){return Z(n).getComputedStyle(n)}function Wr(n){return["table","td","th"].indexOf(me(n))>=0}function Ae(n){return((Me(n)?n.ownerDocument:n.document)||window.document).documentElement}function ft(n){return me(n)==="html"?n:n.assignedSlot||n.parentNode||(en(n)?n.host:null)||Ae(n)}function go(n){return!fe(n)||we(n).position==="fixed"?null:n.offsetParent}function xs(n){var e=/firefox/i.test(tn()),t=/Trident/i.test(tn());if(t&&fe(n)){var r=we(n);if(r.position==="fixed")return nu Line truncated
> \u2014 ${o}`}catch{return new P("Error generating daily quote"),"Error generating daily quote"}}}generate_random_picture(){return async(e,t,r=!1)=>{try{let i=await this.getRequest(`https://templater-unsplash-2.fly.dev/${t?"?q="+t:""}`).then(a=>a.json),o=i.full;if(e&&!r)if(e.includes("x")){let[a,l]=e.split("x");o=o.concat(`&w=${a}&h=${l}`)}else o=o.concat(`&w=${e}`);return r?`![photo by ${i.photog}(${i.photogUrl}) on Unsplash|${e}](${o})`:`![photo by ${i.photog}(${i.photogUrl}) on Unsplash](${o})`}catch{return new P("Error generating random picture"),"Error generating random picture"}}}generate_request(){return async(e,t)=>{try{let i=await(await this.getRequest(e)).json;return t&&i?t.split(".").reduce((o,a)=>{if(o&&o.hasOwnProperty(a))return o[a];throw new Error(`Path ${t} not found in the JSON response`)},i):i}catch(r){throw console.error(r),new P("Error fetching and extracting value")}}}};var ui=class extends be{constructor(){super(...arguments);this.name="hooks";this.event_refs=[]}async create_static_templates(){this.static_functions.set("on_all_templates_executed",this.generate_on_all_templates_executed())}async create_dynamic_templates(){}async teardown(){this.event_refs.forEach(e=>{e.e.offref(e)}),this.event_refs=[]}generate_on_all_templates_executed(){return e=>{let t=this.plugin.app.workspace.on("templater:all-templates-executed",async()=>{await jt(1),e()});t&&this.event_refs.push(t)}}};var fi=class extends be{constructor(){super(...arguments);this.name="frontmatter"}async create_static_templates(){}async create_dynamic_templates(){let e=this.plugin.app.metadataCache.getFileCache(this.config.target_file);this.dynamic_functions=new Map(Object.entries(e?.frontmatter||{}))}async teardown(){}};var Qe=X(require("obsidian"));var di=class extends Qe.Modal{constructor(e,t,r,i){super(e);this.prompt_text=t;this.default_value=r;this.multi_line=i;this.submitted=!1}onOpen(){this.titleEl.setText(this.prompt_text),this.createForm()}onClose(){this.contentEl.empty(),this.submitted||this.reject(new P("Cancelled prompt"))}createForm(){let e=this.contentEl.createDiv();e.addClass("templater-prompt-div");let t;this.multi_line?t=new Qe.TextAreaComponent(e):t=new Qe.TextComponent(e);let r=this.contentEl.createDiv();r.addClass("templater-button-div");let i=new Qe.ButtonComponent(r);i.buttonEl.addClass("mod-cta"),i.setButtonText("Submit").onClick(o=>{this.resolveAndClose(o)}),this.value=this.default_value??"",t.inputEl.addClass("templater-prompt-input"),t.setPlaceholder("Type text here"),t.setValue(this.value),t.onChange(o=>this.value=o),t.inputEl.focus(),t.inputEl.addEventListener("keydown",o=>this.enterCallback(o))}enterCallback(e){e.isComposing||e.keyCode===229||(this.multi_line?Qe.Platform.isDesktop&&e.key==="Enter"&&!e.shiftKey&&this.resolveAndClose(e):e.key==="Enter"&&this.resolveAndClose(e))}resolveAndClose(e){this.submitted=!0,e.preventDefault(),this.resolve(this.value),this.close()}async openAndGetValue(e,t){this.resolve=e,this.reject=t,this.open()}};var Yo=X(require("obsidian")),mi=class extends Yo.FuzzySuggestModal{constructor(e,t,r,i,o){super(e);this.text_items=t;this.items=r;this.submitted=!1;this.setPlaceholder(i),o&&(this.limit=o)}getItems(){return this.items}onClose(){this.submitted||this.reject(new P("Cancelled prompt"))}selectSuggestion(e,t){this.submitted=!0,this.close(),this.onChooseSuggestion(e,t)}getItemText(e){return this.text_items instanceof Function?this.text_items(e):this.text_items[this.items.indexOf(e)]||"Undefined Text Item"}onChooseItem(e){this.resolve(e)}async openAndGetValue(e,t){this.resolve=e,this.reject=t,this.open()}};var De=X(require("obsidian")),gi=class extends De.Modal{constructor(e,t,r,i,o){super(e);this.text_items=t;this.items=r;this.submitted=!1;this.selectedItems=[];this.setTitle(i),this.listEl=this.contentEl.createDiv("templater-multisuggester-list");let a=this.contentEl.createDiv("templater-multisuggester-div"),l=new De.TextComponent(a);l.inputEl.addClass("templater-multisuggester-input"),this.suggester=new Uo(e,l.inputEl,this.getItemText.bind(this),r,o).onSelect(this.onChooseItem.bind(this));let c=this.contentEl.createDiv("modal-button-container");new De.ButtonComponent(c).setButtonText("Save").setCta().onClick(()=>this.save()),new De.ButtonComponent(c).setButtonText("Cancel").onClick(()=>this.close())}onOpen(){this.display()}display(){this.listEl.empty(),this.selectedItems.forEach(e=>{let t=this.listEl.createDiv("mobile-option-setting-item");t.createSpan("mobile-option-setting-item-name").setText(this.getItemText(e)),t.createDiv("clickable-icon mobile-option-setting-item-option-icon",r=>{(0,De.setIcon)(r,"lucide-x"),r.addEventListener("click",()=>{this.onRemoveItem(e)})})})}getItemText(e){return this.text_items instanceof Function?this.text_items(e):this.text_items[this.items.indexOf(e)]||"Undefined Text Item"}onChooseItem(e){this.selectedItems.push(e);let t=this.items.filter(r=>!this.selectedItems.some(i=>i===r));this.suggester.setItems(t),this.display()}onRemoveItem(e){thi Line truncated
})`)(r,o,i)}catch(c){throw new P(`Failed to load user script at "${e.path}".`,c.message)}let l=i.default??o.exports;if(!l)throw new P(`Failed to load user script at "${e.path}". No exports detected.`);if(typeof l=="function")t.set(e.basename,l);else if(typeof l=="object"&&l!==null){if(!Object.values(l).every(d=>typeof d=="function"))throw new P(`Exported object in "${e.path}" must contain only functions.`);t.set(e.basename,l)}else throw new P(`Invalid export in "${e.path}". Must be a function or object of functions.`)}async generate_object(){let e=await this.generate_user_script_functions();return Object.fromEntries(e)}};var ji=class{constructor(e){this.plugin=e;this.user_system_functions=new xi(e),this.user_script_functions=new yi(e)}async generate_object(e){let t={},r={};return this.plugin.settings.enable_system_commands&&(t=await this.user_system_functions.generate_object(e)),this.plugin.settings.user_scripts_folder&&(r=await this.user_script_functions.generate_object()),{...t,...r}}};var Ks=X(require("obsidian")),Xe;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.USER_INTERNAL=1]="USER_INTERNAL"})(Xe||(Xe={}));var vi=class{constructor(e){this.plugin=e;this.internal_functions=new _i(this.plugin),this.user_functions=new ji(this.plugin)}async init(){await this.internal_functions.init()}async teardown(){await this.internal_functions.teardown()}additional_functions(){return{app:this.plugin.app,obsidian:Ks}}async generate_object(e,t=1){let r={},i=this.additional_functions(),o=await this.internal_functions.generate_object(e),a={};switch(Object.assign(r,i),t){case 0:Object.assign(r,o);break;case 1:a=await this.user_functions.generate_object(e),Object.assign(r,{...o,user:a});break}return r}};var Xs={},M,Ke=new Array(32).fill(void 0);Ke.push(void 0,null,!0,!1);function Pe(n){return Ke[n]}var Dn=Ke.length;function Rs(n){n<36||(Ke[n]=Dn,Dn=n)}function wi(n){let e=Pe(n);return Rs(n),e}var Go=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Go.decode();var _r=new Uint8Array;function xr(){return _r.byteLength===0&&(_r=new Uint8Array(M.memory.buffer)),_r}function bt(n,e){return Go.decode(xr().subarray(n,n+e))}function Et(n){Dn===Ke.length&&Ke.push(Ke.length+1);let e=Dn;return Dn=Ke[e],Ke[e]=n,e}var Re=0,yr=new TextEncoder("utf-8"),Ys=typeof yr.encodeInto=="function"?function(n,e){return yr.encodeInto(n,e)}:function(n,e){let t=yr.encode(n);return e.set(t),{read:n.length,written:t.length}};function gt(n,e,t){if(t===void 0){let l=yr.encode(n),c=e(l.length);return xr().subarray(c,c+l.length).set(l),Re=l.length,c}let r=n.length,i=e(r),o=xr(),a=0;for(;a<r;a++){let l=n.charCodeAt(a);if(l>127)break;o[i+a]=l}if(a!==r){a!==0&&(n=n.slice(a)),i=t(i,r,r=a+n.length*3);let l=xr().subarray(i+a,i+r);a+=Ys(n,l).written}return Re=a,i}function Us(n){return n==null}var jr=new Int32Array;function Ne(){return jr.byteLength===0&&(jr=new Int32Array(M.memory.buffer)),jr}function bi(n){let e=typeof n;if(e=="number"||e=="boolean"||n==null)return`${n}`;if(e=="string")return`"${n}"`;if(e=="symbol"){let i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){let i=n.length,o="[";i>0&&(o+=bi(n[0]));for(let a=1;a<i;a++)o+=", "+bi(n[a]);return o+="]",o}let t=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(t.length>1)r=t[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
${n.stack}`:r}function Gs(n,e){if(!(n instanceof e))throw new Error(`expected instance of ${e.name}`);return n.ptr}var vr=32;function Ws(n){if(vr==1)throw new Error("out of js stack");return Ke[--vr]=n,vr}function Ei(n,e){try{return n.apply(this,e)}catch(t){M.__wbindgen_exn_store(Et(t))}}var Kt=class{static __wrap(e){let t=Object.create(Kt.prototype);return t.ptr=e,t}__destroy_into_raw(){let e=this.ptr;return this.ptr=0,e}free(){let e=this.__destroy_into_raw();M.__wbg_parserconfig_free(e)}get interpolate(){let e=M.__wbg_get_parserconfig_interpolate(this.ptr);return String.fromCodePoint(e)}set interpolate(e){M.__wbg_set_parserconfig_interpolate(this.ptr,e.codePointAt(0))}get execution(){let e=M.__wbg_get_parserconfig_execution(this.ptr);return String.fromCodePoint(e)}set execution(e){M.__wbg_set_parserconfig_execution(this.ptr,e.codePointAt(0))}get single_whitespace(){let e=M.__wbg_get_parserconfig_single_whitespace(this.ptr);return String.fromCodePoint(e)}set single_whitespace(e){M.__wbg_set_parserconfig_single_whitespace(this.ptr,e.codePointAt(0))}get multiple_whitespace(){let e=M.__wbg_get_parserconfig_multiple_whitespace(this.ptr);return String.fromCodePoint(e)}set multiple_whitespace(e){M.__wbg_set_parserconfig_multiple_whitespace(this.ptr,e.codePointAt(0))}constructor(e,t,r,i,o,a,l){let c=gt(e,M.__wbindgen_malloc,M.__wbindgen_realloc),d=Re,m=gt(t,M.__wbindgen_malloc,M.__wbindgen_realloc),_=Re,w=gt(l,M.__wbindgen_malloc,M.__wbindgen_realloc),b=Re,S=M.parserconfig_new(c,d,m,_,r.codePointAt(0),i.codePointAt(0),o.codePointAt(0),a.codePointAt(0),w,b);return Kt.__wrap(S)}get opening_tag(){try{let r=M.__wbindgen_add_to_stack_pointer(-16);M.parserconfig_opening_tag(r,this.ptr);var e=Ne()[r/4+0],t=Ne()[r/4+1];return bt(e,t)}finally{M.__wbindgen_add_to_stack_pointer(16),M.__wbindgen_free(e,t)}}set opening_tag(e){let t=gt(e,M.__wbindgen_malloc,M.__wbindgen_realloc),r=Re;M.parserconfig_set_opening_tag(this.ptr,t,r)}get closing_tag(){try{let r=M.__wbindgen_add_to_stack_pointer(-16);M.parserconfig_closing_tag(r,this.ptr);var e=Ne()[r/4+0],t=Ne()[r/4+1];return bt(e,t)}finally{M.__wbindgen_add_to_stack_pointer(16),M.__wbindgen_free(e,t)}}set closing_tag(e){let t=gt(e,M.__wbindgen_malloc,M.__wbindgen_realloc),r=Re;M.parserconfig_set_closing_tag(this.ptr,t,r)}get global_var(){try{let r=M.__wbindgen_add_to_stack_pointer(-16);M.parserconfig_global_var(r,this.ptr);var e=Ne()[r/4+0],t=Ne()[r/4+1];return bt(e,t)}finally{M.__wbindgen_add_to_stack_pointer(16),M.__wbindgen_free(e,t)}}set global_var(e){let t=gt(e,M.__wbindgen_malloc,M.__wbindgen_realloc),r=Re;M.parserconfig_set_global_var(this.ptr,t,r)}},sn=class{static __wrap(e){let t=Object.create(sn.prototype);return t.ptr=e,t}__destroy_into_raw(){let e=this.ptr;return this.ptr=0,e}free(){let e=this.__destroy_into_raw();M.__wbg_renderer_free(e)}constructor(e){Gs(e,Kt);var t=e.ptr;e.ptr=0;let r=M.renderer_new(t);return sn.__wrap(r)}render_content(e,t){try{let a=M.__wbindgen_add_to_stack_pointer(-16),l=gt(e,M.__wbindgen_malloc,M.__wbindgen_realloc),c=Re;M.renderer_render_content(a,this.ptr,l,c,Ws(t));var r=Ne()[a/4+0],i=Ne()[a/4+1],o=Ne()[a/4+2];if(o)throw wi(i);return wi(r)}finally{M.__wbindgen_add_to_stack_pointer(16),Ke[vr++]=void 0}}};async function Vs(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function zs(){let n={};return n.wbg={},n.wbg.__wbindgen_object_drop_ref=function(e){wi(e)},n.wbg.__wbindgen_string_new=function(e,t){let r=bt(e,t);return Et(r)},n.wbg.__wbindgen_string_get=function(e,t){let r=Pe(t),i=typeof r=="string"?r:void 0;var o=Us(i)?0:gt(i,M.__wbindgen_malloc,M.__wbindgen_realloc),a=Re;Ne()[e/4+1]=a,Ne()[e/4+0]=o},n.wbg.__wbg_call_97ae9d8645dc388b=function(){return Ei(function(e,t){let r=Pe(e).call(Pe(t));return Et(r)},arguments)},n.wbg.__wbg_new_8d2af00bc1e329ee=function(e,t){let r=new Error(bt(e,t));return Et(r)},n.wbg.__wbg_message_fe2af63ccc8985bc=function(e){let t=Pe(e).message;return Et(t)},n.wbg.__wbg_newwithargs_8fe23e3842840c8e=function(e,t,r,i){let o=new Function(bt(e,t),bt(r,i));return Et(o)},n.wbg.__wbg_call_168da88779e35f61=function(){return Ei(function(e,t,r){let i=Pe(e).call(Pe(t),Pe(r));return Et(i)},arguments)},n.wbg.__wbg_call_3999bee59e9f7719=function(){return Ei(function(e,t,r,i){let o=Pe(e).call(Pe(t),Pe(r),Pe(i));return Et(o)},arguments)},n.wbg.__wbindgen_debug_string=function(e,t){let r=bi(Pe(t)),i=gt(r,M.__wbindgen_malloc,M.__wbindgen_realloc),o=Re;Ne Line truncated
`)}catch{console.error("Failed to parse summary section")}}function as(n){if(!n)return"";try{return n.content.nodes[0].getChildNodes()[0].text.trim()}catch{return""}}function ss(n){try{return n.blocks.map(r=>{let i=r.parameterName,o=r.content.getChildNodes()[0].getChildNodes().filter(a=>a instanceof Ve).map(a=>a.text).join(" ");return new Ur(i,o)})}catch{return[]}}function Ot(n,e,t){if(t<0||t===n.length)return;let r=n[e];n[e]=n[t],n[t]=r}function vt(n){return n.workspace.activeEditor?.file??n.workspace.getActiveFile()}function lo(n){let e=n.lastIndexOf("/");return e!==-1?n.slice(0,e):""}function jn(n){return n!==null&&typeof n=="object"}function po(n){let e=n.toString(),t=e.indexOf("(");return e.substring(t+1,e.indexOf(")")).replace(/ /g,"").split(",")}function Gr(n,e,t){let r=n instanceof HTMLOListElement?"li":"p",i=n.createEl(r),o=n.createEl("b",{text:e});return i.appendChild(o),i.appendChild(document.createTextNode(`: ${t}`)),i}function ur(n,e){if(Object.keys(e).length!==0){for(let t in e)if(e.hasOwnProperty(t))if(n.hasOwnProperty(t)){let r=n[t],i=e[t];if(Array.isArray(r)||Array.isArray(i)){let o=Array.isArray(r)?r:[r],a=Array.isArray(i)?i:[i];n[t]=o.concat(a).unique()}else jn(r)&&jn(i)?ur(r,i):i!=null&&i!==""&&(n[t]=i)}else n[t]=e[t]}}function vn(n){let e={},t=(0,Te.getFrontMatterInfo)(n);return t.frontmatter&&(e=(0,Te.parseYaml)(t.frontmatter)),{frontmatter:e,content:n.slice(t.contentStart)}}var Bo=X(require("obsidian"));var Mo=X(require("obsidian"));var ie="top",ue="bottom",ce="right",ae="left",fr="auto",wt=[ie,ue,ce,ae],pt="start",Bt="end",uo="clippingParents",dr="viewport",Zt="popper",fo="reference",Wr=wt.reduce(function(n,e){return n.concat([e+"-"+pt,e+"-"+Bt])},[]),mr=[].concat(wt,[fr]).reduce(function(n,e){return n.concat([e,e+"-"+pt,e+"-"+Bt])},[]),cs="beforeRead",ls="read",ps="afterRead",us="beforeMain",fs="main",ds="afterMain",ms="beforeWrite",gs="write",hs="afterWrite",mo=[cs,ls,ps,us,fs,ds,ms,gs,hs];function me(n){return n?(n.nodeName||"").toLowerCase():null}function Z(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function Me(n){var e=Z(n).Element;return n instanceof e||n instanceof Element}function fe(n){var e=Z(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function en(n){if(typeof ShadowRoot=="undefined")return!1;var e=Z(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function As(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var r=e.styles[t]||{},i=e.attributes[t]||{},o=e.elements[t];!fe(o)||!me(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var l=i[a];l===!1?o.removeAttribute(a):o.setAttribute(a,l===!0?"":l)}))})}function _s(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:t[r]),l=a.reduce(function(c,d){return c[d]="",c},{});!fe(i)||!me(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}var go={name:"applyStyles",enabled:!0,phase:"write",fn:As,effect:_s,requires:["computeStyles"]};function ge(n){return n.split("-")[0]}var qe=Math.max,It=Math.min,ut=Math.round;function tn(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function wn(){return!/^((?!chrome|android).)*safari/i.test(tn())}function Oe(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=n.getBoundingClientRect(),i=1,o=1;e&&fe(n)&&(i=n.offsetWidth>0&&ut(r.width)/n.offsetWidth||1,o=n.offsetHeight>0&&ut(r.height)/n.offsetHeight||1);var a=Me(n)?Z(n):window,l=a.visualViewport,c=!wn()&&t,d=(r.left+(c&&l?l.offsetLeft:0))/i,m=(r.top+(c&&l?l.offsetTop:0))/o,_=r.width/i,w=r.height/o;return{width:_,height:w,top:m,right:d+_,bottom:m+w,left:d,x:d,y:m}}function Ft(n){var e=Oe(n),t=n.offsetWidth,r=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:r}}function bn(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&en(t)){var r=e;do{if(r&&n.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function we(n){return Z(n).getComputedStyle(n)}function Vr(n){return["table","td","th"].indexOf(me(n))>=0}function Ae(n){return((Me(n)?n.ownerDocument:n.document)||window.document).documentElement}function ft(n){return me(n)==="html"?n:n.assignedSlot||n.parentNode||(en(n)?n.host:null)||Ae(n)}function ho(n){return!fe(n)||we(n).position==="fixed"?null:n.offsetParent}function xs(n){var e=/firefox/i.test(tn()),t=/Trident/i.test(tn());if(t&&fe(n)){var r=we(n);if(r.position==="fixed")return nu Line truncated
> \u2014 ${o}`}catch{return new P("Error generating daily quote"),"Error generating daily quote"}}}generate_random_picture(){return async(e,t,r=!1)=>{try{let i=await this.getRequest(`https://templater-unsplash-2.fly.dev/${t?"?q="+t:""}`).then(a=>a.json),o=i.full;if(e&&!r)if(e.includes("x")){let[a,l]=e.split("x");o=o.concat(`&w=${a}&h=${l}`)}else o=o.concat(`&w=${e}`);return r?`![photo by ${i.photog}(${i.photogUrl}) on Unsplash|${e}](${o})`:`![photo by ${i.photog}(${i.photogUrl}) on Unsplash](${o})`}catch{return new P("Error generating random picture"),"Error generating random picture"}}}generate_request(){return async(e,t)=>{try{let i=await(await this.getRequest(e)).json;return t&&i?t.split(".").reduce((o,a)=>{if(o&&o.hasOwnProperty(a))return o[a];throw new Error(`Path ${t} not found in the JSON response`)},i):i}catch(r){throw console.error(r),new P("Error fetching and extracting value")}}}};var fi=class extends be{constructor(){super(...arguments);this.name="hooks";this.event_refs=[]}async create_static_templates(){this.static_functions.set("on_all_templates_executed",this.generate_on_all_templates_executed())}async create_dynamic_templates(){}async teardown(){this.event_refs.forEach(e=>{e.e.offref(e)}),this.event_refs=[]}generate_on_all_templates_executed(){return e=>{let t=this.plugin.app.workspace.on("templater:all-templates-executed",async()=>{await jt(1),e()});t&&this.event_refs.push(t)}}};var di=class extends be{constructor(){super(...arguments);this.name="frontmatter"}async create_static_templates(){}async create_dynamic_templates(){let e=this.plugin.app.metadataCache.getFileCache(this.config.target_file);this.dynamic_functions=new Map(Object.entries(e?.frontmatter||{}))}async teardown(){}};var Qe=X(require("obsidian"));var mi=class extends Qe.Modal{constructor(e,t,r,i){super(e);this.prompt_text=t;this.default_value=r;this.multi_line=i;this.submitted=!1}onOpen(){this.titleEl.setText(this.prompt_text),this.createForm()}onClose(){this.contentEl.empty(),this.submitted||this.reject(new P("Cancelled prompt"))}createForm(){let e=this.contentEl.createDiv();e.addClass("templater-prompt-div");let t;this.multi_line?t=new Qe.TextAreaComponent(e):t=new Qe.TextComponent(e);let r=this.contentEl.createDiv();r.addClass("templater-button-div");let i=new Qe.ButtonComponent(r);i.buttonEl.addClass("mod-cta"),i.setButtonText("Submit").onClick(o=>{this.resolveAndClose(o)}),this.value=this.default_value??"",t.inputEl.addClass("templater-prompt-input"),t.setPlaceholder("Type text here"),t.setValue(this.value),t.onChange(o=>this.value=o),t.inputEl.focus(),t.inputEl.addEventListener("keydown",o=>this.enterCallback(o))}enterCallback(e){e.isComposing||e.keyCode===229||(this.multi_line?Qe.Platform.isDesktop&&e.key==="Enter"&&!e.shiftKey&&this.resolveAndClose(e):e.key==="Enter"&&this.resolveAndClose(e))}resolveAndClose(e){this.submitted=!0,e.preventDefault(),this.resolve(this.value),this.close()}async openAndGetValue(e,t){this.resolve=e,this.reject=t,this.open()}};var Uo=X(require("obsidian")),gi=class extends Uo.FuzzySuggestModal{constructor(e,t,r,i,o){super(e);this.text_items=t;this.items=r;this.submitted=!1;this.setPlaceholder(i),o&&(this.limit=o)}getItems(){return this.items}onClose(){this.submitted||this.reject(new P("Cancelled prompt"))}selectSuggestion(e,t){this.submitted=!0,this.close(),this.onChooseSuggestion(e,t)}getItemText(e){return this.text_items instanceof Function?this.text_items(e):this.text_items[this.items.indexOf(e)]||"Undefined Text Item"}onChooseItem(e){this.resolve(e)}async openAndGetValue(e,t){this.resolve=e,this.reject=t,this.open()}};var De=X(require("obsidian")),hi=class extends De.Modal{constructor(e,t,r,i,o){super(e);this.text_items=t;this.items=r;this.submitted=!1;this.selectedItems=[];this.setTitle(i),this.listEl=this.contentEl.createDiv("templater-multisuggester-list");let a=this.contentEl.createDiv("templater-multisuggester-div"),l=new De.TextComponent(a);l.inputEl.addClass("templater-multisuggester-input"),this.suggester=new Go(e,l.inputEl,this.getItemText.bind(this),r,o).onSelect(this.onChooseItem.bind(this));let c=this.contentEl.createDiv("modal-button-container");new De.ButtonComponent(c).setButtonText("Save").setCta().onClick(()=>this.save()),new De.ButtonComponent(c).setButtonText("Cancel").onClick(()=>this.close())}onOpen(){this.display()}display(){this.listEl.empty(),this.selectedItems.forEach(e=>{let t=this.listEl.createDiv("mobile-option-setting-item");t.createSpan("mobile-option-setting-item-name").setText(this.getItemText(e)),t.createDiv("clickable-icon mobile-option-setting-item-option-icon",r=>{(0,De.setIcon)(r,"lucide-x"),r.addEventListener("click",()=>{this.onRemoveItem(e)})})})}getItemText(e){return this.text_items instanceof Function?this.text_items(e):this.text_items[this.items.indexOf(e)]||"Undefined Text Item"}onChooseItem(e){this.selectedItems.push(e);let t=this.items.filter(r=>!this.selectedItems.some(i=>i===r));this.suggester.setItems(t),this.display()}onRemoveItem(e){thi Line truncated
})`)(r,o,i)}catch(c){throw new P(`Failed to load user script at "${e.path}".`,c.message)}let l=i.default??o.exports;if(!l)throw new P(`Failed to load user script at "${e.path}". No exports detected.`);if(typeof l=="function")t.set(e.basename,l);else if(typeof l=="object"&&l!==null){if(!Object.values(l).every(d=>typeof d=="function"))throw new P(`Exported object in "${e.path}" must contain only functions.`);t.set(e.basename,l)}else throw new P(`Invalid export in "${e.path}". Must be a function or object of functions.`)}async generate_object(){let e=await this.generate_user_script_functions();return Object.fromEntries(e)}};var vi=class{constructor(e){this.plugin=e;this.user_system_functions=new yi(e),this.user_script_functions=new ji(e)}async generate_object(e){let t={},r={};return this.plugin.settings.enable_system_commands&&(t=await this.user_system_functions.generate_object(e)),this.plugin.settings.user_scripts_folder&&(r=await this.user_script_functions.generate_object()),{...t,...r}}};var Ks=X(require("obsidian")),Xe;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.USER_INTERNAL=1]="USER_INTERNAL"})(Xe||(Xe={}));var wi=class{constructor(e){this.plugin=e;this.internal_functions=new xi(this.plugin),this.user_functions=new vi(this.plugin)}async init(){await this.internal_functions.init()}async teardown(){await this.internal_functions.teardown()}additional_functions(){return{app:this.plugin.app,obsidian:Ks}}async generate_object(e,t=1){let r={},i=this.additional_functions(),o=await this.internal_functions.generate_object(e),a={};switch(Object.assign(r,i),t){case 0:Object.assign(r,o);break;case 1:a=await this.user_functions.generate_object(e),Object.assign(r,{...o,user:a});break}return r}};var Xs={},M,Ke=new Array(32).fill(void 0);Ke.push(void 0,null,!0,!1);function Pe(n){return Ke[n]}var Nn=Ke.length;function Rs(n){n<36||(Ke[n]=Nn,Nn=n)}function bi(n){let e=Pe(n);return Rs(n),e}var Wo=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Wo.decode();var xr=new Uint8Array;function yr(){return xr.byteLength===0&&(xr=new Uint8Array(M.memory.buffer)),xr}function Et(n,e){return Wo.decode(yr().subarray(n,n+e))}function Tt(n){Nn===Ke.length&&Ke.push(Ke.length+1);let e=Nn;return Nn=Ke[e],Ke[e]=n,e}var Re=0,jr=new TextEncoder("utf-8"),Ys=typeof jr.encodeInto=="function"?function(n,e){return jr.encodeInto(n,e)}:function(n,e){let t=jr.encode(n);return e.set(t),{read:n.length,written:t.length}};function gt(n,e,t){if(t===void 0){let l=jr.encode(n),c=e(l.length);return yr().subarray(c,c+l.length).set(l),Re=l.length,c}let r=n.length,i=e(r),o=yr(),a=0;for(;a<r;a++){let l=n.charCodeAt(a);if(l>127)break;o[i+a]=l}if(a!==r){a!==0&&(n=n.slice(a)),i=t(i,r,r=a+n.length*3);let l=yr().subarray(i+a,i+r);a+=Ys(n,l).written}return Re=a,i}function Us(n){return n==null}var vr=new Int32Array;function Ne(){return vr.byteLength===0&&(vr=new Int32Array(M.memory.buffer)),vr}function Ei(n){let e=typeof n;if(e=="number"||e=="boolean"||n==null)return`${n}`;if(e=="string")return`"${n}"`;if(e=="symbol"){let i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){let i=n.length,o="[";i>0&&(o+=Ei(n[0]));for(let a=1;a<i;a++)o+=", "+Ei(n[a]);return o+="]",o}let t=/\[object ([^\]]+)\]/.exec(toString.call(n)),r;if(t.length>1)r=t[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
${n.stack}`:r}function Gs(n,e){if(!(n instanceof e))throw new Error(`expected instance of ${e.name}`);return n.ptr}var wr=32;function Ws(n){if(wr==1)throw new Error("out of js stack");return Ke[--wr]=n,wr}function Ti(n,e){try{return n.apply(this,e)}catch(t){M.__wbindgen_exn_store(Tt(t))}}var Rt=class{static __wrap(e){let t=Object.create(Rt.prototype);return t.ptr=e,t}__destroy_into_raw(){let e=this.ptr;return this.ptr=0,e}free(){let e=this.__destroy_into_raw();M.__wbg_parserconfig_free(e)}get interpolate(){let e=M.__wbg_get_parserconfig_interpolate(this.ptr);return String.fromCodePoint(e)}set interpolate(e){M.__wbg_set_parserconfig_interpolate(this.ptr,e.codePointAt(0))}get execution(){let e=M.__wbg_get_parserconfig_execution(this.ptr);return String.fromCodePoint(e)}set execution(e){M.__wbg_set_parserconfig_execution(this.ptr,e.codePointAt(0))}get single_whitespace(){let e=M.__wbg_get_parserconfig_single_whitespace(this.ptr);return String.fromCodePoint(e)}set single_whitespace(e){M.__wbg_set_parserconfig_single_whitespace(this.ptr,e.codePointAt(0))}get multiple_whitespace(){let e=M.__wbg_get_parserconfig_multiple_whitespace(this.ptr);return String.fromCodePoint(e)}set multiple_whitespace(e){M.__wbg_set_parserconfig_multiple_whitespace(this.ptr,e.codePointAt(0))}constructor(e,t,r,i,o,a,l){let c=gt(e,M.__wbindgen_malloc,M.__wbindgen_realloc),d=Re,m=gt(t,M.__wbindgen_malloc,M.__wbindgen_realloc),_=Re,w=gt(l,M.__wbindgen_malloc,M.__wbindgen_realloc),b=Re,S=M.parserconfig_new(c,d,m,_,r.codePointAt(0),i.codePointAt(0),o.codePointAt(0),a.codePointAt(0),w,b);return Rt.__wrap(S)}get opening_tag(){try{let r=M.__wbindgen_add_to_stack_pointer(-16);M.parserconfig_opening_tag(r,this.ptr);var e=Ne()[r/4+0],t=Ne()[r/4+1];return Et(e,t)}finally{M.__wbindgen_add_to_stack_pointer(16),M.__wbindgen_free(e,t)}}set opening_tag(e){let t=gt(e,M.__wbindgen_malloc,M.__wbindgen_realloc),r=Re;M.parserconfig_set_opening_tag(this.ptr,t,r)}get closing_tag(){try{let r=M.__wbindgen_add_to_stack_pointer(-16);M.parserconfig_closing_tag(r,this.ptr);var e=Ne()[r/4+0],t=Ne()[r/4+1];return Et(e,t)}finally{M.__wbindgen_add_to_stack_pointer(16),M.__wbindgen_free(e,t)}}set closing_tag(e){let t=gt(e,M.__wbindgen_malloc,M.__wbindgen_realloc),r=Re;M.parserconfig_set_closing_tag(this.ptr,t,r)}get global_var(){try{let r=M.__wbindgen_add_to_stack_pointer(-16);M.parserconfig_global_var(r,this.ptr);var e=Ne()[r/4+0],t=Ne()[r/4+1];return Et(e,t)}finally{M.__wbindgen_add_to_stack_pointer(16),M.__wbindgen_free(e,t)}}set global_var(e){let t=gt(e,M.__wbindgen_malloc,M.__wbindgen_realloc),r=Re;M.parserconfig_set_global_var(this.ptr,t,r)}},sn=class{static __wrap(e){let t=Object.create(sn.prototype);return t.ptr=e,t}__destroy_into_raw(){let e=this.ptr;return this.ptr=0,e}free(){let e=this.__destroy_into_raw();M.__wbg_renderer_free(e)}constructor(e){Gs(e,Rt);var t=e.ptr;e.ptr=0;let r=M.renderer_new(t);return sn.__wrap(r)}render_content(e,t){try{let a=M.__wbindgen_add_to_stack_pointer(-16),l=gt(e,M.__wbindgen_malloc,M.__wbindgen_realloc),c=Re;M.renderer_render_content(a,this.ptr,l,c,Ws(t));var r=Ne()[a/4+0],i=Ne()[a/4+1],o=Ne()[a/4+2];if(o)throw bi(i);return bi(r)}finally{M.__wbindgen_add_to_stack_pointer(16),Ke[wr++]=void 0}}};async function Vs(n,e){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,e)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}else{let t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}function zs(){let n={};return n.wbg={},n.wbg.__wbindgen_object_drop_ref=function(e){bi(e)},n.wbg.__wbindgen_string_new=function(e,t){let r=Et(e,t);return Tt(r)},n.wbg.__wbindgen_string_get=function(e,t){let r=Pe(t),i=typeof r=="string"?r:void 0;var o=Us(i)?0:gt(i,M.__wbindgen_malloc,M.__wbindgen_realloc),a=Re;Ne()[e/4+1]=a,Ne()[e/4+0]=o},n.wbg.__wbg_call_97ae9d8645dc388b=function(){return Ti(function(e,t){let r=Pe(e).call(Pe(t));return Tt(r)},arguments)},n.wbg.__wbg_new_8d2af00bc1e329ee=function(e,t){let r=new Error(Et(e,t));return Tt(r)},n.wbg.__wbg_message_fe2af63ccc8985bc=function(e){let t=Pe(e).message;return Tt(t)},n.wbg.__wbg_newwithargs_8fe23e3842840c8e=function(e,t,r,i){let o=new Function(Et(e,t),Et(r,i));return Tt(o)},n.wbg.__wbg_call_168da88779e35f61=function(){return Ti(function(e,t,r){let i=Pe(e).call(Pe(t),Pe(r));return Tt(i)},arguments)},n.wbg.__wbg_call_3999bee59e9f7719=function(){return Ti(function(e,t,r,i){let o=Pe(e).call(Pe(t),Pe(r),Pe(i));return Tt(o)},arguments)},n.wbg.__wbindgen_debug_string=function(e,t){let r=Ei(Pe(t)),i=gt(r,M.__wbindgen_malloc,M.__wbindgen_realloc),o=Re;Ne Line truncated
${(0,de.stringifyYaml)(b)}---
`),_+=w+d,o.editor.setValue(_),o.editor.setSelection({line:0,ch:0},{line:0,ch:0}),await jt(100),await i.save()}else await this.plugin.app.vault.process(t,_=>{let w="",{content:b,frontmatter:S}=yn(_);return pr(S,m),Object.keys(S).length>0&&(w+=`---
`),_+=w+d,o.editor.setValue(_),o.editor.setSelection({line:0,ch:0},{line:0,ch:0}),await jt(100),await i.save()}else await this.plugin.app.vault.process(t,_=>{let w="",{content:b,frontmatter:S}=vn(_);return ur(S,m),Object.keys(S).length>0&&(w+=`---
${(0,de.stringifyYaml)(S)}---
`),w+=b+d,c=w,w});this.plugin.app.workspace.trigger("templater:new-note-from-template",{file:t,content:c}),await this.plugin.editor_handler.jump_to_next_cursor_location(t,!0),await this.end_templater_task(r)}overwrite_active_file_commands(){let e=this.plugin.app.workspace.activeEditor;if(!e||!e.file){oe(new P("Active editor is null, can't overwrite content"));return}this.overwrite_file_commands(e.file,!0)}async overwrite_file_commands(e,t=!1){let{path:r}=e;this.start_templater_task(r);let i=this.create_running_config(e,e,t?3:2),o=await Se(async()=>this.read_and_parse_template(i),"Template parsing error, aborting.");if(o==null){await this.end_templater_task(r);return}await this.plugin.app.vault.modify(e,o),this.plugin.app.workspace.trigger("templater:overwrite-file",{file:e,content:o}),await this.plugin.editor_handler.jump_to_next_cursor_location(e,!0),await this.end_templater_task(r)}async process_dynamic_templates(e,t){let r=ao(),i=document.createNodeIterator(e,NodeFilter.SHOW_TEXT),o,a=!1,l;for(;o=i.nextNode();){let c=o.nodeValue;if(c!==null){let d=r.exec(c);if(d!==null){let m=this.plugin.app.metadataCache.getFirstLinkpathDest("",t.sourcePath);if(!m||!(m instanceof de.TFile))return;if(!a){a=!0;let _=this.create_running_config(m,m,4);l=await this.functions_generator.generate_object(_,Xe.USER_INTERNAL),this.current_functions_object=l}}for(;d!=null;){let m=d[1]+d[2],_=await Se(async()=>await this.parser.parse_commands(m,l),`Command Parsing error in dynamic command '${m}'`);if(_==null)return;let w=r.lastIndex-d[0].length,b=r.lastIndex;c=c.substring(0,w)+_+c.substring(b),r.lastIndex+=_.length-d[0].length,d=r.exec(c)}o.nodeValue=c}}}get_new_file_template_for_folder(e){do{let t=this.plugin.settings.folder_templates.find(r=>r.folder==e.path);if(t&&t.template)return t.template;e=e.parent}while(e)}get_new_file_template_for_file(e){let t=this.plugin.settings.file_templates.find(r=>new RegExp(r.regex).test(e.path));if(t&&t.template)return t.template}static async on_file_creation(e,t,r){if(!(r instanceof de.TFile)||r.extension!=="md")return;let i=(0,de.normalizePath)(e.plugin.settings.templates_folder);if(r.path.includes(i)&&i!=="/"||(await jt(300),e.files_with_pending_templates.has(r.path)))return;let o=await t.vault.read(r),a=(0,de.getFrontMatterInfo)(o),l=o.length-a.contentStart;if(l==0&&e.plugin.settings.enable_folder_templates){let c=e.get_new_file_template_for_folder(r.parent);if(!c)return;let d=await Se(async()=>Nt(t,c),`Couldn't find template ${c}`);if(d==null)return;await e.write_template_to_file(d,r)}else if(l==0&&e.plugin.settings.enable_file_templates){let c=e.get_new_file_template_for_file(r);if(!c)return;let d=await Se(async()=>Nt(t,c),`Couldn't find template ${c}`);if(d==null)return;await e.write_template_to_file(d,r)}else{let c=1e5;r.stat.size<=c?await e.overwrite_file_commands(r):console.log(`Templater skipped parsing ${r.path} because file size exceeds ${c}`)}}async execute_startup_scripts(){for(let e of this.plugin.settings.startup_templates){if(!e)continue;let t=Ce(()=>Nt(this.plugin.app,e),`Couldn't find startup template "${e}"`);if(!t)continue;let{path:r}=t;this.start_templater_task(r);let i=this.create_running_config(t,t,5);await Se(async()=>this.read_and_parse_template(i),"Startup Template parsing error, aborting."),await this.end_templater_task(r)}}};var Jo=X(require("obsidian")),wr=class{constructor(e,t,r){this.plugin=e;this.templater=t;this.settings=r}setup(){Array.isArray(this.plugin.app.workspace.onLayoutReadyCallbacks)?this.plugin.app.workspace.onLayoutReadyCallbacks.unshift({pluginId:this.plugin.manifest.id,callback:()=>{this.update_trigger_file_on_creation()}}):this.plugin.app.workspace.onLayoutReady(()=>{this.update_trigger_file_on_creation()}),this.update_syntax_highlighting(),this.update_file_menu()}update_syntax_highlighting(){let e=this.plugin.editor_handler.desktopShouldHighlight(),t=this.plugin.editor_handler.mobileShouldHighlight();e||t?this.plugin.editor_handler.enable_highlighter():this.plugin.editor_handler.disable_highlighter()}update_trigger_file_on_creation(){this.settings.trigger_on_file_creation?(this.trigger_on_file_creation_event=this.plugin.app.vault.on("create",e=>Pn.on_file_creation(this.templater,this.plugin.app,e)),this.plugin.registerEvent(this.trigger_on_file_creation_event)):this.trigger_on_file_creation_event&&(this.plugin.app.vault.offref(this.trigger_on_file_creation_event),this.trigger_on_file_creation_event=void 0)}update_file_menu(){this.plugin.registerEvent(this.plugin.app.workspace.on("file-menu",(e,t)=>{t instanceof Jo.TFolder&&e.addItem(r=>{r.setTitle("Create new note from template").setIcon("templater-icon").onClick(()=>{this.plugin.fuzzy_suggester.create_new_note_from_template(t)})})}))}};var br=X(require("obsidian"));var ki=class{constructor(e){this.plugin=e}setup(){this.plugin.addCommand({id:"insert-templater",name:"Open insert template modal",icon:"templater-icon",hotkeys:br.Platform.isMacOS?void 0:[{modifiers:["Alt"],key:"e"}],callback:()=>{thi Line truncated
`),w+=b+d,c=w,w});this.plugin.app.workspace.trigger("templater:new-note-from-template",{file:t,content:c}),await this.plugin.editor_handler.jump_to_next_cursor_location(t,!0),await this.end_templater_task(r)}overwrite_active_file_commands(){let e=this.plugin.app.workspace.activeEditor;if(!e||!e.file){oe(new P("Active editor is null, can't overwrite content"));return}this.overwrite_file_commands(e.file,!0)}async overwrite_file_commands(e,t=!1){let{path:r}=e;this.start_templater_task(r);let i=this.create_running_config(e,e,t?3:2),o=await Se(async()=>this.read_and_parse_template(i),"Template parsing error, aborting.");if(o==null){await this.end_templater_task(r);return}await this.plugin.app.vault.modify(e,o),this.plugin.app.workspace.trigger("templater:overwrite-file",{file:e,content:o}),await this.plugin.editor_handler.jump_to_next_cursor_location(e,!0),await this.end_templater_task(r)}async process_dynamic_templates(e,t){let r=so(),i=document.createNodeIterator(e,NodeFilter.SHOW_TEXT),o,a=!1,l;for(;o=i.nextNode();){let c=o.nodeValue;if(c!==null){let d=r.exec(c);if(d!==null){let m=this.plugin.app.metadataCache.getFirstLinkpathDest("",t.sourcePath);if(!m||!(m instanceof de.TFile))return;if(!a){a=!0;let _=this.create_running_config(m,m,4);l=await this.functions_generator.generate_object(_,Xe.USER_INTERNAL),this.current_functions_object=l}}for(;d!=null;){let m=d[1]+d[2],_=await Se(async()=>await this.parser.parse_commands(m,l),`Command Parsing error in dynamic command '${m}'`);if(_==null)return;let w=r.lastIndex-d[0].length,b=r.lastIndex;c=c.substring(0,w)+_+c.substring(b),r.lastIndex+=_.length-d[0].length,d=r.exec(c)}o.nodeValue=c}}}get_new_file_template_for_folder(e){do{let t=this.plugin.settings.folder_templates.find(r=>r.folder==e.path);if(t&&t.template)return t.template;e=e.parent}while(e)}get_new_file_template_for_file(e){let t=this.plugin.settings.file_templates.find(r=>new RegExp(r.regex).test(e.path));if(t&&t.template)return t.template}static async on_file_creation(e,t,r){if(!(r instanceof de.TFile)||r.extension!=="md")return;let i=(0,de.normalizePath)(e.plugin.settings.templates_folder);if(r.path.includes(i)&&i!=="/"||(await jt(300),e.files_with_pending_templates.has(r.path)))return;let o=await t.vault.read(r),a=(0,de.getFrontMatterInfo)(o),l=o.length-a.contentStart;if(l==0&&e.plugin.settings.enable_folder_templates){let c=e.get_new_file_template_for_folder(r.parent);if(!c)return;let d=await Se(async()=>Mt(t,c),`Couldn't find template ${c}`);if(d==null)return;await e.write_template_to_file(d,r)}else if(l==0&&e.plugin.settings.enable_file_templates){let c=e.get_new_file_template_for_file(r);if(!c)return;let d=await Se(async()=>Mt(t,c),`Couldn't find template ${c}`);if(d==null)return;await e.write_template_to_file(d,r)}else{let c=1e5;r.stat.size<=c?await e.overwrite_file_commands(r):console.log(`Templater skipped parsing ${r.path} because file size exceeds ${c}`)}}async execute_startup_scripts(){for(let e of this.plugin.settings.startup_templates){if(!e)continue;let t=Ce(()=>Mt(this.plugin.app,e),`Couldn't find startup template "${e}"`);if(!t)continue;let{path:r}=t;this.start_templater_task(r);let i=this.create_running_config(t,t,5);await Se(async()=>this.read_and_parse_template(i),"Startup Template parsing error, aborting."),await this.end_templater_task(r)}}};var ln=X(require("obsidian"));var br=class{constructor(e,t,r){this.plugin=e;this.templater=t;this.settings=r}setup(){this.plugin.app.workspace.onLayoutReady(()=>{if(this.settings.trigger_on_file_creation&&this.plugin.app.vault.getConfig("openBehavior")==="daily"){let t=this.plugin.app.internalPlugins.getEnabledPluginById("daily-notes");if(t){let{folder:r,format:i}=t.options,o=(0,ln.normalizePath)(`${r}/${(0,ln.moment)().format(i)}.md`),a=vt(this.plugin.app);a?.path===o&&cn.on_file_creation(this.templater,this.plugin.app,a)}}this.update_trigger_file_on_creation()}),this.update_syntax_highlighting(),this.update_file_menu()}update_syntax_highlighting(){let e=this.plugin.editor_handler.desktopShouldHighlight(),t=this.plugin.editor_handler.mobileShouldHighlight();e||t?this.plugin.editor_handler.enable_highlighter():this.plugin.editor_handler.disable_highlighter()}update_trigger_file_on_creation(){this.settings.trigger_on_file_creation?(this.trigger_on_file_creation_event=this.plugin.app.vault.on("create",e=>cn.on_file_creation(this.templater,this.plugin.app,e)),this.plugin.registerEvent(this.trigger_on_file_creation_event)):this.trigger_on_file_creation_event&&(this.plugin.app.vault.offref(this.trigger_on_file_creation_event),this.trigger_on_file_creation_event=void 0)}update_file_menu(){this.plugin.registerEvent(this.plugin.app.workspace.on("file-menu",(e,t)=>{t instanceof ln.TFolder&&e.addItem(r=>{r.setTitle("Create new note from template").setIcon("templater-icon").onClick(()=>{this.plugin.fuzzy_suggester.create_new_note_from_template(t)})})}))}};var Er=X(require("obsidian"));var Si=class{constructor(e){this.plugin=e}setup(){this.plugin.addCommand( Line truncated
`,a+1))!==-1;i++,o=a);o+=1;let l=e.slice(o,t).length;return{line:i,ch:l}}get_cursor_matches_and_positions(e){let t=/<%\s*tp\.file\.cursor\((?<order>[0-9]*)\)\s*%>/g,r=Array.from(e.matchAll(t));if(r.length===0)return{};r.sort((d,m)=>Number(d.groups?.order||0)-Number(m.groups?.order||0));let i=r[0][0],o=r.filter(d=>d[0]===i),a=o[0][1]===""?[o[0]]:o,l=[],c=0;for(let d of a){let m=d.index-c;l.push(this.get_editor_position_from_index(e,m)),e=e.slice(0,m)+e.slice(m+d[0].length),c+=d[0].length}return{cursor_matches:a,positions:l}}};var ea=X(require("obsidian"));var ec={app:{name:"app",description:"This module exposes the app instance. Prefer to use this over the global app instance."},user:{name:"user",description:"This module exposes custom made scripts, written by yourself within the script file folder location"},config:{name:"config",description:`This module exposes Templater's running configuration.
This is mostly useful when writing scripts requiring some context information.
@@ -40,6 +40,6 @@ selected value: <% selectedValue %>`}]},multi_suggester:{name:"multi_suggester",
let selectedValues = await tp.system.multi_suggester(["Happy", "Sad", "Confused"], ["Happy", "Sad", "Confused"]);
%>
# <% selectedValues %>
selected values: <% selectedValues %>`}]}}},web:{name:"web",description:"This modules contains every internal function related to the web (making web requests).",functions:{daily_quote:{name:"daily_quote",description:"Retrieves and parses the daily quote from `https://github.com/Zachatoo/quotes-database` as a callout.",definition:"tp.web.daily_quote()",examples:[{name:"Daily quote",example:"<% await tp.web.daily_quote() %>"}]},random_picture:{name:"random_picture",description:"Gets a random image from `https://unsplash.com/`.",definition:"tp.web.random_picture(size?: string, query?: string, include_size?: boolean)",args:[{name:"size",description:"Image size in the format `<width>x<height>`."},{name:"query",description:"Limits selection to photos matching a search term. Multiple search terms can be passed separated by a comma."},{name:"include_size",description:"Optional argument to include the specified size in the image link markdown. Defaults to false."}],examples:[{name:"Random picture",example:"<% await tp.web.random_picture() %>"},{name:"Random picture with size",example:'<% await tp.web.random_picture("200x200") %>'},{name:"Random picture with size and query",example:'<% await tp.web.random_picture("200x200", "landscape,water") %>'}]},request:{name:"request",description:"Makes a HTTP request to the specified URL. Optionally, you can specify a path to extract specific data from the response.",definition:"tp.web.request(url: string, path?: string)",args:[{name:"url",description:"The URL to which the HTTP request will be made."},{name:"path",description:"A path within the response JSON to extract specific data."}],examples:[{name:"Simple request",example:'<% await tp.web.request("https://jsonplaceholder.typicode.com/todos/1") %>'},{name:"Request with path",example:'<% await tp.web.request("https://jsonplaceholder.typicode.com/todos", "0.title") %>'}]}}}},Xo={tp:ec};var tc=["app","config","date","file","frontmatter","hooks","obsidian","system","user","web"],nc=new Set(tc);function Zo(n){return typeof n=="string"&&nc.has(n)}function Di(n){return!!(n.definition||n.returns||n.args)}var Pi=class{constructor(e){this.plugin=e;this.documentation=Xo}get_all_modules_documentation(){let e=this.documentation.tp;return(!this.plugin.settings||!this.plugin.settings.user_scripts_folder)&&(e=Object.values(e).filter(t=>t.name!=="user")),Object.values(e).map(t=>(t.queryKey=t.name,t))}async get_all_functions_documentation(e,t){if(e==="app")return this.get_app_functions_documentation(this.plugin.app,t);if(e==="user"){if(!this.plugin.settings||!this.plugin.settings.user_scripts_folder)return;let r=await Se(async()=>{let i=Je(this.plugin.app,this.plugin.settings.user_scripts_folder).filter(a=>a.extension=="js");return await so(this.plugin.app,i)},"User Scripts folder doesn't exist");return!r||r.length===0?void 0:r.reduce((i,o)=>o.extension!=="js"?i:[...i,{name:o.basename,queryKey:o.basename,definition:"",description:o.description,returns:o.returns,args:o.arguments.reduce((l,c)=>(l[c.name]={name:c.name,description:c.description},l),{}),example:""}],[])}if(!!this.documentation.tp[e].functions)return Object.values(this.documentation.tp[e].functions).map(r=>(r.queryKey=r.name,r))}get_app_functions_documentation(e,t){if(!xn(e))return[];let r=t.split(".");if(r.length===0)return[];let i=e;for(let c=0;c<r.length-1;c++){let d=r[c];if(d in i){if(!xn(i[d]))return[];i=i[d]}}let o=["tp","app",...r.slice(0,r.length-1)].join("."),a=r.slice(0,r.length-1).join("."),l=[];for(let c in i){let d=`${o}.${c}`,m=a?`${a}.${c}`:c;l.push({name:c,queryKey:m,definition:typeof i[c]=="function"?`${d}(${lo(i[c])})`:d,description:"",returns:"",example:""})}return l}get_module_documentation(e){return this.documentation.tp[e]}get_function_documentation(e,t){return this.documentation.tp[e].functions[t]}get_argument_documentation(e,t,r){let i=this.get_function_documentation(e,t);return!i||!i.args?null:i.args[r]}};var Ni=class extends ea.EditorSuggest{constructor(e){super(e.app);this.tp_keyword_regex=/tp\.(?<module>[a-z]*)?(?<fn_trigger>\.(?<fn>[a-zA-Z_.]*)?)?$/;this.documentation=new Pi(e),this.intellisense_render_setting=e.settings.intellisense_render}onTrigger(e,t,r){let i=t.getRange({line:e.line,ch:0},{line:e.line,ch:e.ch}),o=this.tp_keyword_regex.exec(i);if(!o)return null;let a,l=o.groups&&o.groups.module||"";if(this.module_name=l,o.groups&&o.groups.fn_trigger){if(l==""||!Zo(l))return null;this.function_trigger=!0,this.function_name=o.groups.fn||"",a=this.function_name}else this.function_trigger=!1,a=this.module_name;let c={start:{line:e.line,ch:e.ch-a.length},end:{line:e.line,ch:e.ch},query:a};return this.latest_trigger_info=c,c}async getSuggestions(e){let t;return this.module_name&&this.function_trigger?t=await this.documentation.get_all_functions_documentation(this.module_name,this.function_name):t=this.documentation.get_all_modules_documentation(),t?t.filter(r=>r.queryKey.toLowerCase().startsWith(e.query.toLowerCase())):[]}renderSuggestion(e,t){if(t.crea Line truncated
selected values: <% selectedValues %>`}]}}},web:{name:"web",description:"This modules contains every internal function related to the web (making web requests).",functions:{daily_quote:{name:"daily_quote",description:"Retrieves and parses the daily quote from `https://github.com/Zachatoo/quotes-database` as a callout.",definition:"tp.web.daily_quote()",examples:[{name:"Daily quote",example:"<% await tp.web.daily_quote() %>"}]},random_picture:{name:"random_picture",description:"Gets a random image from `https://unsplash.com/`.",definition:"tp.web.random_picture(size?: string, query?: string, include_size?: boolean)",args:[{name:"size",description:"Image size in the format `<width>x<height>`."},{name:"query",description:"Limits selection to photos matching a search term. Multiple search terms can be passed separated by a comma."},{name:"include_size",description:"Optional argument to include the specified size in the image link markdown. Defaults to false."}],examples:[{name:"Random picture",example:"<% await tp.web.random_picture() %>"},{name:"Random picture with size",example:'<% await tp.web.random_picture("200x200") %>'},{name:"Random picture with size and query",example:'<% await tp.web.random_picture("200x200", "landscape,water") %>'}]},request:{name:"request",description:"Makes a HTTP request to the specified URL. Optionally, you can specify a path to extract specific data from the response.",definition:"tp.web.request(url: string, path?: string)",args:[{name:"url",description:"The URL to which the HTTP request will be made."},{name:"path",description:"A path within the response JSON to extract specific data."}],examples:[{name:"Simple request",example:'<% await tp.web.request("https://jsonplaceholder.typicode.com/todos/1") %>'},{name:"Request with path",example:'<% await tp.web.request("https://jsonplaceholder.typicode.com/todos", "0.title") %>'}]}}}},Xo={tp:ec};var tc=["app","config","date","file","frontmatter","hooks","obsidian","system","user","web"],nc=new Set(tc);function Zo(n){return typeof n=="string"&&nc.has(n)}function Pi(n){return!!(n.definition||n.returns||n.args)}var Ni=class{constructor(e){this.plugin=e;this.documentation=Xo}get_all_modules_documentation(){let e=this.documentation.tp;return(!this.plugin.settings||!this.plugin.settings.user_scripts_folder)&&(e=Object.values(e).filter(t=>t.name!=="user")),Object.values(e).map(t=>(t.queryKey=t.name,t))}async get_all_functions_documentation(e,t){if(e==="app")return this.get_app_functions_documentation(this.plugin.app,t);if(e==="user"){if(!this.plugin.settings||!this.plugin.settings.user_scripts_folder)return;let r=await Se(async()=>{let i=Je(this.plugin.app,this.plugin.settings.user_scripts_folder).filter(a=>a.extension=="js");return await co(this.plugin.app,i)},"User Scripts folder doesn't exist");return!r||r.length===0?void 0:r.reduce((i,o)=>o.extension!=="js"?i:[...i,{name:o.basename,queryKey:o.basename,definition:"",description:o.description,returns:o.returns,args:o.arguments.reduce((l,c)=>(l[c.name]={name:c.name,description:c.description},l),{}),example:""}],[])}if(!!this.documentation.tp[e].functions)return Object.values(this.documentation.tp[e].functions).map(r=>(r.queryKey=r.name,r))}get_app_functions_documentation(e,t){if(!jn(e))return[];let r=t.split(".");if(r.length===0)return[];let i=e;for(let c=0;c<r.length-1;c++){let d=r[c];if(d in i){if(!jn(i[d]))return[];i=i[d]}}let o=["tp","app",...r.slice(0,r.length-1)].join("."),a=r.slice(0,r.length-1).join("."),l=[];for(let c in i){let d=`${o}.${c}`,m=a?`${a}.${c}`:c;l.push({name:c,queryKey:m,definition:typeof i[c]=="function"?`${d}(${po(i[c])})`:d,description:"",returns:"",example:""})}return l}get_module_documentation(e){return this.documentation.tp[e]}get_function_documentation(e,t){return this.documentation.tp[e].functions[t]}get_argument_documentation(e,t,r){let i=this.get_function_documentation(e,t);return!i||!i.args?null:i.args[r]}};var Mi=class extends ea.EditorSuggest{constructor(e){super(e.app);this.tp_keyword_regex=/tp\.(?<module>[a-z]*)?(?<fn_trigger>\.(?<fn>[a-zA-Z_.]*)?)?$/;this.documentation=new Ni(e),this.intellisense_render_setting=e.settings.intellisense_render}onTrigger(e,t,r){let i=t.getRange({line:e.line,ch:0},{line:e.line,ch:e.ch}),o=this.tp_keyword_regex.exec(i);if(!o)return null;let a,l=o.groups&&o.groups.module||"";if(this.module_name=l,o.groups&&o.groups.fn_trigger){if(l==""||!Zo(l))return null;this.function_trigger=!0,this.function_name=o.groups.fn||"",a=this.function_name}else this.function_trigger=!1,a=this.module_name;let c={start:{line:e.line,ch:e.ch-a.length},end:{line:e.line,ch:e.ch},query:a};return this.latest_trigger_info=c,c}async getSuggestions(e){let t;return this.module_name&&this.function_trigger?t=await this.documentation.get_all_functions_documentation(this.module_name,this.function_name):t=this.documentation.get_all_modules_documentation(),t?t.filter(r=>r.queryKey.toLowerCase().startsWith(e.query.toLowerCase())):[]}renderSuggestion(e,t){if(t.crea Line truncated
/* nosourcemap */
@@ -1,7 +1,7 @@
{
"id": "templater-obsidian",
"name": "Templater",
"version": "2.17.0",
"version": "2.18.1",
"description": "Create and use templates",
"minAppVersion": "1.5.0",
"author": "SilentVoid",
+72 -30
View File
@@ -4,27 +4,69 @@
"type": "split",
"children": [
{
"id": "e7eedb6790e6b0b7",
"id": "6239e6f491af4bc5",
"type": "tabs",
"children": [
{
"id": "54775e8aaa9f0e71",
"id": "91b02e7a2ed506bf",
"type": "leaf",
"state": {
"type": "canvas",
"state": {
"file": "2025년 월력형 메모형 일정.canvas",
"viewState": {
"x": 11372.579597767612,
"y": 16254.247282631752,
"zoom": -1.6581677246093744
"x": 1352.6907740938454,
"y": 25748.569607298825,
"zoom": -0.37333333333333263
}
},
"icon": "lucide-layout-dashboard",
"title": "2025년 월력형 메모형 일정"
}
},
{
"id": "a5db20d587c16ef5",
"type": "leaf",
"state": {
"type": "excalidraw",
"state": {
"file": "Excalidraw/Drawing 2026-01-29 22.24.35.excalidraw.md"
},
"icon": "excalidraw-icon",
"title": "Drawing 2026-01-29 22.24.35.excalidraw"
}
]
},
{
"id": "9b570f0768099caa",
"type": "leaf",
"state": {
"type": "excalidraw",
"state": {
"file": "Excalidraw/Drawing 2026-01-29 22.25.19.excalidraw.md"
},
"icon": "excalidraw-icon",
"title": "Drawing 2026-01-29 22.25.19.excalidraw"
}
},
{
"id": "0ac8dd302dc849be",
"type": "leaf",
"state": {
"type": "canvas",
"state": {
"file": "2026년 월력형 메모형 일정(1월).canvas",
"viewState": {
"x": -234.67382363785333,
"y": 28277.368529549058,
"zoom": -0.8804845198544398
}
},
"icon": "lucide-layout-dashboard",
"title": "2026년 월력형 메모형 일정(1월)"
}
}
],
"currentTab": 3
}
],
"direction": "vertical"
@@ -52,7 +94,7 @@
"state": {
"type": "search",
"state": {
"query": "section:소방",
"query": "section:장거리",
"matchingCase": false,
"explainSearch": false,
"collapseAll": true,
@@ -89,7 +131,7 @@
}
}
],
"currentTab": 0
"currentTab": 1
},
"right": {
"id": "2121e36a90aa3120",
@@ -155,49 +197,51 @@
"bases:새 베이스 생성하기": false,
"remotely-save:Remotely Save": false,
"templater-obsidian:Templater": false,
"obsidian-kanban:새 보드 만들기": false
"obsidian-kanban:새 보드 만들기": false,
"obsidian-excalidraw-plugin:New drawing": false
}
},
"active": "54775e8aaa9f0e71",
"active": "0ac8dd302dc849be",
"lastOpenFiles": [
"26냉난방기 세척 현황.md",
"2026년 월력형 메모형 일정(1월).canvas",
"2025년 월력형 메모형 일정.canvas",
"2026년 월력형 메모형 일정(2월).canvas",
"2025년 월력형 메모형 일정 - 복사.canvas",
"2025년 월력형 메모형 일정 - 복사본.canvas",
"Excalidraw/Drawing 2026-01-29 22.25.49.excalidraw.md",
"Excalidraw/Drawing 2026-01-29 22.25.19.excalidraw.md",
"Excalidraw/Drawing 2026-01-29 22.24.35.excalidraw.md",
"251124_육군훈련소_최종도면-1.pdf",
"2026년 월력형 메모형 일정(1월).md",
"2025년 월력형 메모형 일정-1.canvas",
"2025년 월력형 일정관리.canvas",
"무제 파일.canvas",
"무제.canvas",
"무제.base",
"무제 5.md",
"[점호.md",
"inbox/7번 읽기 마요-1.md",
"20. 행정보급관/21. 인수인계서/215. 반기업무.md",
"무제 2.canvas",
"2025년 월력형 메모형 일정.canvas",
"2026년 월력형 메모형 일정(1월).md",
"25년 후반기 소방안전 정밀점검 결과 후속조치.md",
"가스검침 직원 전화, 01051901708.md",
"30연대 26년도 예산.md",
"무기탄약 및 전투장비 지휘검열 후속조치 확인 점검 추진계획.canvas",
"26년 1분기 장비탄약 관리실태 현장 확인,원정완.md",
"26냉난방기 세척 현황.md",
"k2총기 편제 초과 조정 의견보고.md",
"간부교육.md",
"1분기 위임보수 영선대장 주관 실무자 토의.md",
"무기탄약 및 전투장비 확인검열 준비 계획.canvas",
"무기탄약 및 전투장비 확인검열 준비 계획.md",
"일일결산.md",
"inbox/소형냉장고.md",
"desktop_hp_obsidian/inbox/소형냉장고.md",
"inbox/소형냉장고-1.md",
"20. 행정보급관/22. 업무/223. 부대안전점검.md",
"desktop_hp_obsidian/무제 1.canvas",
"에어컨 재산수입조치.md",
"20251213_174118 1.jpg",
"1696485474353.jpg",
"25년 후반기 부대사.md",
"inbox/당직근무간 특이사항.md",
"[점호.md",
"desktop_hp_obsidian/inbox/당직근무간 특이사항.md",
"점호.md",
"inbox/사이버보안진단의날.md",
"검차.md",
"git 생활코딩 강의.md",
"desktop_hp_obsidian/2025년 월력형 메모형 일정.canvas",
"수통클린.md",
"2025년 월력형 일정관리.canvas",
"2025년 월력형 메모형 일정 (1).canvas",
"캔버스월력.canvas",
"캔버스 월력.canvas",
"출입인원 보고서.pdf",
"출입인원 보고서 1.pdf",
"월별 주차구하기코드.txt",
@@ -205,9 +249,7 @@
"새로운 7.txt",
"새로운 6.txt",
"새로운 5.txt",
"무제.base",
"web archive.webarchive",
"Templater",
"temp_1764374020200.-1440744867.png",
"temp_1764224320966.-2040280101.jpeg",
"temp_1764224265321.-2040280101.jpeg",
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
Whitespace-only changes.
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,14 @@
---
excalidraw-plugin: parsed
tags: [excalidraw]
---
==⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠== You can decompress Drawing data with the command palette: 'Decompress current Excalidraw file'. For more info check in plugin settings under 'Saving'
## Drawing
```compressed-json
N4IgLgngDgpiBcIYA8DGBDANgSwCYCd0B3EAGhADcZ8BnbAewDsEAmcm+gV31TkQAswYKDXgB6MQHNsYfpwBGAOlT0AtmIBeNCtlQbs6RmPry6uA4wC0KDDgLFLUTJ2lH8MTDHQ0YNMWHRJMRZFFgAGRTCyJE9VGEYwGgQAbQBdcnQoKABlALA+UEl8PGzsDT5GTkxMch0YIgAhdFQAayKuRlwAYXpMenwEEABiADMx8ZAAX0mgA
```
%%
@@ -0,0 +1,14 @@
---
excalidraw-plugin: parsed
tags: [excalidraw]
---
==⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠== You can decompress Drawing data with the command palette: 'Decompress current Excalidraw file'. For more info check in plugin settings under 'Saving'
## Drawing
```compressed-json
N4IgLgngDgpiBcIYA8DGBDANgSwCYCd0B3EAGhADcZ8BnbAewDsEAmcm+gV31TkQAswYKDXgB6MQHNsYfpwBGAOlT0AtmIBeNCtlQbs6RmPry6uA4wC0KDDgLFLUTJ2lH8MTDHQ0YNMWHRJMRZFFgAGRTCyJE9VGEYwGgQAbQBdcnQoKABlALA+UEl8PGzsDT5GTkxMch0YIgAhdFQAayKuRlwAYXpMenwEEABiADMx8ZAAX0mgA
```
%%
@@ -0,0 +1,64 @@
---
excalidraw-plugin: parsed
tags: [excalidraw]
---
==⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠== You can decompress Drawing data with the command palette: 'Decompress current Excalidraw file'. For more info check in plugin settings under 'Saving'
# Excalidraw Data
## Text Elements
한글 ^etx2K0Be
한글 ^IcfGnhWd
한글 ^jH80KOEa
%%
## Drawing
```compressed-json
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
```
%%
+6 -1
View File
@@ -1 +1,6 @@
{}
{
"metadata":{
"version":"1.0-1.0",
"frontmatter":{}
}
}
+2
View File
@@ -3,3 +3,5 @@ views:
name: 표
order:
- file.name
- type: cards
name: 뷰
+5 -1
View File
@@ -22,5 +22,9 @@
{"id":"8ddd4a1f123e6d2e","type":"text","text":"2025.7.3(목)","x":936,"y":880,"width":300,"height":220},
{"id":"4de535fc996e18b9","x":1619,"y":600,"width":261,"height":280,"type":"text","text":"2025.6.29(일)\n이현재 여자친구 면회"}
],
"edges":[]
"edges":[],
"metadata":{
"version":"1.0-1.0",
"frontmatter":{}
}
}