File: C:/Users/fred/.vscode/extensions/mhutchie.git-graph-1.30.0/media/out.min.js
"use strict";(function(T,c){var t=acquireVsCodeApi();var A={alert:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"/></svg>',branch:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="16" viewBox="0 0 10 16"><path fill-rule="evenodd" d="M10 5c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v.3c-.02.52-.23.98-.63 1.38-.4.4-.86.61-1.38.63-.83.02-1.48.16-2 .45V4.72a1.993 1.993 0 0 0-1-3.72C.88 1 0 1.89 0 3a2 2 0 0 0 1 1.72v6.56c-.59.35-1 .99-1 1.72 0 1.11.89 2 2 2 1.11 0 2-.89 2-2 0-.53-.2-1-.53-1.36.09-.06.48-.41.59-.47.25-.11.56-.17.94-.17 1.05-.05 1.95-.45 2.75-1.25S8.95 7.77 9 6.73h-.02C9.59 6.37 10 5.73 10 5zM2 1.8c.66 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2C1.35 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2zm0 12.41c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm6-8c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>',check:'<svg xmlns="http://www.w3.org/2000/svg" width="12" height="16" viewBox="0 0 12 16"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"></path></svg>',commit:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M10.86 7c-.45-1.72-2-3-3.86-3-1.86 0-3.41 1.28-3.86 3H0v2h3.14c.45 1.72 2 3 3.86 3 1.86 0 3.41-1.28 3.86-3H14V7h-3.14zM7 10.2c-1.22 0-2.2-.98-2.2-2.2 0-1.22.98-2.2 2.2-2.2 1.22 0 2.2.98 2.2 2.2 0 1.22-.98 2.2-2.2 2.2z"/></svg>',copy:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"/></svg>',download:'<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 -0.5 16 16.5"><path fill-rule="evenodd" d="M9 12h2l-3 3-3-3h2V7h2v5zm3-8c0-.44-.91-3-4.5-3C5.08 1 3 2.92 3 5 1.02 5 0 6.52 0 8c0 1.53 1 3 3 3h3V9.7H3C1.38 9.7 1.3 8.28 1.3 8c0-.17.05-1.7 1.7-1.7h1.3V5c0-1.39 1.56-2.7 3.2-2.7 2.55 0 3.13 1.55 3.2 1.8v1.2H12c.81 0 2.7.22 2.7 2.2 0 2.09-2.25 2.2-2.7 2.2h-2V11h2c2.08 0 4-1.16 4-3.5C16 5.06 14.08 4 12 4z"/></svg>',eyeOpen:'<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>',eyeClosed:'<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 -1 16 16"><path fill-rule="evenodd" d="M14.822.854a.5.5 0 1 0-.707-.708l-2.11 2.11C10.89 1.483 9.565.926 8.06.926c-5.06 0-8.06 6-8.06 6s1.162 2.323 3.258 4.078l-2.064 2.065a.5.5 0 1 0 .707.707L14.822.854zM4.86 9.403L6.292 7.97A1.999 1.999 0 0 1 6 6.925c0-1.11.89-2 2-2 .384 0 .741.106 1.045.292l1.433-1.433A3.98 3.98 0 0 0 8 2.925c-2.2 0-4 1.8-4 4 0 .938.321 1.798.859 2.478zm7.005-3.514l1.993-1.992A14.873 14.873 0 0 1 16 6.925s-3 6-7.94 6a6.609 6.609 0 0 1-2.661-.57l1.565-1.566c.33.089.678.136 1.036.136 2.22 0 4-1.78 4-4 0-.358-.047-.705-.136-1.036zM9.338 8.415l.152-.151a1.996 1.996 0 0 1-.152.151z"/></svg>',gear:'<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="-1 -1 18 18"><path fill-rule="evenodd" d="M14 8.77v-1.6l-1.94-.64-.45-1.09.88-1.84-1.13-1.13-1.81.91-1.09-.45-.69-1.92h-1.6l-.63 1.94-1.11.45-1.84-.88-1.13 1.13.91 1.81-.45 1.09L0 7.23v1.59l1.94.64.45 1.09-.88 1.84 1.13 1.13 1.81-.91 1.09.45.69 1.92h1.59l.63-1.94 1.11-.45 1.84.88 1.13-1.13-.92-1.81.47-1.09L14 8.75v.02zM7 11c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"/></svg>',info:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"/></svg>',openFile:'<svg xmlns="http://www.w3.org/2000/svg" width="12" height="16" viewBox="0 0 12 16"><path fill-rule="evenodd" d="M8.5 1H1c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h10c.55 0 1-.45 1-1V4.5L8.5 1zM11 14H1V2h7l3 3v9zM6 4.5l4 3-4 3v-2c-.98-.02-1.84.22-2.55.7-.71.48-1.19 1.25-1.45 2.3.02-1.64.39-2.88 1.13-3.73.73-.84 1.69-1.27 2.88-1.27v-2H6z"/></svg>',package:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1 4.27v7.47c0 .45.3.84.75.97l6.5 1.73c.16.05.34.05.5 0l6.5-1.73c.45-.13.75-.52.75-.97V4.27c0-.45-.3-.84-.75-.97l-6.5-1.74a1.4 1.4 0 0 0-.5 0L1.75 3.3c-.45.13-.75.52-.75.97zm7 9.09l-6-1.59V5l6 1.61v6.75zM2 4l2.5-.67L11 5.06l-2.5.67L2 4zm13 7.77l-6 1.59V6.61l2-.55V8.5l2-.53V5.53L15 5v6.77zm-2-7.24L6.5 2.8l2-.53L15 4l-2 .53z"/></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M0 12v3h3l8-8-3-3-8 8zm3 2H1v-2h1v1h1v1zm10.3-9.3L12 6 9 3l1.3-1.3a.996.996 0 0 1 1.41 0l1.59 1.59c.39.39.39 1.02 0 1.41z"/></svg>',search:'<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="-0.5 -2 18 18"><path fill-rule="evenodd" d="M15.7 13.3l-3.81-3.83A5.93 5.93 0 0 0 13 6c0-3.31-2.69-6-6-6S1 2.69 1 6s2.69 6 6 6c1.3 0 2.48-.41 3.47-1.11l3.83 3.81c.19.2.45.3.7.3.25 0 .52-.09.7-.3a.996.996 0 0 0 0-1.41v.01zM7 10.7c-2.59 0-4.7-2.11-4.7-4.7 0-2.59 2.11-4.7 4.7-4.7 2.59 0 4.7 2.11 4.7 4.7 0 2.59-2.11 4.7-4.7 4.7z"/></svg>',stash:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M14 9l-1.13-7.14c-.08-.48-.5-.86-1-.86H2.13c-.5 0-.92.38-1 .86L0 9v5c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V9zm-3.28.55l-.44.89c-.17.34-.52.56-.91.56H4.61c-.38 0-.72-.22-.89-.55l-.44-.91c-.17-.33-.52-.55-.89-.55H1l1-7h10l1 7h-1.38c-.39 0-.73.22-.91.55l.01.01z"/></svg>',tag:'<svg xmlns="http://www.w3.org/2000/svg" width="15" height="16" viewBox="0 0 15 16"><path fill-rule="evenodd" d="M7.73 1.73C7.26 1.26 6.62 1 5.96 1H3.5C2.13 1 1 2.13 1 3.5v2.47c0 .66.27 1.3.73 1.77l6.06 6.06c.39.39 1.02.39 1.41 0l4.59-4.59a.996.996 0 0 0 0-1.41L7.73 1.73zM2.38 7.09c-.31-.3-.47-.7-.47-1.13V3.5c0-.88.72-1.59 1.59-1.59h2.47c.42 0 .83.16 1.13.47l6.14 6.13-4.73 4.73-6.13-6.15zM3.01 3h2v2H3V3h.01z"/></svg>',terminal:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 10h4v1H7v-1zm-3 1l3-3-3-3-.75.75L5.5 8l-2.25 2.25L4 11zm10-8v10c0 .55-.45 1-1 1H1c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h12c.55 0 1 .45 1 1zm-1 0H1v10h12V3z"/></svg>',loading:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="32" viewBox="0 0 12 16"><path fill-rule="evenodd" d="M10.24 7.4a4.15 4.15 0 0 1-1.2 3.6 4.346 4.346 0 0 1-5.41.54L4.8 10.4.5 9.8l.6 4.2 1.31-1.26c2.36 1.74 5.7 1.57 7.84-.54a5.876 5.876 0 0 0 1.74-4.46l-1.75-.34zM2.96 5a4.346 4.346 0 0 1 5.41-.54L7.2 5.6l4.3.6-.6-4.2-1.31 1.26c-2.36-1.74-5.7-1.57-7.85.54C.5 5.03-.06 6.65.01 8.26l1.75.35A4.17 4.17 0 0 1 2.96 5z"/></svg>',refresh:'<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M 8.244,15.672 C 11.441,15.558 14.868,13.024 14.828,8.55 14.773,6.644 13.911,4.852 12.456,3.619 l -1.648,1.198 c 1.265,0.861 2.037,2.279 2.074,3.809 0.016,2.25 -1.808,5.025 -4.707,5.077 -2.898,0.052 -4.933,-2.08 -5.047,-4.671 C 3.07,6.705 4.635,4.651 6.893,4.088 l 0.041,1.866 3.853,-3.126 -3.978,-2.772 0.032,2.077 c -3.294,0.616 -5.755,3.541 -5.667,6.982 -3.88e-4,4.233 3.873,6.670 7.07,6.557 z"/></svg>',openFolder:'<svg xmlns="http://www.w3.org/2000/svg" class="openFolderIcon" viewBox="0 0 30 30"><path d="M 5 4 C 3.895 4 3 4.895 3 6 L 3 9 L 3 11 L 22 11 L 27 11 L 27 8 C 27 6.895 26.105 6 25 6 L 12.199219 6 L 11.582031 4.9707031 C 11.221031 4.3687031 10.570187 4 9.8671875 4 L 5 4 z M 2.5019531 13 C 1.4929531 13 0.77040625 13.977406 1.0664062 14.941406 L 4.0351562 24.587891 C 4.2941563 25.426891 5.0692656 26 5.9472656 26 L 15 26 L 24.052734 26 C 24.930734 26 25.705844 25.426891 25.964844 24.587891 L 28.933594 14.941406 C 29.229594 13.977406 28.507047 13 27.498047 13 L 15 13 L 2.5019531 13 z"/></svg>',closedFolder:'<svg xmlns="http://www.w3.org/2000/svg" class="closedFolderIcon" viewBox="0 0 30 30"><path d="M 4 3 C 2.895 3 2 3.895 2 5 L 2 8 L 13 8 L 28 8 L 28 7 C 28 5.895 27.105 5 26 5 L 11.199219 5 L 10.582031 3.9707031 C 10.221031 3.3687031 9.5701875 3 8.8671875 3 L 4 3 z M 3 10 C 2.448 10 2 10.448 2 11 L 2 23 C 2 24.105 2.895 25 4 25 L 26 25 C 27.105 25 28 24.105 28 23 L 28 11 C 28 10.448 27.552 10 27 10 L 3 10 z"/></svg>',file:'<svg xmlns="http://www.w3.org/2000/svg" class="fileIcon" viewBox="0 0 30 30"><path d="M24.707,8.793l-6.5-6.5C18.019,2.105,17.765,2,17.5,2H7C5.895,2,5,2.895,5,4v22c0,1.105,0.895,2,2,2h16c1.105,0,2-0.895,2-2 V9.5C25,9.235,24.895,8.981,24.707,8.793z M18,10c-0.552,0-1-0.448-1-1V3.904L23.096,10H18z"/></svg>',arrowDown:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14"><path fill-rule="evenodd" d="M6,1L6,10.1L2.7,6.8L1.3,8.2L7,13.9L12.7,8.2L11.3,6.8L8,10.1L8,1L6,1z"/></svg>',arrowUp:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14"><path fill-rule="evenodd" d="M6,13L6,3.9L2.7,7.2L1.3,5.8L7,0.1L12.7,5.8L11.3,7.2L8,3.9L8,13L6,13z"/></svg>',cdv:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14"><path fill-rule="evenodd" d="M0,2V3.5H2V2ZM3.5,2V3.5H14V2ZM0,5v7H14V5Zm1,1.5h5.5v4H1Zm6.5,0H13v4H7.5Z"/></svg>',close:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14"><path fill-rule="evenodd" d="M3.8,2.4L2.4,3.8L5.7,7L2.4,10.2L3.8,11.6L7,8.3L10.2,11.6L11.6,10.2L8.3,7L11.6,3.8L10.2,2.4L7,5.7L3.8,2.4z"/></svg>',failed:'<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 13 13"><path fill-rule="evenodd" d="M 6.5,0 A 6.5,6.5 0 0 0 0,6.5 6.5,6.5 0 0 0 6.5,13 6.5,6.5 0 0 0 13,6.5 6.5,6.5 0 0 0 6.5,0 Z M 4.1,2.54 6.5,4.95 8.9,2.54 10.46,4.1 8.05,6.5 10.46,8.9 8.9,10.46 6.5,8.05 4.1,10.46 2.54,8.9 4.95,6.5 2.54,4.1 Z"/></svg>',fileList:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M 2,3 V 4.5 H 4 V 3 Z M 5.5,3 V 4.5 H 18 V 3 Z M 2,7 V 8.5 H 4 V 7 Z M 5.5,7 V 8.5 H 18 V 7 Z M 2,11 v 1.5 H 4 V 11 Z m 3.5,0 v 1.5 H 18 V 11 Z M 2,15 v 1.5 H 4 V 15 Z m 3.5,0 v 1.5 H 18 V 15 Z"/></svg>',fileTree:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M 2,3 V 4.5 H 4 V 3 Z M 5.5,3 V 4.5 H 14 V 3 Z M 4,7 V 8.5 H 6 V 7 Z M 7.5,7 V 8.5 H 16 V 7 Z M 6,11 v 1.5 H 8 V 11 Z m 3.5,0 v 1.5 H 18 V 11 Z M 4,15 v 1.5 H 6 V 15 Z m 3.5,0 v 1.5 H 16 V 15 Z"/></svg>',inconclusive:'<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 13 13"><path fill-rule="evenodd" d="M 6.5,0 C 2.91,0 0,2.91 0,6.5 0,10.09 2.91,13 6.5,13 10.09,13 13,10.09 13,6.5 13,2.91 10.09,0 6.5,0 Z m 0.03,2.35 v 0 c 0.47,0 0.88,0.05 1.24,0.14 0.36,0.1 0.67,0.23 0.93,0.41 0.24,0.18 0.43,0.4 0.58,0.67 0.14,0.27 0.2,0.58 0.2,0.93 0,0.23 0,0.45 -0.09,0.63 C 9.3,5.31 9.14,5.49 9.05,5.62 8.91,5.79 8.9,5.82 8.7,6.02 8.53,6.2 8.35,6.36 8.15,6.5 8.03,6.6 7.94,6.7 7.85,6.79 7.77,6.88 7.7,6.97 7.65,7.08 7.6,7.18 7.56,7.29 7.53,7.4 7.5,7.52 7.5,7.54 7.5,7.67 H 5.75 c 0,-0.23 0,-0.33 0.03,-0.51 C 5.81,6.96 5.86,6.78 5.93,6.61 5.99,6.46 6.08,6.31 6.2,6.16 6.32,6.02 6.44,5.89 6.64,5.76 6.93,5.56 7.02,5.44 7.15,5.21 7.28,4.98 7.36,4.81 7.36,4.58 7.36,4.29 7.3,4.1 7.15,3.96 7.01,3.82 6.82,3.76 6.53,3.76 6.43,3.76 6.33,3.78 6.21,3.81 6.09,3.84 6.03,3.9 5.94,3.98 5.86,4.05 5.79,4.1 5.73,4.19 5.66,4.27 5.63,4.38 5.64,4.49 H 3.52 C 3.52,4.09 3.66,3.9 3.81,3.61 3.96,3.32 4.18,3.07 4.44,2.89 4.71,2.71 5.02,2.58 5.38,2.49 5.75,2.4 6.14,2.35 6.53,2.35 Z M 6.14,8.72 H 7.2 c 0.3,0 0.53,0.24 0.53,0.53 v 1.07 0 c 0,0.3 -0.23,0.53 -0.53,0.53 H 6.14 c -0.29,0 -0.53,-0.24 -0.53,-0.53 V 9.25 c 0,-0.3 0.25,-0.53 0.53,-0.53 z"/></svg>',linkExternal:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M3,3L3,17L17,17L17,13L15.5,13L15.5,15.5L4.5,15.5L4.5,4.5L7,4.5L7,3L3,3z M10,3L10,4.5L14.4,4.5L9.3,9.7L10.3,10.7L15.5,5.6L15.5,10L17,10L17,3L10,3z"/></svg>',passed:'<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 13 13"><path fill-rule="evenodd" d="M 6.5,0 A 6.5,6.5 0 0 0 0,6.5 6.5,6.5 0 0 0 6.5,13 6.5,6.5 0 0 0 13,6.5 6.5,6.5 0 0 0 6.5,0 Z M 9.64,2.95 11.2,4.5 5.02,10.68 C 3.92,9.57 2.81,8.46 1.7,7.35 L 3.26,5.8 5.02,7.57 Z"/></svg>',plus:'<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14"><path fill-rule="evenodd" d="M6,2V6H2v2h4v4H8V8h4V6H8V2Z"/></svg>',review:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill-rule="evenodd" d="m4,4.7 -4,7.3 4,7.3 2.5,0 -4,-7.3 4,-7.3zM11.5,6C9,5.5 6.6,7.1 6.1,9.6c-0.5,2.6 1.1,5 3.6,5.5 1,0.2 1.8,0.1 2.7,-0.3l2.5,3.3c0.1,0.1 0.3,0.2 0.5,0.3 0.2,0 0.4,0 0.6,-0.1 0.3,-0.2 0.4,-0.4 0.4,-0.6 0,-0.2 0,-0.4 -0.1,-0.6 0,-0.2 -2.4,-3.3 -2.4,-3.3 0.7,-0.6 1,-1.5 1.3,-2.4C15.7,8.9 14,6.5 11.5,6zm8.5,-1.3 -2.5,0 4,7.3 -4.2,7.3 2.5,0L24,12zm-8.8,3c1.6,0.3 2.6,1.8 2.3,3.4 -0.3,1.6 -1.8,2.6 -3.4,2.3C8.5,13 7.4,11.6 7.8,10 8,8.4 9.6,7.3 11.2,7.7z"/></svg>'};var d={A:"Added",M:"Modified",D:"Deleted",R:"Renamed",U:"Untracked"};var i={G:"Valid Signature",U:"Good Signature with Unknown Validity",X:"Good Signature that has Expired",Y:"Good Signature made by an Expired Key",R:"Good Signature made by a Revoked Key",E:"Signature could not be checked",B:"Bad Signature"};var l=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var y=/^[-\/].*|[\\" ><~^:?*[]|\.\.|\/\/|\/\.|@{|[.\/]$|\.lock$|^@$/g;var n={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};var o={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/"};var s=/[&<>"'\/]/g;var r=/<|>|&|"|'|//g;var H="…";var u="http://www.w3.org/2000/svg";var B="*";var m="";var v=-100;var w=-101;var b=40;var R=24;var p="active";var h="branchLabelsAlignedToGraph";var f="commitDetailsOpen";var S="disabled";var a="enabled";var e="fetchSupported";var g="focussed";var D="loading";var C="pendingReview";var E="refreshing";var x="head";var k="remote";var L="stash";var I="tag";var F="selected";var P="tagLabelsRightAligned";var M="transition";var O="eventCaptureElem";var V="--vscode-font-family";var U="--vscode-editor-font-family";var N="--vscode-editor-findMatchHighlightBackground";var W="--vscode-selection-background";var G="--limitGraphWidth";var q="data-error";function z(e,t,i){if(e.length!==t.length)return false;for(var n=0;n<e.length;n++){if(!i(e[n],t[n]))return false}return true}function _(e,t){if(e.length!==t.length)return false;for(var i=0;i<e.length;i++){if(e[i]!==t[i])return false}return true}function Y(e,t){if(e.length!==t.length)return false;for(var i=0;i<e.length;i++){if(t.indexOf(e[i])===-1)return false}return true}function j(e,t){var i="rgba(0,0,0,0)",n;if((n=e.match(/rgba\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)/))!==null){i="rgba("+n[1]+","+n[2]+","+n[3]+","+(parseFloat(n[4])*t).toFixed(2)+")"}else if((n=e.match(/#\s*([0-9a-fA-F]+)/))!==null){var o=n[1];var s=o.length;if(s===3||s===4||s===6||s===8){var r=s<5?{r:o[0]+o[0],g:o[1]+o[1],b:o[2]+o[2],a:s===4?o[3]+o[3]:"ff"}:{r:o[0]+o[1],g:o[2]+o[3],b:o[4]+o[5],a:s===8?o[6]+o[7]:"ff"};i="rgba("+parseInt(r.r,16)+","+parseInt(r.g,16)+","+parseInt(r.b,16)+","+(parseInt(r.a,16)*t/255).toFixed(2)+")"}}else if((n=e.match(/rgb\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)/))!==null){i="rgba("+n[1]+","+n[2]+","+n[3]+","+t+")"}return i}function X(e){return e>9?e:"0"+e}function Z(e){var t=e.indexOf("/");if(t===e.length-1||t===-1){return e}else{var i=e.endsWith("/")?e.substring(0,e.length-1):e;return i.substring(i.lastIndexOf("/")+1)}}function K(i,e){var t=Object.keys(i);if(e===2){return t.sort(function(e,t){return i[e].workspaceFolderIndex===i[t].workspaceFolderIndex?e.localeCompare(t):i[e].workspaceFolderIndex===null?1:i[t].workspaceFolderIndex===null?-1:i[e].workspaceFolderIndex-i[t].workspaceFolderIndex})}else if(e===0){return t.sort(function(e,t){return e.localeCompare(t)})}else{return t.map(function(e){return{name:i[e].name||Z(e),path:e}}).sort(function(e,t){return e.name!==t.name?e.name.localeCompare(t.name):e.path.localeCompare(t.path)}).map(function(e){return e.path})}}function $(e){return e.replace(s,function(e){return n[e]})}function J(e){return e.replace(r,function(e){return o[e]})}function Q(e){var t="";for(var i=0;i<e.length;i++){t+=(i>0?i<e.length-1?", ":" & ":"")+e[i]}return t}function ee(e){var t=new Date(e*1e3),i=initialState.config.dateFormat;var n=i.iso?t.getFullYear()+"-"+X(t.getMonth()+1)+"-"+X(t.getDate()):t.getDate()+" "+l[t.getMonth()]+" "+t.getFullYear();var o=X(t.getHours())+":"+X(t.getMinutes());var s;if(i.type===0){s=n+" "+o}else if(i.type===1){s=n}else{var r=Math.round((new Date).getTime()/1e3)-e,a=void 0;if(r<60){a="second"}else if(r<3600){a="minute";r/=60}else if(r<86400){a="hour";r/=3600}else if(r<604800){a="day";r/=86400}else if(r<2629800){a="week";r/=604800}else if(r<31557600){a="month";r/=2629800}else{a="year";r/=31557600}r=Math.round(r);s=r+" "+a+(r!==1?"s":"")+" ago"}return{title:n+" "+o+":"+X(t.getSeconds()),formatted:s}}function te(e){var t=new Date(e*1e3);if(initialState.config.dateFormat.iso){var i=t.getTimezoneOffset();var n=Math.abs(i);var o=i===0?"Z":" "+(i<0?"+":"-")+X(Math.floor(n/60))+X(n%60);return t.getFullYear()+"-"+X(t.getMonth()+1)+"-"+X(t.getDate())+" "+X(t.getHours())+":"+X(t.getMinutes())+":"+X(t.getSeconds())+o}else{return t.toString()}}function ie(e,t,i){ne(T.getElementsByClassName(e),t,i)}function ne(e,t,i){for(var n=0;n<e.length;n++){e[n].addEventListener(t,i)}}function oe(e,t){t.parentNode.insertBefore(e,t.nextSibling)}function se(e,t,i){var n=null;for(var o=0;o<t.children.length;o++){if(t.children[o].classList.contains(i)){n=t.children[o];break}}t.insertBefore(e,n)}function re(e,t,i){if(e.classList.contains(t)!==i){if(i){e.classList.add(t)}else{e.classList.remove(t)}return true}return false}function ae(e,t,i){var n=[];for(var o=0;o<e.length;o++){n.push(e[o])}for(var o=0;o<n.length;o++){re(n[o],t,i)}}function le(e){var t=[];for(var i=0;i<e.childNodes.length;i++){if(e.childNodes[i].childNodes.length>0){t.push.apply(t,le(e.childNodes[i]))}else if(e.childNodes[i].textContent!==null&&e.childNodes[i].textContent!==""){t.push(e.childNodes[i])}}return t}function he(e,t){var i=[];for(var n=0;n<e.children.length;n++){if(e.children[n].children.length>0){i.push.apply(i,he(e.children[n],t))}else if(e.children[n].className===t){i.push(e.children[n])}}return i}function ce(e){for(var t=0;t<e.children.length;t++){if(e.children[t].tagName==="UL"){return e.children[t]}}return null}function ue(t,e,i,n){var o=T.getElementById(t);if(o===null)return;var s=null;o.scroll(0,e);o.addEventListener("scroll",function(){var e=T.getElementById(t);if(e===null)return;i(e.scrollTop);if(s!==null)clearTimeout(s);s=setTimeout(function(){n();s=null},250)})}function de(){return T.getElementsByClassName("commit")}function me(e){e.preventDefault();e.stopPropagation()}function pe(e,t){globalState[e]=t;ge({command:"setGlobalViewState",state:globalState})}function fe(e,t){workspaceState[e]=t;ge({command:"setWorkspaceViewState",state:workspaceState})}function ge(e){t.postMessage(e)}function ve(e){ge({command:"showErrorMessage",message:e})}function Ce(e){return T.documentElement.style.getPropertyValue(e)}var we=function(){function e(){this.canvas=null;this.context=null}e.prototype.resize=function(i,n){var o=this;if(this.canvas===null)this.canvas=T.createElement("canvas");if(this.context===null)this.context=this.canvas.getContext("2d");if(this.context===null){n(i);return}var s=new Image;s.onload=function(){var e="";if(o.canvas===null||o.context===null){e=i}else{var t=Math.ceil(18*c.devicePixelRatio);if(o.canvas.width!==t)o.canvas.width=t;if(o.canvas.height!==t)o.canvas.height=t;o.context.clearRect(0,0,t,t);o.context.drawImage(s,0,0,t,t);e=o.canvas.toDataURL()}n(e)};s.src=i};return e}();var ye=function(){function e(){this.move=null;this.stop=null}e.prototype.create=function(e,t,i){if(T.getElementById(O)!==null)this.remove();var n=T.createElement("div");n.id=O;n.className=e;this.move=t;this.stop=i;if(this.move!==null){n.addEventListener("mousemove",this.move)}if(this.stop!==null){n.addEventListener("mouseup",this.stop);n.addEventListener("mouseleave",this.stop)}if(_e.isOpen()){_e.close()}T.body.appendChild(n)};e.prototype.remove=function(){var e=T.getElementById(O);if(e===null)return;if(this.move!==null){e.removeEventListener("mousemove",this.move);this.move=null}if(this.stop!==null){e.removeEventListener("mouseup",this.stop);e.removeEventListener("mouseleave",this.stop);this.stop=null}T.body.removeChild(e)};return e}();var be="contextMenuActive";var Re=function(){function e(){var e=this;this.elem=null;this.onClose=null;this.target=null;var t=function(){return e.close()};T.addEventListener("click",t);T.addEventListener("contextmenu",t)}e.prototype.show=function(e,t,i,n,o,s,r){var a=this;if(s===void 0){s=null}if(r===void 0){r=null}var l="",h=[],c=0;this.close();for(var u=0;u<e.length;u++){var d="";for(var m=0;m<e[u].length;m++){if(e[u][m].visible){d+='<li class="contextMenuItem" data-index="'+c+++'">'+(t?'<span class="contextMenuItemCheck">'+(e[u][m].checked?A.check:"")+"</span>":"")+e[u][m].title+"</li>";h.push(e[u][m].onClick)}}if(d!==""){if(l!=="")l+='<li class="contextMenuDivider"></li>';l+=d}}if(h.length===0)return;var p=T.createElement("ul");p.className="contextMenu"+(t?" checked":"")+(r!==null?" "+r:"");p.style.opacity="0";p.innerHTML=l;o.appendChild(p);var f=p.getBoundingClientRect(),g=o.getBoundingClientRect();var v=n.pageX+f.width<g.right?-2:n.pageX-f.width>g.left?2-f.width:-2-(f.width-(g.width-(n.pageX-g.left)));var C=n.pageY+f.height<g.bottom?-2:n.pageY-f.height>g.top?2-f.height:-2-(f.height-(g.height-(n.pageY-g.top)));p.style.left=o.scrollLeft+Math.max(n.pageX-g.left+v,2)+"px";p.style.top=o.scrollTop+Math.max(n.pageY-g.top+C,2)+"px";p.style.opacity="1";this.elem=p;this.onClose=s;ie("contextMenuItem","click",function(e){e.stopPropagation();a.close();h[parseInt(e.target.closest(".contextMenuItem").dataset.index)]()});this.target=i;if(this.target!==null&&this.target.type!=="repo"){re(this.target.elem,be,true)}};e.prototype.close=function(){if(this.elem!==null){this.elem.remove();this.elem=null}ae(T.getElementsByClassName(be),be,false);if(this.onClose!==null){this.onClose();this.onClose=null}this.target=null};e.prototype.refresh=function(e){if(!this.isOpen()||this.target===null||this.target.type==="repo"){return}if(this.target.index<e.length&&e[this.target.index].hash===this.target.hash){var t=Rt(de(),this.target.index);if(t!==null){if(typeof this.target.ref==="undefined"){if(this.target.type!=="cdv"){this.target.elem=t;re(this.target.elem,be,true)}return}else{var i=t.querySelectorAll("[data-fullref]");for(var n=0;n<i.length;n++){if(i[n].dataset.fullref===this.target.ref){this.target.elem=this.target.type==="ref"?i[n]:t;re(this.target.elem,be,true);return}}}}}this.close()};e.prototype.isOpen=function(){return this.elem!==null};e.prototype.isTargetDynamicSource=function(){return this.isOpen()&&this.target!==null};return e}();var Ee="dialogActive";var xe="inputInvalid";var ke="noInput";var Se=function(){function w(){this.elem=null;this.target=null;this.actioned=null;this.type=null;this.customSelects={}}w.prototype.showConfirmation=function(e,t,i,n){var o=this;this.show(0,e,t,"Cancel",function(){o.close();i()},null,n)};w.prototype.showTwoButtons=function(e,t,i,n,o,s){var r=this;this.show(0,e,t,n,function(){r.close();i()},function(){r.close();o()},s)};w.prototype.showRefInput=function(e,t,i,n,o){this.showForm(e,[{type:1,name:"",default:t}],i,function(e){return n(e[0])},o)};w.prototype.showCheckbox=function(e,t,i,n,o,s){this.showForm(e,[{type:4,name:t,value:i}],n,function(e){return o(e[0])},s)};w.prototype.showSelect=function(e,t,i,n,o,s){this.showForm(e,[{type:2,name:"",options:i,default:t}],n,function(e){return o(e[0])},s)};w.prototype.showMultiSelect=function(e,t,i,n,o,s){this.showForm(e,[{type:2,name:"",options:i,defaults:t,multiple:true}],n,function(e){return o(e[0])},s)};w.prototype.showForm=function(e,t,o,i,n,s,r,a){var l=this;if(s===void 0){s="Cancel"}if(r===void 0){r=null}if(a===void 0){a=true}var h=t.length>1;var c=h&&t.every(function(e){return e.type===4});var u=t.some(function(e){return e.type!==4&&e.type!==3&&e.info});var d=t.map(function(i,n){var e;if(i.type===3){e='<td class="inputCol"'+(u?' colspan="2"':"")+'><span class="dialogFormRadio">'+i.options.map(function(e,t){return'<label><input type="radio" name="dialogInput'+n+'" value="'+t+'"'+(e.value===i.default?" checked":"")+' tabindex="'+(n+1)+'"/><span class="customRadio"></span>'+$(e.name)+"</label>"}).join("<br>")+"</span></td>"}else{var t=i.info?'<span class="dialogInfo" title="'+$(i.info)+'">'+A.info+"</span>":"";if(i.type===2){e='<td class="inputCol"><div id="dialogFormSelect'+n+'"></div></td>'+(u?"<td>"+t+"</td>":"")}else if(i.type===4){e='<td class="inputCol"'+(u?' colspan="2"':"")+'><span class="dialogFormCheckbox"><label><input id="dialogInput'+n+'" type="checkbox"'+(i.value?" checked":"")+' tabindex="'+(n+1)+'"/><span class="customCheckbox"></span>'+(h&&!c?"":i.name)+t+"</label></span></td>"}else{e='<td class="inputCol"><input id="dialogInput'+n+'" type="text" value="'+$(i.default)+'"'+(i.type===0&&i.placeholder!==null?' placeholder="'+$(i.placeholder)+'"':"")+' tabindex="'+(n+1)+'"/></td>'+(u?"<td>"+t+"</td>":"")}}return"<tr"+(i.type===3?' class="mediumField"':i.type!==4?' class="largeField"':"")+">"+(h&&!c?"<td>"+i.name+": </td>":"")+e+"</tr>"});var m=e+(a?"<br>":"")+'<table class="dialogForm '+(h?c?"multiCheckbox":"multi":"single")+'">'+d.join("")+"</table>";var p=function(){return l.elem===null||l.elem.classList.contains(ke)||l.elem.classList.contains(xe)};var f=function(){return t.map(function(e,t){if(e.type===3){var i=T.getElementsByName("dialogInput"+t);for(var n=0;n<i.length;n++){if(i[n].checked){return e.options[parseInt(i[n].value)].value}}return e.default}else if(e.type===2){return l.customSelects[t.toString()].getValue()}else{var o=T.getElementById("dialogInput"+t);return e.type===4?o.checked:o.value}})};this.show(0,m,o,s,function(){if(p())return;var e=f();l.close();i(e)},r!==null?function(){if(p())return;var e=f();l.close();r(e)}:null,n);t.forEach(function(e,t){if(e.type===2){l.customSelects[t.toString()]=new Be(e,"dialogFormSelect"+t,t+1,l.elem)}});var g=t.findIndex(function(e){return e.type===1});if(g>-1){var v=T.getElementById("dialogInput"+g),C=T.getElementById("dialogAction");if(v.value==="")this.elem.classList.add(ke);v.addEventListener("keyup",function(){if(l.elem===null)return;if(initialState.config.dialogDefaults.general.referenceInputSpaceSubstitution!==null){var e=v.selectionStart,t=v.selectionEnd;v.value=v.value.replace(w.WHITESPACE_REGEXP,initialState.config.dialogDefaults.general.referenceInputSpaceSubstitution);v.selectionStart=e;v.selectionEnd=t}var i=v.value==="",n=v.value.match(y)!==null;re(l.elem,ke,i);if(re(l.elem,xe,!i&&n)){C.title=n?"Unable to "+o+", one or more invalid characters entered.":""}})}if(t.length>0&&(t[0].type===0||t[0].type===1)){T.getElementById("dialogInput0").focus()}};w.prototype.showMessage=function(e){this.show(2,e,null,"Close",null,null,null)};w.prototype.showError=function(e,t,i,n){var o=this;this.show(2,'<span class="dialogAlert">'+A.alert+"Error: "+e+"</span>"+(t!==null?'<br><span class="messageContent errorContent">'+$(t).split("\n").join("<br>")+"</span>":""),i,"Dismiss",function(){o.close();if(n!==null)n()},null,null)};w.prototype.showActionRunning=function(e){this.show(1,'<span class="actionRunning">'+A.loading+e+" ...</span>",null,"Dismiss",null,null,null)};w.prototype.show=function(e,t,i,n,o,s,r){var a=this;xt();this.type=e;this.target=r;je.create("dialogBacking",null,null);var l=T.createElement("div"),h=T.createElement("div");l.className="dialog";h.className="dialogContent";h.innerHTML=t+"<br>"+(i!==null?'<div id="dialogAction" class="roundedBtn">'+i+"</div>":"")+'<div id="dialogSecondaryAction" class="roundedBtn">'+n+"</div>";l.appendChild(h);this.elem=l;T.body.appendChild(l);var c=T.body.clientHeight,u=l.clientHeight+2;if(e!==0&&u>.8*c){h.style.height=Math.round(.8*c-22)+"px";u=Math.round(.8*c)}l.style.top=Math.max(Math.round((c-u)/2),10)+"px";if(i!==null&&o!==null){T.getElementById("dialogAction").addEventListener("click",o);this.actioned=o}T.getElementById("dialogSecondaryAction").addEventListener("click",s!==null?s:function(){return a.close()});if(this.target!==null&&this.target.type!=="repo"){re(this.target.elem,Ee,true)}};w.prototype.close=function(){var t=this;je.remove();if(this.elem!==null){this.elem.remove();this.elem=null}ae(T.getElementsByClassName(Ee),Ee,false);this.target=null;Object.keys(this.customSelects).forEach(function(e){return t.customSelects[e].remove()});this.customSelects={};this.actioned=null;this.type=null};w.prototype.closeActionRunning=function(){if(this.type===1)this.close()};w.prototype.submit=function(){if(this.actioned!==null)this.actioned()};w.prototype.refresh=function(e){var t=this;if(!this.isOpen()||this.target===null||this.target.type==="repo"){return}var i=e.findIndex(function(e){return e.hash===t.target.hash});if(i>-1){var n=Rt(de(),i);if(n!==null){if(typeof this.target.ref==="undefined"){if(this.target.type!=="cdv"){this.target.elem=n;re(this.target.elem,Ee,true)}return}else{var o=n.querySelectorAll("[data-fullref]");for(var s=0;s<o.length;s++){if(o[s].dataset.fullref===this.target.ref){this.target.elem=this.target.type==="ref"?o[s]:n;re(this.target.elem,Ee,true);return}}}}}this.close()};w.prototype.isOpen=function(){return this.elem!==null};w.prototype.isTargetDynamicSource=function(){return this.isOpen()&&this.target!==null};w.prototype.getType=function(){return this.type};w.WHITESPACE_REGEXP=/\s/gu;return w}();var Be=function(){function e(o,e,t,i){var s=this;this.lastSelected=-1;this.focussed=-1;this.optionsElem=null;this.data=o;this.selected=o.options.map(function(){return false});this.open=false;this.dialogElem=i;var n=T.getElementById(e);n.className="customSelectContainer";this.elem=n;var r=T.createElement("div");r.className="customSelectCurrent";r.tabIndex=t;this.currentElem=r;n.appendChild(r);this.clickHandler=function(e){if(!e.target)return;var t=e.target;if(t.closest(".customSelectContainer")!==s.elem&&(s.optionsElem===null||t.closest(".customSelectOptions")!==s.optionsElem)){s.render(false);return}if(t.className==="customSelectCurrent"){s.render(!s.open)}else if(s.open){var i=t.closest(".customSelectOption");if(i!==null){var n=parseInt(i.dataset.index);s.setItemSelectedState(n,o.multiple?!s.selected[n]:true);if(!s.data.multiple){s.render(false)}if(s.currentElem!==null){s.currentElem.focus()}}}};T.addEventListener("click",this.clickHandler,true);r.addEventListener("keydown",function(e){if(s.open&&e.key==="Tab"){s.render(false)}else if(s.open&&(e.key==="Enter"||e.key==="Escape")){s.render(false);me(e)}else if(s.data.multiple){if(e.key===" "&&s.focussed>-1){s.setItemSelectedState(s.focussed,!s.selected[s.focussed]);me(e)}else if(e.key==="ArrowUp"||e.key==="ArrowLeft"){if(!s.open){s.render(true)}s.setFocussed(s.focussed>0?s.focussed-1:s.data.options.length-1);s.scrollOptionIntoView(s.focussed);me(e)}else if(e.key==="ArrowDown"||e.key==="ArrowRight"){if(!s.open){s.render(true)}s.setFocussed(s.focussed<s.data.options.length-1?s.focussed+1:0);s.scrollOptionIntoView(s.focussed);me(e)}}else{if(e.key==="ArrowUp"||e.key==="ArrowLeft"){s.setItemSelectedState(s.lastSelected>0?s.lastSelected-1:s.data.options.length-1,true);s.scrollOptionIntoView(s.lastSelected);me(e)}else if(e.key==="ArrowDown"||e.key==="ArrowRight"){s.setItemSelectedState(s.lastSelected<s.data.options.length-1?s.lastSelected+1:0,true);s.scrollOptionIntoView(s.lastSelected);me(e)}}});if(o.multiple){for(var a=o.options.length-1;a>=0;a--){if(o.defaults.includes(o.options[a].value)){this.setItemSelectedState(a,true)}}}else{var l=o.options.findIndex(function(e){return e.value===o.default});this.setItemSelectedState(l>-1?l:0,true)}this.renderCurrentValue()}e.prototype.remove=function(){this.dialogElem=null;if(this.elem!==null){this.elem.remove();this.elem=null}if(this.currentElem!==null){this.currentElem.remove();this.currentElem=null}if(this.optionsElem!==null){this.optionsElem.remove();this.optionsElem=null}if(this.clickHandler!==null){T.removeEventListener("click",this.clickHandler,true);this.clickHandler=null}};e.prototype.getValue=function(){var i=this;var e=this.data.options.map(function(e){return e.value}).filter(function(e,t){return i.selected[t]});return this.data.multiple?e:e[0]};e.prototype.setItemSelectedState=function(e,t){if(!this.data.multiple&&this.lastSelected>-1){this.selected[this.lastSelected]=false}this.selected[e]=t;this.lastSelected=e;this.renderCurrentValue();this.renderOptionsStates()};e.prototype.setFocussed=function(e){if(this.focussed!==e){if(this.focussed>-1){var t=this.getOptionElem(this.focussed);if(t!==null){re(t,g,false)}}this.focussed=e;var i=this.getOptionElem(this.focussed);if(i!==null){re(i,g,true)}}};e.prototype.render=function(e){var i=this;if(this.elem===null||this.currentElem===null||this.dialogElem===null)return;if(this.open!==e){this.open=e;if(e){if(this.optionsElem!==null){this.optionsElem.remove()}this.optionsElem=T.createElement("div");var t=this.currentElem.getBoundingClientRect(),n=this.dialogElem.getBoundingClientRect();this.optionsElem.style.top=t.top-n.top+t.height-2+"px";this.optionsElem.style.left=t.left-n.left-1+"px";this.optionsElem.style.width=t.width+"px";this.optionsElem.style.maxHeight=Math.max(T.body.clientHeight-t.top-t.height-2,50)+"px";this.optionsElem.className="customSelectOptions"+(this.data.multiple?" multiple":"");var o=this.data.multiple?'<div class="selectedIcon">'+A.check+"</div>":"";this.optionsElem.innerHTML=this.data.options.map(function(e,t){return'<div class="customSelectOption" data-index="'+t+'">'+o+$(e.name)+"</div>"}).join("");ne(this.optionsElem.children,"mousemove",function(e){if(!e.target)return;var t=e.target.closest(".customSelectOption");if(t===null)return;i.setFocussed(parseInt(t.dataset.index))});this.optionsElem.addEventListener("mouseleave",function(){return i.setFocussed(-1)});this.dialogElem.appendChild(this.optionsElem)}else{if(this.optionsElem!==null){this.optionsElem.remove();this.optionsElem=null}this.setFocussed(-1)}re(this.elem,"open",e)}if(e){this.renderOptionsStates()}};e.prototype.renderCurrentValue=function(){var i=this;if(this.currentElem===null)return;var e=Q(this.data.options.filter(function(e,t){return i.selected[t]}).map(function(e){return e.name}))||"None";this.currentElem.title=e;this.currentElem.innerHTML=$(e)};e.prototype.renderOptionsStates=function(){if(this.optionsElem!==null){var e=this.optionsElem.children,t=void 0;for(var i=0;i<e.length;i++){t=parseInt(e[i].dataset.index);re(e[i],F,this.selected[t]);re(e[i],g,this.focussed===t)}}};e.prototype.getOptionElem=function(e){if(this.optionsElem!==null&&e>-1){var t=this.optionsElem.children,i=e.toString();for(var n=0;n<t.length;n++){if(t[n].dataset.index===i){return t[n]}}}return null};e.prototype.scrollOptionIntoView=function(e){var t=this.getOptionElem(e);if(this.optionsElem!==null&&t!==null){var i=t.offsetTop,n=t.clientHeight;var o=this.optionsElem.scrollTop,s=this.optionsElem.clientHeight;if(i<o){this.optionsElem.scroll(0,i)}else if(i+n>o+s){this.optionsElem.scroll(0,Math.max(i+n-s,0))}}};return e}();var Le=function(){function e(e,t,i,n,o){var s=this;this.options=[];this.optionsSelected=[];this.lastSelected=0;this.dropdownVisible=false;this.lastClicked=0;this.doubleClickTimeout=null;this.showInfo=t;this.multipleAllowed=i;this.changeCallback=o;this.elem=T.getElementById(e);this.menuElem=T.createElement("div");this.menuElem.className="dropdownMenu";var r=this.menuElem.appendChild(T.createElement("div"));r.className="dropdownFilter";this.filterInput=r.appendChild(T.createElement("input"));this.filterInput.className="dropdownFilterInput";this.filterInput.placeholder="Filter "+n+"...";this.optionsElem=this.menuElem.appendChild(T.createElement("div"));this.optionsElem.className="dropdownOptions";this.noResultsElem=this.menuElem.appendChild(T.createElement("div"));this.noResultsElem.className="dropdownNoResults";this.noResultsElem.innerHTML="No results found.";this.currentValueElem=this.elem.appendChild(T.createElement("div"));this.currentValueElem.className="dropdownCurrentValue";re(this.elem,"multi",i);this.elem.appendChild(this.menuElem);T.addEventListener("click",function(e){if(!e.target)return;if(e.target===s.currentValueElem){s.dropdownVisible=!s.dropdownVisible;if(s.dropdownVisible){s.filterInput.value="";s.filter()}s.elem.classList.toggle("dropdownOpen");if(s.dropdownVisible)s.filterInput.focus()}else if(s.dropdownVisible){if(e.target.closest(".dropdown")!==s.elem){s.close()}else{var t=e.target.closest(".dropdownOption");if(t!==null&&t.parentNode===s.optionsElem&&typeof t.dataset.id!=="undefined"){s.onOptionClick(parseInt(t.dataset.id))}}}},true);T.addEventListener("contextmenu",function(){return s.close()},true);this.filterInput.addEventListener("keyup",function(){return s.filter()})}e.prototype.setOptions=function(e,t){this.options=e;this.optionsSelected=[];var i=-1,n;for(var o=0;o<e.length;o++){n=t.includes(e[o].value);this.optionsSelected[o]=n;if(n){i=o}}if(i===-1){i=0;this.optionsSelected[i]=true}this.lastSelected=i;if(this.dropdownVisible&&e.length<=1)this.close();this.render();this.clearDoubleClickTimeout()};e.prototype.isSelected=function(t){if(this.options.length>0){if(this.multipleAllowed&&this.optionsSelected[0]){return true}var e=this.options.findIndex(function(e){return e.value===t});if(e>-1&&this.optionsSelected[e]){return true}}return false};e.prototype.selectOption=function(t){var e=this.options.findIndex(function(e){return t===e.value});if(this.multipleAllowed&&e>-1&&!this.optionsSelected[0]&&!this.optionsSelected[e]){this.optionsSelected[e]=true;var i=this.menuElem.scrollTop;this.render();if(this.dropdownVisible){this.menuElem.scroll(0,i)}this.changeCallback(this.getSelectedOptions(false))}};e.prototype.unselectOption=function(t){var e=this.options.findIndex(function(e){return t===e.value});if(this.multipleAllowed&&e>-1&&(this.optionsSelected[0]||this.optionsSelected[e])){if(this.optionsSelected[0]){this.optionsSelected[0]=false;for(var i=1;i<this.optionsSelected.length;i++){this.optionsSelected[i]=true}}this.optionsSelected[e]=false;if(this.optionsSelected.every(function(e){return!e})){this.optionsSelected[0]=true}var n=this.menuElem.scrollTop;this.render();if(this.dropdownVisible){this.menuElem.scroll(0,n)}this.changeCallback(this.getSelectedOptions(false))}};e.prototype.refresh=function(){if(this.options.length>0)this.render()};e.prototype.isOpen=function(){return this.dropdownVisible};e.prototype.close=function(){this.elem.classList.remove("dropdownOpen");this.dropdownVisible=false;this.clearDoubleClickTimeout()};e.prototype.render=function(){this.elem.classList.add("loaded");var e=Q(this.getSelectedOptions(true));this.currentValueElem.title=e;this.currentValueElem.innerHTML=$(e);var t="";for(var i=0;i<this.options.length;i++){var n=$(this.options[i].name);t+='<div class="dropdownOption'+(this.optionsSelected[i]?" "+F:"")+'" data-id="'+i+'" title="'+n+'">'+(this.multipleAllowed&&this.optionsSelected[i]?'<div class="dropdownOptionMultiSelected">'+A.check+"</div>":"")+n+(typeof this.options[i].hint==="string"&&this.options[i].hint!==""?'<span class="dropdownOptionHint">'+$(this.options[i].hint)+"</span>":"")+(this.showInfo?'<div class="dropdownOptionInfo" title="'+$(this.options[i].value)+'">'+A.info+"</div>":"")+"</div>"}this.optionsElem.className="dropdownOptions"+(this.showInfo?" showInfo":"");this.optionsElem.innerHTML=t;this.filterInput.style.display="none";this.noResultsElem.style.display="none";this.menuElem.style.cssText="opacity:0; display:block;";var o=this.menuElem.getBoundingClientRect();this.currentValueElem.style.width=Math.max(Math.ceil(o.width)+((this.showInfo||this.multipleAllowed)&&o.height<272?0:12),138)+"px";this.menuElem.style.cssText="right:0; overflow-y:auto; max-height:297px;";if(this.dropdownVisible)this.filter()};e.prototype.filter=function(){var e=this.filterInput.value.toLowerCase(),t,i=false;for(var n=0;n<this.options.length;n++){t=this.options[n].name.toLowerCase().indexOf(e)>-1;this.optionsElem.children[n].style.display=t?"block":"none";if(t)i=true}this.filterInput.style.display="block";this.noResultsElem.style.display=i?"none":"block"};e.prototype.getSelectedOptions=function(e){var t=[];if(this.multipleAllowed&&this.optionsSelected[0]){return[e?this.options[0].name:this.options[0].value]}for(var i=0;i<this.options.length;i++){if(this.optionsSelected[i])t.push(e?this.options[i].name:this.options[i].value)}return t};e.prototype.onOptionClick=function(e){var t=this;var i=false;var n=this.doubleClickTimeout!==null&&this.lastClicked===e;if(this.doubleClickTimeout!==null)this.clearDoubleClickTimeout();if(n){if(this.multipleAllowed&&e===0){for(var o=1;o<this.optionsSelected.length;o++){this.optionsSelected[o]=!this.optionsSelected[o]}i=true}}else{if(this.multipleAllowed){if(e===0){if(!this.optionsSelected[0]){this.optionsSelected[0]=true;for(var o=1;o<this.optionsSelected.length;o++){this.optionsSelected[o]=false}i=true}}else{if(this.optionsSelected[0]){this.optionsSelected[0]=false}this.optionsSelected[e]=!this.optionsSelected[e];if(this.optionsSelected.every(function(e){return!e})){this.optionsSelected[0]=true}i=true}}else{this.close();if(this.lastSelected!==e){this.optionsSelected[this.lastSelected]=false;this.optionsSelected[e]=true;this.lastSelected=e;i=true}}if(i){this.changeCallback(this.getSelectedOptions(false))}}if(i){var s=this.menuElem.scrollTop;this.render();if(this.dropdownVisible)this.menuElem.scroll(0,s)}this.lastClicked=e;this.doubleClickTimeout=setTimeout(function(){t.clearDoubleClickTimeout()},500)};e.prototype.clearDoubleClickTimeout=function(){if(this.doubleClickTimeout!==null){clearTimeout(this.doubleClickTimeout);this.doubleClickTimeout=null}};return e}();var Ie="findCurrentCommit";var Fe="findMatch";var Te=function(){function k(e){var t=this;this.text="";this.matches=[];this.position=-1;this.visible=false;this.view=e;this.widgetElem=T.createElement("div");this.widgetElem.className="findWidget";this.widgetElem.innerHTML='<input id="findInput" type="text" placeholder="Find" disabled/><span id="findCaseSensitive" class="findModifier" title="Match Case">Aa</span><span id="findRegex" class="findModifier" title="Use Regular Expression">.*</span><span id="findPosition"></span><span id="findPrev" title="Previous match (Shift+Enter)"></span><span id="findNext" title="Next match (Enter)"></span><span id="findOpenCdv" title="Open the Commit Details View for the current match"></span><span id="findClose" title="Close (Escape)"></span>';T.body.appendChild(this.widgetElem);this.inputElem=T.getElementById("findInput");var i=null;this.inputElem.addEventListener("keyup",function(e){if((e.keyCode?e.keyCode===13:e.key==="Enter")&&t.text!==""){if(e.shiftKey){t.prev()}else{t.next()}me(e)}else{if(i!==null)clearTimeout(i);i=setTimeout(function(){i=null;if(t.text!==t.inputElem.value){t.text=t.inputElem.value;t.clearMatches();t.findMatches(t.getCurrentHash(),true);t.openCommitDetailsViewForCurrentMatchIfEnabled()}},200)}});this.caseSensitiveElem=T.getElementById("findCaseSensitive");re(this.caseSensitiveElem,p,workspaceState.findIsCaseSensitive);this.caseSensitiveElem.addEventListener("click",function(){fe("findIsCaseSensitive",!workspaceState.findIsCaseSensitive);re(t.caseSensitiveElem,p,workspaceState.findIsCaseSensitive);t.clearMatches();t.findMatches(t.getCurrentHash(),true);t.openCommitDetailsViewForCurrentMatchIfEnabled()});this.regexElem=T.getElementById("findRegex");re(this.regexElem,p,workspaceState.findIsRegex);this.regexElem.addEventListener("click",function(){fe("findIsRegex",!workspaceState.findIsRegex);re(t.regexElem,p,workspaceState.findIsRegex);t.clearMatches();t.findMatches(t.getCurrentHash(),true);t.openCommitDetailsViewForCurrentMatchIfEnabled()});this.positionElem=T.getElementById("findPosition");this.prevElem=T.getElementById("findPrev");this.prevElem.classList.add(S);this.prevElem.innerHTML=A.arrowUp;this.prevElem.addEventListener("click",function(){return t.prev()});this.nextElem=T.getElementById("findNext");this.nextElem.classList.add(S);this.nextElem.innerHTML=A.arrowDown;this.nextElem.addEventListener("click",function(){return t.next()});var n=T.getElementById("findOpenCdv");n.innerHTML=A.cdv;re(n,p,workspaceState.findOpenCommitDetailsView);n.addEventListener("click",function(){fe("findOpenCommitDetailsView",!workspaceState.findOpenCommitDetailsView);re(n,p,workspaceState.findOpenCommitDetailsView);t.openCommitDetailsViewForCurrentMatchIfEnabled()});var o=T.getElementById("findClose");o.innerHTML=A.close;o.addEventListener("click",function(){return t.close()})}k.prototype.show=function(e){if(!this.visible){this.visible=true;this.inputElem.value=this.text;this.inputElem.disabled=false;this.updatePosition(-1,false);re(this.widgetElem,M,e);this.widgetElem.classList.add(p)}this.inputElem.focus()};k.prototype.close=function(){if(!this.visible)return;this.visible=false;this.widgetElem.classList.add(M);this.widgetElem.classList.remove(p);this.clearMatches();this.text="";this.matches=[];this.position=-1;this.inputElem.value=this.text;this.inputElem.disabled=true;this.widgetElem.removeAttribute(q);this.prevElem.classList.add(S);this.nextElem.classList.add(S);this.view.saveState()};k.prototype.refresh=function(){if(this.visible){this.findMatches(this.getCurrentHash(),false)}};k.prototype.setColour=function(e){T.body.style.setProperty("--git-graph-findMatch",e);T.body.style.setProperty("--git-graph-findMatchCommit",j(e,.5))};k.prototype.getState=function(){return{text:this.text,currentHash:this.getCurrentHash(),visible:this.visible}};k.prototype.getCurrentHash=function(){return this.position>-1?this.matches[this.position].hash:null};k.prototype.restoreState=function(e){if(!e.visible)return;this.text=e.text;this.show(false);if(this.text!=="")this.findMatches(e.currentHash,false)};k.prototype.isVisible=function(){return this.visible};k.prototype.findMatches=function(t,e){this.matches=[];this.position=-1;if(this.text!==""){var i=this.view.getColumnVisibility(),n,o=void 0;var s=workspaceState.findIsRegex?this.text:this.text.replace(/[\\\[\](){}|.*+?^$]/g,"\\$&"),r="u"+(workspaceState.findIsCaseSensitive?"":"i");try{n=new RegExp(s,r);o=new RegExp(s,"g"+r);this.widgetElem.removeAttribute(q)}catch(e){n=null;o=null;this.widgetElem.setAttribute(q,e.message)}if(n!==null&&o!==null){var a=de(),l=0,h=void 0,c=false;var u=this.view.getCommits();for(var d=0;d<u.length;d++){h=u[d];var m=bt(h.heads,h.remotes);if(h.hash!==B&&(i.author&&n.test(h.author)||i.commit&&(h.hash.search(n)===0||n.test(Ct(h.hash)))||n.test(h.message)||m.heads.some(function(e){return n.test(e.name)||e.remotes.some(function(e){return n.test(e)})})||m.remotes.some(function(e){return n.test(e.name)})||h.tags.some(function(e){return n.test(e.name)})||i.date&&n.test(ee(h.date).formatted)||h.stash!==null&&n.test(h.stash.selector))){var p=d.toString();while(l<a.length&&a[l].dataset.id!==p)l++;if(l===a.length)continue;this.matches.push({hash:h.hash,elem:a[l]});var f=le(a[l]),g=void 0;for(var v=0;v<f.length;v++){g=f[v];var C=0,w=0,y=g.textContent,b=void 0;o.lastIndex=0;while(b=o.exec(y)){if(b[0].length===0){c=true;break}if(w!==b.index){if(C!==w){g.parentNode.insertBefore(k.createMatchElem(y.substring(C,w)),g)}g.parentNode.insertBefore(T.createTextNode(y.substring(w,b.index)),g);C=b.index}w=o.lastIndex}if(w>0){if(C!==w){g.parentNode.insertBefore(k.createMatchElem(y.substring(C,w)),g)}if(w!==y.length){g.textContent=y.substring(w)}else{g.parentNode.removeChild(g)}}if(c)break}if(i.commit&&h.hash.search(n)===0&&!n.test(Ct(h.hash))&&f.length>0){var R=f[f.length-1];R.parentNode.replaceChild(k.createMatchElem(R.textContent),R)}if(c)break}}if(c){this.widgetElem.setAttribute(q,"Cannot use a regular expression which has zero length matches");this.clearMatches();this.matches=[]}}}else{this.widgetElem.removeAttribute(q)}re(this.prevElem,S,this.matches.length===0);re(this.nextElem,S,this.matches.length===0);var E=-1;if(this.matches.length>0){E=0;if(t!==null){var x=this.matches.findIndex(function(e){return e.hash===t});if(x>-1)E=x}}this.updatePosition(E,e)};k.prototype.clearMatches=function(){for(var e=0;e<this.matches.length;e++){if(e===this.position)this.matches[e].elem.classList.remove(Ie);var t=he(this.matches[e].elem,Fe),i=void 0;for(var n=0;n<t.length;n++){i=t[n];var o=i.childNodes[0].textContent;var s=i.previousSibling,r=i.previousElementSibling;while(s!==null&&s!==r&&s.textContent!==null){o=s.textContent+o;i.parentNode.removeChild(s);s=i.previousSibling}s=i.nextSibling;r=i.nextElementSibling;while(s!==null&&s!==r&&s.textContent!==null){o=o+s.textContent;i.parentNode.removeChild(s);s=i.nextSibling}i.parentNode.replaceChild(T.createTextNode(o),i)}}};k.prototype.updatePosition=function(e,t){if(this.position>-1)this.matches[this.position].elem.classList.remove(Ie);this.position=e;if(this.position>-1){this.matches[this.position].elem.classList.add(Ie);if(t)this.view.scrollToCommit(this.matches[e].hash,false)}this.positionElem.innerHTML=this.matches.length>0?this.position+1+" of "+this.matches.length:"No Results";this.view.saveState()};k.prototype.prev=function(){if(this.matches.length===0)return;this.updatePosition(this.position>0?this.position-1:this.matches.length-1,true);this.openCommitDetailsViewForCurrentMatchIfEnabled()};k.prototype.next=function(){if(this.matches.length===0)return;this.updatePosition(this.position<this.matches.length-1?this.position+1:0,true);this.openCommitDetailsViewForCurrentMatchIfEnabled()};k.prototype.openCommitDetailsViewForCurrentMatchIfEnabled=function(){if(workspaceState.findOpenCommitDetailsView){var e=this.getCurrentHash();if(e!==null&&!this.view.isCdvOpen(e,null)){var t=Rt(de(),this.view.getCommitId(e));if(t!==null){this.view.loadCommitDetails(t)}}}};k.createMatchElem=function(e){var t=T.createElement("span");t.className=Fe;t.innerHTML=e;return t};return k}();var Ae="graphVertexActive";var He=-1;var De=function(){function p(e){this.end=0;this.lines=[];this.numUncommitted=0;this.colour=e}p.prototype.addLine=function(e,t,i,n){this.lines.push({p1:e,p2:t,lockedFirst:n});if(i){if(t.x===0&&t.y<this.numUncommitted)this.numUncommitted=t.y}else{this.numUncommitted++}};p.prototype.getColour=function(){return this.colour};p.prototype.getEnd=function(){return this.end};p.prototype.setEnd=function(e){this.end=e};p.prototype.draw=function(e,t,i){var n=t.colours[this.colour%t.colours.length],o,s,r,a,l,h=[],c="",u=t.grid.y*(t.style===1?.38:.8),d,m;for(o=0;o<this.lines.length;o++){d=this.lines[o];s=d.p1.x*t.grid.x+t.grid.offsetX;r=d.p1.y*t.grid.y+t.grid.offsetY;a=d.p2.x*t.grid.x+t.grid.offsetX;l=d.p2.y*t.grid.y+t.grid.offsetY;if(i>-1){if(d.p1.y>i){r+=t.grid.expandY;l+=t.grid.expandY}else if(d.p2.y>i){if(s===a){l+=t.grid.expandY}else if(d.lockedFirst){h.push({p1:{x:s,y:r},p2:{x:a,y:l},isCommitted:o>=this.numUncommitted,lockedFirst:d.lockedFirst});h.push({p1:{x:a,y:r+t.grid.y},p2:{x:a,y:l+t.grid.expandY},isCommitted:o>=this.numUncommitted,lockedFirst:d.lockedFirst});continue}else{h.push({p1:{x:s,y:r},p2:{x:s,y:l-t.grid.y+t.grid.expandY},isCommitted:o>=this.numUncommitted,lockedFirst:d.lockedFirst});r+=t.grid.expandY;l+=t.grid.expandY}}}h.push({p1:{x:s,y:r},p2:{x:a,y:l},isCommitted:o>=this.numUncommitted,lockedFirst:d.lockedFirst})}o=0;while(o<h.length-1){d=h[o];m=h[o+1];if(d.p1.x===d.p2.x&&d.p2.x===m.p1.x&&m.p1.x===m.p2.x&&d.p2.y===m.p1.y&&d.isCommitted===m.isCommitted){d.p2.y=m.p2.y;h.splice(o+1,1)}else{o++}}for(o=0;o<h.length;o++){d=h[o];s=d.p1.x;r=d.p1.y;a=d.p2.x;l=d.p2.y;if(c!==""&&o>0&&d.isCommitted!==h[o-1].isCommitted){p.drawPath(e,c,h[o-1].isCommitted,n,t.uncommittedChanges);c=""}if(c===""||o>0&&(s!==h[o-1].p2.x||r!==h[o-1].p2.y))c+="M"+s.toFixed(0)+","+r.toFixed(1);if(s===a){c+="L"+a.toFixed(0)+","+l.toFixed(1)}else{if(t.style===1){c+="L"+(d.lockedFirst?a.toFixed(0)+","+(l-u).toFixed(1):s.toFixed(0)+","+(r+u).toFixed(1))+"L"+a.toFixed(0)+","+l.toFixed(1)}else{c+="C"+s.toFixed(0)+","+(r+u).toFixed(1)+" "+a.toFixed(0)+","+(l-u).toFixed(1)+" "+a.toFixed(0)+","+l.toFixed(1)}}}if(c!==""){p.drawPath(e,c,h[h.length-1].isCommitted,n,t.uncommittedChanges)}};p.drawPath=function(e,t,i,n,o){var s=e.appendChild(T.createElementNS(u,"path")),r=e.appendChild(T.createElementNS(u,"path"));s.setAttribute("class","shadow");s.setAttribute("d",t);r.setAttribute("class","line");r.setAttribute("d",t);r.setAttribute("stroke",i?n:"#808080");if(!i&&o===1){r.setAttribute("stroke-dasharray","2px")}};return p}();var Pe=function(){function e(e,t){this.x=0;this.children=[];this.parents=[];this.nextParent=0;this.onBranch=null;this.isCommitted=true;this.isCurrent=false;this.nextX=0;this.connections=[];this.id=e;this.isStash=t}e.prototype.addChild=function(e){this.children.push(e)};e.prototype.getChildren=function(){return this.children};e.prototype.addParent=function(e){this.parents.push(e)};e.prototype.getParents=function(){return this.parents};e.prototype.hasParents=function(){return this.parents.length>0};e.prototype.getNextParent=function(){if(this.nextParent<this.parents.length)return this.parents[this.nextParent];return null};e.prototype.getLastParent=function(){if(this.nextParent<1)return null;return this.parents[this.nextParent-1]};e.prototype.registerParentProcessed=function(){this.nextParent++};e.prototype.isMerge=function(){return this.parents.length>1};e.prototype.addToBranch=function(e,t){if(this.onBranch===null){this.onBranch=e;this.x=t}};e.prototype.isNotOnBranch=function(){return this.onBranch===null};e.prototype.isOnThisBranch=function(e){return this.onBranch===e};e.prototype.getBranch=function(){return this.onBranch};e.prototype.getPoint=function(){return{x:this.x,y:this.id}};e.prototype.getNextPoint=function(){return{x:this.nextX,y:this.id}};e.prototype.getPointConnectingTo=function(e,t){for(var i=0;i<this.connections.length;i++){if(this.connections[i].connectsTo===e&&this.connections[i].onBranch===t){return{x:i,y:this.id}}}return null};e.prototype.registerUnavailablePoint=function(e,t,i){if(e===this.nextX){this.nextX=e+1;this.connections[e]={connectsTo:t,onBranch:i}}};e.prototype.getColour=function(){return this.onBranch!==null?this.onBranch.getColour():0};e.prototype.getIsCommitted=function(){return this.isCommitted};e.prototype.setNotCommitted=function(){this.isCommitted=false};e.prototype.setCurrent=function(){this.isCurrent=true};e.prototype.draw=function(e,t,i,n,o){if(this.onBranch===null)return;var s=this.isCommitted?t.colours[this.onBranch.getColour()%t.colours.length]:"#808080";var r=(this.x*t.grid.x+t.grid.offsetX).toString();var a=(this.id*t.grid.y+t.grid.offsetY+(i?t.grid.expandY:0)).toString();var l=T.createElementNS(u,"circle");l.dataset.id=this.id.toString();l.setAttribute("cx",r);l.setAttribute("cy",a);l.setAttribute("r","4");if(this.isCurrent){l.setAttribute("class","current");l.setAttribute("stroke",s)}else{l.setAttribute("fill",s)}e.appendChild(l);if(this.isStash&&!this.isCurrent){l.setAttribute("r","4.5");l.setAttribute("class","stashOuter");var h=T.createElementNS(u,"circle");h.setAttribute("cx",r);h.setAttribute("cy",a);h.setAttribute("r","2");h.setAttribute("class","stashInner");e.appendChild(h)}l.addEventListener("mouseover",n);l.addEventListener("mouseout",o)};return e}();var Me=function(){function e(e,t,i,n){this.vertices=[];this.branches=[];this.availableColours=[];this.maxWidth=-1;this.commits=[];this.commitHead=null;this.commitLookup={};this.onlyFollowFirstParent=false;this.expandedCommitIndex=-1;this.group=null;this.tooltipId=-1;this.tooltipElem=null;this.tooltipTimeout=null;this.tooltipVertex=null;this.viewElem=t;this.config=i;this.muteConfig=n;var o=T.getElementById(e);this.contentElem=o.parentElement;this.svg=T.createElementNS(u,"svg");var s=this.svg.appendChild(T.createElementNS(u,"defs"));var r=s.appendChild(T.createElementNS(u,"linearGradient"));r.setAttribute("id","GraphGradient");this.gradientStop1=r.appendChild(T.createElementNS(u,"stop"));this.gradientStop1.setAttribute("stop-color","white");this.gradientStop2=r.appendChild(T.createElementNS(u,"stop"));this.gradientStop2.setAttribute("stop-color","black");var a=s.appendChild(T.createElementNS(u,"mask"));a.setAttribute("id","GraphMask");this.maskRect=a.appendChild(T.createElementNS(u,"rect"));this.maskRect.setAttribute("fill","url(#GraphGradient)");this.setDimensions(0,0);o.appendChild(this.svg)}e.prototype.loadCommits=function(e,t,i,n){this.commits=e;this.commitHead=t;this.commitLookup=i;this.onlyFollowFirstParent=n;this.vertices=[];this.branches=[];this.availableColours=[];if(e.length===0)return;var o=new Pe(He,false);var s,r;for(s=0;s<e.length;s++){this.vertices.push(new Pe(s,e[s].stash!==null))}for(s=0;s<e.length;s++){for(r=0;r<e[s].parents.length;r++){var a=e[s].parents[r];if(typeof i[a]==="number"){this.vertices[s].addParent(this.vertices[i[a]]);this.vertices[i[a]].addChild(this.vertices[s])}else if(!this.onlyFollowFirstParent||r===0){this.vertices[s].addParent(o)}}}if(e[0].hash===B){this.vertices[0].setNotCommitted()}if(e[0].hash===B&&this.config.uncommittedChanges===0){this.vertices[0].setCurrent()}else if(t!==null&&typeof i[t]==="number"){this.vertices[i[t]].setCurrent()}s=0;while(s<this.vertices.length){if(this.vertices[s].getNextParent()!==null||this.vertices[s].isNotOnBranch()){this.determinePath(s)}else{s++}}};e.prototype.render=function(e){var t=this;this.expandedCommitIndex=e!==null?e.index:-1;var i=T.createElementNS(u,"g"),n,o=this.getContentWidth();i.setAttribute("mask","url(#GraphMask)");for(n=0;n<this.branches.length;n++){this.branches[n].draw(i,this.config,this.expandedCommitIndex)}var s=function(e){return t.vertexOver(e)},r=function(e){return t.vertexOut(e)};for(n=0;n<this.vertices.length;n++){this.vertices[n].draw(i,this.config,e!==null&&n>e.index,s,r)}if(this.group!==null)this.svg.removeChild(this.group);this.svg.appendChild(i);this.group=i;this.setDimensions(o,this.getHeight(e));this.applyMaxWidth(o);this.closeTooltip()};e.prototype.getContentWidth=function(){var e=0,t,i;for(t=0;t<this.vertices.length;t++){i=this.vertices[t].getNextPoint();if(i.x>e)e=i.x}return 2*this.config.grid.offsetX+(e-1)*this.config.grid.x};e.prototype.getHeight=function(e){return this.vertices.length*this.config.grid.y+this.config.grid.offsetY-this.config.grid.y/2+(e!==null?this.config.grid.expandY:0)};e.prototype.getVertexColours=function(){var e=[],t;for(t=0;t<this.vertices.length;t++){e[t]=this.vertices[t].getColour()%this.config.colours.length}return e};e.prototype.getWidthsAtVertices=function(){var e=[],t;for(t=0;t<this.vertices.length;t++){e[t]=this.config.grid.offsetX+this.vertices[t].getNextPoint().x*this.config.grid.x-2}return e};e.prototype.dropCommitPossible=function(e){var n=this;if(!this.vertices[e].hasParents()){return false}var o=function(e){if(e.isMerge()){return null}var t=e.getChildren();if(t.length>1){return null}else if(t.length===1){var i=o(t[0]);if(i!==false){return i}}return n.commits[e.id].hash===n.commitHead};return o(this.vertices[e])||false};e.prototype.getAllChildren=function(e){var o={};var s=function(e){var t=e.id.toString();if(typeof o[t]!=="undefined")return;o[t]=e.id;var i=e.getChildren();for(var n=0;n<i.length;n++)s(i[n])};s(this.vertices[e]);return Object.keys(o).map(function(e){return o[e]}).sort(function(e,t){return e-t})};e.prototype.getMutedCommits=function(e){var t=[];for(var i=0;i<this.commits.length;i++){t[i]=false}if(this.muteConfig.mergeCommits){for(var i=0;i<this.commits.length;i++){if(this.vertices[i].isMerge()&&this.commits[i].stash===null){t[i]=true}}}if(this.muteConfig.commitsNotAncestorsOfHead&&e!==null&&typeof this.commitLookup[e]==="number"){var n=[];for(var i=0;i<this.commits.length;i++){n[i]=false}var o=function(e){if(e.id===He||n[e.id])return;n[e.id]=true;var t=e.getParents();for(var i=0;i<t.length;i++)o(t[i])};o(this.vertices[this.commitLookup[e]]);for(var i=0;i<this.commits.length;i++){if(!n[i]&&(this.commits[i].stash===null||typeof this.commitLookup[this.commits[i].stash.baseHash]!=="number"||!n[this.commitLookup[this.commits[i].stash.baseHash]])){t[i]=true}}}return t};e.prototype.getFirstParentIndex=function(e){var t=this.vertices[e].getParents();return t.length>0?t[0].id:-1};e.prototype.getAlternativeParentIndex=function(e){var t=this.vertices[e].getParents();return t.length>1?t[1].id:t.length===1?t[0].id:-1};e.prototype.getFirstChildIndex=function(e){var t=this.vertices[e].getChildren();if(t.length>1){var i=this.vertices[e].getBranch();var n=void 0;if(i!==null&&(n=t.find(function(e){return e.isOnThisBranch(i)}))){return n.id}else{return Math.max.apply(Math,t.map(function(e){return e.id}))}}else if(t.length===1){return t[0].id}else{return-1}};e.prototype.getAlternativeChildIndex=function(e){var t=this.vertices[e].getChildren();if(t.length>1){var i=this.vertices[e].getBranch();var n;if(i!==null&&(n=t.find(function(e){return e.isOnThisBranch(i)}))){return Math.max.apply(Math,t.filter(function(e){return e!==n}).map(function(e){return e.id}))}else{var o=t.map(function(e){return e.id}).sort();return o[o.length-2]}}else if(t.length===1){return t[0].id}else{return-1}};e.prototype.limitMaxWidth=function(e){this.maxWidth=e;this.applyMaxWidth(this.getContentWidth())};e.prototype.setDimensions=function(e,t){this.setSvgWidth(e);this.svg.setAttribute("height",t.toString());this.maskRect.setAttribute("width",e.toString());this.maskRect.setAttribute("height",t.toString())};e.prototype.applyMaxWidth=function(e){this.setSvgWidth(e);var t=this.maxWidth>-1?(this.maxWidth-12)/e:1;var i=this.maxWidth>-1?this.maxWidth/e:1;this.gradientStop1.setAttribute("offset",t.toString());this.gradientStop2.setAttribute("offset",i.toString())};e.prototype.setSvgWidth=function(e){var t=this.maxWidth>-1?Math.min(e,this.maxWidth):e;this.svg.setAttribute("width",t.toString())};e.prototype.determinePath=function(e){var t=e;var i=this.vertices[t],n=this.vertices[t].getNextParent(),o;var s=i.isNotOnBranch()?i.getNextPoint():i.getPoint(),r;if(n!==null&&n.id!==He&&i.isMerge()&&!i.isNotOnBranch()&&!n.isNotOnBranch()){var a=false,l=n.getBranch();for(t=e+1;t<this.vertices.length;t++){o=this.vertices[t];r=o.getPointConnectingTo(n,l);if(r!==null){a=true}else{r=o.getNextPoint()}l.addLine(s,r,i.getIsCommitted(),!a&&o!==n?s.x<r.x:true);o.registerUnavailablePoint(r.x,n,l);s=r;if(a){i.registerParentProcessed();break}}}else{var h=new De(this.getAvailableColour(e));i.addToBranch(h,s.x);i.registerUnavailablePoint(s.x,i,h);for(t=e+1;t<this.vertices.length;t++){o=this.vertices[t];r=n===o&&!n.isNotOnBranch()?o.getPoint():o.getNextPoint();h.addLine(s,r,i.getIsCommitted(),s.x<r.x);o.registerUnavailablePoint(r.x,n,h);s=r;if(n===o){i.registerParentProcessed();var c=!n.isNotOnBranch();n.addToBranch(h,r.x);i=n;n=i.getNextParent();if(n===null||c){break}}}if(t===this.vertices.length&&n!==null&&n.id===He){i.registerParentProcessed()}h.setEnd(t);this.branches.push(h);this.availableColours[h.getColour()]=t}};e.prototype.getAvailableColour=function(e){for(var t=0;t<this.availableColours.length;t++){if(e>this.availableColours[t]){return t}}this.availableColours.push(0);return this.availableColours.length-1};e.prototype.vertexOver=function(e){var t=this;if(e.target===null)return;this.closeTooltip();var i=e.target;var n=parseInt(i.dataset.id);this.tooltipId=n;var o=Rt(de(),n);if(o!==null)o.classList.add(Ae);if(n<this.commits.length&&this.commits[n].hash!==B){this.tooltipTimeout=setTimeout(function(){t.tooltipTimeout=null;var e=i.getBoundingClientRect().top+4;if(e>=5&&e<=t.viewElem.clientHeight-5){t.tooltipVertex=i;xt();t.showTooltip(n,e)}},100)}};e.prototype.vertexOut=function(e){if(e.target===null)return;this.closeTooltip()};e.prototype.showTooltip=function(e,t){if(this.tooltipVertex!==null){this.tooltipVertex.setAttribute("r",this.tooltipVertex.classList.contains("stashOuter")?"5.5":"5")}var i=this.getAllChildren(e);var n=[],o=[],s=[],r=[],a=false;for(var l=0;l<i.length;l++){var h=this.commits[i[l]];for(var c=0;c<h.heads.length;c++)n.push(h.heads[c]);for(var c=0;c<h.remotes.length;c++)o.push(h.remotes[c]);for(var c=0;c<h.tags.length;c++)r.push(h.tags[c].name);if(h.stash!==null)s.push(h.stash.selector.substring(5));if(h.hash===this.commitHead)a=true}var u=function(e){if(e.length>10)e.splice(5,e.length-10," "+H+" ");return e.join("")};var d='<div class="graphTooltipTitle">Commit '+Ct(this.commits[e].hash)+"</div>";if(this.commitHead!==null&&typeof this.commitLookup[this.commitHead]==="number"){d+='<div class="graphTooltipSection">This commit is '+(a?"":"<b><i>not</i></b> ")+'included in <span class="graphTooltipRef">HEAD</span></div>'}if(n.length>0||o.length>0){var m=bt(n,o),p=[];m.heads.forEach(function(e){var t=e.remotes.reduce(function(e,t){return e+'<span class="graphTooltipCombinedRef">'+$(t)+"</span>"},"");p.push('<span class="graphTooltipRef">'+$(e.name)+t+"</span>")});m.remotes.forEach(function(e){return p.push('<span class="graphTooltipRef">'+$(e.name)+"</span>")});d+='<div class="graphTooltipSection">Branches: '+u(p)+"</div>"}if(r.length>0){var f=r.map(function(e){return'<span class="graphTooltipRef">'+$(e)+"</span>"});d+='<div class="graphTooltipSection">Tags: '+u(f)+"</div>"}if(s.length>0){var f=s.map(function(e){return'<span class="graphTooltipRef">'+$(e)+"</span>"});d+='<div class="graphTooltipSection">Stashes: '+u(f)+"</div>"}var g=this.vertices[e].getPoint(),v="var(--git-graph-color"+this.vertices[e].getColour()%this.config.colours.length+")";var C=T.createElement("div"),w=T.createElement("div"),y=T.createElement("div"),b=T.createElement("div");var R={x:g.x*this.config.grid.x+this.config.grid.offsetX,y:g.y*this.config.grid.y+this.config.grid.offsetY+(this.expandedCommitIndex>-1&&e>this.expandedCommitIndex?this.config.grid.expandY:0)};C.setAttribute("id","graphTooltip");C.style.opacity="0";w.setAttribute("id","graphTooltipPointer");w.style.backgroundColor=v;y.setAttribute("id","graphTooltipContent");y.style.borderColor=v;y.innerHTML=d;y.style.maxWidth=Math.min(this.contentElem.getBoundingClientRect().width-R.x-35,600)+"px";b.setAttribute("id","graphTooltipShadow");C.appendChild(b);C.appendChild(w);C.appendChild(y);C.style.left=R.x+"px";C.style.top=R.y+"px";this.contentElem.appendChild(C);this.tooltipElem=C;var E=y.getBoundingClientRect();var x=-E.height/2;if(t+x+E.height>this.viewElem.clientHeight-4){x=this.viewElem.clientHeight-t-4-E.height}if(t+x<4){x=-t+4}w.style.top=-x+"px";C.style.top=R.y+x+"px";b.style.width=E.width+"px";b.style.height=E.height+"px";C.style.opacity="1"};e.prototype.closeTooltip=function(){if(this.tooltipId>-1){var e=Rt(de(),this.tooltipId);if(e!==null)e.classList.remove(Ae);this.tooltipId=-1}if(this.tooltipElem!==null){this.tooltipElem.remove();this.tooltipElem=null}if(this.tooltipTimeout!==null){clearTimeout(this.tooltipTimeout);this.tooltipTimeout=null}if(this.tooltipVertex!==null){this.tooltipVertex.setAttribute("r",this.tooltipVertex.classList.contains("stashOuter")?"4.5":"4");this.tooltipVertex=null}};return e}();var Oe=function(){function o(e){var t=this;this.currentRepo=null;this.repo=null;this.config=null;this.loading=false;this.scrollTop=0;this.view=e;this.widgetElem=T.createElement("div");this.widgetElem.id="settingsWidget";this.widgetElem.innerHTML='<h2>Repository Settings</h2><div id="settingsContent"></div><div id="settingsLoading"></div><div id="settingsClose"></div>';T.body.appendChild(this.widgetElem);ue("settingsWidget",this.scrollTop,function(e){t.scrollTop=e},function(){if(t.currentRepo!==null){t.view.saveState()}});this.contentsElem=T.getElementById("settingsContent");this.loadingElem=T.getElementById("settingsLoading");var i=T.getElementById("settingsClose");i.innerHTML=A.close;i.addEventListener("click",function(){return t.close()})}o.prototype.show=function(e,t,i){if(t===void 0){t=true}if(i===void 0){i=0}if(this.currentRepo!==null)return;this.currentRepo=e;this.scrollTop=i;re(this.widgetElem,M,t);this.widgetElem.classList.add(p);this.view.saveState();this.refresh();if(t){this.view.requestLoadConfig()}};o.prototype.refresh=function(){if(this.currentRepo===null)return;this.repo=this.view.getRepoState(this.currentRepo);this.config=this.view.getRepoConfig();this.loading=this.view.isConfigLoading();this.render()};o.prototype.close=function(){if(this.currentRepo===null)return;this.currentRepo=null;this.repo=null;this.config=null;this.loading=false;this.widgetElem.classList.add(M);this.widgetElem.classList.remove(p);this.widgetElem.classList.remove(D);this.contentsElem.innerHTML="";this.loadingElem.innerHTML="";this.view.saveState()};o.prototype.getState=function(){return{currentRepo:this.currentRepo,scrollTop:this.scrollTop}};o.prototype.restoreState=function(e){if(e.currentRepo===null)return;this.show(e.currentRepo,false,e.scrollTop)};o.prototype.isVisible=function(){return this.currentRepo!==null};o.prototype.render=function(){var r=this;var e,t,i,n;if(this.currentRepo!==null&&this.repo!==null){var o=$(this.repo.name||Z(this.currentRepo));var s=this.repo.onRepoLoadShowCheckedOutBranch!==0||this.repo.onRepoLoadShowSpecificBranches!==null;var a=[];if(ft(this.repo.onRepoLoadShowCheckedOutBranch)){a.push("Checked Out")}var l=this.view.getBranchOptions();gt(this.repo.onRepoLoadShowSpecificBranches).forEach(function(t){var e=l.find(function(e){return e.value===t});if(e){a.push(e.name)}});var h=a.length>0?$(Q(a)):"Show All";var c='<div class="settingsSection general"><h3>General</h3>'+"<table>"+'<tr class="lineAbove"><td class="left">Name:</td><td class="leftWithEllipsis" title="'+o+(this.repo.name===null?" (Default Name from the File System)":"")+'">'+o+'</td><td class="btns right"><div id="editRepoName" title="Edit Name'+H+'">'+A.pencil+"</div>"+(this.repo.name!==null?' <div id="deleteRepoName" title="Delete Name'+H+'">'+A.close+"</div>":"")+"</td></tr>"+'<tr class="lineAbove lineBelow"><td class="left">Initial Branches:</td><td class="leftWithEllipsis" title="'+h+" ("+(s?"Local":"Global")+')">'+h+'</td><td class="btns right"><div id="editInitialBranches" title="Edit Initial Branches'+H+'">'+A.pencil+"</div>"+(s?' <div id="clearInitialBranches" title="Clear Initial Branches'+H+'">'+A.close+"</div>":"")+"</td></tr>"+"</table>"+'<label id="settingsShowStashes"><input type="checkbox" id="settingsShowStashesCheckbox" tabindex="-1"><span class="customCheckbox"></span>Show Stashes</label><br/>'+'<label id="settingsShowTags"><input type="checkbox" id="settingsShowTagsCheckbox" tabindex="-1"><span class="customCheckbox"></span>Show Tags</label><br/>'+'<label id="settingsIncludeCommitsMentionedByReflogs"><input type="checkbox" id="settingsIncludeCommitsMentionedByReflogsCheckbox" tabindex="-1"><span class="customCheckbox"></span>Include commits only mentioned by reflogs</label><span class="settingsWidgetInfo" title="Only applies when showing all branches.">'+A.info+"</span><br/>"+'<label id="settingsOnlyFollowFirstParent"><input type="checkbox" id="settingsOnlyFollowFirstParentCheckbox" tabindex="-1"><span class="customCheckbox"></span>Only follow the first parent of commits</label><span class="settingsWidgetInfo" title="Instead of following all parents of commits, only follow the first parent when discovering the commits to load.">'+A.info+"</span>"+"</div>";var u=false,d=false;if(this.config!==null){c+='<div class="settingsSection centered"><h3>User Details</h3>';var m=this.config.user.name,p=this.config.user.email;u=m.local!==null||m.global!==null;d=p.local!==null||p.global!==null;if(u||d){var f=$((t=(e=m.local)!==null&&e!==void 0?e:m.global)!==null&&t!==void 0?t:"Not Set");var g=$((n=(i=p.local)!==null&&i!==void 0?i:p.global)!==null&&n!==void 0?n:"Not Set");c+="<table>"+'<tr><td class="left">User Name:</td><td class="leftWithEllipsis" title="'+f+(u?" ("+(m.local!==null?"Local":"Global")+")":"")+'">'+f+"</td></tr>"+'<tr><td class="left">User Email:</td><td class="leftWithEllipsis" title="'+g+(d?" ("+(p.local!==null?"Local":"Global")+")":"")+'">'+g+"</td></tr>"+"</table>"+'<div class="settingsSectionButtons"><div id="editUserDetails" class="editBtn">'+A.pencil+'Edit</div><div id="removeUserDetails" class="removeBtn">'+A.close+"Remove</div></div>"}else{c+="<span>User Details (such as name and email) are used by Git to record the Author and Committer of commit objects.</span>"+'<div class="settingsSectionButtons"><div id="editUserDetails" class="addBtn">'+A.plus+"Add User Details</div></div>"}c+="</div>";c+='<div class="settingsSection"><h3>Remote Configuration</h3><table><tr><th>Remote</th><th>URL</th><th>Type</th><th>Action</th></tr>';if(this.config.remotes.length>0){var v=this.repo.hideRemotes;this.config.remotes.forEach(function(e,t){var i=v.includes(e.name);var n=$(e.url||"Not Set"),o=$(e.pushUrl||e.url||"Not Set");c+='<tr class="lineAbove">'+'<td class="left" rowspan="2"><span class="hideRemoteBtn" data-index="'+t+'" title="Click to '+(i?"show":"hide")+' branches of this remote.">'+(i?A.eyeClosed:A.eyeOpen)+"</span>"+$(e.name)+"</td>"+'<td class="leftWithEllipsis" title="Fetch URL: '+n+'">'+n+"</td><td>Fetch</td>"+'<td class="btns remoteBtns" rowspan="2" data-index="'+t+'"><div class="fetchRemote" title="Fetch from Remote'+H+'">'+A.download+'</div> <div class="pruneRemote" title="Prune Remote'+H+'">'+A.branch+'</div><br><div class="editRemote" title="Edit Remote'+H+'">'+A.pencil+'</div> <div class="deleteRemote" title="Delete Remote'+H+'">'+A.close+"</div></td>"+'</tr><tr><td class="leftWithEllipsis" title="Push URL: '+o+'">'+o+"</td><td>Push</td></tr>"})}else{c+='<tr class="lineAbove"><td colspan="4">There are no remotes configured for this repository.</td></tr>'}c+='</table><div class="settingsSectionButtons lineAbove"><div id="settingsAddRemote" class="addBtn">'+A.plus+"Add Remote</div></div></div>"}c+='<div class="settingsSection centered"><h3>Issue Linking</h3>';var C=this.repo.issueLinkingConfig||globalState.issueLinkingConfig;if(C!==null){var w=$(C.issue),y=$(C.url);c+='<table><tr><td class="left">Issue Regex:</td><td class="leftWithEllipsis" title="'+w+'">'+w+'</td></tr><tr><td class="left">Issue URL:</td><td class="leftWithEllipsis" title="'+y+'">'+y+"</td></tr></table>";c+='<div class="settingsSectionButtons"><div id="editIssueLinking" class="editBtn">'+A.pencil+'Edit</div><div id="removeIssueLinking" class="removeBtn">'+A.close+"Remove</div></div>"}else{c+="<span>Issue Linking converts issue numbers in commit messages into hyperlinks, that open the issue in your issue tracking system.</span>";c+='<div class="settingsSectionButtons"><div id="editIssueLinking" class="addBtn">'+A.plus+"Add Issue Linking</div></div>"}c+="</div>";if(this.config!==null){c+='<div class="settingsSection centered"><h3>Pull Request Creation</h3>';var b=this.repo.pullRequestConfig;if(b!==null){var R=$((b.provider===0?"Bitbucket":b.provider===1?b.custom.name:b.provider===2?"GitHub":"GitLab")+" ("+b.hostRootUrl+")");var E=$(b.sourceOwner+"/"+b.sourceRepo+" ("+b.sourceRemote+")");var x=$(b.destOwner+"/"+b.destRepo+(b.destRemote!==null?" ("+b.destRemote+")":""));var k=$(b.destBranch);c+='<table><tr><td class="left">Provider:</td><td class="leftWithEllipsis" title="'+R+'">'+R+"</td></tr>"+'<tr><td class="left">Source Repo:</td><td class="leftWithEllipsis" title="'+E+'">'+E+"</td></tr>"+'<tr><td class="left">Destination Repo:</td><td class="leftWithEllipsis" title="'+x+'">'+x+"</td></tr>"+'<tr><td class="left">Destination Branch:</td><td class="leftWithEllipsis" title="'+k+'">'+k+"</td></tr></table>"+'<div class="settingsSectionButtons"><div id="editPullRequestIntegration" class="editBtn">'+A.pencil+'Edit</div><div id="removePullRequestIntegration" class="removeBtn">'+A.close+"Remove</div></div>"}else{c+="<span>Pull Request Creation automates the opening and pre-filling of a Pull Request form, directly from a branches context menu.</span>"+'<div class="settingsSectionButtons"><div id="editPullRequestIntegration" class="addBtn">'+A.plus+'Configure "Pull Request Creation" Integration</div></div>'}c+="</div>"}c+='<div class="settingsSection"><h3>Git Graph Configuration</h3><div class="settingsSectionButtons">'+'<div id="openExtensionSettings">'+A.gear+"Open Git Graph Extension Settings</div><br/>"+'<div id="exportRepositoryConfig">'+A.package+"Export Repository Configuration</div>"+"</div></div>";this.contentsElem.innerHTML=c;T.getElementById("editRepoName").addEventListener("click",function(){if(r.currentRepo===null||r.repo===null)return;Ye.showForm("Specify a Name for this Repository:",[{type:0,name:"Name",default:r.repo.name||"",placeholder:Z(r.currentRepo)}],"Save Name",function(e){if(r.currentRepo===null)return;r.view.saveRepoStateValue(r.currentRepo,"name",e[0]||null);r.view.renderRepoDropdownOptions();r.render()},null)});if(this.repo.name!==null){T.getElementById("deleteRepoName").addEventListener("click",function(){if(r.currentRepo===null||r.repo===null||r.repo.name===null)return;Ye.showConfirmation("Are you sure you want to delete the manually configured name <b><i>"+$(r.repo.name)+"</i></b> for this repository, and use the default name from the File System <b><i>"+$(Z(r.currentRepo))+"</i></b>?","Yes, delete",function(){if(r.currentRepo===null)return;r.view.saveRepoStateValue(r.currentRepo,"name",null);r.view.renderRepoDropdownOptions();r.render()},null)})}T.getElementById("editInitialBranches").addEventListener("click",function(){if(r.repo===null)return;var t=ft(r.repo.onRepoLoadShowCheckedOutBranch);var i=gt(r.repo.onRepoLoadShowSpecificBranches);Ye.showForm('<b>Configure Initial Branches</b><p style="margin:6px 0;">Configure the branches that are initially shown when this repository is loaded in the Git Graph View.</p><p style="font-size:12px; margin:6px 0 0 0;">Note: When "Checked Out Branch" is Disabled, and no "Specific Branches" are selected, all branches will be shown.</p>',[{type:4,name:"Checked Out Branch",value:t},{type:2,name:"Specific Branches",options:r.view.getBranchOptions(),defaults:i,multiple:true}],"Save Configuration",function(e){if(r.currentRepo===null)return;if(t!==e[0]||!Y(i,e[1])){r.view.saveRepoStateValue(r.currentRepo,"onRepoLoadShowCheckedOutBranch",e[0]?1:2);r.view.saveRepoStateValue(r.currentRepo,"onRepoLoadShowSpecificBranches",e[1]);r.render()}},null,"Cancel",null,false)});if(s){T.getElementById("clearInitialBranches").addEventListener("click",function(){Ye.showConfirmation("Are you sure you want to clear the branches that are initially shown when this repository is loaded in the Git Graph View?","Yes, clear",function(){if(r.currentRepo===null)return;r.view.saveRepoStateValue(r.currentRepo,"onRepoLoadShowCheckedOutBranch",0);r.view.saveRepoStateValue(r.currentRepo,"onRepoLoadShowSpecificBranches",null);r.render()},null)})}var S=T.getElementById("settingsShowStashesCheckbox");S.checked=ut(this.repo.showStashes);S.addEventListener("change",function(){if(r.currentRepo===null)return;var e=T.getElementById("settingsShowStashesCheckbox");if(e===null)return;r.view.saveRepoStateValue(r.currentRepo,"showStashes",e.checked?1:2);r.view.refresh(true)});var B=T.getElementById("settingsShowTagsCheckbox");B.checked=dt(this.repo.showTags);B.addEventListener("change",function(){if(r.currentRepo===null)return;var e=T.getElementById("settingsShowTagsCheckbox");if(e===null)return;r.view.saveRepoStateValue(r.currentRepo,"showTags",e.checked?1:2);r.view.refresh(true)});var L=T.getElementById("settingsIncludeCommitsMentionedByReflogsCheckbox");L.checked=mt(this.repo.includeCommitsMentionedByReflogs);L.addEventListener("change",function(){if(r.currentRepo===null)return;var e=T.getElementById("settingsIncludeCommitsMentionedByReflogsCheckbox");if(e===null)return;r.view.saveRepoStateValue(r.currentRepo,"includeCommitsMentionedByReflogs",e.checked?1:2);r.view.refresh(true)});var I=T.getElementById("settingsOnlyFollowFirstParentCheckbox");I.checked=pt(this.repo.onlyFollowFirstParent);I.addEventListener("change",function(){if(r.currentRepo===null)return;var e=T.getElementById("settingsOnlyFollowFirstParentCheckbox");if(e===null)return;r.view.saveRepoStateValue(r.currentRepo,"onlyFollowFirstParent",e.checked?1:2);r.view.refresh(true)});if(this.config!==null){T.getElementById("editUserDetails").addEventListener("click",function(){var e,t,i,n;if(r.config===null)return;var o=r.config.user.name,s=r.config.user.email;Ye.showForm("Set the user name and email used by Git to record the Author and Committer of commit objects:",[{type:0,name:"User Name",default:(t=(e=o.local)!==null&&e!==void 0?e:o.global)!==null&&t!==void 0?t:"",placeholder:null},{type:0,name:"User Email",default:(n=(i=s.local)!==null&&i!==void 0?i:s.global)!==null&&n!==void 0?n:"",placeholder:null},{type:4,name:"Use Globally",value:o.local===null&&s.local===null,info:'Use the "User Name" and "User Email" globally for all Git repositories (it can be overridden per repository).'}],"Set User Details",function(e){if(r.currentRepo===null)return;var t=e[2];yt({command:"editUserDetails",repo:r.currentRepo,name:e[0],email:e[1],location:t?"global":"local",deleteLocalName:t&&o.local!==null,deleteLocalEmail:t&&s.local!==null},"Setting User Details")},null)});if(u||d){T.getElementById("removeUserDetails").addEventListener("click",function(){if(r.config===null)return;var e=r.config.user.name,t=r.config.user.email;var i=e.local===null&&t.local===null;Ye.showConfirmation("Are you sure you want to remove the <b>"+(i?"globally":"locally")+" configured</b> user name and email, which are used by Git to record the Author and Committer of commit objects?","Yes, remove",function(){if(r.currentRepo===null)return;yt({command:"deleteUserDetails",repo:r.currentRepo,name:(i?e.global:e.local)!==null,email:(i?t.global:t.local)!==null,location:i?"global":"local"},"Removing User Details")},null)})}var F="Leave blank to use the Fetch URL";T.getElementById("settingsAddRemote").addEventListener("click",function(){Ye.showForm("Add a new remote to this repository:",[{type:0,name:"Name",default:"",placeholder:null},{type:0,name:"Fetch URL",default:"",placeholder:null},{type:0,name:"Push URL",default:"",placeholder:F},{type:4,name:"Fetch Immediately",value:true}],"Add Remote",function(e){if(r.currentRepo===null)return;yt({command:"addRemote",repo:r.currentRepo,name:e[0],url:e[1],pushUrl:e[2]!==""?e[2]:null,fetch:e[3]},"Adding Remote")},{type:"repo"})});ie("editRemote","click",function(e){var t=r.getRemoteForBtnEvent(e);if(t===null)return;Ye.showForm("Edit the remote <b><i>"+$(t.name)+"</i></b>:",[{type:0,name:"Name",default:t.name,placeholder:null},{type:0,name:"Fetch URL",default:t.url!==null?t.url:"",placeholder:null},{type:0,name:"Push URL",default:t.pushUrl!==null?t.pushUrl:"",placeholder:F}],"Save Changes",function(e){if(r.currentRepo===null)return;yt({command:"editRemote",repo:r.currentRepo,nameOld:t.name,nameNew:e[0],urlOld:t.url,urlNew:e[1]!==""?e[1]:null,pushUrlOld:t.pushUrl,pushUrlNew:e[2]!==""?e[2]:null},"Saving Changes to Remote")},{type:"repo"})});ie("deleteRemote","click",function(e){var t=r.getRemoteForBtnEvent(e);if(t===null)return;Ye.showConfirmation("Are you sure you want to delete the remote <b><i>"+$(t.name)+"</i></b>?","Yes, delete",function(){if(r.currentRepo===null)return;yt({command:"deleteRemote",repo:r.currentRepo,name:t.name},"Deleting Remote")},{type:"repo"})});ie("fetchRemote","click",function(e){var t=r.getRemoteForBtnEvent(e);if(t===null)return;Ye.showForm("Are you sure you want to fetch from the remote <b><i>"+$(t.name)+"</i></b>?",[{type:4,name:"Prune",value:initialState.config.dialogDefaults.fetchRemote.prune,info:"Before fetching, remove any remote-tracking references that no longer exist on the remote."},{type:4,name:"Prune Tags",value:initialState.config.dialogDefaults.fetchRemote.pruneTags,info:'Before fetching, remove any local tags that no longer exist on the remote. Requires Git >= 2.17.0, and "Prune" to be enabled.'}],"Yes, fetch",function(e){if(r.currentRepo===null)return;yt({command:"fetch",repo:r.currentRepo,name:t.name,prune:e[0],pruneTags:e[1]},"Fetching from Remote")},{type:"repo"})});ie("pruneRemote","click",function(e){var t=r.getRemoteForBtnEvent(e);if(t===null)return;Ye.showConfirmation("Are you sure you want to prune remote-tracking references that no longer exist on the remote <b><i>"+$(t.name)+"</i></b>?","Yes, prune",function(){if(r.currentRepo===null)return;yt({command:"pruneRemote",repo:r.currentRepo,name:t.name},"Pruning Remote")},{type:"repo"})});ie("hideRemoteBtn","click",function(e){if(r.currentRepo===null||r.repo===null||r.config===null)return;var t=e.target.closest(".hideRemoteBtn");var i=r.config.remotes[parseInt(t.dataset.index)].name;var n=!r.repo.hideRemotes.includes(i);t.title="Click to "+(n?"show":"hide")+" branches of this remote.";t.innerHTML=n?A.eyeClosed:A.eyeOpen;if(n){r.repo.hideRemotes.push(i)}else{r.repo.hideRemotes.splice(r.repo.hideRemotes.indexOf(i),1)}r.view.saveRepoStateValue(r.currentRepo,"hideRemotes",r.repo.hideRemotes);r.view.refresh(true)})}T.getElementById("editIssueLinking").addEventListener("click",function(){if(r.repo===null)return;var e=r.repo.issueLinkingConfig||globalState.issueLinkingConfig;if(e!==null){r.showIssueLinkingDialog(e.issue,e.url,r.repo.issueLinkingConfig===null&&globalState.issueLinkingConfig!==null,true)}else{r.showIssueLinkingDialog(null,null,false,false)}});if(this.repo.issueLinkingConfig!==null||globalState.issueLinkingConfig!==null){T.getElementById("removeIssueLinking").addEventListener("click",function(){if(r.repo===null)return;var e=r.repo.issueLinkingConfig!==null;Ye.showConfirmation("Are you sure you want to remove "+(e?(globalState.issueLinkingConfig!==null?"the <b>locally configured</b> ":"")+"Issue Linking from this repository":"the <b>globally configured</b> Issue Linking in Git Graph")+"?","Yes, remove",function(){r.setIssueLinkingConfig(null,!e)},null)})}if(this.config!==null){T.getElementById("editPullRequestIntegration").addEventListener("click",function(){if(r.repo===null||r.config===null)return;if(r.config.remotes.length===0){Ye.showError('Unable to configure the "Pull Request Creation" Integration','The repository must have at least one remote to configure the "Pull Request Creation" Integration. There are no remotes in the current repository.',null,null);return}var e;if(r.repo.pullRequestConfig===null){var t=r.config.remotes.findIndex(function(e){return e.name==="origin"});var i=r.config.remotes[t>-1?t:0].url;var n=void 0;if(i!==null){if(i.match(/^(https?:\/\/|git@)[^/]*github/)!==null){n=2}else if(i.match(/^(https?:\/\/|git@)[^/]*gitlab/)!==null){n=3}else{n=0}}else{n=0}e={provider:n,hostRootUrl:"",sourceRemote:"",sourceOwner:"",sourceRepo:"",destRemote:"",destOwner:"",destRepo:"",destProjectId:"",destBranch:"",custom:null}}else{e=Object.assign({},r.repo.pullRequestConfig)}r.showCreatePullRequestIntegrationDialog1(e)});if(this.repo.pullRequestConfig!==null){T.getElementById("removePullRequestIntegration").addEventListener("click",function(){Ye.showConfirmation('Are you sure you want to remove the configured "Pull Request Creation" Integration?',"Yes, remove",function(){r.setPullRequestConfig(null)},null)})}}T.getElementById("openExtensionSettings").addEventListener("click",function(){ge({command:"openExtensionSettings"})});T.getElementById("exportRepositoryConfig").addEventListener("click",function(){Ye.showConfirmation("Exporting the Git Graph Repository Configuration will generate a file that can be committed in this repository. It allows others working in this repository to use the same configuration.","Yes, export",function(){if(r.currentRepo===null)return;yt({command:"exportRepoConfig",repo:r.currentRepo},"Exporting Repository Configuration")},null)})}re(this.widgetElem,D,this.loading);this.loadingElem.innerHTML=this.loading?"<span>"+A.loading+"Loading ...</span>":"";this.widgetElem.scrollTop=this.scrollTop;this.loadingElem.style.top=this.scrollTop+this.widgetElem.clientHeight/2-12+"px"};o.prototype.setIssueLinkingConfig=function(e,t){if(this.currentRepo===null||this.repo===null)return;if(t){if(this.repo.issueLinkingConfig!==null){this.view.saveRepoStateValue(this.currentRepo,"issueLinkingConfig",null)}pe("issueLinkingConfig",e)}else{this.view.saveRepoStateValue(this.currentRepo,"issueLinkingConfig",e)}this.view.refresh(true);this.render()};o.prototype.setPullRequestConfig=function(e){if(this.currentRepo===null)return;this.view.saveRepoStateValue(this.currentRepo,"pullRequestConfig",e);this.render()};o.prototype.showIssueLinkingDialog=function(e,t,i,s){var r=this;var n="<b>"+(s?"Edit Issue Linking for":"Add Issue Linking to")+" this Repository</b>";n+='<p style="font-size:12px; margin:6px 0;">The following example links <b>#123</b> in commit messages to <b>https://github.com/mhutchie/repo/issues/123</b>:</p>';n+='<table style="display:inline-table; width:360px; text-align:left; font-size:12px; margin-bottom:2px;"><tr><td>Issue Regex:</td><td>#(\\d+)</td></tr><tr><td>Issue URL:</td><td>https://github.com/mhutchie/repo/issues/$1</td></tr></tbody></table>';if(!s&&e===null&&t===null){e=o.autoDetectIssueRegex(this.view.getCommits());if(e!==null){n+='<p style="font-size:12px"><i>The prefilled Issue Regex was detected in commit messages in this repository. Review and/or correct it if necessary.</i></p>'}}Ye.showForm(n,[{type:0,name:"Issue Regex",default:e!==null?e:"",placeholder:null,info:'A regular expression that matches your issue numbers, with one or more capturing groups ( ) that will be substituted into the "Issue URL".'},{type:0,name:"Issue URL",default:t!==null?t:"",placeholder:null,info:'The issue\'s URL in your project’s issue tracking system, with placeholders ($1, $2, etc.) for the groups captured ( ) in the "Issue Regex".'},{type:4,name:"Use Globally",value:i,info:'Use the "Issue Regex" and "Issue URL" for all repositories by default (it can be overridden per repository). Note: "Use Globally" is only suitable if identical Issue Linking applies to the majority of your repositories (e.g. when using JIRA or Pivotal Tracker).'}],"Save",function(e){var t=e[0].trim(),i=e[1].trim(),n=e[2];var o=null;try{if(t.indexOf("(")===-1||t.indexOf(")")===-1){o="The regular expression does not contain a capturing group ( )."}else if(new RegExp(t,"gu")){o=null}}catch(e){o=e.message}if(o!==null){Ye.showError("Invalid Issue Regex",o,"Go Back",function(){r.showIssueLinkingDialog(t,i,n,s)})}else if(!/\$([1-9][0-9]*)/.test(i)){Ye.showError("Invalid Issue URL","The Issue URL does not contain any placeholders ($1, $2, etc.) for the issue number components captured in the Issue Regex.","Go Back",function(){r.showIssueLinkingDialog(t,i,n,s)})}else{r.setIssueLinkingConfig({issue:t,url:i},n)}},null,"Cancel",null,false)};o.prototype.showCreatePullRequestIntegrationDialog1=function(d){var m=this;if(this.config===null)return;var e=this.config.remotes.findIndex(function(e){return e.name==="origin"});var t=this.config.remotes.findIndex(function(e){return e.name==="upstream"});var i=this.config.remotes.findIndex(function(e){return e.name===d.sourceRemote});var n=this.config.remotes.findIndex(function(e){return e.name===d.destRemote});if(d.sourceRemote===""||i===-1){i=e>-1?e:0}if(d.destRemote===""){n=t>-1?t:e>-1?e:0}var o=d.provider.toString();var p=[{name:"Bitbucket",value:(0).toString()},{name:"GitHub",value:2..toString()},{name:"GitLab",value:3..toString()}];var f={};initialState.config.customPullRequestProviders.forEach(function(e){p.push({name:e.name,value:(p.length+1).toString()});f[e.name]=e.templateUrl});if(d.provider===1){if(!p.some(function(e){return e.name===d.custom.name})){p.push({name:d.custom.name,value:(p.length+1).toString()});f[d.custom.name]=d.custom.templateUrl}o=p.find(function(e){return e.name===d.custom.name}).value}p.sort(function(e,t){return e.name.localeCompare(t.name)});var s=this.config.remotes.map(function(e,t){return{name:e.name,value:t.toString()}});var r=s.map(function(e){return e});r.push({name:"Not a remote",value:"-1"});Ye.showForm('Configure "Pull Request Creation" Integration (Step 1/2)',[{type:2,name:"Provider",options:p,default:o,info:'In addition to the built-in publicly hosted Pull Request providers, custom providers can be configured using the Extension Setting "git-graph.customPullRequestProviders" (e.g. for use with privately hosted Pull Request providers).'},{type:2,name:"Source Remote",options:s,default:i.toString(),info:"The remote that corresponds to the source of the Pull Request."},{type:2,name:"Destination Remote",options:r,default:n.toString(),info:"The remote that corresponds to the destination / target of the Pull Request."}],"Next",function(t){if(m.config===null)return;var e=parseInt(t[0]);if(e>3)e=1;var i=parseInt(t[1]);var n=parseInt(t[2]);var o=m.config.remotes[i].name;var s=n>-1?m.config.remotes[n].name:null;var r=m.config.remotes[i].url;var a=n>-1?m.config.remotes[n].url:null;if(d.hostRootUrl===""||d.provider!==e){var l=r!==null?r:a;if(l!==null){var h=l.match(/^(https?:\/\/|git@)((?=[^/]+@)[^@]+@|(?![^/]+@))([^/:]+)/);d.hostRootUrl=h!==null?"https://"+h[3]:""}else{d.hostRootUrl=""}}if(e===1){var c=p.find(function(e){return e.value===t[0]}).name;d.custom={name:c,templateUrl:f[c]}}else{d.custom=null}d.provider=e;if(d.sourceRemote!==o){d.sourceRemote=o;var h=r!==null?r.match(/^(https?:\/\/|git@)[^/:]+[/:]([^/]+)\/([^/]*?)(.git|)$/):null;d.sourceOwner=h!==null?h[2]:"";d.sourceRepo=h!==null?h[3]:""}if(d.provider!==3||d.destRemote!==s){d.destProjectId=""}if(d.destRemote!==s){d.destRemote=s;if(s!==null){var h=a!==null?a.match(/^(https?:\/\/|git@)[^/:]+[/:]([^/]+)\/([^/]*?)(.git|)$/):null;d.destOwner=h!==null?h[2]:"";d.destRepo=h!==null?h[3]:"";var u=m.view.getBranches().filter(function(e){return e.startsWith("remotes/"+s+"/")&&e!=="remotes/"+s+"/HEAD"}).map(function(e){return e.substring(s.length+9)});d.destBranch=u.length>0?u.includes("master")?"master":u[0]:""}else{d.destOwner="";d.destRepo="";d.destBranch=""}}m.showCreatePullRequestIntegrationDialog2(d)},{type:"repo"})};o.prototype.showCreatePullRequestIntegrationDialog2=function(n){var t=this;if(this.config===null)return;var o=n.destRemote!==null?this.view.getBranches().filter(function(e){return e.startsWith("remotes/"+n.destRemote+"/")&&e!=="remotes/"+n.destRemote+"/HEAD"}).map(function(e){return e.substring(n.destRemote.length+9)}):[];var e="The name of the branch that is the destination / target of the Pull Request.";var i=function(e){var t=e[0];n.hostRootUrl=t.endsWith("/")?t.substring(0,t.length-1):t;n.sourceOwner=e[1];n.sourceRepo=e[2];n.destOwner=e[3];n.destRepo=e[4];n.destProjectId=n.provider===3?e[5]:"";var i=e[n.provider===3?6:5];n.destBranch=n.destRemote===null||o.length===0?i:o[parseInt(i)]};var s=[{type:0,name:"Host Root URL",default:n.hostRootUrl,placeholder:null,info:"The Pull Request provider's Host Root URL (e.g. https://github.com)."},{type:0,name:"Source Owner",default:n.sourceOwner,placeholder:null,info:"The owner of the repository that is the source of the Pull Request."},{type:0,name:"Source Repo",default:n.sourceRepo,placeholder:null,info:"The name of the repository that is the source of the Pull Request."},{type:0,name:"Destination Owner",default:n.destOwner,placeholder:null,info:"The owner of the repository that is the destination / target of the Pull Request."},{type:0,name:"Destination Repo",default:n.destRepo,placeholder:null,info:"The name of the repository that is the destination / target of the Pull Request."}];if(n.provider===3){s.push({type:0,name:"Destination Project ID",default:n.destProjectId,placeholder:null,info:"The GitLab Project ID of the destination / target of the Pull Request. Leave this field blank to use the default destination / target configured in GitLab."})}s.push(n.destRemote===null||o.length===0?{type:0,name:"Destination Branch",default:n.destBranch,placeholder:null,info:e}:{type:2,name:"Destination Branch",options:o.map(function(e,t){return{name:e,value:t.toString()}}),default:o.includes(n.destBranch)?o.indexOf(n.destBranch).toString():"0",info:e});Ye.showForm('Configure "Pull Request Creation" Integration (Step 2/2)',s,"Save Configuration",function(e){i(e);t.setPullRequestConfig(n)},{type:"repo"},"Back",function(e){i(e);t.showCreatePullRequestIntegrationDialog1(n)})};o.prototype.getRemoteForBtnEvent=function(e){return this.config!==null?this.config.remotes[parseInt(e.target.closest(".remoteBtns").dataset.index)]:null};o.autoDetectIssueRegex=function(i){var e=["#(\\d+)","^(\\d+)\\.(?=\\s|$)","^(\\d+):(?=\\s|$)","([A-Za-z]+-\\d+)"].map(function(e){var t=new RegExp(e);return{pattern:e,matches:i.filter(function(e){return t.test(e.message)}).length}}).sort(function(e,t){return t.matches-e.matches});if(e[0].matches>.1*i.length){return e[0].pattern}return null};return o}();var Ve="externalUrl";var Ue="internalUrl";var Ne=function(){function D(e,t,i){this.issueLinking=null;this.config=Object.assign({commits:false,emoji:false,issueLinking:false,markdown:false,multiline:false,urls:false},i);this.commits=e;var n=t!==null?t:globalState.issueLinkingConfig;if(this.config.issueLinking&&n!==null){try{this.issueLinking={regexp:new RegExp(n.issue,"gu"),url:n.url}}catch(e){this.issueLinking=null}}}D.prototype.format=function(e){if(this.config.multiline){var t=[],i=e.split("\n"),n=void 0,o=void 0,s=void 0;for(n=0;n<i.length;n++){if(n>0){t.push("<br/>")}o=0;if(s=i[n].match(D.INDENT_REGEXP)){for(o=0;o<s[0].length;o++){t.push(s[0][o]==="\t"?" ":" ")}}t.push(this.formatLine(o>0?i[n].substring(o):i[n]))}return t.join("")}else{return this.formatLine(e)}};D.prototype.formatLine=function(t){var i={type:7,start:-1,end:t.length,contains:[]};var n;if(this.config.markdown){var e=[];D.BACKTICK_REGEXP.lastIndex=0;while(n=D.BACKTICK_REGEXP.exec(t)){var o={index:n.index+n[1].length,run:n[2]},s=void 0;if(e.length===0){if(n[1].length%2===1){if(o.run.length>1){o.index++;o.run=o.run.substring(1)}else{continue}}}for(s=e.length-1;s>=0;s--){if(e[s].run===o.run){var r=t.substring(e[s].index+o.run.length,o.index);if(r.startsWith(" ")&&r.endsWith(" ")&&/[^ ]/.test(r)){r=r.substring(1,r.length-1)}D.insertIntoTree(i,{type:1,start:e[s].index,end:o.index+o.run.length-1,value:r,contains:[]});e.splice(s);break}}if(s===-1){e.push(o)}}}if(this.config.urls){D.URL_REGEXP.lastIndex=0;while(n=D.URL_REGEXP.exec(t)){var a=n[0];var l=a.substring(a.length-1);if(n.index>0&&typeof D.ENCLOSING_GROUPS[l]==="string"&&t.substring(n.index-1,n.index)===D.ENCLOSING_GROUPS[l]){a=a.substring(0,a.length-1);D.URL_REGEXP.lastIndex--}D.insertIntoTreeIfNoOverlap(i,{type:9,start:n.index,end:D.URL_REGEXP.lastIndex-1,url:a,displayText:a,contains:[]})}}if(this.issueLinking!==null){this.issueLinking.regexp.lastIndex=0;while(n=this.issueLinking.regexp.exec(t)){if(n[0].length===0)break;D.insertIntoTreeIfNoOverlap(i,{type:9,start:n.index,end:this.issueLinking.regexp.lastIndex-1,url:n.length>1?this.issueLinking.url.replace(/\$([1-9][0-9]*)/g,function(e,t){var i=parseInt(t);return i<n.length?n[i]:e}):this.issueLinking.url,displayText:n[0],contains:[]})}}if(this.config.commits){D.COMMIT_REGEXP.lastIndex=0;var h=function(){var t=n[0].toLowerCase();var e=c.commits.find(function(e){return e.hash.toLowerCase().startsWith(t)});if(e){D.insertIntoTreeIfNoOverlap(i,{type:2,commit:e.hash,start:n.index,end:D.COMMIT_REGEXP.lastIndex-1,contains:[]})}};var c=this;while(n=D.COMMIT_REGEXP.exec(t)){h()}}if(this.config.markdown){D.BACKSLASH_ESCAPE_REGEXP.lastIndex=0;while(n=D.BACKSLASH_ESCAPE_REGEXP.exec(t)){D.insertIntoTreeIfNoOverlap(i,{type:6,start:n.index,end:D.BACKSLASH_ESCAPE_REGEXP.lastIndex-1,value:n[0].substring(1),contains:[]})}}if(this.config.emoji){D.EMOJI_REGEXP.lastIndex=0;while(n=D.EMOJI_REGEXP.exec(t)){if(typeof D.EMOJI_MAPPINGS[n[1]]==="string"){D.insertIntoTreeIfNoOverlap(i,{type:5,start:n.index,end:D.EMOJI_REGEXP.lastIndex-1,emoji:D.EMOJI_MAPPINGS[n[1]],contains:[]})}}}if(this.config.markdown){var u=[],d=[];var m=void 0,p=void 0,f=void 0,g=void 0,v=void 0,C=void 0,w=void 0,y=void 0,b=void 0;D.EMPHASIS_REGEXP.lastIndex=0;while(n=D.EMPHASIS_REGEXP.exec(t)){var R=0,E=1,x=2,k=n.index;var S=[n[1]];S.push.apply(S,n[2].split(""));S.push(n[3]);if(S[0].startsWith("\\")){if(S[0].length%2===1){k+=S[0].length;S.shift()}else{k+=S[0].length-1;S[0]="\\"}}k+=S[R].length;while(E<S.length-1){while(x<S.length-1&&S[E]===S[x])x++;m=x-E;p=D.WHITESPACE_REGEXP.test(S[R]);f=D.WHITESPACE_REGEXP.test(S[x]);g=D.PUNCTUATION_REGEXP.test(S[R]);v=D.PUNCTUATION_REGEXP.test(S[x]);C=!f&&(!v||v&&(p||g));w=!p&&(!g||g&&(f||v));if(S[E]==="*"){y=C;b=w}else{y=C&&(!w||g);b=w&&(!C||v)}for(var s=0;s<m;s++){if(!D.isInTree(i,k+s,k+s)){u.push({index:k+s,run:d.length})}}d.push({type:S[E],size:m,open:y,close:b,both:y&&b});k+=m;R=E;E=x;x=E+1}D.EMPHASIS_REGEXP.lastIndex-=S[S.length-1].length}var B=[];var L=void 0;for(var s=0;s<u.length;s++){var I=u[s];var F=d[I.run];if(F.close&&(L=D.findOpenEmphasis(I,F,d,B))>-1){D.insertIntoTree(i,{type:d[B[L].run].type==="*"?0:8,start:B[L].index,end:I.index,contains:[]});B.splice(L)}else if(F.open){B.push(I)}}D.combineNestedEmphasis(i)}var T=[];var A=0;var H=function(e){if(A<e.start){T.push($(t.substring(A,e.start)))}switch(e.type){case 0:case 8:A=e.start+1;T.push("<em>");e.contains.forEach(H);if(A<e.end){T.push($(t.substring(A,e.end)))}T.push("</em>");break;case 3:case 4:A=e.start+2;T.push("<strong>");e.contains.forEach(H);if(A<e.end-1){T.push($(t.substring(A,e.end-1)))}T.push("</strong>");break;case 6:T.push($(e.value));break;case 1:T.push("<code>",$(e.value),"</code>");break;case 2:T.push('<span class="',Ue,'" data-type="commit" data-value="',$(e.commit),'" tabindex="-1">',$(t.substring(e.start,e.end+1)),"</span>");break;case 9:T.push('<a class="',Ve,'" href="',$(e.url),'" tabindex="-1">',$(e.displayText),"</a>");break;case 5:T.push(e.emoji);break}A=e.end+1};i.contains.forEach(H);if(A<t.length){T.push($(t.substring(A)))}return T.join("")};D.registerCustomEmojiMappings=function(e){var t=/^:[A-Za-z0-9-_]+:$/;for(var i=0;i<e.length;i++){if(t.test(e[i].shortcode)){D.EMOJI_MAPPINGS[e[i].shortcode.substring(1,e[i].shortcode.length-1)]=e[i].emoji}}};D.findOpenEmphasis=function(e,t,i,n){var o=n.length-1;while(o>=0){if(n[o].run!==e.run&&i[n[o].run].type===t.type&&(!(i[n[o].run].both||t.both)||(i[n[o].run].size+t.size)%3!==0||i[n[o].run].size%3===0&&t.size%3===0)){return o}o--}return-1};D.combineNestedEmphasis=function(e){e.contains.forEach(D.combineNestedEmphasis);if(e.contains.length===1&&e.type===e.contains[0].type&&(e.type===0||e.type===8)&&e.start+1===e.contains[0].start&&e.contains[0].end===e.end-1){e.type=e.type===0?3:4;e.contains=e.contains[0].contains}};D.insertIntoTree=function(e,t){var i=-1,n=-1,o;for(var s=0;s<e.contains.length;s++){o=e.contains[s];if(t.start<o.start&&i===-1){i=s}if(o.end<t.end){n=s}else{break}}if(i===-1){e.contains.push(t)}else if(n===-1){e.contains.unshift(t)}else{t.contains=e.contains.slice(i,n+1);e.contains.splice(i,n-i+1,t)}};D.insertIntoTreeIfNoOverlap=function(e,t){var i,n=e.contains.length;for(var o=0;o<e.contains.length;o++){i=e.contains[o];if(i.start<=t.start&&t.start<=i.end||i.start<=t.end&&t.end<=i.end||t.start<=i.start&&i.end<=t.end){return}else if(t.end<i.start){n=o;break}}e.contains.splice(n,0,t)};D.isInTree=function(e,t,i){return e.contains.some(function(e){return e.start<=t&&t<=e.end||e.start<=i&&i<=e.end||t<=e.start&&e.end<=i})};D.BACKTICK_REGEXP=/(\\*)(`+)/gu;D.BACKSLASH_ESCAPE_REGEXP=/\\[\u0021-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E]/gu;D.COMMIT_REGEXP=/\b([0-9a-fA-F]{6,})\b/gu;D.EMOJI_REGEXP=/:([A-Za-z0-9-_]+):/gu;D.EMPHASIS_REGEXP=/(\\+|[^*_]?)([*_]+)(.?)/gu;D.INDENT_REGEXP=/^[ \t]+/u;D.PUNCTUATION_REGEXP=/[\u0021-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/u;D.URL_REGEXP=/https?:\/\/\S+[^,.?!'":;\s]/gu;D.WHITESPACE_REGEXP=/^([\u0009\u000A\u000C\u000D\u0020\u00A0\u1680\u2000-\u200A\u202F\u205F\u3000]|)$/u;D.EMOJI_MAPPINGS={adhesive_bandage:"🩹",alembic:"⚗",alien:"👽",ambulance:"🚑",apple:"🍎",arrow_down:"⬇️",arrow_up:"⬆️",art:"🎨",beers:"🍻",bento:"🍱",bookmark:"🔖",books:"📚",boom:"💥",bug:"🐛",building_construction:"🏗",bulb:"💡",busts_in_silhouette:"👥",camera_flash:"📸",card_file_box:"🗃",card_index:"📇",chart_with_upwards_trend:"📈",checkered_flag:"🏁",children_crossing:"🚸",clown_face:"🤡",construction:"🚧",construction_worker:"👷",dizzy:"💫",egg:"🥚",exclamation:"❗",fire:"🔥",globe_with_meridians:"🌐",goal_net:"🥅",green_apple:"🍏",green_heart:"💚",hammer:"🔨",heavy_check_mark:"✔️",heavy_minus_sign:"➖",heavy_plus_sign:"➕",iphone:"📱",label:"🏷️",lipstick:"💄",lock:"🔒",loud_sound:"🔊",mag:"🔍",memo:"📝",mute:"🔇",new:"🆕",ok_hand:"👌",package:"📦",page_facing_up:"📄",passport_control:"🛂",pencil:"📝",pencil2:"✏️",penguin:"🐧",poop:"💩",pushpin:"📌",racehorse:"🐎",recycle:"♻️",rewind:"⏪",robot:"🤖",rocket:"🚀",rotating_light:"🚨",see_no_evil:"🙈",seedling:"🌱",shirt:"👕",sparkles:"✨",speech_balloon:"💬",tada:"🎉",triangular_flag_on_post:"🚩",triangular_ruler:"📐",truck:"🚚",twisted_rightwards_arrows:"🔀",video_game:"🎮",wastebasket:"🗑",whale:"🐳",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",wrench:"🔧",zap:"⚡️"};D.ENCLOSING_GROUPS={")":"(","]":"[","}":"{",">":"<","*":"*",_:"_"};return D}();function We(e){return e.classList.contains(Ve)||e.classList.contains(Ue)}function Ge(e){return e.classList.contains(Ve)}function qe(e){return e.classList.contains(Ue)}var ze=function(){function C(e,t){var i=this;this.gitBranches=[];this.gitBranchHead=null;this.gitConfig=null;this.gitRemotes=[];this.gitStashes=[];this.gitTags=[];this.commits=[];this.commitHead=null;this.commitLookup={};this.onlyFollowFirstParent=false;this.avatars={};this.currentBranches=null;this.currentRepoLoading=true;this.loadViewTo=null;this.moreCommitsAvailable=false;this.expandedCommit=null;this.scrollTop=0;this.renderedGitBranchHead=null;this.lastScrollToStash={time:0,hash:null};this.gitRepos=initialState.repos;this.config=initialState.config;this.maxCommits=this.config.initialLoadCommits;this.viewElem=e;this.currentRepoRefreshState={inProgress:false,hard:true,loadRepoInfoRefreshId:initialState.loadRepoInfoRefreshId,loadCommitsRefreshId:initialState.loadCommitsRefreshId,repoInfoChanges:false,configChanges:false,requestingRepoInfo:false,requestingConfig:false};this.controlsElem=T.getElementById("controls");this.tableElem=T.getElementById("commitTable");this.footerElem=T.getElementById("footer");this.scrollShadowElem=T.getElementById("scrollShadow");e.focus();this.graph=new Me("commitGraph",e,this.config.graph,this.config.mute);this.repoDropdown=new Le("repoDropdown",true,false,"Repos",function(e){i.loadRepo(e[0])});this.branchDropdown=new Le("branchDropdown",false,true,"Branches",function(e){i.currentBranches=e;i.maxCommits=i.config.initialLoadCommits;i.saveState();i.clearCommits();i.requestLoadRepoInfoAndCommits(true,true)});this.showRemoteBranchesElem=T.getElementById("showRemoteBranchesCheckbox");this.showRemoteBranchesElem.addEventListener("change",function(){i.saveRepoStateValue(i.currentRepo,"showRemoteBranchesV2",i.showRemoteBranchesElem.checked?1:2);i.refresh(true)});this.refreshBtnElem=T.getElementById("refreshBtn");this.refreshBtnElem.addEventListener("click",function(){if(!i.refreshBtnElem.classList.contains(E)){i.refresh(true,true)}});this.renderRefreshButton();this.findWidget=new Te(this);this.settingsWidget=new Oe(this);re(T.body,h,this.config.referenceLabels.branchLabelsAlignedToGraph);re(T.body,P,this.config.referenceLabels.tagLabelsOnRight);this.observeWindowSizeChanges();this.observeWebviewStyleChanges();this.observeViewScroll();this.observeKeyboardEvents();this.observeUrls();this.observeTableEvents();if(t&&!t.currentRepoLoading&&typeof this.gitRepos[t.currentRepo]!=="undefined"){this.currentRepo=t.currentRepo;this.currentBranches=t.currentBranches;this.maxCommits=t.maxCommits;this.expandedCommit=t.expandedCommit;this.avatars=t.avatars;this.gitConfig=t.gitConfig;this.loadRepoInfo(t.gitBranches,t.gitBranchHead,t.gitRemotes,t.gitStashes,true);this.loadCommits(t.commits,t.commitHead,t.gitTags,t.moreCommitsAvailable,t.onlyFollowFirstParent);this.findWidget.restoreState(t.findWidget);this.settingsWidget.restoreState(t.settingsWidget);this.showRemoteBranchesElem.checked=ct(this.gitRepos[t.currentRepo].showRemoteBranchesV2)}var n=initialState.loadViewTo;if(n===null&&t&&t.currentRepoLoading&&typeof t.currentRepo!=="undefined"){n={repo:t.currentRepo}}if(!this.loadRepos(this.gitRepos,initialState.lastActiveRepo,n)){if(t){this.scrollTop=t.scrollTop;this.viewElem.scroll(0,this.scrollTop)}this.requestLoadRepoInfoAndCommits(false,false)}var o=T.getElementById("fetchBtn"),s=T.getElementById("findBtn"),r=T.getElementById("settingsBtn"),a=T.getElementById("terminalBtn");o.title="Fetch"+(this.config.fetchAndPrune?" & Prune":"")+" from Remote(s)";o.innerHTML=A.download;o.addEventListener("click",function(){return i.fetchFromRemotesAction()});s.innerHTML=A.search;s.addEventListener("click",function(){return i.findWidget.show(true)});r.innerHTML=A.gear;r.addEventListener("click",function(){return i.settingsWidget.show(i.currentRepo)});a.innerHTML=A.terminal;a.addEventListener("click",function(){yt({command:"openTerminal",repo:i.currentRepo,name:i.gitRepos[i.currentRepo].name||Z(i.currentRepo)},"Opening Terminal")})}C.prototype.loadRepos=function(e,t,i){this.gitRepos=e;this.saveState();var n;if(i!==null&&this.currentRepo!==i.repo&&typeof e[i.repo]!=="undefined"){n=i.repo}else if(typeof e[this.currentRepo]==="undefined"){n=t!==null&&typeof e[t]!=="undefined"?t:K(e,this.config.repoDropdownOrder)[0]}else{n=this.currentRepo}re(this.controlsElem,"singleRepo",Object.keys(e).length===1);this.renderRepoDropdownOptions(n);if(i!==null){if(i.repo===n){this.loadViewTo=i}else{this.loadViewTo=null;ve('Unable to load the Git Graph View for the repository "'+i.repo+'". It is not currently included in Git Graph.')}}else{this.loadViewTo=null}if(this.currentRepo!==n){this.loadRepo(n);return true}else{this.finaliseRepoLoad(false);return false}};C.prototype.loadRepo=function(e){this.currentRepo=e;this.currentRepoLoading=true;this.showRemoteBranchesElem.checked=ct(this.gitRepos[this.currentRepo].showRemoteBranchesV2);this.maxCommits=this.config.initialLoadCommits;this.gitConfig=null;this.gitRemotes=[];this.gitStashes=[];this.gitTags=[];this.currentBranches=null;this.renderFetchButton();this.closeCommitDetails(false);this.settingsWidget.close();this.saveState();this.refresh(true)};C.prototype.loadRepoInfo=function(e,t,i,n,o){var s;var r=this;this.gitStashes=n;if(!o||!this.currentRepoRefreshState.hard&&_(this.gitBranches,e)&&this.gitBranchHead===t&&_(this.gitRemotes,i)){this.saveState();this.finaliseLoadRepoInfo(false,o);return}this.gitBranches=e;this.gitBranchHead=t;this.gitRemotes=i;this.renderFetchButton();if(this.currentBranches!==null&&!(this.currentBranches.length===1&&this.currentBranches[0]===m)){var a=this.config.customBranchGlobPatterns.map(function(e){return e.glob});this.currentBranches=this.currentBranches.filter(function(e){return r.gitBranches.includes(e)||a.includes(e)})}if(this.currentBranches===null||this.currentBranches.length===0){var l=ft(this.gitRepos[this.currentRepo].onRepoLoadShowCheckedOutBranch);var h=gt(this.gitRepos[this.currentRepo].onRepoLoadShowSpecificBranches);this.currentBranches=[];if(h.length>0){var c=this.config.customBranchGlobPatterns.map(function(e){return e.glob});(s=this.currentBranches).push.apply(s,h.filter(function(e){return r.gitBranches.includes(e)||c.includes(e)}))}if(l&&this.gitBranchHead!==null&&!this.currentBranches.includes(this.gitBranchHead)){this.currentBranches.push(this.gitBranchHead)}if(this.currentBranches.length===0){this.currentBranches.push(m)}}this.saveState();this.branchDropdown.setOptions(this.getBranchOptions(true),this.currentBranches);var u=this.gitRepos[this.currentRepo].hideRemotes;var d=u.filter(function(e){return i.includes(e)});if(u.length!==d.length){this.saveRepoStateValue(this.currentRepo,"hideRemotes",d)}this.finaliseLoadRepoInfo(true,o)};C.prototype.finaliseLoadRepoInfo=function(e,t){var i=this.currentRepoRefreshState;if(i.inProgress){if(t){i.repoInfoChanges=i.repoInfoChanges||e;i.requestingRepoInfo=false;this.requestLoadCommits()}else{Ye.closeActionRunning();i.inProgress=false;this.loadViewTo=null;this.renderRefreshButton();ge({command:"loadRepos",check:true})}}};C.prototype.loadCommits=function(e,t,i,n,o){var s=!_(this.gitTags,i);this.gitTags=i;if(!this.currentRepoLoading&&!this.currentRepoRefreshState.hard&&this.moreCommitsAvailable===n&&this.onlyFollowFirstParent===o&&this.commitHead===t&&e.length>0&&z(this.commits,e,function(e,t){return e.hash===t.hash&&_(e.heads,t.heads)&&z(e.tags,t.tags,function(e,t){return e.name===t.name&&e.annotated===t.annotated})&&z(e.remotes,t.remotes,function(e,t){return e.name===t.name&&e.remote===t.remote})&&_(e.parents,t.parents)&&(e.stash===null&&t.stash===null||e.stash!==null&&t.stash!==null&&e.stash.selector===t.stash.selector)})&&this.renderedGitBranchHead===this.gitBranchHead){if(this.commits[0].hash===B){this.commits[0]=e[0];this.saveState();this.renderUncommittedChanges();if(this.expandedCommit!==null&&this.expandedCommit.commitElem!==null){if(this.expandedCommit.compareWithHash===null){if(this.expandedCommit.commitHash===B){this.requestCommitDetails(this.expandedCommit.commitHash,true)}}else{if(this.expandedCommit.compareWithElem!==null&&(this.expandedCommit.commitHash===B||this.expandedCommit.compareWithHash===B)){this.requestCommitComparison(this.expandedCommit.commitHash,this.expandedCommit.compareWithHash,true)}}}}else if(s){this.saveState()}this.finaliseLoadCommits();return}var r=this.currentRepoLoading;this.currentRepoLoading=false;this.moreCommitsAvailable=n;this.onlyFollowFirstParent=o;this.commits=e;this.commitHead=t;this.commitLookup={};var a,l=false,h=false,c={},u;for(a=0;a<this.commits.length;a++){u=this.commits[a];this.commitLookup[u.hash]=a;if(this.expandedCommit!==null){if(this.expandedCommit.commitHash===u.hash){l=true}else if(this.expandedCommit.compareWithHash===u.hash){h=true}}if(this.config.fetchAvatars&&typeof this.avatars[u.email]!=="string"&&u.email!==""){if(typeof c[u.email]==="undefined"){c[u.email]=[u.hash]}else{c[u.email].push(u.hash)}}}if(this.expandedCommit!==null&&(!l||this.expandedCommit.compareWithHash!==null&&!h)){this.closeCommitDetails(false)}this.saveState();this.graph.loadCommits(this.commits,this.commitHead,this.commitLookup,this.onlyFollowFirstParent);this.render();if(r&&this.config.onRepoLoad.scrollToHead&&this.commitHead!==null){this.scrollToCommit(this.commitHead,true)}this.finaliseLoadCommits();this.requestAvatars(c)};C.prototype.finaliseLoadCommits=function(){var e=this.currentRepoRefreshState;if(e.inProgress){Ye.closeActionRunning();if(Ye.isTargetDynamicSource()){if(e.repoInfoChanges){Ye.close()}else{Ye.refresh(this.getCommits())}}if(_e.isTargetDynamicSource()){if(e.repoInfoChanges){_e.close()}else{_e.refresh(this.getCommits())}}e.inProgress=false;this.renderRefreshButton()}this.finaliseRepoLoad(true)};C.prototype.finaliseRepoLoad=function(e){if(this.loadViewTo!==null&&this.currentRepo===this.loadViewTo.repo){if(this.loadViewTo.commitDetails&&(this.expandedCommit===null||this.expandedCommit.commitHash!==this.loadViewTo.commitDetails.commitHash||this.expandedCommit.compareWithHash!==this.loadViewTo.commitDetails.compareWithHash)){var t=this.getCommitId(this.loadViewTo.commitDetails.commitHash);var i=this.loadViewTo.commitDetails.compareWithHash!==null?this.getCommitId(this.loadViewTo.commitDetails.compareWithHash):null;var n=de();var o=Rt(n,t);var s=Rt(n,i);if(o!==null&&(this.loadViewTo.commitDetails.compareWithHash===null||s!==null)){if(s!==null){this.loadCommitComparison(o,s)}else{this.loadCommitDetails(o)}}else{ve("Unable to resume Code Review, it could not be found in the latest "+this.maxCommits+" commits that were loaded in this repository.")}}else if(this.loadViewTo.runCommandOnLoad){switch(this.loadViewTo.runCommandOnLoad){case"fetch":this.fetchFromRemotesAction();break}}}this.loadViewTo=null;if(this.gitConfig===null||e&&this.currentRepoRefreshState.configChanges){this.requestLoadConfig()}};C.prototype.clearCommits=function(){xt();this.moreCommitsAvailable=false;this.commits=[];this.commitHead=null;this.commitLookup={};this.renderedGitBranchHead=null;this.closeCommitDetails(false);this.saveState();this.graph.loadCommits(this.commits,this.commitHead,this.commitLookup,this.onlyFollowFirstParent);this.tableElem.innerHTML="";this.footerElem.innerHTML="";this.renderGraph();this.findWidget.refresh()};C.prototype.processLoadRepoInfoResponse=function(e){if(e.error===null){var t=this.currentRepoRefreshState;if(t.inProgress&&t.loadRepoInfoRefreshId===e.refreshId){this.loadRepoInfo(e.branches,e.head,e.remotes,e.stashes,e.isRepo)}}else{this.displayLoadDataError("Unable to load Repository Info",e.error)}};C.prototype.processLoadCommitsResponse=function(e){if(e.error===null){var t=this.currentRepoRefreshState;if(t.inProgress&&t.loadCommitsRefreshId===e.refreshId){this.loadCommits(e.commits,e.head,e.tags,e.moreCommitsAvailable,e.onlyFollowFirstParent)}}else{var i=this.gitBranches.length===0&&e.error.indexOf("bad revision 'HEAD'")>-1?"There are no commits in this repository.":e.error;this.displayLoadDataError("Unable to load Commits",i)}};C.prototype.processLoadConfig=function(e){this.currentRepoRefreshState.requestingConfig=false;if(e.config!==null&&this.currentRepo===e.repo){this.gitConfig=e.config;this.saveState();this.renderCdvExternalDiffBtn()}this.settingsWidget.refresh()};C.prototype.displayLoadDataError=function(e,t){var i=this;this.clearCommits();this.currentRepoRefreshState.inProgress=false;this.loadViewTo=null;this.renderRefreshButton();Ye.showError(e,t,"Retry",function(){i.refresh(true)})};C.prototype.loadAvatar=function(e,t){this.avatars[e]=t;this.saveState();var i=T.getElementsByClassName("avatar"),n=$(e);for(var o=0;o<i.length;o++){if(i[o].dataset.email===n){i[o].innerHTML='<img class="avatarImg" src="'+t+'">'}}};C.prototype.getBranches=function(){return this.gitBranches};C.prototype.getBranchOptions=function(e){var t=[];if(e){t.push({name:"Show All",value:m})}for(var i=0;i<this.config.customBranchGlobPatterns.length;i++){t.push({name:"Glob: "+this.config.customBranchGlobPatterns[i].name,value:this.config.customBranchGlobPatterns[i].glob})}for(var i=0;i<this.gitBranches.length;i++){t.push({name:this.gitBranches[i].indexOf("remotes/")===0?this.gitBranches[i].substring(8):this.gitBranches[i],value:this.gitBranches[i]})}return t};C.prototype.getCommitId=function(e){return typeof this.commitLookup[e]==="number"?this.commitLookup[e]:null};C.prototype.getCommitOfElem=function(e){var t=parseInt(e.dataset.id);return t<this.commits.length?this.commits[t]:null};C.prototype.getCommits=function(){return this.commits};C.prototype.getPushRemote=function(e){var t=this;if(e===void 0){e=null}var i=[];if(this.gitConfig!==null){if(e!==null&&typeof this.gitConfig.branches[e]!=="undefined"){i.push(this.gitConfig.branches[e].pushRemote,this.gitConfig.branches[e].remote)}i.push(this.gitConfig.pushDefault)}i.push("origin");return i.find(function(e){return e!==null&&t.gitRemotes.includes(e)})||this.gitRemotes[0]};C.prototype.getRepoConfig=function(){return this.gitConfig};C.prototype.getRepoState=function(e){return typeof this.gitRepos[e]!=="undefined"?this.gitRepos[e]:null};C.prototype.isConfigLoading=function(){return this.currentRepoRefreshState.requestingConfig};C.prototype.refresh=function(e,t){if(t===void 0){t=false}if(e){this.clearCommits()}this.requestLoadRepoInfoAndCommits(e,false,t)};C.prototype.requestLoadRepoInfo=function(){var e=this.gitRepos[this.currentRepo];ge({command:"loadRepoInfo",repo:this.currentRepo,refreshId:++this.currentRepoRefreshState.loadRepoInfoRefreshId,showRemoteBranches:ct(e.showRemoteBranchesV2),showStashes:ut(e.showStashes),hideRemotes:e.hideRemotes})};C.prototype.requestLoadCommits=function(){var e=this.gitRepos[this.currentRepo];ge({command:"loadCommits",repo:this.currentRepo,refreshId:++this.currentRepoRefreshState.loadCommitsRefreshId,branches:this.currentBranches===null||this.currentBranches.length===1&&this.currentBranches[0]===m?null:this.currentBranches,maxCommits:this.maxCommits,showTags:dt(e.showTags),showRemoteBranches:ct(e.showRemoteBranchesV2),includeCommitsMentionedByReflogs:mt(e.includeCommitsMentionedByReflogs),onlyFollowFirstParent:pt(e.onlyFollowFirstParent),commitOrdering:ht(e.commitOrdering),remotes:this.gitRemotes,hideRemotes:e.hideRemotes,stashes:this.gitStashes})};C.prototype.requestLoadRepoInfoAndCommits=function(e,t,i){if(i===void 0){i=false}var n=this.currentRepoRefreshState;if(n.inProgress){n.hard=n.hard||e;n.configChanges=n.configChanges||i;if(!t){n.loadCommitsRefreshId++}}else{n.hard=e;n.inProgress=true;n.repoInfoChanges=false;n.configChanges=i;n.requestingRepoInfo=false}this.renderRefreshButton();if(this.commits.length===0){this.tableElem.innerHTML='<h2 id="loadingHeader">'+A.loading+"Loading ...</h2>"}if(t){if(!n.requestingRepoInfo){this.requestLoadCommits()}}else{n.requestingRepoInfo=true;this.requestLoadRepoInfo()}};C.prototype.requestLoadConfig=function(){this.currentRepoRefreshState.requestingConfig=true;ge({command:"loadConfig",repo:this.currentRepo,remotes:this.gitRemotes});this.settingsWidget.refresh()};C.prototype.requestCommitDetails=function(e,t){var i=this.commits[this.commitLookup[e]];ge({command:"commitDetails",repo:this.currentRepo,commitHash:e,hasParents:i.parents.length>0,stash:i.stash,avatarEmail:this.config.fetchAvatars&&e!==B?i.email:null,refresh:t})};C.prototype.requestCommitComparison=function(e,t,i){var n=this.getCommitOrder(e,t);ge({command:"compareCommits",repo:this.currentRepo,commitHash:e,compareWithHash:t,fromHash:n.from,toHash:n.to,refresh:i})};C.prototype.requestAvatars=function(e){var t=Object.keys(e),i=this.gitRemotes.length>0?this.gitRemotes.includes("origin")?"origin":this.gitRemotes[0]:null;for(var n=0;n<t.length;n++){ge({command:"fetchAvatar",repo:this.currentRepo,remote:i,email:t[n],commits:e[t[n]]})}};C.prototype.saveState=function(){var e;if(this.expandedCommit!==null){e=Object.assign({},this.expandedCommit);e.commitElem=null;e.compareWithElem=null;e.contextMenuOpen={summary:false,fileView:-1}}else{e=null}t.setState({currentRepo:this.currentRepo,currentRepoLoading:this.currentRepoLoading,gitRepos:this.gitRepos,gitBranches:this.gitBranches,gitBranchHead:this.gitBranchHead,gitConfig:this.gitConfig,gitRemotes:this.gitRemotes,gitStashes:this.gitStashes,gitTags:this.gitTags,commits:this.commits,commitHead:this.commitHead,avatars:this.avatars,currentBranches:this.currentBranches,moreCommitsAvailable:this.moreCommitsAvailable,maxCommits:this.maxCommits,onlyFollowFirstParent:this.onlyFollowFirstParent,expandedCommit:e,scrollTop:this.scrollTop,findWidget:this.findWidget.getState(),settingsWidget:this.settingsWidget.getState()})};C.prototype.saveRepoState=function(){ge({command:"setRepoState",repo:this.currentRepo,state:this.gitRepos[this.currentRepo]})};C.prototype.saveColumnWidths=function(e){this.gitRepos[this.currentRepo].columnWidths=[e[0],e[2],e[3],e[4]];this.saveRepoState()};C.prototype.saveExpandedCommitLoading=function(e,t,i,n,o){this.expandedCommit={index:e,commitHash:t,commitElem:i,compareWithHash:n,compareWithElem:o,commitDetails:null,fileChanges:null,fileTree:null,avatar:null,codeReview:null,lastViewedFile:null,loading:true,scrollTop:{summary:0,fileView:0},contextMenuOpen:{summary:false,fileView:-1}};this.saveState()};C.prototype.saveRepoStateValue=function(e,t,i){if(e===this.currentRepo){this.gitRepos[this.currentRepo][t]=i;this.saveRepoState()}};C.prototype.render=function(){this.renderTable();this.renderGraph()};C.prototype.renderGraph=function(){if(typeof this.currentRepo==="undefined"){return}var e=T.getElementById("tableColHeaders");var t=this.gitRepos[this.currentRepo].cdvHeight;var i=e!==null?e.clientHeight+1:0;var n=this.isCdvDocked()?null:this.expandedCommit;var o=n!==null?T.getElementById("cdv"):null;this.config.graph.grid.expandY=o!==null?o.getBoundingClientRect().height:t;this.config.graph.grid.y=this.commits.length>0&&this.tableElem.children.length>0?(this.tableElem.children[0].clientHeight-i-(n!==null?t:0))/this.commits.length:this.config.graph.grid.y;this.config.graph.grid.offsetY=i+this.config.graph.grid.y/2;this.graph.render(n)};C.prototype.renderTable=function(){var e=this;var t=this.getColumnVisibility();var i=this.commits.length>0&&this.commits[0].hash===B?B:this.commitHead;var n=this.graph.getVertexColours();var o=this.config.referenceLabels.branchLabelsAlignedToGraph?this.graph.getWidthsAtVertices():[];var s=this.graph.getMutedCommits(i);var r=new Ne(this.commits,this.gitRepos[this.currentRepo].issueLinkingConfig,{emoji:true,issueLinking:true,markdown:this.config.markdown});var a='<tr id="tableColHeaders"><th id="tableHeaderGraphCol" class="tableColHeader" data-col="0">Graph</th><th class="tableColHeader" data-col="1">Description</th>'+(t.date?'<th class="tableColHeader dateCol" data-col="2">Date</th>':"")+(t.author?'<th class="tableColHeader authorCol" data-col="3">Author</th>':"")+(t.commit?'<th class="tableColHeader" data-col="4">Commit</th>':"")+"</tr>";for(var l=0;l<this.commits.length;l++){var h=this.commits[l];var c='<span class="text">'+r.format(h.message)+"</span>";var u=ee(h.date);var d=bt(h.heads,h.remotes);var m="",p="",f=void 0,g=void 0,v=void 0,C=void 0,w=void 0,y=void 0,b=null;for(f=0;f<d.heads.length;f++){v=$(d.heads[f].name);w=d.heads[f].name===this.gitBranchHead;y='<span class="gitRef head'+(w?" active":"")+'" data-name="'+v+'">'+A.branch+'<span class="gitRefName" data-fullref="'+v+'">'+v+"</span>";for(g=0;g<d.heads[f].remotes.length;g++){C=$(d.heads[f].remotes[g]);y+='<span class="gitRefHeadRemote" data-remote="'+C+'" data-fullref="'+$(d.heads[f].remotes[g]+"/"+d.heads[f].name)+'">'+C+"</span>"}y+="</span>";m=w?y+m:m+y;if(w)b=this.gitBranchHead}for(f=0;f<d.remotes.length;f++){v=$(d.remotes[f].name);m+='<span class="gitRef remote" data-name="'+v+'" data-remote="'+(d.remotes[f].remote!==null?$(d.remotes[f].remote):"")+'">'+A.branch+'<span class="gitRefName" data-fullref="'+v+'">'+v+"</span></span>"}for(f=0;f<h.tags.length;f++){v=$(h.tags[f].name);p+='<span class="gitRef tag" data-name="'+v+'" data-tagtype="'+(h.tags[f].annotated?"annotated":"lightweight")+'">'+A.tag+'<span class="gitRefName" data-fullref="'+v+'">'+v+"</span></span>"}if(h.stash!==null){v=$(h.stash.selector);m='<span class="gitRef stash" data-name="'+v+'">'+A.stash+'<span class="gitRefName" data-fullref="'+v+'">'+$(h.stash.selector.substring(5))+"</span></span>"+m}var R=h.hash===this.commitHead?'<span class="commitHeadDot" title="'+(b!==null?"The branch "+$('"'+b+'"')+" is currently checked out at this commit":"This commit is currently checked out")+'."></span>':"";a+='<tr class="commit'+(h.hash===i?" current":"")+(s[l]?" mute":"")+'"'+(h.hash!==B?"":' id="uncommittedChanges"')+' data-id="'+l+'" data-color="'+n[l]+'">'+(this.config.referenceLabels.branchLabelsAlignedToGraph?"<td>"+(m!==""?'<span style="margin-left:'+(o[l]-4)+'px"'+m.substring(5):"")+'</td><td><span class="description">'+R:'<td></td><td><span class="description">'+R+m)+(this.config.referenceLabels.tagLabelsOnRight?c+p:p+c)+"</span></td>"+(t.date?'<td class="dateCol text" title="'+u.title+'">'+u.formatted+"</td>":"")+(t.author?'<td class="authorCol text" title="'+$(h.author+" <"+h.email+">")+'">'+(this.config.fetchAvatars?'<span class="avatar" data-email="'+$(h.email)+'">'+(typeof this.avatars[h.email]==="string"?'<img class="avatarImg" src="'+this.avatars[h.email]+'">':"")+"</span>":"")+$(h.author)+"</td>":"")+(t.commit?'<td class="text" title="'+$(h.hash)+'">'+Ct(h.hash)+"</td>":"")+"</tr>"}this.tableElem.innerHTML="<table>"+a+"</table>";this.footerElem.innerHTML=this.moreCommitsAvailable?'<div id="loadMoreCommitsBtn" class="roundedBtn">Load More Commits</div>':"";this.makeTableResizable();this.findWidget.refresh();this.renderedGitBranchHead=this.gitBranchHead;if(this.moreCommitsAvailable){T.getElementById("loadMoreCommitsBtn").addEventListener("click",function(){e.loadMoreCommits()})}if(this.expandedCommit!==null){var E=this.expandedCommit,x=de();var k=Rt(x,this.getCommitId(E.commitHash));var S=E.compareWithHash!==null?Rt(x,this.getCommitId(E.compareWithHash)):null;if(k===null||E.compareWithHash!==null&&S===null){this.closeCommitDetails(false);this.saveState()}else{E.index=parseInt(k.dataset.id);E.commitElem=k;E.compareWithElem=S;this.saveState();if(E.compareWithHash===null){if(!E.loading&&E.commitDetails!==null&&E.fileTree!==null){this.showCommitDetails(E.commitDetails,E.fileTree,E.avatar,E.codeReview,E.lastViewedFile,true);if(E.commitHash===B){this.requestCommitDetails(E.commitHash,true)}}else{this.loadCommitDetails(k)}}else{if(!E.loading&&E.fileChanges!==null&&E.fileTree!==null){this.showCommitComparison(E.commitHash,E.compareWithHash,E.fileChanges,E.fileTree,E.codeReview,E.lastViewedFile,true);if(E.commitHash===B||E.compareWithHash===B){this.requestCommitComparison(E.commitHash,E.compareWithHash,true)}}else{this.loadCommitComparison(k,S)}}}}};C.prototype.renderUncommittedChanges=function(){var e=this.getColumnVisibility(),t=ee(this.commits[0].date);T.getElementById("uncommittedChanges").innerHTML="<td></td><td><b>"+$(this.commits[0].message)+"</b></td>"+(e.date?'<td class="dateCol text" title="'+t.title+'">'+t.formatted+"</td>":"")+(e.author?'<td class="authorCol text" title="* <>">*</td>':"")+(e.commit?'<td class="text" title="*">*</td>':"")};C.prototype.renderFetchButton=function(){re(this.controlsElem,e,this.gitRemotes.length>0)};C.prototype.renderRefreshButton=function(){var e=!this.currentRepoRefreshState.inProgress;this.refreshBtnElem.title=e?"Refresh":"Refreshing";this.refreshBtnElem.innerHTML=e?A.refresh:A.loading;re(this.refreshBtnElem,E,!e)};C.prototype.renderTagDetails=function(e,t,i,n,o,s,r){var a=new Ne(this.commits,this.gitRepos[this.currentRepo].issueLinkingConfig,{commits:true,emoji:true,issueLinking:true,markdown:this.config.markdown,multiline:true,urls:true});var l="Tag <b><i>"+$(e)+'</i></b><br><span class="messageContent">';l+="<b>Object: </b>"+$(t)+"<br>";l+="<b>Commit: </b>"+$(i)+"<br>";l+="<b>Tagger: </b>"+$(n)+' <<a class="'+Ve+'" href="mailto:'+$(o)+'" tabindex="-1">'+$(o)+"</a>><br>";l+="<b>Date: </b>"+te(s)+"<br><br>";l+=a.format(r)+"</span>";Ye.showMessage(l)};C.prototype.renderRepoDropdownOptions=function(e){this.repoDropdown.setOptions(wt(this.gitRepos),[e||this.currentRepo])};C.prototype.getBranchContextMenuActions=function(i){var o=this;var s=i.ref,e=this.config.contextMenuActionsVisibility.branch;var t=this.branchDropdown.isSelected(s);return[[{title:"Checkout Branch",visible:e.checkout&&this.gitBranchHead!==s,onClick:function(){return o.checkoutBranchAction(s,null,null,i)}},{title:"Rename Branch"+H,visible:e.rename,onClick:function(){Ye.showRefInput("Enter the new name for branch <b><i>"+$(s)+"</i></b>:",s,"Rename Branch",function(e){yt({command:"renameBranch",repo:o.currentRepo,oldName:s,newName:e},"Renaming Branch")},i)}},{title:"Delete Branch"+H,visible:e.delete&&this.gitBranchHead!==s,onClick:function(){var t=o.gitRemotes.filter(function(e){return o.gitBranches.includes("remotes/"+e+"/"+s)});var e=[{type:4,name:"Force Delete",value:o.config.dialogDefaults.deleteBranch.forceDelete}];if(t.length>0){e.push({type:4,name:"Delete this branch on the remote"+(o.gitRemotes.length>1?"s":""),value:false,info:"This branch is on the remote"+(t.length>1?"s: ":" ")+Q(t.map(function(e){return'"'+e+'"'}))})}Ye.showForm("Are you sure you want to delete the branch <b><i>"+$(s)+"</i></b>?",e,"Yes, delete",function(e){yt({command:"deleteBranch",repo:o.currentRepo,branchName:s,forceDelete:e[0],deleteOnRemotes:t.length>0&&e[1]?t:[]},"Deleting Branch")},i)}},{title:"Merge into current branch"+H,visible:e.merge&&this.gitBranchHead!==s,onClick:function(){return o.mergeAction(s,s,"Branch",i)}},{title:"Rebase current branch on Branch"+H,visible:e.rebase&&this.gitBranchHead!==s,onClick:function(){return o.rebaseAction(s,s,"Branch",i)}},{title:"Push Branch"+H,visible:e.push&&this.gitRemotes.length>0,onClick:function(){var n=o.gitRemotes.length>1;var e=[{type:4,name:"Set Upstream",value:true},{type:3,name:"Push Mode",options:[{name:"Normal",value:""},{name:"Force With Lease",value:"force-with-lease"},{name:"Force",value:"force"}],default:""}];if(n){e.unshift({type:2,name:"Push to Remote(s)",defaults:[o.getPushRemote(s)],options:o.gitRemotes.map(function(e){return{name:e,value:e}}),multiple:true})}Ye.showForm("Are you sure you want to push the branch <b><i>"+$(s)+"</i></b>"+(n?"":" to the remote <b><i>"+$(o.gitRemotes[0])+"</i></b>")+"?",e,"Yes, push",function(e){var t=n?e.shift():[o.gitRemotes[0]];var i=e[0];yt({command:"pushBranch",repo:o.currentRepo,branchName:s,remotes:t,setUpstream:i,mode:e[1],willUpdateBranchConfig:i&&t.length>0&&(o.gitConfig===null||typeof o.gitConfig.branches[s]==="undefined"||o.gitConfig.branches[s].remote!==t[t.length-1])},"Pushing Branch")},i)}}],[{title:"Create Pull Request"+H,visible:e.createPullRequest&&this.gitRepos[this.currentRepo].pullRequestConfig!==null,onClick:function(){var t=o.gitRepos[o.currentRepo].pullRequestConfig;if(t===null)return;Ye.showCheckbox("Are you sure you want to create a Pull Request for branch <b><i>"+$(s)+"</i></b>?","Push branch before creating the Pull Request",true,"Yes, create Pull Request",function(e){yt({command:"createPullRequest",repo:o.currentRepo,config:t,sourceRemote:t.sourceRemote,sourceOwner:t.sourceOwner,sourceRepo:t.sourceRepo,sourceBranch:s,push:e},"Creating Pull Request")},i)}}],[{title:"Create Archive",visible:e.createArchive,onClick:function(){yt({command:"createArchive",repo:o.currentRepo,ref:s},"Creating Archive")}},{title:"Select in Branches Dropdown",visible:e.selectInBranchesDropdown&&!t,onClick:function(){return o.branchDropdown.selectOption(s)}},{title:"Unselect in Branches Dropdown",visible:e.unselectInBranchesDropdown&&t,onClick:function(){return o.branchDropdown.unselectOption(s)}}],[{title:"Copy Branch Name to Clipboard",visible:e.copyName,onClick:function(){ge({command:"copyToClipboard",type:"Branch Name",data:s})}}]]};C.prototype.getCommitContextMenuActions=function(n){var o=this;var s=n.hash,e=this.config.contextMenuActionsVisibility.commit;var r=this.commits[this.commitLookup[s]];return[[{title:"Add Tag"+H,visible:e.addTag,onClick:function(){return o.addTagAction(s,"",o.config.dialogDefaults.addTag.type,"",null,n)}},{title:"Create Branch"+H,visible:e.createBranch,onClick:function(){return o.createBranchAction(s,"",o.config.dialogDefaults.createBranch.checkout,n)}}],[{title:"Checkout"+(globalState.alwaysAcceptCheckoutCommit?"":H),visible:e.checkout,onClick:function(){var t=function(){return yt({command:"checkoutCommit",repo:o.currentRepo,commitHash:s},"Checking out Commit")};if(globalState.alwaysAcceptCheckoutCommit){t()}else{Ye.showCheckbox("Are you sure you want to checkout commit <b><i>"+Ct(s)+"</i></b>? This will result in a 'detached HEAD' state.","Always Accept",false,"Yes, checkout",function(e){if(e){pe("alwaysAcceptCheckoutCommit",true)}t()},n)}}},{title:"Cherry Pick"+H,visible:e.cherrypick,onClick:function(){var i=r.parents.length>1;var e=[];if(i){var t=r.parents.map(function(e,t){return{name:Ct(e)+(typeof o.commitLookup[e]==="number"?": "+o.commits[o.commitLookup[e]].message:""),value:(t+1).toString()}});e.push({type:2,name:"Parent Hash",options:t,default:"1",info:"Choose the parent hash on the main branch, to cherry pick the commit relative to."})}e.push({type:4,name:"Record Origin",value:o.config.dialogDefaults.cherryPick.recordOrigin,info:'Record that this commit was the origin of the cherry pick by appending a line to the original commit message that states "(cherry picked from commit ...)".'},{type:4,name:"No Commit",value:o.config.dialogDefaults.cherryPick.noCommit,info:"Cherry picked changes will be staged but not committed, so that you can select and commit specific parts of this commit."});Ye.showForm("Are you sure you want to cherry pick commit <b><i>"+Ct(s)+"</i></b>?",e,"Yes, cherry pick",function(e){var t=i?parseInt(e.shift()):0;yt({command:"cherrypickCommit",repo:o.currentRepo,commitHash:s,parentIndex:t,recordOrigin:e[0],noCommit:e[1]},"Cherry picking Commit")},n)}},{title:"Revert"+H,visible:e.revert,onClick:function(){if(r.parents.length>1){var e=r.parents.map(function(e,t){return{name:Ct(e)+(typeof o.commitLookup[e]==="number"?": "+o.commits[o.commitLookup[e]].message:""),value:(t+1).toString()}});Ye.showSelect("Are you sure you want to revert merge commit <b><i>"+Ct(s)+"</i></b>? Choose the parent hash on the main branch, to revert the commit relative to:","1",e,"Yes, revert",function(e){yt({command:"revertCommit",repo:o.currentRepo,commitHash:s,parentIndex:parseInt(e)},"Reverting Commit")},n)}else{Ye.showConfirmation("Are you sure you want to revert commit <b><i>"+Ct(s)+"</i></b>?","Yes, revert",function(){yt({command:"revertCommit",repo:o.currentRepo,commitHash:s,parentIndex:0},"Reverting Commit")},n)}}},{title:"Drop"+H,visible:e.drop&&this.graph.dropCommitPossible(this.commitLookup[s]),onClick:function(){Ye.showConfirmation("Are you sure you want to permanently drop commit <b><i>"+Ct(s)+"</i></b>?"+(o.onlyFollowFirstParent?'<br/><i>Note: By enabling "Only follow the first parent of commits", some commits may have been hidden from the Git Graph View that could affect the outcome of performing this action.</i>':""),"Yes, drop",function(){yt({command:"dropCommit",repo:o.currentRepo,commitHash:s},"Dropping Commit")},n)}}],[{title:"Merge into current branch"+H,visible:e.merge,onClick:function(){return o.mergeAction(s,Ct(s),"Commit",n)}},{title:"Rebase current branch on this Commit"+H,visible:e.rebase,onClick:function(){return o.rebaseAction(s,Ct(s),"Commit",n)}},{title:"Reset current branch to this Commit"+H,visible:e.reset,onClick:function(){Ye.showSelect("Are you sure you want to reset "+(o.gitBranchHead!==null?"<b><i>"+$(o.gitBranchHead)+"</i></b> (the current branch)":"the current branch")+" to commit <b><i>"+Ct(s)+"</i></b>?",o.config.dialogDefaults.resetCommit.mode,[{name:"Soft - Keep all changes, but reset head",value:"soft"},{name:"Mixed - Keep working tree, but reset index",value:"mixed"},{name:"Hard - Discard all changes",value:"hard"}],"Yes, reset",function(e){yt({command:"resetToCommit",repo:o.currentRepo,commit:s,resetMode:e},"Resetting to Commit")},n)}}],[{title:"Copy Commit Hash to Clipboard",visible:e.copyHash,onClick:function(){ge({command:"copyToClipboard",type:"Commit Hash",data:s})}},{title:"Copy Commit Subject to Clipboard",visible:e.copySubject,onClick:function(){ge({command:"copyToClipboard",type:"Commit Subject",data:r.message})}}]]};C.prototype.getRemoteBranchContextMenuActions=function(i,e){var n=this;var t=e.ref,o=this.config.contextMenuActionsVisibility.remoteBranch;var s=i!==""?t.substring(i.length+1):"";var r="remotes/"+t;var a=this.branchDropdown.isSelected(r);return[[{title:"Checkout Branch"+H,visible:o.checkout,onClick:function(){return n.checkoutBranchAction(t,i,null,e)}},{title:"Delete Remote Branch"+H,visible:o.delete&&i!=="",onClick:function(){Ye.showConfirmation("Are you sure you want to delete the remote branch <b><i>"+$(t)+"</i></b>?","Yes, delete",function(){yt({command:"deleteRemoteBranch",repo:n.currentRepo,branchName:s,remote:i},"Deleting Remote Branch")},e)}},{title:"Fetch into local branch"+H,visible:o.fetch&&i!==""&&this.gitBranches.includes(s)&&this.gitBranchHead!==s,onClick:function(){Ye.showForm("Are you sure you want to fetch the remote branch <b><i>"+$(t)+"</i></b> into the local branch <b><i>"+$(s)+"</i></b>?",[{type:4,name:"Force Fetch",value:n.config.dialogDefaults.fetchIntoLocalBranch.forceFetch,info:"Force the local branch to be reset to this remote branch."}],"Yes, fetch",function(e){yt({command:"fetchIntoLocalBranch",repo:n.currentRepo,remote:i,remoteBranch:s,localBranch:s,force:e[0]},"Fetching Branch")},e)}},{title:"Merge into current branch"+H,visible:o.merge,onClick:function(){return n.mergeAction(t,t,"Remote-tracking Branch",e)}},{title:"Pull into current branch"+H,visible:o.pull&&i!=="",onClick:function(){Ye.showForm("Are you sure you want to pull the remote branch <b><i>"+$(t)+"</i></b> into "+(n.gitBranchHead!==null?"<b><i>"+$(n.gitBranchHead)+"</i></b> (the current branch)":"the current branch")+"? If a merge is required:",[{type:4,name:"Create a new commit even if fast-forward is possible",value:n.config.dialogDefaults.pullBranch.noFastForward},{type:4,name:"Squash Commits",value:n.config.dialogDefaults.pullBranch.squash,info:"Create a single commit on the current branch whose effect is the same as merging this remote branch."}],"Yes, pull",function(e){yt({command:"pullBranch",repo:n.currentRepo,branchName:s,remote:i,createNewCommit:e[0],squash:e[1]},"Pulling Branch")},e)}}],[{title:"Create Pull Request",visible:o.createPullRequest&&this.gitRepos[this.currentRepo].pullRequestConfig!==null&&s!=="HEAD"&&(this.gitRepos[this.currentRepo].pullRequestConfig.sourceRemote===i||this.gitRepos[this.currentRepo].pullRequestConfig.destRemote===i),onClick:function(){var e=n.gitRepos[n.currentRepo].pullRequestConfig;if(e===null)return;var t=e.destRemote===i;yt({command:"createPullRequest",repo:n.currentRepo,config:e,sourceRemote:t?e.destRemote:e.sourceRemote,sourceOwner:t?e.destOwner:e.sourceOwner,sourceRepo:t?e.destRepo:e.sourceRepo,sourceBranch:s,push:false},"Creating Pull Request")}}],[{title:"Create Archive",visible:o.createArchive,onClick:function(){yt({command:"createArchive",repo:n.currentRepo,ref:t},"Creating Archive")}},{title:"Select in Branches Dropdown",visible:o.selectInBranchesDropdown&&!a,onClick:function(){return n.branchDropdown.selectOption(r)}},{title:"Unselect in Branches Dropdown",visible:o.unselectInBranchesDropdown&&a,onClick:function(){return n.branchDropdown.unselectOption(r)}}],[{title:"Copy Branch Name to Clipboard",visible:o.copyName,onClick:function(){ge({command:"copyToClipboard",type:"Branch Name",data:t})}}]]};C.prototype.getStashContextMenuActions=function(e){var t=this;var i=e.hash,n=e.ref,o=this.config.contextMenuActionsVisibility.stash;return[[{title:"Apply Stash"+H,visible:o.apply,onClick:function(){Ye.showForm("Are you sure you want to apply the stash <b><i>"+$(n.substring(5))+"</i></b>?",[{type:4,name:"Reinstate Index",value:t.config.dialogDefaults.applyStash.reinstateIndex,info:"Attempt to reinstate the indexed changes, in addition to the working tree's changes."}],"Yes, apply stash",function(e){yt({command:"applyStash",repo:t.currentRepo,selector:n,reinstateIndex:e[0]},"Applying Stash")},e)}},{title:"Create Branch from Stash"+H,visible:o.createBranch,onClick:function(){Ye.showRefInput("Create a branch from stash <b><i>"+$(n.substring(5))+"</i></b> with the name:","","Create Branch",function(e){yt({command:"branchFromStash",repo:t.currentRepo,selector:n,branchName:e},"Creating Branch")},e)}},{title:"Pop Stash"+H,visible:o.pop,onClick:function(){Ye.showForm("Are you sure you want to pop the stash <b><i>"+$(n.substring(5))+"</i></b>?",[{type:4,name:"Reinstate Index",value:t.config.dialogDefaults.popStash.reinstateIndex,info:"Attempt to reinstate the indexed changes, in addition to the working tree's changes."}],"Yes, pop stash",function(e){yt({command:"popStash",repo:t.currentRepo,selector:n,reinstateIndex:e[0]},"Popping Stash")},e)}},{title:"Drop Stash"+H,visible:o.drop,onClick:function(){Ye.showConfirmation("Are you sure you want to drop the stash <b><i>"+$(n.substring(5))+"</i></b>?","Yes, drop",function(){yt({command:"dropStash",repo:t.currentRepo,selector:n},"Dropping Stash")},e)}}],[{title:"Copy Stash Name to Clipboard",visible:o.copyName,onClick:function(){ge({command:"copyToClipboard",type:"Stash Name",data:n})}},{title:"Copy Stash Hash to Clipboard",visible:o.copyHash,onClick:function(){ge({command:"copyToClipboard",type:"Stash Hash",data:i})}}]]};C.prototype.getTagContextMenuActions=function(e,n){var o=this;var t=n.hash,s=n.ref,i=this.config.contextMenuActionsVisibility.tag;return[[{title:"View Details",visible:i.viewDetails&&e,onClick:function(){yt({command:"tagDetails",repo:o.currentRepo,tagName:s,commitHash:t},"Retrieving Tag Details")}},{title:"Delete Tag"+H,visible:i.delete,onClick:function(){var e="Are you sure you want to delete the tag <b><i>"+$(s)+"</i></b>?";if(o.gitRemotes.length>1){var i=[{name:"Don't delete on any remote",value:"-1"}];o.gitRemotes.forEach(function(e,t){return i.push({name:e,value:t.toString()})});Ye.showSelect(e+"<br>Do you also want to delete the tag on a remote:","-1",i,"Yes, delete",function(e){o.deleteTagAction(s,e!=="-1"?o.gitRemotes[parseInt(e)]:null)},n)}else if(o.gitRemotes.length===1){Ye.showCheckbox(e,"Also delete on remote",false,"Yes, delete",function(e){o.deleteTagAction(s,e?o.gitRemotes[0]:null)},n)}else{Ye.showConfirmation(e,"Yes, delete",function(){o.deleteTagAction(s,null)},n)}}},{title:"Push Tag"+H,visible:i.push&&this.gitRemotes.length>0,onClick:function(){if(o.gitRemotes.length===1){Ye.showConfirmation("Are you sure you want to push the tag <b><i>"+$(s)+"</i></b> to the remote <b><i>"+$(o.gitRemotes[0])+"</i></b>?","Yes, push",function(){yt({command:"pushTag",repo:o.currentRepo,tagName:s,remotes:[o.gitRemotes[0]]},"Pushing Tag")},n)}else if(o.gitRemotes.length>1){var e=[o.getPushRemote()];var t=o.gitRemotes.map(function(e){return{name:e,value:e}});Ye.showMultiSelect("Are you sure you want to push the tag <b><i>"+$(s)+"</i></b>? Select the remote(s) to push the tag to:",e,t,"Yes, push",function(e){yt({command:"pushTag",repo:o.currentRepo,tagName:s,remotes:e},"Pushing Tag")},n)}}}],[{title:"Create Archive",visible:i.createArchive,onClick:function(){yt({command:"createArchive",repo:o.currentRepo,ref:s},"Creating Archive")}},{title:"Copy Tag Name to Clipboard",visible:i.copyName,onClick:function(){ge({command:"copyToClipboard",type:"Tag Name",data:s})}}]]};C.prototype.getUncommittedChangesContextMenuActions=function(e){var t=this;var i=this.config.contextMenuActionsVisibility.uncommittedChanges;return[[{title:"Stash uncommitted changes"+H,visible:i.stash,onClick:function(){Ye.showForm("Are you sure you want to stash the <b>uncommitted changes</b>?",[{type:0,name:"Message",default:"",placeholder:"Optional"},{type:4,name:"Include Untracked",value:t.config.dialogDefaults.stashUncommittedChanges.includeUntracked,info:"Include all untracked files in the stash, and then clean them from the working directory."}],"Yes, stash",function(e){yt({command:"pushStash",repo:t.currentRepo,message:e[0],includeUntracked:e[1]},"Stashing uncommitted changes")},e)}}],[{title:"Reset uncommitted changes"+H,visible:i.reset,onClick:function(){Ye.showSelect("Are you sure you want to reset the <b>uncommitted changes</b> to <b>HEAD</b>?",t.config.dialogDefaults.resetUncommitted.mode,[{name:"Mixed - Keep working tree, but reset index",value:"mixed"},{name:"Hard - Discard all changes",value:"hard"}],"Yes, reset",function(e){yt({command:"resetToCommit",repo:t.currentRepo,commit:"HEAD",resetMode:e},"Resetting uncommitted changes")},e)}},{title:"Clean untracked files"+H,visible:i.clean,onClick:function(){Ye.showCheckbox("Are you sure you want to clean all untracked files?","Clean untracked directories",true,"Yes, clean",function(e){yt({command:"cleanUntrackedFiles",repo:t.currentRepo,directories:e},"Cleaning untracked files")},e)}}],[{title:"Open Source Control View",visible:i.openSourceControlView,onClick:function(){ge({command:"viewScm"})}}]]};C.prototype.addTagAction=function(s,e,t,i,n,r,o){var a=this;if(o===void 0){o=true}var l=-1;for(var h=0;h<this.commits.length;h++){if(this.commits[h].tags.length>0&&(l===-1||this.commits[h].date>this.commits[l].date)){l=h}}var c=l>-1?this.commits[l].tags.map(function(e){return'"'+e.name+'"'}):[];var u=[{type:1,name:"Name",default:e,info:c.length>0?"The most recent tag"+(c.length>1?"s":"")+" in the loaded commits "+(c.length>1?"are":"is")+" "+Q(c)+".":undefined},{type:2,name:"Type",default:t===0?"annotated":"lightweight",options:[{name:"Annotated",value:"annotated"},{name:"Lightweight",value:"lightweight"}]},{type:0,name:"Message",default:i,placeholder:"Optional",info:"A message can only be added to an annotated tag."}];if(this.gitRemotes.length>1){var d=[{name:"Don't push",value:"-1"}];this.gitRemotes.forEach(function(e,t){return d.push({name:e,value:t.toString()})});var m=n!==null?this.gitRemotes.indexOf(n):o&&this.config.dialogDefaults.addTag.pushToRemote?this.gitRemotes.indexOf(this.getPushRemote()):-1;u.push({type:2,name:"Push to remote",options:d,default:m.toString(),info:"Once this tag has been added, push it to this remote."})}else if(this.gitRemotes.length===1){var p=n!==null||o&&this.config.dialogDefaults.addTag.pushToRemote;u.push({type:4,name:"Push to remote",value:p,info:"Once this tag has been added, push it to the repositories remote."})}Ye.showForm("Add tag to commit <b><i>"+Ct(s)+"</i></b>:",u,"Add Tag",function(e){var t=e[0];var i=e[1]==="annotated"?0:1;var n=e[2];var o=a.gitRemotes.length>1&&e[3]!=="-1"?a.gitRemotes[parseInt(e[3])]:a.gitRemotes.length===1&&e[3]?a.gitRemotes[0]:null;if(a.gitTags.includes(t)){Ye.showTwoButtons("A tag named <b><i>"+$(t)+"</i></b> already exists, do you want to replace it with this new tag?","Yes, replace the existing tag",function(){yt({command:"addTag",repo:a.currentRepo,tagName:t,commitHash:s,type:i,message:n,pushToRemote:o,force:true},"Adding Tag")},"No, choose another tag name",function(){a.addTagAction(s,t,i,n,o,r,false)},r)}else{yt({command:"addTag",repo:a.currentRepo,tagName:t,commitHash:s,type:i,message:n,pushToRemote:o,force:false},"Adding Tag")}},r)};C.prototype.checkoutBranchAction=function(i,n,e,o){var s=this;if(n!==null){Ye.showRefInput("Enter the name of the new branch you would like to create when checking out <b><i>"+$(i)+"</i></b>:",e!==null?e:n!==""?i.substring(n.length+1):i,"Checkout Branch",function(e){if(s.gitBranches.includes(e)){var t=n!=="";Ye.showTwoButtons("The name <b><i>"+$(e)+"</i></b> is already used by another branch:","Choose another branch name",function(){s.checkoutBranchAction(i,n,e,o)},"Checkout the existing branch"+(t?" & pull changes":""),function(){yt({command:"checkoutBranch",repo:s.currentRepo,branchName:e,remoteBranch:null,pullAfterwards:t?{branchName:i.substring(n.length+1),remote:n,createNewCommit:s.config.dialogDefaults.pullBranch.noFastForward,squash:s.config.dialogDefaults.pullBranch.squash}:null},"Checking out Branch"+(t?" & Pulling Changes":""))},o)}else{yt({command:"checkoutBranch",repo:s.currentRepo,branchName:e,remoteBranch:i,pullAfterwards:null},"Checking out Branch")}},o)}else{yt({command:"checkoutBranch",repo:this.currentRepo,branchName:i,remoteBranch:null,pullAfterwards:null},"Checking out Branch")}};C.prototype.createBranchAction=function(n,e,t,o){var s=this;Ye.showForm("Create branch at commit <b><i>"+Ct(n)+"</i></b>:",[{type:1,name:"Name",default:e},{type:4,name:"Check out",value:t}],"Create Branch",function(e){var t=e[0],i=e[1];if(s.gitBranches.includes(t)){Ye.showTwoButtons("A branch named <b><i>"+$(t)+"</i></b> already exists, do you want to replace it with this new branch?","Yes, replace the existing branch",function(){yt({command:"createBranch",repo:s.currentRepo,branchName:t,commitHash:n,checkout:i,force:true},"Creating Branch")},"No, choose another branch name",function(){s.createBranchAction(n,t,i,o)},o)}else{yt({command:"createBranch",repo:s.currentRepo,branchName:t,commitHash:n,checkout:i,force:false},"Creating Branch")}},o)};C.prototype.deleteTagAction=function(e,t){yt({command:"deleteTag",repo:this.currentRepo,tagName:e,deleteOnRemote:t},"Deleting Tag")};C.prototype.fetchFromRemotesAction=function(){yt({command:"fetch",repo:this.currentRepo,name:null,prune:this.config.fetchAndPrune,pruneTags:this.config.fetchAndPruneTags},"Fetching from Remote(s)")};C.prototype.mergeAction=function(t,e,i,n){var o=this;Ye.showForm("Are you sure you want to merge "+i.toLowerCase()+" <b><i>"+$(e)+"</i></b> into "+(this.gitBranchHead!==null?"<b><i>"+$(this.gitBranchHead)+"</i></b> (the current branch)":"the current branch")+"?",[{type:4,name:"Create a new commit even if fast-forward is possible",value:this.config.dialogDefaults.merge.noFastForward},{type:4,name:"Squash Commits",value:this.config.dialogDefaults.merge.squash,info:"Create a single commit on the current branch whose effect is the same as merging this "+i.toLowerCase()+"."},{type:4,name:"No Commit",value:this.config.dialogDefaults.merge.noCommit,info:"The changes of the merge will be staged but not committed, so that you can review and/or modify the merge result before committing."}],"Yes, merge",function(e){yt({command:"merge",repo:o.currentRepo,obj:t,actionOn:i,createNewCommit:e[0],squash:e[1],noCommit:e[2]},"Merging "+i)},n)};C.prototype.rebaseAction=function(i,e,n,t){var o=this;Ye.showForm("Are you sure you want to rebase "+(this.gitBranchHead!==null?"<b><i>"+$(this.gitBranchHead)+"</i></b> (the current branch)":"the current branch")+" on "+n.toLowerCase()+" <b><i>"+$(e)+"</i></b>?",[{type:4,name:"Launch Interactive Rebase in new Terminal",value:this.config.dialogDefaults.rebase.interactive},{type:4,name:"Ignore Date",value:this.config.dialogDefaults.rebase.ignoreDate,info:"Only applicable to a non-interactive rebase."}],"Yes, rebase",function(e){var t=e[0];yt({command:"rebase",repo:o.currentRepo,obj:i,actionOn:n,ignoreDate:e[1],interactive:t},t?"Launching Interactive Rebase":"Rebasing on "+n)},t)};C.prototype.makeTableResizable=function(){var s=this;var e=T.getElementById("tableColHeaders"),r=T.getElementsByClassName("tableColHeader");var a,l=-1,h=-1,c=-1;var o=function(){r[0].style.width=a[0]+"px";r[0].style.padding="";for(var e=2;e<r.length;e++){r[e].style.width=a[parseInt(r[e].dataset.col)]+"px"}s.tableElem.className="fixedLayout";s.tableElem.style.removeProperty(G);s.graph.limitMaxWidth(a[0]+R)};for(var t=0;t<r.length;t++){var i=parseInt(r[t].dataset.col);r[t].innerHTML+=(t>0?'<span class="resizeCol left" data-col="'+(i-1)+'"></span>':"")+(t<r.length-1?'<span class="resizeCol right" data-col="'+i+'"></span>':"")}var n=this.gitRepos[this.currentRepo].columnWidths;if(n===null){var u=this.config.defaultColumnVisibility;a=[w,w,u.date?w:v,u.author?w:v,u.commit?w:v];this.saveColumnWidths(a)}else{a=[n[0],w,n[1],n[2],n[3]]}if(a[0]!==w){o()}else{this.tableElem.className="autoLayout";var d=r[0].offsetWidth,m=this.graph.getContentWidth();var p=Math.round(this.viewElem.clientWidth*.333);if(Math.max(m,d)>p){this.graph.limitMaxWidth(p);m=p;this.tableElem.className+=" limitGraphWidth";this.tableElem.style.setProperty(G,p+"px")}else{this.graph.limitMaxWidth(-1);this.tableElem.style.removeProperty(G)}if(d<Math.max(m,64)){r[0].style.padding="6px "+Math.floor((Math.max(m,64)-(d-R))/2)+"px"}}var f=function(e){if(h>-1){var t=e;var i=t.clientX-l;if(h===0){if(a[0]+i<b)i=-a[0]+b;if(r[1].clientWidth-R-i<b)i=r[1].clientWidth-R-b;a[0]+=i;r[0].style.width=a[0]+"px";s.graph.limitMaxWidth(a[0]+R)}else{var n=h!==1?a[h]:r[1].clientWidth-R;var o=h+1;while(a[o]===v)o++;if(n+i<b)i=-n+b;if(a[o]-i<b)i=a[o]-b;if(h!==1){a[h]+=i;r[c].style.width=a[h]+"px"}a[o]-=i;r[c+1].style.width=a[o]+"px"}l=t.clientX}};var g=function(){if(h>-1){h=-1;c=-1;l=-1;je.remove();s.saveColumnWidths(a)}};ie("resizeCol","mousedown",function(e){if(e.target===null)return;h=parseInt(e.target.dataset.col);while(a[h]===v)h--;l=e.clientX;var t=a[0]===w;for(var i=0;i<r.length;i++){var n=parseInt(r[i].dataset.col);if(t&&n!==1)a[n]=r[i].clientWidth-R;if(n===h)c=i}if(t)o();je.create("colResize",f,g)});e.addEventListener("contextmenu",function(e){me(e);var t=function(e,t){a[e]=a[e]!==v?v:a[0]===w?w:t-R;s.saveColumnWidths(a);s.render()};var i=ht(s.gitRepos[s.currentRepo].commitOrdering);var n=function(e){s.saveRepoStateValue(s.currentRepo,"commitOrdering",e);s.refresh(true)};_e.show([[{title:"Date",visible:true,checked:a[2]!==v,onClick:function(){return t(2,128)}},{title:"Author",visible:true,checked:a[3]!==v,onClick:function(){return t(3,128)}},{title:"Commit",visible:true,checked:a[4]!==v,onClick:function(){return t(4,80)}}],[{title:"Commit Timestamp Order",visible:true,checked:i==="date",onClick:function(){return n("date")}},{title:"Author Timestamp Order",visible:true,checked:i==="author-date",onClick:function(){return n("author-date")}},{title:"Topological Order",visible:true,checked:i==="topo",onClick:function(){return n("topo")}}]],true,null,e,s.viewElem)})};C.prototype.getColumnVisibility=function(){var e=this.gitRepos[this.currentRepo].columnWidths;if(e!==null){return{date:e[1]!==v,author:e[2]!==v,commit:e[3]!==v}}else{var t=this.config.defaultColumnVisibility;return{date:t.date,author:t.author,commit:t.commit}}};C.prototype.getNumColumns=function(){var e=this.getColumnVisibility();return 2+(e.date?1:0)+(e.author?1:0)+(e.commit?1:0)};C.prototype.scrollToStash=function(e){var t=this;var i=this.commits.filter(function(e){return e.stash!==null});if(i.length>0){var n=(new Date).getTime();if(this.lastScrollToStash.time<n-5e3){this.lastScrollToStash.hash=null}var o=this.lastScrollToStash.hash!==null?i.findIndex(function(e){return e.hash===t.lastScrollToStash.hash}):-1;var s=o+(e?1:-1);if(s>=i.length){s=0}else if(s<0){s=i.length-1}this.scrollToCommit(i[s].hash,true,true);this.lastScrollToStash.time=n;this.lastScrollToStash.hash=i[s].hash}};C.prototype.scrollToCommit=function(e,t,i){if(i===void 0){i=false}var n=Rt(de(),this.getCommitId(e));if(n===null)return;var o=this.controlsElem.clientHeight+n.offsetTop;if(t||o-8<this.viewElem.scrollTop||o+32-this.viewElem.clientHeight>this.viewElem.scrollTop){this.viewElem.scroll(0,this.controlsElem.clientHeight+n.offsetTop+12-this.viewElem.clientHeight/2)}if(i&&!n.classList.contains("flash")){n.classList.add("flash");setTimeout(function(){n.classList.remove("flash")},850)}};C.prototype.loadMoreCommits=function(){this.footerElem.innerHTML='<h2 id="loadingHeader">'+A.loading+"Loading ...</h2>";this.maxCommits+=this.config.loadMoreCommits;this.saveState();this.requestLoadRepoInfoAndCommits(false,true)};C.prototype.observeWindowSizeChanges=function(){var e=this;var t=c.outerWidth,i=c.outerHeight;c.addEventListener("resize",function(){if(t===c.outerWidth&&i===c.outerHeight){e.renderGraph()}else{t=c.outerWidth;i=c.outerHeight}})};C.prototype.observeWebviewStyleChanges=function(){var o=this;var s=Ce(V),r=Ce(U),a=Ce(N),l=!!Ce(W);var h=function(e){T.body.style.setProperty("--git-graph-flashPrimary",j(e,.7));T.body.style.setProperty("--git-graph-flashSecondary",j(e,.5))};var c=function(){re(T.body,"selection-background-color-exists",l)};this.findWidget.setColour(a);h(a);c();new MutationObserver(function(){var e=Ce(V),t=Ce(U),i=Ce(N),n=!!Ce(W);if(e!==s||t!==r){s=e;r=t;o.repoDropdown.refresh();o.branchDropdown.refresh()}if(i!==a){a=i;o.findWidget.setColour(a);h(a)}if(l!==n){l=n;c()}}).observe(T.documentElement,{attributes:true,attributeFilter:["style"]})};C.prototype.observeViewScroll=function(){var n=this;var o=this.viewElem.scrollTop>0,s=null;this.scrollShadowElem.className=o?p:"";this.viewElem.addEventListener("scroll",function(){var e=n.viewElem.scrollTop;if(o!==e>0){o=e>0;n.scrollShadowElem.className=o?p:""}if(n.config.loadMoreCommitsAutomatically&&n.moreCommitsAvailable&&!n.currentRepoRefreshState.inProgress){var t=n.viewElem.clientHeight,i=n.viewElem.scrollHeight;if(e>0&&t>0&&i>0&&e+t>=i-25){n.loadMoreCommits()}}if(s!==null)clearTimeout(s);s=setTimeout(function(){n.scrollTop=e;n.saveState();s=null},250)})};C.prototype.observeKeyboardEvents=function(){var r=this;T.addEventListener("keydown",function(e){if(_e.isOpen()){if(e.key==="Escape"){_e.close();me(e)}}else if(Ye.isOpen()){if(e.key==="Escape"){Ye.close();me(e)}else if(e.keyCode?e.keyCode===13:e.key==="Enter"){Ye.submit();me(e)}}else if(r.expandedCommit!==null&&(e.key==="ArrowUp"||e.key==="ArrowDown")){var t=r.commitLookup[r.expandedCommit.commitHash];var i=-1;if(e.ctrlKey||e.metaKey){if(e.shiftKey){if(e.key==="ArrowUp"){i=r.graph.getAlternativeChildIndex(t)}else if(e.key==="ArrowDown"){i=r.graph.getAlternativeParentIndex(t)}}else{if(e.key==="ArrowUp"){i=r.graph.getFirstChildIndex(t)}else if(e.key==="ArrowDown"){i=r.graph.getFirstParentIndex(t)}}}else{if(e.key==="ArrowUp"&&t>0){i=t-1}else if(e.key==="ArrowDown"&&t<r.commits.length-1){i=t+1}}if(i>-1){me(e);var n=Rt(de(),i);if(n!==null)r.loadCommitDetails(n)}}else if(e.key&&(e.ctrlKey||e.metaKey)){var o=e.key.toLowerCase(),s=r.config.keybindings;if(o===s.scrollToStash){r.scrollToStash(!e.shiftKey);me(e)}else if(!e.shiftKey){if(o===s.refresh){r.refresh(true,true);me(e)}else if(o===s.find){r.findWidget.show(true);me(e)}else if(o===s.scrollToHead&&r.commitHead!==null){r.scrollToCommit(r.commitHead,true,true);me(e)}}}else if(e.key==="Escape"){if(r.repoDropdown.isOpen()){r.repoDropdown.close();me(e)}else if(r.branchDropdown.isOpen()){r.branchDropdown.close();me(e)}else if(r.settingsWidget.isVisible()){r.settingsWidget.close();me(e)}else if(r.findWidget.isVisible()){r.findWidget.close();me(e)}else if(r.expandedCommit!==null){r.closeCommitDetails(true);me(e)}}})};C.prototype.observeUrls=function(){var h=this;var c=function(e){if(e.target!==null&&qe(e.target)){var t=J(e.target.dataset.value);switch(e.target.dataset.type){case"commit":if(typeof h.commitLookup[t]==="number"&&(h.expandedCommit===null||h.expandedCommit.commitHash!==t||h.expandedCommit.compareWithHash!==null)){var i=Rt(de(),h.commitLookup[t]);if(i!==null)h.loadCommitDetails(i)}break}}};T.body.addEventListener("click",c);T.body.addEventListener("contextmenu",function(e){if(e.target===null)return;var t=e.target;var i=Ge(t),n=qe(t);if(i||n){var o=t.closest("#view");var s=void 0;var r,a=false;if(h.expandedCommit!==null&&t.closest("#cdv")!==null){r={type:"cdv",hash:h.expandedCommit.commitHash,index:h.commitLookup[h.expandedCommit.commitHash],elem:t};C.closeCdvContextMenuIfOpen(h.expandedCommit);h.expandedCommit.contextMenuOpen.summary=true}else if((s=t.closest(".commit"))!==null){var l=h.getCommitOfElem(s);if(l===null)return;r={type:"commit",hash:l.hash,index:parseInt(s.dataset.id),elem:t}}else{r={type:"repo"};a=true}me(e);_e.show([[{title:"Open URL",visible:i,onClick:function(){ge({command:"openExternalUrl",url:t.href})}},{title:"Follow Internal Link",visible:n,onClick:function(){return c(e)}},{title:"Copy URL to Clipboard",visible:i,onClick:function(){ge({command:"copyToClipboard",type:"External URL",data:t.href})}}]],false,r,e,o||T.body,function(){if(r.type==="cdv"&&h.expandedCommit!==null){h.expandedCommit.contextMenuOpen.summary=false}},a?"dialogContextMenu":null)}})};C.prototype.observeTableEvents=function(){var c=this;this.tableElem.addEventListener("click",function(e){if(e.target===null)return;var t=e.target;if(We(t))return;var i;if((i=t.closest(".gitRef"))!==null){e.stopPropagation();if(_e.isOpen()){_e.close()}}else if((i=t.closest(".commit"))!==null){if(c.expandedCommit!==null){var n=c.getCommitOfElem(i);if(n===null)return;if(c.expandedCommit.commitHash===n.hash){c.closeCommitDetails(true)}else if(e.ctrlKey||e.metaKey){if(c.expandedCommit.compareWithHash===n.hash){c.closeCommitComparison(true)}else if(c.expandedCommit.commitElem!==null){c.loadCommitComparison(c.expandedCommit.commitElem,i)}}else{c.loadCommitDetails(i)}}else{c.loadCommitDetails(i)}}});this.tableElem.addEventListener("dblclick",function(e){if(e.target===null)return;var t=e.target;if(We(t))return;var i;if((i=t.closest(".gitRef"))!==null){e.stopPropagation();xt();var n=i.closest(".commit");var o=c.getCommitOfElem(n);if(o===null)return;if(i.classList.contains(x)||i.classList.contains(k)){var s=i.children[1];var r=J(i.dataset.name),a=i.classList.contains(x),l=t.classList.contains("gitRefHeadRemote");if(a&&l){r=J(t.dataset.fullref);s=t;a=false}var h={type:"ref",hash:o.hash,index:parseInt(n.dataset.id),ref:r,elem:s};c.checkoutBranchAction(r,a?null:J((l?t:i).dataset.remote),null,h)}}});this.tableElem.addEventListener("contextmenu",function(e){if(e.target===null)return;var t=e.target;if(We(t))return;var i;if((i=t.closest(".gitRef"))!==null){me(e);var n=i.closest(".commit");var o=c.getCommitOfElem(n);if(o===null)return;var s={type:"ref",hash:o.hash,index:parseInt(n.dataset.id),ref:J(i.dataset.name),elem:i.children[1]};var r=void 0;if(i.classList.contains(L)){r=c.getStashContextMenuActions(s)}else if(i.classList.contains(I)){r=c.getTagContextMenuActions(i.dataset.tagtype==="annotated",s)}else{var a=i.classList.contains(x),l=t.classList.contains("gitRefHeadRemote");if(a&&l){s.ref=J(t.dataset.fullref);s.elem=t;a=false}if(a){r=c.getBranchContextMenuActions(s)}else{var h=J((l?t:i).dataset.remote);r=c.getRemoteBranchContextMenuActions(h,s)}}_e.show(r,false,s,e,c.viewElem)}else if((i=t.closest(".commit"))!==null){me(e);var o=c.getCommitOfElem(i);if(o===null)return;var s={type:"commit",hash:o.hash,index:parseInt(i.dataset.id),elem:i};var r=void 0;if(o.hash===B){r=c.getUncommittedChangesContextMenuActions(s)}else if(o.stash!==null){s.ref=o.stash.selector;r=c.getStashContextMenuActions(s)}else{r=c.getCommitContextMenuActions(s)}_e.show(r,false,s,e,c.viewElem)}})};C.prototype.loadCommitDetails=function(e){var t=this.getCommitOfElem(e);if(t===null)return;this.closeCommitDetails(false);this.saveExpandedCommitLoading(parseInt(e.dataset.id),t.hash,e,null,null);e.classList.add(f);this.renderCommitDetailsView(false);this.requestCommitDetails(t.hash,false)};C.prototype.closeCommitDetails=function(e){var t=this.expandedCommit;if(t===null)return;var i=T.getElementById("cdv"),n=this.isCdvDocked();if(i!==null){i.remove()}if(n){this.viewElem.style.bottom="0px"}if(t.commitElem!==null){t.commitElem.classList.remove(f)}if(t.compareWithElem!==null){t.compareWithElem.classList.remove(f)}C.closeCdvContextMenuIfOpen(t);this.expandedCommit=null;if(e){this.saveState();if(!n){this.renderGraph()}}};C.prototype.showCommitDetails=function(e,t,i,n,o,s){var r=this.expandedCommit;if(r===null||r.commitElem===null||r.commitHash!==e.hash||r.compareWithHash!==null)return;if(!this.isCdvDocked()){var a=T.getElementById("cdv");if(a!==null)a.remove()}r.commitDetails=e;if(vt(r.fileChanges,e.fileChanges)){r.fileChanges=e.fileChanges;r.fileTree=t;C.closeCdvContextMenuIfOpen(r)}r.avatar=i;r.codeReview=n;if(!s){r.lastViewedFile=o}r.commitElem.classList.add(f);r.loading=false;this.saveState();this.renderCommitDetailsView(s)};C.prototype.createFileTree=function(e,t){var i={},n,o,s,r,a;var l={type:"folder",name:"",folderPath:"",contents:i,open:true,reviewed:true};for(n=0;n<e.length;n++){a=l;s=e[n].newFilePath.split("/");r=this.currentRepo;for(o=0;o<s.length;o++){r+="/"+s[o];if(typeof this.gitRepos[r]!=="undefined"){if(typeof a.contents[s[o]]==="undefined"){a.contents[s[o]]={type:"repo",name:s[o],path:r}}break}else if(o<s.length-1){if(typeof a.contents[s[o]]==="undefined"){i={};a.contents[s[o]]={type:"folder",name:s[o],folderPath:r.substring(this.currentRepo.length+1),contents:i,open:true,reviewed:true}}a=a.contents[s[o]]}else if(s[o]!==""){a.contents[s[o]]={type:"file",name:s[o],index:n,reviewed:t===null||!t.remainingFiles.includes(e[n].newFilePath)}}}}if(t!==null)nt(l);return l};C.prototype.loadCommitComparison=function(e,t){var i=this.getCommitOfElem(e);var n=this.getCommitOfElem(t);if(i!==null&&n!==null){if(this.expandedCommit!==null){if(this.expandedCommit.commitHash!==i.hash){this.closeCommitDetails(false)}else if(this.expandedCommit.compareWithHash!==n.hash){this.closeCommitComparison(false)}}this.saveExpandedCommitLoading(parseInt(e.dataset.id),i.hash,e,n.hash,t);e.classList.add(f);t.classList.add(f);this.renderCommitDetailsView(false);this.requestCommitComparison(i.hash,n.hash,false)}};C.prototype.closeCommitComparison=function(e){var t=this.expandedCommit;if(t===null||t.compareWithHash===null)return;if(t.compareWithElem!==null){t.compareWithElem.classList.remove(f)}C.closeCdvContextMenuIfOpen(t);if(e){if(t.commitElem!==null){this.saveExpandedCommitLoading(t.index,t.commitHash,t.commitElem,null,null);this.renderCommitDetailsView(false);this.requestCommitDetails(t.commitHash,false)}else{this.closeCommitDetails(true)}}};C.prototype.showCommitComparison=function(e,t,i,n,o,s,r){var a=this.expandedCommit;if(a===null||a.commitElem===null||a.compareWithElem===null||a.commitHash!==e||a.compareWithHash!==t)return;if(vt(a.fileChanges,i)){a.fileChanges=i;a.fileTree=n;C.closeCdvContextMenuIfOpen(a)}a.codeReview=o;if(!r){a.lastViewedFile=s}a.commitElem.classList.add(f);a.compareWithElem.classList.add(f);a.loading=false;this.saveState();this.renderCommitDetailsView(r)};C.prototype.renderCommitDetailsView=function(e){var s=this;var t=this.expandedCommit;if(t===null||t.commitElem===null)return;var i=T.getElementById("cdv"),n='<div id="cdvContent">',o=this.isCdvDocked();var r=this.getCommitOrder(t.commitHash,t.compareWithHash===null?t.commitHash:t.compareWithHash);var a=!t.loading&&r.to!==B;var l=!t.loading&&(t.compareWithHash!==null||this.commits[this.commitLookup[t.commitHash]].parents.length>0);if(i===null){i=T.createElement(o?"div":"tr");i.id="cdv";i.className=o?"docked":"inline";this.setCdvHeight(i,o);if(o){T.body.appendChild(i)}else{oe(i,t.commitElem)}}if(t.loading){n+='<div id="cdvLoading">'+A.loading+" Loading "+(t.compareWithHash===null?t.commitHash!==B?"Commit Details":"Uncommitted Changes":"Commit Comparison")+" ...</div>"}else{n+='<div id="cdvSummary">';if(t.compareWithHash===null){if(t.commitHash!==B){var h=new Ne(this.commits,this.gitRepos[this.currentRepo].issueLinkingConfig,{commits:true,emoji:true,issueLinking:true,markdown:this.config.markdown,multiline:true,urls:true});var c=t.commitDetails;var u=c.parents.length>0?c.parents.map(function(e){var t=$(e);return typeof s.commitLookup[e]==="number"?'<span class="'+Ue+'" data-type="commit" data-value="'+t+'" tabindex="-1">'+t+"</span>":t}).join(", "):"None";n+='<span class="cdvSummaryTop'+(t.avatar!==null?" withAvatar":"")+'"><span class="cdvSummaryTopRow"><span class="cdvSummaryKeyValues">'+"<b>Commit: </b>"+$(c.hash)+"<br>"+"<b>Parents: </b>"+u+"<br>"+"<b>Author: </b>"+$(c.author)+(c.authorEmail!==""?' <<a class="'+Ve+'" href="mailto:'+$(c.authorEmail)+'" tabindex="-1">'+$(c.authorEmail)+"</a>>":"")+"<br>"+(c.authorDate!==c.committerDate?"<b>Author Date: </b>"+te(c.authorDate)+"<br>":"")+"<b>Committer: </b>"+$(c.committer)+(c.committerEmail!==""?' <<a class="'+Ve+'" href="mailto:'+$(c.committerEmail)+'" tabindex="-1">'+$(c.committerEmail)+"</a>>":"")+(c.signature!==null?Et(c.signature):"")+"<br>"+"<b>"+(c.authorDate!==c.committerDate?"Committer ":"")+"Date: </b>"+te(c.committerDate)+"</span>"+(t.avatar!==null?'<span class="cdvSummaryAvatar"><img src="'+t.avatar+'"></span>':"")+"</span></span><br><br>"+h.format(c.body)}else{n+="Displaying all uncommitted changes."}}else{n+="Displaying all changes from <b>"+r.from+"</b> to <b>"+(r.to!==B?r.to:"Uncommitted Changes")+"</b>."}n+='</div><div id="cdvFiles">'+Ze(t.fileTree,t.fileChanges,t.lastViewedFile,t.contextMenuOpen.fileView,this.getFileViewType(),r.to===B)+'</div><div id="cdvDivider"></div>'}n+='</div><div id="cdvControls"><div id="cdvClose" class="cdvControlBtn" title="Close">'+A.close+"</div>"+(a?'<div id="cdvCodeReview" class="cdvControlBtn">'+A.review+"</div>":"")+(!t.loading?'<div id="cdvFileViewTypeTree" class="cdvControlBtn cdvFileViewTypeBtn" title="File Tree View">'+A.fileTree+'</div><div id="cdvFileViewTypeList" class="cdvControlBtn cdvFileViewTypeBtn" title="File List View">'+A.fileList+"</div>":"")+(l?'<div id="cdvExternalDiff" class="cdvControlBtn">'+A.linkExternal+"</div>":"")+'</div><div class="cdvHeightResize"></div>';i.innerHTML=o?n:'<td><div class="cdvHeightResize"></div></td><td colspan="'+(this.getNumColumns()-1)+'">'+n+"</td>";if(!t.loading)this.setCdvDivider();if(!o)this.renderGraph();if(!e){if(o){var d=this.controlsElem.clientHeight+t.commitElem.offsetTop;if(d-8<this.viewElem.scrollTop){this.viewElem.scroll(0,d-8)}else if(d-this.viewElem.clientHeight+32>this.viewElem.scrollTop){this.viewElem.scroll(0,d-this.viewElem.clientHeight+32)}}else{var d=this.controlsElem.clientHeight+i.offsetTop,m=this.gitRepos[this.currentRepo].cdvHeight;if(this.config.commitDetailsView.autoCenter){this.viewElem.scroll(0,d-12+(m-this.viewElem.clientHeight)/2)}else if(d-32<this.viewElem.scrollTop){this.viewElem.scroll(0,d-32)}else if(d+m-this.viewElem.clientHeight+8>this.viewElem.scrollTop){this.viewElem.scroll(0,d+m-this.viewElem.clientHeight+8)}}}this.makeCdvResizable();T.getElementById("cdvClose").addEventListener("click",function(){s.closeCommitDetails(true)});if(!t.loading){this.makeCdvFileViewInteractive();this.renderCdvFileViewTypeBtns();this.renderCdvExternalDiffBtn();this.makeCdvDividerDraggable();ue("cdvSummary",t.scrollTop.summary,function(e){if(s.expandedCommit===null)return;s.expandedCommit.scrollTop.summary=e;if(s.expandedCommit.contextMenuOpen.summary){s.expandedCommit.contextMenuOpen.summary=false;_e.close()}},function(){return s.saveState()});ue("cdvFiles",t.scrollTop.fileView,function(e){if(s.expandedCommit===null)return;s.expandedCommit.scrollTop.fileView=e;if(s.expandedCommit.contextMenuOpen.fileView>-1){s.expandedCommit.contextMenuOpen.fileView=-1;_e.close()}},function(){return s.saveState()});T.getElementById("cdvFileViewTypeTree").addEventListener("click",function(){s.changeFileViewType(1)});T.getElementById("cdvFileViewTypeList").addEventListener("click",function(){s.changeFileViewType(2)});if(a){this.renderCodeReviewBtn();T.getElementById("cdvCodeReview").addEventListener("click",function(e){var t=s.expandedCommit;if(t===null||e.target===null)return;var i=e.target.closest("#cdvCodeReview");if(i.classList.contains(p)){ge({command:"endCodeReview",repo:s.currentRepo,id:t.codeReview.id});s.endCodeReview()}else{var n=s.getCommitOrder(t.commitHash,t.compareWithHash===null?t.commitHash:t.compareWithHash);var o=t.compareWithHash!==null?n.from+"-"+n.to:t.commitHash;ge({command:"startCodeReview",repo:s.currentRepo,id:o,commitHash:t.commitHash,compareWithHash:t.compareWithHash,files:rt(t.fileTree,t.fileChanges),lastViewedFile:t.lastViewedFile})}})}if(l){T.getElementById("cdvExternalDiff").addEventListener("click",function(){var e=s.expandedCommit;if(e===null||s.gitConfig===null||s.gitConfig.diffTool===null&&s.gitConfig.guiDiffTool===null)return;var t=s.getCommitOrder(e.commitHash,e.compareWithHash===null?e.commitHash:e.compareWithHash);yt({command:"openExternalDirDiff",repo:s.currentRepo,fromHash:t.from,toHash:t.to,isGui:s.gitConfig.guiDiffTool!==null},"Opening External Directory Diff")})}}};C.prototype.setCdvHeight=function(e,t){var i=this.gitRepos[this.currentRepo].cdvHeight,n=c.innerHeight;if(i>n-40){i=Math.max(n-40,100);if(i!==this.gitRepos[this.currentRepo].cdvHeight){this.gitRepos[this.currentRepo].cdvHeight=i;this.saveRepoState()}}var o=i+"px";e.style.height=o;if(t)this.viewElem.style.bottom=o};C.prototype.setCdvDivider=function(){var e=(this.gitRepos[this.currentRepo].cdvDivider*100).toFixed(2)+"%";var t=T.getElementById("cdvSummary"),i=T.getElementById("cdvDivider"),n=T.getElementById("cdvFiles");if(t!==null)t.style.width=e;if(i!==null)i.style.left=e;if(n!==null)n.style.left=e};C.prototype.makeCdvResizable=function(){var r=this;var a=-1;var t=function(e){if(a<0)return;var t=e.pageY-a,i=r.isCdvDocked(),n=c.innerHeight;a=e.pageY;var o=r.gitRepos[r.currentRepo].cdvHeight+(i?-t:t);if(o<100)o=100;else if(o>600)o=600;if(o>n-40)o=Math.max(n-40,100);if(r.gitRepos[r.currentRepo].cdvHeight!==o){r.gitRepos[r.currentRepo].cdvHeight=o;var s=T.getElementById("cdv");if(s!==null)r.setCdvHeight(s,i);if(!i)r.renderGraph()}};var i=function(e){if(a<0)return;t(e);r.saveRepoState();a=-1;je.remove()};ie("cdvHeightResize","mousedown",function(e){a=e.pageY;je.create("rowResize",t,i)})};C.prototype.makeCdvDividerDraggable=function(){var i=this;var n=-1,o=-1;var s=function(e){if(n<0)return;var t=(e.clientX-n)/o;if(t<.2)t=.2;else if(t>.8)t=.8;if(i.gitRepos[i.currentRepo].cdvDivider!==t){i.gitRepos[i.currentRepo].cdvDivider=t;i.setCdvDivider()}};var r=function(e){if(n<0)return;s(e);i.saveRepoState();n=-1;je.remove()};T.getElementById("cdvDivider").addEventListener("mousedown",function(){var e=T.getElementById("cdvContent");if(e===null)return;var t=e.getBoundingClientRect();n=t.left;o=t.width;je.create("colResize",s,r)})};C.prototype.cdvUpdateFileState=function(e,t,i,n){var o=this.expandedCommit,s=T.getElementById("cdvFiles"),r=e.newFilePath;if(o===null||o.fileTree===null||s===null)return;if(n){o.lastViewedFile=r;var a=T.getElementById("cdvLastFileViewed");if(a!==null)a.remove();a=T.createElement("span");a.id="cdvLastFileViewed";a.title="Last File Viewed";a.innerHTML=A.eyeOpen;se(a,t,"fileTreeFileAction")}if(o.codeReview!==null){if(i!==null){if(i){o.codeReview.remainingFiles=o.codeReview.remainingFiles.filter(function(e){return e!==r})}else{o.codeReview.remainingFiles.push(r)}tt(o.fileTree,r,i);st(s,o.fileTree,r)}ge({command:"updateCodeReview",repo:this.currentRepo,id:o.codeReview.id,remainingFiles:o.codeReview.remainingFiles,lastViewedFile:o.lastViewedFile});if(o.codeReview.remainingFiles.length===0){o.codeReview=null;this.renderCodeReviewBtn()}}this.saveState()};C.prototype.isCdvDocked=function(){return this.config.commitDetailsView.location===1};C.prototype.isCdvOpen=function(e,t){return this.expandedCommit!==null&&this.expandedCommit.commitHash===e&&this.expandedCommit.compareWithHash===t};C.prototype.getCommitOrder=function(e,t){if(this.commitLookup[e]>this.commitLookup[t]){return{from:e,to:t}}else{return{from:t,to:e}}};C.prototype.getFileViewType=function(){return this.gitRepos[this.currentRepo].fileViewType===0?this.config.commitDetailsView.fileViewType:this.gitRepos[this.currentRepo].fileViewType};C.prototype.setFileViewType=function(e){this.gitRepos[this.currentRepo].fileViewType=e;this.saveRepoState()};C.prototype.changeFileViewType=function(e){var t=this.expandedCommit,i=T.getElementById("cdvFiles");if(t===null||t.fileTree===null||t.fileChanges===null||i===null)return;C.closeCdvContextMenuIfOpen(t);this.setFileViewType(e);var n=this.getCommitOrder(t.commitHash,t.compareWithHash===null?t.commitHash:t.compareWithHash);i.innerHTML=Ze(t.fileTree,t.fileChanges,t.lastViewedFile,t.contextMenuOpen.fileView,e,n.to===B);this.makeCdvFileViewInteractive();this.renderCdvFileViewTypeBtns()};C.prototype.makeCdvFileViewInteractive=function(){var c=this;var u=function(e){return e.closest(".fileTreeFileRecord")};var d=function(e,t){return e[parseInt(t.dataset.index)]};var n=function(e,t){var i=c.commits[c.commitLookup[t.commitHash]];if(t.compareWithHash!==null){return c.getCommitOrder(t.commitHash,t.compareWithHash).to}else if(i.stash!==null&&e.type==="U"){return i.stash.untrackedFilesHash}else{return t.commitHash}};var m=function(e,t){var i=c.expandedCommit;if(i===null)return;var n=c.commits[c.commitLookup[i.commitHash]],o,s,r=e.type;if(i.compareWithHash!==null){var a=c.getCommitOrder(i.commitHash,i.compareWithHash);o=a.from;s=a.to}else if(n.stash!==null){if(r==="U"){o=n.stash.untrackedFilesHash;s=n.stash.untrackedFilesHash;r="A"}else{o=n.stash.baseHash;s=i.commitHash}}else{o=i.commitHash;s=i.commitHash}c.cdvUpdateFileState(e,t,true,true);ge({command:"viewDiff",repo:c.currentRepo,fromHash:o,toHash:s,oldFilePath:e.oldFilePath,newFilePath:e.newFilePath,type:r})};var p=function(e,t){ge({command:"copyFilePath",repo:c.currentRepo,filePath:e.newFilePath,absolute:t})};var f=function(e,t){var i=c.expandedCommit;if(i===null)return;c.cdvUpdateFileState(e,t,true,true);ge({command:"viewFileAtRevision",repo:c.currentRepo,hash:n(e,i),filePath:e.newFilePath})};var g=function(e,t){var i=c.expandedCommit;if(i===null)return;c.cdvUpdateFileState(e,t,null,true);ge({command:"viewDiffWithWorkingFile",repo:c.currentRepo,hash:n(e,i),filePath:e.newFilePath})};var v=function(e,t){var i=c.expandedCommit;if(i===null)return;c.cdvUpdateFileState(e,t,true,true);ge({command:"openFile",repo:c.currentRepo,hash:n(e,i),filePath:e.newFilePath})};ie("fileTreeFolder","click",function(e){var t=c.expandedCommit;if(t===null||t.fileTree===null||e.target===null)return;var i=e.target.closest(".fileTreeFolder");var n=i.parentElement;n.classList.toggle("closed");var o=!n.classList.contains("closed");n.children[0].children[0].innerHTML=o?A.openFolder:A.closedFolder;n.children[1].classList.toggle("hidden");et(t.fileTree,decodeURIComponent(i.dataset.folderpath),o);c.saveState()});ie("fileTreeRepo","click",function(e){if(e.target===null)return;c.loadRepos(c.gitRepos,null,{repo:decodeURIComponent(e.target.closest(".fileTreeRepo").dataset.path)})});ie("fileTreeFile","click",function(e){var t=c.expandedCommit;if(t===null||t.fileChanges===null||e.target===null)return;var i=e.target.closest(".fileTreeFile"),n=u(e.target);if(!i.classList.contains("gitDiffPossible"))return;m(d(t.fileChanges,n),n)});ie("copyGitFile","click",function(e){var t=c.expandedCommit;if(t===null||t.fileChanges===null||e.target===null)return;var i=u(e.target);p(d(t.fileChanges,i),true)});ie("viewGitFileAtRevision","click",function(e){var t=c.expandedCommit;if(t===null||t.fileChanges===null||e.target===null)return;var i=u(e.target);f(d(t.fileChanges,i),i)});ie("openGitFile","click",function(e){var t=c.expandedCommit;if(t===null||t.fileChanges===null||e.target===null)return;var i=u(e.target);v(d(t.fileChanges,i),i)});ie("fileTreeFileRecord","contextmenu",function(e){me(e);var t=c.expandedCommit;if(t===null||t.fileChanges===null||e.target===null)return;var i=u(e.target);var n=d(t.fileChanges,i);var o=c.getCommitOrder(t.commitHash,t.compareWithHash===null?t.commitHash:t.compareWithHash);var s=o.to===B;C.closeCdvContextMenuIfOpen(t);t.contextMenuOpen.fileView=parseInt(i.dataset.index);var r={type:"cdv",hash:t.commitHash,index:c.commitLookup[t.commitHash],elem:i};var a=n.type==="U"||n.additions!==null&&n.deletions!==null;var l=n.type!=="D"&&a&&!s;var h=t.codeReview!==null&&t.codeReview.remainingFiles.includes(n.newFilePath);_e.show([[{title:"View Diff",visible:a,onClick:function(){return m(n,i)}},{title:"View File at this Revision",visible:l,onClick:function(){return f(n,i)}},{title:"View Diff with Working File",visible:l,onClick:function(){return g(n,i)}},{title:"Open File",visible:n.type!=="D",onClick:function(){return v(n,i)}}],[{title:"Mark as Reviewed",visible:h,onClick:function(){return c.cdvUpdateFileState(n,i,true,false)}},{title:"Mark as Not Reviewed",visible:t.codeReview!==null&&!h,onClick:function(){return c.cdvUpdateFileState(n,i,false,false)}}],[{title:"Copy Absolute File Path to Clipboard",visible:true,onClick:function(){return p(n,true)}},{title:"Copy Relative File Path to Clipboard",visible:true,onClick:function(){return p(n,false)}}]],false,r,e,c.isCdvDocked()?T.body:c.viewElem,function(){t.contextMenuOpen.fileView=-1})})};C.prototype.renderCdvFileViewTypeBtns=function(){if(this.expandedCommit===null)return;var e=T.getElementById("cdvFileViewTypeTree"),t=T.getElementById("cdvFileViewTypeList");if(e===null||t===null)return;var i=this.getFileViewType()===2;re(e,p,!i);re(t,p,i)};C.prototype.renderCdvExternalDiffBtn=function(){if(this.expandedCommit===null)return;var e=T.getElementById("cdvExternalDiff");if(e===null)return;re(e,a,this.gitConfig!==null&&(this.gitConfig.diffTool!==null||this.gitConfig.guiDiffTool!==null));var t=this.gitConfig!==null?this.gitConfig.guiDiffTool!==null?this.gitConfig.guiDiffTool:this.gitConfig.diffTool:null;e.title="Open External Directory Diff"+(t!==null?' with "'+t+'"':"")};C.closeCdvContextMenuIfOpen=function(e){if(e.contextMenuOpen.summary||e.contextMenuOpen.fileView>-1){e.contextMenuOpen.summary=false;e.contextMenuOpen.fileView=-1;_e.close()}};C.prototype.startCodeReview=function(e,t,i){if(this.expandedCommit===null||this.expandedCommit.commitHash!==e||this.expandedCommit.compareWithHash!==t)return;this.saveAndRenderCodeReview(i)};C.prototype.endCodeReview=function(){if(this.expandedCommit===null||this.expandedCommit.codeReview===null)return;this.saveAndRenderCodeReview(null)};C.prototype.saveAndRenderCodeReview=function(e){var t=T.getElementById("cdvFiles");if(this.expandedCommit===null||this.expandedCommit.fileTree===null||t===null)return;this.expandedCommit.codeReview=e;it(this.expandedCommit.fileTree,e===null);this.saveState();this.renderCodeReviewBtn();ot(t,this.expandedCommit.fileTree)};C.prototype.renderCodeReviewBtn=function(){if(this.expandedCommit===null)return;var e=T.getElementById("cdvCodeReview");if(e===null)return;var t=this.expandedCommit.codeReview!==null;re(e,p,t);e.title=(t?"End":"Start")+" Code Review"};return C}();var _e=new Re,Ye=new Se,je=new ye;var Xe=false;c.addEventListener("load",function(){if(Xe)return;Xe=true;Ne.registerCustomEmojiMappings(initialState.config.customEmojiShortcodeMappings);var e=T.getElementById("view");if(e===null)return;var o=new ze(e,t.getState());var i=new we;c.addEventListener("message",function(e){var t=e.data;switch(t.command){case"addRemote":s(t.error,"Unable to Add Remote",true);break;case"addTag":r(t.errors,"Unable to Add Tag");break;case"applyStash":s(t.error,"Unable to Apply Stash");break;case"branchFromStash":s(t.error,"Unable to Create Branch from Stash");break;case"checkoutBranch":r(t.errors,"Unable to Checkout Branch"+(t.pullAfterwards!==null?" & Pull Changes":""));break;case"checkoutCommit":s(t.error,"Unable to Checkout Commit");break;case"cherrypickCommit":r(t.errors,"Unable to Cherry Pick Commit");break;case"cleanUntrackedFiles":s(t.error,"Unable to Clean Untracked Files");break;case"commitDetails":if(t.commitDetails!==null){o.showCommitDetails(t.commitDetails,o.createFileTree(t.commitDetails.fileChanges,t.codeReview),t.avatar,t.codeReview,t.codeReview!==null?t.codeReview.lastViewedFile:null,t.refresh)}else{o.closeCommitDetails(true);Ye.showError("Unable to load Commit Details",t.error,null,null)}break;case"compareCommits":if(t.error===null){o.showCommitComparison(t.commitHash,t.compareWithHash,t.fileChanges,o.createFileTree(t.fileChanges,t.codeReview),t.codeReview,t.codeReview!==null?t.codeReview.lastViewedFile:null,t.refresh)}else{o.closeCommitComparison(true);Ye.showError("Unable to load Commit Comparison",t.error,null,null)}break;case"copyFilePath":a(t.error,"Unable to Copy File Path to Clipboard");break;case"copyToClipboard":a(t.error,"Unable to Copy "+t.type+" to Clipboard");break;case"createArchive":a(t.error,"Unable to Create Archive",true);break;case"createBranch":r(t.errors,"Unable to Create Branch");break;case"createPullRequest":l(t.errors,"Unable to Create Pull Request",function(){if(t.push){o.refresh(false)}},true);break;case"deleteBranch":n(t);break;case"deleteRemote":s(t.error,"Unable to Delete Remote",true);break;case"deleteRemoteBranch":s(t.error,"Unable to Delete Remote Branch");break;case"deleteTag":s(t.error,"Unable to Delete Tag");break;case"deleteUserDetails":l(t.errors,"Unable to Remove Git User Details",function(){return o.requestLoadConfig()},true);break;case"dropCommit":s(t.error,"Unable to Drop Commit");break;case"dropStash":s(t.error,"Unable to Drop Stash");break;case"editRemote":s(t.error,"Unable to Save Changes to Remote",true);break;case"editUserDetails":l(t.errors,"Unable to Save Git User Details",function(){return o.requestLoadConfig()},true);break;case"exportRepoConfig":s(t.error,"Unable to Export Repository Configuration");break;case"fetch":s(t.error,"Unable to Fetch from Remote(s)");break;case"fetchAvatar":i.resize(t.image,function(e){o.loadAvatar(t.email,e)});break;case"fetchIntoLocalBranch":s(t.error,"Unable to Fetch into Local Branch");break;case"loadCommits":o.processLoadCommitsResponse(t);break;case"loadConfig":o.processLoadConfig(t);break;case"loadRepoInfo":o.processLoadRepoInfoResponse(t);break;case"loadRepos":o.loadRepos(t.repos,t.lastActiveRepo,t.loadViewTo);break;case"merge":s(t.error,"Unable to Merge "+t.actionOn);break;case"openExtensionSettings":a(t.error,"Unable to Open Extension Settings");break;case"openExternalDirDiff":a(t.error,"Unable to Open External Directory Diff",true);break;case"openExternalUrl":a(t.error,"Unable to Open External URL");break;case"openFile":a(t.error,"Unable to Open File");break;case"openTerminal":a(t.error,"Unable to Open Terminal",true);break;case"popStash":s(t.error,"Unable to Pop Stash");break;case"pruneRemote":s(t.error,"Unable to Prune Remote");break;case"pullBranch":s(t.error,"Unable to Pull Branch");break;case"pushBranch":r(t.errors,"Unable to Push Branch",t.willUpdateBranchConfig);break;case"pushStash":s(t.error,"Unable to Stash Uncommitted Changes");break;case"pushTag":r(t.errors,"Unable to Push Tag");break;case"rebase":if(t.error===null){if(t.interactive){Ye.closeActionRunning()}else{o.refresh(false)}}else{Ye.showError("Unable to Rebase current branch on "+t.actionOn,t.error,null,null)}break;case"refresh":o.refresh(false);break;case"renameBranch":s(t.error,"Unable to Rename Branch");break;case"resetToCommit":s(t.error,"Unable to Reset to Commit");break;case"revertCommit":s(t.error,"Unable to Revert Commit");break;case"setGlobalViewState":a(t.error,"Unable to save the Global View State");break;case"setWorkspaceViewState":a(t.error,"Unable to save the Workspace View State");break;case"startCodeReview":if(t.error===null){o.startCodeReview(t.commitHash,t.compareWithHash,t.codeReview)}else{Ye.showError("Unable to Start Code Review",t.error,null,null)}break;case"tagDetails":if(t.error===null){o.renderTagDetails(t.tagName,t.tagHash,t.commitHash,t.name,t.email,t.date,t.message)}else{Ye.showError("Unable to retrieve Tag Details",t.error,null,null)}break;case"updateCodeReview":if(t.error!==null){Ye.showError("Unable to update Code Review",t.error,null,null)}break;case"viewDiff":a(t.error,"Unable to View Diff");break;case"viewDiffWithWorkingFile":a(t.error,"Unable to View Diff with Working File");break;case"viewFileAtRevision":a(t.error,"Unable to View File at Revision");break;case"viewScm":a(t.error,"Unable to open the Source Control View");break}});function n(e){if(e.errors.length>0&&e.errors[0]!==null&&e.errors[0].includes("git branch -D")){Ye.showConfirmation("The branch <b><i>"+$(e.branchName)+"</i></b> is not fully merged. Would you like to force delete it?","Yes, force delete branch",function(){yt({command:"deleteBranch",repo:e.repo,branchName:e.branchName,forceDelete:true,deleteOnRemotes:e.deleteOnRemotes},"Deleting Branch")},{type:"repo"})}else{r(e.errors,"Unable to Delete Branch")}}function s(e,t,i){if(i===void 0){i=false}if(e===null){o.refresh(false,i)}else{Ye.showError(t,e,null,null)}}function r(e,t,i){if(i===void 0){i=false}var n=h(e);if(n.error!==null){Ye.showError(t,n.error,null,null)}if(n.partialOrCompleteSuccess){o.refresh(false,i)}else if(i){o.requestLoadConfig()}}function a(e,t,i){if(i===void 0){i=false}if(e!==null){Ye.showError(t,e,null,null)}else if(i){Ye.closeActionRunning()}}function l(e,t,i,n){if(n===void 0){n=false}var o=h(e);a(o.error,t,n);if(o.partialOrCompleteSuccess){i()}}function h(e){var t=null,i=false;for(var n=0;n<e.length;n++){if(e[n]!==null){t=t!==null?t+"\n\n"+e[n]:e[n]}else{i=true}}return{error:t,partialOrCompleteSuccess:i}}});function Ze(e,t,i,n,o,s){return o===2?Je(e,t,i,n,s):Ke(e,t,i,n,s,true)}function Ke(e,i,n,o,s,t){var r=t||!initialState.config.commitDetailsView.fileTreeCompactFolders?{folder:e,name:e.name,pathSeg:e.name}:$e(e,e.name,e.name);var a=at(r.folder).map(function(e){var t=r.folder.contents[e];return t.type==="folder"?Ke(t,i,n,o,s,false):Qe(t.name,t,i,n,o,s)});return(t?"":"<li"+(r.folder.open?"":' class="closed"')+' data-pathseg="'+encodeURIComponent(r.pathSeg)+'"><span class="fileTreeFolder'+(r.folder.reviewed?"":" pendingReview")+'" title="./'+$(r.folder.folderPath)+'" data-folderpath="'+encodeURIComponent(r.folder.folderPath)+'"><span class="fileTreeFolderIcon">'+(r.folder.open?A.openFolder:A.closedFolder)+'</span><span class="gitFolderName">'+$(r.name)+"</span></span>")+'<ul class="fileTreeFolderContents'+(r.folder.open?"":" hidden")+'">'+a.join("")+"</ul>"+(t?"":"</li>")}function $e(e,t,i){var n=Object.keys(e.contents);var o;return n.length===1&&(o=e.contents[n[0]]).type==="folder"?$e(o,t+" / "+o.name,i+"/"+o.name):{folder:e,name:t,pathSeg:i}}function Je(e,t,i,n,o){var a=function(e,t){var i=at(e);var n=[];for(var o=0;o<i.length;o++){var s=e.contents[i[o]];var r=(t!==""?t+"/":"")+s.name;if(s.type==="folder"){n=n.concat(a(s,r))}else{n.push({relPath:r,leaf:s})}}return n};var s=a(e,"");var r="";for(var l=0;l<s.length;l++){r+=Qe(s[l].relPath,s[l].leaf,t,i,n,o)}return'<ul class="fileTreeFolderContents">'+r+"</ul>"}function Qe(e,t,i,n,o,s){var r=encodeURIComponent(e),a=$(e);if(t.type==="file"){var l=i[t.index];var h=l.additions!==null&&l.deletions!==null;var c=l.type==="U"||h;var u=d[l.type]+(l.type==="R"?" ("+$(l.oldFilePath)+" → "+$(l.newFilePath)+")":"");return'<li data-pathseg="'+r+'"><span class="fileTreeFileRecord'+(t.index===o?" "+be:"")+'" data-index="'+t.index+'"><span class="fileTreeFile'+(c?" gitDiffPossible":"")+(t.reviewed?"":" "+C)+'" title="'+(c?"Click to View Diff":"Unable to View Diff"+(l.type!=="D"?" (this is a binary file)":""))+" • "+u+'"><span class="fileTreeFileIcon">'+A.file+'</span><span class="gitFileName '+l.type+'">'+a+"</span></span>"+(initialState.config.enhancedAccessibility?'<span class="fileTreeFileType" title="'+u+'">'+l.type+"</span>":"")+(l.type!=="A"&&l.type!=="U"&&l.type!=="D"&&h?'<span class="fileTreeFileAddDel">(<span class="fileTreeFileAdd" title="'+l.additions+" addition"+(l.additions!==1?"s":"")+'">+'+l.additions+'</span>|<span class="fileTreeFileDel" title="'+l.deletions+" deletion"+(l.deletions!==1?"s":"")+'">-'+l.deletions+"</span>)</span>":"")+(l.newFilePath===n?'<span id="cdvLastFileViewed" title="Last File Viewed">'+A.eyeOpen+"</span>":"")+'<span class="copyGitFile fileTreeFileAction" title="Copy Absolute File Path to Clipboard">'+A.copy+"</span>"+(l.type!=="D"?(c&&!s?'<span class="viewGitFileAtRevision fileTreeFileAction" title="View File at this Revision">'+A.commit+"</span>":"")+'<span class="openGitFile fileTreeFileAction" title="Open File">'+A.openFile+"</span>":"")+"</span></li>"}else{return'<li data-pathseg="'+r+'"><span class="fileTreeRepo" data-path="'+encodeURIComponent(t.path)+'" title="Click to View Repository"><span class="fileTreeRepoIcon">'+A.closedFolder+"</span>"+a+"</span></li>"}}function et(e,t,i){var n=t.split("/"),o,s=e;for(o=0;o<n.length;o++){if(typeof s.contents[n[o]]!=="undefined"){s=s.contents[n[o]];if(o===n.length-1)s.open=i}else{return}}}function tt(e,t,i){var n=t.split("/"),o,s=e,r=[e];for(o=0;o<n.length;o++){if(typeof s.contents[n[o]]!=="undefined"){if(o<n.length-1){s=s.contents[n[o]];r.push(s)}else{s.contents[n[o]].reviewed=i}}else{break}}for(o=r.length-1;o>=0;o--){var a=Object.keys(r[o].contents),l=true;for(var h=0;h<a.length;h++){var c=r[o].contents[a[h]];if((c.type==="folder"||c.type==="file")&&!c.reviewed){l=false;break}}r[o].reviewed=l}}function it(e,t){e.reviewed=t;var i=Object.keys(e.contents);for(var n=0;n<i.length;n++){var o=e.contents[i[n]];if(o.type==="folder"){it(o,t)}else if(o.type==="file"){o.reviewed=t}}}function nt(e){var s=function(e){var t=true;var i=Object.keys(e.contents);for(var n=0;n<i.length;n++){var o=e.contents[i[n]];if(o.type==="folder"&&!s(o)||o.type==="file"&&!o.reviewed)t=false}e.reviewed=t;return t};s(e)}function ot(e,t){var i=ce(e);if(i===null)return;for(var n=0;n<i.children.length;n++){var o=i.children[n];var s=decodeURIComponent(o.dataset.pathseg);var r=lt(t,s);if(r.type==="folder"){re(o.children[0],C,!r.reviewed);ot(o,r)}else if(r.type==="file"){re(o.children[0].children[0],C,!r.reviewed)}}}function st(e,t,i){var a=i;var l=function(e,t){var i=ce(e);if(i===null)return;for(var n=0;n<i.children.length;n++){var o=i.children[n];var s=decodeURIComponent(o.dataset.pathseg);if(a===s||a.startsWith(s+"/")){var r=lt(t,s);if(r.type==="folder"){re(o.children[0],C,!r.reviewed);a=a.substring(s.length+1);l(o,r)}else if(r.type==="file"){re(o.children[0].children[0],C,!r.reviewed)}break}}};l(e,t)}function rt(e,o){var s=[];var r=function(e){var t=Object.keys(e.contents);for(var i=0;i<t.length;i++){var n=e.contents[t[i]];if(n.type==="folder"){r(n)}else if(n.type==="file"){s.push(o[n.index].newFilePath)}}};r(e);return s}function at(i){var e=Object.keys(i.contents);e.sort(function(e,t){return i.contents[e].type!=="file"&&i.contents[t].type==="file"?-1:i.contents[e].type==="file"&&i.contents[t].type!=="file"?1:i.contents[e].name.localeCompare(i.contents[t].name)});return e}function lt(e,t){var i=e,n=t.split("/");for(var o=0;o<n.length;o++){i=i.contents[n[o]]}return i}function ht(e){switch(e){case"default":return initialState.config.commitOrdering;case"date":return"date";case"author-date":return"author-date";case"topo":return"topo"}}function ct(e){return e===0?initialState.config.showRemoteBranches:e===1}function ut(e){return e===0?initialState.config.showStashes:e===1}function dt(e){return e===0?initialState.config.showTags:e===1}function mt(e){return e===0?initialState.config.includeCommitsMentionedByReflogs:e===1}function pt(e){return e===0?initialState.config.onlyFollowFirstParent:e===1}function ft(e){return e===0?initialState.config.onRepoLoad.showCheckedOutBranch:e===1}function gt(e){return e===null?initialState.config.onRepoLoad.showSpecificBranches:e}function vt(e,t){if(e===null!==(t===null)){return true}else if(e===null&&t===null){return false}else{return!z(e,t,function(e,t){return e.additions===t.additions&&e.deletions===t.deletions&&e.newFilePath===t.newFilePath&&e.oldFilePath===t.oldFilePath&&e.type===t.type})}}function Ct(e){return e.substring(0,8)}function wt(e){var t=K(e,initialState.config.repoDropdownOrder);var u=[],i=[],d=[],m=[];var p=function(e){var t={},i={};for(var n=0;n<e.length;n++){var o=d[e[n]];if(typeof t[o]==="number"){if(typeof i[o]==="undefined"){i[o]=[t[o]]}i[o].push(e[n])}else{t[o]=e[n]}}var s=Object.keys(i);for(var n=0;n<s.length;n++){var r=i[s[n]],a=[];for(var l=0;l<r.length;l++){var h=r[l];var c=u[h].lastIndexOf("/",u[h].length-d[h].length-2);if(m[h]<c){d[h]=u[h].substring(c+1);a.push(h)}else{d[h]=u[h]}}if(a.length>1){p(a)}}};var n=[];for(var o=0;o<t.length;o++){m.push(t[o].indexOf("/"));var s=e[t[o]];if(s.name){u.push(t[o]);i.push(s.name);d.push(s.name)}else if(m[o]===t[o].length-1||m[o]===-1){u.push(t[o]);i.push(t[o]);d.push(t[o])}else{u.push(t[o].endsWith("/")?t[o].substring(0,t[o].length-1):t[o]);var r=u[o].substring(u[o].lastIndexOf("/")+1);i.push(r);d.push(r);n.push(o)}}p(n);var a=[];for(var o=0;o<t.length;o++){var l=void 0;if(i[o]===d[o]){l=""}else{var h=d[o].substring(0,d[o].length-i[o].length-1);var c=h.split("/");var f=c[0]!==""?2:3;if(c.length>f)c.splice(f,c.length-f,"...");l=(d[o]!==u[o]?".../":"")+c.join("/")}a.push({name:i[o],value:t[o],hint:l})}return a}function yt(e,t){Ye.showActionRunning(t);ge(e)}function bt(e,t){var i=[],n={},o;for(var s=0;s<e.length;s++){i.push({name:e[s],remotes:[]});n[e[s]]=s}if(initialState.config.referenceLabels.combineLocalAndRemoteBranchLabels){var r=[];for(var s=0;s<t.length;s++){if(t[s].remote!==null){var a=t[s].name.substring(t[s].remote.length+1);if(typeof n[a]==="number"){i[n[a]].remotes.push(t[s].remote);continue}}r.push(t[s])}o=r}else{o=t}return{heads:i,remotes:o}}function Rt(e,t){if(t===null)return null;var i=t.toString();for(var n=0;n<e.length;n++){if(i===e[n].dataset.id)return e[n]}return null}function Et(e){return'<span class="signatureInfo '+e.status+'" title="'+i[e.status]+":"+" Signed by "+$(e.signer!==""?e.signer:"<Unknown>")+" (GPG Key Id: "+$(e.key!==""?e.key:"<Unknown>")+')">'+(e.status==="G"?A.passed:e.status==="B"?A.failed:A.inconclusive)+"</span>"}function xt(){if(Ye.isOpen())Ye.close();if(_e.isOpen())_e.close()}})(document,window);