tungsten 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/tungsten/_icons.js +1 -1
- data/app/assets/stylesheets/tungsten/components/_progress-bar.scss +1 -1
- data/app/assets/stylesheets/tungsten/components/_tables.scss +4 -0
- data/app/assets/stylesheets/tungsten/components/_tooltip.scss +1 -0
- data/app/assets/stylesheets/tungsten/core/_banner.scss +7 -0
- data/app/assets/stylesheets/tungsten/core/_globals.scss +10 -2
- data/app/assets/stylesheets/tungsten/core/_grid.scss +120 -122
- data/app/assets/stylesheets/tungsten/core/_layout.scss +7 -10
- data/app/assets/stylesheets/tungsten/core/_text.scss +1 -0
- data/app/assets/stylesheets/tungsten/form/_defaulted-inputs.scss +63 -23
- data/app/assets/stylesheets/tungsten/form/_form-diff.scss +17 -3
- data/app/assets/stylesheets/tungsten/form/_requires-restart.scss +6 -0
- data/app/helpers/tungsten/form_helper.rb +3 -0
- data/lib/tungsten/version.rb +1 -1
- data/public/{code-0.2.8.js → code-0.2.9.js} +0 -0
- data/public/{code-0.2.8.js.gz → code-0.2.9.js.gz} +0 -0
- data/public/{tungsten-0.2.8.css → tungsten-0.2.9.css} +283 -111
- data/public/tungsten-0.2.9.css.gz +0 -0
- data/public/{tungsten-0.2.8.js → tungsten-0.2.9.js} +2 -2
- data/public/tungsten-0.2.9.js.gz +0 -0
- metadata +8 -8
- data/public/tungsten-0.2.8.css.gz +0 -0
- data/public/tungsten-0.2.8.js.gz +0 -0
Binary file
|
@@ -76,7 +76,7 @@
|
|
76
76
|
|
77
77
|
function embed() {
|
78
78
|
if (!document.querySelector('#esvg-svg-icons')) {
|
79
|
-
document.querySelector('body').insertAdjacentHTML('afterbegin', '<svg id="esvg-svg-icons" data-symbol-class="svg-symbol" data-prefix="svg" version="1.1" style="height:0;position:absolute" data-turbolinks-permanent><symbol id="svg-angle-down" data-name="angle-down" viewBox="0 0 27 15" width="27" height="15" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M25.304.005c.092.012.116.012.206.036.135.037.263.097.377.177.348.244.545.665.508 1.088-.01.104-.032.207-.068.305-.048.132-.12.254-.21.36-.02.028-.046.053-.07.08l-12 12c-.025.022-.05.047-.077.07-.08.067-.17.123-.264.168-.32.148-.695.148-1.014 0-.095-.045-.184-.1-.264-.17-.027-.02-.052-.046-.077-.07l-12-12C.29 1.98.27 1.966.217 1.89c-.08-.114-.14-.242-.176-.377C-.08 1.066.074.578.428.28.535.19.658.12.788.073.92.025 1.06 0 1.2 0c.246 0 .49.076.69.217.076.053.09.072.16.134l11.15 11.153L24.352.35l.078-.07c.073-.056.09-.073.17-.12.122-.07.255-.118.393-.142.093-.016.116-.014.21-.018l.104.005z" fill-rule="nonzero"/></symbol><symbol id="svg-arrow-down-circle" data-name="arrow-down-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M22.218 18.943l-5.243 5.243c-.226.282-.558.48-.95.48-.006 0-.01-.006-.018-.006-.008 0-.013.005-.02.005-.315 0-.63-.12-.87-.36l-5.36-5.362c-.483-.48-.483-1.26 0-1.738.478-.48 1.255-.48 1.737 0l3.3 3.3V9.323c0-.678.55-1.23 1.23-1.23.68 0 1.23.552 1.23 1.23V20.43l3.226-3.225c.48-.48 1.26-.48 1.738 0 .48.48.48 1.258 0 1.738" fill-rule="nonzero"/></symbol><symbol id="svg-arrow-up-circle" data-name="arrow-up-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M22.294 14.798c-.24.24-.556.36-.87.36-.315 0-.627-.12-.868-.36l-3.303-3.305V22.68c0 .677-.548 1.23-1.23 1.23-.678 0-1.228-.553-1.228-1.23V11.57l-3.227 3.228c-.482.48-1.26.48-1.738 0-.482-.48-.482-1.258 0-1.737l5.243-5.247c.226-.282.56-.48.95-.48.008 0 .013.006.02.006.008 0 .013-.006.02-.006.327 0 .64.13.868.36l5.364 5.367c.48.48.48 1.26 0 1.738" fill-rule="nonzero"/></symbol><symbol id="svg-backup" data-name="backup" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M16.04 23.89c-.905.073-1.812.11-2.706.11C8.047 24 2.484 22.656 0 20.483v2.85c0 3.364 5.856 6 13.334 6 1.358 0 2.66-.088 3.888-.25C16.452 27.787 16 26.28 16 24.667c0-.263.015-.522.04-.778zm-2.707-1.223c1.004 0 1.988-.047 2.943-.13.556-2.19 1.943-4.045 3.807-5.213-2.15.436-4.49.676-6.75.676C8.047 18 2.483 16.656 0 14.483V18c0 2.113 5.947 4.667 13.333 4.667zm0-6c6.106 0 11.5-1.683 13.334-3.44V8.893C23.82 10.807 18.377 12 13.333 12 8.047 12 2.483 10.656 0 8.483V12c0 2.113 5.947 4.667 13.333 4.667zm0-6c6.106 0 11.5-1.683 13.334-3.438V6c0-3.364-5.858-6-13.334-6S0 2.636 0 6c0 2.113 5.948 4.667 13.333 4.667z" fill-opacity=".502"/><path d="M28 25.333h-2.667V28c0 .368-.3.667-.666.667-.368 0-.667-.3-.667-.667v-2.667h-2.667c-.368 0-.666-.298-.666-.666 0-.368.298-.667.666-.667H24v-2.667c0-.368.3-.666.667-.666.366 0 .666.298.666.666V24H28c.367 0 .667.3.667.667 0 .368-.3.666-.667.666m-3.333-8c-4.044 0-7.334 3.29-7.334 7.334S20.623 32 24.667 32C28.71 32 32 28.71 32 24.667c0-4.044-3.29-7.334-7.333-7.334" fill-rule="nonzero"/></symbol><symbol id="svg-check-circle" data-name="check-circle" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill-opacity=".149"/><path d="M24.925 12.745l-10.22 11.2-7.59-7.588c-.48-.483-.48-1.255 0-1.732.477-.483 1.252-.483 1.732 0l5.776 5.775 8.49-9.307c.457-.502 1.233-.536 1.733-.08.5.455.534 1.232.08 1.732" fill-rule="nonzero"/></symbol><symbol id="svg-cluster" data-name="cluster" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M16 32c-.056 0-.113-.002-.17-.005-.112-.007-.224-.02-.335-.04-.332-.06-.653-.18-.942-.354-.13-.078-.256-.167-.373-.266-.055-.047-.108-.096-.16-.147C9.604 26.8 5.2 22.397.813 17.98c-.076-.077-.148-.158-.214-.243-.127-.16-.236-.335-.324-.52-.09-.184-.157-.38-.203-.58C.023 16.43 0 16.215 0 16c0-.214.024-.43.073-.638.046-.2.114-.395.203-.58.088-.184.197-.358.323-.52.065-.084.137-.165.213-.242C5.2 9.604 9.603 5.2 14.02.813c.077-.076.158-.148.243-.214.16-.127.335-.236.52-.324.184-.09.38-.157.58-.203C15.57.023 15.785 0 16 0c.214 0 .43.024.638.073.2.046.395.114.58.203.184.088.358.197.52.323.084.065.165.137.242.213C22.396 5.2 26.8 9.603 31.187 14.02c.076.077.148.158.214.243.127.16.236.335.324.52.09.184.157.38.203.58.05.208.073.423.073.637 0 .214-.024.43-.073.638-.046.2-.114.395-.203.58-.088.184-.197.358-.323.52-.065.084-.137.165-.213.242-4.388 4.416-8.79 8.82-13.207 13.207-.052.05-.105.1-.16.147-.117.1-.242.188-.373.267-.275.166-.578.282-.892.345-.11.022-.223.038-.335.046-.05.005-.102.008-.152.01H16zm0-1.883c.055 0 .11-.005.164-.014.107-.02.21-.057.305-.112.068-.04.13-.087.187-.143 4.412-4.384 8.84-8.755 13.195-13.195.026-.027.052-.056.075-.087.042-.054.077-.113.106-.176.05-.112.08-.234.083-.356.005-.145-.023-.29-.083-.423-.03-.062-.064-.12-.106-.175-.023-.03-.05-.06-.075-.087-4.358-4.442-8.758-8.842-13.2-13.2-.027-.026-.056-.052-.087-.075-.054-.042-.113-.077-.176-.106-.112-.05-.234-.08-.356-.083-.145-.005-.29.023-.423.083-.06.028-.117.062-.17.102-.033.024-.063.05-.092.078-4.442 4.358-8.842 8.758-13.2 13.2l-.08.09c-.04.055-.073.112-.1.173-.06.133-.09.28-.084.424.004.122.032.244.083.355.03.062.064.12.106.175.023.03.05.06.075.087 4.358 4.442 8.758 8.842 13.2 13.2.055.053.116.1.183.14.088.05.184.087.284.106.056.012.112.018.17.02H16z" fill-opacity=".502" fill-rule="nonzero"/><path d="M17.482 26.93l-.847.846c-.17.17-.397.263-.635.263s-.466-.095-.635-.264l-11.14-11.14c-.17-.17-.264-.398-.264-.636s.095-.466.264-.635l11.14-11.14c.17-.17.398-.264.636-.264s.466.095.635.264l4.05 4.05v5.456c-.104.03-.205.064-.303.106-.27.116-.517.283-.725.49-.2.195-.362.426-.48.68-.102.22-.17.454-.2.695-.033.248-.025.5.022.745.04.213.11.42.21.614.122.244.288.466.487.654.193.18.416.33.658.438.2.09.412.15.628.18.11.015.22.022.328.023h.062c.11-.004.218-.014.326-.032.215-.036.425-.102.622-.195.243-.115.466-.273.656-.463s.348-.414.464-.657c.095-.2.162-.416.197-.636.038-.24.04-.488.002-.73-.038-.24-.112-.472-.22-.69-.123-.248-.292-.475-.494-.666-.214-.2-.465-.362-.738-.472-.08-.032-.164-.06-.25-.084V9.528l5.838 5.837c.17.17.263.397.263.635s-.095.466-.264.635l-6.64 6.64-4.508-4.51v-6.51c.13-.036.258-.083.38-.14.243-.116.466-.274.657-.464.187-.186.342-.405.457-.643.097-.2.164-.415.2-.634.042-.246.043-.5.005-.745-.036-.24-.11-.472-.218-.69-.125-.248-.293-.475-.496-.666-.214-.2-.465-.362-.737-.472-.144-.058-.294-.1-.447-.13-.15-.027-.306-.04-.46-.04-.15.003-.298.02-.444.05-.156.03-.31.08-.456.142-.27.116-.516.283-.725.49-.198.195-.36.426-.48.68-.102.218-.17.454-.2.695-.032.247-.024.5.023.744.04.214.11.422.21.615.12.24.283.46.478.645.195.186.422.338.668.448.106.047.216.087.328.118v6.768c.002.05 0 .06.01.11.016.09.05.176.104.25.028.04.037.048.07.084l4.693 4.694-1.88 1.88-6.962-6.962v-.81c.13-.036.258-.084.38-.142.244-.115.467-.273.657-.463s.348-.414.464-.657c.094-.2.16-.416.196-.636.038-.24.04-.488.002-.73-.037-.24-.11-.472-.218-.69-.124-.248-.293-.475-.495-.666-.214-.2-.465-.362-.738-.472-.144-.057-.293-.1-.446-.13-.15-.027-.305-.04-.46-.038-.154.002-.307.018-.458.05-.15.032-.3.08-.44.14-.27.116-.518.283-.726.49-.198.195-.362.426-.48.68-.102.22-.17.454-.2.695-.033.248-.025.5.022.745.043.223.118.44.223.64.125.238.29.455.487.638.19.178.41.323.647.43.107.046.217.086.33.117v1.07c0 .04 0 .05.005.09.012.088.044.173.092.25.017.024.035.048.054.07l.03.033 7.146 7.146zm-6.7-9.83c.055 0 .11-.005.166-.014.096-.014.19-.042.278-.08.103-.047.2-.11.283-.184.09-.08.168-.176.228-.28.05-.093.09-.19.114-.293.03-.13.035-.26.02-.39-.015-.11-.046-.217-.092-.318-.055-.12-.133-.23-.227-.324-.098-.096-.213-.174-.34-.228-.13-.057-.274-.087-.418-.09-.145 0-.29.025-.423.08-.125.05-.24.123-.34.215-.097.09-.178.2-.237.317-.05.1-.083.205-.1.313-.02.13-.018.262.007.39.02.1.055.2.102.29.053.102.123.196.204.277.087.085.187.156.297.21.09.042.183.073.28.09.055.01.11.015.167.017h.03zm10.53 0c.056 0 .112-.005.167-.014.095-.014.19-.042.277-.08.107-.05.206-.114.293-.192.087-.08.16-.172.22-.273.05-.09.087-.185.11-.285.032-.13.04-.264.022-.396-.014-.11-.045-.217-.09-.318-.056-.12-.134-.23-.228-.324-.098-.096-.213-.174-.34-.228-.13-.057-.274-.087-.418-.09-.145 0-.29.025-.423.08-.126.05-.24.123-.34.215-.097.09-.178.2-.237.317-.05.1-.083.205-.1.313-.02.13-.018.262.007.39.02.106.058.208.108.302.058.105.13.2.218.283.082.077.176.142.278.19.09.044.183.075.28.092.055.01.11.015.167.017h.028zM16 11.084c.056 0 .112-.004.168-.013.096-.014.19-.042.278-.08.103-.047.198-.11.283-.184.09-.08.167-.176.227-.282.05-.09.09-.185.112-.285.03-.128.037-.263.02-.395-.014-.11-.044-.217-.09-.317-.056-.12-.133-.23-.228-.324-.097-.096-.213-.174-.34-.23-.13-.055-.274-.085-.418-.087-.144-.002-.29.024-.423.078-.124.05-.24.124-.338.216-.097.092-.178.2-.237.318-.05.1-.083.204-.1.313-.02.13-.02.263.007.39.02.106.057.208.108.303.057.107.133.205.222.287.08.076.173.14.272.187.09.044.188.075.288.092.053.008.106.013.16.015H16z"/></symbol><symbol id="svg-copy" data-name="copy" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><g fill-rule="nonzero"><path d="M22.667 4.667c0-.368-.3-.667-.667-.667h-3.333v10.495c1.208-.64 2.562-1.032 4-1.127v-8.7zM4 25.333V4H.667C.3 4 0 4.3 0 4.667V26c0 1.837 1.496 3.333 3.333 3.333h12.02c-.878-1.165-1.517-2.52-1.818-4H4z" fill-opacity=".302"/><path d="M14 12H7.333c-.368 0-.666.3-.666.667 0 .368.298.666.666.666H14c.368 0 .667-.298.667-.666 0-.368-.3-.667-.667-.667M14 14.667H7.333c-.368 0-.666.298-.666.666 0 .368.298.667.666.667H14c.368 0 .667-.3.667-.667 0-.368-.3-.666-.667-.666M14.667 18c0-.368-.3-.667-.667-.667H7.333c-.368 0-.666.3-.666.667 0 .368.298.667.666.667H14c.368 0 .667-.3.667-.667M7.333 20c-.368 0-.666.3-.666.667 0 .368.298.666.666.666h4c.368 0 .667-.298.667-.666 0-.368-.3-.667-.667-.667h-4z" fill-opacity=".502"/><path d="M6 9.333h10.667c.368 0 .666-.298.666-.666V3.333c0-.368-.298-.666-.666-.666h-2.06C14.33 1.115 13.087 0 11.333 0 9.687 0 8.363 1 8.06 2.667H6c-.368 0-.667.298-.667.666v5.334c0 .368.3.666.667.666" fill-opacity=".302"/><path d="M26.97 24H24v2.97c0 .367-.3.666-.667.666-.368 0-.666-.3-.666-.667V24h-2.97c-.368 0-.666-.3-.666-.667 0-.368.3-.666.667-.666h2.97v-2.97c0-.37.298-.666.666-.666.368 0 .667.298.667.667v2.97h2.97c.367 0 .666.298.666.666 0 .368-.3.667-.667.667m-3.637-9.333c-4.78 0-8.666 3.888-8.666 8.666 0 4.78 3.886 8.667 8.666 8.667S32 28.112 32 23.333c0-4.778-3.888-8.666-8.667-8.666"/></g></symbol><symbol id="svg-deployment" data-name="deployment" viewBox="0 0 176 201" width="176" height="201" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M88 5.985l82.272 47.5v95L88 195.985l-82.272-47.5v-95L88 5.985z"/></symbol><symbol id="svg-dice" data-name="dice" viewBox="0 0 45 32" width="45" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M30.762 10.232c1.183.684 1.59 2.2.906 3.382l-9.9 17.148c-.683 1.183-2.2 1.59-3.382.906l-17.148-9.9c-1.183-.684-1.59-2.2-.906-3.382l9.9-17.148c.684-1.183 2.2-1.59 3.382-.906l17.148 9.9z" fill-opacity=".149"/><path d="M22.13 5.25c.02-.002.04-.002.06-.002h19.803c1.366 0 2.475 1.11 2.475 2.475v19.802c0 1.366-1.11 2.475-2.475 2.475H22.208l2.44-4.23c.273.11.57.17.88.17 1.29 0 2.34-1.047 2.34-2.338 0-.75-.354-1.416-.902-1.844l4.702-8.144c.683-1.183.277-2.698-.906-3.382L22.13 5.25zm16.35 16.013c1.29 0 2.34 1.048 2.34 2.34 0 1.29-1.05 2.338-2.34 2.338-1.29 0-2.34-1.047-2.34-2.338 0-1.29 1.05-2.34 2.34-2.34zm0-11.956c1.29 0 2.34 1.048 2.34 2.34 0 1.29-1.05 2.338-2.34 2.338-1.29 0-2.34-1.048-2.34-2.34 0-1.29 1.05-2.338 2.34-2.338zM19.712 22.345c1.118.645 1.502 2.077.857 3.196-.647 1.12-2.08 1.502-3.197.857-1.118-.646-1.502-2.078-.856-3.196.645-1.117 2.077-1.5 3.195-.855zM17.093 13.93c1.118.645 1.502 2.077.856 3.195-.647 1.118-2.078 1.502-3.197.857-1.118-.646-1.5-2.078-.856-3.196.646-1.118 2.078-1.502 3.196-.856zM14.473 5.514c1.118.646 1.502 2.078.856 3.196-.646 1.118-2.078 1.502-3.196.856-1.118-.645-1.502-2.077-.856-3.195.645-1.118 2.077-1.5 3.195-.856z"/></symbol><symbol id="svg-download" data-name="download" viewBox="0 0 33 32" width="33" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="none" d="M0 0h32.978v32H0z"/><path d="M15.5 28.627V16.92c.005-.1.015-.195.045-.29.08-.262.27-.48.515-.6.113-.054.23-.08.355-.095.074-.003.074-.003.148 0 .124.014.24.04.355.095.245.12.435.338.515.6.03.095.04.19.044.29v11.707l2.54-2.54.043-.04c.12-.1.25-.176.4-.216.13-.034.267-.042.4-.023.326.048.613.262.752.56.04.087.068.18.082.275.014.094.014.19 0 .286-.02.133-.066.26-.137.376-.03.05-.065.093-.102.138-1.38 1.462-2.842 2.844-4.264 4.266l-.03.03c-.052.048-.11.09-.17.126-.027.016-.055.03-.084.044-.108.05-.225.08-.344.09-.097.007-.196 0-.293-.022-.097-.022-.19-.06-.275-.108-.075-.043-.145-.097-.206-.158-1.45-1.37-2.82-2.818-4.227-4.227-.107-.112-.19-.24-.24-.387-.11-.332-.032-.707.2-.968.064-.07.138-.134.22-.184.15-.092.315-.136.49-.147.057 0 .057 0 .114.004.058.007.114.016.17.03.17.046.316.136.443.256l2.54 2.54zm10.424-4.984h-4.52c-.036-.002-.072-.002-.107-.006-.142-.015-.28-.062-.403-.136-.09-.054-.174-.124-.243-.206-.258-.305-.307-.748-.12-1.102.05-.094.116-.18.194-.254.13-.123.293-.21.467-.248.094-.02.12-.018.214-.023h4.444c.43-.075.854-.197 1.264-.348 1.132-.42 2.194-1.103 2.908-2.09.165-.23.31-.47.433-.724.287-.59.45-1.234.516-1.886.037-.383.045-.77.015-1.155-.033-.436-.117-.868-.25-1.285-.37-1.173-1.124-2.212-2.122-2.932-.48-.348-1.017-.62-1.583-.802-.42-.135-.857-.22-1.297-.257-.232-.02-.463-.022-.696-.016l-.103-.002c-.09-.012-.115-.01-.204-.037-.2-.058-.378-.18-.505-.345-.056-.073-.064-.095-.108-.176-.054-.113-.11-.224-.168-.335-.347-.65-.77-1.255-1.27-1.796-.6-.647-1.297-1.2-2.064-1.634-.824-.465-1.727-.79-2.66-.952-.792-.14-1.604-.164-2.403-.076-.8.088-1.588.292-2.33.604-.875.368-1.685.885-2.388 1.52-.775.702-1.418 1.546-1.887 2.48-.343.683-.593 1.414-.74 2.165-.07.373-.116.748-.14 1.127l-.013.104c-.008.035-.014.07-.024.104-.018.067-.045.133-.078.195-.133.248-.373.43-.65.495-.067.016-.137.024-.207.025-.035 0-.07-.003-.106-.004-.137-.02-.272-.048-.408-.068-.496-.063-.996-.043-1.483.073-1.008.242-1.902.874-2.468 1.74-.173.264-.315.55-.42.846-.11.308-.182.628-.215.953-.04.392-.025.794.03 1.184.075.536.243 1.06.54 1.517.09.14.19.27.3.393.632.704 1.546 1.09 2.458 1.275.34.07.692.116 1.04.12h5.17l.107.005c.094.015.118.015.21.046.168.056.32.16.436.295.07.082.125.175.165.274.04.1.063.204.07.31.018.363-.168.715-.478.9-.123.075-.26.122-.403.137-.035.004-.07.004-.107.006-1.744 0-3.49.014-5.233 0-.42-.012-.836-.057-1.247-.134-1.186-.223-2.346-.7-3.253-1.512-.167-.15-.324-.31-.47-.48-.177-.203-.337-.42-.48-.65-.397-.64-.645-1.363-.764-2.106-.047-.296-.074-.594-.084-.894-.01-.296-.003-.592.027-.887.047-.455.145-.905.292-1.338.338-.99.94-1.883 1.723-2.575.656-.578 1.436-1.01 2.274-1.26.61-.184 1.25-.265 1.888-.25l.06-.344c.067-.326.144-.648.238-.967.198-.665.462-1.31.788-1.923.66-1.243 1.576-2.348 2.672-3.23.883-.713 1.882-1.278 2.947-1.668.702-.256 1.43-.436 2.172-.536.337-.047.676-.074 1.017-.088.16-.005.323-.008.485-.007.918.012 1.83.137 2.715.385 1.845.518 3.527 1.556 4.828 2.963.575.622 1.068 1.313 1.48 2.053l.004.006c.092.005.185.01.277.018.102.008.202.018.302.03.23.03.46.065.687.114.57.12 1.128.308 1.657.556 1.148.54 2.155 1.364 2.912 2.38.57.768.998 1.64 1.252 2.562.277 1.007.338 2.06.218 3.097-.097.834-.322 1.654-.69 2.41-.173.356-.377.696-.608 1.016-.154.212-.32.415-.495.61-.903.992-2.076 1.712-3.33 2.176-.553.205-1.128.367-1.712.458-.047.006-.046.006-.093.01l-.068.003z"/></symbol><symbol id="svg-gear-circle" data-name="gear-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><g fill-rule="nonzero"><path d="M24.253 6.97c.168.045.32.117.445.24.054.052.064.068.11.128 1.096 1.71 2.035 3.514 3.05 5.272.04.077.074.15.095.236.07.277.004.578-.175.8-.073.09-.16.16-.257.22l-1.64.95c.022.154.034.308.048.464.013.193.023.385.026.58.003.423-.023.842-.07 1.263v.013l1.64.95.072.044c.07.053.13.107.186.174.16.2.23.464.192.718-.013.086-.04.164-.073.244-.932 1.803-2.025 3.52-3.04 5.277-.046.073-.094.14-.156.2-.206.2-.5.294-.783.25-.114-.018-.216-.06-.318-.113l-1.635-.95c-.13.098-.262.188-.396.28-.19.123-.19.122-.384.242-.39.23-.787.435-1.2.623l-.013.006v1.91l-.004.084c-.013.086-.028.167-.06.248-.092.24-.285.432-.525.525-.08.03-.162.046-.247.058-2.03.094-4.062.004-6.094.004-.086-.005-.168-.012-.25-.036-.277-.078-.504-.286-.607-.552-.042-.11-.057-.218-.063-.333V25.08c-.142-.06-.282-.128-.422-.195-.203-.102-.203-.1-.404-.207-.404-.222-.79-.464-1.168-.73l-.027-.02-1.66.952-.074.038c-.08.033-.16.06-.245.073-.253.04-.517-.032-.716-.193-.07-.054-.122-.117-.175-.185C6.14 22.905 5.2 21.1 4.185 19.34c-.052-.1-.094-.203-.11-.318-.045-.282.048-.576.247-.78.06-.064.128-.11.2-.157l1.642-.948c-.02-.156-.033-.31-.046-.467-.014-.23-.014-.23-.023-.46-.006-.464.018-.922.07-1.382v-.014l-1.64-.947-.07-.046c-.07-.052-.13-.106-.186-.173-.162-.2-.232-.465-.193-.718.014-.087.04-.165.074-.245.935-1.803 2.03-3.518 3.047-5.276.062-.098.13-.184.22-.257.222-.18.523-.245.8-.176.084.02.16.056.235.096l1.652.95c.07-.052.143-.102.214-.152.19-.128.19-.128.385-.252.454-.278.92-.523 1.407-.743l.014-.006V4.96l.004-.085c.012-.085.027-.166.06-.247.09-.24.285-.433.524-.526.08-.03.162-.046.248-.058 2.028-.094 4.062-.004 6.093-.004.115.006.224.02.332.062.267.104.474.33.553.607.023.084.03.166.035.252V6.87c.142.06.28.13.42.196.202.102.2.102.4.208.4.224.782.466 1.154.733l.02.014 1.628-.946.076-.04c.138-.055.266-.08.414-.084.085.007.085.006.17.02zm-2.23 14.94c.118.025.22.06.325.115l1.38.8 2.08-3.607-1.39-.802c-.064-.04-.082-.05-.14-.1-.153-.132-.26-.313-.3-.51-.018-.087-.02-.17-.017-.258.028-.216.07-.43.098-.645.04-.37.067-.74.055-1.11-.015-.44-.068-.87-.143-1.304l-.01-.086c-.003-.088-.002-.17.016-.257.04-.198.147-.38.3-.51.058-.052.076-.06.14-.1l1.388-.803-2.08-3.605-1.375.798c-.07.035-.085.046-.158.072-.19.067-.402.07-.594.006-.084-.028-.157-.07-.232-.115-.123-.092-.24-.194-.362-.29-.348-.262-.71-.502-1.093-.71-.382-.21-.78-.386-1.187-.542l-.078-.034c-.066-.037-.084-.044-.145-.09-.16-.12-.277-.29-.332-.483-.024-.082-.03-.165-.035-.25V5.88h-4.168V7.49c-.004.086-.012.168-.036.252-.056.192-.174.363-.333.483-.06.045-.08.052-.145.09-.2.086-.402.16-.602.245-.745.337-1.446.748-2.072 1.276l-.07.052c-.074.047-.147.088-.23.116-.192.065-.404.064-.595-.003-.073-.024-.09-.035-.157-.07L8.33 9.125l-2.086 3.608 1.387.802c.066.04.083.05.142.1.153.132.26.314.3.512.018.087.02.17.016.258-.02.154-.05.307-.073.46-.058.43-.09.862-.08 1.297.01.437.065.868.14 1.297l.01.086c.004.077.007.096 0 .172-.023.202-.113.393-.253.54-.06.062-.13.11-.203.158l-1.39.802 2.084 3.61 1.403-.805c.078-.04.154-.075.24-.096.196-.048.407-.03.59.053.072.032.087.044.152.085.12.092.236.192.356.286.3.226.61.433.938.618.44.25.9.455 1.37.636l.08.034c.065.037.083.044.143.09.16.12.278.29.332.482.023.084.03.166.035.253v1.606h4.168v-1.607c.004-.087.01-.17.035-.253.055-.19.172-.363.332-.483.06-.045.078-.052.144-.09.197-.085.4-.16.598-.245.455-.207.895-.44 1.31-.716.26-.173.506-.362.745-.56l.07-.054c.064-.04.08-.052.15-.083.108-.05.218-.068.335-.078.086 0 .086 0 .172.01z"/><path d="M16.148 11.052c.698.026 1.378.18 2.01.484.533.257 1.02.613 1.43 1.042.41.43.74.934.97 1.48.19.45.313.93.363 1.415.052.498.027 1.005-.074 1.495-.314 1.533-1.372 2.853-2.797 3.497-.598.27-1.247.418-1.902.434-.658.016-1.32-.1-1.932-.34-.553-.22-1.066-.54-1.506-.938-.44-.4-.805-.876-1.075-1.403-.22-.432-.377-.896-.462-1.373-.08-.452-.1-.916-.052-1.374.06-.565.215-1.12.462-1.632.43-.89 1.13-1.643 1.987-2.137.637-.366 1.342-.573 2.073-.638.17-.01.336-.016.505-.013zm-.206 1.84c-.437.016-.863.112-1.257.302-.81.39-1.428 1.138-1.652 2.01-.09.354-.118.725-.08 1.088.032.33.12.652.255.954.153.34.37.65.632.91.263.264.573.48.912.632.374.17.78.26 1.19.27.413.012.826-.06 1.21-.21.347-.138.668-.338.944-.59.275-.248.504-.548.673-.878.137-.27.234-.56.288-.857.06-.336.063-.68.012-1.018-.14-.92-.71-1.743-1.514-2.207-.4-.23-.84-.358-1.297-.4-.107-.005-.212-.008-.318-.007z"/></g></symbol><symbol id="svg-gear" data-name="gear" viewBox="0 0 32 33" width="32" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M23.018 1.842c.258.022.51.08.746.185.198.088.386.2.553.338.132.106.25.227.355.36.336.432.486.97.495 1.51.007.384-.054.762-.14 1.135l-.584 2.148.02.02.02.02 2.14-.583.198-.046c.2-.04.402-.074.606-.088.42-.03.85.01 1.246.157.27.1.522.25.736.442.397.36.668.867.74 1.4.037.26.025.524-.03.78-.095.444-.313.85-.583 1.212-.125.166-.262.322-.403.474l-1.572 1.56.008.03.01.035c.716.19 1.426.4 2.148.567.09.026.09.026.18.055.195.065.385.137.57.227.36.176.698.41.962.716.174.2.315.428.41.676.208.54.203 1.165-.016 1.702-.09.224-.22.432-.377.615-.286.334-.66.58-1.055.76-.22.102-.45.18-.68.252l-2.142.566-.01.036-.008.03 1.567 1.554c.07.073.07.073.138.147.136.153.265.31.38.48.235.35.415.74.487 1.157.05.285.045.577-.016.86-.112.524-.418 1.012-.84 1.342-.193.15-.41.265-.64.345-.412.144-.858.17-1.29.128-.243-.023-.48-.068-.716-.123l-2.147-.583-.02.02-.02.02.583 2.142c.025.1.024.1.047.198.04.2.072.4.087.605.027.4-.007.81-.14 1.19-.092.27-.233.524-.42.742-.36.424-.888.713-1.44.79-.26.035-.525.023-.78-.032-.655-.14-1.208-.54-1.69-.988l-1.555-1.57-.03.01-.038.01-.563 2.132c-.03.098-.028.097-.06.194-.053.16-.11.32-.18.474-.19.415-.452.802-.804 1.094-.205.17-.44.305-.69.395-.506.18-1.083.173-1.586-.015-.246-.093-.475-.23-.674-.4-.36-.31-.616-.718-.8-1.15-.083-.19-.15-.387-.21-.585l-.566-2.14-.036-.01-.03-.01-1.555 1.568c-.073.07-.073.07-.147.138-.127.113-.257.22-.395.32-.354.253-.754.452-1.185.536-.28.054-.57.058-.852.006-.528-.097-1.024-.39-1.366-.804-.168-.204-.298-.438-.385-.687-.156-.446-.175-.927-.12-1.394.025-.206.066-.41.112-.612l.585-2.148-.02-.02-.02-.02-2.14.582-.198.046c-.166.034-.333.063-.502.08-.434.043-.88.015-1.296-.128-.27-.093-.524-.234-.742-.42-.423-.362-.713-.89-.79-1.442-.033-.24-.025-.484.02-.722.126-.677.537-1.25.997-1.745l1.57-1.56-.01-.03-.008-.036-2.134-.563-.194-.058c-.193-.065-.384-.138-.568-.227-.38-.185-.73-.434-1-.76-.17-.205-.306-.438-.395-.69-.186-.525-.173-1.127.038-1.644.1-.242.242-.466.417-.66.446-.496 1.07-.774 1.696-.968l2.142-.565.01-.035.008-.03-1.566-1.555-.14-.148c-.413-.467-.76-1.015-.865-1.64-.045-.262-.045-.532.003-.794.098-.527.392-1.024.807-1.365.203-.167.435-.296.683-.383.414-.145.86-.172 1.293-.13.242.022.48.068.716.122l2.147.585.02-.022.02-.02-.584-2.14c-.025-.1-.025-.1-.047-.2-.04-.2-.074-.4-.088-.604-.03-.42.01-.85.157-1.246.092-.25.228-.484.4-.687.35-.406.852-.69 1.38-.777.26-.044.527-.04.786.01.43.08.83.28 1.184.532.198.14.38.3.56.464l1.558 1.57.03-.008.036-.01.563-2.136.06-.193c.053-.16.11-.32.182-.474.18-.398.426-.77.757-1.057.232-.2.502-.358.794-.452.492-.158 1.044-.146 1.528.036.246.092.474.23.674.4.358.31.615.717.8 1.148.082.19.148.387.21.585l.565 2.142.035.01.032.008 1.553-1.566.148-.14c.453-.4.98-.738 1.58-.854.16-.03.32-.043.48-.043.062 0 .06 0 .123.005zm-6.932 7.48c.34.006.678.033 1.013.09.595.098 1.177.278 1.724.533 1.24.58 2.288 1.543 2.97 2.73.354.615.61 1.286.75 1.98.153.75.177 1.522.07 2.278-.094.68-.295 1.345-.593 1.964-.336.7-.797 1.34-1.353 1.883-.595.582-1.3 1.05-2.066 1.375-.794.336-1.65.513-2.513.525-.865.01-1.73-.146-2.536-.463-.774-.306-1.49-.76-2.1-1.327-.588-.548-1.076-1.2-1.434-1.92-.306-.614-.515-1.276-.618-1.954-.115-.755-.1-1.53.042-2.28.134-.696.38-1.37.726-1.99.654-1.172 1.664-2.133 2.865-2.73.59-.293 1.223-.498 1.872-.605.278-.045.56-.072.84-.084.115-.004.23-.005.344-.005z" fill-opacity=".149"/><path d="M23.018 1.842c.258.022.51.08.746.185.198.088.386.2.553.338.132.106.25.227.355.36.336.432.486.97.495 1.51.007.384-.054.762-.14 1.135l-.584 2.148.02.02.02.02 2.14-.583.198-.046c.2-.04.402-.074.606-.088.42-.03.85.01 1.246.157.27.1.522.25.736.442.397.36.668.867.74 1.4.037.26.025.524-.03.78-.095.444-.313.85-.583 1.212-.125.166-.262.322-.403.474l-1.572 1.56.008.03.01.035c.716.19 1.426.4 2.148.567.09.026.09.026.18.055.195.065.385.137.57.227.36.176.698.41.962.716.174.2.315.428.41.676.208.54.203 1.165-.016 1.702-.09.224-.22.432-.377.615-.286.334-.66.58-1.055.76-.22.102-.45.18-.68.252l-2.142.566-.01.036-.008.03 1.567 1.554c.07.073.07.073.138.147.136.153.265.31.38.48.235.35.415.74.487 1.157.05.285.045.577-.016.86-.112.524-.418 1.012-.84 1.342-.193.15-.41.265-.64.345-.412.144-.858.17-1.29.128-.243-.023-.48-.068-.716-.123l-2.147-.583-.02.02-.02.02.583 2.142c.025.1.024.1.047.198.04.2.072.4.087.605.027.4-.007.81-.14 1.19-.092.27-.233.524-.42.742-.36.424-.888.713-1.44.79-.26.035-.525.023-.78-.032-.655-.14-1.208-.54-1.69-.988l-1.555-1.57-.03.01-.038.01-.563 2.132c-.03.098-.028.097-.06.194-.053.16-.11.32-.18.474-.19.415-.452.802-.804 1.094-.205.17-.44.305-.69.395-.506.18-1.083.173-1.586-.015-.246-.093-.475-.23-.674-.4-.36-.31-.616-.718-.8-1.15-.083-.19-.15-.387-.21-.585l-.566-2.14-.036-.01-.03-.01-1.555 1.568c-.073.07-.073.07-.147.138-.127.113-.257.22-.395.32-.354.253-.754.452-1.185.536-.28.054-.57.058-.852.006-.528-.097-1.024-.39-1.366-.804-.168-.204-.298-.438-.385-.687-.156-.446-.175-.927-.12-1.394.025-.206.066-.41.112-.612l.585-2.148-.02-.02-.02-.02-2.14.582-.198.046c-.166.034-.333.063-.502.08-.434.043-.88.015-1.296-.128-.27-.093-.524-.234-.742-.42-.423-.362-.713-.89-.79-1.442-.033-.24-.025-.484.02-.722.126-.677.537-1.25.997-1.745l1.57-1.56-.01-.03-.008-.036-2.134-.563-.194-.058c-.193-.065-.384-.138-.568-.227-.38-.185-.73-.434-1-.76-.17-.205-.306-.438-.395-.69-.186-.525-.173-1.127.038-1.644.1-.242.242-.466.417-.66.446-.496 1.07-.774 1.696-.968l2.142-.565.01-.035.008-.03-1.566-1.555-.14-.148c-.413-.467-.76-1.015-.865-1.64-.045-.262-.045-.532.003-.794.098-.527.392-1.024.807-1.365.203-.167.435-.296.683-.383.414-.145.86-.172 1.293-.13.242.022.48.068.716.122l2.147.585.02-.022.02-.02-.584-2.14c-.025-.1-.025-.1-.047-.2-.04-.2-.074-.4-.088-.604-.03-.42.01-.85.157-1.246.092-.25.228-.484.4-.687.35-.406.852-.69 1.38-.777.26-.044.527-.04.786.01.43.08.83.28 1.184.532.198.14.38.3.56.464l1.558 1.57.03-.008.036-.01.563-2.136.06-.193c.053-.16.11-.32.182-.474.18-.398.426-.77.757-1.057.232-.2.502-.358.794-.452.492-.158 1.044-.146 1.528.036.246.092.474.23.674.4.358.31.615.717.8 1.148.082.19.148.387.21.585l.565 2.142.035.01.032.008 1.553-1.566.148-.14c.453-.4.98-.738 1.58-.854.16-.03.32-.043.48-.043.062 0 .06 0 .123.005zM12.783 25.575l.1.026c.126.04.252.08.38.117.21.06.423.11.638.158l.1.027c.086.034.11.04.188.087.147.09.27.22.348.372.043.082.046.105.075.192l.7 2.647c.024.084.05.167.082.248.022.057.045.114.07.17.017.036.03.062.05.098.015.03.03.057.047.087.065.11.153.235.277.286.068.027.147.032.22.024.05-.006.1-.022.144-.048.056-.033.104-.08.146-.13.06-.072.112-.154.156-.238.08-.156.14-.322.188-.49l.7-2.654c.03-.087.032-.11.075-.192.095-.184.25-.334.44-.42.143-.068.303-.09.456-.126.128-.03.127-.03.254-.064.17-.047.336-.097.502-.15l.1-.027c.092-.014.114-.02.207-.02.173.004.344.056.49.15.077.05.092.067.16.13l1.93 1.944c.062.058.127.116.194.17.048.04.096.078.146.113.03.022.06.04.09.06.03.02.057.036.087.053.11.062.25.127.382.108.074-.01.145-.045.204-.09.042-.03.077-.068.102-.113.032-.056.05-.12.06-.184.018-.094.02-.19.017-.285-.008-.174-.04-.347-.08-.516l-.726-2.662c-.02-.09-.03-.112-.033-.204-.01-.208.05-.416.17-.586.092-.128.218-.226.332-.332l.274-.27.27-.29.074-.07c.072-.057.088-.075.168-.12.15-.08.324-.12.495-.113.093.004.115.013.204.032l2.653.72c.085.02.17.037.256.05.06.01.12.02.182.025.036.003.073.006.11.007.032.002.066.003.1.002.126-.002.28-.015.384-.096.058-.046.102-.113.132-.18.02-.048.032-.098.03-.15 0-.064-.017-.128-.04-.19-.03-.09-.077-.173-.128-.253-.094-.148-.21-.28-.33-.408l-1.95-1.935c-.062-.068-.08-.083-.13-.16-.112-.175-.163-.386-.145-.592.008-.092.017-.114.04-.203.04-.126.08-.253.117-.38.058-.21.11-.423.158-.637l.028-.1c.034-.084.04-.108.087-.186.09-.148.22-.27.372-.35.082-.04.105-.044.192-.073l2.648-.698c.083-.025.166-.052.247-.083l.168-.07.1-.05c.03-.015.056-.03.086-.048.11-.065.235-.153.285-.276.027-.07.032-.15.023-.222-.005-.05-.02-.1-.047-.145-.033-.057-.08-.104-.128-.146-.073-.062-.155-.112-.24-.156-.155-.08-.32-.14-.49-.188l-2.653-.7c-.088-.028-.11-.032-.193-.074-.184-.096-.334-.252-.42-.44-.067-.143-.09-.303-.126-.455-.03-.125-.064-.25-.1-.377-.037-.127-.075-.254-.116-.38l-.026-.1c-.013-.09-.02-.114-.018-.206.003-.173.055-.343.148-.49.05-.076.068-.09.13-.16L27.78 10c.058-.065.116-.13.17-.196.04-.048.077-.096.113-.146.02-.03.042-.06.06-.09.018-.027.038-.06.053-.087.062-.11.127-.25.11-.38-.01-.072-.044-.138-.084-.196-.03-.045-.072-.084-.12-.11-.057-.032-.12-.05-.184-.062-.094-.017-.19-.02-.286-.015-.176.007-.348.04-.518.08l-2.66.726c-.088.02-.11.028-.202.032-.207.01-.415-.05-.585-.17-.075-.052-.09-.07-.154-.136l-.27-.29c-.153-.153-.31-.304-.47-.45l-.072-.074c-.056-.072-.073-.088-.118-.168-.083-.152-.123-.325-.115-.497.004-.09.013-.113.032-.203l.722-2.654c.02-.085.037-.17.05-.255.01-.06.018-.12.024-.18.004-.038.006-.07.008-.11v-.1c0-.127-.014-.28-.096-.385-.044-.056-.107-.097-.17-.127-.05-.024-.105-.038-.16-.037-.065 0-.13.016-.19.037-.09.033-.173.078-.254.13-.148.094-.28.21-.408.33l-1.933 1.948c-.068.062-.082.08-.16.13-.174.11-.384.163-.59.145-.092-.008-.114-.018-.202-.04-.126-.04-.252-.08-.38-.116-.21-.058-.423-.11-.638-.157l-.1-.027c-.085-.034-.11-.04-.188-.087-.148-.09-.27-.22-.35-.373-.042-.082-.045-.105-.074-.193L16.692 2.8c-.025-.084-.052-.166-.083-.248l-.07-.168c-.024-.05-.048-.097-.074-.144-.016-.03-.03-.054-.048-.08-.065-.1-.148-.21-.263-.252-.066-.025-.142-.03-.21-.02-.052.004-.1.02-.146.046-.056.033-.103.08-.144.128-.062.073-.113.155-.157.24-.082.156-.14.32-.19.49l-.7 2.655c-.028.088-.03.11-.074.193-.095.185-.252.335-.44.422-.144.066-.304.088-.457.123-.127.032-.253.064-.378.1-.128.036-.255.075-.38.115l-.1.025c-.092.013-.114.02-.206.018-.172-.003-.342-.055-.487-.148-.078-.05-.093-.068-.16-.13L10 4.222c-.064-.06-.128-.117-.196-.172-.047-.038-.095-.076-.145-.11-.03-.022-.062-.043-.093-.063-.028-.018-.056-.035-.085-.05-.112-.063-.25-.128-.382-.11-.07.01-.138.044-.196.084-.047.033-.084.073-.112.122-.032.056-.05.12-.06.182-.017.094-.02.19-.015.285.007.174.04.346.08.515l.727 2.66c.02.09.027.112.032.204.01.206-.05.413-.17.582-.052.076-.07.09-.135.155l-.287.27c-.155.154-.305.31-.45.47l-.075.073c-.072.057-.088.075-.17.12-.15.082-.324.123-.496.115-.092-.004-.115-.013-.204-.032L4.914 8.8c-.084-.02-.17-.037-.255-.05-.06-.01-.12-.02-.182-.025l-.11-.008h-.1c-.13 0-.287.015-.394.103-.052.042-.09.102-.12.163-.023.05-.036.104-.035.16 0 .064.016.128.038.19.032.088.078.173.13.254.094.148.208.28.33.407l1.947 1.934c.062.068.08.083.13.16.112.175.163.384.145.59-.008.092-.018.114-.04.203-.04.127-.08.254-.117.382-.058.21-.11.423-.157.638L6.1 14c-.035.085-.04.108-.088.187-.09.147-.22.27-.373.35-.083.04-.106.045-.194.073l-2.647.698c-.084.025-.166.052-.247.083l-.17.07c-.034.017-.065.032-.098.05-.03.016-.057.03-.087.048-.11.066-.236.154-.286.277-.028.07-.034.15-.025.223.005.05.02.1.047.144.033.056.08.103.13.145.072.06.154.112.24.156.154.08.32.138.488.187l2.655.7c.087.03.11.033.192.076.183.095.333.25.42.44.067.143.09.303.124.455.032.127.065.253.1.378.037.128.075.255.115.38l.025.1c.013.092.02.115.018.206-.003.173-.055.343-.148.488-.05.077-.068.092-.13.16l-1.943 1.93c-.06.064-.117.128-.172.195-.04.048-.076.096-.11.146-.023.03-.043.06-.063.09-.018.03-.035.058-.05.087-.063.112-.128.25-.11.382.01.07.044.138.083.196.032.045.072.084.12.11.057.032.12.05.183.06.094.018.19.02.285.016.176-.008.35-.04.52-.083l2.66-.72c.09-.02.112-.03.204-.033.206-.01.413.05.583.17.075.052.09.07.154.135.088.097.178.192.27.287.153.155.31.305.47.453l.072.073c.057.072.074.088.118.17.083.15.123.323.115.495-.004.093-.013.115-.032.204L8.8 27.087c-.02.084-.037.17-.05.254-.01.06-.02.122-.024.183-.004.037-.007.074-.008.11-.002.035-.002.066-.002.1.003.128.016.28.098.386.046.058.112.102.18.132.047.02.098.032.15.03.064 0 .128-.016.188-.038.09-.033.175-.078.255-.13.148-.094.28-.208.407-.33l1.935-1.95c.067-.06.082-.08.16-.13.115-.073.248-.122.384-.14.092-.01.115-.007.207-.004l.103.015zM16.086 9.32c.34.008.678.035 1.013.09.595.1 1.177.28 1.724.535 1.24.58 2.288 1.543 2.97 2.73.354.615.61 1.286.75 1.98.153.75.177 1.522.07 2.278-.094.68-.295 1.345-.593 1.964-.336.7-.797 1.34-1.353 1.883-.595.582-1.3 1.05-2.066 1.375-.794.336-1.65.513-2.513.525-.865.01-1.73-.146-2.536-.463-.774-.306-1.49-.76-2.1-1.327-.588-.548-1.076-1.2-1.434-1.92-.306-.614-.515-1.276-.618-1.954-.115-.755-.1-1.53.042-2.28.134-.696.38-1.37.726-1.99.654-1.172 1.664-2.133 2.865-2.73.59-.293 1.223-.498 1.872-.605.278-.045.56-.072.84-.084.115-.004.23-.005.344-.005zm-.148 1.884c-.68.012-1.348.16-1.964.447-.54.253-1.034.608-1.446 1.04-.386.405-.7.877-.925 1.39-.198.453-.325.937-.375 1.43-.055.545-.018 1.1.112 1.633.092.38.23.747.414 1.092.515.975 1.364 1.756 2.38 2.186.57.243 1.186.37 1.804.377.622.008 1.243-.103 1.82-.332.558-.22 1.072-.544 1.51-.952.423-.394.774-.863 1.032-1.38.21-.423.356-.876.433-1.34.087-.524.087-1.06 0-1.584-.074-.447-.212-.882-.408-1.29-.47-.974-1.27-1.775-2.245-2.244-.612-.295-1.278-.45-1.955-.47-.062-.002-.125-.003-.187-.002z" fill-rule="nonzero"/></symbol><symbol id="svg-heart-circle" data-name="heart-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M11.228 6.83c.45.027.894.1 1.326.234 1.488.46 2.712 1.564 3.47 2.912.08-.146.172-.287.263-.427.49-.72 1.086-1.355 1.816-1.83.545-.357 1.15-.617 1.785-.762.565-.13 1.15-.166 1.727-.112.482.046.958.155 1.413.32.416.152.815.353 1.186.594.934.607 1.685 1.475 2.174 2.473.358.732.576 1.527.66 2.336.04.374.056.753.034 1.13-.044.792-.254 1.57-.55 2.304-.44 1.098-1.07 2.116-1.77 3.068-1.223 1.67-2.673 3.174-4.192 4.577-1.256 1.16-2.568 2.265-3.944 3.282l-.07.048c-.258.144-.545.194-.83.106-.085-.025-.16-.063-.236-.106-.177-.12-.346-.253-.517-.383-1.207-.932-2.376-1.913-3.497-2.948C10.3 22.56 9.173 21.415 8.15 20.18c-.7-.848-1.355-1.74-1.905-2.693-.41-.71-.762-1.46-.998-2.244-.15-.503-.252-1.02-.282-1.546-.018-.323-.01-.648.018-.97.08-.96.346-1.906.81-2.753.443-.812 1.065-1.524 1.817-2.064.397-.285.83-.52 1.285-.7.578-.226 1.183-.35 1.802-.385.178-.006.354-.006.53 0zm9.778 2.024c-.31.012-.615.058-.912.15-.224.07-.44.162-.646.275-1.17.64-1.877 1.87-2.267 3.106-.065.206-.12.414-.172.624l-.026.086c-.067.17-.16.32-.3.44-.4.342-1.016.315-1.385-.06-.107-.11-.178-.238-.234-.38-.055-.186-.1-.375-.153-.562-.377-1.234-1.023-2.467-2.154-3.163-.153-.093-.312-.177-.477-.247-.367-.155-.76-.245-1.155-.265-.336-.018-.674.015-1 .093-.28.068-.55.167-.805.295-.833.418-1.49 1.13-1.88 1.973-.228.492-.365 1.024-.422 1.563-.042.407-.044.816.02 1.22.104.646.344 1.267.633 1.852.446.902 1.02 1.738 1.638 2.53.806 1.03 1.7 1.992 2.636 2.908 1.277 1.253 2.635 2.42 4.043 3.524l.036.027c1.015-.783 1.997-1.613 2.945-2.478.787-.717 1.55-1.46 2.276-2.24.978-1.05 1.903-2.167 2.65-3.395.47-.777.887-1.617 1.075-2.512.098-.474.11-.953.06-1.433-.054-.506-.177-1.005-.38-1.47-.35-.803-.937-1.496-1.693-1.94-.248-.148-.513-.266-.788-.353-.324-.103-.657-.155-.995-.166h-.17z" fill-rule="nonzero"/></symbol><symbol id="svg-lock-circle" data-name="lock-circle" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill-opacity=".149"/><path d="M9.558 11.134c0-.338.007-.676.01-1.014.03-.753.17-1.492.446-2.194.668-1.696 2.063-3.057 3.775-3.683.658-.24 1.345-.362 2.044-.388.166-.002.165-.002.332 0 .7.026 1.386.147 2.045.388 1.712.626 3.108 1.987 3.776 3.683.277.702.416 1.44.445 2.194.005.338.01.676.013 1.014.634.02 1.27.044 1.903.07.077.01.15.02.223.046.24.083.44.267.542.5.042.095.062.192.074.294.18 4.31.004 8.627.004 12.94-.005.103-.017.202-.05.3-.083.24-.267.44-.5.542-.095.042-.192.062-.294.075-5.534.23-11.078.004-16.617.004-.103-.004-.2-.016-.3-.05-.24-.083-.44-.266-.542-.5-.042-.095-.062-.19-.074-.293-.18-4.31-.004-8.627-.004-12.94.005-.103.017-.2.05-.3.083-.24.267-.44.5-.542.095-.04.192-.062.294-.074.634-.026 1.27-.05 1.904-.07zm13.794 1.905H8.648v11.026h14.704V13.04zm-8.303 5.247c-.57-.347-.92-.992-.886-1.667.01-.183.046-.365.11-.538.07-.195.176-.378.31-.54.15-.18.334-.332.54-.444.244-.132.507-.2.782-.22.095-.002.094-.002.188 0 .275.02.538.088.78.22.208.112.394.264.544.445.132.16.237.344.31.54.062.172.098.354.108.537.034.682-.324 1.333-.902 1.677.023 1.03.043 2.06-.018 3.085-.015.147-.057.287-.136.413-.218.35-.656.514-1.05.392-.105-.032-.204-.083-.29-.15-.097-.074-.18-.168-.24-.274-.066-.118-.103-.246-.116-.38-.06-1.03-.073-2.065-.035-3.096zm5.54-7.204c.003-.305.007-.61.003-.917-.022-.575-.134-1.138-.36-1.67-.522-1.234-1.586-2.2-2.867-2.6-.517-.16-1.062-.227-1.603-.2-.496.026-.986.13-1.448.313-.516.202-.994.5-1.404.873-.436.397-.796.878-1.052 1.41-.283.588-.426 1.223-.45 1.873-.005.306 0 .612.002.917 3.06-.07 6.12-.07 9.18 0z"/></symbol><symbol id="svg-logo" data-name="logo" viewBox="0 0 54 32" width="54" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M32.207 25.946L21.72 32l-11.234-6.486L0 19.46V6.485L11.235 0 21.72 6.054 32.207 0 43.44 6.486l10.487 6.055v12.974L42.693 32l-10.486-6.054zm.66-1.343V14.27l9.054 5.19.003 10.378-9.055-5.235zm-20.884.046V14.27l9.085 5.218.002 10.44-9.086-5.28zM1.498 18.594V8.215l8.988 5.19v10.38l-8.988-5.19zM21.72 7.785l8.99 5.188-8.99 5.19-8.988-5.19 8.99-5.19zm20.973 0l8.988 5.188-8.987 5.19-8.99-5.19 8.99-5.19zM11.235 1.728l8.988 5.19-8.988 5.188-8.99-5.19 8.99-5.188zm20.97 0l8.99 5.19-8.99 5.188-8.987-5.19 8.988-5.188z"/><path d="M1.437 18.643L1.442 8.11l19.652 11.35.01 10.545L1.436 18.643zm31.37 6l.03-10.464 9.147 5.243-.01 10.582-9.168-5.363z" fill-opacity=".345"/></symbol><symbol id="svg-message-circle" data-name="message-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M17.342 23.582l-3.53 3.53-.066.06c-.12.088-.245.155-.392.185-.38.076-.778-.112-.96-.455-.072-.133-.1-.272-.107-.42v-2.9c-.087 0-.174-.002-.26-.003l-.41-.022c-.333-.03-.665-.072-.994-.14-.64-.132-1.266-.344-1.856-.63-1.33-.643-2.473-1.658-3.273-2.9-.457-.713-.8-1.496-1.012-2.314-.203-.783-.284-1.597-.243-2.405.043-.864.228-1.718.546-2.52.357-.9.877-1.73 1.527-2.446.692-.76 1.53-1.388 2.455-1.836.71-.343 1.47-.58 2.248-.7.335-.05.672-.077 1.01-.09 2.665-.034 5.33-.034 7.996 0 .338.013.674.04 1.01.09.778.12 1.54.357 2.248.7.926.448 1.763 1.075 2.454 1.836.65.715 1.17 1.547 1.527 2.445.32.802.505 1.656.55 2.52.04.807-.04 1.62-.244 2.404-.212.818-.556 1.6-1.013 2.313-.87 1.353-2.146 2.434-3.627 3.063-.668.283-1.374.475-2.094.567-.336.043-.672.06-1.01.065h-2.48zm.123-5.826c.128.01.25.04.364.1.097.05.186.12.26.203.267.305.29.767.058 1.1-.055.078-.122.146-.198.203-.143.106-.31.16-.485.175-2.205.06-4.412.06-6.617 0-.176-.014-.342-.07-.485-.175-.326-.242-.448-.69-.29-1.063.037-.088.088-.17.15-.24.074-.084.163-.154.26-.205.115-.06.237-.09.365-.1 2.205-.058 4.412-.058 6.617 0zm3.747-2.847c.18.017.35.075.493.19.373.293.447.846.166 1.228-.07.096-.16.178-.263.24-.122.07-.255.107-.395.12-3.457.117-6.92.117-10.376 0-.18-.017-.35-.075-.494-.19-.372-.293-.447-.846-.165-1.228.07-.096.16-.178.264-.24.123-.07.255-.107.396-.12 3.457-.117 6.92-.117 10.376 0zm0-2.85c.14.015.273.05.395.123.103.06.193.143.264.24.282.38.208.934-.165 1.228-.144.115-.312.173-.493.192-3.457.115-6.92.115-10.376 0-.18-.02-.35-.077-.494-.19-.372-.295-.447-.848-.165-1.23.07-.096.16-.178.264-.24.123-.07.255-.107.396-.12 3.457-.117 6.92-.117 10.376 0z"/></symbol><symbol id="svg-no-circle" data-name="no-circle" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill-opacity=".149"/><path d="M16.288 3.93c.48.018.958.052 1.434.12 1.2.174 2.37.53 3.463 1.053 2.135 1.02 3.95 2.69 5.153 4.727.596 1.01 1.042 2.104 1.32 3.242.272 1.12.384 2.28.33 3.43-.06 1.254-.318 2.495-.76 3.67-1.17 3.098-3.644 5.633-6.713 6.877-1.43.58-2.97.878-4.515.878-1.544 0-3.084-.3-4.515-.88-2.284-.925-4.256-2.57-5.59-4.642-.555-.866-1-1.805-1.315-2.785-.355-1.1-.55-2.25-.577-3.404-.028-1.154.11-2.31.412-3.425.318-1.18.82-2.31 1.48-3.34 1.2-1.866 2.92-3.39 4.92-4.347 1.092-.524 2.264-.88 3.463-1.052.476-.068.954-.102 1.434-.12.29-.003.288-.003.576 0zM23.67 9.8L9.874 23.597c.736.59 1.556 1.074 2.432 1.43 1.17.474 2.432.718 3.695.718s2.524-.244 3.695-.72c2.51-1.017 4.536-3.09 5.49-5.625.363-.96.573-1.976.622-3 .05-1.023-.062-2.053-.33-3.04-.26-.966-.67-1.89-1.21-2.73-.183-.288-.383-.565-.596-.83zM22.13 8.256c-.58-.465-1.213-.865-1.885-1.186-.894-.427-1.852-.718-2.833-.86-.39-.056-.78-.083-1.175-.098-.235-.003-.234-.003-.47 0-.394.015-.785.042-1.175.1-.98.14-1.94.43-2.833.86-1.637.783-3.044 2.03-4.025 3.557-.54.84-.95 1.764-1.21 2.73-.246.912-.36 1.86-.338 2.803.023.946.182 1.888.472 2.788.26.802.62 1.57 1.076 2.276.184.287.384.564.597.83l13.798-13.8z"/></symbol><symbol id="svg-pencil-circle" data-name="pencil-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M7.925 18.165c3.857-4.193 8.057-8.058 12.086-12.087.123-.112.256-.198.417-.24.07-.02.088-.02.16-.03.08-.002.08-.002.162 0 .07.01.088.01.158.03.134.035.248.1.357.185 1.634 1.497 3.137 3.132 4.704 4.7.055.06.106.12.147.192.136.236.16.526.068.782-.037.104-.094.192-.16.28-3.865 4.216-8.087 8.09-12.132 12.135l-.022.02c-.07.066-.15.12-.237.16-.022.012-.044.022-.067.032-2.164.718-4.384 1.256-6.577 1.882-.137.033-.27.047-.41.024-.357-.06-.654-.332-.746-.684-.035-.136-.033-.27-.013-.408.53-2.22 1.252-4.39 1.878-6.582.006-.02.013-.037.02-.055.034-.095.084-.186.148-.267l.016-.02.017-.02c.008-.01.016-.02.025-.028zm.16 5.796l3.335-.952c-.81-.77-1.616-1.546-2.39-2.35l-.944 3.303zm5.185-1.852l7.013-7.013-3.33-3.33-7.032 7.03c1.14 1.082 2.28 2.164 3.35 3.313zm4.996-11.658l3.33 3.33L24 11.38l-3.332-3.332-2.402 2.402z"/></symbol><symbol id="svg-plus-circle" data-name="plus-circle" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill-opacity=".149"/><path d="M23.24 17.376h-5.792v5.792c0 .8-.65 1.448-1.448 1.448-.8 0-1.448-.648-1.448-1.448v-5.792H8.76c-.8 0-1.448-.65-1.448-1.448 0-.8.65-1.448 1.448-1.448h5.792V8.688c0-.8.65-1.448 1.448-1.448.8 0 1.448.65 1.448 1.448v5.792h5.792c.8 0 1.448.65 1.448 1.448 0 .8-.65 1.448-1.448 1.448" fill-rule="nonzero"/></symbol><symbol id="svg-progress-circle" data-name="progress-circle" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill-opacity=".149"/><g fill-rule="nonzero"><path d="M16 21.288c-.58 0-1.048.47-1.048 1.048v3.52c0 .58.47 1.05 1.048 1.05.578 0 1.048-.47 1.048-1.05v-3.52c0-.58-.47-1.048-1.048-1.048" fill-opacity=".502"/><path d="M25.955 14.9l-3.458-.008c-.597.013-1.05.467-1.05 1.046-.002.58.467 1.05 1.046 1.05l3.458.007h.003c.577 0 1.046-.468 1.048-1.046 0-.58-.467-1.05-1.045-1.05" fill-opacity=".251"/><path d="M16.025 2.832h-.003c-.577 0-1.045.468-1.047 1.046l-.01 5.46c-.002.58.466 1.05 1.044 1.05h.002c.578 0 1.046-.467 1.047-1.045l.01-5.46c.002-.58-.466-1.05-1.045-1.05"/><path d="M13.75 20.81c-.536-.223-1.148.03-1.37.565l-1.375 3.298c-.223.534.03 1.147.563 1.37.133.054.27.082.403.082.412 0 .8-.243.97-.647l1.373-3.297c.224-.533-.028-1.147-.562-1.37" fill-opacity=".6"/><path d="M19.604 21.393c-.22-.537-.833-.79-1.367-.572-.535.22-.79.833-.57 1.37l1.354 3.298c.168.406.56.65.97.65.133 0 .27-.024.398-.078.536-.22.79-.833.572-1.367l-1.356-3.3z" fill-opacity=".4"/><path d="M9.5 16.964h.002c.578 0 1.046-.468 1.048-1.046 0-.58-.467-1.05-1.046-1.05L6.05 14.86h-.003C5.47 14.86 5 15.33 5 15.908c-.003.578.465 1.05 1.045 1.05l3.455.007z" fill-opacity=".902"/><path d="M21.075 13.83c.166.405.557.65.97.65.132 0 .267-.026.398-.08l3.158-1.296c.535-.22.79-.833.57-1.366-.22-.535-.83-.793-1.367-.57l-3.158 1.294c-.536.22-.79.833-.57 1.367" fill-opacity=".2"/><path d="M10.992 17.99c-.22-.536-.83-.794-1.367-.57l-3.228 1.332c-.535.22-.79.833-.57 1.366.167.405.558.65.97.65.13 0 1.557-.558 1.688-.613l1.938-.798c.535-.22.79-.833.57-1.367" fill-opacity=".8"/><path d="M21.28 19.75c-.407-.408-1.07-.41-1.48-.002-.41.41-.412 1.072-.002 1.482l2.482 2.49c.205.204.475.308.743.308s.535-.103.74-.306c.41-.41.41-1.07.003-1.482l-2.485-2.49z" fill-opacity=".349"/><path d="M19.902 12.04c.205.205.474.308.743.308.268 0 .536-.102.74-.305l2.405-2.397c.41-.41.412-1.072.002-1.482-.408-.41-1.07-.41-1.48-.003l-2.405 2.398c-.412.41-.412 1.07-.005 1.482" fill-opacity=".149"/><path d="M18.13 10.813c.132.054.27.08.403.08.41 0 .8-.242.968-.645l1.292-3.107c.223-.532-.03-1.145-.564-1.368-.535-.222-1.15.032-1.37.565l-1.292 3.106c-.222.534.03 1.147.564 1.37" fill-opacity=".102"/><path d="M13.176 6.326c-.22-.535-.834-.793-1.368-.57-.534.222-.79.834-.57 1.37l1.287 3.115c.166.406.556.65.97.65.13 0 .267-.025.397-.08.536-.22.79-.833.57-1.367l-1.286-3.117zM10.626 12.015c.204.205.473.308.742.308.267 0 .535-.102.74-.305.41-.41.41-1.073.002-1.482l-2.393-2.4c-.41-.41-1.072-.41-1.48-.002-.412.41-.413 1.07-.005 1.482l2.394 2.4z"/><path d="M12.186 19.73c-.41-.412-1.072-.413-1.482-.004L8.208 22.21c-.41.41-.41 1.072-.002 1.482.204.206.472.308.743.308.265 0 .533-.1.737-.305l2.495-2.485c.41-.408.41-1.07.004-1.48" fill-opacity=".702"/><path d="M25.59 18.787l-3.214-1.338c-.534-.223-1.148.03-1.37.563-.222.535.03 1.148.565 1.37l3.214 1.34c.13.054.268.08.403.08.41 0 .8-.243.967-.644.223-.537-.03-1.15-.564-1.373" fill-opacity=".302"/><path d="M6.407 13.07l3.16 1.314c.13.054.267.08.4.08.41 0 .8-.243.968-.646.223-.533-.03-1.146-.564-1.37l-3.156-1.314c-.535-.222-1.15.03-1.37.564-.223.535.03 1.148.563 1.37"/></g></symbol><symbol id="svg-progress" data-name="progress" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill="none"/><g fill-rule="nonzero"><path d="M16 22.915c-.758 0-1.37.613-1.37 1.37v4.605c0 .756.612 1.37 1.37 1.37.756 0 1.37-.614 1.37-1.37v-4.605c0-.757-.614-1.37-1.37-1.37" fill-opacity=".502"/><path d="M29.018 14.56l-4.522-.008c-.78.016-1.373.61-1.373 1.367-.002.756.61 1.37 1.368 1.372l4.522.01h.003c.755 0 1.367-.612 1.37-1.37 0-.755-.61-1.37-1.367-1.37" fill-opacity=".251"/><path d="M16.033.242h-.002c-.754 0-1.367.61-1.37 1.367l-.015 5.68c0 .755.61 1.37 1.367 1.372h.003c.756 0 1.37-.61 1.37-1.368l.016-5.68c.003-.757-.61-1.37-1.367-1.372"/><path d="M13.06 22.29c-.703-.292-1.503.04-1.795.738L9.468 27.34c-.29.7.04 1.5.736 1.79.174.074.352.11.528.11.537 0 1.045-.318 1.266-.846l1.796-4.31c.292-.7-.037-1.503-.735-1.793" fill-opacity=".6"/><path d="M20.713 23.052c-.287-.702-1.09-1.035-1.788-.748-.7.287-1.035 1.09-.747 1.79l1.773 4.313c.22.53.73.85 1.27.85.172 0 .35-.032.52-.1.7-.29 1.033-1.09.747-1.79l-1.774-4.315z" fill-opacity=".4"/><path d="M7.5 17.26h.003c.755 0 1.368-.61 1.37-1.367 0-.758-.61-1.372-1.367-1.373l-4.518-.01h-.003c-.756 0-1.37.612-1.37 1.368-.003.757.61 1.372 1.367 1.373l4.52.01z" fill-opacity=".902"/><path d="M22.636 13.162c.218.53.73.85 1.267.85.174 0 .35-.034.522-.105l4.13-1.694c.698-.287 1.033-1.09.744-1.786-.29-.7-1.088-1.037-1.79-.745l-4.13 1.692c-.7.287-1.032 1.09-.744 1.788" fill-opacity=".2"/><path d="M9.45 18.602c-.287-.7-1.085-1.04-1.787-.745l-4.22 1.74c-.7.29-1.033 1.09-.745 1.788.217.53.728.85 1.267.85.172 0 2.036-.73 2.208-.8l2.534-1.045c.7-.288 1.033-1.09.744-1.788" fill-opacity=".8"/><path d="M22.906 20.904c-.533-.534-1.4-.537-1.937-.002-.537.534-.54 1.4-.004 1.937l3.246 3.255c.27.267.62.402.97.402.352 0 .7-.134.97-.4.536-.534.537-1.4.003-1.937l-3.25-3.256z" fill-opacity=".349"/><path d="M21.103 10.822c.267.268.62.402.97.402.352 0 .7-.133.97-.398l3.144-3.135c.536-.534.538-1.4.003-1.937-.535-.535-1.4-.537-1.938-.004L21.11 8.883c-.54.535-.54 1.4-.007 1.938" fill-opacity=".149"/><path d="M18.786 9.217c.173.07.35.106.526.106.536 0 1.047-.318 1.266-.844l1.69-4.064c.29-.697-.04-1.5-.74-1.79-.7-.29-1.5.04-1.792.738l-1.69 4.06c-.29.7.04 1.5.74 1.793" fill-opacity=".102"/><path d="M12.307 3.35c-.29-.7-1.09-1.037-1.79-.744-.698.288-1.032 1.09-.743 1.79l1.682 4.074c.216.528.727.848 1.267.848.173 0 .35-.033.52-.105.7-.287 1.034-1.09.746-1.787L12.306 3.35zM8.973 10.79c.267.267.618.4.97.4.35 0 .7-.132.967-.397.536-.535.54-1.403.003-1.938l-3.13-3.137c-.533-.537-1.4-.538-1.936-.004-.537.535-.54 1.4-.004 1.938l3.13 3.137z"/><path d="M11.012 20.876c-.536-.537-1.402-.538-1.937-.004l-3.265 3.25c-.535.533-.537 1.4-.002 1.936.267.27.618.403.97.403.35 0 .7-.13.967-.398l3.263-3.25c.536-.533.537-1.4.004-1.936" fill-opacity=".702"/><path d="M28.54 19.645l-4.203-1.75c-.697-.29-1.5.04-1.79.738-.29.698.04 1.5.738 1.792l4.202 1.75c.17.07.35.106.526.106.537 0 1.045-.317 1.264-.842.292-.7-.038-1.502-.737-1.793" fill-opacity=".302"/><path d="M3.456 12.167l4.13 1.72c.172.07.35.105.526.105.537 0 1.047-.318 1.264-.846.292-.697-.038-1.498-.737-1.79l-4.13-1.72c-.698-.29-1.5.04-1.79.74-.292.698.038 1.5.736 1.79"/></g></symbol><symbol id="svg-question-circle" data-name="question-circle" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill-opacity=".149"/><path d="M17.46 17.292v3.053c0 .807-.653 1.46-1.46 1.46-.807 0-1.46-.653-1.46-1.46v-4.33c0-.804.653-1.46 1.46-1.46 1.584 0 2.87-1.284 2.87-2.868 0-1.584-1.286-2.87-2.87-2.87s-2.87 1.286-2.87 2.87c0 .806-.654 1.46-1.46 1.46-.81 0-1.462-.654-1.462-1.46 0-3.194 2.598-5.792 5.792-5.792s5.792 2.598 5.792 5.792c0 2.69-1.84 4.956-4.33 5.605M16 25.398c-.798 0-1.444-.643-1.444-1.444 0-.795.646-1.438 1.444-1.438.798 0 1.444.643 1.444 1.438 0 .8-.646 1.444-1.444 1.444" fill-rule="nonzero"/></symbol><symbol id="svg-refresh-circle" data-name="refresh-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M25.628 10.107l-1.048 4.12c-.012.046-.044.086-.064.135-.172.46-.638.794-1.13.794-.033 0-.065-.01-.1-.012-.032-.003-.06-.008-.09-.013-.038-.006-.077-.004-.114-.013l-4.117-1.05c-.66-.168-1.06-.836-.893-1.497.17-.663.836-1.062 1.502-.89l1.462.37c-.506-.614-1.122-1.137-1.842-1.53-1.47-.81-3.17-.99-4.775-.526-1.613.47-2.945 1.538-3.75 3.01-.81 1.47-1 3.168-.526 4.777.967 3.327 4.46 5.247 7.785 4.276.655-.185 1.338.185 1.525.838.193.654-.182 1.336-.838 1.53-.813.235-1.632.35-2.44.35-3.79 0-7.29-2.486-8.402-6.302-.653-2.246-.392-4.608.732-6.656 1.125-2.046 2.98-3.533 5.224-4.19 2.242-.65 4.604-.393 6.65.73 1.015.56 1.893 1.298 2.598 2.173l.26-1.03c.17-.662.842-1.064 1.5-.89.658.166 1.058.837.89 1.497" fill-rule="nonzero"/></symbol><symbol id="svg-restore" data-name="restore" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill="none"/><path d="M24.34 7.216c-2.384-2.223-5.49-3.388-8.75-3.273-3.396.12-6.64 1.703-8.9 4.348-1.456 1.707-2.397 3.723-2.777 5.888l-1.456-2.193c-.356-.535-1.076-.68-1.612-.325-.535.354-.682 1.076-.325 1.61l3.478 5.24c.415.658 1.42.695 1.9.057l4.02-4.575c.423-.483.375-1.217-.107-1.642-.482-.422-1.216-.374-1.64.107l-1.982 2.256c.295-1.81 1.06-3.496 2.27-4.91 1.838-2.152 4.467-3.44 7.212-3.536 2.638-.096 5.154.85 7.085 2.65 1.93 1.8 3.044 4.244 3.136 6.883.094 2.638-.846 5.153-2.647 7.085-1.8 1.93-4.246 3.044-6.884 3.136-.643.023-1.145.56-1.123 1.203.023.628.538 1.122 1.163 1.122h.04c3.26-.114 6.28-1.49 8.503-3.874 2.225-2.385 3.387-5.494 3.272-8.75-.114-3.26-1.49-6.28-3.874-8.504" fill-rule="nonzero"/></symbol><symbol id="svg-search-circle" data-name="search-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M7.716 13.77c0-3.362 2.738-6.102 6.105-6.102 3.363 0 6.1 2.74 6.1 6.103 0 3.365-2.737 6.105-6.1 6.105-3.366 0-6.104-2.74-6.104-6.104m18.19 10.785l-5.88-5.882c1.073-1.353 1.74-3.042 1.74-4.902 0-4.38-3.564-7.948-7.945-7.948-4.383 0-7.95 3.567-7.95 7.95 0 4.382 3.567 7.95 7.95 7.95 1.857 0 3.548-.67 4.9-1.744l5.883 5.882c.18.18.415.27.652.27.236 0 .472-.09.65-.27.363-.358.363-.943 0-1.305" fill-rule="nonzero"/></symbol><symbol id="svg-star-circle" data-name="star-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M16.08 5.155c.28.025.535.142.71.367.053.067.09.137.126.213l2.607 6.106h6.06l.082.005c.17.022.325.07.466.17.376.263.512.773.317 1.188-.06.13-.15.233-.254.328l-5.213 4.342 2.63 7.014.025.08c.04.167.048.33.004.5-.118.445-.554.75-1.014.708-.172-.016-.323-.08-.467-.174l-6.136-4.38L9.89 26l-.072.046c-.15.08-.307.13-.48.132-.462.002-.87-.34-.947-.796-.028-.17-.004-.333.05-.496l2.628-7.014-5.213-4.34-.062-.057c-.096-.104-.175-.215-.224-.35-.16-.43.02-.926.418-1.156.15-.087.308-.122.478-.13h6.062l2.632-6.108.036-.074c.042-.072.086-.14.144-.2.155-.167.354-.258.576-.296.082-.007.082-.007.164-.007zm-2.045 8.02c-.035.072-.072.14-.12.205-.13.168-.316.29-.522.343-.08.02-.156.026-.236.03h-4.05l3.706 3.084.062.057c.058.063.11.125.154.2.097.17.14.37.123.567-.01.087-.03.166-.057.247l-1.768 4.717 4.14-2.955.072-.047c.076-.04.15-.076.233-.098.19-.052.397-.043.583.025.08.03.15.072.223.12l4.14 2.954-1.768-4.717-.026-.08c-.02-.083-.034-.164-.035-.25 0-.197.06-.393.175-.554.05-.07.107-.128.17-.186l3.705-3.084h-4.05l-.078-.004c-.08-.01-.157-.024-.234-.05-.26-.09-.45-.283-.566-.528l-1.98-4.637c-.665 1.547-1.33 3.093-1.997 4.64z" fill-rule="nonzero"/></symbol><symbol id="svg-status-failed" data-name="status-failed" viewBox="0 0 33 32" width="33" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M16.217 26.67c-.754 0-1.362-.61-1.362-1.36 0-.752.608-1.36 1.362-1.36.75 0 1.36.608 1.36 1.36 0 .75-.61 1.36-1.36 1.36M14.97 13.06c0-.688.558-1.247 1.247-1.247.688 0 1.247.56 1.247 1.247v8.163c0 .69-.56 1.248-1.247 1.248-.69 0-1.248-.557-1.248-1.248v-8.163zm17.423 17.32L17.65.89c-.026-.05-.06-.08-.086-.126-.192-.312-.477-.54-.816-.66 0 0 .003-.004.005-.004C16.58.04 16.403 0 16.217 0c-.567 0-1.063.294-1.348.76-.025.043-.058.076-.08.118L.133 30.194c-.195.386-.175.846.052 1.212.23.37.63.594 1.063.594H31.21c.69 0 1.247-.56 1.247-1.247 0-.13-.027-.252-.064-.372" fill-rule="nonzero"/></symbol><symbol id="svg-status-partial" data-name="status-partial" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M16 0C7.178 0 0 7.178 0 16s7.178 16 16 16 16-7.178 16-16S24.822 0 16 0zm.013 2.472v27.055l.102.01c1.764-.014 3.52-.375 5.147-1.064 1.555-.658 2.982-1.61 4.19-2.79 1.168-1.142 2.13-2.492 2.82-3.97.566-1.21.95-2.5 1.135-3.82.207-1.478.17-2.99-.11-4.454-.24-1.25-.66-2.463-1.24-3.594-1.32-2.57-3.46-4.69-6.05-5.977-1.19-.594-2.468-1.007-3.78-1.226-.565-.095-1.133-.147-1.703-.173-.17-.004-.34-.015-.51.002z"/><path d="M16.013 2.472v27.055l.102.01c1.764-.014 3.52-.375 5.147-1.064 1.555-.658 2.982-1.61 4.19-2.79 1.168-1.142 2.13-2.492 2.82-3.97.566-1.21.95-2.5 1.135-3.82.207-1.478.17-2.99-.11-4.454-.24-1.25-.66-2.463-1.24-3.594-1.32-2.57-3.46-4.69-6.05-5.977-1.19-.594-2.468-1.007-3.78-1.226-.565-.095-1.133-.147-1.703-.173-.17-.004-.34-.015-.51.002z" fill-opacity=".149"/></symbol><symbol id="svg-status-pending" data-name="status-pending" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M20 18.666h-6.666V8c0-.736.596-1.332 1.332-1.332C15.404 6.668 16 7.264 16 8v8h4c.738 0 1.334.596 1.334 1.334 0 .74-.596 1.332-1.334 1.332M16 0C7.178 0 0 7.178 0 16s7.178 16 16 16 16-7.178 16-16S24.822 0 16 0" fill-rule="nonzero"/></symbol><symbol id="svg-sync-circle" data-name="sync-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M25.754 19.267c-1.384 3.912-5.102 6.538-9.254 6.538-2.776 0-5.45-1.168-7.36-3.014v.833c0 .68-.547 1.227-1.227 1.227-.677 0-1.227-.547-1.227-1.227v-4.77c0-.678.55-1.228 1.227-1.228h4.77c.68 0 1.228.55 1.228 1.227 0 .678-.547 1.227-1.226 1.227h-2.668c1.41 1.958 3.88 3.27 6.484 3.27 3.114 0 5.905-1.97 6.943-4.903.223-.638.922-.974 1.565-.748.638.225.972.93.746 1.567M6.294 12.78c1.383-3.91 5.1-6.537 9.254-6.537 2.775 0 5.453 1.17 7.36 3.018v-.835c0-.675.547-1.227 1.227-1.227.677 0 1.227.552 1.227 1.227v4.77c0 .68-.55 1.227-1.227 1.227h-4.77c-.678 0-1.228-.547-1.228-1.227 0-.677.55-1.227 1.227-1.227h2.667c-1.407-1.956-3.88-3.27-6.482-3.27-3.115 0-5.905 1.97-6.94 4.902-.18.503-.653.818-1.157.818-.136 0-.273-.02-.408-.07-.64-.227-.975-.927-.75-1.567" fill-rule="nonzero"/></symbol><symbol id="svg-thumbs-up-circle" data-name="thumbs-up-circle" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill-opacity=".149"/><path d="M23.07 18.6c.78 0 1.413.634 1.413 1.415 0 .78-.632 1.414-1.413 1.414h-.943c.78 0 1.414.632 1.414 1.413 0 .78-.632 1.414-1.413 1.414H16c-3.77 0-2.828-1.886-10.37-1.886V13.89h2.83c3.298 0 7.07-3.037 7.07-7.54 0-1.49 2.827-1.68 2.827 1.148 0 1.885-.943 5.45-.943 5.45h7.54c.782 0 1.415.633 1.415 1.413s-.634 1.413-1.415 1.413h-.943c.782 0 1.414.634 1.414 1.414 0 .782-.632 1.414-1.414 1.414h-.942" fill-rule="nonzero"/></symbol><symbol id="svg-warning-circle" data-name="warning-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M16.898 17.985c0 .493-.4.892-.892.892s-.89-.4-.89-.892V13.12c0-.49.398-.89.89-.89s.892.4.892.89v4.865zm-.892 3.242c-.446 0-.81-.364-.81-.81 0-.45.364-.81.81-.81.448 0 .81.36.81.81 0 .446-.362.81-.81.81m9.614 1.837L16.803 5.43c-.303-.605-1.29-.605-1.594 0L6.293 23.26c-.14.276-.125.604.04.866.16.264.448.425.757.425h17.867c.492 0 .892-.4.892-.89 0-.23-.087-.44-.23-.596" fill-rule="nonzero"/></symbol><symbol id="svg-x-circle" data-name="x-circle" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill-opacity=".149"/><path d="M23.484 21.68c.478.477.478 1.254 0 1.732-.24.24-.554.36-.868.36-.31 0-.625-.12-.865-.36L16 17.662l-5.75 5.75c-.24.24-.555.36-.866.36-.314 0-.628-.12-.868-.36-.478-.478-.478-1.255 0-1.733l5.752-5.752-5.752-5.75c-.478-.477-.478-1.253 0-1.73.478-.48 1.255-.48 1.735 0L16 14.195l5.75-5.75c.48-.48 1.256-.48 1.734 0s.478 1.255 0 1.733l-5.752 5.748 5.752 5.75z" fill-rule="nonzero"/></symbol><symbol id="svg-buttons" data-name="buttons" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#c3cddb" d="M326.9 41c1.6 0 3 1.4 3 3v29.8c0 1.6-1.4 3-3 3H140.8c-1.6 0-3-1.4-3-3V44c0-1.6 1.4-3 3-3h186.1m0-5H140.8c-4.4 0-8 3.6-8 8v29.8c0 4.4 3.6 8 8 8h186.1c4.4 0 8-3.6 8-8V44c0-4.4-3.6-8-8-8z"/><path fill="#8c9ba5" d="M198.7 54.1h70.2v9.6h-70.2z"/><path fill="#dd2f41" d="M327.4 94.1H140.6c-4.2 0-7.7 3.5-7.7 7.7v30.4c0 4.2 3.5 7.7 7.7 7.7h186.7c4.2 0 7.7-3.5 7.7-7.7v-30.4c.1-4.2-3.4-7.7-7.6-7.7zm-58.6 27.7h-70.2v-9.6h70.2v9.6z"/><path fill="#297adf" d="M327.1 152.2H140.9c-4.4 0-7.9 3.6-7.9 7.9V190c0 4.4 3.6 7.9 7.9 7.9h186.2c4.4 0 7.9-3.6 7.9-7.9v-29.9c.1-4.3-3.5-7.9-7.9-7.9zm-58.3 27.6h-70.2v-9.6h70.2v9.6z"/></symbol><symbol id="svg-cards" data-name="cards" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#d6dde7" d="M405.9 36H258.5c-4.5 0-8.1 3.6-8.1 8.1v145.8c0 4.5 3.6 8.1 8.1 8.1h147.4c4.5 0 8.1-3.6 8.1-8.1V44.1c0-4.5-3.6-8.1-8.1-8.1zm-150.4 8.1c0-1.6 1.4-3 3-3h147.4c1.6 0 3 1.4 3 3V156H255.5V44.1zM209.6 40.7c1.6 0 3 1.4 3 3v146.1c0 1.6-1.4 3-3 3H61.9c-1.6 0-3-1.4-3-3v-146c0-1.6 1.4-3 3-3h147.7m0-5.1H61.9c-4.5 0-8.1 3.7-8.1 8.1v146.1c0 4.5 3.7 8.1 8.1 8.1h147.7c4.5 0 8.1-3.7 8.1-8.1V43.8c.1-4.5-3.6-8.1-8.1-8.1z"/><path fill="#fff" d="M401.5 187.1h-53.6c-1.9 0-3.5-1.6-3.5-3.5v-12.7c0-1.9 1.6-3.5 3.5-3.5h53.6c1.9 0 3.5 1.6 3.5 3.5v12.7c0 1.9-1.6 3.5-3.5 3.5z"/></symbol><symbol id="svg-color-wheel" data-name="color-wheel" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#2ac84f" d="M306.8 81.8c-7.9-16.1-20.9-29.1-37-37-.8.8-1.4 1.8-1.9 2.8l-11.3 26.2-11.2 26.2c-2.1 4.8 1.4 8.2 6.2 6.2l26.2-11.3L304 83.6c1-.4 2-1.1 2.8-1.8z"/><path fill="#59a702" d="M310.6 91.1c-1.1 0-2.2.3-3.3.7l-26.5 10.6-26.5 10.6c-4.9 1.9-4.9 6.8 0 8.7l26.5 10.6 26.5 10.6c1.1.4 2.2.6 3.3.7 2.8-8.2 4.3-17 4.3-26.2s-1.5-18.1-4.3-26.3z"/><path fill="#efc102" d="M306.8 152.7c-.8-.8-1.8-1.4-2.8-1.9l-26.2-11.3-26.2-11.3c-4.8-2.1-8.2 1.4-6.2 6.2l11.3 26.2 11.3 26.2c.5 1.1 1.1 2 1.9 2.8 15.9-7.8 29-20.8 36.9-36.9z"/><path fill="#f69524" d="M234.3 197.9c9.2 0 18-1.5 26.2-4.3 0-1.1-.3-2.2-.7-3.3l-10.6-26.5-10.6-26.5c-1.9-4.9-6.8-4.9-8.7 0l-10.6 26.5-10.6 26.5c-.4 1.1-.6 2.2-.7 3.3 8.3 2.8 17.1 4.3 26.3 4.3z"/><path fill="#f96623" d="M217.1 128.3l-26.2 11.3-26.2 11.3c-1.1.5-2 1.1-2.8 1.9 7.9 16.1 20.9 29.1 37 37 .8-.8 1.4-1.8 1.9-2.8l11.3-26.2 11.3-26.2c1.9-4.9-1.5-8.3-6.3-6.3z"/><path fill="#a81d27" d="M214.3 112.9l-26.5-10.6-26.5-10.6c-1.1-.4-2.2-.6-3.3-.7-2.8 8.2-4.3 17-4.3 26.2s1.5 18 4.3 26.2c1.1 0 2.2-.3 3.3-.7l26.5-10.6 26.5-10.6c4.8-1.8 4.8-6.7 0-8.6z"/><path fill="#a346ce" d="M161.8 81.8c.8.8 1.8 1.4 2.8 1.9L190.8 95l26.2 11.3c4.8 2.1 8.2-1.4 6.2-6.2L212 73.8l-11.3-26.2c-.5-1.1-1.1-2-1.9-2.8-16 7.8-29.1 20.9-37 37z"/><path fill="#297adf" d="M234.3 36.6c-9.2 0-18 1.5-26.2 4.3 0 1.1.3 2.2.7 3.3l10.6 26.5L230 97.2c1.9 4.9 6.8 4.9 8.7 0l10.6-26.5 10.6-26.5c.4-1.1.6-2.2.7-3.3-8.3-2.8-17.1-4.3-26.3-4.3z"/></symbol><symbol id="svg-dialog" data-name="dialog" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#d6dde7" d="M349.1 197.3H118.9c-1.8 0-3.3-1.5-3.3-3.3V39.4c0-1.8 1.5-3.3 3.3-3.3h230.2c1.8 0 3.3 1.5 3.3 3.3V194c0 1.8-1.5 3.3-3.3 3.3z"/><path fill="#fff" d="M177.8 170.8c-3 0-5.5-2.5-5.5-5.5V63.7c0-3 2.5-5.5 5.5-5.5h112.4c3 0 5.5 2.5 5.5 5.5v101.6c0 3-2.5 5.5-5.5 5.5H177.8z"/><path fill="#d6dde7" d="M290.2 60.7c1.6 0 3 1.4 3 3v101.6c0 1.6-1.4 3-3 3H177.8c-1.6 0-3-1.4-3-3V63.7c0-1.6 1.4-3 3-3h112.4m0-5H177.8c-4.4 0-8 3.6-8 8v101.6c0 4.4 3.6 8 8 8h112.4c4.4 0 8-3.6 8-8V63.7c0-4.4-3.6-8-8-8z"/><path fill="#297adf" d="M260.4 158.2h-52.9c-1.9 0-3.5-1.6-3.5-3.5v-12.5c0-1.9 1.6-3.5 3.5-3.5h52.9c1.9 0 3.5 1.6 3.5 3.5v12.5c0 1.9-1.5 3.5-3.5 3.5z"/></symbol><symbol id="svg-feedback" data-name="feedback" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><g fill="#f96623"><path fill-opacity=".48" d="M315.294 144.15l-4.098 10.1L250.69 129.7l4.097-10.1z"/><path d="M217.264 104.368l-4.1 10.1-60.506-24.553 4.1-10.1z"/><path fill-opacity=".24" d="M206.906 198.23l-10.1-4.098 24.553-60.507 10.1 4.098z"/><path fill-opacity=".72" d="M246.706 100.272l-10.1-4.098 24.553-60.507 10.098 4.098z"/><path fill-opacity=".36" d="M272.328 193.588l-10.04 4.245-25.428-60.148 10.04-4.244z"/><path fill-opacity=".84" d="M231.086 96.223l-10.04 4.244-25.428-60.148 10.04-4.245z"/><path fill-opacity=".12" d="M157.39 155.246l-4.246-10.04 60.148-25.428 4.244 10.04z"/><path fill-opacity=".6" d="M254.762 114.076l-4.245-10.04 60.148-25.428 4.244 10.04z"/></g></symbol><symbol id="svg-icons" data-name="icons" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#f0f3f6" d="M334.8 119s-50.5 62.4-112.8 62.4S109.3 119 109.3 119s50.5-62.4 112.8-62.4S334.8 119 334.8 119z"/><path fill="#d6dde7" d="M222.1 183.9c-18.1 0-47-5.5-81.3-31.7-20.4-15.6-32.9-31-33.5-31.6L106 119l1.3-1.6c.5-.6 13-16 33.5-31.6 34.3-26.2 63.1-31.7 81.3-31.7 18.1 0 47 5.5 81.3 31.7 20.4 15.6 32.9 31 33.5 31.6l1.3 1.6-1.3 1.6c-.5.6-13 16-33.5 31.6-34.4 26.2-63.2 31.7-81.3 31.7zM112.6 119c8.3 9.6 54.6 59.9 109.5 59.9s101.2-50.3 109.5-59.9c-8.3-9.6-54.6-59.9-109.5-59.9S120.9 109.4 112.6 119z"/><path fill="#59a702" d="M222.1 69.4c-27 0-49 21.9-49 49s21.9 49 49 49c27 0 49-21.9 49-49s-22-49-49-49zm11.5 40.9c-6.4 0-11.5-5.2-11.5-11.5s5.2-11.5 11.5-11.5c6.4 0 11.5 5.2 11.5 11.5s-5.2 11.5-11.5 11.5z"/><path fill="#549103" d="M233.6 110.3c-6.4 0-11.5-5.2-11.5-11.5 0-.6.1-1.3.2-1.9h-.2c-11.9 0-21.5 9.6-21.5 21.5s9.6 21.5 21.5 21.5 21.5-9.6 21.5-21.5c0-3.8-1-7.4-2.8-10.6-2 1.6-4.5 2.5-7.2 2.5z"/></symbol><symbol id="svg-inputs" data-name="inputs" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#297adf" d="M278.9 64.2h-89.8c-29.1 0-52.8 23.8-52.8 52.8 0 29.1 23.8 52.8 52.8 52.8h89.8c29.1 0 52.8-23.8 52.8-52.8 0-29.1-23.7-52.8-52.8-52.8zm-.8 95.8c-23.3 0-42.2-18.9-42.2-42.2 0-23.3 18.9-42.2 42.2-42.2 23.3 0 42.2 18.9 42.2 42.2 0 23.3-18.9 42.2-42.2 42.2z"/></symbol><symbol id="svg-messages" data-name="messages" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#d6dde7" class="st0" d="M349.1 197.3H118.9c-1.8 0-3.3-1.5-3.3-3.3V39.4c0-1.8 1.5-3.3 3.3-3.3h230.2c1.8 0 3.3 1.5 3.3 3.3V194c0 1.8-1.5 3.3-3.3 3.3z"/><path fill="#59a702" d="M327.1 80.3H140.6c-2.1 0-3.8-1.7-3.8-3.8V36h194.1v40.5c0 2.1-1.7 3.8-3.8 3.8z"/><path fill="#549103" d="M140.6 80.3h40.5V36h-44.3v40.5c0 2.1 1.7 3.8 3.8 3.8z"/><circle fill="#7bc117" cx="307.7" cy="58.1" r="11.8"/></symbol><symbol id="svg-panel" data-name="panel" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#d6dde7" d="M371.4 41c1.6 0 3 1.4 3 3v56c0 1.6-1.4 3-3 3H96.6c-1.6 0-3-1.4-3-3V44c0-1.6 1.4-3 3-3h274.8m0-5H96.6c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h274.8c4.4 0 8-3.6 8-8V44c0-4.4-3.6-8-8-8zM371.4 198H96.6c-4.4 0-8-3.6-8-8v-56c0-4.4 3.6-8 8-8h274.8c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8z"/></symbol><symbol id="svg-progress-bars" data-name="progress-bars" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#dfe3e6" d="M401.6 129.5H66.4c-6.9 0-12.5-5.6-12.5-12.5s5.6-12.5 12.5-12.5h335.3c6.9 0 12.5 5.6 12.5 12.5-.1 6.9-5.7 12.5-12.6 12.5z"/><path fill="#efc102" d="M333.4 129.5h-267c-6.9 0-12.5-5.6-12.5-12.5s5.6-12.5 12.5-12.5h267c6.9 0 12.5 5.6 12.5 12.5-.1 6.9-5.7 12.5-12.5 12.5z"/></symbol><symbol id="svg-section" data-name="section" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#f69524" d="M228.9 112.3h-76.1V55.9c0-10.9 8.8-19.7 19.7-19.7h56.4v76.1z"/><path fill="#d6dde7" d="M228.9 197.8h-56.6c-10.8 0-19.5-8.7-19.5-19.5v-56.6h76.1v76.1zM315.2 112.3h-76.1V36.2H296c10.6 0 19.2 8.6 19.2 19.2v56.9zM295.7 197.8h-56.6v-76.1h76.1v56.6c0 10.7-8.7 19.5-19.5 19.5z"/></symbol><symbol id="svg-sliders" data-name="sliders" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle fill="#297adf" cx="164.6" cy="117" r="6.6"/><path fill="#297adf" d="M145.7 117c0-1.7.3-3.4.7-5H80.2c-2-5-6.8-8.5-12.5-8.5-7.5 0-13.5 6-13.5 13.5s6 13.5 13.5 13.5c5.7 0 10.5-3.5 12.5-8.5h66.2c-.5-1.6-.7-3.3-.7-5z"/><path fill="#d6dde7" d="M400.3 103.5c-5.7 0-10.5 3.5-12.5 8.5H246.5c-2-5-6.8-8.5-12.5-8.5s-10.5 3.5-12.5 8.5h-38.6c-2.2-8-9.5-13.9-18.2-13.9-10.4 0-18.9 8.5-18.9 18.9 0 10.4 8.5 18.9 18.9 18.9 8.7 0 16-5.9 18.2-13.9h38.6c2 5 6.8 8.5 12.5 8.5s10.5-3.5 12.5-8.5h141.3c2 5 6.8 8.5 12.5 8.5 7.5 0 13.5-6 13.5-13.5s-6-13.5-13.5-13.5zm-235.7 27.4c-7.7 0-13.9-6.2-13.9-13.9s6.2-13.9 13.9-13.9 13.9 6.2 13.9 13.9-6.2 13.9-13.9 13.9zm18.9-12.3c0-.5.1-1.1.1-1.6s0-1.1-.1-1.6c0 .5.1 1.1.1 1.6s-.1 1.1-.1 1.6zm-.2 1.4c0-.2.1-.5.1-.7 0 .3-.1.5-.1.7zm0-6c0 .2.1.5.1.7 0-.3-.1-.5-.1-.7z"/></symbol><symbol id="svg-tables" data-name="tables" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#c3cddb" d="M366.6 197.9c4.4 0 8.1-3.6 8.1-8.1V44.2c0-4.4-3.6-8.1-8.1-8.1H101.4c-4.4 0-8.1 3.6-8.1 8.1V189.8c0 4.4 3.6 8.1 8.1 8.1h265.2zm3-153.7v43.6h-86.2V41.2h83.2c1.6 0 3 1.4 3 3zm-180 43.6V41.2h88.7v46.6h-88.7zm88.8 5.1V142h-88.7V92.9h88.7zm-180-48.7c0-1.6 1.4-3 3-3h83.2v46.6H98.4V44.2zm0 48.7h86.2V142H98.4V92.9zm3 99.9c-1.6 0-3-1.4-3-3V147h86.2v45.8h-83.2zm88.2 0V147h88.7v45.8h-88.7zm180-3c0 1.6-1.4 3-3 3h-83.2V147h86.2v42.8zm0-47.8h-86.2V92.9h86.2V142z"/><path fill="#a346ce" d="M369.6 44.2v43.6h-86.2V41.2h83.2c1.6 0 3 1.4 3 3zM189.6 41.2h88.7v46.6h-88.7zM98.4 44.2c0-1.6 1.4-3 3-3h83.2v46.6H98.4V44.2z"/></symbol><symbol id="svg-text" data-name="text" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#297adf" d="M228 172.7l-8.3-21.8h-52.1l-8.3 21.8h-22.6l44.6-113.5h24.9l44.6 113.5H228zm-34.3-93.4l-20.4 54.1h40.9l-20.5-54.1zM313.5 172.7v-8.9c-6.1 7-15.7 10.9-26.6 10.9-13.4 0-28.6-9-28.6-27.2 0-18.9 15.1-26.7 28.6-26.7 11.1 0 20.6 3.6 26.6 10.6v-12.3c0-9.5-7.8-15.3-19.2-15.3-9.2 0-17.2 3.4-24.3 10.4l-7.3-12.4c9.5-9 21.4-13.3 34.6-13.3 18.2 0 34.2 7.7 34.2 29.8v54.5h-18zm0-18.7v-12.4c-4.1-5.6-11.7-8.5-19.6-8.5-10 0-17.5 5.8-17.5 14.8 0 8.9 7.5 14.6 17.5 14.6 7.8 0 15.5-2.9 19.6-8.5z"/></symbol><symbol id="svg-time" data-name="time" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle fill="#c3cddb" cx="234" cy="117" r="80.8"/><path fill="#fff" d="M261.1 148.1c-1 0-2-.4-2.8-1.2l-27.1-27.1c-.8-.8-1.2-1.8-1.2-2.8V56.2c0-2.2 1.8-4 4-4s4 1.8 4 4v59.2l25.9 25.9c1.6 1.6 1.6 4.1 0 5.7-.8.7-1.8 1.1-2.8 1.1z"/></symbol><symbol id="svg-validation" data-name="validation" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#dd2f41" d="M332 69.7H136c-4.4 0-8 3.6-8 8v83.2c0 1.9 1.5 3.4 3.4 3.4h205.2c1.9 0 3.4-1.5 3.4-3.4V77.7c0-4.4-3.6-8-8-8zm-141.7 75.5h-52.1v-9.3h52.1v9.3zM335 111.8H133V77.7c0-1.6 1.4-3 3-3h196c1.6 0 3 1.4 3 3v34.1z"/></symbol><symbol id="svg-status-completed" data-name="status-completed" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M24.965 12.802l-10.267 11.25-7.626-7.62c-.48-.486-.48-1.262 0-1.742.482-.484 1.26-.484 1.74 0l5.805 5.802 8.53-9.35c.46-.503 1.24-.538 1.74-.08s.538 1.238.078 1.74M16 0C7.178 0 0 7.178 0 16s7.178 16 16 16 16-7.178 16-16S24.822 0 16 0" fill-rule="nonzero"/></symbol></svg>')
|
79
|
+
document.querySelector('body').insertAdjacentHTML('afterbegin', '<svg id="esvg-svg-icons" data-symbol-class="svg-symbol" data-prefix="svg" version="1.1" style="height:0;position:absolute" data-turbolinks-permanent><symbol id="svg-angle-down" data-name="angle-down" viewBox="0 0 27 15" width="27" height="15" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M25.304.005c.092.012.116.012.206.036.135.037.263.097.377.177.348.244.545.665.508 1.088-.01.104-.032.207-.068.305-.048.132-.12.254-.21.36-.02.028-.046.053-.07.08l-12 12c-.025.022-.05.047-.077.07-.08.067-.17.123-.264.168-.32.148-.695.148-1.014 0-.095-.045-.184-.1-.264-.17-.027-.02-.052-.046-.077-.07l-12-12C.29 1.98.27 1.966.217 1.89c-.08-.114-.14-.242-.176-.377C-.08 1.066.074.578.428.28.535.19.658.12.788.073.92.025 1.06 0 1.2 0c.246 0 .49.076.69.217.076.053.09.072.16.134l11.15 11.153L24.352.35l.078-.07c.073-.056.09-.073.17-.12.122-.07.255-.118.393-.142.093-.016.116-.014.21-.018l.104.005z" fill-rule="nonzero"/></symbol><symbol id="svg-arrow-down-circle" data-name="arrow-down-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M22.218 18.943l-5.243 5.243c-.226.282-.558.48-.95.48-.006 0-.01-.006-.018-.006-.008 0-.013.005-.02.005-.315 0-.63-.12-.87-.36l-5.36-5.362c-.483-.48-.483-1.26 0-1.738.478-.48 1.255-.48 1.737 0l3.3 3.3V9.323c0-.678.55-1.23 1.23-1.23.68 0 1.23.552 1.23 1.23V20.43l3.226-3.225c.48-.48 1.26-.48 1.738 0 .48.48.48 1.258 0 1.738" fill-rule="nonzero"/></symbol><symbol id="svg-arrow-up-circle" data-name="arrow-up-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M22.294 14.798c-.24.24-.556.36-.87.36-.315 0-.627-.12-.868-.36l-3.303-3.305V22.68c0 .677-.548 1.23-1.23 1.23-.678 0-1.228-.553-1.228-1.23V11.57l-3.227 3.228c-.482.48-1.26.48-1.738 0-.482-.48-.482-1.258 0-1.737l5.243-5.247c.226-.282.56-.48.95-.48.008 0 .013.006.02.006.008 0 .013-.006.02-.006.327 0 .64.13.868.36l5.364 5.367c.48.48.48 1.26 0 1.738" fill-rule="nonzero"/></symbol><symbol id="svg-backup" data-name="backup" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M16.04 23.89c-.905.073-1.812.11-2.706.11C8.047 24 2.484 22.656 0 20.483v2.85c0 3.364 5.856 6 13.334 6 1.358 0 2.66-.088 3.888-.25C16.452 27.787 16 26.28 16 24.667c0-.263.015-.522.04-.778zm-2.707-1.223c1.004 0 1.988-.047 2.943-.13.556-2.19 1.943-4.045 3.807-5.213-2.15.436-4.49.676-6.75.676C8.047 18 2.483 16.656 0 14.483V18c0 2.113 5.947 4.667 13.333 4.667zm0-6c6.106 0 11.5-1.683 13.334-3.44V8.893C23.82 10.807 18.377 12 13.333 12 8.047 12 2.483 10.656 0 8.483V12c0 2.113 5.947 4.667 13.333 4.667zm0-6c6.106 0 11.5-1.683 13.334-3.438V6c0-3.364-5.858-6-13.334-6S0 2.636 0 6c0 2.113 5.948 4.667 13.333 4.667z" fill-opacity=".502"/><path d="M28 25.333h-2.667V28c0 .368-.3.667-.666.667-.368 0-.667-.3-.667-.667v-2.667h-2.667c-.368 0-.666-.298-.666-.666 0-.368.298-.667.666-.667H24v-2.667c0-.368.3-.666.667-.666.366 0 .666.298.666.666V24H28c.367 0 .667.3.667.667 0 .368-.3.666-.667.666m-3.333-8c-4.044 0-7.334 3.29-7.334 7.334S20.623 32 24.667 32C28.71 32 32 28.71 32 24.667c0-4.044-3.29-7.334-7.333-7.334" fill-rule="nonzero"/></symbol><symbol id="svg-check-circle" data-name="check-circle" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill-opacity=".149"/><path d="M24.925 12.745l-10.22 11.2-7.59-7.588c-.48-.483-.48-1.255 0-1.732.477-.483 1.252-.483 1.732 0l5.776 5.775 8.49-9.307c.457-.502 1.233-.536 1.733-.08.5.455.534 1.232.08 1.732" fill-rule="nonzero"/></symbol><symbol id="svg-cluster" data-name="cluster" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M16 32c-.056 0-.113-.002-.17-.005-.112-.007-.224-.02-.335-.04-.332-.06-.653-.18-.942-.354-.13-.078-.256-.167-.373-.266-.055-.047-.108-.096-.16-.147C9.604 26.8 5.2 22.397.813 17.98c-.076-.077-.148-.158-.214-.243-.127-.16-.236-.335-.324-.52-.09-.184-.157-.38-.203-.58C.023 16.43 0 16.215 0 16c0-.214.024-.43.073-.638.046-.2.114-.395.203-.58.088-.184.197-.358.323-.52.065-.084.137-.165.213-.242C5.2 9.604 9.603 5.2 14.02.813c.077-.076.158-.148.243-.214.16-.127.335-.236.52-.324.184-.09.38-.157.58-.203C15.57.023 15.785 0 16 0c.214 0 .43.024.638.073.2.046.395.114.58.203.184.088.358.197.52.323.084.065.165.137.242.213C22.396 5.2 26.8 9.603 31.187 14.02c.076.077.148.158.214.243.127.16.236.335.324.52.09.184.157.38.203.58.05.208.073.423.073.637 0 .214-.024.43-.073.638-.046.2-.114.395-.203.58-.088.184-.197.358-.323.52-.065.084-.137.165-.213.242-4.388 4.416-8.79 8.82-13.207 13.207-.052.05-.105.1-.16.147-.117.1-.242.188-.373.267-.275.166-.578.282-.892.345-.11.022-.223.038-.335.046-.05.005-.102.008-.152.01H16zm0-1.883c.055 0 .11-.005.164-.014.107-.02.21-.057.305-.112.068-.04.13-.087.187-.143 4.412-4.384 8.84-8.755 13.195-13.195.026-.027.052-.056.075-.087.042-.054.077-.113.106-.176.05-.112.08-.234.083-.356.005-.145-.023-.29-.083-.423-.03-.062-.064-.12-.106-.175-.023-.03-.05-.06-.075-.087-4.358-4.442-8.758-8.842-13.2-13.2-.027-.026-.056-.052-.087-.075-.054-.042-.113-.077-.176-.106-.112-.05-.234-.08-.356-.083-.145-.005-.29.023-.423.083-.06.028-.117.062-.17.102-.033.024-.063.05-.092.078-4.442 4.358-8.842 8.758-13.2 13.2l-.08.09c-.04.055-.073.112-.1.173-.06.133-.09.28-.084.424.004.122.032.244.083.355.03.062.064.12.106.175.023.03.05.06.075.087 4.358 4.442 8.758 8.842 13.2 13.2.055.053.116.1.183.14.088.05.184.087.284.106.056.012.112.018.17.02H16z" fill-opacity=".502" fill-rule="nonzero"/><path d="M17.482 26.93l-.847.846c-.17.17-.397.263-.635.263s-.466-.095-.635-.264l-11.14-11.14c-.17-.17-.264-.398-.264-.636s.095-.466.264-.635l11.14-11.14c.17-.17.398-.264.636-.264s.466.095.635.264l4.05 4.05v5.456c-.104.03-.205.064-.303.106-.27.116-.517.283-.725.49-.2.195-.362.426-.48.68-.102.22-.17.454-.2.695-.033.248-.025.5.022.745.04.213.11.42.21.614.122.244.288.466.487.654.193.18.416.33.658.438.2.09.412.15.628.18.11.015.22.022.328.023h.062c.11-.004.218-.014.326-.032.215-.036.425-.102.622-.195.243-.115.466-.273.656-.463s.348-.414.464-.657c.095-.2.162-.416.197-.636.038-.24.04-.488.002-.73-.038-.24-.112-.472-.22-.69-.123-.248-.292-.475-.494-.666-.214-.2-.465-.362-.738-.472-.08-.032-.164-.06-.25-.084V9.528l5.838 5.837c.17.17.263.397.263.635s-.095.466-.264.635l-6.64 6.64-4.508-4.51v-6.51c.13-.036.258-.083.38-.14.243-.116.466-.274.657-.464.187-.186.342-.405.457-.643.097-.2.164-.415.2-.634.042-.246.043-.5.005-.745-.036-.24-.11-.472-.218-.69-.125-.248-.293-.475-.496-.666-.214-.2-.465-.362-.737-.472-.144-.058-.294-.1-.447-.13-.15-.027-.306-.04-.46-.04-.15.003-.298.02-.444.05-.156.03-.31.08-.456.142-.27.116-.516.283-.725.49-.198.195-.36.426-.48.68-.102.218-.17.454-.2.695-.032.247-.024.5.023.744.04.214.11.422.21.615.12.24.283.46.478.645.195.186.422.338.668.448.106.047.216.087.328.118v6.768c.002.05 0 .06.01.11.016.09.05.176.104.25.028.04.037.048.07.084l4.693 4.694-1.88 1.88-6.962-6.962v-.81c.13-.036.258-.084.38-.142.244-.115.467-.273.657-.463s.348-.414.464-.657c.094-.2.16-.416.196-.636.038-.24.04-.488.002-.73-.037-.24-.11-.472-.218-.69-.124-.248-.293-.475-.495-.666-.214-.2-.465-.362-.738-.472-.144-.057-.293-.1-.446-.13-.15-.027-.305-.04-.46-.038-.154.002-.307.018-.458.05-.15.032-.3.08-.44.14-.27.116-.518.283-.726.49-.198.195-.362.426-.48.68-.102.22-.17.454-.2.695-.033.248-.025.5.022.745.043.223.118.44.223.64.125.238.29.455.487.638.19.178.41.323.647.43.107.046.217.086.33.117v1.07c0 .04 0 .05.005.09.012.088.044.173.092.25.017.024.035.048.054.07l.03.033 7.146 7.146zm-6.7-9.83c.055 0 .11-.005.166-.014.096-.014.19-.042.278-.08.103-.047.2-.11.283-.184.09-.08.168-.176.228-.28.05-.093.09-.19.114-.293.03-.13.035-.26.02-.39-.015-.11-.046-.217-.092-.318-.055-.12-.133-.23-.227-.324-.098-.096-.213-.174-.34-.228-.13-.057-.274-.087-.418-.09-.145 0-.29.025-.423.08-.125.05-.24.123-.34.215-.097.09-.178.2-.237.317-.05.1-.083.205-.1.313-.02.13-.018.262.007.39.02.1.055.2.102.29.053.102.123.196.204.277.087.085.187.156.297.21.09.042.183.073.28.09.055.01.11.015.167.017h.03zm10.53 0c.056 0 .112-.005.167-.014.095-.014.19-.042.277-.08.107-.05.206-.114.293-.192.087-.08.16-.172.22-.273.05-.09.087-.185.11-.285.032-.13.04-.264.022-.396-.014-.11-.045-.217-.09-.318-.056-.12-.134-.23-.228-.324-.098-.096-.213-.174-.34-.228-.13-.057-.274-.087-.418-.09-.145 0-.29.025-.423.08-.126.05-.24.123-.34.215-.097.09-.178.2-.237.317-.05.1-.083.205-.1.313-.02.13-.018.262.007.39.02.106.058.208.108.302.058.105.13.2.218.283.082.077.176.142.278.19.09.044.183.075.28.092.055.01.11.015.167.017h.028zM16 11.084c.056 0 .112-.004.168-.013.096-.014.19-.042.278-.08.103-.047.198-.11.283-.184.09-.08.167-.176.227-.282.05-.09.09-.185.112-.285.03-.128.037-.263.02-.395-.014-.11-.044-.217-.09-.317-.056-.12-.133-.23-.228-.324-.097-.096-.213-.174-.34-.23-.13-.055-.274-.085-.418-.087-.144-.002-.29.024-.423.078-.124.05-.24.124-.338.216-.097.092-.178.2-.237.318-.05.1-.083.204-.1.313-.02.13-.02.263.007.39.02.106.057.208.108.303.057.107.133.205.222.287.08.076.173.14.272.187.09.044.188.075.288.092.053.008.106.013.16.015H16z"/></symbol><symbol id="svg-copy" data-name="copy" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><g fill-rule="nonzero"><path d="M22.667 4.667c0-.368-.3-.667-.667-.667h-3.333v10.495c1.208-.64 2.562-1.032 4-1.127v-8.7zM4 25.333V4H.667C.3 4 0 4.3 0 4.667V26c0 1.837 1.496 3.333 3.333 3.333h12.02c-.878-1.165-1.517-2.52-1.818-4H4z" fill-opacity=".302"/><path d="M14 12H7.333c-.368 0-.666.3-.666.667 0 .368.298.666.666.666H14c.368 0 .667-.298.667-.666 0-.368-.3-.667-.667-.667M14 14.667H7.333c-.368 0-.666.298-.666.666 0 .368.298.667.666.667H14c.368 0 .667-.3.667-.667 0-.368-.3-.666-.667-.666M14.667 18c0-.368-.3-.667-.667-.667H7.333c-.368 0-.666.3-.666.667 0 .368.298.667.666.667H14c.368 0 .667-.3.667-.667M7.333 20c-.368 0-.666.3-.666.667 0 .368.298.666.666.666h4c.368 0 .667-.298.667-.666 0-.368-.3-.667-.667-.667h-4z" fill-opacity=".502"/><path d="M6 9.333h10.667c.368 0 .666-.298.666-.666V3.333c0-.368-.298-.666-.666-.666h-2.06C14.33 1.115 13.087 0 11.333 0 9.687 0 8.363 1 8.06 2.667H6c-.368 0-.667.298-.667.666v5.334c0 .368.3.666.667.666" fill-opacity=".302"/><path d="M26.97 24H24v2.97c0 .367-.3.666-.667.666-.368 0-.666-.3-.666-.667V24h-2.97c-.368 0-.666-.3-.666-.667 0-.368.3-.666.667-.666h2.97v-2.97c0-.37.298-.666.666-.666.368 0 .667.298.667.667v2.97h2.97c.367 0 .666.298.666.666 0 .368-.3.667-.667.667m-3.637-9.333c-4.78 0-8.666 3.888-8.666 8.666 0 4.78 3.886 8.667 8.666 8.667S32 28.112 32 23.333c0-4.778-3.888-8.666-8.667-8.666"/></g></symbol><symbol id="svg-deployment" data-name="deployment" viewBox="0 0 176 201" width="176" height="201" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M88 5.985l82.272 47.5v95L88 195.985l-82.272-47.5v-95L88 5.985z"/></symbol><symbol id="svg-dice" data-name="dice" viewBox="0 0 45 32" width="45" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M30.762 10.232c1.183.684 1.59 2.2.906 3.382l-9.9 17.148c-.683 1.183-2.2 1.59-3.382.906l-17.148-9.9c-1.183-.684-1.59-2.2-.906-3.382l9.9-17.148c.684-1.183 2.2-1.59 3.382-.906l17.148 9.9z" fill-opacity=".149"/><path d="M22.13 5.25c.02-.002.04-.002.06-.002h19.803c1.366 0 2.475 1.11 2.475 2.475v19.802c0 1.366-1.11 2.475-2.475 2.475H22.208l2.44-4.23c.273.11.57.17.88.17 1.29 0 2.34-1.047 2.34-2.338 0-.75-.354-1.416-.902-1.844l4.702-8.144c.683-1.183.277-2.698-.906-3.382L22.13 5.25zm16.35 16.013c1.29 0 2.34 1.048 2.34 2.34 0 1.29-1.05 2.338-2.34 2.338-1.29 0-2.34-1.047-2.34-2.338 0-1.29 1.05-2.34 2.34-2.34zm0-11.956c1.29 0 2.34 1.048 2.34 2.34 0 1.29-1.05 2.338-2.34 2.338-1.29 0-2.34-1.048-2.34-2.34 0-1.29 1.05-2.338 2.34-2.338zM19.712 22.345c1.118.645 1.502 2.077.857 3.196-.647 1.12-2.08 1.502-3.197.857-1.118-.646-1.502-2.078-.856-3.196.645-1.117 2.077-1.5 3.195-.855zM17.093 13.93c1.118.645 1.502 2.077.856 3.195-.647 1.118-2.078 1.502-3.197.857-1.118-.646-1.5-2.078-.856-3.196.646-1.118 2.078-1.502 3.196-.856zM14.473 5.514c1.118.646 1.502 2.078.856 3.196-.646 1.118-2.078 1.502-3.196.856-1.118-.645-1.502-2.077-.856-3.195.645-1.118 2.077-1.5 3.195-.856z"/></symbol><symbol id="svg-download" data-name="download" viewBox="0 0 33 32" width="33" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="none" d="M0 0h32.978v32H0z"/><path d="M15.5 28.627V16.92c.005-.1.015-.195.045-.29.08-.262.27-.48.515-.6.113-.054.23-.08.355-.095.074-.003.074-.003.148 0 .124.014.24.04.355.095.245.12.435.338.515.6.03.095.04.19.044.29v11.707l2.54-2.54.043-.04c.12-.1.25-.176.4-.216.13-.034.267-.042.4-.023.326.048.613.262.752.56.04.087.068.18.082.275.014.094.014.19 0 .286-.02.133-.066.26-.137.376-.03.05-.065.093-.102.138-1.38 1.462-2.842 2.844-4.264 4.266l-.03.03c-.052.048-.11.09-.17.126-.027.016-.055.03-.084.044-.108.05-.225.08-.344.09-.097.007-.196 0-.293-.022-.097-.022-.19-.06-.275-.108-.075-.043-.145-.097-.206-.158-1.45-1.37-2.82-2.818-4.227-4.227-.107-.112-.19-.24-.24-.387-.11-.332-.032-.707.2-.968.064-.07.138-.134.22-.184.15-.092.315-.136.49-.147.057 0 .057 0 .114.004.058.007.114.016.17.03.17.046.316.136.443.256l2.54 2.54zm10.424-4.984h-4.52c-.036-.002-.072-.002-.107-.006-.142-.015-.28-.062-.403-.136-.09-.054-.174-.124-.243-.206-.258-.305-.307-.748-.12-1.102.05-.094.116-.18.194-.254.13-.123.293-.21.467-.248.094-.02.12-.018.214-.023h4.444c.43-.075.854-.197 1.264-.348 1.132-.42 2.194-1.103 2.908-2.09.165-.23.31-.47.433-.724.287-.59.45-1.234.516-1.886.037-.383.045-.77.015-1.155-.033-.436-.117-.868-.25-1.285-.37-1.173-1.124-2.212-2.122-2.932-.48-.348-1.017-.62-1.583-.802-.42-.135-.857-.22-1.297-.257-.232-.02-.463-.022-.696-.016l-.103-.002c-.09-.012-.115-.01-.204-.037-.2-.058-.378-.18-.505-.345-.056-.073-.064-.095-.108-.176-.054-.113-.11-.224-.168-.335-.347-.65-.77-1.255-1.27-1.796-.6-.647-1.297-1.2-2.064-1.634-.824-.465-1.727-.79-2.66-.952-.792-.14-1.604-.164-2.403-.076-.8.088-1.588.292-2.33.604-.875.368-1.685.885-2.388 1.52-.775.702-1.418 1.546-1.887 2.48-.343.683-.593 1.414-.74 2.165-.07.373-.116.748-.14 1.127l-.013.104c-.008.035-.014.07-.024.104-.018.067-.045.133-.078.195-.133.248-.373.43-.65.495-.067.016-.137.024-.207.025-.035 0-.07-.003-.106-.004-.137-.02-.272-.048-.408-.068-.496-.063-.996-.043-1.483.073-1.008.242-1.902.874-2.468 1.74-.173.264-.315.55-.42.846-.11.308-.182.628-.215.953-.04.392-.025.794.03 1.184.075.536.243 1.06.54 1.517.09.14.19.27.3.393.632.704 1.546 1.09 2.458 1.275.34.07.692.116 1.04.12h5.17l.107.005c.094.015.118.015.21.046.168.056.32.16.436.295.07.082.125.175.165.274.04.1.063.204.07.31.018.363-.168.715-.478.9-.123.075-.26.122-.403.137-.035.004-.07.004-.107.006-1.744 0-3.49.014-5.233 0-.42-.012-.836-.057-1.247-.134-1.186-.223-2.346-.7-3.253-1.512-.167-.15-.324-.31-.47-.48-.177-.203-.337-.42-.48-.65-.397-.64-.645-1.363-.764-2.106-.047-.296-.074-.594-.084-.894-.01-.296-.003-.592.027-.887.047-.455.145-.905.292-1.338.338-.99.94-1.883 1.723-2.575.656-.578 1.436-1.01 2.274-1.26.61-.184 1.25-.265 1.888-.25l.06-.344c.067-.326.144-.648.238-.967.198-.665.462-1.31.788-1.923.66-1.243 1.576-2.348 2.672-3.23.883-.713 1.882-1.278 2.947-1.668.702-.256 1.43-.436 2.172-.536.337-.047.676-.074 1.017-.088.16-.005.323-.008.485-.007.918.012 1.83.137 2.715.385 1.845.518 3.527 1.556 4.828 2.963.575.622 1.068 1.313 1.48 2.053l.004.006c.092.005.185.01.277.018.102.008.202.018.302.03.23.03.46.065.687.114.57.12 1.128.308 1.657.556 1.148.54 2.155 1.364 2.912 2.38.57.768.998 1.64 1.252 2.562.277 1.007.338 2.06.218 3.097-.097.834-.322 1.654-.69 2.41-.173.356-.377.696-.608 1.016-.154.212-.32.415-.495.61-.903.992-2.076 1.712-3.33 2.176-.553.205-1.128.367-1.712.458-.047.006-.046.006-.093.01l-.068.003z"/></symbol><symbol id="svg-gear-circle" data-name="gear-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><g fill-rule="nonzero"><path d="M24.253 6.97c.168.045.32.117.445.24.054.052.064.068.11.128 1.096 1.71 2.035 3.514 3.05 5.272.04.077.074.15.095.236.07.277.004.578-.175.8-.073.09-.16.16-.257.22l-1.64.95c.022.154.034.308.048.464.013.193.023.385.026.58.003.423-.023.842-.07 1.263v.013l1.64.95.072.044c.07.053.13.107.186.174.16.2.23.464.192.718-.013.086-.04.164-.073.244-.932 1.803-2.025 3.52-3.04 5.277-.046.073-.094.14-.156.2-.206.2-.5.294-.783.25-.114-.018-.216-.06-.318-.113l-1.635-.95c-.13.098-.262.188-.396.28-.19.123-.19.122-.384.242-.39.23-.787.435-1.2.623l-.013.006v1.91l-.004.084c-.013.086-.028.167-.06.248-.092.24-.285.432-.525.525-.08.03-.162.046-.247.058-2.03.094-4.062.004-6.094.004-.086-.005-.168-.012-.25-.036-.277-.078-.504-.286-.607-.552-.042-.11-.057-.218-.063-.333V25.08c-.142-.06-.282-.128-.422-.195-.203-.102-.203-.1-.404-.207-.404-.222-.79-.464-1.168-.73l-.027-.02-1.66.952-.074.038c-.08.033-.16.06-.245.073-.253.04-.517-.032-.716-.193-.07-.054-.122-.117-.175-.185C6.14 22.905 5.2 21.1 4.185 19.34c-.052-.1-.094-.203-.11-.318-.045-.282.048-.576.247-.78.06-.064.128-.11.2-.157l1.642-.948c-.02-.156-.033-.31-.046-.467-.014-.23-.014-.23-.023-.46-.006-.464.018-.922.07-1.382v-.014l-1.64-.947-.07-.046c-.07-.052-.13-.106-.186-.173-.162-.2-.232-.465-.193-.718.014-.087.04-.165.074-.245.935-1.803 2.03-3.518 3.047-5.276.062-.098.13-.184.22-.257.222-.18.523-.245.8-.176.084.02.16.056.235.096l1.652.95c.07-.052.143-.102.214-.152.19-.128.19-.128.385-.252.454-.278.92-.523 1.407-.743l.014-.006V4.96l.004-.085c.012-.085.027-.166.06-.247.09-.24.285-.433.524-.526.08-.03.162-.046.248-.058 2.028-.094 4.062-.004 6.093-.004.115.006.224.02.332.062.267.104.474.33.553.607.023.084.03.166.035.252V6.87c.142.06.28.13.42.196.202.102.2.102.4.208.4.224.782.466 1.154.733l.02.014 1.628-.946.076-.04c.138-.055.266-.08.414-.084.085.007.085.006.17.02zm-2.23 14.94c.118.025.22.06.325.115l1.38.8 2.08-3.607-1.39-.802c-.064-.04-.082-.05-.14-.1-.153-.132-.26-.313-.3-.51-.018-.087-.02-.17-.017-.258.028-.216.07-.43.098-.645.04-.37.067-.74.055-1.11-.015-.44-.068-.87-.143-1.304l-.01-.086c-.003-.088-.002-.17.016-.257.04-.198.147-.38.3-.51.058-.052.076-.06.14-.1l1.388-.803-2.08-3.605-1.375.798c-.07.035-.085.046-.158.072-.19.067-.402.07-.594.006-.084-.028-.157-.07-.232-.115-.123-.092-.24-.194-.362-.29-.348-.262-.71-.502-1.093-.71-.382-.21-.78-.386-1.187-.542l-.078-.034c-.066-.037-.084-.044-.145-.09-.16-.12-.277-.29-.332-.483-.024-.082-.03-.165-.035-.25V5.88h-4.168V7.49c-.004.086-.012.168-.036.252-.056.192-.174.363-.333.483-.06.045-.08.052-.145.09-.2.086-.402.16-.602.245-.745.337-1.446.748-2.072 1.276l-.07.052c-.074.047-.147.088-.23.116-.192.065-.404.064-.595-.003-.073-.024-.09-.035-.157-.07L8.33 9.125l-2.086 3.608 1.387.802c.066.04.083.05.142.1.153.132.26.314.3.512.018.087.02.17.016.258-.02.154-.05.307-.073.46-.058.43-.09.862-.08 1.297.01.437.065.868.14 1.297l.01.086c.004.077.007.096 0 .172-.023.202-.113.393-.253.54-.06.062-.13.11-.203.158l-1.39.802 2.084 3.61 1.403-.805c.078-.04.154-.075.24-.096.196-.048.407-.03.59.053.072.032.087.044.152.085.12.092.236.192.356.286.3.226.61.433.938.618.44.25.9.455 1.37.636l.08.034c.065.037.083.044.143.09.16.12.278.29.332.482.023.084.03.166.035.253v1.606h4.168v-1.607c.004-.087.01-.17.035-.253.055-.19.172-.363.332-.483.06-.045.078-.052.144-.09.197-.085.4-.16.598-.245.455-.207.895-.44 1.31-.716.26-.173.506-.362.745-.56l.07-.054c.064-.04.08-.052.15-.083.108-.05.218-.068.335-.078.086 0 .086 0 .172.01z"/><path d="M16.148 11.052c.698.026 1.378.18 2.01.484.533.257 1.02.613 1.43 1.042.41.43.74.934.97 1.48.19.45.313.93.363 1.415.052.498.027 1.005-.074 1.495-.314 1.533-1.372 2.853-2.797 3.497-.598.27-1.247.418-1.902.434-.658.016-1.32-.1-1.932-.34-.553-.22-1.066-.54-1.506-.938-.44-.4-.805-.876-1.075-1.403-.22-.432-.377-.896-.462-1.373-.08-.452-.1-.916-.052-1.374.06-.565.215-1.12.462-1.632.43-.89 1.13-1.643 1.987-2.137.637-.366 1.342-.573 2.073-.638.17-.01.336-.016.505-.013zm-.206 1.84c-.437.016-.863.112-1.257.302-.81.39-1.428 1.138-1.652 2.01-.09.354-.118.725-.08 1.088.032.33.12.652.255.954.153.34.37.65.632.91.263.264.573.48.912.632.374.17.78.26 1.19.27.413.012.826-.06 1.21-.21.347-.138.668-.338.944-.59.275-.248.504-.548.673-.878.137-.27.234-.56.288-.857.06-.336.063-.68.012-1.018-.14-.92-.71-1.743-1.514-2.207-.4-.23-.84-.358-1.297-.4-.107-.005-.212-.008-.318-.007z"/></g></symbol><symbol id="svg-gear" data-name="gear" viewBox="0 0 32 33" width="32" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M23.018 1.842c.258.022.51.08.746.185.198.088.386.2.553.338.132.106.25.227.355.36.336.432.486.97.495 1.51.007.384-.054.762-.14 1.135l-.584 2.148.02.02.02.02 2.14-.583.198-.046c.2-.04.402-.074.606-.088.42-.03.85.01 1.246.157.27.1.522.25.736.442.397.36.668.867.74 1.4.037.26.025.524-.03.78-.095.444-.313.85-.583 1.212-.125.166-.262.322-.403.474l-1.572 1.56.008.03.01.035c.716.19 1.426.4 2.148.567.09.026.09.026.18.055.195.065.385.137.57.227.36.176.698.41.962.716.174.2.315.428.41.676.208.54.203 1.165-.016 1.702-.09.224-.22.432-.377.615-.286.334-.66.58-1.055.76-.22.102-.45.18-.68.252l-2.142.566-.01.036-.008.03 1.567 1.554c.07.073.07.073.138.147.136.153.265.31.38.48.235.35.415.74.487 1.157.05.285.045.577-.016.86-.112.524-.418 1.012-.84 1.342-.193.15-.41.265-.64.345-.412.144-.858.17-1.29.128-.243-.023-.48-.068-.716-.123l-2.147-.583-.02.02-.02.02.583 2.142c.025.1.024.1.047.198.04.2.072.4.087.605.027.4-.007.81-.14 1.19-.092.27-.233.524-.42.742-.36.424-.888.713-1.44.79-.26.035-.525.023-.78-.032-.655-.14-1.208-.54-1.69-.988l-1.555-1.57-.03.01-.038.01-.563 2.132c-.03.098-.028.097-.06.194-.053.16-.11.32-.18.474-.19.415-.452.802-.804 1.094-.205.17-.44.305-.69.395-.506.18-1.083.173-1.586-.015-.246-.093-.475-.23-.674-.4-.36-.31-.616-.718-.8-1.15-.083-.19-.15-.387-.21-.585l-.566-2.14-.036-.01-.03-.01-1.555 1.568c-.073.07-.073.07-.147.138-.127.113-.257.22-.395.32-.354.253-.754.452-1.185.536-.28.054-.57.058-.852.006-.528-.097-1.024-.39-1.366-.804-.168-.204-.298-.438-.385-.687-.156-.446-.175-.927-.12-1.394.025-.206.066-.41.112-.612l.585-2.148-.02-.02-.02-.02-2.14.582-.198.046c-.166.034-.333.063-.502.08-.434.043-.88.015-1.296-.128-.27-.093-.524-.234-.742-.42-.423-.362-.713-.89-.79-1.442-.033-.24-.025-.484.02-.722.126-.677.537-1.25.997-1.745l1.57-1.56-.01-.03-.008-.036-2.134-.563-.194-.058c-.193-.065-.384-.138-.568-.227-.38-.185-.73-.434-1-.76-.17-.205-.306-.438-.395-.69-.186-.525-.173-1.127.038-1.644.1-.242.242-.466.417-.66.446-.496 1.07-.774 1.696-.968l2.142-.565.01-.035.008-.03-1.566-1.555-.14-.148c-.413-.467-.76-1.015-.865-1.64-.045-.262-.045-.532.003-.794.098-.527.392-1.024.807-1.365.203-.167.435-.296.683-.383.414-.145.86-.172 1.293-.13.242.022.48.068.716.122l2.147.585.02-.022.02-.02-.584-2.14c-.025-.1-.025-.1-.047-.2-.04-.2-.074-.4-.088-.604-.03-.42.01-.85.157-1.246.092-.25.228-.484.4-.687.35-.406.852-.69 1.38-.777.26-.044.527-.04.786.01.43.08.83.28 1.184.532.198.14.38.3.56.464l1.558 1.57.03-.008.036-.01.563-2.136.06-.193c.053-.16.11-.32.182-.474.18-.398.426-.77.757-1.057.232-.2.502-.358.794-.452.492-.158 1.044-.146 1.528.036.246.092.474.23.674.4.358.31.615.717.8 1.148.082.19.148.387.21.585l.565 2.142.035.01.032.008 1.553-1.566.148-.14c.453-.4.98-.738 1.58-.854.16-.03.32-.043.48-.043.062 0 .06 0 .123.005zm-6.932 7.48c.34.006.678.033 1.013.09.595.098 1.177.278 1.724.533 1.24.58 2.288 1.543 2.97 2.73.354.615.61 1.286.75 1.98.153.75.177 1.522.07 2.278-.094.68-.295 1.345-.593 1.964-.336.7-.797 1.34-1.353 1.883-.595.582-1.3 1.05-2.066 1.375-.794.336-1.65.513-2.513.525-.865.01-1.73-.146-2.536-.463-.774-.306-1.49-.76-2.1-1.327-.588-.548-1.076-1.2-1.434-1.92-.306-.614-.515-1.276-.618-1.954-.115-.755-.1-1.53.042-2.28.134-.696.38-1.37.726-1.99.654-1.172 1.664-2.133 2.865-2.73.59-.293 1.223-.498 1.872-.605.278-.045.56-.072.84-.084.115-.004.23-.005.344-.005z" fill-opacity=".149"/><path d="M23.018 1.842c.258.022.51.08.746.185.198.088.386.2.553.338.132.106.25.227.355.36.336.432.486.97.495 1.51.007.384-.054.762-.14 1.135l-.584 2.148.02.02.02.02 2.14-.583.198-.046c.2-.04.402-.074.606-.088.42-.03.85.01 1.246.157.27.1.522.25.736.442.397.36.668.867.74 1.4.037.26.025.524-.03.78-.095.444-.313.85-.583 1.212-.125.166-.262.322-.403.474l-1.572 1.56.008.03.01.035c.716.19 1.426.4 2.148.567.09.026.09.026.18.055.195.065.385.137.57.227.36.176.698.41.962.716.174.2.315.428.41.676.208.54.203 1.165-.016 1.702-.09.224-.22.432-.377.615-.286.334-.66.58-1.055.76-.22.102-.45.18-.68.252l-2.142.566-.01.036-.008.03 1.567 1.554c.07.073.07.073.138.147.136.153.265.31.38.48.235.35.415.74.487 1.157.05.285.045.577-.016.86-.112.524-.418 1.012-.84 1.342-.193.15-.41.265-.64.345-.412.144-.858.17-1.29.128-.243-.023-.48-.068-.716-.123l-2.147-.583-.02.02-.02.02.583 2.142c.025.1.024.1.047.198.04.2.072.4.087.605.027.4-.007.81-.14 1.19-.092.27-.233.524-.42.742-.36.424-.888.713-1.44.79-.26.035-.525.023-.78-.032-.655-.14-1.208-.54-1.69-.988l-1.555-1.57-.03.01-.038.01-.563 2.132c-.03.098-.028.097-.06.194-.053.16-.11.32-.18.474-.19.415-.452.802-.804 1.094-.205.17-.44.305-.69.395-.506.18-1.083.173-1.586-.015-.246-.093-.475-.23-.674-.4-.36-.31-.616-.718-.8-1.15-.083-.19-.15-.387-.21-.585l-.566-2.14-.036-.01-.03-.01-1.555 1.568c-.073.07-.073.07-.147.138-.127.113-.257.22-.395.32-.354.253-.754.452-1.185.536-.28.054-.57.058-.852.006-.528-.097-1.024-.39-1.366-.804-.168-.204-.298-.438-.385-.687-.156-.446-.175-.927-.12-1.394.025-.206.066-.41.112-.612l.585-2.148-.02-.02-.02-.02-2.14.582-.198.046c-.166.034-.333.063-.502.08-.434.043-.88.015-1.296-.128-.27-.093-.524-.234-.742-.42-.423-.362-.713-.89-.79-1.442-.033-.24-.025-.484.02-.722.126-.677.537-1.25.997-1.745l1.57-1.56-.01-.03-.008-.036-2.134-.563-.194-.058c-.193-.065-.384-.138-.568-.227-.38-.185-.73-.434-1-.76-.17-.205-.306-.438-.395-.69-.186-.525-.173-1.127.038-1.644.1-.242.242-.466.417-.66.446-.496 1.07-.774 1.696-.968l2.142-.565.01-.035.008-.03-1.566-1.555-.14-.148c-.413-.467-.76-1.015-.865-1.64-.045-.262-.045-.532.003-.794.098-.527.392-1.024.807-1.365.203-.167.435-.296.683-.383.414-.145.86-.172 1.293-.13.242.022.48.068.716.122l2.147.585.02-.022.02-.02-.584-2.14c-.025-.1-.025-.1-.047-.2-.04-.2-.074-.4-.088-.604-.03-.42.01-.85.157-1.246.092-.25.228-.484.4-.687.35-.406.852-.69 1.38-.777.26-.044.527-.04.786.01.43.08.83.28 1.184.532.198.14.38.3.56.464l1.558 1.57.03-.008.036-.01.563-2.136.06-.193c.053-.16.11-.32.182-.474.18-.398.426-.77.757-1.057.232-.2.502-.358.794-.452.492-.158 1.044-.146 1.528.036.246.092.474.23.674.4.358.31.615.717.8 1.148.082.19.148.387.21.585l.565 2.142.035.01.032.008 1.553-1.566.148-.14c.453-.4.98-.738 1.58-.854.16-.03.32-.043.48-.043.062 0 .06 0 .123.005zM12.783 25.575l.1.026c.126.04.252.08.38.117.21.06.423.11.638.158l.1.027c.086.034.11.04.188.087.147.09.27.22.348.372.043.082.046.105.075.192l.7 2.647c.024.084.05.167.082.248.022.057.045.114.07.17.017.036.03.062.05.098.015.03.03.057.047.087.065.11.153.235.277.286.068.027.147.032.22.024.05-.006.1-.022.144-.048.056-.033.104-.08.146-.13.06-.072.112-.154.156-.238.08-.156.14-.322.188-.49l.7-2.654c.03-.087.032-.11.075-.192.095-.184.25-.334.44-.42.143-.068.303-.09.456-.126.128-.03.127-.03.254-.064.17-.047.336-.097.502-.15l.1-.027c.092-.014.114-.02.207-.02.173.004.344.056.49.15.077.05.092.067.16.13l1.93 1.944c.062.058.127.116.194.17.048.04.096.078.146.113.03.022.06.04.09.06.03.02.057.036.087.053.11.062.25.127.382.108.074-.01.145-.045.204-.09.042-.03.077-.068.102-.113.032-.056.05-.12.06-.184.018-.094.02-.19.017-.285-.008-.174-.04-.347-.08-.516l-.726-2.662c-.02-.09-.03-.112-.033-.204-.01-.208.05-.416.17-.586.092-.128.218-.226.332-.332l.274-.27.27-.29.074-.07c.072-.057.088-.075.168-.12.15-.08.324-.12.495-.113.093.004.115.013.204.032l2.653.72c.085.02.17.037.256.05.06.01.12.02.182.025.036.003.073.006.11.007.032.002.066.003.1.002.126-.002.28-.015.384-.096.058-.046.102-.113.132-.18.02-.048.032-.098.03-.15 0-.064-.017-.128-.04-.19-.03-.09-.077-.173-.128-.253-.094-.148-.21-.28-.33-.408l-1.95-1.935c-.062-.068-.08-.083-.13-.16-.112-.175-.163-.386-.145-.592.008-.092.017-.114.04-.203.04-.126.08-.253.117-.38.058-.21.11-.423.158-.637l.028-.1c.034-.084.04-.108.087-.186.09-.148.22-.27.372-.35.082-.04.105-.044.192-.073l2.648-.698c.083-.025.166-.052.247-.083l.168-.07.1-.05c.03-.015.056-.03.086-.048.11-.065.235-.153.285-.276.027-.07.032-.15.023-.222-.005-.05-.02-.1-.047-.145-.033-.057-.08-.104-.128-.146-.073-.062-.155-.112-.24-.156-.155-.08-.32-.14-.49-.188l-2.653-.7c-.088-.028-.11-.032-.193-.074-.184-.096-.334-.252-.42-.44-.067-.143-.09-.303-.126-.455-.03-.125-.064-.25-.1-.377-.037-.127-.075-.254-.116-.38l-.026-.1c-.013-.09-.02-.114-.018-.206.003-.173.055-.343.148-.49.05-.076.068-.09.13-.16L27.78 10c.058-.065.116-.13.17-.196.04-.048.077-.096.113-.146.02-.03.042-.06.06-.09.018-.027.038-.06.053-.087.062-.11.127-.25.11-.38-.01-.072-.044-.138-.084-.196-.03-.045-.072-.084-.12-.11-.057-.032-.12-.05-.184-.062-.094-.017-.19-.02-.286-.015-.176.007-.348.04-.518.08l-2.66.726c-.088.02-.11.028-.202.032-.207.01-.415-.05-.585-.17-.075-.052-.09-.07-.154-.136l-.27-.29c-.153-.153-.31-.304-.47-.45l-.072-.074c-.056-.072-.073-.088-.118-.168-.083-.152-.123-.325-.115-.497.004-.09.013-.113.032-.203l.722-2.654c.02-.085.037-.17.05-.255.01-.06.018-.12.024-.18.004-.038.006-.07.008-.11v-.1c0-.127-.014-.28-.096-.385-.044-.056-.107-.097-.17-.127-.05-.024-.105-.038-.16-.037-.065 0-.13.016-.19.037-.09.033-.173.078-.254.13-.148.094-.28.21-.408.33l-1.933 1.948c-.068.062-.082.08-.16.13-.174.11-.384.163-.59.145-.092-.008-.114-.018-.202-.04-.126-.04-.252-.08-.38-.116-.21-.058-.423-.11-.638-.157l-.1-.027c-.085-.034-.11-.04-.188-.087-.148-.09-.27-.22-.35-.373-.042-.082-.045-.105-.074-.193L16.692 2.8c-.025-.084-.052-.166-.083-.248l-.07-.168c-.024-.05-.048-.097-.074-.144-.016-.03-.03-.054-.048-.08-.065-.1-.148-.21-.263-.252-.066-.025-.142-.03-.21-.02-.052.004-.1.02-.146.046-.056.033-.103.08-.144.128-.062.073-.113.155-.157.24-.082.156-.14.32-.19.49l-.7 2.655c-.028.088-.03.11-.074.193-.095.185-.252.335-.44.422-.144.066-.304.088-.457.123-.127.032-.253.064-.378.1-.128.036-.255.075-.38.115l-.1.025c-.092.013-.114.02-.206.018-.172-.003-.342-.055-.487-.148-.078-.05-.093-.068-.16-.13L10 4.222c-.064-.06-.128-.117-.196-.172-.047-.038-.095-.076-.145-.11-.03-.022-.062-.043-.093-.063-.028-.018-.056-.035-.085-.05-.112-.063-.25-.128-.382-.11-.07.01-.138.044-.196.084-.047.033-.084.073-.112.122-.032.056-.05.12-.06.182-.017.094-.02.19-.015.285.007.174.04.346.08.515l.727 2.66c.02.09.027.112.032.204.01.206-.05.413-.17.582-.052.076-.07.09-.135.155l-.287.27c-.155.154-.305.31-.45.47l-.075.073c-.072.057-.088.075-.17.12-.15.082-.324.123-.496.115-.092-.004-.115-.013-.204-.032L4.914 8.8c-.084-.02-.17-.037-.255-.05-.06-.01-.12-.02-.182-.025l-.11-.008h-.1c-.13 0-.287.015-.394.103-.052.042-.09.102-.12.163-.023.05-.036.104-.035.16 0 .064.016.128.038.19.032.088.078.173.13.254.094.148.208.28.33.407l1.947 1.934c.062.068.08.083.13.16.112.175.163.384.145.59-.008.092-.018.114-.04.203-.04.127-.08.254-.117.382-.058.21-.11.423-.157.638L6.1 14c-.035.085-.04.108-.088.187-.09.147-.22.27-.373.35-.083.04-.106.045-.194.073l-2.647.698c-.084.025-.166.052-.247.083l-.17.07c-.034.017-.065.032-.098.05-.03.016-.057.03-.087.048-.11.066-.236.154-.286.277-.028.07-.034.15-.025.223.005.05.02.1.047.144.033.056.08.103.13.145.072.06.154.112.24.156.154.08.32.138.488.187l2.655.7c.087.03.11.033.192.076.183.095.333.25.42.44.067.143.09.303.124.455.032.127.065.253.1.378.037.128.075.255.115.38l.025.1c.013.092.02.115.018.206-.003.173-.055.343-.148.488-.05.077-.068.092-.13.16l-1.943 1.93c-.06.064-.117.128-.172.195-.04.048-.076.096-.11.146-.023.03-.043.06-.063.09-.018.03-.035.058-.05.087-.063.112-.128.25-.11.382.01.07.044.138.083.196.032.045.072.084.12.11.057.032.12.05.183.06.094.018.19.02.285.016.176-.008.35-.04.52-.083l2.66-.72c.09-.02.112-.03.204-.033.206-.01.413.05.583.17.075.052.09.07.154.135.088.097.178.192.27.287.153.155.31.305.47.453l.072.073c.057.072.074.088.118.17.083.15.123.323.115.495-.004.093-.013.115-.032.204L8.8 27.087c-.02.084-.037.17-.05.254-.01.06-.02.122-.024.183-.004.037-.007.074-.008.11-.002.035-.002.066-.002.1.003.128.016.28.098.386.046.058.112.102.18.132.047.02.098.032.15.03.064 0 .128-.016.188-.038.09-.033.175-.078.255-.13.148-.094.28-.208.407-.33l1.935-1.95c.067-.06.082-.08.16-.13.115-.073.248-.122.384-.14.092-.01.115-.007.207-.004l.103.015zM16.086 9.32c.34.008.678.035 1.013.09.595.1 1.177.28 1.724.535 1.24.58 2.288 1.543 2.97 2.73.354.615.61 1.286.75 1.98.153.75.177 1.522.07 2.278-.094.68-.295 1.345-.593 1.964-.336.7-.797 1.34-1.353 1.883-.595.582-1.3 1.05-2.066 1.375-.794.336-1.65.513-2.513.525-.865.01-1.73-.146-2.536-.463-.774-.306-1.49-.76-2.1-1.327-.588-.548-1.076-1.2-1.434-1.92-.306-.614-.515-1.276-.618-1.954-.115-.755-.1-1.53.042-2.28.134-.696.38-1.37.726-1.99.654-1.172 1.664-2.133 2.865-2.73.59-.293 1.223-.498 1.872-.605.278-.045.56-.072.84-.084.115-.004.23-.005.344-.005zm-.148 1.884c-.68.012-1.348.16-1.964.447-.54.253-1.034.608-1.446 1.04-.386.405-.7.877-.925 1.39-.198.453-.325.937-.375 1.43-.055.545-.018 1.1.112 1.633.092.38.23.747.414 1.092.515.975 1.364 1.756 2.38 2.186.57.243 1.186.37 1.804.377.622.008 1.243-.103 1.82-.332.558-.22 1.072-.544 1.51-.952.423-.394.774-.863 1.032-1.38.21-.423.356-.876.433-1.34.087-.524.087-1.06 0-1.584-.074-.447-.212-.882-.408-1.29-.47-.974-1.27-1.775-2.245-2.244-.612-.295-1.278-.45-1.955-.47-.062-.002-.125-.003-.187-.002z" fill-rule="nonzero"/></symbol><symbol id="svg-heart-circle" data-name="heart-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M11.228 6.83c.45.027.894.1 1.326.234 1.488.46 2.712 1.564 3.47 2.912.08-.146.172-.287.263-.427.49-.72 1.086-1.355 1.816-1.83.545-.357 1.15-.617 1.785-.762.565-.13 1.15-.166 1.727-.112.482.046.958.155 1.413.32.416.152.815.353 1.186.594.934.607 1.685 1.475 2.174 2.473.358.732.576 1.527.66 2.336.04.374.056.753.034 1.13-.044.792-.254 1.57-.55 2.304-.44 1.098-1.07 2.116-1.77 3.068-1.223 1.67-2.673 3.174-4.192 4.577-1.256 1.16-2.568 2.265-3.944 3.282l-.07.048c-.258.144-.545.194-.83.106-.085-.025-.16-.063-.236-.106-.177-.12-.346-.253-.517-.383-1.207-.932-2.376-1.913-3.497-2.948C10.3 22.56 9.173 21.415 8.15 20.18c-.7-.848-1.355-1.74-1.905-2.693-.41-.71-.762-1.46-.998-2.244-.15-.503-.252-1.02-.282-1.546-.018-.323-.01-.648.018-.97.08-.96.346-1.906.81-2.753.443-.812 1.065-1.524 1.817-2.064.397-.285.83-.52 1.285-.7.578-.226 1.183-.35 1.802-.385.178-.006.354-.006.53 0zm9.778 2.024c-.31.012-.615.058-.912.15-.224.07-.44.162-.646.275-1.17.64-1.877 1.87-2.267 3.106-.065.206-.12.414-.172.624l-.026.086c-.067.17-.16.32-.3.44-.4.342-1.016.315-1.385-.06-.107-.11-.178-.238-.234-.38-.055-.186-.1-.375-.153-.562-.377-1.234-1.023-2.467-2.154-3.163-.153-.093-.312-.177-.477-.247-.367-.155-.76-.245-1.155-.265-.336-.018-.674.015-1 .093-.28.068-.55.167-.805.295-.833.418-1.49 1.13-1.88 1.973-.228.492-.365 1.024-.422 1.563-.042.407-.044.816.02 1.22.104.646.344 1.267.633 1.852.446.902 1.02 1.738 1.638 2.53.806 1.03 1.7 1.992 2.636 2.908 1.277 1.253 2.635 2.42 4.043 3.524l.036.027c1.015-.783 1.997-1.613 2.945-2.478.787-.717 1.55-1.46 2.276-2.24.978-1.05 1.903-2.167 2.65-3.395.47-.777.887-1.617 1.075-2.512.098-.474.11-.953.06-1.433-.054-.506-.177-1.005-.38-1.47-.35-.803-.937-1.496-1.693-1.94-.248-.148-.513-.266-.788-.353-.324-.103-.657-.155-.995-.166h-.17z" fill-rule="nonzero"/></symbol><symbol id="svg-lock-circle" data-name="lock-circle" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill-opacity=".149"/><path d="M9.558 11.134c0-.338.007-.676.01-1.014.03-.753.17-1.492.446-2.194.668-1.696 2.063-3.057 3.775-3.683.658-.24 1.345-.362 2.044-.388.166-.002.165-.002.332 0 .7.026 1.386.147 2.045.388 1.712.626 3.108 1.987 3.776 3.683.277.702.416 1.44.445 2.194.005.338.01.676.013 1.014.634.02 1.27.044 1.903.07.077.01.15.02.223.046.24.083.44.267.542.5.042.095.062.192.074.294.18 4.31.004 8.627.004 12.94-.005.103-.017.202-.05.3-.083.24-.267.44-.5.542-.095.042-.192.062-.294.075-5.534.23-11.078.004-16.617.004-.103-.004-.2-.016-.3-.05-.24-.083-.44-.266-.542-.5-.042-.095-.062-.19-.074-.293-.18-4.31-.004-8.627-.004-12.94.005-.103.017-.2.05-.3.083-.24.267-.44.5-.542.095-.04.192-.062.294-.074.634-.026 1.27-.05 1.904-.07zm13.794 1.905H8.648v11.026h14.704V13.04zm-8.303 5.247c-.57-.347-.92-.992-.886-1.667.01-.183.046-.365.11-.538.07-.195.176-.378.31-.54.15-.18.334-.332.54-.444.244-.132.507-.2.782-.22.095-.002.094-.002.188 0 .275.02.538.088.78.22.208.112.394.264.544.445.132.16.237.344.31.54.062.172.098.354.108.537.034.682-.324 1.333-.902 1.677.023 1.03.043 2.06-.018 3.085-.015.147-.057.287-.136.413-.218.35-.656.514-1.05.392-.105-.032-.204-.083-.29-.15-.097-.074-.18-.168-.24-.274-.066-.118-.103-.246-.116-.38-.06-1.03-.073-2.065-.035-3.096zm5.54-7.204c.003-.305.007-.61.003-.917-.022-.575-.134-1.138-.36-1.67-.522-1.234-1.586-2.2-2.867-2.6-.517-.16-1.062-.227-1.603-.2-.496.026-.986.13-1.448.313-.516.202-.994.5-1.404.873-.436.397-.796.878-1.052 1.41-.283.588-.426 1.223-.45 1.873-.005.306 0 .612.002.917 3.06-.07 6.12-.07 9.18 0z"/></symbol><symbol id="svg-logo" data-name="logo" viewBox="0 0 54 32" width="54" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M32.207 25.946L21.72 32l-11.234-6.486L0 19.46V6.485L11.235 0 21.72 6.054 32.207 0 43.44 6.486l10.487 6.055v12.974L42.693 32l-10.486-6.054zm.66-1.343V14.27l9.054 5.19.003 10.378-9.055-5.235zm-20.884.046V14.27l9.085 5.218.002 10.44-9.086-5.28zM1.498 18.594V8.215l8.988 5.19v10.38l-8.988-5.19zM21.72 7.785l8.99 5.188-8.99 5.19-8.988-5.19 8.99-5.19zm20.973 0l8.988 5.188-8.987 5.19-8.99-5.19 8.99-5.19zM11.235 1.728l8.988 5.19-8.988 5.188-8.99-5.19 8.99-5.188zm20.97 0l8.99 5.19-8.99 5.188-8.987-5.19 8.988-5.188z"/><path d="M1.437 18.643L1.442 8.11l19.652 11.35.01 10.545L1.436 18.643zm31.37 6l.03-10.464 9.147 5.243-.01 10.582-9.168-5.363z" fill-opacity=".345"/></symbol><symbol id="svg-message-circle" data-name="message-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M17.342 23.582l-3.53 3.53-.066.06c-.12.088-.245.155-.392.185-.38.076-.778-.112-.96-.455-.072-.133-.1-.272-.107-.42v-2.9c-.087 0-.174-.002-.26-.003l-.41-.022c-.333-.03-.665-.072-.994-.14-.64-.132-1.266-.344-1.856-.63-1.33-.643-2.473-1.658-3.273-2.9-.457-.713-.8-1.496-1.012-2.314-.203-.783-.284-1.597-.243-2.405.043-.864.228-1.718.546-2.52.357-.9.877-1.73 1.527-2.446.692-.76 1.53-1.388 2.455-1.836.71-.343 1.47-.58 2.248-.7.335-.05.672-.077 1.01-.09 2.665-.034 5.33-.034 7.996 0 .338.013.674.04 1.01.09.778.12 1.54.357 2.248.7.926.448 1.763 1.075 2.454 1.836.65.715 1.17 1.547 1.527 2.445.32.802.505 1.656.55 2.52.04.807-.04 1.62-.244 2.404-.212.818-.556 1.6-1.013 2.313-.87 1.353-2.146 2.434-3.627 3.063-.668.283-1.374.475-2.094.567-.336.043-.672.06-1.01.065h-2.48zm.123-5.826c.128.01.25.04.364.1.097.05.186.12.26.203.267.305.29.767.058 1.1-.055.078-.122.146-.198.203-.143.106-.31.16-.485.175-2.205.06-4.412.06-6.617 0-.176-.014-.342-.07-.485-.175-.326-.242-.448-.69-.29-1.063.037-.088.088-.17.15-.24.074-.084.163-.154.26-.205.115-.06.237-.09.365-.1 2.205-.058 4.412-.058 6.617 0zm3.747-2.847c.18.017.35.075.493.19.373.293.447.846.166 1.228-.07.096-.16.178-.263.24-.122.07-.255.107-.395.12-3.457.117-6.92.117-10.376 0-.18-.017-.35-.075-.494-.19-.372-.293-.447-.846-.165-1.228.07-.096.16-.178.264-.24.123-.07.255-.107.396-.12 3.457-.117 6.92-.117 10.376 0zm0-2.85c.14.015.273.05.395.123.103.06.193.143.264.24.282.38.208.934-.165 1.228-.144.115-.312.173-.493.192-3.457.115-6.92.115-10.376 0-.18-.02-.35-.077-.494-.19-.372-.295-.447-.848-.165-1.23.07-.096.16-.178.264-.24.123-.07.255-.107.396-.12 3.457-.117 6.92-.117 10.376 0z"/></symbol><symbol id="svg-no-circle" data-name="no-circle" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill-opacity=".149"/><path d="M16.288 3.93c.48.018.958.052 1.434.12 1.2.174 2.37.53 3.463 1.053 2.135 1.02 3.95 2.69 5.153 4.727.596 1.01 1.042 2.104 1.32 3.242.272 1.12.384 2.28.33 3.43-.06 1.254-.318 2.495-.76 3.67-1.17 3.098-3.644 5.633-6.713 6.877-1.43.58-2.97.878-4.515.878-1.544 0-3.084-.3-4.515-.88-2.284-.925-4.256-2.57-5.59-4.642-.555-.866-1-1.805-1.315-2.785-.355-1.1-.55-2.25-.577-3.404-.028-1.154.11-2.31.412-3.425.318-1.18.82-2.31 1.48-3.34 1.2-1.866 2.92-3.39 4.92-4.347 1.092-.524 2.264-.88 3.463-1.052.476-.068.954-.102 1.434-.12.29-.003.288-.003.576 0zM23.67 9.8L9.874 23.597c.736.59 1.556 1.074 2.432 1.43 1.17.474 2.432.718 3.695.718s2.524-.244 3.695-.72c2.51-1.017 4.536-3.09 5.49-5.625.363-.96.573-1.976.622-3 .05-1.023-.062-2.053-.33-3.04-.26-.966-.67-1.89-1.21-2.73-.183-.288-.383-.565-.596-.83zM22.13 8.256c-.58-.465-1.213-.865-1.885-1.186-.894-.427-1.852-.718-2.833-.86-.39-.056-.78-.083-1.175-.098-.235-.003-.234-.003-.47 0-.394.015-.785.042-1.175.1-.98.14-1.94.43-2.833.86-1.637.783-3.044 2.03-4.025 3.557-.54.84-.95 1.764-1.21 2.73-.246.912-.36 1.86-.338 2.803.023.946.182 1.888.472 2.788.26.802.62 1.57 1.076 2.276.184.287.384.564.597.83l13.798-13.8z"/></symbol><symbol id="svg-pencil-circle" data-name="pencil-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M7.925 18.165c3.857-4.193 8.057-8.058 12.086-12.087.123-.112.256-.198.417-.24.07-.02.088-.02.16-.03.08-.002.08-.002.162 0 .07.01.088.01.158.03.134.035.248.1.357.185 1.634 1.497 3.137 3.132 4.704 4.7.055.06.106.12.147.192.136.236.16.526.068.782-.037.104-.094.192-.16.28-3.865 4.216-8.087 8.09-12.132 12.135l-.022.02c-.07.066-.15.12-.237.16-.022.012-.044.022-.067.032-2.164.718-4.384 1.256-6.577 1.882-.137.033-.27.047-.41.024-.357-.06-.654-.332-.746-.684-.035-.136-.033-.27-.013-.408.53-2.22 1.252-4.39 1.878-6.582.006-.02.013-.037.02-.055.034-.095.084-.186.148-.267l.016-.02.017-.02c.008-.01.016-.02.025-.028zm.16 5.796l3.335-.952c-.81-.77-1.616-1.546-2.39-2.35l-.944 3.303zm5.185-1.852l7.013-7.013-3.33-3.33-7.032 7.03c1.14 1.082 2.28 2.164 3.35 3.313zm4.996-11.658l3.33 3.33L24 11.38l-3.332-3.332-2.402 2.402z"/></symbol><symbol id="svg-plus-circle" data-name="plus-circle" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill-opacity=".149"/><path d="M23.24 17.376h-5.792v5.792c0 .8-.65 1.448-1.448 1.448-.8 0-1.448-.648-1.448-1.448v-5.792H8.76c-.8 0-1.448-.65-1.448-1.448 0-.8.65-1.448 1.448-1.448h5.792V8.688c0-.8.65-1.448 1.448-1.448.8 0 1.448.65 1.448 1.448v5.792h5.792c.8 0 1.448.65 1.448 1.448 0 .8-.65 1.448-1.448 1.448" fill-rule="nonzero"/></symbol><symbol id="svg-progress-circle" data-name="progress-circle" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill-opacity=".149"/><g fill-rule="nonzero"><path d="M16 21.288c-.58 0-1.048.47-1.048 1.048v3.52c0 .58.47 1.05 1.048 1.05.578 0 1.048-.47 1.048-1.05v-3.52c0-.58-.47-1.048-1.048-1.048" fill-opacity=".502"/><path d="M25.955 14.9l-3.458-.008c-.597.013-1.05.467-1.05 1.046-.002.58.467 1.05 1.046 1.05l3.458.007h.003c.577 0 1.046-.468 1.048-1.046 0-.58-.467-1.05-1.045-1.05" fill-opacity=".251"/><path d="M16.025 2.832h-.003c-.577 0-1.045.468-1.047 1.046l-.01 5.46c-.002.58.466 1.05 1.044 1.05h.002c.578 0 1.046-.467 1.047-1.045l.01-5.46c.002-.58-.466-1.05-1.045-1.05"/><path d="M13.75 20.81c-.536-.223-1.148.03-1.37.565l-1.375 3.298c-.223.534.03 1.147.563 1.37.133.054.27.082.403.082.412 0 .8-.243.97-.647l1.373-3.297c.224-.533-.028-1.147-.562-1.37" fill-opacity=".6"/><path d="M19.604 21.393c-.22-.537-.833-.79-1.367-.572-.535.22-.79.833-.57 1.37l1.354 3.298c.168.406.56.65.97.65.133 0 .27-.024.398-.078.536-.22.79-.833.572-1.367l-1.356-3.3z" fill-opacity=".4"/><path d="M9.5 16.964h.002c.578 0 1.046-.468 1.048-1.046 0-.58-.467-1.05-1.046-1.05L6.05 14.86h-.003C5.47 14.86 5 15.33 5 15.908c-.003.578.465 1.05 1.045 1.05l3.455.007z" fill-opacity=".902"/><path d="M21.075 13.83c.166.405.557.65.97.65.132 0 .267-.026.398-.08l3.158-1.296c.535-.22.79-.833.57-1.366-.22-.535-.83-.793-1.367-.57l-3.158 1.294c-.536.22-.79.833-.57 1.367" fill-opacity=".2"/><path d="M10.992 17.99c-.22-.536-.83-.794-1.367-.57l-3.228 1.332c-.535.22-.79.833-.57 1.366.167.405.558.65.97.65.13 0 1.557-.558 1.688-.613l1.938-.798c.535-.22.79-.833.57-1.367" fill-opacity=".8"/><path d="M21.28 19.75c-.407-.408-1.07-.41-1.48-.002-.41.41-.412 1.072-.002 1.482l2.482 2.49c.205.204.475.308.743.308s.535-.103.74-.306c.41-.41.41-1.07.003-1.482l-2.485-2.49z" fill-opacity=".349"/><path d="M19.902 12.04c.205.205.474.308.743.308.268 0 .536-.102.74-.305l2.405-2.397c.41-.41.412-1.072.002-1.482-.408-.41-1.07-.41-1.48-.003l-2.405 2.398c-.412.41-.412 1.07-.005 1.482" fill-opacity=".149"/><path d="M18.13 10.813c.132.054.27.08.403.08.41 0 .8-.242.968-.645l1.292-3.107c.223-.532-.03-1.145-.564-1.368-.535-.222-1.15.032-1.37.565l-1.292 3.106c-.222.534.03 1.147.564 1.37" fill-opacity=".102"/><path d="M13.176 6.326c-.22-.535-.834-.793-1.368-.57-.534.222-.79.834-.57 1.37l1.287 3.115c.166.406.556.65.97.65.13 0 .267-.025.397-.08.536-.22.79-.833.57-1.367l-1.286-3.117zM10.626 12.015c.204.205.473.308.742.308.267 0 .535-.102.74-.305.41-.41.41-1.073.002-1.482l-2.393-2.4c-.41-.41-1.072-.41-1.48-.002-.412.41-.413 1.07-.005 1.482l2.394 2.4z"/><path d="M12.186 19.73c-.41-.412-1.072-.413-1.482-.004L8.208 22.21c-.41.41-.41 1.072-.002 1.482.204.206.472.308.743.308.265 0 .533-.1.737-.305l2.495-2.485c.41-.408.41-1.07.004-1.48" fill-opacity=".702"/><path d="M25.59 18.787l-3.214-1.338c-.534-.223-1.148.03-1.37.563-.222.535.03 1.148.565 1.37l3.214 1.34c.13.054.268.08.403.08.41 0 .8-.243.967-.644.223-.537-.03-1.15-.564-1.373" fill-opacity=".302"/><path d="M6.407 13.07l3.16 1.314c.13.054.267.08.4.08.41 0 .8-.243.968-.646.223-.533-.03-1.146-.564-1.37l-3.156-1.314c-.535-.222-1.15.03-1.37.564-.223.535.03 1.148.563 1.37"/></g></symbol><symbol id="svg-progress" data-name="progress" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill="none"/><g fill-rule="nonzero"><path d="M16 22.915c-.758 0-1.37.613-1.37 1.37v4.605c0 .756.612 1.37 1.37 1.37.756 0 1.37-.614 1.37-1.37v-4.605c0-.757-.614-1.37-1.37-1.37" fill-opacity=".502"/><path d="M29.018 14.56l-4.522-.008c-.78.016-1.373.61-1.373 1.367-.002.756.61 1.37 1.368 1.372l4.522.01h.003c.755 0 1.367-.612 1.37-1.37 0-.755-.61-1.37-1.367-1.37" fill-opacity=".251"/><path d="M16.033.242h-.002c-.754 0-1.367.61-1.37 1.367l-.015 5.68c0 .755.61 1.37 1.367 1.372h.003c.756 0 1.37-.61 1.37-1.368l.016-5.68c.003-.757-.61-1.37-1.367-1.372"/><path d="M13.06 22.29c-.703-.292-1.503.04-1.795.738L9.468 27.34c-.29.7.04 1.5.736 1.79.174.074.352.11.528.11.537 0 1.045-.318 1.266-.846l1.796-4.31c.292-.7-.037-1.503-.735-1.793" fill-opacity=".6"/><path d="M20.713 23.052c-.287-.702-1.09-1.035-1.788-.748-.7.287-1.035 1.09-.747 1.79l1.773 4.313c.22.53.73.85 1.27.85.172 0 .35-.032.52-.1.7-.29 1.033-1.09.747-1.79l-1.774-4.315z" fill-opacity=".4"/><path d="M7.5 17.26h.003c.755 0 1.368-.61 1.37-1.367 0-.758-.61-1.372-1.367-1.373l-4.518-.01h-.003c-.756 0-1.37.612-1.37 1.368-.003.757.61 1.372 1.367 1.373l4.52.01z" fill-opacity=".902"/><path d="M22.636 13.162c.218.53.73.85 1.267.85.174 0 .35-.034.522-.105l4.13-1.694c.698-.287 1.033-1.09.744-1.786-.29-.7-1.088-1.037-1.79-.745l-4.13 1.692c-.7.287-1.032 1.09-.744 1.788" fill-opacity=".2"/><path d="M9.45 18.602c-.287-.7-1.085-1.04-1.787-.745l-4.22 1.74c-.7.29-1.033 1.09-.745 1.788.217.53.728.85 1.267.85.172 0 2.036-.73 2.208-.8l2.534-1.045c.7-.288 1.033-1.09.744-1.788" fill-opacity=".8"/><path d="M22.906 20.904c-.533-.534-1.4-.537-1.937-.002-.537.534-.54 1.4-.004 1.937l3.246 3.255c.27.267.62.402.97.402.352 0 .7-.134.97-.4.536-.534.537-1.4.003-1.937l-3.25-3.256z" fill-opacity=".349"/><path d="M21.103 10.822c.267.268.62.402.97.402.352 0 .7-.133.97-.398l3.144-3.135c.536-.534.538-1.4.003-1.937-.535-.535-1.4-.537-1.938-.004L21.11 8.883c-.54.535-.54 1.4-.007 1.938" fill-opacity=".149"/><path d="M18.786 9.217c.173.07.35.106.526.106.536 0 1.047-.318 1.266-.844l1.69-4.064c.29-.697-.04-1.5-.74-1.79-.7-.29-1.5.04-1.792.738l-1.69 4.06c-.29.7.04 1.5.74 1.793" fill-opacity=".102"/><path d="M12.307 3.35c-.29-.7-1.09-1.037-1.79-.744-.698.288-1.032 1.09-.743 1.79l1.682 4.074c.216.528.727.848 1.267.848.173 0 .35-.033.52-.105.7-.287 1.034-1.09.746-1.787L12.306 3.35zM8.973 10.79c.267.267.618.4.97.4.35 0 .7-.132.967-.397.536-.535.54-1.403.003-1.938l-3.13-3.137c-.533-.537-1.4-.538-1.936-.004-.537.535-.54 1.4-.004 1.938l3.13 3.137z"/><path d="M11.012 20.876c-.536-.537-1.402-.538-1.937-.004l-3.265 3.25c-.535.533-.537 1.4-.002 1.936.267.27.618.403.97.403.35 0 .7-.13.967-.398l3.263-3.25c.536-.533.537-1.4.004-1.936" fill-opacity=".702"/><path d="M28.54 19.645l-4.203-1.75c-.697-.29-1.5.04-1.79.738-.29.698.04 1.5.738 1.792l4.202 1.75c.17.07.35.106.526.106.537 0 1.045-.317 1.264-.842.292-.7-.038-1.502-.737-1.793" fill-opacity=".302"/><path d="M3.456 12.167l4.13 1.72c.172.07.35.105.526.105.537 0 1.047-.318 1.264-.846.292-.697-.038-1.498-.737-1.79l-4.13-1.72c-.698-.29-1.5.04-1.79.74-.292.698.038 1.5.736 1.79"/></g></symbol><symbol id="svg-question-circle" data-name="question-circle" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill-opacity=".149"/><path d="M17.46 17.292v3.053c0 .807-.653 1.46-1.46 1.46-.807 0-1.46-.653-1.46-1.46v-4.33c0-.804.653-1.46 1.46-1.46 1.584 0 2.87-1.284 2.87-2.868 0-1.584-1.286-2.87-2.87-2.87s-2.87 1.286-2.87 2.87c0 .806-.654 1.46-1.46 1.46-.81 0-1.462-.654-1.462-1.46 0-3.194 2.598-5.792 5.792-5.792s5.792 2.598 5.792 5.792c0 2.69-1.84 4.956-4.33 5.605M16 25.398c-.798 0-1.444-.643-1.444-1.444 0-.795.646-1.438 1.444-1.438.798 0 1.444.643 1.444 1.438 0 .8-.646 1.444-1.444 1.444" fill-rule="nonzero"/></symbol><symbol id="svg-refresh-circle" data-name="refresh-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M25.628 10.107l-1.048 4.12c-.012.046-.044.086-.064.135-.172.46-.638.794-1.13.794-.033 0-.065-.01-.1-.012-.032-.003-.06-.008-.09-.013-.038-.006-.077-.004-.114-.013l-4.117-1.05c-.66-.168-1.06-.836-.893-1.497.17-.663.836-1.062 1.502-.89l1.462.37c-.506-.614-1.122-1.137-1.842-1.53-1.47-.81-3.17-.99-4.775-.526-1.613.47-2.945 1.538-3.75 3.01-.81 1.47-1 3.168-.526 4.777.967 3.327 4.46 5.247 7.785 4.276.655-.185 1.338.185 1.525.838.193.654-.182 1.336-.838 1.53-.813.235-1.632.35-2.44.35-3.79 0-7.29-2.486-8.402-6.302-.653-2.246-.392-4.608.732-6.656 1.125-2.046 2.98-3.533 5.224-4.19 2.242-.65 4.604-.393 6.65.73 1.015.56 1.893 1.298 2.598 2.173l.26-1.03c.17-.662.842-1.064 1.5-.89.658.166 1.058.837.89 1.497" fill-rule="nonzero"/></symbol><symbol id="svg-restore" data-name="restore" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill="none"/><path d="M24.34 7.216c-2.384-2.223-5.49-3.388-8.75-3.273-3.396.12-6.64 1.703-8.9 4.348-1.456 1.707-2.397 3.723-2.777 5.888l-1.456-2.193c-.356-.535-1.076-.68-1.612-.325-.535.354-.682 1.076-.325 1.61l3.478 5.24c.415.658 1.42.695 1.9.057l4.02-4.575c.423-.483.375-1.217-.107-1.642-.482-.422-1.216-.374-1.64.107l-1.982 2.256c.295-1.81 1.06-3.496 2.27-4.91 1.838-2.152 4.467-3.44 7.212-3.536 2.638-.096 5.154.85 7.085 2.65 1.93 1.8 3.044 4.244 3.136 6.883.094 2.638-.846 5.153-2.647 7.085-1.8 1.93-4.246 3.044-6.884 3.136-.643.023-1.145.56-1.123 1.203.023.628.538 1.122 1.163 1.122h.04c3.26-.114 6.28-1.49 8.503-3.874 2.225-2.385 3.387-5.494 3.272-8.75-.114-3.26-1.49-6.28-3.874-8.504" fill-rule="nonzero"/></symbol><symbol id="svg-search-circle" data-name="search-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M7.716 13.77c0-3.362 2.738-6.102 6.105-6.102 3.363 0 6.1 2.74 6.1 6.103 0 3.365-2.737 6.105-6.1 6.105-3.366 0-6.104-2.74-6.104-6.104m18.19 10.785l-5.88-5.882c1.073-1.353 1.74-3.042 1.74-4.902 0-4.38-3.564-7.948-7.945-7.948-4.383 0-7.95 3.567-7.95 7.95 0 4.382 3.567 7.95 7.95 7.95 1.857 0 3.548-.67 4.9-1.744l5.883 5.882c.18.18.415.27.652.27.236 0 .472-.09.65-.27.363-.358.363-.943 0-1.305" fill-rule="nonzero"/></symbol><symbol id="svg-star-circle" data-name="star-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M16.08 5.155c.28.025.535.142.71.367.053.067.09.137.126.213l2.607 6.106h6.06l.082.005c.17.022.325.07.466.17.376.263.512.773.317 1.188-.06.13-.15.233-.254.328l-5.213 4.342 2.63 7.014.025.08c.04.167.048.33.004.5-.118.445-.554.75-1.014.708-.172-.016-.323-.08-.467-.174l-6.136-4.38L9.89 26l-.072.046c-.15.08-.307.13-.48.132-.462.002-.87-.34-.947-.796-.028-.17-.004-.333.05-.496l2.628-7.014-5.213-4.34-.062-.057c-.096-.104-.175-.215-.224-.35-.16-.43.02-.926.418-1.156.15-.087.308-.122.478-.13h6.062l2.632-6.108.036-.074c.042-.072.086-.14.144-.2.155-.167.354-.258.576-.296.082-.007.082-.007.164-.007zm-2.045 8.02c-.035.072-.072.14-.12.205-.13.168-.316.29-.522.343-.08.02-.156.026-.236.03h-4.05l3.706 3.084.062.057c.058.063.11.125.154.2.097.17.14.37.123.567-.01.087-.03.166-.057.247l-1.768 4.717 4.14-2.955.072-.047c.076-.04.15-.076.233-.098.19-.052.397-.043.583.025.08.03.15.072.223.12l4.14 2.954-1.768-4.717-.026-.08c-.02-.083-.034-.164-.035-.25 0-.197.06-.393.175-.554.05-.07.107-.128.17-.186l3.705-3.084h-4.05l-.078-.004c-.08-.01-.157-.024-.234-.05-.26-.09-.45-.283-.566-.528l-1.98-4.637c-.665 1.547-1.33 3.093-1.997 4.64z" fill-rule="nonzero"/></symbol><symbol id="svg-status-failed" data-name="status-failed" viewBox="0 0 33 32" width="33" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M16.217 26.67c-.754 0-1.362-.61-1.362-1.36 0-.752.608-1.36 1.362-1.36.75 0 1.36.608 1.36 1.36 0 .75-.61 1.36-1.36 1.36M14.97 13.06c0-.688.558-1.247 1.247-1.247.688 0 1.247.56 1.247 1.247v8.163c0 .69-.56 1.248-1.247 1.248-.69 0-1.248-.557-1.248-1.248v-8.163zm17.423 17.32L17.65.89c-.026-.05-.06-.08-.086-.126-.192-.312-.477-.54-.816-.66 0 0 .003-.004.005-.004C16.58.04 16.403 0 16.217 0c-.567 0-1.063.294-1.348.76-.025.043-.058.076-.08.118L.133 30.194c-.195.386-.175.846.052 1.212.23.37.63.594 1.063.594H31.21c.69 0 1.247-.56 1.247-1.247 0-.13-.027-.252-.064-.372" fill-rule="nonzero"/></symbol><symbol id="svg-status-partial" data-name="status-partial" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M16 0C7.178 0 0 7.178 0 16s7.178 16 16 16 16-7.178 16-16S24.822 0 16 0zm.013 2.472v27.055l.102.01c1.764-.014 3.52-.375 5.147-1.064 1.555-.658 2.982-1.61 4.19-2.79 1.168-1.142 2.13-2.492 2.82-3.97.566-1.21.95-2.5 1.135-3.82.207-1.478.17-2.99-.11-4.454-.24-1.25-.66-2.463-1.24-3.594-1.32-2.57-3.46-4.69-6.05-5.977-1.19-.594-2.468-1.007-3.78-1.226-.565-.095-1.133-.147-1.703-.173-.17-.004-.34-.015-.51.002z"/><path d="M16.013 2.472v27.055l.102.01c1.764-.014 3.52-.375 5.147-1.064 1.555-.658 2.982-1.61 4.19-2.79 1.168-1.142 2.13-2.492 2.82-3.97.566-1.21.95-2.5 1.135-3.82.207-1.478.17-2.99-.11-4.454-.24-1.25-.66-2.463-1.24-3.594-1.32-2.57-3.46-4.69-6.05-5.977-1.19-.594-2.468-1.007-3.78-1.226-.565-.095-1.133-.147-1.703-.173-.17-.004-.34-.015-.51.002z" fill-opacity=".149"/></symbol><symbol id="svg-status-pending" data-name="status-pending" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M20 18.666h-6.666V8c0-.736.596-1.332 1.332-1.332C15.404 6.668 16 7.264 16 8v8h4c.738 0 1.334.596 1.334 1.334 0 .74-.596 1.332-1.334 1.332M16 0C7.178 0 0 7.178 0 16s7.178 16 16 16 16-7.178 16-16S24.822 0 16 0" fill-rule="nonzero"/></symbol><symbol id="svg-sync-circle" data-name="sync-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M25.754 19.267c-1.384 3.912-5.102 6.538-9.254 6.538-2.776 0-5.45-1.168-7.36-3.014v.833c0 .68-.547 1.227-1.227 1.227-.677 0-1.227-.547-1.227-1.227v-4.77c0-.678.55-1.228 1.227-1.228h4.77c.68 0 1.228.55 1.228 1.227 0 .678-.547 1.227-1.226 1.227h-2.668c1.41 1.958 3.88 3.27 6.484 3.27 3.114 0 5.905-1.97 6.943-4.903.223-.638.922-.974 1.565-.748.638.225.972.93.746 1.567M6.294 12.78c1.383-3.91 5.1-6.537 9.254-6.537 2.775 0 5.453 1.17 7.36 3.018v-.835c0-.675.547-1.227 1.227-1.227.677 0 1.227.552 1.227 1.227v4.77c0 .68-.55 1.227-1.227 1.227h-4.77c-.678 0-1.228-.547-1.228-1.227 0-.677.55-1.227 1.227-1.227h2.667c-1.407-1.956-3.88-3.27-6.482-3.27-3.115 0-5.905 1.97-6.94 4.902-.18.503-.653.818-1.157.818-.136 0-.273-.02-.408-.07-.64-.227-.975-.927-.75-1.567" fill-rule="nonzero"/></symbol><symbol id="svg-thumbs-up-circle" data-name="thumbs-up-circle" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill-opacity=".149"/><path d="M23.07 18.6c.78 0 1.413.634 1.413 1.415 0 .78-.632 1.414-1.413 1.414h-.943c.78 0 1.414.632 1.414 1.413 0 .78-.632 1.414-1.413 1.414H16c-3.77 0-2.828-1.886-10.37-1.886V13.89h2.83c3.298 0 7.07-3.037 7.07-7.54 0-1.49 2.827-1.68 2.827 1.148 0 1.885-.943 5.45-.943 5.45h7.54c.782 0 1.415.633 1.415 1.413s-.634 1.413-1.415 1.413h-.943c.782 0 1.414.634 1.414 1.414 0 .782-.632 1.414-1.414 1.414h-.942" fill-rule="nonzero"/></symbol><symbol id="svg-warning-circle" data-name="warning-circle" viewBox="0 0 33 33" width="33" height="33" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16.024" cy="16.024" r="16.024" fill-opacity=".149"/><path d="M16.898 17.985c0 .493-.4.892-.892.892s-.89-.4-.89-.892V13.12c0-.49.398-.89.89-.89s.892.4.892.89v4.865zm-.892 3.242c-.446 0-.81-.364-.81-.81 0-.45.364-.81.81-.81.448 0 .81.36.81.81 0 .446-.362.81-.81.81m9.614 1.837L16.803 5.43c-.303-.605-1.29-.605-1.594 0L6.293 23.26c-.14.276-.125.604.04.866.16.264.448.425.757.425h17.867c.492 0 .892-.4.892-.89 0-.23-.087-.44-.23-.596" fill-rule="nonzero"/></symbol><symbol id="svg-x-circle" data-name="x-circle" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle cx="16" cy="16" r="16" fill-opacity=".149"/><path d="M23.484 21.68c.478.477.478 1.254 0 1.732-.24.24-.554.36-.868.36-.31 0-.625-.12-.865-.36L16 17.662l-5.75 5.75c-.24.24-.555.36-.866.36-.314 0-.628-.12-.868-.36-.478-.478-.478-1.255 0-1.733l5.752-5.752-5.752-5.75c-.478-.477-.478-1.253 0-1.73.478-.48 1.255-.48 1.735 0L16 14.195l5.75-5.75c.48-.48 1.256-.48 1.734 0s.478 1.255 0 1.733l-5.752 5.748 5.752 5.75z" fill-rule="nonzero"/></symbol><symbol id="svg-buttons" data-name="buttons" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#c3cddb" d="M326.9 41c1.6 0 3 1.4 3 3v29.8c0 1.6-1.4 3-3 3H140.8c-1.6 0-3-1.4-3-3V44c0-1.6 1.4-3 3-3h186.1m0-5H140.8c-4.4 0-8 3.6-8 8v29.8c0 4.4 3.6 8 8 8h186.1c4.4 0 8-3.6 8-8V44c0-4.4-3.6-8-8-8z"/><path fill="#8c9ba5" d="M198.7 54.1h70.2v9.6h-70.2z"/><path fill="#dd2f41" d="M327.4 94.1H140.6c-4.2 0-7.7 3.5-7.7 7.7v30.4c0 4.2 3.5 7.7 7.7 7.7h186.7c4.2 0 7.7-3.5 7.7-7.7v-30.4c.1-4.2-3.4-7.7-7.6-7.7zm-58.6 27.7h-70.2v-9.6h70.2v9.6z"/><path fill="#297adf" d="M327.1 152.2H140.9c-4.4 0-7.9 3.6-7.9 7.9V190c0 4.4 3.6 7.9 7.9 7.9h186.2c4.4 0 7.9-3.6 7.9-7.9v-29.9c.1-4.3-3.5-7.9-7.9-7.9zm-58.3 27.6h-70.2v-9.6h70.2v9.6z"/></symbol><symbol id="svg-cards" data-name="cards" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#d6dde7" d="M405.9 36H258.5c-4.5 0-8.1 3.6-8.1 8.1v145.8c0 4.5 3.6 8.1 8.1 8.1h147.4c4.5 0 8.1-3.6 8.1-8.1V44.1c0-4.5-3.6-8.1-8.1-8.1zm-150.4 8.1c0-1.6 1.4-3 3-3h147.4c1.6 0 3 1.4 3 3V156H255.5V44.1zM209.6 40.7c1.6 0 3 1.4 3 3v146.1c0 1.6-1.4 3-3 3H61.9c-1.6 0-3-1.4-3-3v-146c0-1.6 1.4-3 3-3h147.7m0-5.1H61.9c-4.5 0-8.1 3.7-8.1 8.1v146.1c0 4.5 3.7 8.1 8.1 8.1h147.7c4.5 0 8.1-3.7 8.1-8.1V43.8c.1-4.5-3.6-8.1-8.1-8.1z"/><path fill="#fff" d="M401.5 187.1h-53.6c-1.9 0-3.5-1.6-3.5-3.5v-12.7c0-1.9 1.6-3.5 3.5-3.5h53.6c1.9 0 3.5 1.6 3.5 3.5v12.7c0 1.9-1.6 3.5-3.5 3.5z"/></symbol><symbol id="svg-color-wheel" data-name="color-wheel" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#2ac84f" d="M306.8 81.8c-7.9-16.1-20.9-29.1-37-37-.8.8-1.4 1.8-1.9 2.8l-11.3 26.2-11.2 26.2c-2.1 4.8 1.4 8.2 6.2 6.2l26.2-11.3L304 83.6c1-.4 2-1.1 2.8-1.8z"/><path fill="#59a702" d="M310.6 91.1c-1.1 0-2.2.3-3.3.7l-26.5 10.6-26.5 10.6c-4.9 1.9-4.9 6.8 0 8.7l26.5 10.6 26.5 10.6c1.1.4 2.2.6 3.3.7 2.8-8.2 4.3-17 4.3-26.2s-1.5-18.1-4.3-26.3z"/><path fill="#efc102" d="M306.8 152.7c-.8-.8-1.8-1.4-2.8-1.9l-26.2-11.3-26.2-11.3c-4.8-2.1-8.2 1.4-6.2 6.2l11.3 26.2 11.3 26.2c.5 1.1 1.1 2 1.9 2.8 15.9-7.8 29-20.8 36.9-36.9z"/><path fill="#f69524" d="M234.3 197.9c9.2 0 18-1.5 26.2-4.3 0-1.1-.3-2.2-.7-3.3l-10.6-26.5-10.6-26.5c-1.9-4.9-6.8-4.9-8.7 0l-10.6 26.5-10.6 26.5c-.4 1.1-.6 2.2-.7 3.3 8.3 2.8 17.1 4.3 26.3 4.3z"/><path fill="#f96623" d="M217.1 128.3l-26.2 11.3-26.2 11.3c-1.1.5-2 1.1-2.8 1.9 7.9 16.1 20.9 29.1 37 37 .8-.8 1.4-1.8 1.9-2.8l11.3-26.2 11.3-26.2c1.9-4.9-1.5-8.3-6.3-6.3z"/><path fill="#a81d27" d="M214.3 112.9l-26.5-10.6-26.5-10.6c-1.1-.4-2.2-.6-3.3-.7-2.8 8.2-4.3 17-4.3 26.2s1.5 18 4.3 26.2c1.1 0 2.2-.3 3.3-.7l26.5-10.6 26.5-10.6c4.8-1.8 4.8-6.7 0-8.6z"/><path fill="#a346ce" d="M161.8 81.8c.8.8 1.8 1.4 2.8 1.9L190.8 95l26.2 11.3c4.8 2.1 8.2-1.4 6.2-6.2L212 73.8l-11.3-26.2c-.5-1.1-1.1-2-1.9-2.8-16 7.8-29.1 20.9-37 37z"/><path fill="#297adf" d="M234.3 36.6c-9.2 0-18 1.5-26.2 4.3 0 1.1.3 2.2.7 3.3l10.6 26.5L230 97.2c1.9 4.9 6.8 4.9 8.7 0l10.6-26.5 10.6-26.5c.4-1.1.6-2.2.7-3.3-8.3-2.8-17.1-4.3-26.3-4.3z"/></symbol><symbol id="svg-dialog" data-name="dialog" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#d6dde7" d="M349.1 197.3H118.9c-1.8 0-3.3-1.5-3.3-3.3V39.4c0-1.8 1.5-3.3 3.3-3.3h230.2c1.8 0 3.3 1.5 3.3 3.3V194c0 1.8-1.5 3.3-3.3 3.3z"/><path fill="#fff" d="M177.8 170.8c-3 0-5.5-2.5-5.5-5.5V63.7c0-3 2.5-5.5 5.5-5.5h112.4c3 0 5.5 2.5 5.5 5.5v101.6c0 3-2.5 5.5-5.5 5.5H177.8z"/><path fill="#d6dde7" d="M290.2 60.7c1.6 0 3 1.4 3 3v101.6c0 1.6-1.4 3-3 3H177.8c-1.6 0-3-1.4-3-3V63.7c0-1.6 1.4-3 3-3h112.4m0-5H177.8c-4.4 0-8 3.6-8 8v101.6c0 4.4 3.6 8 8 8h112.4c4.4 0 8-3.6 8-8V63.7c0-4.4-3.6-8-8-8z"/><path fill="#297adf" d="M260.4 158.2h-52.9c-1.9 0-3.5-1.6-3.5-3.5v-12.5c0-1.9 1.6-3.5 3.5-3.5h52.9c1.9 0 3.5 1.6 3.5 3.5v12.5c0 1.9-1.5 3.5-3.5 3.5z"/></symbol><symbol id="svg-feedback" data-name="feedback" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><g fill="#f96623"><path fill-opacity=".48" d="M315.294 144.15l-4.098 10.1L250.69 129.7l4.097-10.1z"/><path d="M217.264 104.368l-4.1 10.1-60.506-24.553 4.1-10.1z"/><path fill-opacity=".24" d="M206.906 198.23l-10.1-4.098 24.553-60.507 10.1 4.098z"/><path fill-opacity=".72" d="M246.706 100.272l-10.1-4.098 24.553-60.507 10.098 4.098z"/><path fill-opacity=".36" d="M272.328 193.588l-10.04 4.245-25.428-60.148 10.04-4.244z"/><path fill-opacity=".84" d="M231.086 96.223l-10.04 4.244-25.428-60.148 10.04-4.245z"/><path fill-opacity=".12" d="M157.39 155.246l-4.246-10.04 60.148-25.428 4.244 10.04z"/><path fill-opacity=".6" d="M254.762 114.076l-4.245-10.04 60.148-25.428 4.244 10.04z"/></g></symbol><symbol id="svg-icons" data-name="icons" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#f0f3f6" d="M334.8 119s-50.5 62.4-112.8 62.4S109.3 119 109.3 119s50.5-62.4 112.8-62.4S334.8 119 334.8 119z"/><path fill="#d6dde7" d="M222.1 183.9c-18.1 0-47-5.5-81.3-31.7-20.4-15.6-32.9-31-33.5-31.6L106 119l1.3-1.6c.5-.6 13-16 33.5-31.6 34.3-26.2 63.1-31.7 81.3-31.7 18.1 0 47 5.5 81.3 31.7 20.4 15.6 32.9 31 33.5 31.6l1.3 1.6-1.3 1.6c-.5.6-13 16-33.5 31.6-34.4 26.2-63.2 31.7-81.3 31.7zM112.6 119c8.3 9.6 54.6 59.9 109.5 59.9s101.2-50.3 109.5-59.9c-8.3-9.6-54.6-59.9-109.5-59.9S120.9 109.4 112.6 119z"/><path fill="#59a702" d="M222.1 69.4c-27 0-49 21.9-49 49s21.9 49 49 49c27 0 49-21.9 49-49s-22-49-49-49zm11.5 40.9c-6.4 0-11.5-5.2-11.5-11.5s5.2-11.5 11.5-11.5c6.4 0 11.5 5.2 11.5 11.5s-5.2 11.5-11.5 11.5z"/><path fill="#549103" d="M233.6 110.3c-6.4 0-11.5-5.2-11.5-11.5 0-.6.1-1.3.2-1.9h-.2c-11.9 0-21.5 9.6-21.5 21.5s9.6 21.5 21.5 21.5 21.5-9.6 21.5-21.5c0-3.8-1-7.4-2.8-10.6-2 1.6-4.5 2.5-7.2 2.5z"/></symbol><symbol id="svg-inputs" data-name="inputs" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#297adf" d="M278.9 64.2h-89.8c-29.1 0-52.8 23.8-52.8 52.8 0 29.1 23.8 52.8 52.8 52.8h89.8c29.1 0 52.8-23.8 52.8-52.8 0-29.1-23.7-52.8-52.8-52.8zm-.8 95.8c-23.3 0-42.2-18.9-42.2-42.2 0-23.3 18.9-42.2 42.2-42.2 23.3 0 42.2 18.9 42.2 42.2 0 23.3-18.9 42.2-42.2 42.2z"/></symbol><symbol id="svg-messages" data-name="messages" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#d6dde7" class="st0" d="M349.1 197.3H118.9c-1.8 0-3.3-1.5-3.3-3.3V39.4c0-1.8 1.5-3.3 3.3-3.3h230.2c1.8 0 3.3 1.5 3.3 3.3V194c0 1.8-1.5 3.3-3.3 3.3z"/><path fill="#59a702" d="M327.1 80.3H140.6c-2.1 0-3.8-1.7-3.8-3.8V36h194.1v40.5c0 2.1-1.7 3.8-3.8 3.8z"/><path fill="#549103" d="M140.6 80.3h40.5V36h-44.3v40.5c0 2.1 1.7 3.8 3.8 3.8z"/><circle fill="#7bc117" cx="307.7" cy="58.1" r="11.8"/></symbol><symbol id="svg-panel" data-name="panel" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#d6dde7" d="M371.4 41c1.6 0 3 1.4 3 3v56c0 1.6-1.4 3-3 3H96.6c-1.6 0-3-1.4-3-3V44c0-1.6 1.4-3 3-3h274.8m0-5H96.6c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h274.8c4.4 0 8-3.6 8-8V44c0-4.4-3.6-8-8-8zM371.4 198H96.6c-4.4 0-8-3.6-8-8v-56c0-4.4 3.6-8 8-8h274.8c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8z"/></symbol><symbol id="svg-progress-bars" data-name="progress-bars" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#dfe3e6" d="M401.6 129.5H66.4c-6.9 0-12.5-5.6-12.5-12.5s5.6-12.5 12.5-12.5h335.3c6.9 0 12.5 5.6 12.5 12.5-.1 6.9-5.7 12.5-12.6 12.5z"/><path fill="#efc102" d="M333.4 129.5h-267c-6.9 0-12.5-5.6-12.5-12.5s5.6-12.5 12.5-12.5h267c6.9 0 12.5 5.6 12.5 12.5-.1 6.9-5.7 12.5-12.5 12.5z"/></symbol><symbol id="svg-section" data-name="section" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#f69524" d="M228.9 112.3h-76.1V55.9c0-10.9 8.8-19.7 19.7-19.7h56.4v76.1z"/><path fill="#d6dde7" d="M228.9 197.8h-56.6c-10.8 0-19.5-8.7-19.5-19.5v-56.6h76.1v76.1zM315.2 112.3h-76.1V36.2H296c10.6 0 19.2 8.6 19.2 19.2v56.9zM295.7 197.8h-56.6v-76.1h76.1v56.6c0 10.7-8.7 19.5-19.5 19.5z"/></symbol><symbol id="svg-sliders" data-name="sliders" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle fill="#297adf" cx="164.6" cy="117" r="6.6"/><path fill="#297adf" d="M145.7 117c0-1.7.3-3.4.7-5H80.2c-2-5-6.8-8.5-12.5-8.5-7.5 0-13.5 6-13.5 13.5s6 13.5 13.5 13.5c5.7 0 10.5-3.5 12.5-8.5h66.2c-.5-1.6-.7-3.3-.7-5z"/><path fill="#d6dde7" d="M400.3 103.5c-5.7 0-10.5 3.5-12.5 8.5H246.5c-2-5-6.8-8.5-12.5-8.5s-10.5 3.5-12.5 8.5h-38.6c-2.2-8-9.5-13.9-18.2-13.9-10.4 0-18.9 8.5-18.9 18.9 0 10.4 8.5 18.9 18.9 18.9 8.7 0 16-5.9 18.2-13.9h38.6c2 5 6.8 8.5 12.5 8.5s10.5-3.5 12.5-8.5h141.3c2 5 6.8 8.5 12.5 8.5 7.5 0 13.5-6 13.5-13.5s-6-13.5-13.5-13.5zm-235.7 27.4c-7.7 0-13.9-6.2-13.9-13.9s6.2-13.9 13.9-13.9 13.9 6.2 13.9 13.9-6.2 13.9-13.9 13.9zm18.9-12.3c0-.5.1-1.1.1-1.6s0-1.1-.1-1.6c0 .5.1 1.1.1 1.6s-.1 1.1-.1 1.6zm-.2 1.4c0-.2.1-.5.1-.7 0 .3-.1.5-.1.7zm0-6c0 .2.1.5.1.7 0-.3-.1-.5-.1-.7z"/></symbol><symbol id="svg-tables" data-name="tables" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#c3cddb" d="M366.6 197.9c4.4 0 8.1-3.6 8.1-8.1V44.2c0-4.4-3.6-8.1-8.1-8.1H101.4c-4.4 0-8.1 3.6-8.1 8.1V189.8c0 4.4 3.6 8.1 8.1 8.1h265.2zm3-153.7v43.6h-86.2V41.2h83.2c1.6 0 3 1.4 3 3zm-180 43.6V41.2h88.7v46.6h-88.7zm88.8 5.1V142h-88.7V92.9h88.7zm-180-48.7c0-1.6 1.4-3 3-3h83.2v46.6H98.4V44.2zm0 48.7h86.2V142H98.4V92.9zm3 99.9c-1.6 0-3-1.4-3-3V147h86.2v45.8h-83.2zm88.2 0V147h88.7v45.8h-88.7zm180-3c0 1.6-1.4 3-3 3h-83.2V147h86.2v42.8zm0-47.8h-86.2V92.9h86.2V142z"/><path fill="#a346ce" d="M369.6 44.2v43.6h-86.2V41.2h83.2c1.6 0 3 1.4 3 3zM189.6 41.2h88.7v46.6h-88.7zM98.4 44.2c0-1.6 1.4-3 3-3h83.2v46.6H98.4V44.2z"/></symbol><symbol id="svg-text" data-name="text" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#297adf" d="M228 172.7l-8.3-21.8h-52.1l-8.3 21.8h-22.6l44.6-113.5h24.9l44.6 113.5H228zm-34.3-93.4l-20.4 54.1h40.9l-20.5-54.1zM313.5 172.7v-8.9c-6.1 7-15.7 10.9-26.6 10.9-13.4 0-28.6-9-28.6-27.2 0-18.9 15.1-26.7 28.6-26.7 11.1 0 20.6 3.6 26.6 10.6v-12.3c0-9.5-7.8-15.3-19.2-15.3-9.2 0-17.2 3.4-24.3 10.4l-7.3-12.4c9.5-9 21.4-13.3 34.6-13.3 18.2 0 34.2 7.7 34.2 29.8v54.5h-18zm0-18.7v-12.4c-4.1-5.6-11.7-8.5-19.6-8.5-10 0-17.5 5.8-17.5 14.8 0 8.9 7.5 14.6 17.5 14.6 7.8 0 15.5-2.9 19.6-8.5z"/></symbol><symbol id="svg-time" data-name="time" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><circle fill="#c3cddb" cx="234" cy="117" r="80.8"/><path fill="#fff" d="M261.1 148.1c-1 0-2-.4-2.8-1.2l-27.1-27.1c-.8-.8-1.2-1.8-1.2-2.8V56.2c0-2.2 1.8-4 4-4s4 1.8 4 4v59.2l25.9 25.9c1.6 1.6 1.6 4.1 0 5.7-.8.7-1.8 1.1-2.8 1.1z"/></symbol><symbol id="svg-validation" data-name="validation" viewBox="0 0 468 234" width="468" height="234" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#dd2f41" d="M332 69.7H136c-4.4 0-8 3.6-8 8v83.2c0 1.9 1.5 3.4 3.4 3.4h205.2c1.9 0 3.4-1.5 3.4-3.4V77.7c0-4.4-3.6-8-8-8zm-141.7 75.5h-52.1v-9.3h52.1v9.3zM335 111.8H133V77.7c0-1.6 1.4-3 3-3h196c1.6 0 3 1.4 3 3v34.1z"/></symbol><symbol id="svg-status-completed" data-name="status-completed" viewBox="0 0 32 32" width="32" height="32" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M24.965 12.802l-10.267 11.25-7.626-7.621a1.232 1.232 0 0 1 0-1.741 1.224 1.224 0 0 1 1.74 0l5.805 5.802 8.531-9.349a1.23 1.23 0 0 1 1.817 1.659M16 0C7.178 0 0 7.178 0 16s7.178 16 16 16 16-7.178 16-16S24.822 0 16 0" fill-rule="nonzero"/></symbol></svg>')
|
80
80
|
}
|
81
81
|
}
|
82
82
|
|
@@ -15670,4 +15670,4 @@ function hasOwnProperty(obj, prop) {
|
|
15670
15670
|
},{"./support/isBuffer":78,"_process":71,"inherits":68}]},{},[12])(12)
|
15671
15671
|
});
|
15672
15672
|
|
15673
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJhcHAvYXNzZXRzL2phdmFzY3JpcHRzL3R1bmdzdGVuL19lc3ZnLmpzIiwiYXBwL2Fzc2V0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tZW51ICcgICAgICAgICAgICAgICAgICArIC8vIG1vdXNlIGJ1dHRvbnNcbiAgICAgICAgJ21vdXNld2hlZWwgbW91c2VtdWx0aXdoZWVsIERPTU1vdXNlU2Nyb2xsICcgICAgICAgICAgICAgICAgICAgICArIC8vIG1vdXNlIHdoZWVsXG4gICAgICAgICdtb3VzZW92ZXIgbW91c2VvdXQgbW91c2Vtb3ZlIHNlbGVjdHN0YXJ0IHNlbGVjdGVuZCAnICAgICAgICAgICAgKyAvLyBtb3VzZSBtb3ZlbWVudFxuICAgICAgICAna2V5ZG93biBrZXlwcmVzcyBrZXl1cCAnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgLy8ga2V5Ym9hcmRcbiAgICAgICAgJ29yaWVudGF0aW9uY2hhbmdlICcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIC8vIG1vYmlsZVxuICAgICAgICAnZm9jdXMgYmx1ciBjaGFuZ2UgcmVzZXQgc2VsZWN0IHN1Ym1pdCAnICAgICAgICAgICAgICAgICAgICAgICAgICsgLy8gZm9ybSBlbGVtZW50c1xuICAgICAgICAnbG9hZCB1bmxvYWQgYmVmb3JldW5sb2FkIHJlc2l6ZSBtb3ZlIERPTUNvbnRlbnRMb2FkZWQgJyAgICAgICAgICsgLy8gd2luZG93XG4gICAgICAgICdyZWFkeXN0YXRlY2hhbmdlIG1lc3NhZ2UgJyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyB3aW5kb3dcbiAgICAgICAgJ2Vycm9yIGFib3J0IHNjcm9sbCAnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG1pc2NcbiAgICAgIC8vIGVsZW1lbnQuZmlyZUV2ZW50KCdvblhZWicuLi4gaXMgbm90IGZvcmdpdmluZyBpZiB3ZSB0cnkgdG8gZmlyZSBhbiBldmVudFxuICAgICAgLy8gdGhhdCBkb2Vzbid0IGFjdHVhbGx5IGV4aXN0LCBzbyBtYWtlIHN1cmUgd2Ugb25seSBkbyB0aGVzZSBvbiBuZXdlciBicm93c2Vyc1xuICAgICwgdzNjTmF0aXZlRXZlbnRzID1cbiAgICAgICAgJ3Nob3cgJyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIC8vIG1vdXNlIGJ1dHRvbnNcbiAgICAgICAgJ2lucHV0IGludmFsaWQgJyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIC8vIGZvcm0gZWxlbWVudHNcbiAgICAgICAgJ3RvdWNoc3RhcnQgdG91Y2htb3ZlIHRvdWNoZW5kIHRvdWNoY2FuY2VsICcgICAgICAgICAgICAgICAgICAgICArIC8vIHRvdWNoXG4gICAgICAgICdnZXN0dXJlc3RhcnQgZ2VzdHVyZWNoYW5nZSBnZXN0dXJlZW5kICcgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBnZXN0dXJlXG4gICAgICAgICd0ZXh0aW5wdXQgJyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBUZXh0RXZlbnRcbiAgICAgICAgJ3JlYWR5c3RhdGVjaGFuZ2UgcGFnZXNob3cgcGFnZWhpZGUgcG9wc3RhdGUgJyAgICAgICAgICAgICAgICAgICArIC8vIHdpbmRvd1xuICAgICAgICAnaGFzaGNoYW5nZSBvZmZsaW5lIG9ubGluZSAnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgLy8gd2luZG93XG4gICAgICAgICdhZnRlcnByaW50IGJlZm9yZXByaW50ICcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBwcmludGluZ1xuICAgICAgICAnZHJhZ3N0YXJ0IGRyYWdlbnRlciBkcmFnb3ZlciBkcmFnbGVhdmUgZHJhZyBkcm9wIGRyYWdlbmQgJyAgICAgICsgLy8gZG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ZSBuYXRpdmUgZXZlbnRzIHRvIGdlbmVyYXRlIHRoZW1cbiAgICAsIGN1c3RvbUV2ZW50cyA9IChmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBpc0FuY2VzdG9yID0gJ2NvbXBhcmVEb2N1bWVudFBvc2l0aW9uJyBpbiByb290XG4gICAgICAgICAgICAgID8gZnVuY3Rpb24gKGVsZW1lbnQsIGNvbnRhaW5lcikge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbnRhaW5lci5jb21wYXJlRG9jdW1lbnRQb3NpdGlvbiAmJiAoY29udGFpbmVyLmNvbXBhcmVEb2N1bWVudFBvc2l0aW9uKGVsZW1lbnQpICYgMTYpID09PSAxNlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgOiAnY29udGFpbnMnIGluIHJvb3RcbiAgICAgICAgICAgICAgICA/IGZ1bmN0aW9uIChlbGVtZW50LCBjb250YWluZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyID0gY29udGFpbmVyLm5vZGVUeXBlID09PSA5IHx8IGNvbnRhaW5lciA9PT0gd2luZG93ID8gcm9vdCA6IGNvbnRhaW5lclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29udGFpbmVyICE9PSBlbGVtZW50ICYmIGNvbnRhaW5lci5jb250YWlucyhlbGVtZW50KVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIDogZnVuY3Rpb24gKGVsZW1lbnQsIGNvbnRhaW5lcikge1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoZWxlbWVudCA9IGVsZW1lbnQucGFyZW50Tm9kZSkgaWYgKGVsZW1lbnQgPT09IGNvbnRhaW5lcikgcmV0dXJuIDFcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDBcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAsIGNoZWNrID0gZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICAgIHZhciByZWx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2YXIgY29tbW9uUHJvcHMgID0gc3RyMmFycignYWx0S2V5IGF0dHJDaGFuZ2UgYXR0ck5hbWUgYnViYmxlcyBjYW5jZWxhYmxlIGN0cmxLZXkgY3VycmVudFRhcmdldCAnICtcbiAgICAgICAgICAgICAgJ2RldGFpbCBldmVudFBoYXNlIGdldE1vZGlmaWVyU3RhdGUgaXNUcnVzdGVkIG1ldGFLZXkgcmVsYXRlZE5vZGUgcmVsYXRlZFRhcmdldCBzaGlmdEtleSAnICArXG4gICAgICAgICAgICAgICdzcmNFbGVtZW50IHRhcmdldCB0aW1lU3RhbXAgdHlwZSB2aWV3IHdoaWNoIHByb3BlcnR5TmFtZSBwYXRoJylcbiAgICAgICAgICAsIG1vdXNlUHJvcHMgICA9IGNvbW1vblByb3BzLmNvbmNhdChzdHIyYXJyKCdidXR0b24gYnV0dG9ucyBjbGllbnRYIGNsaWVudFkgZGF0YVRyYW5zZmVyICcgICAgICArXG4gICAgICAgICAgICAgICdmcm9tRWxlbWVudCBvZmZzZXRYIG9mZnNldFkgcGFnZVggcGFnZVkgc2NyZWVuWCBzY3JlZW5ZIHRvRWxlbWVudCBtb3ZlbWVudFggbW92ZW1lbnRZIHJlZ2lvbicpKVxuICAgICAgICAgICwgbW91c2VXaGVlbFByb3BzID0gbW91c2VQcm9wcy5jb25jYXQoc3RyMmFycignd2hlZWxEZWx0YSB3aGVlbERlbHRhWCB3aGVlbERlbHRhWSB3aGVlbERlbHRhWiAnICtcbiAgICAgICAgICAgICAgJ2F4aXMnKSkgLy8gJ2F4aXMnIGlzIEZGIHNwZWNpZmljXG4gICAgICAgICAgLCBrZXlQcm9wcyAgICAgPSBjb21tb25Qcm9wcy5jb25jYXQoc3RyMmFycignY2hhciBjaGFyQ29kZSBrZXkga2V5Q29kZSBrZXlJZGVudGlmaWVyICcgICAgICAgICAgK1xuICAgICAgICAgICAgICAna2V5TG9jYXRpb24gbG9jYXRpb24gaXNDb21wb3NpbmcgY29kZScpKVxuICAgICAgICAgICwgdGV4dFByb3BzICAgID0gY29tbW9uUHJvcHMuY29uY2F0KHN0cjJhcnIoJ2RhdGEnKSlcbiAgICAgICAgICAsIHRvdWNoUHJvcHMgICA9IGNvbW1vblByb3BzLmNvbmNhdChzdHIyYXJyKCd0b3VjaGVzIHRhcmdldFRvdWNoZXMgY2hhbmdlZFRvdWNoZXMgc2NhbGUgcm90YXRpb24nKSlcbiAgICAgICAgICAsIG1lc3NhZ2VQcm9wcyA9IGNvbW1vblByb3BzLmNvbmNhdChzdHIyYXJyKCdkYXRhIG9yaWdpbiBzb3VyY2UnKSlcbiAgICAgICAgICAsIHN0YXRlUHJvcHMgICA9IGNvbW1vblByb3BzLmNvbmNhdChzdHIyYXJyKCdzdGF0ZScpKVxuICAgICAgICAgICwgb3Zlck91dFJlZ2V4ID0gL292ZXJ8b3V0L1xuICAgICAgICAgICAgLy8gc29tZSBldmVudCB0eXBlcyBuZWVkIHNwZWNpYWwgaGFuZGxpbmcgYW5kIHNvbWUgbmVlZCBzcGVjaWFsIHByb3BlcnRpZXMsIGRvIHRoYXQgYWxsIGhlcmVcbiAgICAgICAgICAsIHR5cGVGaXhlcnMgICA9IFtcbiAgICAgICAgICAgICAgICB7IC8vIGtleSBldmVudHNcbiAgICAgICAgICAgICAgICAgICAgcmVnOiAva2V5L2lcbiAgICAgICAgICAgICAgICAgICwgZml4OiBmdW5jdGlvbiAoZXZlbnQsIG5ld0V2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgbmV3RXZlbnQua2V5Q29kZSA9IGV2ZW50LmtleUNvZGUgfHwgZXZlbnQud2hpY2hcbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ga2V5UHJvcHNcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgLCB7IC8vIG1vdXNlIGV2ZW50c1xuICAgICAgICAgICAgICAgICAgICByZWc6IC9jbGlja3xtb3VzZSg/ISguKndoZWVsfHNjcm9sbCkpfG1lbnV8ZHJhZ3xkcm9wL2lcbiAgICAgICAgICAgICAgICAgICwgZml4OiBmdW5jdGlvbiAoZXZlbnQsIG5ld0V2ZW50LCB0eXBlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgbmV3RXZlbnQucmlnaHRDbGljayA9IGV2ZW50LndoaWNoID09PSAzIHx8IGV2ZW50LmJ1dHRvbiA9PT0gMlxuICAgICAgICAgICAgICAgICAgICAgIG5ld0V2ZW50LnBvcyA9IHsgeDogMCwgeTogMCB9XG4gICAgICAgICAgICAgICAgICAgICAgaWYgKGV2ZW50LnBhZ2VYIHx8IGV2ZW50LnBhZ2VZKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdFdmVudC5jbGllbnRYID0gZXZlbnQucGFnZVhcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld0V2ZW50LmNsaWVudFkgPSBldmVudC5wYWdlWVxuICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZXZlbnQuY2xpZW50WCB8fCBldmVudC5jbGllbnRZKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdFdmVudC5jbGllbnRYID0gZXZlbnQuY2xpZW50WCArIGRvYy5ib2R5LnNjcm9sbExlZnQgKyByb290LnNjcm9sbExlZnRcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld0V2ZW50LmNsaWVudFkgPSBldmVudC5jbGllbnRZICsgZG9jLmJvZHkuc2Nyb2xsVG9wICsgcm9vdC5zY3JvbGxUb3BcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgaWYgKG92ZXJPdXRSZWdleC50ZXN0KHR5cGUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdFdmVudC5yZWxhdGVkVGFyZ2V0ID0gZXZlbnQucmVsYXRlZFRhcmdldFxuICAgICAgICAgICAgICAgICAgICAgICAgICB8fCBldmVudFsodHlwZSA9PSAnbW91c2VvdmVyJyA/ICdmcm9tJyA6ICd0bycpICsgJ0VsZW1lbnQnXVxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbW91c2VQcm9wc1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAsIHsgLy8gbW91c2Ugd2hlZWwgZXZlbnRzXG4gICAgICAgICAgICAgICAgICAgIHJlZzogL21vdXNlLiood2hlZWx8c2Nyb2xsKS9pXG4gICAgICAgICAgICAgICAgICAsIGZpeDogZnVuY3Rpb24gKCkgeyByZXR1cm4gbW91c2VXaGVlbFByb3BzIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICwgeyAvLyBUZXh0RXZlbnRcbiAgICAgICAgICAgICAgICAgICAgcmVnOiAvXnRleHQvaVxuICAgICAgICAgICAgICAgICAgLCBmaXg6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIHRleHRQcm9wcyB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAsIHsgLy8gdG91Y2ggYW5kIGdlc3R1cmUgZXZlbnRzXG4gICAgICAgICAgICAgICAgICAgIHJlZzogL150b3VjaHxeZ2VzdHVyZS9pXG4gICAgICAgICAgICAgICAgICAsIGZpeDogZnVuY3Rpb24gKCkgeyByZXR1cm4gdG91Y2hQcm9wcyB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAsIHsgLy8gbWVzc2FnZSBldmVudHNcbiAgICAgICAgICAgICAgICAgICAgcmVnOiAvXm1lc3NhZ2UkL2lcbiAgICAgICAgICAgICAgICAgICwgZml4OiBmdW5jdGlvbiAoKSB7IHJldHVybiBtZXNzYWdlUHJvcHMgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgLCB7IC8vIHBvcHN0YXRlIGV2ZW50c1xuICAgICAgICAgICAgICAgICAgICByZWc6IC9ecG9wc3RhdGUkL2lcbiAgICAgICAgICAgICAgICAgICwgZml4OiBmdW5jdGlvbiAoKSB7IHJldHVybiBzdGF0ZVByb3BzIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICwgeyAvLyBldmVyeXRoaW5nIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgcmVnOiAvLiovXG4gICAgICAgICAgICAgICAgICAsIGZpeDogZnVuY3Rpb24gKCkgeyByZXR1cm4gY29tbW9uUHJvcHMgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIF1cbiAgICAgICAgICAsIHR5cGVGaXhlck1hcCA9IHt9IC8vIHVzZWQgdG8gbWFwIGV2ZW50IHR5cGVzIHRvIGZpeGVyIGZ1bmN0aW9ucyAoYWJvdmUpLCBhIGJhc2ljIGNhY2hlIG1lY2hhbmlzbVxuXG4gICAgICAgICAgLCBFdmVudCA9IGZ1bmN0aW9uIChldmVudCwgZWxlbWVudCwgaXNOYXRpdmUpIHtcbiAgICAgICAgICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm5cbiAgICAgICAgICAgICAgZXZlbnQgPSBldmVudCB8fCAoKGVsZW1lbnQub3duZXJEb2N1bWVudCB8fCBlbGVtZW50LmRvY3VtZW50IHx8IGVsZW1lbnQpLnBhcmVudFdpbmRvdyB8fCB3aW4pLmV2ZW50XG4gICAgICAgICAgICAgIHRoaXMub3JpZ2luYWxFdmVudCA9IGV2ZW50XG4gICAgICAgICAgICAgIHRoaXMuaXNOYXRpdmUgICAgICAgPSBpc05hdGl2ZVxuICAgICAgICAgICAgICB0aGlzLmlzQmVhbiAgICAgICAgID0gdHJ1ZVxuXG4gICAgICAgICAgICAgIGlmICghZXZlbnQpIHJldHVyblxuXG4gICAgICAgICAgICAgIHZhciB0eXBlICAgPSBldmVudC50eXBlXG4gICAgICAgICAgICAgICAgLCB0YXJnZXQgPSBldmVudC50YXJnZXQgfHwgZXZlbnQuc3JjRWxlbWVudFxuICAgICAgICAgICAgICAgICwgaSwgbCwgcCwgcHJvcHMsIGZpeGVyXG5cbiAgICAgICAgICAgICAgdGhpcy50YXJnZXQgPSB0YXJnZXQgJiYgdGFyZ2V0Lm5vZGVUeXBlID09PSAzID8gdGFyZ2V0LnBhcmVudE5vZGUgOiB0YXJnZXRcblxuICAgICAgICAgICAgICBpZiAoaXNOYXRpdmUpIHsgLy8gd2Ugb25seSBuZWVkIGJhc2ljIGF1Z21lbnRhdGlvbiBvbiBjdXN0b20gZXZlbnRzLCB0aGUgcmVzdCBleHBlbnNpdmUgJiBwb2ludGxlc3NcbiAgICAgICAgICAgICAgICBmaXhlciA9IHR5cGVGaXhlck1hcFt0eXBlXVxuICAgICAgICAgICAgICAgIGlmICghZml4ZXIpIHsgLy8gaGF2ZW4ndCBlbmNvdW50ZXJlZCB0aGlzIGV2ZW50IHR5cGUgYmVmb3JlLCBtYXAgYSBmaXhlciBmdW5jdGlvbiBmb3IgaXRcbiAgICAgICAgICAgICAgICAgIGZvciAoaSA9IDAsIGwgPSB0eXBlRml4ZXJzLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZUZpeGVyc1tpXS5yZWcudGVzdCh0eXBlKSkgeyAvLyBndWFyYW50ZWVkIHRvIG1hdGNoIGF0IGxlYXN0IG9uZSwgbGFzdCBpcyAuKlxuICAgICAgICAgICAgICAgICAgICAgIHR5cGVGaXhlck1hcFt0eXBlXSA9IGZpeGVyID0gdHlwZUZpeGVyc1tpXS5maXhcbiAgICAgICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcHJvcHMgPSBmaXhlcihldmVudCwgdGhpcywgdHlwZSlcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSBwcm9wcy5sZW5ndGg7IGktLTspIHtcbiAgICAgICAgICAgICAgICAgIGlmICghKChwID0gcHJvcHNbaV0pIGluIHRoaXMpICYmIHAgaW4gZXZlbn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VnRW50cnkgPSAoZnVuY3Rpb24gKCkge1xuICAgICAgICAvLyBlYWNoIGhhbmRsZXIgaXMgd3JhcHBlZCBzbyB3ZSBjYW4gaGFuZGxlIGRlbGVnYXRpb24gYW5kIGN1c3RvbSBldmVudHNcbiAgICAgICAgdmFyIHdyYXBwZWRIYW5kbGVyID0gZnVuY3Rpb24gKGVsZW1lbnQsIGZuLCBjb25kaXRpb24sIGFyZ3MpIHtcbiAgICAgICAgICAgIHZhciBjYWxsID0gZnVuY3Rpb24gKGV2ZW50LCBlYXJncykge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIGZuLmFwcGx5KGVsZW1lbnQsIGFyZ3MgPyBzbGljZS5jYWxsKGVhcmdzLCBldmVudCA/IDAgOiAxKS5jb25jYXQoYXJncykgOiBlYXJncylcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICwgZmluZFRhcmdldCA9IGZ1bmN0aW9uIChldmVudCwgZXZlbnRFbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gZm4uX19iZWFuRGVsID8gZm4uX19iZWFuRGVsLmZ0KGV2ZW50LnRhcmdldCwgZWxlbWVudCkgOiBldmVudEVsZW1lbnRcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICwgaGFuZGxlciA9IGNvbmRpdGlvblxuICAgICAgICAgICAgICAgICAgPyBmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICB2YXIgdGFyZ2V0ID0gZmluZFRhcmdldChldmVudCwgdGhpcykgLy8gZGVsZWF0ZWQgZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgICBpZiAoY29uZGl0aW9uLmFwcGx5KHRhcmdldCwgYXJndW1lbnRzKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGV2ZW50KSBldmVudC5jdXJyZW50VGFyZ2V0ID0gdGFyZ2V0XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FsbChldmVudCwgYXJndW1lbnRzKVxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgOiBmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICBpZiAoZm4uX19iZWFuRGVsKSBldmVudCA9IGV2ZW50LmNsb25lKGZpbmRUYXJnZXQoZXZlbnQpKSAvLyBkZWxlZ2F0ZWQgZXZlbnQsIGZpeCB0aGUgZml4XG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNhbGwoZXZlbnQsIGFyZ3VtZW50cylcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgaGFuZGxlci5fX2JlYW5EZWwgPSBmbi5fX2JlYW5EZWxcbiAgICAgICAgICAgIHJldHVybiBoYW5kbGVyXG4gICAgICAgICAgfVxuXG4gICAgICAgICwgUmVnRW50cnkgPSBmdW5jdGlvbiAoZWxlbWVudCwgdHlwZSwgaGFuZGxlciwgb3JpZ2luYWwsIG5hbWVzcGFjZXMsIGFyZ3MsIHJvb3QpIHtcbiAgICAgICAgICAgIHZhciBjdXN0b21UeXBlICAgICA9IGN1c3RvbUV2ZW50c1t0eXBlXVxuICAgICAgICAgICAgICAsIGlzTmF0aXZlXG5cbiAgICAgICAgICAgIGlmICh0eXBlID09ICd1bmxvYWQnKSB7XG4gICAgICAgICAgICAgIC8vIHNlbGYgY2xlYW4tdXBcbiAgICAgICAgICAgICAgaGFuZGxlciA9IG9uY2UocmVtb3ZlTGlzdGVuZXIsIGVsZW1lbnQsIHR5cGUsIGhhbmRsZXIsIG9yaWdpbmFsKVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoY3VzdG9tVHlwZSkge1xuICAgICAgICAgICAgICBpZiAoY3VzdG9tVHlwZS5jb25kaXRpb24pIHtcbiAgICAgICAgICAgICAgICBoYW5kbGVyID0gd3JhcHBlZEhhbmRsZXIoZWxlbWVudCwgaGFuZGxlciwgY3Vz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gICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIGkgPSAwLCBsLCBsaXN0ID0gbWFwW3BmeCArIHR5cGVdLCBhbGwgPSBlbGVtZW50ID09ICcqJ1xuICAgICAgICAgICAgICAgIGlmICghbGlzdCkgcmV0dXJuXG4gICAgICAgICAgICAgICAgZm9yIChsID0gbGlzdC5sZW5ndGg7IGkgPCBsOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgIGlmICgoYWxsIHx8IGxpc3RbaV0ubWF0Y2hlcyhlbGVtZW50LCBvcmlnaW5hbCwgaGFuZGxlcikpICYmICFmbihsaXN0W2ldLCBsaXN0LCBpLCB0eXBlKSkgcmV0dXJuXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAsIGhhcyA9IGZ1bmN0aW9uIChlbGVtZW50LCB0eXBlLCBvcmlnaW5hbCwgcm9vdCkge1xuICAgICAgICAgICAgICAvLyB3ZSdyZSBub3QgdXNpbmcgZm9yQWxsIGhlcmUgc2ltcGx5IGJlY2F1c2UgaXQncyBhIGJpdCBzbG93ZXIgYW5kIHRoaXNcbiAgICAgICAgICAgICAgLy8gbmVlZHMgdG8gYmUgZmFzdFxuICAgICAgICAgICAgICB2YXIgaSwgbGlzdCA9IG1hcFsocm9vdCA/ICdyJyA6ICckJykgKyB0eXBlXVxuICAgICAgICAgICAgICBpZiAobGlzdCkge1xuICAgICAgICAgICAgICAgIGZvciAoaSA9IGxpc3QubGVuZ3RoOyBpLS07KSB7XG4gICAgICAgICAgICAgICAgICBpZiAoIWxpc3RbaV0ucm9vdCAmJiBsaXN0W2ldLm1hdGNoZXMoZWxlbWVudCwgb3JpZ2luYWwsIG51bGwpKSByZXR1cm4gdHJ1ZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICByZXR1cm4gZmFsc2VcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICwgZ2V0ID0gZnVuY3Rpb24gKGVsZW1lbnQsIHR5cGUsIG9yaWdpbmFsLCByb290KSB7XG4gICAgICAgICAgICAgIHZhciBlbnRyaWVzID0gW11cbiAgICAgICAgICAgICAgZm9yQWxsKGVsZW1lbnQsIHR5cGUsIG9yaWdpbmFsLCBudWxsLCByb290LCBmdW5jdGlvbiAoZW50cnkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZW50cmllcy5wdXNoKGVudHJ5KVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICByZXR1cm4gZW50cmllc1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgLCBwdXQgPSBmdW5jdGlvbiAoZW50cnkpIHtcbiAgICAgICAgICAgICAgdmFyIGhhcyA9ICFlbnRyeS5yb290ICYmICF0aGlzLmhhcyhlbnRyeS5lbGVtZW50LCBlbnRyeS50eXBlLCBudWxsLCBmYWxzZSlcbiAgICAgICAgICAgICAgICAsIGtleSA9IChlbnRyeS5yb290ID8gJ3InIDogJyQnKSArIGVudHJ5LnR5cGVcbiAgICAgICAgICAgICAgOyhtYXBba2V5XSB8fCAobWFwW2tleV0gPSBbXSkpLnB1c2goZW50cnkpXG4gICAgICAgICAgICAgIHJldHVybiBoYXNcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICwgZGVsID0gZnVuY3Rpb24gKGVudHJ5KSB7XG4gICAgICAgICAgICAgIGZvckFsbChlbnRyeS5lbGVtZW50LCBlbnRyeS50eXBlLCBudWxsLCBlbnRyeS5oYW5kbGVyLCBlbnRyeS5yb290LCBmdW5jdGlvbiAoZW50cnksIGxpc3QsIGkpIHtcbiAgICAgICAgICAgICAgICBsaXN0LnNwbGljZShpLCAxKVxuICAgICAgICAgICAgICAgIGVudHJ5LnJlbW92ZWQgPSB0cnVlXG4gICAgICAgICAgICAgICAgaWYgKGxpc3QubGVuZ3RoID09PSAwKSBkZW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gICByZWdpc3RyeS5wdXQoZW50cnkgPSBuZXcgUmVnRW50cnkoXG4gICAgICAgICAgICAgICAgICBlbGVtZW50XG4gICAgICAgICAgICAgICAgLCBjdXN0b20gfHwgdHlwZVxuICAgICAgICAgICAgICAgICwgZnVuY3Rpb24gKGV2ZW50KSB7IC8vIGhhbmRsZXJcbiAgICAgICAgICAgICAgICAgICAgcm9vdExpc3RlbmVyLmNhbGwoZWxlbWVudCwgZXZlbnQsIGN1c3RvbSlcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAsIHJvb3RMaXN0ZW5lclxuICAgICAgICAgICAgICAgICwgbnVsbFxuICAgICAgICAgICAgICAgICwgbnVsbFxuICAgICAgICAgICAgICAgICwgdHJ1ZSAvLyBpcyByb290XG4gICAgICAgICAgICAgICkpXG4gICAgICAgICAgICAgIGlmIChjdXN0b20gJiYgZWxlbWVudFsnX29uJyArIGN1c3RvbV0gPT0gbnVsbCkgZWxlbWVudFsnX29uJyArIGN1c3RvbV0gPSAwXG4gICAgICAgICAgICAgIGVudHJ5LnRhcmdldC5hdHRhY2hFdmVudCgnb24nICsgZW50cnkuZXZlbnRUeXBlLCBlbnRyeS5oYW5kbGVyKVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgZW50cnkgPSByZWdpc3RyeS5nZXQoZWxlbWVudCwgY3VzdG9tIHx8IHR5cGUsIHJvb3RMaXN0ZW5lciwgdHJ1ZSlbMF1cbiAgICAgICAgICAgICAgaWYgKGVudHJ5KSB7XG4gICAgICAgICAgICAgICAgZW50cnkudGFyZ2V0LmRldGFjaEV2ZW50KCdvbicgKyBlbnRyeS5ldmVudFR5cGUsIGVudHJ5LmhhbmRsZXIpXG4gICAgICAgICAgICAgICAgcmVnaXN0cnkuZGVsKGVudHJ5KVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgLCBvbmNlID0gZnVuY3Rpb24gKHJtLCBlbG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eShrKSkgb2ZmKGVsZW1lbnQsIGssIHR5cGVTcGVjW2tdKVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBlbGVtZW50XG4gICAgICB9XG5cbiAgICAgIC8qKlxuICAgICAgICAqIG9uKGVsZW1lbnQsIGV2ZW50VHlwZShzKVssIHNlbGVjdG9yXSwgaGFuZGxlclssIGFyZ3MgXSwgW29wdGlvbnNdKVxuICAgICAgICAqL1xuICAgICwgb24gPSBmdW5jdGlvbihlbGVtZW50LCBldmVudHMsIHNlbGVjdG9yLCBmbikge1xuICAgICAgICB2YXIgZGVmYXVsdE9wdHMgPSB7XG4gICAgICAgICAgICB1c2VDYXB0dXJlOiBmYWxzZVxuICAgICAgICAgIH0sXG4gICAgICAgICAgb3JpZ2luYWxGbiwgdHlwZSwgdHlwZXMsIGksIGFyZ3MsIGVudHJ5LCBmaXJzdCwgb3B0c1xuXG4gICAgICAgIC8vVE9ETzogdGhlIHVuZGVmaW5lZCBjaGVjayBtZWFucyB5b3UgY2FuJ3QgcGFzcyBhbiAnYXJncycgYXJndW1lbnQsIGZpeCB0aGlzIHBlcmhhcHM/XG4gICAgICAgIGlmIChzZWxlY3RvciA9PT0gdW5kZWZpbmVkICYmIHR5cGVvZiBldmVudHMgPT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAvL1RPRE86IHRoaXMgY2FuJ3QgaGFuZGxlIGRlbGVnYXRlZCBldmVudHNcbiAgICAgICAgICBmb3IgKHR5cGUgaW4gZXZlbnRzKSB7XG4gICAgICAgICAgICBpZiAoZXZlbnRzLmhhc093blByb3BlcnR5KHR5cGUpKSB7XG4gICAgICAgICAgICAgIG9uLmNhbGwodGhpcywgZWxlbWVudCwgdHlwZSwgZXZlbnRzW3R5cGVdKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm5cbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghaXNGdW5jdGlvbihzZWxlY3RvcikpIHt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c3BlY2lmaWVycz9cbiAgICAgICAgKi9cbiAgICAsIGNsb25lID0gZnVuY3Rpb24gKGVsZW1lbnQsIGZyb20sIHR5cGUpIHtcbiAgICAgICAgdmFyIGhhbmRsZXJzID0gcmVnaXN0cnkuZ2V0KGZyb20sIHR5cGUsIG51bGwsIGZhbHNlKVxuICAgICAgICAgICwgbCA9IGhhbmRsZXJzLmxlbmd0aFxuICAgICAgICAgICwgaSA9IDBcbiAgICAgICAgICAsIGFyZ3MsIGJlYW5EZWxcblxuICAgICAgICBmb3IgKDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgIGlmIChoYW5kbGVyc1tpXS5vcmlnaW5hbCkge1xuICAgICAgICAgICAgYXJncyA9IFsgZWxlbWVudCwgaGFuZGxlcnNbaV0udHlwZSBdXG4gICAgICAgICAgICBpZiAoYmVhbkRlbCA9IGhhbmRsZXJzW2ldLmhhbmRsZXIuX19iZWFuRGVsKSBhcmdzLnB1c2goYmVhbkRlbC5zZWxlY3RvcilcbiAgICAgICAgICAgIGFyZ3MucHVzaChoYW5kbGVyc1tpXS5vcmlnaW5hbClcbiAgICAgICAgICAgIG9uLmFwcGx5KG51bGwsIGFyZ3MpXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBlbGVtZW50XG4gICAgICB9XG5cbiAgICAsIGJlYW4gPSB7XG4gICAgICAgICAgJ29uJyAgICAgICAgICAgICAgICA6IG9uXG4gICAgICAgICwgJ2FkZCcgICAgICAgICAgICAgICA6IGFkZFxuICAgICAgICAsICdvbmUnICAgICAgICAgICAgICAgOiBvbmVcbiAgICAgICAgLCAnb2ZmJyAgICAgICAgICAgICAgIDogb2ZmXG4gICAgICAgICwgJ3JlbW92ZScgICAgICAgICAgICA6IG9mZlxuICAgICAgICAsICdjbG9uZScgICAgICAgICAgICAgOiBjbG9uZVxuICAgICAgICAsICdmaXJlJyAgICAgICAgICAgICAgOiBmaXJlXG4gICAgICAgICwgJ0V2ZW50JyAgICAgICAgIC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AnJyApO1xuICAgICAgfSxcblxuICAgICAgYXJySW5kZXhPZiA9IEFycmF5WyBwcm90b1Byb3AgXS5pbmRleE9mIHx8IGZ1bmN0aW9uKCBpdGVtICkge1xuICAgICAgICBmb3IgKCB2YXIgaSA9IDA7IGkgPCB0aGlzLmxlbmd0aDsgaSsrICkge1xuICAgICAgICAgIGlmICggaSBpbiB0aGlzICYmIHRoaXNbIGkgXSA9PT0gaXRlbSApIHtcbiAgICAgICAgICAgIHJldHVybiBpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gLTE7XG4gICAgICB9LFxuXG4gICAgICBET01FeCA9IGZ1bmN0aW9uKCB0eXBlLCBtZXNzYWdlICkge1xuICAgICAgICB0aGlzLm5hbWUgICAgPSB0eXBlO1xuICAgICAgICB0aGlzLmNvZGUgICAgPSBET01FeGNlcHRpb25bIHR5cGUgXTtcbiAgICAgICAgdGhpcy5tZXNzYWdlID0gbWVzc2FnZTtcbiAgICAgIH0sXG5cbiAgICAgIGNoZWNrVG9rZW5BbmRHZXRJbmRleCA9IGZ1bmN0aW9uKCBjbGFzc0xpc3QsIHRva2VuICkge1xuICAgICAgICBpZiAoIHRva2VuID09PSAnJyApIHtcbiAgICAgICAgICB0aHJvdyBuZXcgRE9NRXgoXG4gICAgICAgICAgICAnU1lOVEFYX0VSUicsXG4gICAgICAgICAgICAnQW4gaW52YWxpZCBvciBpbGxlZ2FsIHN0cmluZyB3YXMgc3BlY2lmaWVkJ1xuICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCAvXFxzLy50ZXN0KCB0b2tlbiApICkge1xuICAgICAgICAgIHRocm93IG5ldyBET01FeChcbiAgICAgICAgICAgICdJTlZBTElEX0NIQVJBQ1RFUl9FUlInLFxuICAgICAgICAgICAgJ1N0cmluZyBjb250YWlucyBhbiBpbnZhbGlkIGNoYXJhY3RlcidcbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBh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dG9rZW4gKz0gJyc7XG4gICAgICByZXR1cm4gY2hlY2tUb2tlbkFuZEdldEluZGV4KCB0aGlzLCB0b2tlbiApICE9PSAtMTtcbiAgICB9O1xuXG4gICAgY2xhc3NMaXN0UHJvdG8uYWRkID0gZnVuY3Rpb24oKSB7XG4gICAgICB2YXJcbiAgICAgICAgdG9rZW5zICA9IGFyZ3VtZW50cyxcbiAgICAgICAgaXRlciAgICA9IDAsXG4gICAgICAgIGxlbiAgICAgPSB0b2tlbnMubGVuZ3RoLFxuICAgICAgICB1cGRhdGVkID0gZmFsc2UsXG4gICAgICAgIHRva2VuO1xuXG4gICAgICBkbyB7XG4gICAgICAgIHRva2VuID0gdG9rZW5zWyBpdGVyIF0gKyAnJztcbiAgICAgICAgaWYgKCBjaGVja1Rva2VuQW5kR2V0SW5kZXgoIHRoaXMsIHRva2VuICkgPT09IC0xICkge1xuICAgICAgICAgIHRoaXMucHVzaCggdG9rZW4gKTtcbiAgICAgICAgICB1cGRhdGVkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB3aGlsZSAoICsraXRlciA8IGxlbiApO1xuXG4gICAgICBpZiAoIHVwZGF0ZWQgKSB7XG4gICAgICAgIHRoaXMuX3VwZGF0ZUNsYXNzTmFtZSgpO1xuICAgICAgfVxuICAgIH07XG5cbiAgICBjbGFzc0xpc3RQcm90by5yZW1vdmUgPSBmdW5jdGlvbigpIHtcbiAgICAgIHZhclxuICAgICAgICB0b2tlbnMgID0gYXJndW1lbnRzLFxuICAgICAgICBpdGVyICAgID0gMCxcbiAgICAgICAgbGVuICAgICA9IHRva2Vucy5sZW5ndGgsXG4gICAgICAgIHVwZGF0ZWQgPSBmYWxzZSxcbiAgICAgICAgdG9rZW4sXG4gICAgICAgIGluZGV4O1xuXG4gICAgICBkbyB7XG4gICAgICAgIHRva2VuID0gdG9rZW5zWyBpdGVyIF0gKyAnJztcbiAgICAgICAgaW5kZXggPSBjaGVja1Rva2VuQW5kR2V0S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zZTogcGFyc2UsXG4gIHByZXR0eVByaW50OiBwcmV0dHlQcmludFxufVxuIiwicmVxdWlyZSggJy4vbGliL3NoaW1zL2N1c3RvbS1ldmVudCcgKVxuXG52YXIgYmVhbiA9IHJlcXVpcmUoICdiZWFuJyApXG52YXIga2V5ICA9IHJlcXVpcmUoICdrZXltYXN0ZXInICkgXG52YXIgYW5pbWF0aW9uRXZlbnQgICAgPSByZXF1aXJlKCAnLi9saWIvYW5pbWF0aW9uLWV2ZW50cycgKVxudmFyIHBhZ2UgICAgICAgICAgICAgID0gcmVxdWlyZSggJy4vbGliL3BhZ2UnIClcbnZhciB0YXAgICAgICAgICAgICAgICA9IHJlcXVpcmUoICcuL2xpYi90YXAtZXZlbnRzJyApXG52YXIgZGVib3VuY2UgICAgICAgICAgPSByZXF1aXJlKCAnLi9saWIvZGVib3VuY2UnIClcbnZhciB0aHJvdHRsZSAgICAgICAgICA9IHJlcXVpcmUoICcuL2xpYi90aHJvdHRsZScgKVxudmFyIGRlbGF5ICAgICAgICAgICAgID0gcmVxdWlyZSggJy4vbGliL2RlbGF5JyApXG52YXIgcmVwZWF0ICAgICAgICAgICAgPSByZXF1aXJlKCAnLi9saWIvcmVwZWF0JyApXG52YXIgYnViYmxlRm9ybUV2ZW50cyAgPSByZXF1aXJlKCAnLi9saWIvYnViYmxlLWZvcm0tZXZlbnRzJyApXG52YXIgc3VibWl0ICAgICAgICAgICAgPSByZXF1aXJlKCAnLi9saWIvc3VibWl0JyApXG52YXIgc2Nyb2xsICAgICAgICAgICAgPSByZXF1aXJlKCAnLi9saWIvc2Nyb2xsJyApXG52YXIgcmVzaXplICAgICAgICAgICAgPSByZXF1aXJlKCAnLi9saWIvcmVzaXplJyApXG52YXIgY2FsbGJhY2tNYW5hZ2VyICAgPSByZXF1aXJlKCAnLi9saWIvY2FsbGJhY2stbWFuYWdlcicgKVxudmFyIG1lZGlhICAgICAgICAgICAgID0gcmVxdWlyZSggJy4vbGliL21lZGlhJyApXG5cbnZh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W5kLUFsb25lLXZzLi1Gb3JtYXQtU3R5bGVzXG4gICAgICBzd2l0Y2ggKHRva2VuKSB7XG4gICAgICAgIC8vIG1zXG4gICAgICAgIGNhc2UgJ1MnOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQubWlsbGlzZWNvbmQpO1xuICAgICAgICBjYXNlICd1JzpcbiAgICAgICAgLy8gZmFsbHMgdGhyb3VnaFxuICAgICAgICBjYXNlICdTU1MnOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQubWlsbGlzZWNvbmQsIDMpO1xuICAgICAgICAvLyBzZWNvbmRzXG4gICAgICAgIGNhc2UgJ3MnOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQuc2Vjb25kKTtcbiAgICAgICAgY2FzZSAnc3MnOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQuc2Vjb25kLCAyKTtcbiAgICAgICAgLy8gbWludXRlc1xuICAgICAgICBjYXNlICdtJzpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0Lm1pbnV0ZSk7XG4gICAgICAgIGNhc2UgJ21tJzpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0Lm1pbnV0ZSwgMik7XG4gICAgICAgIC8vIGhvdXJzXG4gICAgICAgIGNhc2UgJ2gnOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQuaG91ciAlIDEyID09PSAwID8gMTIgOiBkdC5ob3VyICUgMTIpO1xuICAgICAgICBjYXNlICdoaCc6XG4gICAgICAgICAgcmV0dXJuIF90aGlzLm51bShkdC5ob3VyICUgMTIgPT09IDAgPyAxMiA6IGR0LmhvdXIgJSAxMiwgMik7XG4gICAgICAgIGNhc2UgJ0gnOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQuaG91cik7XG4gICAgICAgIGNhc2UgJ0hIJzpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LmhvdXIsIDIpO1xuICAg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BsaWtlICdUJ1xuICAgICAgICAgIHJldHVybiB3ZWVrZGF5KCduYXJyb3cnLCBmYWxzZSk7XG4gICAgICAgIC8vIG1vbnRocyAtIHN0YW5kYWxvbmVcbiAgICAgICAgY2FzZSAnTCc6XG4gICAgICAgICAgLy8gbGlrZSAxXG4gICAgICAgICAgcmV0dXJuIG91dHB1dENhbCA/IHN0cmluZyh7IG1vbnRoOiAnbnVtZXJpYycsIGRheTogJ251bWVyaWMnIH0sICdtb250aCcpIDogX3RoaXMubnVtKGR0Lm1vbnRoKTtcbiAgICAgICAgY2FzZSAnTEwnOlxuICAgICAgICAgIC8vIGxpa2UgMDEsIGRvZXNuJ3Qgc2VlbSB0byB3b3JrXG4gICAgICAgICAgcmV0dXJuIG91dHB1dENhbCA/IHN0cmluZyh7IG1vbnRoOiAnMi1kaWdpdCcsIGRheTogJ251bWVyaWMnIH0sICdtb250aCcpIDogX3RoaXMubnVtKGR0Lm1vbnRoLCAyKTtcbiAgICAgICAgY2FzZSAnTExMJzpcbiAgICAgICAgICAvLyBsaWtlIEphblxuICAgICAgICAgIHJldHVybiBtb250aCgnc2hvcnQnLCB0cnVlKTtcbiAgICAgICAgY2FzZSAnTExMTCc6XG4gICAgICAgICAgLy8gbGlrZSBKYW51YXJ5XG4gICAgICAgICAgcmV0dXJuIG1vbnRoKCdsb25nJywgdHJ1ZSk7XG4gICAgICAgIGNhc2UgJ0xMTExMJzpcbiAgICAgICAgICAvLyBsaWtlIEpcbiAgICAgICAgICByZXR1cm4gbW9udGgoJ25hcnJvdycsIHRydWUpO1xuICAgICAgICAvLyBtb250aHMgLSBmb3JtYXRcbiAgICAgICAgY2FzZSAnTSc6XG4gICAgICAgICAgLy8gbGlrZSAxXG4gICAgICAgICAgcmV0dXJuIG91dHB1dENhbCA/IHN0cmluZyh7IG1vbnRoOiAnbnVtZXJpYycgfSwgJ21vbnRoJykgOiBfdGhpcy5udW0oZHQubW9udGgpO1xuICAgICAgICBjYXNlICdNTSc6XG4gICAgICAgICAgLy8gbGlrZSAwMVxuICAgICAgICAgIHJldHVybiBvdXRwdXRDYWwgPyBzdHJpbmcoeyBtb250aDogJzItZGlnaXQnIH0sICdtb250aCcpIDogX3RoaXMubnVtKGR0Lm1vbnRoLCAyKTtcbiAgICAgICAgY2FzZSAnTU1NJzpcbiAgICAgICAgICAvLyBsaWtlIEphblxuICAgICAgICAgIHJldHVybiBtb250aCgnc2hvcnQnLCBmYWxzZSk7XG4gICAgICAgIGNhc2UgJ01NTU0nOlxuICAgICAgICAgIC8vIGxpa2UgSmFudWFyeVxuICAgICAgICAgIHJldHVybiBtb250aCgnbG9uZycsIGZhbHNlKTtcbiAgICAgICAgY2FzZSAnTU1NTU0nOlxuICAgICAgICAgIC8vIGxpa2UgSlxuICAgICAgICAgIHJldHVybiBtb250aCgnbmFycm93JywgZmFsc2UpO1xuICAgICAgICAvLyB5ZWFyc1xuICAgICAgICBjYXNlICd5JzpcbiAgICAgICAgICAvLyBsaWtlIDIwMTRcbiAgICAgICAgICByZXR1cm4gb3V0cHV0Q2FsID8gc3RyaW5nKHsgeWVhcjogJ251bWVyaWMnIH0sICd5ZWFyJykgOiBfdGhpcy5udW0oZHQueWVhcik7XG4gICAgICAgIGNhc2UgJ3l5JzpcbiAgICAgICAgICAvLyBsaWtlIDE0XG4gICAgICAgICAgcmV0dXJuIG91dHB1dENhbCA/IHN0cmluZyh7IHllYXI6ICcyLWRpZ2l0JyB9LCAneWVhcicpIDogX3RoaXMubnVtKGR0LnllYXIudG9TdHJpbmcoKS5zbGljZSgtMiksIDIpO1xuICAgICAgICBjYXNlICd5eXl5JzpcbiAgICAgICAgICAvLyBsaWtlIDAwMTJcbiAgICAgICAgICByZXR1cm4gb3V0cHV0Q2FsID8gc3RyaW5nKHsgeWVhcjogJ251bWVyaWMnIH0sICd5ZWFyJykgOiBfdGhpcy5udW0oZHQueWVhciwgNCk7XG4gICAgICAgIGNhc2UgJ3l5eXl5eSc6XG4gICAgICAgICAgLy8gbGlrZSAwMDAwMTJcbiAgICAgICAgICByZXR1cm4gb3V0cHV0Q2FsID8gc3RyaW5nKHsgeWVhcjogJ251bWVyaWMnIH0sICd5ZWFyJykgOiBfdGhpcy5udW0oZHQueWVhciwgNik7XG4gICAgICAgIC8vIGVyYXNcbiAgICAgICAgY2FzZSAnRyc6XG4gICAgICAgICAgLy8gbGlrZSBBRFxuICAgICAgICAgIHJldHVybiBlcmEoJ3Nob3J0Jyk7XG4gICAgICAgIGNhc2UgJ0dHJzpcbiAgICAgICAgICAvLyBsaWtlIEFubm8gRG9taW5pXG4gICAgICAgICAgcmV0dXJuIGVyYSgnbG9uZycpO1xuICAgICAgICBjYXNlICdHR0dHRyc6XG4gICAgICAgICAgcmV0dXJuIGVyYSgnbmFycm93Jyk7XG4gICAgICAgIGNhc2UgJ2trJzpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LndlZWtZZWFyLnRvU3RyaW5nKCkuc2xpY2UoLTIpLCAyKTtcbiAgICAgICAgY2FzZSAna2trayc6XG4gICAgICAgICAgcmV0dXJuIF90aGlzLm51bShkdC53ZWVrWWVhciwgNCk7XG4gICAgICAgIGNhc2UgJ1cnOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQud2Vla051bWJlcik7XG4gICAgICAgIGNhc2UgJ1dXJzpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LndlZWtOdW1iZXIsIDIpO1xuICAgICAgICBjYXNlICdvJzpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0Lm9yZGluYWwpO1xuICAgICAgICBjYXNlICdvb28nOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQub3JkaW5hbCwgMyk7XG4gICAgICAgIGNhc2UgJ3EnOlxuICAgICAgICAgIC8vIGxpa2UgMVxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQucXVhcnRlcik7XG4gICAgICAgIGNhc2UgJ3FxJzpcbiAgICAgICAgICAvLyBsaWtlID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ICAgICAgaWYgKF9pMyA+PSBfaXRlcmF0b3IzLmxlbmd0aCkgYnJlYWs7XG4gICAgICAgIF9yZWY0ID0gX2l0ZXJhdG9yM1tfaTMrK107XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBfaTMgPSBfaXRlcmF0b3IzLm5leHQoKTtcbiAgICAgICAgaWYgKF9pMy5kb25lKSBicmVhaztcbiAgICAgICAgX3JlZjQgPSBfaTMudmFsdWU7XG4gICAgICB9XG5cbiAgICAgIHZhciBrID0gX3JlZjQ7XG5cbiAgICAgIGlmICh1bml0cy5pbmRleE9mKGspID49IDApIHtcbiAgICAgICAgbGFzdFVuaXQgPSBrO1xuXG4gICAgICAgIHZhciBvd24gPSAwO1xuXG4gICAgICAgIC8vIGFueXRoaW5nIHdlIGhhdmVuJ3QgYm9pbGVkIGRvd24geWV0IHNob3VsZCBnZXQgYm9pbGVkIHRvIHRoaXMgdW5pdFxuICAgICAgICBmb3IgKHZhciBhayBpbiBhY2N1bXVsYXRlZCkge1xuICAgICAgICAgIGlmIChhY2N1bXVsYXRlZC5oYXNPd25Qcm9wZXJ0eShhaykpIHtcbiAgICAgICAgICAgIG93biArPSB0aGlzLm1hdHJpeFtha11ba10gKiBhY2N1bXVsYXRlZFtha107XG4gICAgICAgICAgICBhY2N1bXVsYXRlZFtha10gPSAwO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHBsdXMgYW55dGhpbmcgdGhhdCdzIGFscmVhZHkgaW4gdGhpcyB1bml0XG4gICAgICAgIGlmIChpc051bWJlcih2YWxzW2tdKSkge1xuICAgICAgICAgIG93biArPSB2YWxzW2tdO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGkgPSBNYXRoLnRydW5jKG93bik7XG4gICAgICAgIGJ1aWx0W2tdID0gaTtcbiAgICAgICAgYWNjdW11bGF0ZWRba10gPSBvd24gLSBpO1xuXG4gICAgICAgIC8vIHBsdXMgYW55dGhpbmcgZnVydGhlciBkb3duIHR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jdGlvbiB1bml0YXRlKHQpIHtcbiAgICBpZiAodG9rZW4ubGl0ZXJhbCkge1xuICAgICAgcmV0dXJuIGxpdGVyYWwodCk7XG4gICAgfVxuICAgIHN3aXRjaCAodC52YWwpIHtcbiAgICAgIC8vIGVyYVxuICAgICAgY2FzZSAnRyc6XG4gICAgICAgIHJldHVybiBvbmVPZihsb2MuZXJhcygnc2hvcnQnLCBmYWxzZSksIDApO1xuICAgICAgY2FzZSAnR0cnOlxuICAgICAgICByZXR1cm4gb25lT2YobG9jLmVyYXMoJ2xvbmcnLCBmYWxzZSksIDApO1xuICAgICAgLy8geWVhcnNcbiAgICAgIGNhc2UgJ3knOlxuICAgICAgICByZXR1cm4gaW50VW5pdCgvXFxkezEsNn0vKTtcbiAgICAgIGNhc2UgJ3l5JzpcbiAgICAgICAgcmV0dXJuIGludFVuaXQodHdvVG9Gb3VyLCB1bnRydW5jYXRlWWVhcik7XG4gICAgICBjYXNlICd5eXl5JzpcbiAgICAgICAgcmV0dXJuIGludFVuaXQoZm91cik7XG4gICAgICBjYXNlICd5eXl5eSc6XG4gICAgICAgIHJldHVybiBpbnRVbml0KC9cXGR7NCw2fS8pO1xuICAgICAgY2FzZSAneXl5eXl5JzpcbiAgICAgICAgcmV0dXJuIGludFVuaXQoL1xcZHs2fS8pO1xuICAgICAgLy8gbW9udGhzXG4gICAgICBjYXNlICdNJzpcbiAgICAgICAgcmV0dXJuIGludFVuaXQob25lT3JUd28pO1xuICAgICAgY2FzZSAnTU0nOlxuICAgICAgICByZXR1cm4gaW50VW5pdCh0d28pO1xuICAgICAgY2FzZSAnTU1NJzpcbiAgICAgICAgcmV0dXJuIG9uZU9mKGxvYy5tb250aHMoJ3Nob3J0JywgZmFsc2UsIGZhbHNlKSwgMSk7XG4gICAgICBjYXNlICdNTU1NJzpcbiAgICAgICAgcmV0dXJuIG9uZU9mKGxvYy5tb250aHMoJ2xvbmcnLCBmYWxzZSwgZmFsc2UpLCAxKTtcbiAgICAgIGNhc2UgJ0wnOlxuICAgICAgICByZXR1cm4gaW50VW5pdChvbmVPclR3byk7XG4gICAgICBjYXNlICdMTCc6XG4gICAgICAgIHJldHVybiBpbnRVbml0KHR3byk7XG4gICAgICBjYXNlICdMTEwnOlxuICAgICAgICByZXR1cm4gb25lT2YobG9jLm1vbnRocygnc2hvcnQnLCB0cnVlLCBmYWxzZSksIDEpO1xuICAgICAgY2FzZSAnTExMTCc6XG4gICAgICAgIHJldHVybiBvbmVPZihsb2MubW9udGhzKCdsb25nJywgdHJ1ZSwgZmFsc2UpLCAxKTtcbiAgICAgIC8vIGRhdGVzXG4gICAgICBjYXNlICdkJzpcbiAgICAgICAgcmV0dXJuIGludFVuaXQob25lT3JUd28pO1xuICAgICAgY2FzZSAnZGQnOlxuICAgICAgICByZXR1cm4gaW50VW5pdCh0d28pO1xuICAgICAgLy8gb3JkaW5hbHNcbiAgICAgIGNhc2UgJ28nOlxuICAgICAgICByZXR1cm4gaW50VW5pdChvbmVUb1RocmVlKTtcbiAgICAgIGNhc2UgJ29vbyc6XG4gICAgICAgIHJldHVybiBpbnRVbml0KHRocmVlKTtcbiAgICAgIC8vIHRpbWVcbiAgICAgIGNhc2UgJ0hIJzpcbiAgICAgICAgcmV0dXJuIGludFVuaXQodHdvKTtcbiAgICAgIGNhc2UgJ0gnOlxuICAgICAgICByZXR1cm4gaW50VW5pdChvbmVPclR3byk7XG4gICAgICBjYXNlICdoaCc6XG4gICAgICAgIHJldHVybiBpbnRVbml0KHR3byk7XG4gICAgICBjYXNlICdoJzpcbiAgICAgICAgcmV0dXJuIGludFVuaXQob25lT3JUd28pO1xuICAgICAgY2FzZSAnbW0nOlxuICAgICAgICByZXR1cm4gaW50VW5pdCh0d28pO1xuICAgICAgY2FzZSAnbSc6XG4gICAgICAgIHJldHVybiBpbnRVbml0KG9uZU9yVHdvKTtcbiAgICAgIGNhc2UgJ3MnOlxuICAgICAgICByZXR1cm4gaW50VW5pdChvbmVPclR3byk7XG4gICAgICBjYXNlICdz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tb250aCA9IDE7XG4gICAgICAvLyBmYWxscyB0aHJvdWdoXG4gICAgICBjYXNlICdxdWFydGVycyc6XG4gICAgICBjYXNlICdtb250aHMnOlxuICAgICAgICBvLmRheSA9IDE7XG4gICAgICAvLyBmYWxscyB0aHJvdWdoXG4gICAgICBjYXNlICd3ZWVrcyc6XG4gICAgICBjYXNlICdkYXlzJzpcbiAgICAgICAgby5ob3VyID0gMDtcbiAgICAgIC8vIGZhbGxzIHRocm91Z2hcbiAgICAgIGNhc2UgJ2hvdXJzJzpcbiAgICAgICAgby5taW51dGUgPSAwO1xuICAgICAgLy8gZmFsbHMgdGhyb3VnaFxuICAgICAgY2FzZSAnbWludXRlcyc6XG4gICAgICAgIG8uc2Vjb25kID0gMDtcbiAgICAgIC8vIGZhbGxzIHRocm91Z2hcbiAgICAgIGNhc2UgJ3NlY29uZHMnOlxuICAgICAgICBvLm1pbGxpc2Vjb25kID0gMDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdtaWxsaXNlY29uZHMnOlxuICAgICAgICBicmVhaztcbiAgICAgIGRlZmF1bHQ6XG4gICAgICAgIHRocm93IG5ldyBJbnZhbGlkVW5pdEVycm9yKHVuaXQpO1xuICAgIH1cblxuICAgIGlmIChub3JtYWxpemVkVW5pdCA9PT0gJ3dlZWtzJykge1xuICAgICAgby53ZWVrZGF5ID0gMTtcbiAgICB9XG5cbiAgICBpZiAobm9ybWFsaXplZFVuaXQgPT09ICdxdWFydGVycycpIHtcbiAgICAgIHZhciBxID0gTWF0aC5jZWlsKHRoaXMubW9udGggLyAzKTtcbiAgICAgIG8ubW9udGggPSAocSAtIDEpICogMyArIDE7XG4gICAgfVxuXG4gICAgcmV0dXJuIHRoaXMuc2V0KG8pO1xuICB9O1xuXG4gIC8qKlxyXG4gICAqIFwiU2V0XCIgdGhpcyBEYXRlVGltZSB0byB0aGUgZW5kIChpLmUuIHRoZSBsYXN0IG1pbGxpc2Vjb25kKSBvZiBhIHVuaXQgb2YgdGlt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Oi8vZGV2ZWxvcGVyLm1vemlsbGEub3JnL2VuLVVTL2RvY3MvV2ViL0phdmFTY3JpcHQvUmVmZXJlbmNlL0dsb2JhbF9PYmplY3RzL0RhdGVUaW1lRm9ybWF0L2Zvcm1hdFRvUGFydHNcclxuICAgKiBAcGFyYW0gb3B0cyB7T2JqZWN0fSAtIEludGwuRGF0ZVRpbWVGb3JtYXQgY29uc3RydWN0b3Igb3B0aW9ucywgc2FtZSBhcyBgdG9Mb2NhbGVTdHJpbmdgLlxyXG4gICAqIEBleGFtcGxlIERhdGVUaW1lLmxvY2FsKCkudG9Mb2NhbGVTdHJpbmcoKTsgLy89PiBbXHJcbiAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLz0+ICAgeyB0eXBlOiAnZGF5JywgdmFsdWU6ICcyNScgfSxcclxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vPT4gICB7IHR5cGU6ICdsaXRlcmFsJywgdmFsdWU6ICcvJyB9LFxyXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy89PiAgIHsgdHlwZTogJ21vbnRoJywgdmFsdWU6ICcwNScgfSxcclxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vPT4gICB7IHR5cGU6ICdsaXRlcmFsJywgdmFsdWU6ICcvJyB9LFxyXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy89PiAgIHsgdHlwZTogJ3llYXInLCB2YWx1ZTogJzE5ODInIH1cclxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vPT4gXVxyXG4gICAqL1xuXG5cbiAgRGF0ZVRpbWUucHJvdG90eXBlLnRvTG9jYWxlUGFydHMgPSBmdW5jdGlvbiB0b0xvY2FsZVBhcnRzKCkge1xuICAgIHZhciBvcHRzID0gYXJndW1lbnRzLmxlbmd0aCA+IDAgJiYgYXJndW1lbnRzWzBdICE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YXMgdGhlIHJlcXVlc3QgYm9keSwgZGVmYXVsdGluZyB0aGUgYC50eXBlKClgIHRvIFwianNvblwiIHdoZW5cbiAqIGFuIG9iamVjdCBpcyBnaXZlbi5cbiAqXG4gKiBFeGFtcGxlczpcbiAqXG4gKiAgICAgICAvLyBtYW51YWwganNvblxuICogICAgICAgcmVxdWVzdC5wb3N0KCcvdXNlcicpXG4gKiAgICAgICAgIC50eXBlKCdqc29uJylcbiAqICAgICAgICAgLnNlbmQoJ3tcIm5hbWVcIjpcInRqXCJ9JylcbiAqICAgICAgICAgLmVuZChjYWxsYmFjaylcbiAqXG4gKiAgICAgICAvLyBhdXRvIGpzb25cbiAqICAgICAgIHJlcXVlc3QucG9zdCgnL3VzZXInKVxuICogICAgICAgICAuc2VuZCh7IG5hbWU6ICd0aicgfSlcbiAqICAgICAgICAgLmVuZChjYWxsYmFjaylcbiAqXG4gKiAgICAgICAvLyBtYW51YWwgeC13d3ctZm9ybS11cmxlbmNvZGVkXG4gKiAgICAgICByZXF1ZXN0LnBvc3QoJy91c2VyJylcbiAqICAgICAgICAgLnR5cGUoJ2Zvcm0nKVxuICogICAgICAgICAuc2VuZCgnbmFtZT10aicpXG4gKiAgICAgICAgIC5lbmQoY2FsbGJhY2spXG4gKlxuICogICAgICAgLy8gYXV0byB4LXd3dy1mb3JtLXVybGVuY29kZWRcbiAqICAgICAgIHJlcXVlc3QucG9zdCgnL3VzZXInKVxuICogICAgICAgICAudHlwZSgnZm9ybScpXG4gKiAgICAgICAgIC5zZW5kKHsgbmFtZTogJ3RqJyB9KVxuICogICAgICAgICAuZW5kKGNhbGxiYWNrKVxuICpcbiAqICAgICAgIC8vIGRlZmF1bHRzIHRvIHgtd3d3LWZvcm0tdXJsZW5jb2RlZFxuICogICAgICByZXF1ZXN0LnBvc3QoJy91c2VyJylcbiAqICAgICAgICAuc2VuZCgnbmFtZT10b2JpJylcbiAqICAgICAgICAuc2VuZCgnc3BlY2llcz1mZXJyZXQnKVxuICogICAgIC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iAgICAgICAgc3RyID0gZm9ybWF0VmFsdWUoY3R4LCBkZXNjLnZhbHVlLCByZWN1cnNlVGltZXMgLSAxKTtcbiAgICAgIH1cbiAgICAgIGlmIChzdHIuaW5kZXhPZignXFxuJykgPiAtMSkge1xuICAgICAgICBpZiAoYXJyYXkpIHtcbiAgICAgICAgICBzdHIgPSBzdHIuc3BsaXQoJ1xcbicpLm1hcChmdW5jdGlvbihsaW5lKSB7XG4gICAgICAgICAgICByZXR1cm4gJyAgJyArIGxpbmU7XG4gICAgICAgICAgfSkuam9pbignXFxuJykuc3Vic3RyKDIpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHN0ciA9ICdcXG4nICsgc3RyLnNwbGl0KCdcXG4nKS5tYXAoZnVuY3Rpb24obGluZSkge1xuICAgICAgICAgICAgcmV0dXJuICcgICAnICsgbGluZTtcbiAgICAgICAgICB9KS5qb2luKCdcXG4nKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBzdHIgPSBjdHguc3R5bGl6ZSgnW0NpcmN1bGFyXScsICdzcGVjaWFsJyk7XG4gICAgfVxuICB9XG4gIGlmIChpc1VuZGVmaW5lZChuYW1lKSkge1xuICAgIGlmIChhcnJheSAmJiBrZXkubWF0Y2goL15cXGQrJC8pKSB7XG4gICAgICByZXR1cm4gc3RyO1xuICAgIH1cbiAgICBuYW1lID0gSlNPTi5zdHJpbmdpZnkoJycgKyBrZXkpO1xuICAgIGlmIChuYW1lLm1hdGNoKC9eXCIoW2EtekEtWl9dW2EtekEtWl8wLTldKilcIiQvKSkge1xuICAgICAgbmFtZSA9IG5hbWUuc3Vic3RyKDEsIG5hbWUubGVuZ3RoIC0gMik7XG4gICAgICBuYW1lID0gY3R4LnN0eWxpemUobmFtZSwgJ25hbWUnKTtcbiAgICB9IGVsc2Uge1xuICAgICAgbmFtZSA9IG5hbWUucmVwbGFjZSgvJy9nLCBcIlxcXFwnXCIpXG4gICAgICAgICAgICAgIC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ZHVsZS5leHBvcnRzKSBtb2R1bGUuZXhwb3J0cyA9IGRlZmluaXRpb24oKVxuICBlbHNlIGlmICh0eXBlb2YgZGVmaW5lID09ICdmdW5jdGlvbicgJiYgZGVmaW5lLmFtZCkgZGVmaW5lKGRlZmluaXRpb24pXG4gIGVsc2UgY29udGV4dFtuYW1lXSA9IGRlZmluaXRpb24oKVxufSkoJ2JlYW4nLCB0aGlzLCBmdW5jdGlvbiAobmFtZSwgY29udGV4dCkge1xuICBuYW1lICAgID0gbmFtZSAgICB8fCAnYmVhbidcbiAgY29udGV4dCA9IGNvbnRleHQgfHwgdGhpc1xuXG4gIHZhciB3aW4gICAgICAgICAgICA9IHdpbmRvd1xuICAgICwgb2xkICAgICAgICAgICAgPSBjb250ZXh0W25hbWVdXG4gICAgLCBuYW1lc3BhY2VSZWdleCA9IC9bXlxcLl0qKD89XFwuLiopXFwufC4qL1xuICAgICwgbmFtZVJlZ2V4ICAgICAgPSAvXFwuLiovXG4gICAgLCBhZGRFdmVudCAgICAgICA9ICdhZGRFdmVudExpc3RlbmVyJ1xuICAgICwgcmVtb3ZlRXZlbnQgICAgPSAncmVtb3ZlRXZlbnRMaXN0ZW5lcidcbiAgICAsIGRvYyAgICAgICAgICAgID0gZG9jdW1lbnQgfHwge31cbiAgICAsIHJvb3QgICAgICAgICAgID0gZG9jLmRvY3VtZW50RWxlbWVudCB8fCB7fVxuICAgICwgVzNDX01PREVMICAgICAgPSByb290W2FkZEV2ZW50XVxuICAgICwgZXZlbnRTdXBwb3J0ICAgPSBXM0NfTU9ERUwgPyBhZGRFdmVudCA6ICdhdHRhY2hFdmVudCdcbiAgICAsIE9ORSAgICAgICAgICAgID0ge30gLy8gc2luZ2xldG9uIGZvciBxdWljayBtYXRjaGluZyBtYWtpbmcgYWRkKCkgZG8gb25lKClcblxuICAgICwgc2xpY2UgICAgICAgICAgPSBBcnJheS5wcm90b3R5cGUuc2xpY2VcbiAgICAsIHN0cjJhcnIgICAgICAgID0gZnVuY3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XG4gICAgICAgICAgaWYgKGRlZmF1bHRzLmhhc093blByb3BlcnR5KGtleSkgJiYgbWF5YmVPcHRpb25zLmhhc093blByb3BlcnR5KGtleSkpIHtcbiAgICAgICAgICAgIGRlZmF1bHRzW2tleV0gPSBtYXliZU9wdGlvbnNba2V5XVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBkZWZhdWx0c1xuICAgICAgfVxuXG4gICAgICAvLyBldmVudHMgdGhhdCB3ZSBjb25zaWRlciB0byBiZSAnbmF0aXZlJywgYW55dGhpbmcgbm90IGluIHRoaXMgbGlzdCB3aWxsXG4gICAgICAvLyBiZSB0cmVhdGVkIGFzIGEgY3VzdG9tIGV2ZW50XG4gICAgLCBzdGFuZGFyZE5hdGl2ZUV2ZW50cyA9XG4gICAgICAgICdjbGljayBkYmxjbGljayBtb3VzZXVwIG1vdXNlZG93biBjb250ZXh0bWVudSAnICAgICAgICAgICAgICAgICAgKyAvLyBtb3VzZSBidXR0b25zXG4gICAgICAgICdtb3VzZXdoZWVsIG1vdXNlbXVsdGl3aGVlbCBET01Nb3VzZVNjcm9sbCAnICAgICAgICAgICAgICAgICAgICAgKyAvLyBtb3VzZSB3aGVlbFxuICAgICAgICAnbW91c2VvdmVyIG1vdXNlb3V0IG1vdXNlbW92ZSBzZWxlY3RzdGFydCBzZWxlY3RlbmQgJyAgICAgICAgICAgICsgLy8gbW91c2UgbW92ZW1lbnRcbiAgICAgICAgJ2tleWRvd24ga2V5cHJlc3Mga2V5dXAgJyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIC8vIGtleWJvYXJkXG4gICAgICAgICdvcmllbnRhdGlvbmNoYW5nZSAnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBtb2JpbGVcbiAgICAgICAgJ2ZvY3VzIGJsdXIgY2hhbmdlIHJlc2V0IHNlbGVjdCBzdWJtaXQgJyAgICAgICAgICAgICAgICAgICAgICAgICArIC8vIGZvcm0gZWxlbWVudHNcbiAgICAgICAgJ2xvYWQgdW5sb2FkIGJlZm9yZXVubG9hZCByZXNpemUgbW92ZSBET01Db250ZW50TG9hZGVkICcgICAgICAgICArIC8vIHdpbmRvd1xuICAgICAgICAncmVhZHlzdGF0ZWNoYW5nZSBtZXNzYWdlICcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgLy8gd2luZG93XG4gICAgICAgICdlcnJvciBhYm9ydCBzY3JvbGwgJyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBtaXNjXG4gICAgICAvLyBlbGVtZW50LmZpcmVFdmVudCgnb25YWVonLi4uIGlzIG5vdCBmb3JnaXZpbmcgaWYgd2UgdHJ5IHRvIGZpcmUgYW4gZXZlbnRcbiAgICAgIC8vIHRoYXQgZG9lc24ndCBhY3R1YWxseSBleGlzdCwgc28gbWFrZSBzdXJlIHdlIG9ubHkgZG8gdGhlc2Ugb24gbmV3ZXIgYnJvd3NlcnNcbiAgICAsIHczY05hdGl2ZUV2ZW50cyA9XG4gICAgICAgICdzaG93ICcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBtb3VzZSBidXR0b25zXG4gICAgICAgICdpbnB1dCBpbnZhbGlkICcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBmb3JtIGVsZW1lbnRzXG4gICAgICAgICd0b3VjaHN0YXJ0IHRvdWNobW92ZSB0b3VjaGVuZCB0b3VjaGNhbmNlbCAnICAgICAgICAgICAgICAgICAgICAgKyAvLyB0b3VjaFxuICAgICAgICAnZ2VzdHVyZXN0YXJ0IGdlc3R1cmVjaGFuZ2UgZ2VzdHVyZWVuZCAnICAgICAgICAgICAgICAgICAgICAgICAgICsgLy8gZ2VzdHVyZVxuICAgICAgICAndGV4dGlucHV0ICcgICAgICAgICAgICAgICAg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b250YWluZXIgPT09IHdpbmRvdyA/IHJvb3QgOiBjb250YWluZXJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbnRhaW5lciAhPT0gZWxlbWVudCAmJiBjb250YWluZXIuY29udGFpbnMoZWxlbWVudClcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICA6IGZ1bmN0aW9uIChlbGVtZW50LCBjb250YWluZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGVsZW1lbnQgPSBlbGVtZW50LnBhcmVudE5vZGUpIGlmIChlbGVtZW50ID09PSBjb250YWluZXIpIHJldHVybiAxXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAwXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgLCBjaGVjayA9IGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgICB2YXIgcmVsYXRlZCA9IGV2ZW50LnJlbGF0ZWRUYXJnZXRcbiAgICAgICAgICAgICAgcmV0dXJuICFyZWxhdGVkXG4gICAgICAgICAgICAgICAgPyByZWxhdGVkID09IG51bGxcbiAgICAgICAgICAgICAgICA6IChyZWxhdGVkICE9PSB0aGlzICYmIHJlbGF0ZWQucHJlZml4ICE9PSAneHVsJyAmJiAhL2RvY3VtZW50Ly50ZXN0KHRoaXMudG9TdHJpbmcoKSlcbiAgICAgICAgICAgICAgICAgICAgJiYgIWlzQW5jZXN0b3IocmVsYXRlZCwgdGhpcykpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIG1vdXNlZW50ZXI6IHsgYmFzZTogJ21vdXNlb3ZlcicsIGNvbmRpdGlvbjogY2hlY2sgfVxuICAgICAgICAgICwgbW91c2VsZWF2ZTogeyBiYXNlOiAnbW91c2VvdXQnLCBjb25kaXRpb246IGNoZWNrIH1cbiAgICAgICAgICAsIG1vdXNld2hlZWw6IHsgYmFzZTogL0ZpcmVmb3gvLnRlc3QobmF2aWdhdG9yLnV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zLCBkbyB0aGF0IGFsbCBoZXJlXG4gICAgICAgICAgLCB0eXBlRml4ZXJzICAgPSBbXG4gICAgICAgICAgICAgICAgeyAvLyBrZXkgZXZlbnRzXG4gICAgICAgICAgICAgICAgICAgIHJlZzogL2tleS9pXG4gICAgICAgICAgICAgICAgICAsIGZpeDogZnVuY3Rpb24gKGV2ZW50LCBuZXdFdmVudCkge1xuICAgICAgICAgICAgICAgICAgICAgIG5ld0V2ZW50LmtleUNvZGUgPSBldmVudC5rZXlDb2RlIHx8IGV2ZW50LndoaWNoXG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGtleVByb3BzXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICwgeyAvLyBtb3VzZSBldmVudHNcbiAgICAgICAgICAgICAgICAgICAgcmVnOiAvY2xpY2t8bW91c2UoPyEoLip3aGVlbHxzY3JvbGwpKXxtZW51fGRyYWd8ZHJvcC9pXG4gICAgICAgICAgICAgICAgICAsIGZpeDogZnVuY3Rpb24gKGV2ZW50LCBuZXdFdmVudCwgdHlwZSkge1xuICAgICAgICAgICAgICAgICAgICAgIG5ld0V2ZW50LnJpZ2h0Q2xpY2sgPSBldmVudC53aGljaCA9PT0gMyB8fCBldmVudC5idXR0b24gPT09IDJcbiAgICAgICAgICAgICAgICAgICAgICBuZXdFdmVudC5wb3MgPSB7IHg6IDAsIHk6IDAgfVxuICAgICAgICAgICAgICAgICAgICAgIGlmIChldmVudC5wYWdlWCB8fCBldmVudC5wYWdlWSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbmV3RXZlbnQuY2xpZW50WCA9IGV2ZW50LnBhZ2VYXG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdFdmVudC5jbGllbnRZID0gZXZlbnQucGFnZVlcbiAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGV2ZW50LmNsaWVudFggfHwgZXZlbnQuY2xpZW50WSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbmV3RXZlbnQuY2xpZW50WCA9IGV2ZW50LmNsaWVudFggKyBkb2MuYm9keS5zY3JvbGxMZWZ0ICsgcm9vdC5zY3JvbGxMZWZ0XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdFdmVudC5jbGllbnRZID0gZXZlbnQuY2xpZW50WSArIGRvYy5ib2R5LnNjcm9sbFRvcCArIHJvb3Quc2Nyb2xsVG9wXG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgIGlmIChvdmVyT3V0UmVnZXgudGVzdCh0eXBlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbmV3RXZlbnQucmVsYXRlZFRhcmdldCA9IGV2ZW50LnJlbGF0ZWRUYXJnZXRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgZXZlbnRbKHR5cGUgPT0gJ21vdXNlb3ZlcicgPyAnZnJvbScgOiAndG8nKSArICdFbGVtZW50J11cbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1vdXNlUHJvcHNcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgLCB7IC8vIG1vdXNlIHdoZWVsIGV2ZW50c1xuICAgICAgICAgICAgICAgICAgICByZWc6IC9tb3VzZS4qKHdoZWVsfHNjcm9sbCkvaVxuICAgICAgICAgICAgICAgICAgLCBmaXg6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIG1vdXNlV2hlZWxQcm9wcyB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAsIHsgLy8gVGV4dEV2ZW50XG4gICAgICAgICAgICAgICAgICAgIHJlZzogL150ZXh0L2lcbiAgICAgICAgICAgICAgICAgICwgZml4OiBmdW5jdGlvbiAoKSB7IHJldHVybiB0ZXh0UHJvcHMgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgLCB7IC8vIHRvdWNoIGFuZCBnZXN0dXJlIGV2ZW50c1xuICAgICAgICAgICAgICAgICAgICByZWc6IC9edG91Y2h8Xmdlc3R1cmUvaVxuICAgICAgICAgICAgICAgICAgLCBmaXg6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIHRvdWNoUHJvcHMgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgLCB7IC8vIG1lc3NhZ2UgZXZlbnRzXG4gICAgICAgICAgICAgICAgICAgIHJlZzogL15tZXNzYWdlJC9pXG4gICAgICAgICAgICAgICAgICAsIGZpeDogZnVuY3Rpb24gKCkgeyByZXR1cm4gbWVzc2FnZVByb3BzIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICwgeyAvLyBwb3BzdGF0ZSBldmVudHNcbiAgICAgICAgICAgICAgICAgICAgcmVnOiAvXnBvcHN0YXRlJC9pXG4gICAgICAgICAgICAgICAgICAsIGZpeDogZnVuY3Rpb24gKCkgeyByZXR1cm4gc3RhdGVQcm9wcyB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAsIHsgLy8gZXZlcnl0aGluZyBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHJlZzogLy4qL1xuICAgICAgICAgICAgICAgICAgLCBmaXg6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIGNvbW1vblByb3BzIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBdXG4gICAgICAgICAgLCB0eXBlRml4ZXJNYXAgPSB7fSAvLyB1c2VkIHRvIG1hcCBldmVudCB0eXBlcyB0byBmaXhlciBmdW5jdGlvbnMgKGFib3ZlKSwgYSBiYXNpYyBjYWNoZSBtZWNoYW5pc21cblxuICAgICAgICAgICwgRXZlbnQgPSBmdW5jdGlvbiAoZXZlbnQsIGVsZW1lbnQsIGlzTmF0aXZlKSB7XG4gICAgICAgICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuXG4gICAgICAgICAgICAgIGV2Z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AgICAgICAgICAgICAgaWYgKHR5cGVGaXhlcnNbaV0ucmVnLnRlc3QodHlwZSkpIHsgLy8gZ3VhcmFudGVlZCB0byBtYXRjaCBhdCBsZWFzdCBvbmUsIGxhc3QgaXMgLipcbiAgICAgICAgICAgICAgICAgICAgICB0eXBlRml4ZXJNYXBbdHlwZV0gPSBmaXhlciA9IHR5cGVGaXhlcnNbaV0uZml4XG4gICAgICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHByb3BzID0gZml4ZXIoZXZlbnQsIHRoaXMsIHR5cGUpXG4gICAgICAgICAgICAgICAgZm9yIChpID0gcHJvcHMubGVuZ3RoOyBpLS07KSB7XG4gICAgICAgICAgICAgICAgICBpZiAoISgocCA9IHByb3BzW2ldKSBpbiB0aGlzKSAmJiBwIGluIGV2ZW50KSB0aGlzW3BdID0gZXZlbnRbcF1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAvLyBwcmV2ZW50RGVmYXVsdCgpIGFuZCBzdG9wUHJvcGFnYXRpb24oKSBhcmUgYSBjb25zaXN0ZW50IGludGVyZmFjZSB0byB0aG9zZSBmdW5jdGlvbnNcbiAgICAgICAgLy8gb24gdGhlIERPTSwgc3RvcCgpIGlzIGFuIGFsaWFzIGZvciBib3RoIG9mIHRoZW0gdG9nZXRoZXJcbiAgICAgICAgRXZlbnQucHJvdG90eXBlLnByZXZlbnREZWZhdWx0ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGlmICh0aGlzLm9yaWdpbmFsRXZlbnQucHJldmVudERlZmF1bHQpIHRoaXMub3JpZ2luYWxFdmVudC5wcmV2ZW50RGVmYXVsdCgpXG4gICAgICAgICAgZWxzZSB0aGlzLm9yaWdpbmFsRXZlbnQucmV0dXJuVmFsdWUgPSBmY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YmVhbkRlbCA/IGZuLl9fYmVhbkRlbC5mdChldmVudC50YXJnZXQsIGVsZW1lbnQpIDogZXZlbnRFbGVtZW50XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAsIGhhbmRsZXIgPSBjb25kaXRpb25cbiAgICAgICAgICAgICAgICAgID8gZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgdmFyIHRhcmdldCA9IGZpbmRUYXJnZXQoZXZlbnQsIHRoaXMpIC8vIGRlbGVhdGVkIGV2ZW50XG4gICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbmRpdGlvbi5hcHBseSh0YXJnZXQsIGFyZ3VtZW50cykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChldmVudCkgZXZlbnQuY3VycmVudFRhcmdldCA9IHRhcmdldFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNhbGwoZXZlbnQsIGFyZ3VtZW50cylcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIDogZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgaWYgKGZuLl9fYmVhbkRlbCkgZXZlbnQgPSBldmVudC5jbG9uZShmaW5kVGFyZ2V0KGV2ZW50KSkgLy8gZGVsZWdhdGVkIGV2ZW50LCBmaXggdGhlIGZpeFxuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsKGV2ZW50LCBhcmd1bWVudHMpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGhhbmRsZXIuX19iZWFuRGVsID0gZm4uX19iZWFuRGVsXG4gICAgICAgICAgICByZXR1cm4gaGFuZGxlclxuICAgICAgICAgIH1cblxuICAgICAgICAsIFJlZ0VudHJ5ID0gZnVuY3Rpb24gKGVsZW1lbnQsIHR5cGUsIGhhbmRsZXIsIG9yaWdpbmFsLCBuYW1lc3BhY2VzLCBhcmdzLCByb290KSB7XG4gICAgICAgICAgICB2YXIgY3VzdG9tVHlwZSAgICAgPSBjdXN0b21FdmVudHNbdHlwZV1cbiAgICAgICAgICAgICAgLCBpc05hdGl2ZVxuXG4gICAgICAgICAgICBpZiAodHlwZSA9PSAndW5sb2FkJykge1xuICAgICAgICAgICAgICAvLyBzZWxmIGNsZWFuLXVwXG4gICAgICAgICAgICAgIGhhbmRsZXIgPSBvbmNlKHJlbW92ZUxpc3RlbmVyLCBlbGVtZW50LCB0eXBlLCBoYW5kbGVyLCBvcmlnaW5hbClcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGN1c3RvbVR5cGUpIHtcbiAgICAgICAgICAgICAgaWYgKGN1c3RvbVR5cGUuY29uZGl0aW9uKSB7XG4gICAgICAgICAgICAgICAgaGFuZGxlciA9IHdyYXBwZWRIYW5kbGVyKGVsZW1lbnQsIGhhbmRsZXIsIGN1c3RvbVR5cGUuY29uZGl0aW9uLCBhcmdzKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHR5cGUgPSBjdXN0b21UeXBlLmJhc2UgfHwgdHlwZVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLmlzTmF0aXZlICAgICAgPSBpc05hdGl2ZSA9IG5hdGl2ZUV2ZW50c1t0eXBlXSAmJiAhIWVsZW1lbnRbZXZlbnRTdXBwb3J0XVxuICAgICAgICAgICAgdGhpcy5jdXN0b21UeXBlICAgID0gIVczQ19NT0RFTCAmJiAhaXNOYXRpdmUgJiYgdHlwZVxuICAgICAgICAgICAgdGhpcy5lbGVtZW50ICAgICAgID0gZWxlbWVudFxuICAgICAgICAgICAgdGhpcy50eXBlICAgICAgICAgID0gdHlwZVxuICAgICAgICAgICAgdGhpcy5vcmlnaW5hbCAgICAgID0gb3JpZ2luYWxcbiAgICAgICAgICAgIHRoaXMubmFtZXNwYWNlcyAgICA9IG5hbWVzcGFjZXNcbiAgICAgICAgICAgIHRoaXMuZXZlbnRUeXBlICAgICA9IFczQ19NT0RFTCB8fCBpc05hdGl2ZSA/IHR5cGUgOiAncHJvcGVydHljaGFuZ2UnXG4gICAgICAgICAgICB0aGlzLnRhcmdldCAgICAgICAgPSB0YXJnZXRFbGVtZW50KGVsZW1lbnQsIGlzTmF0aXZlKVxuICAgICAgICAgICAgdGhpc1tldmVudFN1cHBvcnRdID0gISF0aGlzLnRhcmdldFtldmVudFN1cHBvcnRdXG4gICAgICAgICAgICB0aGlzLnJvb3QgICAgICAgICAgPSByb290XG4gICAgICAgICAgICB0aGlzLmhhbmRsZXIgICAgICAgPSB3cmFwcGVkSGFuZGxlcihlbGVtZW50LCBoYW5kbGVyLCBudWxsLCBhcmdzKVxuICAgICAgICAgIH1cblxuICAgICAgICAvLyBnaXZlbiBhIGxpc3Qgb2YgbmFtZXNwYWNlcywgaXMgb3VyIGVudHJ5IGluIGFueSBvZiB0aGVtP1xuICAgICAgICBSZWdFbnRyeS5wcm90b3R5cGUuaW5OYW1lc3BhY2VzID0gZnVuY3Rpb24gKGNoZWNrTmFtZXNwYWNlcykge1xuICAgICAgICAgIHZhciBpLCBqLCBjID0gMFxuICAgICAgICAgIGlmICghY2hlY2tOYW1lc3BhY2VzKSByZXR1cm4gdHJ1ZVxuICAgICAgICAgIGlmICghdGhpcy5uYW1lc3BhY2VzKSByZXR1cm4gZmFsc2VcbiAgICAgICAgICBmb3IgKGkgPSBjaGVja05hbWVzcGFjZXMubGVuZ3RoOyBpLS07KSB7XG4gICAgICAgICAgICBmb3IgKGogPSB0aGlzLm5hbWVzcGFjZXMubGVuZ3RoOyBqLS07KSB7XG4gICAgICAgICAgICAgIGlmIChjaGVja05hbWVzcGFjZXNbaV0gPT0gdGhpcy5uYW1lc3BhY2VzW2pdKSBjKytcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGNoZWNrTmFtZXNwYWNlcy5sZW5ndGggPT09IGNcbiAgICAgICAgfVxuXG4gICAgICA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YCByZXR1cm5zIGZhbHNlIHRvIGJyZWFrIG91dCBvZiB0aGUgbG9vcFxuICAgICAgICAgICwgZm9yQWxsID0gZnVuY3Rpb24gKGVsZW1lbnQsIHR5cGUsIG9yaWdpbmFsLCBoYW5kbGVyLCByb290LCBmbikge1xuICAgICAgICAgICAgICB2YXIgcGZ4ID0gcm9vdCA/ICdyJyA6ICckJ1xuICAgICAgICAgICAgICBpZiAoIXR5cGUgfHwgdHlwZSA9PSAnKicpIHtcbiAgICAgICAgICAgICAgICAvLyBzZWFyY2ggdGhlIHdob2xlIHJlZ2lzdHJ5XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgdCBpbiBtYXApIHtcbiAgICAgICAgICAgICAgICAgIGlmICh0LmNoYXJBdCgwKSA9PSBwZngpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yQWxsKGVsZW1lbnQsIHQuc3Vic3RyKDEpLCBvcmlnaW5hbCwgaGFuZGxlciwgcm9vdCwgZm4pXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBpID0gMCwgbCwgbGlzdCA9IG1hcFtwZnggKyB0eXBlXSwgYWxsID0gZWxlbWVudCA9PSAnKidcbiAgICAgICAgICAgICAgICBpZiAoIWxpc3QpIHJldHVyblxuICAgICAgICAgICAgICAgIGZvciAobCA9IGxpc3QubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoKGFsbCB8fCBsaXN0W2ldLm1hdGNoZXMoZWxlbWVudCwgb3JpZ2luYWwsIGhhbmRsZXIpKSAmJiAhZm4obGlzdFtpXSwgbGlzdCwgaSwgdHlwZSkpIHJldHVyblxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgLCBoYXMgPSBmdW5jdGlvbiAoZWxlbWVudCwgdHlwZSwgb3JpZ2luYWwsIHJvb3QpIHtcbiAgICAgICAgICAgICAgLy8gd2UncmUgbm90IHVzaW5nIGZvckFsbCBoZXJlIHNpbXBseSBiZWNhdXNlIGl0J3MgYSBiaXQgc2xvd2VyIGFuZCB0aGlzXG4gICAgICAgICAgICAgIC8vIG5lZWRzIHRvIGJlIGZhc3RcbiAgICAgICAgICAgICAgdmFyIGksIGxpc3QgPSBtYXBbKHJvb3QgPyAncicgOiAnJCcpICsgdHlwZV1cbiAgICAgICAgICAgICAgaWYgKGxpc3QpIHtcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSBsaXN0Lmxlbmd0aDsgaS0tOykge1xuICAgICAgICAgICAgICAgICAgaWYgKCFsaXN0W2ldLnJvb3QgJiYgbGlzdFtpXS5tYXRjaGVzKGVsZW1lbnQsIG9yaWdpbmFsLCBudWxsKSkgcmV0dXJuIHRydWVcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAsIGdldCA9IGZ1bmN0aW9uIChlbGVtZW50LCB0eXBlLCBvcmlnaW5hbCwgcm9vdCkge1xuICAgICAgICAgICAgICB2YXIgZW50cmllcyA9IFtdXG4gICAgICAgICAgICAgIGZvckFsbChlbGVtZW50LCB0eXBlLCBvcmlnaW5hbCwgbnVsbCwgcm9vdCwgZnVuY3Rpb24gKGVudHJ5KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGVudHJpZXMucHVzaChlbnRyeSlcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgcmV0dXJuIGVudHJpZXNcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICwgcHV0ID0gZnVuY3Rpb24gKGVudHJ5KSB7XG4gICAgICAgICAgICAgIHZhciBoYXMgPSAhZW50cnkucm9vdCAmJiAhdGhpcy5oYXMoZW50cnkuZWxlbWVudCwgZW50cnkudHlwZSwgbnVsbCwgZmFsc2UpXG4gICAgICAgICAgICAgICAgLCBrZXkgPSAoZW50cnkucm9vdCA/ICdyJyA6ICckJykgKyBlbnRyeS50eXBlXG4gICAgICAgICAgICAgIDsobWFwW2tleV0gfHwgKG1hcFtrZXldID0gW10pKS5wdXNoKGVudHJ5KVxuICAgICAgICAgICAgICByZXR1cm4gaGFzXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAsIGRlbCA9IGZ1bmN0aW9uIChlbnRyeSkge1xuICAgICAgICAgICAgICBmb3JBbGwoZW50cnkuZWxlbWVudCwgZW50cnkudHlwZSwgbnVsbCwgZW50cnkuaGFuZGxlciwgZW50cnkucm9vdCwgZnVuY3Rpb24gKGVudHJ5LCBsaXN0LCBpKSB7XG4gICAgICAgICAgICAgICAgbGlzdC5zcGxpY2UoaSwgMSlcbiAgICAgICAgICAgICAgICBlbnRyeS5yZW1vdmVkID0gdHJ1ZVxuICAgICAgICAgICAgICAgIGlmIChsaXN0Lmxlbmd0aCA9PT0gMCkgZGVsZXRlIG1hcFsoZW50cnkucm9vdCA/ICdyJyA6ICckJykgKyBlbnRyeS50eXBlXVxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBkdW1wIGFsbCBlbnRyaWVzLCB1c2VkIGZvciBvbnVubG9hZFxuICAgICAgICAgICwgZW50cmllcyA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgdmFyIHQsIGVudHJpZXMgPSBbXVxuICAgICAgICAgICAgICBmb3IgKHQgaW4gbWFwKSB7XG4gICAgICAgICAgICAgICAgaWYgKHQuY2hhckF0KDApID09ICckJykgZW50cmllcyA9IGVudHJpZXMuY29uY2F0KG1hcFt0XSlcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICByZXR1cm4gZW50cmllc1xuICAgICAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7IGhhczogaGFzLCBnZXQ6I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ICAgICAgIC8vIG5ldyBicm93c2Vyc1xuICAgICAgICAgICAgZWxlbWVudFthZGQgPyBhZGRFdmVudCA6IHJlbW92ZUV2ZW50XSh0eXBlLCByb290TGlzdGVuZXIsIHVzZUNhcHR1cmUpXG4gICAgICAgICAgfVxuICAgICAgICA6IGZ1bmN0aW9uIChlbGVtZW50LCB0eXBlLCBhZGQsIGN1c3RvbSAvKiwgdXNlQ2FwdHVyZSAqLykge1xuICAgICAgICAgICAgLy8gSUU4IGFuZCBiZWxvdywgdXNlIGF0dGFjaEV2ZW50L2RldGFjaEV2ZW50IGFuZCB3ZSBoYXZlIHRvIHBpZ2d5LWJhY2sgcHJvcGVydHljaGFuZ2UgZXZlbnRzXG4gICAgICAgICAgICAvLyB0byBzaW11bGF0ZSBldmVudCBidWJibGluZyBldGMuXG4gICAgICAgICAgICB2YXIgZW50cnlcbiAgICAgICAgICAgIGlmIChhZGQpIHtcbiAgICAgICAgICAgICAgcmVnaXN0cnkucHV0KGVudHJ5ID0gbmV3IFJlZ0VudHJ5KFxuICAgICAgICAgICAgICAgICAgZWxlbWVudFxuICAgICAgICAgICAgICAgICwgY3VzdG9tIHx8IHR5cGVcbiAgICAgICAgICAgICAgICAsIGZ1bmN0aW9uIChldmVudCkgeyAvLyBoYW5kbGVyXG4gICAgICAgICAgICAgICAgICAgIHJvb3RMaXN0ZW5lci5jYWxsKGVsZW1lbnQsIGV2ZW50LCBjdXN0b20pXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLCByb290TGlzdGVuZXJcbiAgICAgICAgICAgICAgICAsIG51bGxcbiAgICAgICAgICAgICAgICAsIG51bGxcbiAgICAgICAgICAgICAgICAsIHRydWUgLy8gaXMgcm9vdFxuICAgICAgICAgICAgICApKVxuICAgICAgICAgICAgICBpZiAoY3VzdG9tICYmIGVsZW1lbnRbJ19vbicgKyBjdXN0b21dID09IG51bGwpIGVsZW1lbnRbJ19vbicgKyBjdXN0b21dID0gMFxuICAgICAgICAg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AgICAgIHJldHVybiBlbGVtZW50XG4gICAgICB9XG5cbiAgICAgIC8qKlxuICAgICAgICAqIGFkZChlbGVtZW50Wywgc2VsZWN0b3JdLCBldmVudFR5cGUocyksIGhhbmRsZXJbLCBhcmdzIF0pXG4gICAgICAgICpcbiAgICAgICAgKiBEZXByZWNhdGVkOiBrZXB0IChmb3Igbm93KSBmb3IgYmFja3dhcmQtY29tcGF0aWJpbGl0eVxuICAgICAgICAqL1xuICAgICwgYWRkID0gZnVuY3Rpb24gKGVsZW1lbnQsIGV2ZW50cywgZm4sIGRlbGZuLCBvcHRpb25zKSB7XG4gICAgICAgIHJldHVybiBvbi5hcHBseShcbiAgICAgICAgICAgIG51bGxcbiAgICAgICAgICAsICFpc1N0cmluZyhmbilcbiAgICAgICAgICAgICAgPyBzbGljZS5jYWxsKGFyZ3VtZW50cylcbiAgICAgICAgICAgICAgOiBbIGVsZW1lbnQsIGZuLCBldmVudHMsIGRlbGZuIF0uY29uY2F0KGFyZ3VtZW50cy5sZW5ndGggPiAzID8gc2xpY2UuY2FsbChhcmd1bWVudHMsIDQpIDogW10pXG4gICAgICAgIClcbiAgICAgIH1cblxuICAgICAgLyoqXG4gICAgICAgICogb25lKGVsZW1lbnQsIGV2ZW50VHlwZShzKVssIHNlbGVjdG9yXSwgaGFuZGxlclssIGFyZ3MgXSlcbiAgICAgICAgKi9cbiAgICAsIG9uZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIG9uLmFwcGx5KE9ORSwgYXJndW1lbnRzKVxuICAgICAgfVxuXG4gICAgICAvKipcbiAgICAgICAgKiBmaXJlKGVsZW1lbnQsIGV2ZW50VHlwZShzKVssIGFyZ3MgXSlcbiAgICAgICAgKlxuICAgICAgICAqIFRoZSBvcHRpb25hbCAnYXJncycgYXJndW1lbnQgbXVzdCBiZSBhbiBhcnJheSwgaWYgbm8gJ2FyZ3MnIGFyZ3VtZW50IGlzIHByb3ZpZGVkXG4gICAgICAgICogdGhlbiB3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cmdzLnB1c2goaGFuZGxlcnNbaV0ub3JpZ2luYWwpXG4gICAgICAgICAgICBvbi5hcHBseShudWxsLCBhcmdzKVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZWxlbWVudFxuICAgICAgfVxuXG4gICAgLCBiZWFuID0ge1xuICAgICAgICAgICdvbicgICAgICAgICAgICAgICAgOiBvblxuICAgICAgICAsICdhZGQnICAgICAgICAgICAgICAgOiBhZGRcbiAgICAgICAgLCAnb25lJyAgICAgICAgICAgICAgIDogb25lXG4gICAgICAgICwgJ29mZicgICAgICAgICAgICAgICA6IG9mZlxuICAgICAgICAsICdyZW1vdmUnICAgICAgICAgICAgOiBvZmZcbiAgICAgICAgLCAnY2xvbmUnICAgICAgICAgICAgIDogY2xvbmVcbiAgICAgICAgLCAnZmlyZScgICAgICAgICAgICAgIDogZmlyZVxuICAgICAgICAsICdFdmVudCcgICAgICAgICAgICAgOiBFdmVudFxuICAgICAgICAsICdzZXRTZWxlY3RvckVuZ2luZScgOiBzZXRTZWxlY3RvckVuZ2luZVxuICAgICAgICAsICdub0NvbmZsaWN0JyAgICAgICAgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBjb250ZXh0W25hbWVdID0gb2xkXG4gICAgICAgICAgICByZXR1cm4gdGhpc1xuICAgICAgICAgIH1cbiAgICAgIH1cblxuICAvLyBmb3IgSUUsIGNsZWFuIHVwIG9uIHVubG9hZCB0byBhdm9pZCBsZWFrc1xuICBpZiAod2luLmF0dGFjaEV2ZW50KSB7XG4gICAgdmFyIGNsZWFudXAgPSBmdW5jdGlvbiAoKSB7XG4gICAgICB2YXIgaSwgZW50cmllcyA9IHJlZ2lzdHJ5LmVudHJpZXMoKVxuICAgICAgZm9yIChpIGluIGVudHJpZXMpIHtcbiAgICAgICAgaWYgKGVudHJpZXNbaV0udHlwZSAmJiBlbnRyaWVzW2ldLnR5cGUgIT09ICd1bmxvYWQnKSBvZmYoZW50cmllc1tpXS5lbGV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0LCB0b2tlbiApIHtcbiAgICAgICAgaWYgKCB0b2tlbiA9PT0gJycgKSB7XG4gICAgICAgICAgdGhyb3cgbmV3IERPTUV4KFxuICAgICAgICAgICAgJ1NZTlRBWF9FUlInLFxuICAgICAgICAgICAgJ0FuIGludmFsaWQgb3IgaWxsZWdhbCBzdHJpbmcgd2FzIHNwZWNpZmllZCdcbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIGlmICggL1xccy8udGVzdCggdG9rZW4gKSApIHtcbiAgICAgICAgICB0aHJvdyBuZXcgRE9NRXgoXG4gICAgICAgICAgICAnSU5WQUxJRF9DSEFSQUNURVJfRVJSJyxcbiAgICAgICAgICAgICdTdHJpbmcgY29udGFpbnMgYW4gaW52YWxpZCBjaGFyYWN0ZXInXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gYXJySW5kZXhPZi5jYWxsKCBjbGFzc0xpc3QsIHRva2VuICk7XG4gICAgICB9LFxuXG4gICAgICBDbGFzc0xpc3QgPSBmdW5jdGlvbiggZWxlbSApIHtcbiAgICAgICAgdmFyIHRyaW1tZWRDbGFzc2VzID0gc3RyVHJpbS5jYWxsKCBlbGVtLmdldEF0dHJpYnV0ZSggJ2NsYXNzJyApIHx8ICcnICksXG4gICAgICAgICAgICBjbGFzc2VzID0gdHJpbW1lZENsYXNzZXMgPyB0cmltbWVkQ2xhc3Nlcy5zcGxpdCggL1xccysvICkgOiBbXTtcblxuICAgICAgICBmb3IgKCB2YXIgaSA9IDA7IGkgPCBjbGFzc2VzLmxlbmd0aDsgaSsrICkge1xuICAgICAgICAgIHRoaXMucHVzaCggY2xhc3Nlc1sgaSBdICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLl91cGRhdGVDbGFzc05hbWUgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICBlbGVtLnNldEF0dHJpYnV0ZSggJ2NsYXNzJywgdGhpcy50b1N0cmluZygpICk7XG4gICAgICAgIH07XG4gICAg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cGRhdGVkICkge1xuICAgICAgICB0aGlzLl91cGRhdGVDbGFzc05hbWUoKTtcbiAgICAgIH1cbiAgICB9O1xuXG4gICAgY2xhc3NMaXN0UHJvdG8ucmVtb3ZlID0gZnVuY3Rpb24oKSB7XG4gICAgICB2YXJcbiAgICAgICAgdG9rZW5zICA9IGFyZ3VtZW50cyxcbiAgICAgICAgaXRlciAgICA9IDAsXG4gICAgICAgIGxlbiAgICAgPSB0b2tlbnMubGVuZ3RoLFxuICAgICAgICB1cGRhdGVkID0gZmFsc2UsXG4gICAgICAgIHRva2VuLFxuICAgICAgICBpbmRleDtcblxuICAgICAgZG8ge1xuICAgICAgICB0b2tlbiA9IHRva2Vuc1sgaXRlciBdICsgJyc7XG4gICAgICAgIGluZGV4ID0gY2hlY2tUb2tlbkFuZEdldEluZGV4KCB0aGlzLCB0b2tlbiApO1xuXG4gICAgICAgIHdoaWxlICggaW5kZXggIT09IC0xICkge1xuICAgICAgICAgIHRoaXMuc3BsaWNlKCBpbmRleCwgMSApO1xuICAgICAgICAgIHVwZGF0ZWQgPSB0cnVlO1xuICAgICAgICAgIGluZGV4ID0gY2hlY2tUb2tlbkFuZEdldEluZGV4KCB0aGlzLCB0b2tlbiApO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHdoaWxlICggKytpdGVyIDwgbGVuICk7XG5cbiAgICAgIGlmICggdXBkYXRlZCApIHtcbiAgICAgICAgdGhpcy5fdXBkYXRlQ2xhc3NOYW1lKCk7XG4gICAgICB9XG4gICAgfTtcblxuICAgIGNsYXNzTGlzdFByb3RvLnRvZ2dsZSA9IGZ1bmN0aW9uKCB0b2tlbiwgZm9yY2UgKSB7XG4gICAgICB0b2tlbiArPSAnJztcblxuICAgICAgdmFyXG4gICAgICAgIHJlc3VsdCA9IHRoaXMuY29udGFpbnMoIHRva2VuICksXG4gICAgICAgIG1ldGhvZCA9IHJlc3VsdCA/IGZvcmNlICE9PSB0cnVlICYmICdyZW1vdmUnIDogZm9yY2UgIT09IGZhbHNlICYmICdhZGQnO1xuXG4gICAgICBpZiAoIG1ldGhvZCApIHtcbiAgICAgICAgdGhpc1sgbWV0aG9kIF0oIHRva2VuICk7XG4gICAgICB9XG5cbiAgICAgIGlmICggZm9yY2UgPT09IHRydWUgfHwgZm9yY2UgPT09IGZhbHNlICkge1xuICAgICAgICByZXR1cm4gZm9yY2U7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gIXJlc3VsdDtcbiAgICAgIH1cbiAgICB9O1xuXG4gICAgY2xhc3NMaXN0UHJvdG8udG9TdHJpbmcgPSBmdW5jdGlvbigpIHtcbiAgICAgIHJldHVybiB0aGlzLmpvaW4oICcgJyApO1xuICAgIH07XG5cbiAgICBpZiAoIG9iakN0ci5kZWZpbmVQcm9wZXJ0eSApIHtcbiAgICAgIHZhciBjbGFzc0xpc3RQcm9wRGVzYyA9IHtcbiAgICAgICAgICBnZXQgICAgICAgICAgOiBjbGFzc0xpc3RHZXR0ZXIsXG4gICAgICAgICAgZW51bWVyYWJsZSAgIDogdHJ1ZSxcbiAgICAgICAgICBjb25maWd1cmFibGUgOiB0cnVlXG4gICAgICB9O1xuXG4gICAgICB0cnkge1xuICAgICAgICBvYmpDdHIuZGVmaW5lUHJvcGVydHkoIGVsZW1DdHJQcm90bywgY2xhc3NMaXN0UHJvcCwgY2xhc3NMaXN0UHJvcERlc2MgKTtcbiAgICAgIH1cblxuICAgICAgY2F0Y2ggKCBleCApIHtcbiAgICAgICAgaWYgKCBleC5udW1iZXIgPT09IC0weDdGRjVFQzU0ICkge1xuICAgICAgICAgIGNsYXNzTGlzdFByb3BEZXNjLmVudW1lcmFibGUgPSBmYWxzZTtcbiAgICAgICAgICBvYmpDdHIuZGVmaW5lUHJvcGVydHkoIGVsZW1DdHJQcm90bywgY2xhc3NMaXN0UHJvcCwgY2xhc3NMaXN0UHJvcERlc2MgKTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgfSBlbHNlIGlmICggb2JqQ3RyWyBwcm90b1Byb3AgXS5fX2RlZmluZUdldHRlcl9fICkge1xuICAgICAgZWxlbUN0clByb3RvLl9fZGVmaW5lR2V0dGVyX18oIGNsYXNzTGlzdFByb3AsIGNsYXNzTGlzdEdldHRlciApO1xuICAgIH1cblxuICAgIH0oIHNlbGYgKSk7XG5cbiAgfSBlbHNlIHtcblxuICAgICggZnVuY3Rpb24oKSB7XG5cbiAgICAgICd1c2Ugc3RyaWN0JztcblxuICAgICAgdmFyIHRlc3RFbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCggJ18nICk7XG5cbiAgICAgIHRlc3RFbGVtZW50LmNsYXNzTGlzdC5hZGQoICdjMScsICdjMicgKTtcblxuICAgICAgaWYgKCAhdGVzdEVsZW1lbnQuY2xhc3NMaXN0LmNvbnRhaW5zKCAnYzInICkgKSB7XG4gICAgICAgIHZhciBjcmVhdGVNZXRob2QgPSBmdW5jdGlvbiggbWV0aG9kICkge1xuICAgICAgICAgIHZhciBvcmlnaW5hbCA9IERPTVRva2VuTGlzdC5wcm90b3R5cGVbIG1ldGhvZCBdO1xuXG4gICAgICAgICAgRE9NVG9rZW5MaXN0LnByb3RvdHlwZVsgbWV0aG9kIF0gPSBmdW5jdGlvbiggdG9rZW4gKSB7XG4gICAgICAgICAgICB2YXIgaSwgbGVuID0gYXJndW1lbnRzLmxlbmd0aDtcblxuICAgICAgICAgICAgZm9yICggaSA9IDA7IGkgPCBsZW47IGkrKyApIHtcbiAgICAgICAgICAgICAgdG9rZW4gPSBhcmd1bWVudHNbIGkgXTtcbiAgICAgICAgICAgICAgb3JpZ2luYWwuY2FsbCggdGhpcywgdG9rZW4gKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICB9O1xuICAgICAgICBjcmVhdGVNZXRob2QoICdhZGQnICk7XG4gICAgICAgIGNyZWF0ZU1ldGhvZCggJ3JlbW92ZScgKTtcbiAgICAgIH1cblxuICAgICAgdGVzdEVsZW1lbnQuY2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bCxcbiAgaG91cjogbixcbiAgbWludXRlOiBkMixcbiAgc2Vjb25kOiBkMixcbiAgdGltZVpvbmVOYW1lOiBsXG59O1xuXG5mdW5jdGlvbiBzdHJpbmdpZnkob2JqKSB7XG4gIHJldHVybiBKU09OLnN0cmluZ2lmeShvYmosIE9iamVjdC5rZXlzKG9iaikuc29ydCgpKTtcbn1cblxuLyoqXG4gKiBAcHJpdmF0ZVxuICovXG5cbnZhciBtb250aHNMb25nID0gWydKYW51YXJ5JywgJ0ZlYnJ1YXJ5JywgJ01hcmNoJywgJ0FwcmlsJywgJ01heScsICdKdW5lJywgJ0p1bHknLCAnQXVndXN0JywgJ1NlcHRlbWJlcicsICdPY3RvYmVyJywgJ05vdmVtYmVyJywgJ0RlY2VtYmVyJ107XG5cbnZhciBtb250aHNTaG9ydCA9IFsnSmFuJywgJ0ZlYicsICdNYXInLCAnQXByJywgJ01heScsICdKdW4nLCAnSnVsJywgJ0F1ZycsICdTZXAnLCAnT2N0JywgJ05vdicsICdEZWMnXTtcblxudmFyIG1vbnRoc05hcnJvdyA9IFsnSicsICdGJywgJ00nLCAnQScsICdNJywgJ0onLCAnSicsICdBJywgJ1MnLCAnTycsICdOJywgJ0QnXTtcblxuZnVuY3Rpb24gbW9udGhzKGxlbmd0aCkge1xuICBzd2l0Y2ggKGxlbmd0aCkge1xuICAgIGNhc2UgJ25hcnJvdyc6XG4gICAgICByZXR1cm4gbW9udGhzTmFycm93O1xuICAgIGNhc2UgJ3Nob3J0JzpcbiAgICAgIHJldHVybiBtb250aHNTaG9ydDtcbiAgICBjYXNlICdsb25nJzpcbiAgICAgIHJldHVybiBtb250aHNMb25nO1xuICAgIGNhc2UgJ251bWVyaWMnOlxuICAgICAgcmV0dXJuIFsnMScsICcyJywgJzMnLCAnNCcsICc1JywgJzYnLCAnNycsICc4JywgJzknLCAnMTAnLCAnMTEnLCAnMTInXTtcbiAgICBjYXNlICcyLWRpZ2l0JzpcbiAgICAgIHJldHVybiBbJzAxJywgJ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YWN0KGR0LCBvcHRzLCBleHRyYWN0KTtcbiAgICB9LFxuICAgICAgICBmb3JtYXRPZmZzZXQgPSBmdW5jdGlvbiBmb3JtYXRPZmZzZXQob3B0cykge1xuICAgICAgaWYgKGR0LmlzT2Zmc2V0Rml4ZWQgJiYgZHQub2Zmc2V0ID09PSAwICYmIG9wdHMuYWxsb3daKSB7XG4gICAgICAgIHJldHVybiAnWic7XG4gICAgICB9XG5cbiAgICAgIHZhciBob3VycyA9IE1hdGgudHJ1bmMoZHQub2Zmc2V0IC8gNjApLFxuICAgICAgICAgIG1pbnV0ZXMgPSBNYXRoLmFicyhkdC5vZmZzZXQgJSA2MCksXG4gICAgICAgICAgc2lnbiA9IGhvdXJzID49IDAgPyAnKycgOiAnLScsXG4gICAgICAgICAgYmFzZSA9ICcnICsgc2lnbiArIE1hdGguYWJzKGhvdXJzKTtcblxuICAgICAgc3dpdGNoIChvcHRzLmZvcm1hdCkge1xuICAgICAgICBjYXNlICdzaG9ydCc6XG4gICAgICAgICAgcmV0dXJuICcnICsgc2lnbiArIF90aGlzLm51bShNYXRoLmFicyhob3VycyksIDIpICsgJzonICsgX3RoaXMubnVtKG1pbnV0ZXMsIDIpO1xuICAgICAgICBjYXNlICduYXJyb3cnOlxuICAgICAgICAgIHJldHVybiBtaW51dGVzID4gMCA/IGJhc2UgKyAnOicgKyBtaW51dGVzIDogYmFzZTtcbiAgICAgICAgY2FzZSAndGVjaGllJzpcbiAgICAgICAgICByZXR1cm4gJycgKyBzaWduICsgX3RoaXMubnVtKE1hdGguYWJzKGhvdXJzKSwgMikgKyBfdGhpcy5udW0obWludXRlcywgMik7XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgdGhyb3cgbmV3IFJhbmdlRXJyb3IoJ1ZhbHVlIGZvcm1hdCAnICsgb3B0cy5mb3JtYXQgKyAnIGlzIG91dCBvZiByYW5nZSBmb3IgcHJvcGVydHkgZm9ybWF0Jyk7XG4gICAgICB9XG4gICAgfSxcbiAg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C5taW51dGUsIDIpO1xuICAgICAgICAvLyBob3Vyc1xuICAgICAgICBjYXNlICdoJzpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LmhvdXIgJSAxMiA9PT0gMCA/IDEyIDogZHQuaG91ciAlIDEyKTtcbiAgICAgICAgY2FzZSAnaGgnOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQuaG91ciAlIDEyID09PSAwID8gMTIgOiBkdC5ob3VyICUgMTIsIDIpO1xuICAgICAgICBjYXNlICdIJzpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LmhvdXIpO1xuICAgICAgICBjYXNlICdISCc6XG4gICAgICAgICAgcmV0dXJuIF90aGlzLm51bShkdC5ob3VyLCAyKTtcbiAgICAgICAgLy8gb2Zmc2V0XG4gICAgICAgIGNhc2UgJ1onOlxuICAgICAgICAgIC8vIGxpa2UgKzZcbiAgICAgICAgICByZXR1cm4gZm9ybWF0T2Zmc2V0KHsgZm9ybWF0OiAnbmFycm93JywgYWxsb3daOiBfdGhpcy5vcHRzLmFsbG93WiB9KTtcbiAgICAgICAgY2FzZSAnWlonOlxuICAgICAgICAgIC8vIGxpa2UgKzA2OjAwXG4gICAgICAgICAgcmV0dXJuIGZvcm1hdE9mZnNldCh7IGZvcm1hdDogJ3Nob3J0JywgYWxsb3daOiBfdGhpcy5vcHRzLmFsbG93WiB9KTtcbiAgICAgICAgY2FzZSAnWlpaJzpcbiAgICAgICAgICAvLyBsaWtlICswNjAwXG4gICAgICAgICAgcmV0dXJuIGZvcm1hdE9mZnNldCh7IGZvcm1hdDogJ3RlY2hpZScsIGFsbG93WjogZmFsc2UgfSk7XG4gICAgICAgIGNhc2UgJ1paWlonOlxuICAgICAgICAgIC8vIGxpa2UgRVNUXG4gICAgICAgICAgcmV0dXJuIGR0Lm9mZnNldE5hbWVTaG9ydDtcbiAgICAgICAgY2FzZSAnWlpaWlonOlxuICAgICAgICAgIC8vIGxpa2UgRWFzdGVybiBTdGF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xuICAgICAgICAvLyB3ZWVrZGF5cyAtIGZvcm1hdFxuICAgICAgICBjYXNlICdFJzpcbiAgICAgICAgICAvLyBsaWtlIDFcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LndlZWtkYXkpO1xuICAgICAgICBjYXNlICdFRUUnOlxuICAgICAgICAgIC8vIGxpa2UgJ1R1ZXMnXG4gICAgICAgICAgcmV0dXJuIHdlZWtkYXkoJ3Nob3J0JywgZmFsc2UpO1xuICAgICAgICBjYXNlICdFRUVFJzpcbiAgICAgICAgICAvLyBsaWtlICdUdWVzZGF5J1xuICAgICAgICAgIHJldHVybiB3ZWVrZGF5KCdsb25nJywgZmFsc2UpO1xuICAgICAgICBjYXNlICdFRUVFRSc6XG4gICAgICAgICAgLy8gbGlrZSAnVCdcbiAgICAgICAgICByZXR1cm4gd2Vla2RheSgnbmFycm93JywgZmFsc2UpO1xuICAgICAgICAvLyBtb250aHMgLSBzdGFuZGFsb25lXG4gICAgICAgIGNhc2UgJ0wnOlxuICAgICAgICAgIC8vIGxpa2UgMVxuICAgICAgICAgIHJldHVybiBvdXRwdXRDYWwgPyBzdHJpbmcoeyBtb250aDogJ251bWVyaWMnLCBkYXk6ICdudW1lcmljJyB9LCAnbW9udGgnKSA6IF90aGlzLm51bShkdC5tb250aCk7XG4gICAgICAgIGNhc2UgJ0xMJzpcbiAgICAgICAgICAvLyBsaWtlIDAxLCBkb2Vzbid0IHNlZW0gdG8gd29ya1xuICAgICAgICAgIHJldHVybiBvdXRwdXRDYWwgPyBzdHJpbmcoeyBtb250aDogJzItZGlnaXQnLCBkYXk6ICdudW1lcmljJyB9LCAnbW9udGgnKSA6IF90aGlzLm51bShkdC5tb250aCwgMik7XG4gICAgICAgIGNhc2UgJ0xMTCc6XG4gICAgICAgICAgLy8gbGlrZSBKYW5cbiAgICAgICAgICByZXR1cm4gbW9udGgoJ3Nob3J0JywgdHJ1ZSk7XG4gICAgICAgIGNhc2UgJ0xMTEwnOlxuICAgICAgICAgIC8vIGxpa2UgSmFudWFyeVxuICAgICAgICAgIHJldHVybiBtb250aCgnbG9uZycsIHRydWUpO1xuICAgICAgICBjYXNlICdMTExMTCc6XG4gICAgICAgICAgLy8gbGlrZSBKXG4gICAgICAgICAgcmV0dXJuIG1vbnRoKCduYXJyb3cnLCB0cnVlKTtcbiAgICAgICAgLy8gbW9udGhzIC0gZm9ybWF0XG4gICAgICAgIGNhc2UgJ00nOlxuICAgICAgICAgIC8vIGxpa2UgMVxuICAgICAgICAgIHJldHVybiBvdXRwdXRDYWwgPyBzdHJpbmcoeyBtb250aDogJ251bWVyaWMnIH0sICdtb250aCcpIDogX3RoaXMubnVtKGR0Lm1vbnRoKTtcbiAgICAgICAgY2FzZSAnTU0nOlxuICAgICAgICAgIC8vIGxpa2UgMDFcbiAgICAgICAgICByZXR1cm4gb3V0cHV0Q2FsID8gc3RyaW5nKHsgbW9udGg6ICcyLWRpZ2l0JyB9LCAnbW9udGgnKSA6IF90aGlzLm51bShkdC5tb250aCwgMik7XG4gICAgICAgIGNhc2UgJ01NTSc6XG4gICAgICAgICAgLy8gbGlrZSBKYW5cbiAgICAgICAgICByZXR1cm4gbW9udGgoJ3Nob3J0JywgZmFsc2UpO1xuICAgICAgICBjYXNlICdNTU1NJzpcbiAgICAgICAgICAvLyBsaWtlIEphbnVhcnlcbiAgICAgICAgICByZXR1cm4gbW9udGgoJ2xvbmcnLCBmYWxzZSk7XG4gICAgICAgIGNhc2UgJ01NTU1NJzpcbiAgICAgICAgICAvLyBsaWtlIEpcbiAgICAgICAgICByZXR1cm4gbW9udGgoJ25hcnJvdycsIGZhbHNlKTtcbiAgICAgICAgLy8geWVhcnNcbiAgICAgICAgY2FzZSAneSc6XG4gICAgICAgICAgLy8gbGlrZSAyMDE0XG4gICAgICAgICAgcmV0dXJuIG91dHB1dENhbCA/IHN0cmluZyh7IHllYXI6ICdudW1lcmljJyB9LCAneWVhcicpIDogX3RoaXMubnVtKGR0LnllYXIpO1xuICAgICAgICBjYXNlICd5eSc6XG4gICAgICAgICAgLy8gbGlrZSAxNFxuICAgICAgICAgIHJldHVybiBvdXRwdXRDYWwgPyBzdHJpbmcoeyB5ZWFyOiAnMi1kaWdpdCcgfSwgJ3llYXInKSA6IF90aGlzLm51bShkdC55ZWFyLnRvU3RyaW5nKCkuc2xpY2UoLTIpLCAyKTtcbiAgICAgICAgY2FzZSAneXl5eSc6XG4gICAgICAgICAgLy8gbGlrZSAwMDEyXG4gICAgICAgICAgcmV0dXJuIG91dHB1dENhbCA/IHN0cmluZyh7IHllYXI6ICdudW1lcmljJyB9LCAneWVhcicpIDogX3RoaXMubnVtKGR0LnllYXIsIDQpO1xuICAgICAgICBjYXNlICd5eXl5eXknOlxuICAgICAgICAgIC8vIGxpa2UgMDAwMDEyXG4gICAgICAgICAgcmV0dXJuIG91dHB1dENhbCA/IHN0cmluZyh7IHllYXI6ICdudW1lcmljJyB9LCAneWVhcicpIDogX3RoaXMubnVtKGR0LnllYXIsIDYpO1xuICAgICAgICAvLyBlcmFzXG4gICAgICAgIGNhc2UgJ0cnOlxuICAgICAgICAgIC8vIGxpa2UgQURcbiAgICAgICAgICByZXR1cm4gZXJhKCdzaG9ydCcpO1xuICAgICAgICBjYXNlICdHRyc6XG4gICAgICAgICAgLy8gbGlrZSBBbm5vIERvbWluaVxuICAgICAgICAgIHJldHVybiBlcmEoJ2xvbmcnKTtcbiAgICAgICAgY2FzZSAnR0dHR0cnOlxuICAgICAgICAgIHJldHVybiBlcmEoJ25hcnJvdycpO1xuICAgICAgICBjYXNlICdrayc6XG4gICAgICAgICAgcmV0dXJuIF90aGlzLm51bShkdC53ZWVrWWVhci50b1N0cmluZygpLnNsaWNlKC0yKSwgMik7XG4gICAgICAgIGNhc2UgJ2tra2snOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQud2Vla1llYXIsIDQpO1xuICAgICAgICBjYXNlICdXJzpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LndlZWtOdW1iZXIpO1xuICAgICAgICBjYXNlICdXVyc6XG4gICAgICAgICAgcmV0dXJuIF90aGlzLm51bShkdC53ZWVrTnVtYmVyLCAyKTtcbiAgICAgICAgY2FzZSAnbyc6XG4gICAgICAgICAgcmV0dXJuIF90aGlzLm51bShkdC5vcmRpbmFsKTtcbiAgICAgICAgY2FzZSAnb29vJzpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0Lm9yZGluYWwsIDMpO1xuICAgICAgICBjYXNlICdxJzpcbiAgICAgICAgICAvLyBsaWtlIDFcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LnF1YXJ0ZXIpO1xuICAgICAgICBjYXNlICdxcSc6XG4gICAgICAgICAgLy8gbGlrZSAwMVxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQucXVhcnRlciwgMik7XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgcmV0dXJuIG1heWJlTWFjcm8odG9rZW4pO1xuICAgICAgfVxuICAgIH07XG5cbiAgICByZXR1cm4gc3RyaW5naWZ5VG9rZW5zKEZvcm1hdHRlci5wYXJzZUZvcm1hdChmbXQpLCB0b2tlblRvU3RyaW5nKTtcbiAgfTtcblxuICBGb3JtYXR0ZXIucHJvdG90eXBlLmZvcm1hdER1cmF0aW9uRnJvbVN0cmluZyA9IGZ1bmN0aW9uIGZvcm1hdER1cmF0aW9uRnJvbVN0cmluZyhkdXIsIGZtdCkge1xuICAgIHZhciBfdGhpczIgPSB0aGlzO1xuXG4gICAgdmFyIHRva2VuVG9GaWVsZCA9IGZ1bmN0aW9uIHRva2VuVG9GaWVsZCh0b2tlbikge1xuICAgICAgc3dpdGNoICh0b2tlblswXSkge1xuICAgICAgICBjYXNlICdTJzpcbiAgICAgICAgICByZXR1cm4gJ21pbGxpc2Vjb25kJztcbiAgICAgICAgY2FzZSAncyc6XG4gICAgICAgICAgcmV0dXJuICdzZWNvbmQnO1xuICAgICAgICBjYXNlICdtJzpcbiAgICAgICAgICByZXR1cm4gJ21pbnV0ZSc7XG4gICAgICAgIGNhc2UgJ2gnOlxuICAgICAgICAgIHJldHVybiAnaG91cic7XG4gICAgICAgIGNhc2UgJ2QnOlxuICAgICAgICAgIHJldHVybiAnZGF5JztcbiAgICAgICAgY2FzZSAnTSc6XG4gICAgICAgICAgcmV0dXJuICdtb250aCc7XG4gICAgICAgIGNhc2UgJ3knOlxuICAgICAgICAgIHJldHVybiAneWVhcic7XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgfSxcbiAgICAgICAgdG9rZW5Ub1N0cmluZyA9IGZ1bmN0aW9uIHRva2VuVG9TdHJpbmcobGlsZHVyKSB7XG4gICAgICByZXR1cm4gZnVuY3Rpb24gKHRva2VuKSB7XG4gICAgICAgIHZhciBtYXBwZWQgPSB0b2tlblRvRmllbGQodG9rZW4pO1xuICAgICAgICBpZiAobWFwcGVkKSB7XG4gICAgICAgICAgcmV0dXJuIF90aGlzMi5udW0obGlsZHVyLmdldChtYXBwZWQpLCB0b2tlbi5sZW5ndGgpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldHVybiB0b2tlbjtcbiAgICAgICAgfVxuICAgICAgfTtcbiAgICB9LFxuICAgICAgICB0b2tlbnMgPSBGb3JtYXR0ZXIucGFyc2VGb3JtYXQoZm10KSxcbiAgICAgICAgcmVhbFRva2VucyA9IHRva2Vucy5yZWR1Y2UoZnVuY3Rpb24gKGZvdW5kLCBfcmVmMikge1xuICAgICAgdmFyIGxpdGVyYWwgPSBfcmVmMi5saXRlcmFsLFxuICAgICAgICAgIHZhbCA9IF9yZWYyLnZhbDtcbiAgICAgIHJldHVybiBsaXRlcmFsID8gZm91bmQgOiBmb3VuZC5jb25jYXQodmFsKTtcbiAgICB9LCBbXSksXG4gICAgICAgIGNvbGxhcHNlZCA9IGR1ci5zaGlmdFRvLmFwcGx5KGR1ciwgcmVhbFRva2Vucy5tYXAodG9rZW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5eXknOlxuICAgICAgICByZXR1cm4gaW50VW5pdCgvXFxkezQsNn0vKTtcbiAgICAgIGNhc2UgJ3l5eXl5eSc6XG4gICAgICAgIHJldHVybiBpbnRVbml0KC9cXGR7Nn0vKTtcbiAgICAgIC8vIG1vbnRoc1xuICAgICAgY2FzZSAnTSc6XG4gICAgICAgIHJldHVybiBpbnRVbml0KG9uZU9yVHdvKTtcbiAgICAgIGNhc2UgJ01NJzpcbiAgICAgICAgcmV0dXJuIGludFVuaXQodHdvKTtcbiAgICAgIGNhc2UgJ01NTSc6XG4gICAgICAgIHJldHVybiBvbmVPZihsb2MubW9udGhzKCdzaG9ydCcsIGZhbHNlLCBmYWxzZSksIDEpO1xuICAgICAgY2FzZSAnTU1NTSc6XG4gICAgICAgIHJldHVybiBvbmVPZihsb2MubW9udGhzKCdsb25nJywgZmFsc2UsIGZhbHNlKSwgMSk7XG4gICAgICBjYXNlICdMJzpcbiAgICAgICAgcmV0dXJuIGludFVuaXQob25lT3JUd28pO1xuICAgICAgY2FzZSAnTEwnOlxuICAgICAgICByZXR1cm4gaW50VW5pdCh0d28pO1xuICAgICAgY2FzZSAnTExMJzpcbiAgICAgICAgcmV0dXJuIG9uZU9mKGxvYy5tb250aHMoJ3Nob3J0JywgdHJ1ZSwgZmFsc2UpLCAxKTtcbiAgICAgIGNhc2UgJ0xMTEwnOlxuICAgICAgICByZXR1cm4gb25lT2YobG9jLm1vbnRocygnbG9uZycsIHRydWUsIGZhbHNlKSwgMSk7XG4gICAgICAvLyBkYXRlc1xuICAgICAgY2FzZSAnZCc6XG4gICAgICAgIHJldHVybiBpbnRVbml0KG9uZU9yVHdvKTtcbiAgICAgIGNhc2UgJ2RkJzpcbiAgICAgICAgcmV0dXJuIGludFVuaXQodHdvKTtcbiAgICAgIC8vIG9yZGluYWxzXG4gICAgICBjYXNlICdvJzpcbiAgICAgICAgcmV0dXJuIGludFVuaXQob25lVG9UaHJlZSk7XG4gICAgICBjYXNlICdvb28nOlxuICAgICAgICByZXR1cm4gaW50VW5pdCh0aHJlZSk7XG4gICAgICAvLyB0aW1lXG4gICAgICBjYXNlICdISCc6XG4gICAgICAgIHJldHVybiBpbnRVbml0KHR3byk7XG4gICAgICBjYXNlICdIJzpcbiAgICAgICAgcmV0dXJuIGludFVuaXQob25lT3JUd28pO1xuICAgICAgY2FzZSAnaGgnOlxuICAgICAgICByZXR1cm4gaW50VW5pdCh0d28pO1xuICAgICAgY2FzZSAnaCc6XG4gICAgICAgIHJldHVybiBpbnRVbml0KG9uZU9yVHdvKTtcbiAgICAgIGNhc2UgJ21tJzpcbiAgICAgICAgcmV0dXJuIGludFVuaXQodHdvKTtcbiAgICAgIGNhc2UgJ20nOlxuICAgICAgICByZXR1cm4gaW50VW5pdChvbmVPclR3byk7XG4gICAgICBjYXNlICdzJzpcbiAgICAgICAgcmV0dXJuIGludFVuaXQob25lT3JUd28pO1xuICAgICAgY2FzZSAnc3MnOlxuICAgICAgICByZXR1cm4gaW50VW5pdCh0d28pO1xuICAgICAgY2FzZSAnUyc6XG4gICAgICAgIHJldHVybiBpbnRVbml0KG9uZVRvVGhyZWUpO1xuICAgICAgY2FzZSAnU1NTJzpcbiAgICAgICAgcmV0dXJuIGludFVuaXQodGhyZWUpO1xuICAgICAgY2FzZSAndSc6XG4gICAgICAgIHJldHVybiBzaW1wbGUoL1xcZHsxLDl9Lyk7XG4gICAgICAvLyBtZXJpZGllbVxuICAgICAgY2FzZSAnYSc6XG4gICAgICAgIHJldHVybiBvbmVPZihsb2MubWVyaWRpZW1zKCksIDApO1xuICAgICAgLy8gd2Vla1llYXIgKGspXG4gICAgICBjYXNlICdra2trJzpcbiAgICAgICAgcmV0dXJuIGludFVuaXQoZm91cik7XG4gICAgICBjYXNlICdrayc6XG4gICAgICAgIHJldHVybiBpbnRVbml0KHR3b1RvRm91ciwgdW50cnVuY2F0ZVllYXIpO1xuICAgICAgLy8gd2Vla051bWJlciAoVylcbiAgICAgIGNhc2UgJ1cnOlxuICAgICAgICByZX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3IuanMgaW4gcjExNDkwMykuXG4gKlxuICogQHBhcmFtIHtmdW5jdGlvbn0gY3RvciBDb25zdHJ1Y3RvciBmdW5jdGlvbiB3aGljaCBuZWVkcyB0byBpbmhlcml0IHRoZVxuICogICAgIHByb3RvdHlwZS5cbiAqIEBwYXJhbSB7ZnVuY3Rpb259IHN1cGVyQ3RvciBDb25zdHJ1Y3RvciBmdW5jdGlvbiB0byBpbmhlcml0IHByb3RvdHlwZSBmcm9tLlxuICovXG5leHBvcnRzLmluaGVyaXRzID0gcmVxdWlyZSgnaW5oZXJpdHMnKTtcblxuZXhwb3J0cy5fZXh0ZW5kID0gZnVuY3Rpb24ob3JpZ2luLCBhZGQpIHtcbiAgLy8gRG9uJ3QgZG8gYW55dGhpbmcgaWYgYWRkIGlzbid0IGFuIG9iamVjdFxuICBpZiAoIWFkZCB8fCAhaXNPYmplY3QoYWRkKSkgcmV0dXJuIG9yaWdpbjtcblxuICB2YXIga2V5cyA9IE9iamVjdC5rZXlzKGFkZCk7XG4gIHZhciBpID0ga2V5cy5sZW5ndGg7XG4gIHdoaWxlIChpLS0pIHtcbiAgICBvcmlnaW5ba2V5c1tpXV0gPSBhZGRba2V5c1tpXV07XG4gIH1cbiAgcmV0dXJuIG9yaWdpbjtcbn07XG5cbmZ1bmN0aW9uIGhhc093blByb3BlcnR5KG9iaiwgcHJvcCkge1xuICByZXR1cm4gT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKG9iaiwgcHJvcCk7XG59XG4iXX0=
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tungsten
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-08-
|
12
|
+
date: 2018-08-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -316,12 +316,12 @@ files:
|
|
316
316
|
- lib/tungsten.rb
|
317
317
|
- lib/tungsten/helper.rb
|
318
318
|
- lib/tungsten/version.rb
|
319
|
-
- public/code-0.2.
|
320
|
-
- public/code-0.2.
|
321
|
-
- public/tungsten-0.2.
|
322
|
-
- public/tungsten-0.2.
|
323
|
-
- public/tungsten-0.2.
|
324
|
-
- public/tungsten-0.2.
|
319
|
+
- public/code-0.2.9.js
|
320
|
+
- public/code-0.2.9.js.gz
|
321
|
+
- public/tungsten-0.2.9.css
|
322
|
+
- public/tungsten-0.2.9.css.gz
|
323
|
+
- public/tungsten-0.2.9.js
|
324
|
+
- public/tungsten-0.2.9.js.gz
|
325
325
|
homepage:
|
326
326
|
licenses:
|
327
327
|
- MIT
|
Binary file
|
data/public/tungsten-0.2.8.js.gz
DELETED
Binary file
|