fleetio_spark 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Binary file
@@ -34,7 +34,7 @@ module.exports = {
34
34
  return name+'="'+source+'" ' }
35
35
 
36
36
  function dasherize( input ) {
37
- return input.replace(/[\W,_]/g, '-').replace(/-{2,}/g, '-')
37
+ return input.replace(/[\\W,_]/g, '-').replace(/-{2,}/g, '-')
38
38
  }
39
39
 
40
40
  function svgName( name ) {
@@ -97,26 +97,25 @@ module.exports = {
97
97
  else window.esvg = esvg
98
98
 
99
99
  })()
100
+
100
101
  },{}],3:[function(require,module,exports){
101
102
  (function(){
102
103
 
103
104
  function embed() {
105
+ if ( !document.body ) return requestAnimationFrame( embed )
104
106
  if (!document.querySelector('#esvg-svg-icons')) {
105
- document.querySelector('body').insertAdjacentHTML('afterbegin', '<svg id="esvg-svg-icons" data-symbol-class="icon" data-prefix="svg" version="1.1" style="height:0;position:absolute" data-turbolinks-permanent><defs><clipPath id="def-svg-question-0"><rect width="24" height="24" fill="white"/></clipPath></defs><symbol id="svg-add" data-name="add" viewBox="0 0 24 24" width="24" height="24" ><path d="M0 12C0 12.3978 0.158035 12.7794 0.43934 13.0607C0.720644 13.342 1.10218 13.5 1.5 13.5H10.25C10.3163 13.5 10.3799 13.5263 10.4268 13.5732C10.4737 13.6201 10.5 13.6837 10.5 13.75V22.5C10.5 22.8978 10.658 23.2794 10.9393 23.5607C11.2206 23.842 11.6022 24 12 24C12.3978 24 12.7794 23.842 13.0607 23.5607C13.342 23.2794 13.5 22.8978 13.5 22.5V13.75C13.5 13.6837 13.5263 13.6201 13.5732 13.5732C13.6201 13.5263 13.6837 13.5 13.75 13.5H22.5C22.8978 13.5 23.2794 13.342 23.5607 13.0607C23.842 12.7794 24 12.3978 24 12C24 11.6022 23.842 11.2206 23.5607 10.9393C23.2794 10.658 22.8978 10.5 22.5 10.5H13.75C13.6837 10.5 13.6201 10.4737 13.5732 10.4268C13.5263 10.3799 13.5 10.3163 13.5 10.25V1.5C13.5 1.10218 13.342 0.720644 13.0607 0.43934C12.7794 0.158035 12.3978 0 12 0C11.6022 0 11.2206 0.158035 10.9393 0.43934C10.658 0.720644 10.5 1.10218 10.5 1.5V10.25C10.5 10.3163 10.4737 10.3799 10.4268 10.4268C10.3799 10.4737 10.3163 10.5 10.25 10.5H1.5C1.10218 10.5 0.720644 10.658 0.43934 10.9393C0.158035 11.2206 0 11.6022 0 12H0Z"/></symbol><symbol id="svg-admin-user" data-name="admin-user" viewBox="0 0 24 24" width="24" height="24" ><path d="M13.019 16.5C13.019 16.2348 12.9136 15.9804 12.7261 15.7929C12.5386 15.6054 12.2842 15.5 12.019 15.5H8.105C8.04894 15.5006 7.99435 15.4821 7.95019 15.4476C7.90603 15.4131 7.87493 15.3645 7.862 15.31C7.62066 14.2233 7.50159 13.1131 7.507 12C7.50527 11.0608 7.59029 10.1235 7.761 9.2C7.77322 9.14295 7.80478 9.09188 7.85034 9.05543C7.8959 9.01898 7.95266 8.9994 8.011 9C18.884 9 21.566 9.008 22.291 8.982C22.4536 8.99166 22.6158 8.95874 22.7618 8.88649C22.9077 8.81425 23.0323 8.70518 23.1232 8.57006C23.214 8.43494 23.2681 8.27844 23.28 8.11604C23.2919 7.95363 23.2612 7.79092 23.191 7.644C22.3168 5.37744 20.7721 3.43142 18.763 2.06562C16.754 0.699831 14.3762 -0.0207647 11.947 1.65624e-06C8.82776 0.0742654 5.85467 1.33714 3.63553 3.53044C1.41638 5.72375 0.118784 8.68184 0.00799855 11.8C-0.0506557 14.9267 1.11632 17.9522 3.2594 20.2296C5.40247 22.5071 8.35154 23.8557 11.476 23.987H11.52C11.7618 23.9874 11.9955 23.9001 12.1779 23.7414C12.3603 23.5827 12.479 23.3633 12.5121 23.1238C12.5452 22.8842 12.4903 22.6409 12.3578 22.4387C12.2252 22.2365 12.0238 22.0892 11.791 22.024C11.594 21.9571 11.4246 21.827 11.309 21.654C10.3819 20.446 9.53287 19.1801 8.767 17.864C8.74682 17.8259 8.73684 17.7832 8.73802 17.7401C8.73921 17.697 8.75152 17.655 8.77376 17.618C8.79601 17.5811 8.82742 17.5505 8.86496 17.5293C8.9025 17.5081 8.94488 17.497 8.988 17.497H12.019C12.2837 17.497 12.5376 17.3921 12.725 17.2052C12.9125 17.0183 13.0182 16.7647 13.019 16.5ZM5.8 15.2C5.80761 15.2363 5.80699 15.2739 5.79818 15.31C5.78938 15.3461 5.77263 15.3797 5.74914 15.4085C5.72565 15.4373 5.69602 15.4604 5.66243 15.4762C5.62884 15.4921 5.59213 15.5002 5.555 15.5H2.818C2.76624 15.4999 2.71579 15.4838 2.67354 15.4539C2.63129 15.424 2.59932 15.3818 2.582 15.333C1.8781 13.3512 1.81895 11.1975 2.413 9.18C2.42829 9.12816 2.45991 9.08263 2.50315 9.0502C2.54639 9.01777 2.59895 9.00016 2.653 9H5.46C5.49593 9.00035 5.53137 9.00837 5.56395 9.02354C5.59652 9.0387 5.62548 9.06066 5.64887 9.08794C5.67226 9.11521 5.68955 9.14717 5.69958 9.18168C5.7096 9.21619 5.71213 9.25244 5.707 9.288C5.57163 10.1856 5.50477 11.0922 5.507 12C5.50419 13.0735 5.60229 14.1449 5.8 15.2V15.2ZM11.859 2.27C11.9015 2.23977 11.9523 2.22353 12.0045 2.22353C12.0566 2.22353 12.1075 2.23977 12.15 2.27C13.6529 3.39307 14.8158 4.91002 15.51 6.653C15.526 6.69105 15.5324 6.73248 15.5285 6.77358C15.5246 6.81468 15.5106 6.85417 15.4877 6.88854C15.4648 6.9229 15.4338 6.95107 15.3974 6.97052C15.3609 6.98997 15.3203 7.0001 15.279 7H8.729C8.68799 7.00014 8.6476 6.99006 8.61146 6.97068C8.57532 6.9513 8.54458 6.92323 8.522 6.889C8.49909 6.85455 8.48509 6.81496 8.48125 6.77377C8.47741 6.73259 8.48385 6.69109 8.5 6.653C9.1891 4.90739 10.3526 3.38924 11.859 2.27V2.27ZM20.44 6.614C20.4645 6.65183 20.4784 6.69559 20.4801 6.74064C20.4817 6.78569 20.4712 6.83036 20.4496 6.86992C20.428 6.90947 20.3961 6.94245 20.3572 6.96535C20.3184 6.98825 20.2741 7.00022 20.229 7H17.946C17.8934 7.00002 17.8422 6.98352 17.7994 6.95284C17.7567 6.92216 17.7248 6.87884 17.708 6.829C17.2966 5.57262 16.6979 4.38557 15.932 3.308C15.8999 3.26306 15.8835 3.20875 15.8855 3.15354C15.8875 3.09833 15.9077 3.04534 15.943 3.00284C15.9783 2.96035 16.0267 2.93074 16.0806 2.91865C16.1345 2.90655 16.1909 2.91266 16.241 2.936C17.9645 3.73386 19.4221 5.01062 20.44 6.614V6.614ZM7.74 2.968C7.79002 2.94415 7.84656 2.9376 7.90071 2.94938C7.95486 2.96116 8.00357 2.99059 8.03917 3.03307C8.07477 3.07554 8.09525 3.12863 8.09739 3.18401C8.09954 3.23939 8.08321 3.29391 8.051 3.339C7.29845 4.40818 6.70995 5.58383 6.305 6.827C6.28877 6.87714 6.25711 6.92086 6.21455 6.95193C6.17199 6.983 6.12069 6.99982 6.068 7H3.805C3.76016 6.99993 3.71616 6.98779 3.67762 6.96487C3.63908 6.94195 3.60741 6.90908 3.58594 6.86971C3.56447 6.83035 3.55398 6.78593 3.55557 6.74112C3.55717 6.6963 3.57078 6.65274 3.595 6.615C4.60943 5.0365 6.0452 3.77324 7.74 2.968V2.968ZM8.091 20.7C8.12313 20.7449 8.13948 20.7993 8.13748 20.8545C8.13548 20.9097 8.11525 20.9627 8.07995 21.0052C8.04465 21.0477 7.99627 21.0773 7.94237 21.0894C7.88846 21.1015 7.83207 21.0953 7.782 21.072C6.24716 20.3591 4.91885 19.2676 3.922 17.9C3.89414 17.8629 3.87718 17.8187 3.87301 17.7725C3.86884 17.7262 3.87763 17.6797 3.89839 17.6382C3.91915 17.5967 3.95107 17.5617 3.99057 17.5373C4.03006 17.5129 4.07557 17.5 4.122 17.5H6.246C6.29693 17.5002 6.3466 17.5159 6.3884 17.545C6.43019 17.5742 6.46214 17.6153 6.48 17.663C6.8817 18.7415 7.42333 19.7626 8.091 20.7V20.7Z"/><path d="M18.769 17.7C19.4441 17.7002 20.1041 17.5002 20.6655 17.1252C21.227 16.7503 21.6646 16.2172 21.923 15.5936C22.1815 14.9699 22.2491 14.2836 22.1175 13.6214C21.9858 12.9593 21.6607 12.351 21.1834 11.8736C20.706 11.3963 20.0978 11.0712 19.4356 10.9395C18.7734 10.8079 18.0871 10.8755 17.4634 11.134C16.8398 11.3924 16.3067 11.83 15.9318 12.3915C15.5568 12.9529 15.3568 13.6129 15.357 14.288C15.357 15.1929 15.7165 16.0608 16.3564 16.7007C16.9962 17.3405 17.8641 17.7 18.769 17.7Z"/><path d="M13.548 23.445C13.5405 23.515 13.5479 23.5857 13.5697 23.6526C13.5915 23.7196 13.6271 23.7811 13.6743 23.8333C13.7215 23.8855 13.7792 23.9272 13.8436 23.9556C13.908 23.9839 13.9776 23.9984 14.048 23.998H23.495C23.5654 23.9984 23.635 23.9839 23.6994 23.9556C23.7638 23.9272 23.8215 23.8855 23.8687 23.8333C23.9159 23.7811 23.9515 23.7196 23.9733 23.6526C23.9951 23.5857 24.0025 23.515 23.995 23.445C23.8589 22.1552 23.2501 20.9614 22.2861 20.0938C21.3221 19.2261 20.071 18.746 18.774 18.746C17.477 18.746 16.2259 19.2261 15.2619 20.0938C14.2979 20.9614 13.6891 22.1552 13.553 23.445H13.548Z"/></symbol><symbol id="svg-chevron-down" data-name="chevron-down" viewBox="0 0 24 24" width="24" height="24" ><path d="M1.249 7.207L12.233 19.678C12.3325 19.7818 12.452 19.8644 12.5842 19.9208C12.7164 19.9772 12.8587 20.0063 13.0025 20.0063C13.1463 20.0063 13.2886 19.9772 13.4208 19.9208C13.553 19.8644 13.6725 19.7818 13.772 19.678L24.751 7.207C24.8388 7.10807 24.9058 6.9925 24.9481 6.86715C24.9904 6.7418 25.007 6.60924 24.997 6.47734C24.987 6.34543 24.9506 6.21688 24.89 6.09932C24.8294 5.98176 24.7457 5.87759 24.644 5.793L22.794 4.236C22.5877 4.06208 22.3213 3.97624 22.0523 3.997C21.7832 4.01777 21.5332 4.14348 21.356 4.347L13.191 13.8C13.1675 13.8273 13.1384 13.8492 13.1057 13.8642C13.073 13.8792 13.0375 13.8869 13.0015 13.8869C12.9655 13.8869 12.93 13.8792 12.8973 13.8642C12.8646 13.8492 12.8355 13.8273 12.812 13.8L4.644 4.346C4.46669 4.14342 4.21654 4.01906 3.948 4C3.81485 3.98813 3.68067 4.00308 3.5534 4.04396C3.42612 4.08483 3.30834 4.15082 3.207 4.238L1.356 5.793C1.25372 5.87744 1.16949 5.98161 1.10833 6.09929C1.04717 6.21698 1.01032 6.34577 1 6.478C0.98999 6.61004 1.0069 6.74274 1.0497 6.86805C1.0925 6.99336 1.16031 7.10868 1.249 7.207Z"/></symbol><symbol id="svg-chevron-up" data-name="chevron-up" viewBox="0 0 24 24" width="24" height="24" ><path d="M23.751 16.793L12.767 4.322C12.6675 4.21822 12.548 4.13563 12.4158 4.07922C12.2836 4.0228 12.1413 3.99372 11.9975 3.99372C11.8537 3.99372 11.7114 4.0228 11.5792 4.07922C11.447 4.13563 11.3275 4.21822 11.228 4.322L0.248998 16.793C0.161188 16.8919 0.0941599 17.0075 0.0518975 17.1329C0.00963515 17.2582 -0.0069996 17.3908 0.00298173 17.5227C0.0129631 17.6546 0.0493568 17.7831 0.11 17.9007C0.170644 18.0182 0.2543 18.1224 0.355998 18.207L2.206 19.764C2.41229 19.9379 2.6787 20.0238 2.94773 20.003C3.21676 19.9822 3.46684 19.8565 3.644 19.653L11.809 10.2C11.8325 10.1727 11.8615 10.1508 11.8943 10.1358C11.927 10.1208 11.9625 10.1131 11.9985 10.1131C12.0345 10.1131 12.07 10.1208 12.1027 10.1358C12.1354 10.1508 12.1645 10.1727 12.188 10.2L20.356 19.65C20.444 19.7513 20.5511 19.8343 20.6713 19.8942C20.7914 19.9541 20.9221 19.9897 21.056 19.999C21.1891 20.0109 21.3233 19.9959 21.4506 19.955C21.5779 19.9142 21.6957 19.8482 21.797 19.761L23.648 18.203C23.7495 18.1182 23.8329 18.014 23.8934 17.8965C23.9539 17.7789 23.9902 17.6504 24.0001 17.5186C24.0101 17.3868 23.9936 17.2543 23.9515 17.129C23.9094 17.0037 23.8425 16.8881 23.755 16.789L23.751 16.793Z"/></symbol><symbol id="svg-close" data-name="close" viewBox="0 0 25 25" width="25" height="25" ><path d="M0.439005 21.44C0.157743 21.7214 -0.000215771 22.103 -0.000121997 22.5009C-2.82229e-05 22.8987 0.15811 23.2802 0.439505 23.5615C0.7209 23.8428 1.1025 24.0007 1.50036 24.0006C1.89822 24.0005 2.27974 23.8424 2.56101 23.561L11.823 14.3C11.8462 14.2767 11.8738 14.2582 11.9042 14.2456C11.9346 14.233 11.9671 14.2266 12 14.2266C12.0329 14.2266 12.0654 14.233 12.0958 14.2456C12.1262 14.2582 12.1538 14.2767 12.177 14.3L21.439 23.563C21.5783 23.7023 21.7436 23.8129 21.9256 23.8883C22.1076 23.9637 22.3027 24.0026 22.4997 24.0026C22.6967 24.0027 22.8917 23.9639 23.0738 23.8886C23.2558 23.8132 23.4212 23.7028 23.5605 23.5635C23.6998 23.4242 23.8104 23.2589 23.8858 23.0769C23.9612 22.8949 24.0001 22.6999 24.0001 22.5029C24.0002 22.3059 23.9614 22.1108 23.8861 21.9288C23.8107 21.7467 23.7003 21.5813 23.561 21.442L14.3 12.177C14.2767 12.1538 14.2583 12.1262 14.2456 12.0958C14.233 12.0654 14.2266 12.0329 14.2266 12C14.2266 11.9671 14.233 11.9346 14.2456 11.9042C14.2583 11.8738 14.2767 11.8462 14.3 11.823L23.563 2.561C23.8443 2.27934 24.0021 1.89749 24.0018 1.49944C24.0016 1.10139 23.8432 0.719762 23.5615 0.4385C23.2798 0.157238 22.898 -0.000615664 22.4999 -0.000334364C22.1019 -5.30649e-05 21.7203 0.15834 21.439 0.44L12.177 9.7C12.1538 9.72328 12.1262 9.74175 12.0958 9.75436C12.0654 9.76696 12.0329 9.77345 12 9.77345C11.9671 9.77345 11.9346 9.76696 11.9042 9.75436C11.8738 9.74175 11.8462 9.72328 11.823 9.7L2.56101 0.44C2.42174 0.300667 2.25639 0.19013 2.07441 0.114698C1.89242 0.039267 1.69736 0.000419144 1.50036 0.000372715C1.1025 0.000278947 0.7209 0.158238 0.439505 0.4395C0.15811 0.720762 -2.82604e-05 1.10229 -0.000122029 1.50015C-0.000215797 1.898 0.157743 2.27961 0.439005 2.561L9.7 11.823C9.72329 11.8462 9.74176 11.8738 9.75436 11.9042C9.76696 11.9346 9.77345 11.9671 9.77345 12C9.77345 12.0329 9.76696 12.0654 9.75436 12.0958C9.74176 12.1262 9.72329 12.1538 9.7 12.177L0.439005 21.44Z"/></symbol><symbol id="svg-contact" data-name="contact" viewBox="0 0 24 24" width="24" height="24" ><path d="M24.0001 21C23.9979 19.0115 23.2071 17.1051 21.801 15.699C20.395 14.293 18.4885 13.5021 16.5001 13.5C15.6916 13.5003 14.8886 13.633 14.1231 13.893C14.0428 13.9198 13.9706 13.9665 13.9133 14.0288C13.856 14.0911 13.8155 14.167 13.7955 14.2492C13.7755 14.3314 13.7767 14.4174 13.7991 14.4991C13.8214 14.5807 13.864 14.6553 13.9231 14.716C15.5737 16.3911 16.4993 18.6483 16.5001 21V21.024C16.4991 21.0862 16.5106 21.1479 16.5337 21.2056C16.5569 21.2633 16.5913 21.3159 16.6349 21.3602C16.6786 21.4045 16.7306 21.4396 16.7879 21.4636C16.8453 21.4876 16.9069 21.5 16.9691 21.5H23.5001C23.6327 21.5 23.7598 21.4473 23.8536 21.3536C23.9474 21.2598 24.0001 21.1326 24.0001 21Z"/><path d="M13.675 5.53001C13.8078 5.94054 13.9012 6.36278 13.954 6.79101C13.9634 6.86941 13.9912 6.94446 14.0352 7.01003C14.0792 7.07561 14.1381 7.12983 14.2071 7.16826C14.276 7.2067 14.3531 7.22826 14.432 7.23117C14.5109 7.23408 14.5894 7.21826 14.661 7.18501C15.3275 6.87597 15.9302 6.44488 16.438 5.91401C16.4614 5.88963 16.4896 5.87024 16.5207 5.85699C16.5518 5.84374 16.5852 5.83691 16.619 5.83691C16.6528 5.83691 16.6863 5.84374 16.7174 5.85699C16.7485 5.87024 16.7766 5.88963 16.8 5.91401C17.4805 6.62662 18.3292 7.15685 19.268 7.45601C19.3814 7.49225 19.4781 7.56775 19.5408 7.66894C19.6035 7.77012 19.6281 7.89035 19.61 8.00801C19.4991 8.72709 19.1348 9.38282 18.5828 9.85685C18.0308 10.3309 17.3276 10.592 16.6 10.593C16.1879 10.5934 15.78 10.5094 15.4016 10.346C15.0232 10.1826 14.6823 9.94333 14.4 9.64301C14.3419 9.58164 14.2692 9.536 14.1886 9.51036C14.1081 9.48472 14.0224 9.47991 13.9395 9.4964C13.8566 9.51288 13.7792 9.5501 13.7146 9.6046C13.65 9.65909 13.6002 9.72908 13.57 9.80801C13.4534 10.1124 13.314 10.4076 13.153 10.691C13.0963 10.7902 13.0753 10.9059 13.0935 11.0187C13.1117 11.1315 13.168 11.2347 13.253 11.311C14.1396 12.1091 15.2828 12.563 16.4754 12.5904C17.668 12.6177 18.8308 12.2167 19.753 11.46C19.7834 11.435 19.8192 11.4175 19.8576 11.409C19.896 11.4004 19.9358 11.401 19.9739 11.4108C20.012 11.4205 20.0473 11.4391 20.0768 11.465C20.1064 11.491 20.1294 11.5235 20.144 11.56C20.2715 11.8969 20.433 12.2199 20.626 12.524C20.6955 12.6379 20.7871 12.7368 20.8954 12.8148C21.0037 12.8927 21.1265 12.9482 21.2566 12.978C21.3867 13.0078 21.5214 13.0112 21.6528 12.9881C21.7843 12.965 21.9097 12.9158 22.0219 12.8435C22.134 12.7711 22.2305 12.6771 22.3057 12.5668C22.3809 12.4566 22.4333 12.3324 22.4598 12.2016C22.4863 12.0709 22.4863 11.9361 22.4599 11.8053C22.4335 11.6745 22.3812 11.5503 22.306 11.44C21.8362 10.6534 21.6042 9.74761 21.638 8.83201V7.54601C21.64 6.57619 21.3619 5.62642 20.8371 4.81087C20.3123 3.99531 19.5631 3.34869 18.6796 2.94871C17.7961 2.54873 16.8159 2.41242 15.8568 2.55617C14.8976 2.69991 14.0004 3.1176 13.273 3.75901C13.1868 3.83566 13.1298 3.93977 13.1115 4.05367C13.0933 4.16758 13.115 4.28429 13.173 4.38401C13.3812 4.74679 13.5495 5.13103 13.675 5.53001V5.53001Z"/><path d="M12.5 7.5C12.5 6.5111 12.2068 5.5444 11.6573 4.72215C11.1079 3.89991 10.327 3.25904 9.41342 2.8806C8.49979 2.50217 7.49446 2.40315 6.52455 2.59608C5.55465 2.789 4.66373 3.26521 3.96447 3.96447C3.26521 4.66373 2.789 5.55465 2.59608 6.52455C2.40315 7.49446 2.50217 8.49979 2.8806 9.41342C3.25904 10.327 3.89991 11.1079 4.72215 11.6573C5.5444 12.2068 6.5111 12.5 7.5 12.5C8.8256 12.4984 10.0964 11.9711 11.0338 11.0338C11.9711 10.0964 12.4984 8.8256 12.5 7.5V7.5ZM4.6 6.757C4.61992 6.68206 4.65699 6.61278 4.70829 6.55464C4.7596 6.49649 4.82372 6.45107 4.89559 6.42197C4.96747 6.39287 5.04512 6.38089 5.12243 6.38697C5.19973 6.39305 5.27456 6.41703 5.341 6.457C6.42853 7.13071 7.68073 7.49159 8.96 7.5C9.27096 7.49941 9.58146 7.47602 9.889 7.43C9.96594 7.41851 10.0445 7.42513 10.1184 7.44933C10.1923 7.47353 10.2596 7.51465 10.3148 7.56941C10.3701 7.62417 10.4118 7.69106 10.4366 7.76477C10.4615 7.83848 10.4688 7.91697 10.458 7.994C10.3327 8.73515 9.93369 9.40224 9.34001 9.86327C8.74632 10.3243 8.0012 10.5457 7.25211 10.4835C6.50301 10.4214 5.80452 10.0804 5.29487 9.52787C4.78522 8.97536 4.50156 8.25167 4.5 7.5C4.50037 7.24901 4.53399 6.99916 4.6 6.757V6.757Z"/><path d="M15 21C15 19.0109 14.2098 17.1032 12.8033 15.6967C11.3968 14.2902 9.48912 13.5 7.5 13.5C5.51088 13.5 3.60322 14.2902 2.1967 15.6967C0.790176 17.1032 0 19.0109 0 21C0 21.1326 0.0526784 21.2598 0.146447 21.3536C0.240215 21.4473 0.367392 21.5 0.5 21.5H14.5C14.6326 21.5 14.7598 21.4473 14.8536 21.3536C14.9473 21.2598 15 21.1326 15 21Z"/></symbol><symbol id="svg-dashboard" data-name="dashboard" viewBox="0 0 24 24" width="24" height="24" ><path d="M12 0C9.62663 0 7.30655 0.703788 5.33316 2.02236C3.35977 3.34094 1.8217 5.21509 0.913451 7.4078C0.00519943 9.60051 -0.232441 12.0133 0.230582 14.3411C0.693605 16.6689 1.83649 18.8071 3.51472 20.4853C5.19295 22.1635 7.33115 23.3064 9.65892 23.7694C11.9867 24.2324 14.3995 23.9948 16.5922 23.0866C18.7849 22.1783 20.6591 20.6402 21.9776 18.6668C23.2962 16.6935 24 14.3734 24 12C23.9966 8.81846 22.7312 5.76821 20.4815 3.51852C18.2318 1.26883 15.1815 0.00344108 12 0V0ZM5.14501 8.91L4.27901 8.41C4.10661 8.31054 3.98079 8.14668 3.92922 7.95445C3.87765 7.76223 3.90455 7.55739 4.00401 7.385C4.10346 7.21261 4.26733 7.08679 4.45955 7.03522C4.65178 6.98364 4.85661 7.01054 5.02901 7.11L5.89501 7.61C6.0383 7.69249 6.15032 7.82001 6.21365 7.97274C6.27698 8.12548 6.28806 8.29486 6.24517 8.45454C6.20229 8.61422 6.10784 8.75525 5.97651 8.85571C5.84519 8.95616 5.68435 9.01041 5.51901 9.01C5.38766 9.01054 5.25855 8.97602 5.14501 8.91V8.91ZM5.25001 11.991C5.25001 12.1899 5.17099 12.3807 5.03034 12.5213C4.88968 12.662 4.69892 12.741 4.50001 12.741H3.50001C3.30109 12.741 3.11033 12.662 2.96968 12.5213C2.82902 12.3807 2.75001 12.1899 2.75001 11.991C2.75001 11.7921 2.82902 11.6013 2.96968 11.4607C3.11033 11.32 3.30109 11.241 3.50001 11.241H4.50001C4.69892 11.241 4.88968 11.32 5.03034 11.4607C5.17099 11.6013 5.25001 11.7921 5.25001 11.991ZM14.24 12C14.24 12.445 14.108 12.88 13.8608 13.25C13.6136 13.62 13.2622 13.9084 12.851 14.0787C12.4399 14.249 11.9875 14.2936 11.5511 14.2068C11.1146 14.12 10.7137 13.9057 10.399 13.591C10.0843 13.2763 9.87006 12.8754 9.78324 12.439C9.69642 12.0025 9.74098 11.5501 9.91128 11.139C10.0816 10.7278 10.37 10.3764 10.74 10.1292C11.11 9.88196 11.545 9.75 11.99 9.75C12.0154 9.75014 12.0408 9.75181 12.066 9.755C12.1112 9.75955 12.1567 9.75171 12.1978 9.73233C12.2388 9.71295 12.2738 9.68276 12.299 9.645L15.699 4.571C15.7719 4.46128 15.8657 4.36704 15.9751 4.29369C16.0845 4.22033 16.2073 4.1693 16.3364 4.14354C16.4656 4.11777 16.5986 4.11778 16.7277 4.14355C16.8569 4.16932 16.9797 4.22035 17.089 4.29371C17.1984 4.36707 17.2922 4.46131 17.3651 4.57103C17.438 4.68075 17.4884 4.80378 17.5136 4.93306C17.5388 5.06233 17.5382 5.19531 17.5118 5.32435C17.4855 5.45339 17.4339 5.57595 17.36 5.685L13.993 10.71C13.9679 10.7475 13.9535 10.7911 13.9512 10.8362C13.9489 10.8813 13.9589 10.9261 13.98 10.966C14.1496 11.2843 14.2389 11.6393 14.24 12V12ZM12.758 4.558C12.758 4.75691 12.679 4.94768 12.5383 5.08833C12.3977 5.22898 12.2069 5.308 12.008 5.308C11.8091 5.308 11.6183 5.22898 11.4777 5.08833C11.337 4.94768 11.258 4.75691 11.258 4.558V3.558C11.258 3.35909 11.337 3.16832 11.4777 3.02767C11.6183 2.88702 11.8091 2.808 12.008 2.808C12.2069 2.808 12.3977 2.88702 12.5383 3.02767C12.679 3.16832 12.758 3.35909 12.758 3.558V4.558ZM7.39301 4.025C7.47824 3.97559 7.5724 3.9435 7.67007 3.93059C7.76774 3.91767 7.867 3.92417 7.96215 3.94973C8.0573 3.97528 8.14646 4.01938 8.22452 4.07949C8.30258 4.1396 8.36799 4.21454 8.41701 4.3L8.91701 5.166C8.96646 5.25118 8.9986 5.34528 9.01159 5.44291C9.02458 5.54054 9.01816 5.63977 8.99271 5.73491C8.96725 5.83006 8.92325 5.91924 8.86324 5.99733C8.80323 6.07543 8.72839 6.1409 8.64301 6.19C8.52946 6.25602 8.40035 6.29054 8.26901 6.29C8.13723 6.29029 8.00772 6.25576 7.89358 6.18991C7.77944 6.12406 7.68472 6.02922 7.61901 5.915L7.11901 5.049C7.06969 4.96379 7.03765 4.86969 7.02473 4.77209C7.01181 4.67449 7.01826 4.5753 7.04371 4.48019C7.06916 4.38509 7.1131 4.29593 7.17304 4.21782C7.23298 4.13972 7.30772 4.07419 7.39301 4.025V4.025ZM7.50001 17C7.50001 16.8674 7.55268 16.7402 7.64645 16.6464C7.74022 16.5527 7.8674 16.5 8.00001 16.5H16C16.1326 16.5 16.2598 16.5527 16.3536 16.6464C16.4473 16.7402 16.5 16.8674 16.5 17V19C16.5 19.1326 16.4473 19.2598 16.3536 19.3536C16.2598 19.4473 16.1326 19.5 16 19.5H8.00001C7.8674 19.5 7.74022 19.4473 7.64645 19.3536C7.55268 19.2598 7.50001 19.1326 7.50001 19V17ZM17.809 8.7C17.7097 8.52785 17.6827 8.3233 17.7341 8.1313C17.7855 7.9393 17.911 7.77554 18.083 7.676L18.949 7.176C19.1214 7.07654 19.3262 7.04964 19.5185 7.10122C19.7107 7.15279 19.8746 7.27861 19.974 7.451C20.0735 7.62339 20.1004 7.82823 20.0488 8.02045C19.9972 8.21268 19.8714 8.37654 19.699 8.476L18.832 8.976C18.6597 9.07485 18.4552 9.10131 18.2634 9.04956C18.0716 8.99782 17.9082 8.8721 17.809 8.7ZM18.69 12.065C18.69 11.8661 18.769 11.6753 18.9097 11.5347C19.0503 11.394 19.2411 11.315 19.44 11.315H20.44C20.6389 11.315 20.8297 11.394 20.9703 11.5347C21.111 11.6753 21.19 11.8661 21.19 12.065C21.19 12.2639 21.111 12.4547 20.9703 12.5953C20.8297 12.736 20.6389 12.815 20.44 12.815H19.44C19.2413 12.815 19.0507 12.7361 18.91 12.5957C18.7694 12.4552 18.6903 12.2647 18.69 12.066V12.065Z"/></symbol><symbol id="svg-fuel" data-name="fuel" viewBox="0 0 24 24" width="24" height="24" ><path fill-rule="evenodd" clip-rule="evenodd" d="M23.99 3.35858C24.0275 3.62113 23.9591 3.88783 23.8 4.1L21.75 6.833V8H23C23.1326 8 23.2598 8.05268 23.3536 8.14645C23.4473 8.24021 23.5 8.36739 23.5 8.5V11C23.5 11.0823 23.4796 11.1634 23.4407 11.236C23.4018 11.3085 23.3456 11.3704 23.277 11.416L21.777 12.416L21.75 12.433V15.5C21.75 16.2956 21.4339 17.0587 20.8713 17.6213C20.3087 18.1839 19.5456 18.5 18.75 18.5H18.5C18.3674 18.5 18.2402 18.5527 18.1464 18.6464C18.0527 18.7402 18 18.8674 18 19V22.5C18 22.8978 17.842 23.2794 17.5607 23.5607C17.2794 23.842 16.8978 24 16.5 24H3.5C3.10218 24 2.72064 23.842 2.43934 23.5607C2.15804 23.2794 2 22.8978 2 22.5V1.5C2 1.10218 2.15804 0.720644 2.43934 0.43934C2.72064 0.158035 3.10218 0 3.5 0H16.5C16.8978 0 17.2794 0.158035 17.5607 0.43934C17.842 0.720644 18 1.10218 18 1.5V16C18 16.1326 18.0527 16.2598 18.1464 16.3536C18.2402 16.4473 18.3674 16.5 18.5 16.5H18.75C19.0152 16.5 19.2696 16.3946 19.4571 16.2071C19.6446 16.0196 19.75 15.7652 19.75 15.5V6.5C19.75 6.28363 19.8202 6.0731 19.95 5.9L22.2 2.9C22.3591 2.68783 22.596 2.54756 22.8586 2.51005C22.9886 2.49148 23.121 2.49869 23.2482 2.53129C23.3754 2.56388 23.4949 2.62121 23.6 2.7C23.8122 2.85913 23.9524 3.09603 23.99 3.35858ZM15.8536 7.85355C15.9473 7.75979 16 7.63261 16 7.5V2.5C16 2.36739 15.9473 2.24021 15.8536 2.14645C15.7598 2.05268 15.6326 2 15.5 2H4.5C4.36739 2 4.24021 2.05268 4.14645 2.14645C4.05268 2.24021 4 2.36739 4 2.5V7.5C4 7.63261 4.05268 7.75979 4.14645 7.85355C4.24021 7.94732 4.36739 8 4.5 8H15.5C15.6326 8 15.7598 7.94732 15.8536 7.85355ZM13 11C12.4477 11 12 11.4477 12 12V16C12 16.5523 12.4477 17 13 17H14C14.5523 17 15 16.5523 15 16V12C15 11.4477 14.5523 11 14 11H13Z"/></symbol><symbol id="svg-inspection" data-name="inspection" viewBox="0 0 24 24" width="24" height="24" ><path d="M12 0C9.62663 0 7.30655 0.703788 5.33316 2.02236C3.35977 3.34094 1.8217 5.21509 0.913451 7.4078C0.00519943 9.60051 -0.232441 12.0133 0.230582 14.3411C0.693605 16.6689 1.83649 18.8071 3.51472 20.4853C5.19295 22.1635 7.33115 23.3064 9.65892 23.7694C11.9867 24.2324 14.3995 23.9948 16.5922 23.0866C18.7849 22.1783 20.6591 20.6402 21.9776 18.6668C23.2962 16.6935 24 14.3734 24 12C23.9963 8.81854 22.7308 5.76844 20.4812 3.51881C18.2316 1.26918 15.1815 0.00370522 12 0V0ZM18.927 8.2L12.082 17.489C12.0012 17.5962 11.8998 17.6863 11.7838 17.7539C11.6678 17.8215 11.5395 17.8654 11.4064 17.8829C11.2733 17.9004 11.138 17.8912 11.0085 17.8558C10.879 17.8205 10.7578 17.7597 10.652 17.677L5.76401 13.769C5.66144 13.6869 5.57605 13.5855 5.5127 13.4704C5.44936 13.3553 5.4093 13.2289 5.39481 13.0983C5.36556 12.8346 5.44224 12.5701 5.60801 12.363C5.77377 12.1559 6.01502 12.0231 6.2787 11.9938C6.54237 11.9646 6.80687 12.0412 7.01401 12.207L11.09 15.468L17.317 7.017C17.392 6.90451 17.489 6.80838 17.6021 6.73443C17.7153 6.66048 17.8423 6.61025 17.9754 6.58676C18.1085 6.56327 18.245 6.56702 18.3767 6.59777C18.5083 6.62853 18.6323 6.68565 18.7413 6.7657C18.8502 6.84574 18.9418 6.94705 19.0105 7.06348C19.0792 7.17992 19.1235 7.30907 19.1409 7.44313C19.1582 7.57719 19.1482 7.71339 19.1115 7.84347C19.0747 7.97356 19.012 8.09485 18.927 8.2Z"/></symbol><symbol id="svg-issue" data-name="issue" viewBox="0 0 24 24" width="24" height="24" ><path d="M23 10.586L13.414 1C13.0389 0.625059 12.5303 0.414429 12 0.414429C11.4697 0.414429 10.9611 0.625059 10.586 1L1 10.587C0.625059 10.9621 0.414429 11.4707 0.414429 12.001C0.414429 12.5313 0.625059 13.0399 1 13.415L10.586 23C10.9611 23.3749 11.4697 23.5856 12 23.5856C12.5303 23.5856 13.0389 23.3749 13.414 23L23 13.415C23.1858 13.2293 23.3332 13.0088 23.4338 12.7661C23.5343 12.5234 23.5861 12.2632 23.5861 12.0005C23.5861 11.7378 23.5343 11.4777 23.4338 11.2349C23.3332 10.9922 23.1858 10.7717 23 10.586ZM11.068 6.417C11.068 6.15178 11.1734 5.89743 11.3609 5.70989C11.5484 5.52236 11.8028 5.417 12.068 5.417C12.3332 5.417 12.5876 5.52236 12.7751 5.70989C12.9626 5.89743 13.068 6.15178 13.068 6.417V12.417C13.068 12.6822 12.9626 12.9366 12.7751 13.1241C12.5876 13.3116 12.3332 13.417 12.068 13.417C11.8028 13.417 11.5484 13.3116 11.3609 13.1241C11.1734 12.9366 11.068 12.6822 11.068 12.417V6.417ZM12.119 17.927H12.091C11.6967 17.9255 11.3183 17.7717 11.0346 17.4978C10.751 17.2239 10.5842 16.851 10.569 16.457C10.5617 16.261 10.5935 16.0655 10.6626 15.8819C10.7318 15.6983 10.8368 15.5304 10.9717 15.3879C11.1065 15.2454 11.2684 15.1313 11.4479 15.0521C11.6274 14.973 11.8209 14.9305 12.017 14.927H12.045C12.4394 14.928 12.8182 15.0816 13.1019 15.3556C13.3856 15.6297 13.5523 16.0028 13.567 16.397C13.5743 16.593 13.5425 16.7885 13.4734 16.9721C13.4042 17.1557 13.2992 17.3236 13.1643 17.4661C13.0295 17.6086 12.8676 17.7227 12.6881 17.8019C12.5086 17.881 12.3151 17.9235 12.119 17.927Z"/></symbol><symbol id="svg-leaderboard" data-name="leaderboard" viewBox="0 0 24 24" width="24" height="24" ><path d="M5.5 9.5H1.5C1.10218 9.5 0.720644 9.65804 0.43934 9.93934C0.158035 10.2206 0 10.6022 0 11L0 20C0 20.3978 0.158035 20.7794 0.43934 21.0607C0.720644 21.342 1.10218 21.5 1.5 21.5H5.5C5.63261 21.5 5.75979 21.4473 5.85355 21.3536C5.94732 21.2598 6 21.1326 6 21V10C6 9.86739 5.94732 9.74021 5.85355 9.64645C5.75979 9.55268 5.63261 9.5 5.5 9.5Z"/><path d="M22.5 13.5H18.5C18.3674 13.5 18.2402 13.5527 18.1464 13.6464C18.0527 13.7402 18 13.8674 18 14V21C18 21.1326 18.0527 21.2598 18.1464 21.3536C18.2402 21.4473 18.3674 21.5 18.5 21.5H22.5C22.8978 21.5 23.2794 21.342 23.5607 21.0607C23.842 20.7794 24 20.3978 24 20V15C24 14.6022 23.842 14.2206 23.5607 13.9393C23.2794 13.658 22.8978 13.5 22.5 13.5Z"/><path d="M15 2.5H9C8.60218 2.5 8.22064 2.65804 7.93934 2.93934C7.65804 3.22064 7.5 3.60218 7.5 4V21C7.5 21.1326 7.55268 21.2598 7.64645 21.3536C7.74021 21.4473 7.86739 21.5 8 21.5H16C16.1326 21.5 16.2598 21.4473 16.3536 21.3536C16.4473 21.2598 16.5 21.1326 16.5 21V4C16.5 3.60218 16.342 3.22064 16.0607 2.93934C15.7794 2.65804 15.3978 2.5 15 2.5ZM13 10.75H11C10.8011 10.75 10.6103 10.671 10.4697 10.5303C10.329 10.3897 10.25 10.1989 10.25 10C10.25 9.80109 10.329 9.61032 10.4697 9.46967C10.6103 9.32902 10.8011 9.25 11 9.25C11.0663 9.25 11.1299 9.22366 11.1768 9.17678C11.2237 9.12989 11.25 9.0663 11.25 9V7C11.25 6.9337 11.2237 6.87011 11.1768 6.82322C11.1299 6.77634 11.0663 6.75 11 6.75C10.8011 6.75 10.6103 6.67098 10.4697 6.53033C10.329 6.38968 10.25 6.19891 10.25 6C10.25 5.80109 10.329 5.61032 10.4697 5.46967C10.6103 5.32902 10.8011 5.25 11 5.25H11.5C11.8314 5.25053 12.149 5.38239 12.3833 5.6167C12.6176 5.85101 12.7495 6.16864 12.75 6.5V9C12.75 9.0663 12.7763 9.12989 12.8232 9.17678C12.8701 9.22366 12.9337 9.25 13 9.25C13.1989 9.25 13.3897 9.32902 13.5303 9.46967C13.671 9.61032 13.75 9.80109 13.75 10C13.75 10.1989 13.671 10.3897 13.5303 10.5303C13.3897 10.671 13.1989 10.75 13 10.75Z"/></symbol><symbol id="svg-logo" data-name="logo" viewBox="0 0 88.42 52.28" width="88" height="52"><title>fleetio-logo-mark-only</title><g><g><path d="M76.44,16.15A4.49,4.49,0,0,0,72,19.89L64.3,0H17.76L10,19.89a4.49,4.49,0,1,0-4.42,5.26V48l10.67-7.74h-.23a6,6,0,1,1,5.62-3.92l.11-.08L54,48.57l22.46-13V25.15a4.5,4.5,0,0,0,0-9Zm-33,4.5H14L20.5,4H61.56L68,20.65H64.45c0-.06,0-.12,0-.18a10.5,10.5,0,1,0-21,0C43.46,20.53,43.47,20.59,43.47,20.65Zm3.5,0c0-.06,0-.12,0-.18a7,7,0,0,1,14,0c0,.06,0,.12,0,.18ZM66,40.32a6,6,0,1,1,6-6A6,6,0,0,1,66,40.32Z" fill="#242b2e"/><polygon points="88.42 28.34 84.68 37.56 83.19 35.07 53.96 52.28 21.73 39.51 0 52.28 21.73 32.37 53.96 45.12 79.97 29.71 78.52 27.27 88.42 28.34" fill="#18cc6c"/></g></g></symbol><symbol id="svg-map" data-name="map" viewBox="0 0 24 24" width="24" height="24" ><path d="M1.79997 18.025L0.466966 22.025C0.391758 22.2503 0.371117 22.4902 0.406742 22.725C0.442368 22.9598 0.533241 23.1828 0.671885 23.3756C0.810528 23.5685 0.992979 23.7256 1.20422 23.8342C1.41547 23.9427 1.64947 23.9996 1.88697 24H22.113C22.3506 23.9999 22.5849 23.9433 22.7964 23.8349C23.0079 23.7264 23.1906 23.5693 23.3295 23.3765C23.4683 23.1836 23.5594 22.9605 23.5951 22.7255C23.6308 22.4905 23.6102 22.2504 23.535 22.025L22.202 18.025C22.1024 17.7266 21.9115 17.4671 21.6563 17.2832C21.4011 17.0992 21.0945 17.0002 20.78 17H15.211C15.1684 17.0001 15.1265 17.0109 15.0893 17.0316C15.052 17.0522 15.0206 17.0819 14.998 17.118C14.212 18.388 13.554 19.38 13.244 19.84C13.1067 20.0438 12.9214 20.2107 12.7045 20.3261C12.4876 20.4415 12.2457 20.5019 12 20.5019C11.7543 20.5019 11.5123 20.4415 11.2954 20.3261C11.0785 20.2107 10.8933 20.0438 10.756 19.84C10.446 19.38 9.78797 18.388 9.00197 17.118C8.97925 17.082 8.94783 17.0523 8.9106 17.0317C8.87336 17.0111 8.83153 17.0002 8.78897 17H3.22097C2.90657 17.0004 2.60024 17.0995 2.34526 17.2835C2.09027 17.4674 1.89953 17.7268 1.79997 18.025V18.025Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12.1184 18.7701C12.082 18.7896 12.0413 18.7999 12 18.8C11.9589 18.8 11.9184 18.7902 11.882 18.7712C11.8456 18.7522 11.8144 18.7247 11.791 18.691C10.697 17.031 5.67395 9.24897 5.67395 6.19997C5.68192 5.37742 5.8519 4.56449 6.17419 3.80766C6.49647 3.05082 6.96473 2.36491 7.55222 1.78913C8.1397 1.21335 8.83489 0.758977 9.59805 0.451984C10.3612 0.144992 11.1774 -0.00860429 12 -2.57111e-05C12.8225 -0.00847247 13.6386 0.145214 14.4017 0.452253C15.1648 0.759293 15.8599 1.21367 16.4474 1.78943C17.0349 2.36518 17.5031 3.05104 17.8254 3.80782C18.1478 4.56459 18.3179 5.37745 18.326 6.19997C18.326 9.24597 13.3 17.029 12.209 18.688C12.186 18.7224 12.1549 18.7506 12.1184 18.7701ZM12 8.99997C13.6569 8.99997 15 7.65682 15 5.99997C15 4.34312 13.6569 2.99997 12 2.99997C10.3431 2.99997 9 4.34312 9 5.99997C9 7.65682 10.3431 8.99997 12 8.99997Z"/></symbol><symbol id="svg-nav-menu" data-name="nav-menu" viewBox="0 0 24 24" width="24" height="24" ><path d="M22.9565 3H1.04348C0.467181 3 0 3.44772 0 4V5C0 5.55228 0.467181 6 1.04348 6H22.9565C23.5328 6 24 5.55228 24 5V4C24 3.44772 23.5328 3 22.9565 3Z"/><path d="M22.9565 10.5H1.04348C0.467181 10.5 0 10.9477 0 11.5V12.5C0 13.0523 0.467181 13.5 1.04348 13.5H22.9565C23.5328 13.5 24 13.0523 24 12.5V11.5C24 10.9477 23.5328 10.5 22.9565 10.5Z"/><path d="M22.9565 18H1.04348C0.467181 18 0 18.4477 0 19V20C0 20.5523 0.467181 21 1.04348 21H22.9565C23.5328 21 24 20.5523 24 20V19C24 18.4477 23.5328 18 22.9565 18Z"/></symbol><symbol id="svg-part" data-name="part" viewBox="0 0 24 24" width="24" height="24" ><path d="M15.973 8.271C16.0166 8.25111 16.0536 8.21909 16.0796 8.17875C16.1055 8.13841 16.1193 8.09146 16.1193 8.0435C16.1193 7.99554 16.1055 7.94858 16.0796 7.90825C16.0536 7.86791 16.0166 7.83589 15.973 7.816L6.21596 3.368C6.15205 3.33961 6.0829 3.32494 6.01296 3.32494C5.94303 3.32494 5.87387 3.33961 5.80996 3.368L1.99296 5.024C1.94787 5.04321 1.90941 5.07526 1.88238 5.11615C1.85535 5.15704 1.84094 5.20498 1.84094 5.254C1.84094 5.30302 1.85535 5.35096 1.88238 5.39185C1.90941 5.43274 1.94787 5.46479 1.99296 5.484L12.283 9.772C12.3465 9.79859 12.4148 9.81178 12.4836 9.81075C12.5524 9.80971 12.6203 9.79448 12.683 9.766L15.973 8.271Z"/><path d="M22.062 5.5C22.1059 5.48025 22.1432 5.44822 22.1694 5.40777C22.1956 5.36732 22.2095 5.32017 22.2095 5.272C22.2095 5.22383 22.1956 5.17669 22.1694 5.13624C22.1432 5.09579 22.1059 5.06376 22.062 5.044L12.4 0.847004C12.2739 0.791941 12.1377 0.763519 12 0.763519C11.8624 0.763519 11.7262 0.791941 11.6 0.847004L8.38002 2.247C8.3358 2.26663 8.29823 2.29867 8.27185 2.33923C8.24548 2.37979 8.23145 2.42713 8.23145 2.4755C8.23145 2.52388 8.24548 2.57122 8.27185 2.61178C8.29823 2.65234 8.3358 2.68438 8.38002 2.704L18.08 7.126C18.145 7.15557 18.2156 7.17087 18.287 7.17087C18.3584 7.17087 18.429 7.15557 18.494 7.126L22.062 5.5Z"/><path d="M0.846 6.63001C0.807998 6.6142 0.766683 6.60802 0.72572 6.61202C0.684758 6.61602 0.645416 6.63007 0.611186 6.65292C0.576957 6.67577 0.548899 6.70672 0.529503 6.74302C0.510107 6.77932 0.499973 6.81985 0.5 6.86101V18.007C0.499984 18.2044 0.558372 18.3973 0.667811 18.5616C0.77725 18.7258 0.932846 18.854 1.115 18.93L11.4 23.217C11.438 23.2328 11.4793 23.239 11.5203 23.235C11.5612 23.231 11.6006 23.2169 11.6348 23.1941C11.669 23.1712 11.6971 23.1403 11.7165 23.104C11.7359 23.0677 11.746 23.0272 11.746 22.986V11.34C11.7459 11.2906 11.7312 11.2424 11.7038 11.2013C11.6765 11.1602 11.6375 11.1281 11.592 11.109L0.846 6.63001Z"/><path d="M13.25 22.944C13.2502 22.9857 13.2608 23.0267 13.2809 23.0633C13.3009 23.0999 13.3298 23.1309 13.3648 23.1535C13.3999 23.1761 13.44 23.1897 13.4816 23.1929C13.5232 23.1961 13.5649 23.189 13.603 23.172L22.914 18.94C23.0887 18.8606 23.2368 18.7325 23.3408 18.5711C23.4447 18.4098 23.4999 18.2219 23.5 18.03V6.88601C23.5 6.8442 23.4896 6.80305 23.4696 6.76633C23.4496 6.72961 23.4208 6.69848 23.3856 6.6758C23.3505 6.65312 23.3103 6.6396 23.2686 6.6365C23.2269 6.63339 23.1851 6.64078 23.147 6.65801L13.4 11.09C13.3562 11.1096 13.3189 11.1414 13.2928 11.1817C13.2667 11.222 13.2529 11.269 13.253 11.317L13.25 22.944Z"/></symbol><symbol id="svg-place" data-name="place" viewBox="0 0 24 24" width="24" height="24" ><path d="M8 0C5.879 0.00238211 3.84555 0.846002 2.34578 2.34578C0.846002 3.84555 0.00238211 5.879 0 8C0 11.343 4.509 18.912 6.576 22.2C6.63331 22.2917 6.71881 22.3624 6.81968 22.4014C6.92055 22.4404 7.03135 22.4456 7.13546 22.4163C7.23956 22.3871 7.33137 22.3248 7.39709 22.2389C7.46282 22.153 7.49893 22.0481 7.5 21.94V16C7.49992 15.6286 7.60325 15.2645 7.79842 14.9486C7.99358 14.6326 8.27287 14.3772 8.605 14.211L11.605 12.711C11.883 12.5724 12.1894 12.5003 12.5 12.5003C12.8106 12.5003 13.117 12.5724 13.395 12.711L13.94 12.984C14.0006 13.0144 14.0668 13.0322 14.1345 13.0362C14.2022 13.0402 14.27 13.0304 14.3338 13.0074C14.3976 12.9844 14.4561 12.9486 14.5056 12.9023C14.5551 12.856 14.5947 12.8001 14.622 12.738C15.3679 11.2565 15.835 9.65045 16 8C15.9976 5.879 15.154 3.84555 13.6542 2.34578C12.1544 0.846002 10.121 0.00238211 8 0V0ZM8 11C7.40666 11 6.82664 10.8241 6.33329 10.4944C5.83994 10.1648 5.45542 9.69623 5.22836 9.14805C5.0013 8.59987 4.94189 7.99667 5.05764 7.41473C5.1734 6.83279 5.45912 6.29824 5.87868 5.87868C6.29824 5.45912 6.83279 5.1734 7.41473 5.05764C7.99667 4.94189 8.59987 5.0013 9.14805 5.22836C9.69623 5.45542 10.1648 5.83994 10.4944 6.33329C10.8241 6.82664 11 7.40666 11 8C11 8.79565 10.6839 9.55871 10.1213 10.1213C9.55871 10.6839 8.79565 11 8 11Z"/><path d="M15.724 15.553L12.724 14.053C12.6545 14.0182 12.5778 14 12.5 14C12.4222 14 12.3455 14.0182 12.276 14.053L9.276 15.553C9.19305 15.5946 9.12331 15.6584 9.07456 15.7373C9.02582 15.8163 9 15.9072 9 16V23.5C9 23.6326 9.05268 23.7598 9.14645 23.8536C9.24021 23.9473 9.36739 24 9.5 24H11C11.1326 24 11.2598 23.9473 11.3536 23.8536C11.4473 23.7598 11.5 23.6326 11.5 23.5V22.5C11.5 22.3674 11.5527 22.2402 11.6464 22.1464C11.7402 22.0527 11.8674 22 12 22H13C13.1326 22 13.2598 22.0527 13.3536 22.1464C13.4473 22.2402 13.5 22.3674 13.5 22.5V23.5C13.5 23.6326 13.5527 23.7598 13.6464 23.8536C13.7402 23.9473 13.8674 24 14 24H15.5C15.6326 24 15.7598 23.9473 15.8536 23.8536C15.9473 23.7598 16 23.6326 16 23.5V16C16 15.9072 15.9742 15.8163 15.9254 15.7373C15.8767 15.6584 15.8069 15.5946 15.724 15.553ZM14 20H11C10.8674 20 10.7402 19.9473 10.6464 19.8536C10.5527 19.7598 10.5 19.6326 10.5 19.5C10.5 19.3674 10.5527 19.2402 10.6464 19.1464C10.7402 19.0527 10.8674 19 11 19H14C14.1326 19 14.2598 19.0527 14.3536 19.1464C14.4473 19.2402 14.5 19.3674 14.5 19.5C14.5 19.6326 14.4473 19.7598 14.3536 19.8536C14.2598 19.9473 14.1326 20 14 20ZM14 17.5H11C10.8674 17.5 10.7402 17.4473 10.6464 17.3536C10.5527 17.2598 10.5 17.1326 10.5 17C10.5 16.8674 10.5527 16.7402 10.6464 16.6464C10.7402 16.5527 10.8674 16.5 11 16.5H14C14.1326 16.5 14.2598 16.5527 14.3536 16.6464C14.4473 16.7402 14.5 16.8674 14.5 17C14.5 17.1326 14.4473 17.2598 14.3536 17.3536C14.2598 17.4473 14.1326 17.5 14 17.5Z"/><path d="M23.692 12.038L17.692 9.538C17.616 9.50639 17.5334 9.49403 17.4514 9.50203C17.3695 9.51002 17.2908 9.53812 17.2224 9.58382C17.1539 9.62953 17.0978 9.69143 17.059 9.76403C17.0202 9.83663 16.9999 9.91768 17 10V23.5C17 23.6326 17.0527 23.7598 17.1464 23.8536C17.2402 23.9473 17.3674 24 17.5 24H23.5C23.6326 24 23.7598 23.9473 23.8536 23.8536C23.9473 23.7598 24 23.6326 24 23.5V12.5C24.0001 12.4012 23.9708 12.3045 23.916 12.2223C23.8612 12.1401 23.7832 12.0759 23.692 12.038ZM22 20H19C18.8674 20 18.7402 19.9473 18.6464 19.8536C18.5527 19.7598 18.5 19.6326 18.5 19.5C18.5 19.3674 18.5527 19.2402 18.6464 19.1464C18.7402 19.0527 18.8674 19 19 19H22C22.1326 19 22.2598 19.0527 22.3536 19.1464C22.4473 19.2402 22.5 19.3674 22.5 19.5C22.5 19.6326 22.4473 19.7598 22.3536 19.8536C22.2598 19.9473 22.1326 20 22 20ZM22 17.5H19C18.8674 17.5 18.7402 17.4473 18.6464 17.3536C18.5527 17.2598 18.5 17.1326 18.5 17C18.5 16.8674 18.5527 16.7402 18.6464 16.6464C18.7402 16.5527 18.8674 16.5 19 16.5H22C22.1326 16.5 22.2598 16.5527 22.3536 16.6464C22.4473 16.7402 22.5 16.8674 22.5 17C22.5 17.1326 22.4473 17.2598 22.3536 17.3536C22.2598 17.4473 22.1326 17.5 22 17.5ZM22 15H19C18.8674 15 18.7402 14.9473 18.6464 14.8536C18.5527 14.7598 18.5 14.6326 18.5 14.5C18.5 14.3674 18.5527 14.2402 18.6464 14.1464C18.7402 14.0527 18.8674 14 19 14H22C22.1326 14 22.2598 14.0527 22.3536 14.1464C22.4473 14.2402 22.5 14.3674 22.5 14.5C22.5 14.6326 22.4473 14.7598 22.3536 14.8536C22.2598 14.9473 22.1326 15 22 15Z"/></symbol><symbol id="svg-question" data-name="question" viewBox="0 0 24 24" width="24" height="24" ><g clip-path="url(#def-svg-question-0)"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.1618 3.44747C10.8132 3.11045 11.5446 2.95895 12.2762 3.00953C13.0078 3.06011 13.7114 3.31083 14.3101 3.73429C14.9089 4.15774 15.3797 4.73763 15.6711 5.41058C15.9625 6.08353 16.0634 6.82365 15.9626 7.55003C15.8618 8.27642 15.5633 8.96112 15.0996 9.52931C14.636 10.0975 14.0251 10.5273 13.3337 10.7717C12.5047 11.0648 11.787 11.6078 11.2795 12.3259C10.7722 13.0438 10.5 13.902 10.5003 14.781L10.5 15.5C10.5 16.3284 11.1716 17 12 17C12.8284 17 13.5 16.3284 13.5 15.5L13.5003 14.7795C13.5001 14.5208 13.5802 14.2685 13.7295 14.0573C13.8787 13.8461 14.0898 13.6864 14.3337 13.6002C15.5436 13.1724 16.6127 12.4203 17.424 11.426C18.2353 10.4317 18.7577 9.23347 18.9341 7.96233C19.1105 6.69119 18.934 5.39603 18.424 4.2184C17.9141 3.04077 17.0902 2.02598 16.0424 1.28496C14.9947 0.543938 13.7634 0.105192 12.4831 0.0166745C11.2028 -0.0718426 9.92289 0.193277 8.78313 0.783055C7.64336 1.37283 6.68765 2.26457 6.02046 3.36082C5.35326 4.45706 5.00025 5.71561 5 6.99893C4.99984 7.82736 5.67129 8.49906 6.49971 8.49922C7.32814 8.49937 7.99984 7.82793 8 6.9995C8.00014 6.26616 8.20187 5.54696 8.58313 4.92052C8.9644 4.29408 9.51053 3.7845 10.1618 3.44747ZM12 24C13.2426 24 14.25 22.9926 14.25 21.75C14.25 20.5074 13.2426 19.5 12 19.5C10.7574 19.5 9.75 20.5074 9.75 21.75C9.75 22.9926 10.7574 24 12 24Z"/></g></symbol><symbol id="svg-reminder" data-name="reminder" viewBox="0 0 24 24" width="24" height="24" ><path fill-rule="evenodd" clip-rule="evenodd" d="M13.5 3.18262V1.5C13.5 1.10218 13.342 0.720644 13.0607 0.43934C12.7794 0.158035 12.3978 0 12 0C11.6022 0 11.2206 0.158035 10.9393 0.43934C10.658 0.720644 10.5 1.10218 10.5 1.5V3.18262C8.83312 3.60469 7.34274 4.55706 6.25798 5.903C5.06583 7.38218 4.44226 9.23909 4.5 11.138V16C4.5 16.3978 4.34196 16.7794 4.06066 17.0607C3.77936 17.342 3.39782 17.5 3 17.5C2.73478 17.5 2.48043 17.6054 2.29289 17.7929C2.10536 17.9804 2 18.2348 2 18.5C2 18.7652 2.10536 19.0196 2.29289 19.2071C2.48043 19.3946 2.73478 19.5 3 19.5H21C21.2652 19.5 21.5196 19.3946 21.7071 19.2071C21.8946 19.0196 22 18.7652 22 18.5C22 18.2348 21.8946 17.9804 21.7071 17.7929C21.5196 17.6054 21.2652 17.5 21 17.5C20.6022 17.5 20.2206 17.342 19.9393 17.0607C19.658 16.7794 19.5 16.3978 19.5 16V11.138C19.5577 9.23909 18.9342 7.38218 17.742 5.903C16.6573 4.55706 15.1669 3.60469 13.5 3.18262ZM14.236 21H9.76401C9.70263 21.0001 9.64343 21.0228 9.59769 21.0637C9.55196 21.1047 9.52288 21.161 9.51601 21.222C9.50511 21.3143 9.49977 21.4071 9.50001 21.5C9.50001 22.163 9.7634 22.7989 10.2322 23.2678C10.7011 23.7366 11.337 24 12 24C12.663 24 13.2989 23.7366 13.7678 23.2678C14.2366 22.7989 14.5 22.163 14.5 21.5C14.5002 21.4071 14.4949 21.3143 14.484 21.222C14.4776 21.1608 14.4486 21.1042 14.4028 21.0632C14.357 21.0222 14.2975 20.9997 14.236 21Z"/></symbol><symbol id="svg-report" data-name="report" viewBox="0 0 24 24" width="24" height="24" ><path d="M23 10.5C23.1326 10.5 23.2598 10.4473 23.3536 10.3536C23.4473 10.2598 23.5 10.1326 23.5 10C23.4968 7.34881 22.4422 4.80712 20.5676 2.93244C18.6929 1.05776 16.1512 0.00317572 13.5 0C13.3674 0 13.2402 0.0526784 13.1464 0.146447C13.0527 0.240215 13 0.367392 13 0.5V9.525C13.0003 9.7836 13.103 10.0315 13.2858 10.2145C13.4686 10.3974 13.7164 10.5005 13.975 10.501L23 10.5Z"/><path d="M23.5 12H14C13.8527 11.9812 13.7032 12.0114 13.5747 12.0859C13.4461 12.1605 13.3457 12.2752 13.2888 12.4125C13.232 12.5497 13.2219 12.7019 13.26 12.8455C13.2982 12.989 13.3825 13.1161 13.5 13.207L20.218 19.925C20.3118 20.0187 20.4389 20.0714 20.5715 20.0714C20.7041 20.0714 20.8313 20.0187 20.925 19.925C21.903 18.9521 22.6783 17.795 23.2062 16.5205C23.734 15.246 24.0038 13.8795 24 12.5C24 12.3674 23.9474 12.2402 23.8536 12.1464C23.7598 12.0527 23.6326 12 23.5 12Z"/><path d="M10.588 24C11.9542 23.9971 13.3062 23.723 14.5657 23.1936C15.8252 22.6642 16.967 21.89 17.925 20.916C18.0188 20.8222 18.0714 20.6951 18.0714 20.5625C18.0714 20.4299 18.0188 20.3028 17.925 20.209L11.207 13.491C11.0889 13.3492 11.0167 13.1748 11 12.991V3.491C11 3.35839 10.9473 3.23121 10.8536 3.13744C10.7598 3.04368 10.6326 2.991 10.5 2.991C7.71405 3.00267 5.04683 4.12058 3.08511 6.09881C1.12338 8.07703 0.0278515 10.7535 0.039521 13.5395C0.0511905 16.3255 1.1691 18.9927 3.14733 20.9544C5.12556 22.9161 7.80205 24.0117 10.588 24V24Z"/></symbol><symbol id="svg-search" data-name="search" viewBox="0 0 25 25" width="25" height="25" ><path d="M24.414 21.591L19.769 16.946C21.1833 14.8289 21.7596 12.2613 21.3857 9.74285C21.0118 7.22435 19.7145 4.93497 17.7461 3.32002C15.7778 1.70506 13.279 0.880008 10.736 1.00534C8.19303 1.13067 5.78756 2.19742 3.98752 3.9981C2.18748 5.79878 1.12157 8.20463 0.997143 10.7477C0.872712 13.2907 1.69865 15.7891 3.3143 17.757C4.92995 19.7248 7.21979 21.0213 9.73841 21.3943C12.257 21.7672 14.8244 21.1901 16.941 19.775L21.586 24.419C21.9642 24.7879 22.4716 24.9944 23 24.9944C23.5284 24.9944 24.0358 24.7879 24.414 24.419C24.7889 24.0439 24.9996 23.5353 24.9996 23.005C24.9996 22.4747 24.7889 21.9661 24.414 21.591ZM11.25 4.005C12.6839 4.005 14.0856 4.43021 15.2779 5.22685C16.4701 6.02349 17.3994 7.15578 17.9481 8.48055C18.4969 9.80531 18.6404 11.263 18.3607 12.6694C18.0809 14.0758 17.3905 15.3676 16.3765 16.3815C15.3626 17.3955 14.0708 18.0859 12.6644 18.3657C11.258 18.6454 9.80031 18.5019 8.47554 17.9531C7.15078 17.4044 6.01848 16.4751 5.22184 15.2829C4.4252 14.0906 4 12.6889 4 11.255C4.00211 9.33283 4.76663 7.48999 6.12581 6.13081C7.48499 4.77163 9.32783 4.00712 11.25 4.005Z"/></symbol><symbol id="svg-service" data-name="service" viewBox="0 0 24 24" width="24" height="24" ><path d="M23.582 4.986C23.5558 4.9042 23.509 4.83051 23.4461 4.77205C23.3832 4.71358 23.3063 4.67231 23.2228 4.65221C23.1393 4.63212 23.052 4.63387 22.9694 4.6573C22.8867 4.68074 22.8115 4.72506 22.751 4.786L19.194 8.341C19.142 8.39292 19.0792 8.43274 19.0101 8.45763C18.9409 8.48252 18.8672 8.49186 18.794 8.485L16.2 8.249C16.0836 8.23851 15.9745 8.18754 15.8917 8.10496C15.809 8.02239 15.7578 7.91342 15.747 7.797L15.513 5.2C15.5063 5.12677 15.5158 5.05295 15.5408 4.98381C15.5659 4.91467 15.6059 4.85191 15.658 4.8L19.216 1.242C19.2767 1.18146 19.3208 1.10633 19.3441 1.02382C19.3674 0.941313 19.3691 0.854204 19.349 0.770858C19.3289 0.687512 19.2877 0.610731 19.2294 0.547888C19.1711 0.485044 19.0976 0.438251 19.016 0.412001C17.7707 0.0462067 16.4496 0.0246879 15.1931 0.349733C13.9366 0.674777 12.7917 1.33424 11.88 2.258C10.913 3.21722 10.2475 4.4382 9.96533 5.77072C9.68319 7.10324 9.79674 8.48917 10.292 9.758C10.3294 9.84669 10.3399 9.94445 10.3221 10.0391C10.3043 10.1337 10.2591 10.221 10.192 10.29L0.912001 19.563C0.537436 19.9223 0.279838 20.3861 0.172808 20.8939C0.0657783 21.4018 0.114285 21.9301 0.312001 22.41C0.478494 22.7791 0.731664 23.1025 1.04998 23.3527C1.36829 23.6029 1.74232 23.7725 2.14027 23.8471C2.53822 23.9218 2.9483 23.8992 3.33564 23.7813C3.72298 23.6634 4.07611 23.4537 4.365 23.17L13.7 13.834C13.7693 13.7673 13.8565 13.7222 13.951 13.7045C14.0456 13.6867 14.1432 13.697 14.232 13.734C15.4985 14.2337 16.8836 14.3517 18.2164 14.0734C19.5491 13.7951 20.7713 13.1327 21.732 12.168C22.661 11.2501 23.3237 10.0974 23.6495 8.83265C23.9753 7.56793 23.9519 6.23852 23.582 4.986V4.986Z"/></symbol><symbol id="svg-settings" data-name="settings" viewBox="0 0 24 24" width="24" height="24" ><path d="M22.5 9.5H20.638C20.4529 8.8602 20.197 8.24305 19.875 7.66L21.192 6.344C21.3314 6.2047 21.442 6.0393 21.5174 5.85725C21.5928 5.6752 21.6317 5.48006 21.6317 5.283C21.6317 5.08594 21.5928 4.8908 21.5174 4.70875C21.442 4.5267 21.3314 4.3613 21.192 4.222L19.777 2.809C19.4957 2.52779 19.1142 2.36982 18.7165 2.36982C18.3188 2.36982 17.9373 2.52779 17.656 2.809L16.338 4.126C15.7558 3.8038 15.1392 3.54787 14.5 3.363V1.5C14.5 1.10218 14.342 0.720644 14.0607 0.43934C13.7794 0.158035 13.3978 0 13 0L11 0C10.6022 0 10.2206 0.158035 9.93934 0.43934C9.65804 0.720644 9.5 1.10218 9.5 1.5V3.363C8.86058 3.5483 8.24378 3.8042 7.661 4.126L6.343 2.809C6.06171 2.52779 5.68025 2.36982 5.2825 2.36982C4.88475 2.36982 4.50329 2.52779 4.222 2.809L2.807 4.223C2.66761 4.3623 2.55704 4.5277 2.48159 4.70975C2.40615 4.8918 2.36732 5.08694 2.36732 5.284C2.36732 5.48106 2.40615 5.6762 2.48159 5.85825C2.55704 6.0403 2.66761 6.2057 2.807 6.345L4.125 7.662C3.80259 8.24414 3.54665 8.86067 3.362 9.5H1.5C1.10218 9.5 0.720644 9.65804 0.43934 9.93934C0.158035 10.2206 0 10.6022 0 11L0 13C0 13.3978 0.158035 13.7794 0.43934 14.0607C0.720644 14.342 1.10218 14.5 1.5 14.5H3.362C3.54657 15.1397 3.80252 15.7565 4.125 16.339L2.806 17.658C2.52479 17.9393 2.36682 18.3208 2.36682 18.7185C2.36682 19.1162 2.52479 19.4977 2.806 19.779L4.22 21.193C4.50682 21.464 4.88643 21.6149 5.281 21.6149C5.67557 21.6149 6.05518 21.464 6.342 21.193L7.66 19.876C8.24309 20.1981 8.86022 20.4544 9.5 20.64V22.5C9.5 22.8978 9.65804 23.2794 9.93934 23.5607C10.2206 23.842 10.6022 24 11 24H13C13.3978 24 13.7794 23.842 14.0607 23.5607C14.342 23.2794 14.5 22.8978 14.5 22.5V20.64C15.1394 20.4547 15.7562 20.1988 16.339 19.877L17.657 21.194C17.9383 21.4752 18.3198 21.6332 18.7175 21.6332C19.1152 21.6332 19.4967 21.4752 19.778 21.194L21.192 19.78C21.4732 19.4987 21.6312 19.1172 21.6312 18.7195C21.6312 18.3218 21.4732 17.9403 21.192 17.659L19.875 16.342C20.1973 15.7591 20.4532 15.1419 20.638 14.502H22.5C22.6972 14.502 22.8924 14.4631 23.0745 14.3876C23.2566 14.3121 23.4221 14.2015 23.5614 14.062C23.7007 13.9225 23.8111 13.7569 23.8864 13.5746C23.9617 13.3924 24.0003 13.1972 24 13V11C24 10.6022 23.842 10.2206 23.5607 9.93934C23.2794 9.65804 22.8978 9.5 22.5 9.5ZM12 17C11.0111 17 10.0444 16.7068 9.22215 16.1573C8.3999 15.6079 7.75904 14.827 7.3806 13.9134C7.00216 12.9998 6.90315 11.9945 7.09607 11.0245C7.289 10.0546 7.7652 9.16373 8.46447 8.46447C9.16373 7.7652 10.0546 7.289 11.0245 7.09607C11.9945 6.90315 12.9998 7.00216 13.9134 7.3806C14.827 7.75904 15.6079 8.3999 16.1573 9.22215C16.7068 10.0444 17 11.0111 17 12C16.9984 13.3256 16.4711 14.5964 15.5338 15.5338C14.5964 16.4711 13.3256 16.9984 12 17V17Z"/></symbol><symbol id="svg-trip" data-name="trip" viewBox="0 0 24 24" width="24" height="24" ><path d="M19.012 14.552C18.9988 14.5198 18.9787 14.4908 18.9531 14.4671C18.9276 14.4435 18.8971 14.4257 18.864 14.415C18.5501 14.3134 18.2667 14.1346 18.04 13.895C16.34 12.08 13.5 8.609 13.5 5.75C13.5 5.579 13.509 5.411 13.524 5.244C13.539 5.077 13.604 4.75 13.275 4.75H12C11.9337 4.75 11.8701 4.77634 11.8232 4.82322C11.7763 4.87011 11.75 4.9337 11.75 5V7.75C11.75 7.94891 11.6709 8.13968 11.5303 8.28033C11.3896 8.42098 11.1989 8.5 11 8.5C10.801 8.5 10.6103 8.42098 10.4696 8.28033C10.329 8.13968 10.25 7.94891 10.25 7.75V5C10.25 4.9337 10.2236 4.87011 10.1767 4.82322C10.1299 4.77634 10.0663 4.75 9.99996 4.75H7.18096C7.08059 4.75006 6.98256 4.78033 6.89963 4.83687C6.81669 4.8934 6.7527 4.97359 6.71596 5.067L0.0339605 22.067C0.00412291 22.1429 -0.00671146 22.2249 0.00240122 22.3059C0.0115139 22.3869 0.0402972 22.4645 0.0862436 22.5318C0.13219 22.5991 0.193906 22.6542 0.266014 22.6923C0.338123 22.7303 0.418437 22.7501 0.49996 22.75H9.99996C10.0663 22.75 10.1299 22.7237 10.1767 22.6768C10.2236 22.6299 10.25 22.5663 10.25 22.5V19.75C10.25 19.5511 10.329 19.3603 10.4696 19.2197C10.6103 19.079 10.801 19 11 19C11.1989 19 11.3896 19.079 11.5303 19.2197C11.6709 19.3603 11.75 19.5511 11.75 19.75V22.5C11.75 22.5663 11.7763 22.6299 11.8232 22.6768C11.8701 22.7237 11.9337 22.75 12 22.75H21.5C21.5815 22.7501 21.6618 22.7303 21.7339 22.6923C21.806 22.6542 21.8677 22.5991 21.9137 22.5318C21.9596 22.4645 21.9884 22.3869 21.9975 22.3059C22.0066 22.2249 21.9958 22.1429 21.966 22.067L19.012 14.552ZM11.75 15.752C11.75 15.9509 11.6709 16.1417 11.5303 16.2823C11.3896 16.423 11.1989 16.502 11 16.502C10.801 16.502 10.6103 16.423 10.4696 16.2823C10.329 16.1417 10.25 15.9509 10.25 15.752V11.752C10.25 11.5531 10.329 11.3623 10.4696 11.2217C10.6103 11.081 10.801 11.002 11 11.002C11.1989 11.002 11.3896 11.081 11.5303 11.2217C11.6709 11.3623 11.75 11.5531 11.75 11.752V15.752Z"/><path d="M19.864 12.87C20.935 11.723 24 8.226 24 5.75C24 4.55653 23.5259 3.41193 22.682 2.56802C21.8381 1.72411 20.6935 1.25 19.5 1.25C18.3065 1.25 17.1619 1.72411 16.318 2.56802C15.4741 3.41193 15 4.55653 15 5.75C15 8.226 18.065 11.723 19.136 12.87C19.1827 12.9196 19.2392 12.9592 19.3018 12.9862C19.3643 13.0133 19.4318 13.0272 19.5 13.0272C19.5682 13.0272 19.6357 13.0133 19.6982 12.9862C19.7608 12.9592 19.8173 12.9196 19.864 12.87V12.87ZM18 5.75C18 5.45333 18.088 5.16332 18.2528 4.91664C18.4176 4.66997 18.6519 4.47771 18.926 4.36418C19.2001 4.25065 19.5017 4.22094 19.7926 4.27882C20.0836 4.3367 20.3509 4.47956 20.5607 4.68934C20.7704 4.89912 20.9133 5.16639 20.9712 5.45736C21.0291 5.74834 20.9993 6.04994 20.8858 6.32403C20.7723 6.59811 20.58 6.83238 20.3334 6.9972C20.0867 7.16203 19.7967 7.25 19.5 7.25C19.1022 7.25 18.7206 7.09196 18.4393 6.81066C18.158 6.52936 18 6.14782 18 5.75Z"/></symbol><symbol id="svg-vehicle" data-name="vehicle" viewBox="0 0 24 24" width="24" height="24" ><path fill-rule="evenodd" clip-rule="evenodd" d="M22.1929 10.3308C22.2048 10.3578 22.2214 10.3826 22.242 10.404C23.048 11.2339 23.4992 12.3451 23.5 13.502V15.502C23.4984 16.0032 23.3457 16.4924 23.0618 16.9055C22.7966 17.2916 22.4284 17.5946 22 17.7806V20C22 20.5523 21.5523 21 21 21H19C18.4477 21 18 20.5523 18 20V17.8172L6 17.8148V20C6 20.5523 5.55228 21 5 21H3C2.44772 21 2 20.5523 2 20V17.7766C1.57156 17.5906 1.20334 17.2876 0.938115 16.9015C0.654299 16.4884 0.501613 15.9992 0.499983 15.498V13.498C0.501514 12.3436 0.951506 11.2349 1.75498 10.406C1.78137 10.3786 1.80119 10.3455 1.81297 10.3093L1.81341 10.3088C1.81453 10.3042 1.81553 10.2995 1.81639 10.2947C1.82517 10.2465 1.81956 10.1967 1.80027 10.1517C1.78098 10.1066 1.74885 10.0681 1.70789 10.0412C1.66693 10.0142 1.61894 9.9999 1.5699 10H1.28198C1.01677 10 0.762411 9.89464 0.574875 9.70711C0.387338 9.51957 0.281982 9.26522 0.281982 9V8C0.281982 7.73478 0.387338 7.48043 0.574875 7.29289C0.762411 7.10536 1.01677 7 1.28198 7H2.63198C2.86474 7.00062 3.0942 7.0551 3.30238 7.1592C3.4838 7.24991 3.64477 7.37614 3.77591 7.53007L3.78758 7.50165C3.81197 7.46945 3.82823 7.43184 3.83498 7.39201L4.23498 5.00901C4.34955 4.30737 4.71029 3.66948 5.25253 3.2097C5.79477 2.74992 6.48305 2.49832 7.19398 2.50001H16.802C17.5126 2.49825 18.2007 2.74956 18.7429 3.20894C19.2851 3.66832 19.646 4.30574 19.761 5.00701L20.161 7.39001C20.1676 7.42981 20.1837 7.46743 20.208 7.49964C20.2145 7.50829 20.2216 7.51648 20.2291 7.52417C20.3593 7.37291 20.5185 7.24874 20.6976 7.1592C20.9058 7.0551 21.1352 7.00062 21.368 7H22.718C22.9832 7 23.2376 7.10536 23.4251 7.29289C23.6126 7.48043 23.718 7.73478 23.718 8V9C23.718 9.26522 23.6126 9.51957 23.4251 9.70711C23.2376 9.89464 22.9832 10 22.718 10H22.4301C22.381 9.9999 22.333 10.0142 22.2921 10.0412C22.2511 10.0681 22.219 10.1066 22.1997 10.1517C22.1804 10.1967 22.1748 10.2465 22.1836 10.2947C22.1858 10.307 22.1889 10.3191 22.1929 10.3308ZM7.19398 4.50201H16.806C17.0427 4.50212 17.2717 4.58619 17.4522 4.73927C17.6328 4.89235 17.7532 5.10451 17.792 5.33801L18.271 8.21101C18.2763 8.24641 18.2741 8.28254 18.2645 8.31702C18.2548 8.3515 18.2379 8.38353 18.215 8.41101C18.1915 8.43867 18.1622 8.46087 18.1292 8.47607C18.0962 8.49127 18.0603 8.49909 18.024 8.49901H5.97598C5.93965 8.49907 5.90374 8.4912 5.87076 8.47597C5.83778 8.46073 5.80851 8.43849 5.785 8.41079C5.76149 8.38309 5.7443 8.3506 5.73462 8.31558C5.72495 8.28056 5.72302 8.24385 5.72898 8.20801L6.20798 5.33501C6.24744 5.10206 6.3681 4.8906 6.54859 4.73812C6.72907 4.58565 6.95771 4.502 7.19398 4.50201ZM7 13.5C7 14.3284 6.32843 15 5.5 15C4.67157 15 4 14.3284 4 13.5C4 12.6716 4.67157 12 5.5 12C6.32843 12 7 12.6716 7 13.5ZM18.5 15C19.3284 15 20 14.3284 20 13.5C20 12.6716 19.3284 12 18.5 12C17.6716 12 17 12.6716 17 13.5C17 14.3284 17.6716 15 18.5 15Z"/></symbol><symbol id="svg-vendor" data-name="vendor" viewBox="0 0 24 24" width="24" height="24" ><path d="M21.379 11.9C20.8074 11.8915 20.2455 11.7506 19.7375 11.4884C19.2295 11.2263 18.7891 10.8499 18.451 10.389C18.4277 10.358 18.3975 10.3328 18.3628 10.3154C18.3281 10.298 18.2898 10.289 18.251 10.289C18.2122 10.289 18.1739 10.298 18.1392 10.3154C18.1045 10.3328 18.0743 10.358 18.051 10.389C17.7189 10.8563 17.2799 11.2373 16.7705 11.5002C16.2611 11.7631 15.6962 11.9003 15.123 11.9003C14.5498 11.9003 13.9849 11.7631 13.4755 11.5002C12.9661 11.2373 12.527 10.8563 12.195 10.389C12.1717 10.358 12.1415 10.3328 12.1068 10.3154C12.0721 10.298 12.0338 10.289 11.995 10.289C11.9562 10.289 11.9179 10.298 11.8832 10.3154C11.8485 10.3328 11.8183 10.358 11.795 10.389C11.4576 10.849 11.0183 11.2248 10.5116 11.4869C10.0049 11.749 9.44441 11.8904 8.87399 11.9C8.30221 11.8916 7.74016 11.7508 7.23196 11.4886C6.72376 11.2265 6.28324 10.8501 5.94499 10.389C5.9217 10.358 5.89151 10.3328 5.85679 10.3154C5.82208 10.298 5.7838 10.289 5.74499 10.289C5.70618 10.289 5.6679 10.298 5.63319 10.3154C5.59847 10.3328 5.56828 10.358 5.54499 10.389C5.20725 10.8494 4.76753 11.2254 4.26025 11.4875C3.75298 11.7497 3.19192 11.8908 2.62099 11.9C2.49268 11.8998 2.36449 11.8924 2.23699 11.878C2.20194 11.8739 2.16642 11.8773 2.13278 11.8879C2.09913 11.8986 2.06814 11.9163 2.04186 11.9398C2.01557 11.9634 1.99459 11.9922 1.9803 12.0245C1.96601 12.0568 1.95875 12.0917 1.95899 12.127V21.15C1.95899 21.5478 2.11703 21.9294 2.39833 22.2107C2.67963 22.492 3.06117 22.65 3.45899 22.65H20.459C20.8568 22.65 21.2383 22.492 21.5197 22.2107C21.801 21.9294 21.959 21.5478 21.959 21.15V12.134C21.9588 12.0992 21.9515 12.0648 21.9374 12.0329C21.9233 12.0011 21.9027 11.9725 21.877 11.949C21.8514 11.9256 21.8212 11.9078 21.7883 11.8967C21.7554 11.8857 21.7205 11.8817 21.686 11.885C21.584 11.894 21.482 11.9 21.379 11.9ZM14.957 15.01C14.9624 14.9092 15.0075 14.8146 15.0825 14.747C15.1575 14.6793 15.2561 14.6441 15.357 14.649H18.557C18.6578 14.6441 18.7565 14.6793 18.8315 14.747C18.9064 14.8146 18.9516 14.9092 18.957 15.01V20.149C18.957 20.2816 18.9043 20.4088 18.8105 20.5026C18.7168 20.5963 18.5896 20.649 18.457 20.649H15.457C15.3244 20.649 15.1972 20.5963 15.1034 20.5026C15.0097 20.4088 14.957 20.2816 14.957 20.149V15.01ZM5.45699 14.982C5.46266 14.8883 5.50519 14.8007 5.57527 14.7383C5.64536 14.6759 5.7373 14.6438 5.83099 14.649H11.078C11.1718 14.6438 11.2638 14.6759 11.3341 14.7383C11.4043 14.8006 11.4471 14.8882 11.453 14.982V18.316C11.4471 18.4098 11.4043 18.4974 11.3341 18.5597C11.2638 18.6221 11.1718 18.6542 11.078 18.649H5.83099C5.7373 18.6542 5.64536 18.6221 5.57527 18.5597C5.50519 18.4973 5.46266 18.4097 5.45699 18.316V14.982Z"/><path d="M21.379 10.4C21.9018 10.3658 22.3999 10.1654 22.8007 9.82812C23.2016 9.49081 23.4841 9.03421 23.607 8.52499C23.7443 8.07794 23.7398 7.59935 23.594 7.15499L21.794 1.68499C21.7757 1.60101 21.7327 1.52443 21.6705 1.46509C21.6083 1.40575 21.5298 1.36637 21.445 1.35199H2.55104C2.46629 1.36637 2.38778 1.40575 2.32559 1.46509C2.2634 1.52443 2.22037 1.60101 2.20204 1.68499L0.405038 7.15299C0.260149 7.59788 0.255959 8.07663 0.393038 8.52399C0.515827 9.0334 0.798259 9.49021 1.19909 9.82772C1.59992 10.1652 2.09816 10.3657 2.62104 10.4C3.31538 10.3276 3.95359 9.98564 4.39846 9.44764C4.84333 8.90965 5.05934 8.21857 5.00004 7.52299C5.00004 7.32408 5.07906 7.13331 5.21971 6.99266C5.36036 6.85201 5.55113 6.77299 5.75004 6.77299C5.94895 6.77299 6.13972 6.85201 6.28037 6.99266C6.42102 7.13331 6.50004 7.32408 6.50004 7.52299C6.44067 8.21779 6.656 8.90818 7.09982 9.44604C7.54364 9.9839 8.1806 10.3264 8.87404 10.4C9.56784 10.3269 10.2053 9.9846 10.6495 9.44668C11.0938 8.90877 11.3094 8.2181 11.25 7.52299C11.25 7.32408 11.3291 7.13331 11.4697 6.99266C11.6104 6.85201 11.8011 6.77299 12 6.77299C12.199 6.77299 12.3897 6.85201 12.5304 6.99266C12.671 7.13331 12.75 7.32408 12.75 7.52299C12.6907 8.21826 12.9064 8.90906 13.3509 9.447C13.7953 9.98494 14.4331 10.3271 15.127 10.4C15.8204 10.3264 16.4573 9.98387 16.9009 9.44598C17.3446 8.90808 17.5597 8.21769 17.5 7.52299C17.5 7.32408 17.5791 7.13331 17.7197 6.99266C17.8604 6.85201 18.0511 6.77299 18.25 6.77299C18.449 6.77299 18.6397 6.85201 18.7804 6.99266C18.921 7.13331 19 7.32408 19 7.52299C18.941 8.21851 19.1571 8.90945 19.6019 9.44739C20.0467 9.98532 20.6848 10.3273 21.379 10.4Z"/></symbol></svg>')
107
+ document.querySelector('body').insertAdjacentHTML('afterbegin', '<svg id="esvg-svg-icons" data-symbol-class="icon" data-prefix="svg" version="1.1" style="height:0;position:absolute" data-turbolinks-permanent><defs><clipPath id="def-svg-question-0"><rect width="24" height="24" fill="white"/></clipPath></defs><symbol id="svg-add" data-name="add" viewBox="0 0 24 24" width="24" height="24" ><path d="M0 12C0 12.3978 0.158035 12.7794 0.43934 13.0607C0.720644 13.342 1.10218 13.5 1.5 13.5H10.25C10.3163 13.5 10.3799 13.5263 10.4268 13.5732C10.4737 13.6201 10.5 13.6837 10.5 13.75V22.5C10.5 22.8978 10.658 23.2794 10.9393 23.5607C11.2206 23.842 11.6022 24 12 24C12.3978 24 12.7794 23.842 13.0607 23.5607C13.342 23.2794 13.5 22.8978 13.5 22.5V13.75C13.5 13.6837 13.5263 13.6201 13.5732 13.5732C13.6201 13.5263 13.6837 13.5 13.75 13.5H22.5C22.8978 13.5 23.2794 13.342 23.5607 13.0607C23.842 12.7794 24 12.3978 24 12C24 11.6022 23.842 11.2206 23.5607 10.9393C23.2794 10.658 22.8978 10.5 22.5 10.5H13.75C13.6837 10.5 13.6201 10.4737 13.5732 10.4268C13.5263 10.3799 13.5 10.3163 13.5 10.25V1.5C13.5 1.10218 13.342 0.720644 13.0607 0.43934C12.7794 0.158035 12.3978 0 12 0C11.6022 0 11.2206 0.158035 10.9393 0.43934C10.658 0.720644 10.5 1.10218 10.5 1.5V10.25C10.5 10.3163 10.4737 10.3799 10.4268 10.4268C10.3799 10.4737 10.3163 10.5 10.25 10.5H1.5C1.10218 10.5 0.720644 10.658 0.43934 10.9393C0.158035 11.2206 0 11.6022 0 12H0Z"/></symbol><symbol id="svg-admin-user" data-name="admin-user" viewBox="0 0 24 24" width="24" height="24" ><path d="M13.019 16.5C13.019 16.2348 12.9136 15.9804 12.7261 15.7929C12.5386 15.6054 12.2842 15.5 12.019 15.5H8.105C8.04894 15.5006 7.99435 15.4821 7.95019 15.4476C7.90603 15.4131 7.87493 15.3645 7.862 15.31C7.62066 14.2233 7.50159 13.1131 7.507 12C7.50527 11.0608 7.59029 10.1235 7.761 9.2C7.77322 9.14295 7.80478 9.09188 7.85034 9.05543C7.8959 9.01898 7.95266 8.9994 8.011 9C18.884 9 21.566 9.008 22.291 8.982C22.4536 8.99166 22.6158 8.95874 22.7618 8.88649C22.9077 8.81425 23.0323 8.70518 23.1232 8.57006C23.214 8.43494 23.2681 8.27844 23.28 8.11604C23.2919 7.95363 23.2612 7.79092 23.191 7.644C22.3168 5.37744 20.7721 3.43142 18.763 2.06562C16.754 0.699831 14.3762 -0.0207647 11.947 1.65624e-06C8.82776 0.0742654 5.85467 1.33714 3.63553 3.53044C1.41638 5.72375 0.118784 8.68184 0.00799855 11.8C-0.0506557 14.9267 1.11632 17.9522 3.2594 20.2296C5.40247 22.5071 8.35154 23.8557 11.476 23.987H11.52C11.7618 23.9874 11.9955 23.9001 12.1779 23.7414C12.3603 23.5827 12.479 23.3633 12.5121 23.1238C12.5452 22.8842 12.4903 22.6409 12.3578 22.4387C12.2252 22.2365 12.0238 22.0892 11.791 22.024C11.594 21.9571 11.4246 21.827 11.309 21.654C10.3819 20.446 9.53287 19.1801 8.767 17.864C8.74682 17.8259 8.73684 17.7832 8.73802 17.7401C8.73921 17.697 8.75152 17.655 8.77376 17.618C8.79601 17.5811 8.82742 17.5505 8.86496 17.5293C8.9025 17.5081 8.94488 17.497 8.988 17.497H12.019C12.2837 17.497 12.5376 17.3921 12.725 17.2052C12.9125 17.0183 13.0182 16.7647 13.019 16.5ZM5.8 15.2C5.80761 15.2363 5.80699 15.2739 5.79818 15.31C5.78938 15.3461 5.77263 15.3797 5.74914 15.4085C5.72565 15.4373 5.69602 15.4604 5.66243 15.4762C5.62884 15.4921 5.59213 15.5002 5.555 15.5H2.818C2.76624 15.4999 2.71579 15.4838 2.67354 15.4539C2.63129 15.424 2.59932 15.3818 2.582 15.333C1.8781 13.3512 1.81895 11.1975 2.413 9.18C2.42829 9.12816 2.45991 9.08263 2.50315 9.0502C2.54639 9.01777 2.59895 9.00016 2.653 9H5.46C5.49593 9.00035 5.53137 9.00837 5.56395 9.02354C5.59652 9.0387 5.62548 9.06066 5.64887 9.08794C5.67226 9.11521 5.68955 9.14717 5.69958 9.18168C5.7096 9.21619 5.71213 9.25244 5.707 9.288C5.57163 10.1856 5.50477 11.0922 5.507 12C5.50419 13.0735 5.60229 14.1449 5.8 15.2V15.2ZM11.859 2.27C11.9015 2.23977 11.9523 2.22353 12.0045 2.22353C12.0566 2.22353 12.1075 2.23977 12.15 2.27C13.6529 3.39307 14.8158 4.91002 15.51 6.653C15.526 6.69105 15.5324 6.73248 15.5285 6.77358C15.5246 6.81468 15.5106 6.85417 15.4877 6.88854C15.4648 6.9229 15.4338 6.95107 15.3974 6.97052C15.3609 6.98997 15.3203 7.0001 15.279 7H8.729C8.68799 7.00014 8.6476 6.99006 8.61146 6.97068C8.57532 6.9513 8.54458 6.92323 8.522 6.889C8.49909 6.85455 8.48509 6.81496 8.48125 6.77377C8.47741 6.73259 8.48385 6.69109 8.5 6.653C9.1891 4.90739 10.3526 3.38924 11.859 2.27V2.27ZM20.44 6.614C20.4645 6.65183 20.4784 6.69559 20.4801 6.74064C20.4817 6.78569 20.4712 6.83036 20.4496 6.86992C20.428 6.90947 20.3961 6.94245 20.3572 6.96535C20.3184 6.98825 20.2741 7.00022 20.229 7H17.946C17.8934 7.00002 17.8422 6.98352 17.7994 6.95284C17.7567 6.92216 17.7248 6.87884 17.708 6.829C17.2966 5.57262 16.6979 4.38557 15.932 3.308C15.8999 3.26306 15.8835 3.20875 15.8855 3.15354C15.8875 3.09833 15.9077 3.04534 15.943 3.00284C15.9783 2.96035 16.0267 2.93074 16.0806 2.91865C16.1345 2.90655 16.1909 2.91266 16.241 2.936C17.9645 3.73386 19.4221 5.01062 20.44 6.614V6.614ZM7.74 2.968C7.79002 2.94415 7.84656 2.9376 7.90071 2.94938C7.95486 2.96116 8.00357 2.99059 8.03917 3.03307C8.07477 3.07554 8.09525 3.12863 8.09739 3.18401C8.09954 3.23939 8.08321 3.29391 8.051 3.339C7.29845 4.40818 6.70995 5.58383 6.305 6.827C6.28877 6.87714 6.25711 6.92086 6.21455 6.95193C6.17199 6.983 6.12069 6.99982 6.068 7H3.805C3.76016 6.99993 3.71616 6.98779 3.67762 6.96487C3.63908 6.94195 3.60741 6.90908 3.58594 6.86971C3.56447 6.83035 3.55398 6.78593 3.55557 6.74112C3.55717 6.6963 3.57078 6.65274 3.595 6.615C4.60943 5.0365 6.0452 3.77324 7.74 2.968V2.968ZM8.091 20.7C8.12313 20.7449 8.13948 20.7993 8.13748 20.8545C8.13548 20.9097 8.11525 20.9627 8.07995 21.0052C8.04465 21.0477 7.99627 21.0773 7.94237 21.0894C7.88846 21.1015 7.83207 21.0953 7.782 21.072C6.24716 20.3591 4.91885 19.2676 3.922 17.9C3.89414 17.8629 3.87718 17.8187 3.87301 17.7725C3.86884 17.7262 3.87763 17.6797 3.89839 17.6382C3.91915 17.5967 3.95107 17.5617 3.99057 17.5373C4.03006 17.5129 4.07557 17.5 4.122 17.5H6.246C6.29693 17.5002 6.3466 17.5159 6.3884 17.545C6.43019 17.5742 6.46214 17.6153 6.48 17.663C6.8817 18.7415 7.42333 19.7626 8.091 20.7V20.7Z"/><path d="M18.769 17.7C19.4441 17.7002 20.1041 17.5002 20.6655 17.1252C21.227 16.7503 21.6646 16.2172 21.923 15.5936C22.1815 14.9699 22.2491 14.2836 22.1175 13.6214C21.9858 12.9593 21.6607 12.351 21.1834 11.8736C20.706 11.3963 20.0978 11.0712 19.4356 10.9395C18.7734 10.8079 18.0871 10.8755 17.4634 11.134C16.8398 11.3924 16.3067 11.83 15.9318 12.3915C15.5568 12.9529 15.3568 13.6129 15.357 14.288C15.357 15.1929 15.7165 16.0608 16.3564 16.7007C16.9962 17.3405 17.8641 17.7 18.769 17.7Z"/><path d="M13.548 23.445C13.5405 23.515 13.5479 23.5857 13.5697 23.6526C13.5915 23.7196 13.6271 23.7811 13.6743 23.8333C13.7215 23.8855 13.7792 23.9272 13.8436 23.9556C13.908 23.9839 13.9776 23.9984 14.048 23.998H23.495C23.5654 23.9984 23.635 23.9839 23.6994 23.9556C23.7638 23.9272 23.8215 23.8855 23.8687 23.8333C23.9159 23.7811 23.9515 23.7196 23.9733 23.6526C23.9951 23.5857 24.0025 23.515 23.995 23.445C23.8589 22.1552 23.2501 20.9614 22.2861 20.0938C21.3221 19.2261 20.071 18.746 18.774 18.746C17.477 18.746 16.2259 19.2261 15.2619 20.0938C14.2979 20.9614 13.6891 22.1552 13.553 23.445H13.548Z"/></symbol><symbol id="svg-chevron-down" data-name="chevron-down" viewBox="0 0 24 24" width="24" height="24" ><path d="M1.249 7.207L12.233 19.678C12.3325 19.7818 12.452 19.8644 12.5842 19.9208C12.7164 19.9772 12.8587 20.0063 13.0025 20.0063C13.1463 20.0063 13.2886 19.9772 13.4208 19.9208C13.553 19.8644 13.6725 19.7818 13.772 19.678L24.751 7.207C24.8388 7.10807 24.9058 6.9925 24.9481 6.86715C24.9904 6.7418 25.007 6.60924 24.997 6.47734C24.987 6.34543 24.9506 6.21688 24.89 6.09932C24.8294 5.98176 24.7457 5.87759 24.644 5.793L22.794 4.236C22.5877 4.06208 22.3213 3.97624 22.0523 3.997C21.7832 4.01777 21.5332 4.14348 21.356 4.347L13.191 13.8C13.1675 13.8273 13.1384 13.8492 13.1057 13.8642C13.073 13.8792 13.0375 13.8869 13.0015 13.8869C12.9655 13.8869 12.93 13.8792 12.8973 13.8642C12.8646 13.8492 12.8355 13.8273 12.812 13.8L4.644 4.346C4.46669 4.14342 4.21654 4.01906 3.948 4C3.81485 3.98813 3.68067 4.00308 3.5534 4.04396C3.42612 4.08483 3.30834 4.15082 3.207 4.238L1.356 5.793C1.25372 5.87744 1.16949 5.98161 1.10833 6.09929C1.04717 6.21698 1.01032 6.34577 1 6.478C0.98999 6.61004 1.0069 6.74274 1.0497 6.86805C1.0925 6.99336 1.16031 7.10868 1.249 7.207Z"/></symbol><symbol id="svg-chevron-up" data-name="chevron-up" viewBox="0 0 24 24" width="24" height="24" ><path d="M23.751 16.793L12.767 4.322C12.6675 4.21822 12.548 4.13563 12.4158 4.07922C12.2836 4.0228 12.1413 3.99372 11.9975 3.99372C11.8537 3.99372 11.7114 4.0228 11.5792 4.07922C11.447 4.13563 11.3275 4.21822 11.228 4.322L0.248998 16.793C0.161188 16.8919 0.0941599 17.0075 0.0518975 17.1329C0.00963515 17.2582 -0.0069996 17.3908 0.00298173 17.5227C0.0129631 17.6546 0.0493568 17.7831 0.11 17.9007C0.170644 18.0182 0.2543 18.1224 0.355998 18.207L2.206 19.764C2.41229 19.9379 2.6787 20.0238 2.94773 20.003C3.21676 19.9822 3.46684 19.8565 3.644 19.653L11.809 10.2C11.8325 10.1727 11.8615 10.1508 11.8943 10.1358C11.927 10.1208 11.9625 10.1131 11.9985 10.1131C12.0345 10.1131 12.07 10.1208 12.1027 10.1358C12.1354 10.1508 12.1645 10.1727 12.188 10.2L20.356 19.65C20.444 19.7513 20.5511 19.8343 20.6713 19.8942C20.7914 19.9541 20.9221 19.9897 21.056 19.999C21.1891 20.0109 21.3233 19.9959 21.4506 19.955C21.5779 19.9142 21.6957 19.8482 21.797 19.761L23.648 18.203C23.7495 18.1182 23.8329 18.014 23.8934 17.8965C23.9539 17.7789 23.9902 17.6504 24.0001 17.5186C24.0101 17.3868 23.9936 17.2543 23.9515 17.129C23.9094 17.0037 23.8425 16.8881 23.755 16.789L23.751 16.793Z"/></symbol><symbol id="svg-close" data-name="close" viewBox="0 0 25 25" width="25" height="25" ><path d="M0.439005 21.44C0.157743 21.7214 -0.000215771 22.103 -0.000121997 22.5009C-2.82229e-05 22.8987 0.15811 23.2802 0.439505 23.5615C0.7209 23.8428 1.1025 24.0007 1.50036 24.0006C1.89822 24.0005 2.27974 23.8424 2.56101 23.561L11.823 14.3C11.8462 14.2767 11.8738 14.2582 11.9042 14.2456C11.9346 14.233 11.9671 14.2266 12 14.2266C12.0329 14.2266 12.0654 14.233 12.0958 14.2456C12.1262 14.2582 12.1538 14.2767 12.177 14.3L21.439 23.563C21.5783 23.7023 21.7436 23.8129 21.9256 23.8883C22.1076 23.9637 22.3027 24.0026 22.4997 24.0026C22.6967 24.0027 22.8917 23.9639 23.0738 23.8886C23.2558 23.8132 23.4212 23.7028 23.5605 23.5635C23.6998 23.4242 23.8104 23.2589 23.8858 23.0769C23.9612 22.8949 24.0001 22.6999 24.0001 22.5029C24.0002 22.3059 23.9614 22.1108 23.8861 21.9288C23.8107 21.7467 23.7003 21.5813 23.561 21.442L14.3 12.177C14.2767 12.1538 14.2583 12.1262 14.2456 12.0958C14.233 12.0654 14.2266 12.0329 14.2266 12C14.2266 11.9671 14.233 11.9346 14.2456 11.9042C14.2583 11.8738 14.2767 11.8462 14.3 11.823L23.563 2.561C23.8443 2.27934 24.0021 1.89749 24.0018 1.49944C24.0016 1.10139 23.8432 0.719762 23.5615 0.4385C23.2798 0.157238 22.898 -0.000615664 22.4999 -0.000334364C22.1019 -5.30649e-05 21.7203 0.15834 21.439 0.44L12.177 9.7C12.1538 9.72328 12.1262 9.74175 12.0958 9.75436C12.0654 9.76696 12.0329 9.77345 12 9.77345C11.9671 9.77345 11.9346 9.76696 11.9042 9.75436C11.8738 9.74175 11.8462 9.72328 11.823 9.7L2.56101 0.44C2.42174 0.300667 2.25639 0.19013 2.07441 0.114698C1.89242 0.039267 1.69736 0.000419144 1.50036 0.000372715C1.1025 0.000278947 0.7209 0.158238 0.439505 0.4395C0.15811 0.720762 -2.82604e-05 1.10229 -0.000122029 1.50015C-0.000215797 1.898 0.157743 2.27961 0.439005 2.561L9.7 11.823C9.72329 11.8462 9.74176 11.8738 9.75436 11.9042C9.76696 11.9346 9.77345 11.9671 9.77345 12C9.77345 12.0329 9.76696 12.0654 9.75436 12.0958C9.74176 12.1262 9.72329 12.1538 9.7 12.177L0.439005 21.44Z"/></symbol><symbol id="svg-contact" data-name="contact" viewBox="0 0 24 24" width="24" height="24" ><path d="M24.0001 21C23.9979 19.0115 23.2071 17.1051 21.801 15.699C20.395 14.293 18.4885 13.5021 16.5001 13.5C15.6916 13.5003 14.8886 13.633 14.1231 13.893C14.0428 13.9198 13.9706 13.9665 13.9133 14.0288C13.856 14.0911 13.8155 14.167 13.7955 14.2492C13.7755 14.3314 13.7767 14.4174 13.7991 14.4991C13.8214 14.5807 13.864 14.6553 13.9231 14.716C15.5737 16.3911 16.4993 18.6483 16.5001 21V21.024C16.4991 21.0862 16.5106 21.1479 16.5337 21.2056C16.5569 21.2633 16.5913 21.3159 16.6349 21.3602C16.6786 21.4045 16.7306 21.4396 16.7879 21.4636C16.8453 21.4876 16.9069 21.5 16.9691 21.5H23.5001C23.6327 21.5 23.7598 21.4473 23.8536 21.3536C23.9474 21.2598 24.0001 21.1326 24.0001 21Z"/><path d="M13.675 5.53001C13.8078 5.94054 13.9012 6.36278 13.954 6.79101C13.9634 6.86941 13.9912 6.94446 14.0352 7.01003C14.0792 7.07561 14.1381 7.12983 14.2071 7.16826C14.276 7.2067 14.3531 7.22826 14.432 7.23117C14.5109 7.23408 14.5894 7.21826 14.661 7.18501C15.3275 6.87597 15.9302 6.44488 16.438 5.91401C16.4614 5.88963 16.4896 5.87024 16.5207 5.85699C16.5518 5.84374 16.5852 5.83691 16.619 5.83691C16.6528 5.83691 16.6863 5.84374 16.7174 5.85699C16.7485 5.87024 16.7766 5.88963 16.8 5.91401C17.4805 6.62662 18.3292 7.15685 19.268 7.45601C19.3814 7.49225 19.4781 7.56775 19.5408 7.66894C19.6035 7.77012 19.6281 7.89035 19.61 8.00801C19.4991 8.72709 19.1348 9.38282 18.5828 9.85685C18.0308 10.3309 17.3276 10.592 16.6 10.593C16.1879 10.5934 15.78 10.5094 15.4016 10.346C15.0232 10.1826 14.6823 9.94333 14.4 9.64301C14.3419 9.58164 14.2692 9.536 14.1886 9.51036C14.1081 9.48472 14.0224 9.47991 13.9395 9.4964C13.8566 9.51288 13.7792 9.5501 13.7146 9.6046C13.65 9.65909 13.6002 9.72908 13.57 9.80801C13.4534 10.1124 13.314 10.4076 13.153 10.691C13.0963 10.7902 13.0753 10.9059 13.0935 11.0187C13.1117 11.1315 13.168 11.2347 13.253 11.311C14.1396 12.1091 15.2828 12.563 16.4754 12.5904C17.668 12.6177 18.8308 12.2167 19.753 11.46C19.7834 11.435 19.8192 11.4175 19.8576 11.409C19.896 11.4004 19.9358 11.401 19.9739 11.4108C20.012 11.4205 20.0473 11.4391 20.0768 11.465C20.1064 11.491 20.1294 11.5235 20.144 11.56C20.2715 11.8969 20.433 12.2199 20.626 12.524C20.6955 12.6379 20.7871 12.7368 20.8954 12.8148C21.0037 12.8927 21.1265 12.9482 21.2566 12.978C21.3867 13.0078 21.5214 13.0112 21.6528 12.9881C21.7843 12.965 21.9097 12.9158 22.0219 12.8435C22.134 12.7711 22.2305 12.6771 22.3057 12.5668C22.3809 12.4566 22.4333 12.3324 22.4598 12.2016C22.4863 12.0709 22.4863 11.9361 22.4599 11.8053C22.4335 11.6745 22.3812 11.5503 22.306 11.44C21.8362 10.6534 21.6042 9.74761 21.638 8.83201V7.54601C21.64 6.57619 21.3619 5.62642 20.8371 4.81087C20.3123 3.99531 19.5631 3.34869 18.6796 2.94871C17.7961 2.54873 16.8159 2.41242 15.8568 2.55617C14.8976 2.69991 14.0004 3.1176 13.273 3.75901C13.1868 3.83566 13.1298 3.93977 13.1115 4.05367C13.0933 4.16758 13.115 4.28429 13.173 4.38401C13.3812 4.74679 13.5495 5.13103 13.675 5.53001V5.53001Z"/><path d="M12.5 7.5C12.5 6.5111 12.2068 5.5444 11.6573 4.72215C11.1079 3.89991 10.327 3.25904 9.41342 2.8806C8.49979 2.50217 7.49446 2.40315 6.52455 2.59608C5.55465 2.789 4.66373 3.26521 3.96447 3.96447C3.26521 4.66373 2.789 5.55465 2.59608 6.52455C2.40315 7.49446 2.50217 8.49979 2.8806 9.41342C3.25904 10.327 3.89991 11.1079 4.72215 11.6573C5.5444 12.2068 6.5111 12.5 7.5 12.5C8.8256 12.4984 10.0964 11.9711 11.0338 11.0338C11.9711 10.0964 12.4984 8.8256 12.5 7.5V7.5ZM4.6 6.757C4.61992 6.68206 4.65699 6.61278 4.70829 6.55464C4.7596 6.49649 4.82372 6.45107 4.89559 6.42197C4.96747 6.39287 5.04512 6.38089 5.12243 6.38697C5.19973 6.39305 5.27456 6.41703 5.341 6.457C6.42853 7.13071 7.68073 7.49159 8.96 7.5C9.27096 7.49941 9.58146 7.47602 9.889 7.43C9.96594 7.41851 10.0445 7.42513 10.1184 7.44933C10.1923 7.47353 10.2596 7.51465 10.3148 7.56941C10.3701 7.62417 10.4118 7.69106 10.4366 7.76477C10.4615 7.83848 10.4688 7.91697 10.458 7.994C10.3327 8.73515 9.93369 9.40224 9.34001 9.86327C8.74632 10.3243 8.0012 10.5457 7.25211 10.4835C6.50301 10.4214 5.80452 10.0804 5.29487 9.52787C4.78522 8.97536 4.50156 8.25167 4.5 7.5C4.50037 7.24901 4.53399 6.99916 4.6 6.757V6.757Z"/><path d="M15 21C15 19.0109 14.2098 17.1032 12.8033 15.6967C11.3968 14.2902 9.48912 13.5 7.5 13.5C5.51088 13.5 3.60322 14.2902 2.1967 15.6967C0.790176 17.1032 0 19.0109 0 21C0 21.1326 0.0526784 21.2598 0.146447 21.3536C0.240215 21.4473 0.367392 21.5 0.5 21.5H14.5C14.6326 21.5 14.7598 21.4473 14.8536 21.3536C14.9473 21.2598 15 21.1326 15 21Z"/></symbol><symbol id="svg-dashboard" data-name="dashboard" viewBox="0 0 24 24" width="24" height="24" ><path d="M12 0C9.62663 0 7.30655 0.703788 5.33316 2.02236C3.35977 3.34094 1.8217 5.21509 0.913451 7.4078C0.00519943 9.60051 -0.232441 12.0133 0.230582 14.3411C0.693605 16.6689 1.83649 18.8071 3.51472 20.4853C5.19295 22.1635 7.33115 23.3064 9.65892 23.7694C11.9867 24.2324 14.3995 23.9948 16.5922 23.0866C18.7849 22.1783 20.6591 20.6402 21.9776 18.6668C23.2962 16.6935 24 14.3734 24 12C23.9966 8.81846 22.7312 5.76821 20.4815 3.51852C18.2318 1.26883 15.1815 0.00344108 12 0V0ZM5.14501 8.91L4.27901 8.41C4.10661 8.31054 3.98079 8.14668 3.92922 7.95445C3.87765 7.76223 3.90455 7.55739 4.00401 7.385C4.10346 7.21261 4.26733 7.08679 4.45955 7.03522C4.65178 6.98364 4.85661 7.01054 5.02901 7.11L5.89501 7.61C6.0383 7.69249 6.15032 7.82001 6.21365 7.97274C6.27698 8.12548 6.28806 8.29486 6.24517 8.45454C6.20229 8.61422 6.10784 8.75525 5.97651 8.85571C5.84519 8.95616 5.68435 9.01041 5.51901 9.01C5.38766 9.01054 5.25855 8.97602 5.14501 8.91V8.91ZM5.25001 11.991C5.25001 12.1899 5.17099 12.3807 5.03034 12.5213C4.88968 12.662 4.69892 12.741 4.50001 12.741H3.50001C3.30109 12.741 3.11033 12.662 2.96968 12.5213C2.82902 12.3807 2.75001 12.1899 2.75001 11.991C2.75001 11.7921 2.82902 11.6013 2.96968 11.4607C3.11033 11.32 3.30109 11.241 3.50001 11.241H4.50001C4.69892 11.241 4.88968 11.32 5.03034 11.4607C5.17099 11.6013 5.25001 11.7921 5.25001 11.991ZM14.24 12C14.24 12.445 14.108 12.88 13.8608 13.25C13.6136 13.62 13.2622 13.9084 12.851 14.0787C12.4399 14.249 11.9875 14.2936 11.5511 14.2068C11.1146 14.12 10.7137 13.9057 10.399 13.591C10.0843 13.2763 9.87006 12.8754 9.78324 12.439C9.69642 12.0025 9.74098 11.5501 9.91128 11.139C10.0816 10.7278 10.37 10.3764 10.74 10.1292C11.11 9.88196 11.545 9.75 11.99 9.75C12.0154 9.75014 12.0408 9.75181 12.066 9.755C12.1112 9.75955 12.1567 9.75171 12.1978 9.73233C12.2388 9.71295 12.2738 9.68276 12.299 9.645L15.699 4.571C15.7719 4.46128 15.8657 4.36704 15.9751 4.29369C16.0845 4.22033 16.2073 4.1693 16.3364 4.14354C16.4656 4.11777 16.5986 4.11778 16.7277 4.14355C16.8569 4.16932 16.9797 4.22035 17.089 4.29371C17.1984 4.36707 17.2922 4.46131 17.3651 4.57103C17.438 4.68075 17.4884 4.80378 17.5136 4.93306C17.5388 5.06233 17.5382 5.19531 17.5118 5.32435C17.4855 5.45339 17.4339 5.57595 17.36 5.685L13.993 10.71C13.9679 10.7475 13.9535 10.7911 13.9512 10.8362C13.9489 10.8813 13.9589 10.9261 13.98 10.966C14.1496 11.2843 14.2389 11.6393 14.24 12V12ZM12.758 4.558C12.758 4.75691 12.679 4.94768 12.5383 5.08833C12.3977 5.22898 12.2069 5.308 12.008 5.308C11.8091 5.308 11.6183 5.22898 11.4777 5.08833C11.337 4.94768 11.258 4.75691 11.258 4.558V3.558C11.258 3.35909 11.337 3.16832 11.4777 3.02767C11.6183 2.88702 11.8091 2.808 12.008 2.808C12.2069 2.808 12.3977 2.88702 12.5383 3.02767C12.679 3.16832 12.758 3.35909 12.758 3.558V4.558ZM7.39301 4.025C7.47824 3.97559 7.5724 3.9435 7.67007 3.93059C7.76774 3.91767 7.867 3.92417 7.96215 3.94973C8.0573 3.97528 8.14646 4.01938 8.22452 4.07949C8.30258 4.1396 8.36799 4.21454 8.41701 4.3L8.91701 5.166C8.96646 5.25118 8.9986 5.34528 9.01159 5.44291C9.02458 5.54054 9.01816 5.63977 8.99271 5.73491C8.96725 5.83006 8.92325 5.91924 8.86324 5.99733C8.80323 6.07543 8.72839 6.1409 8.64301 6.19C8.52946 6.25602 8.40035 6.29054 8.26901 6.29C8.13723 6.29029 8.00772 6.25576 7.89358 6.18991C7.77944 6.12406 7.68472 6.02922 7.61901 5.915L7.11901 5.049C7.06969 4.96379 7.03765 4.86969 7.02473 4.77209C7.01181 4.67449 7.01826 4.5753 7.04371 4.48019C7.06916 4.38509 7.1131 4.29593 7.17304 4.21782C7.23298 4.13972 7.30772 4.07419 7.39301 4.025V4.025ZM7.50001 17C7.50001 16.8674 7.55268 16.7402 7.64645 16.6464C7.74022 16.5527 7.8674 16.5 8.00001 16.5H16C16.1326 16.5 16.2598 16.5527 16.3536 16.6464C16.4473 16.7402 16.5 16.8674 16.5 17V19C16.5 19.1326 16.4473 19.2598 16.3536 19.3536C16.2598 19.4473 16.1326 19.5 16 19.5H8.00001C7.8674 19.5 7.74022 19.4473 7.64645 19.3536C7.55268 19.2598 7.50001 19.1326 7.50001 19V17ZM17.809 8.7C17.7097 8.52785 17.6827 8.3233 17.7341 8.1313C17.7855 7.9393 17.911 7.77554 18.083 7.676L18.949 7.176C19.1214 7.07654 19.3262 7.04964 19.5185 7.10122C19.7107 7.15279 19.8746 7.27861 19.974 7.451C20.0735 7.62339 20.1004 7.82823 20.0488 8.02045C19.9972 8.21268 19.8714 8.37654 19.699 8.476L18.832 8.976C18.6597 9.07485 18.4552 9.10131 18.2634 9.04956C18.0716 8.99782 17.9082 8.8721 17.809 8.7ZM18.69 12.065C18.69 11.8661 18.769 11.6753 18.9097 11.5347C19.0503 11.394 19.2411 11.315 19.44 11.315H20.44C20.6389 11.315 20.8297 11.394 20.9703 11.5347C21.111 11.6753 21.19 11.8661 21.19 12.065C21.19 12.2639 21.111 12.4547 20.9703 12.5953C20.8297 12.736 20.6389 12.815 20.44 12.815H19.44C19.2413 12.815 19.0507 12.7361 18.91 12.5957C18.7694 12.4552 18.6903 12.2647 18.69 12.066V12.065Z"/></symbol><symbol id="svg-fuel" data-name="fuel" viewBox="0 0 24 24" width="24" height="24" ><path fill-rule="evenodd" clip-rule="evenodd" d="M23.99 3.35858C24.0275 3.62113 23.9591 3.88783 23.8 4.1L21.75 6.833V8H23C23.1326 8 23.2598 8.05268 23.3536 8.14645C23.4473 8.24021 23.5 8.36739 23.5 8.5V11C23.5 11.0823 23.4796 11.1634 23.4407 11.236C23.4018 11.3085 23.3456 11.3704 23.277 11.416L21.777 12.416L21.75 12.433V15.5C21.75 16.2956 21.4339 17.0587 20.8713 17.6213C20.3087 18.1839 19.5456 18.5 18.75 18.5H18.5C18.3674 18.5 18.2402 18.5527 18.1464 18.6464C18.0527 18.7402 18 18.8674 18 19V22.5C18 22.8978 17.842 23.2794 17.5607 23.5607C17.2794 23.842 16.8978 24 16.5 24H3.5C3.10218 24 2.72064 23.842 2.43934 23.5607C2.15804 23.2794 2 22.8978 2 22.5V1.5C2 1.10218 2.15804 0.720644 2.43934 0.43934C2.72064 0.158035 3.10218 0 3.5 0H16.5C16.8978 0 17.2794 0.158035 17.5607 0.43934C17.842 0.720644 18 1.10218 18 1.5V16C18 16.1326 18.0527 16.2598 18.1464 16.3536C18.2402 16.4473 18.3674 16.5 18.5 16.5H18.75C19.0152 16.5 19.2696 16.3946 19.4571 16.2071C19.6446 16.0196 19.75 15.7652 19.75 15.5V6.5C19.75 6.28363 19.8202 6.0731 19.95 5.9L22.2 2.9C22.3591 2.68783 22.596 2.54756 22.8586 2.51005C22.9886 2.49148 23.121 2.49869 23.2482 2.53129C23.3754 2.56388 23.4949 2.62121 23.6 2.7C23.8122 2.85913 23.9524 3.09603 23.99 3.35858ZM15.8536 7.85355C15.9473 7.75979 16 7.63261 16 7.5V2.5C16 2.36739 15.9473 2.24021 15.8536 2.14645C15.7598 2.05268 15.6326 2 15.5 2H4.5C4.36739 2 4.24021 2.05268 4.14645 2.14645C4.05268 2.24021 4 2.36739 4 2.5V7.5C4 7.63261 4.05268 7.75979 4.14645 7.85355C4.24021 7.94732 4.36739 8 4.5 8H15.5C15.6326 8 15.7598 7.94732 15.8536 7.85355ZM13 11C12.4477 11 12 11.4477 12 12V16C12 16.5523 12.4477 17 13 17H14C14.5523 17 15 16.5523 15 16V12C15 11.4477 14.5523 11 14 11H13Z"/></symbol><symbol id="svg-inspection" data-name="inspection" viewBox="0 0 24 24" width="24" height="24" ><path d="M12 0C9.62663 0 7.30655 0.703788 5.33316 2.02236C3.35977 3.34094 1.8217 5.21509 0.913451 7.4078C0.00519943 9.60051 -0.232441 12.0133 0.230582 14.3411C0.693605 16.6689 1.83649 18.8071 3.51472 20.4853C5.19295 22.1635 7.33115 23.3064 9.65892 23.7694C11.9867 24.2324 14.3995 23.9948 16.5922 23.0866C18.7849 22.1783 20.6591 20.6402 21.9776 18.6668C23.2962 16.6935 24 14.3734 24 12C23.9963 8.81854 22.7308 5.76844 20.4812 3.51881C18.2316 1.26918 15.1815 0.00370522 12 0V0ZM18.927 8.2L12.082 17.489C12.0012 17.5962 11.8998 17.6863 11.7838 17.7539C11.6678 17.8215 11.5395 17.8654 11.4064 17.8829C11.2733 17.9004 11.138 17.8912 11.0085 17.8558C10.879 17.8205 10.7578 17.7597 10.652 17.677L5.76401 13.769C5.66144 13.6869 5.57605 13.5855 5.5127 13.4704C5.44936 13.3553 5.4093 13.2289 5.39481 13.0983C5.36556 12.8346 5.44224 12.5701 5.60801 12.363C5.77377 12.1559 6.01502 12.0231 6.2787 11.9938C6.54237 11.9646 6.80687 12.0412 7.01401 12.207L11.09 15.468L17.317 7.017C17.392 6.90451 17.489 6.80838 17.6021 6.73443C17.7153 6.66048 17.8423 6.61025 17.9754 6.58676C18.1085 6.56327 18.245 6.56702 18.3767 6.59777C18.5083 6.62853 18.6323 6.68565 18.7413 6.7657C18.8502 6.84574 18.9418 6.94705 19.0105 7.06348C19.0792 7.17992 19.1235 7.30907 19.1409 7.44313C19.1582 7.57719 19.1482 7.71339 19.1115 7.84347C19.0747 7.97356 19.012 8.09485 18.927 8.2Z"/></symbol><symbol id="svg-issue" data-name="issue" viewBox="0 0 24 24" width="24" height="24" ><path d="M23 10.586L13.414 1C13.0389 0.625059 12.5303 0.414429 12 0.414429C11.4697 0.414429 10.9611 0.625059 10.586 1L1 10.587C0.625059 10.9621 0.414429 11.4707 0.414429 12.001C0.414429 12.5313 0.625059 13.0399 1 13.415L10.586 23C10.9611 23.3749 11.4697 23.5856 12 23.5856C12.5303 23.5856 13.0389 23.3749 13.414 23L23 13.415C23.1858 13.2293 23.3332 13.0088 23.4338 12.7661C23.5343 12.5234 23.5861 12.2632 23.5861 12.0005C23.5861 11.7378 23.5343 11.4777 23.4338 11.2349C23.3332 10.9922 23.1858 10.7717 23 10.586ZM11.068 6.417C11.068 6.15178 11.1734 5.89743 11.3609 5.70989C11.5484 5.52236 11.8028 5.417 12.068 5.417C12.3332 5.417 12.5876 5.52236 12.7751 5.70989C12.9626 5.89743 13.068 6.15178 13.068 6.417V12.417C13.068 12.6822 12.9626 12.9366 12.7751 13.1241C12.5876 13.3116 12.3332 13.417 12.068 13.417C11.8028 13.417 11.5484 13.3116 11.3609 13.1241C11.1734 12.9366 11.068 12.6822 11.068 12.417V6.417ZM12.119 17.927H12.091C11.6967 17.9255 11.3183 17.7717 11.0346 17.4978C10.751 17.2239 10.5842 16.851 10.569 16.457C10.5617 16.261 10.5935 16.0655 10.6626 15.8819C10.7318 15.6983 10.8368 15.5304 10.9717 15.3879C11.1065 15.2454 11.2684 15.1313 11.4479 15.0521C11.6274 14.973 11.8209 14.9305 12.017 14.927H12.045C12.4394 14.928 12.8182 15.0816 13.1019 15.3556C13.3856 15.6297 13.5523 16.0028 13.567 16.397C13.5743 16.593 13.5425 16.7885 13.4734 16.9721C13.4042 17.1557 13.2992 17.3236 13.1643 17.4661C13.0295 17.6086 12.8676 17.7227 12.6881 17.8019C12.5086 17.881 12.3151 17.9235 12.119 17.927Z"/></symbol><symbol id="svg-leaderboard" data-name="leaderboard" viewBox="0 0 24 24" width="24" height="24" ><path d="M5.5 9.5H1.5C1.10218 9.5 0.720644 9.65804 0.43934 9.93934C0.158035 10.2206 0 10.6022 0 11L0 20C0 20.3978 0.158035 20.7794 0.43934 21.0607C0.720644 21.342 1.10218 21.5 1.5 21.5H5.5C5.63261 21.5 5.75979 21.4473 5.85355 21.3536C5.94732 21.2598 6 21.1326 6 21V10C6 9.86739 5.94732 9.74021 5.85355 9.64645C5.75979 9.55268 5.63261 9.5 5.5 9.5Z"/><path d="M22.5 13.5H18.5C18.3674 13.5 18.2402 13.5527 18.1464 13.6464C18.0527 13.7402 18 13.8674 18 14V21C18 21.1326 18.0527 21.2598 18.1464 21.3536C18.2402 21.4473 18.3674 21.5 18.5 21.5H22.5C22.8978 21.5 23.2794 21.342 23.5607 21.0607C23.842 20.7794 24 20.3978 24 20V15C24 14.6022 23.842 14.2206 23.5607 13.9393C23.2794 13.658 22.8978 13.5 22.5 13.5Z"/><path d="M15 2.5H9C8.60218 2.5 8.22064 2.65804 7.93934 2.93934C7.65804 3.22064 7.5 3.60218 7.5 4V21C7.5 21.1326 7.55268 21.2598 7.64645 21.3536C7.74021 21.4473 7.86739 21.5 8 21.5H16C16.1326 21.5 16.2598 21.4473 16.3536 21.3536C16.4473 21.2598 16.5 21.1326 16.5 21V4C16.5 3.60218 16.342 3.22064 16.0607 2.93934C15.7794 2.65804 15.3978 2.5 15 2.5ZM13 10.75H11C10.8011 10.75 10.6103 10.671 10.4697 10.5303C10.329 10.3897 10.25 10.1989 10.25 10C10.25 9.80109 10.329 9.61032 10.4697 9.46967C10.6103 9.32902 10.8011 9.25 11 9.25C11.0663 9.25 11.1299 9.22366 11.1768 9.17678C11.2237 9.12989 11.25 9.0663 11.25 9V7C11.25 6.9337 11.2237 6.87011 11.1768 6.82322C11.1299 6.77634 11.0663 6.75 11 6.75C10.8011 6.75 10.6103 6.67098 10.4697 6.53033C10.329 6.38968 10.25 6.19891 10.25 6C10.25 5.80109 10.329 5.61032 10.4697 5.46967C10.6103 5.32902 10.8011 5.25 11 5.25H11.5C11.8314 5.25053 12.149 5.38239 12.3833 5.6167C12.6176 5.85101 12.7495 6.16864 12.75 6.5V9C12.75 9.0663 12.7763 9.12989 12.8232 9.17678C12.8701 9.22366 12.9337 9.25 13 9.25C13.1989 9.25 13.3897 9.32902 13.5303 9.46967C13.671 9.61032 13.75 9.80109 13.75 10C13.75 10.1989 13.671 10.3897 13.5303 10.5303C13.3897 10.671 13.1989 10.75 13 10.75Z"/></symbol><symbol id="svg-logo" data-name="logo" viewBox="0 0 88.42 52.28" width="88" height="52"><title>fleetio-logo-mark-only</title><g><g><path d="M76.44,16.15A4.49,4.49,0,0,0,72,19.89L64.3,0H17.76L10,19.89a4.49,4.49,0,1,0-4.42,5.26V48l10.67-7.74h-.23a6,6,0,1,1,5.62-3.92l.11-.08L54,48.57l22.46-13V25.15a4.5,4.5,0,0,0,0-9Zm-33,4.5H14L20.5,4H61.56L68,20.65H64.45c0-.06,0-.12,0-.18a10.5,10.5,0,1,0-21,0C43.46,20.53,43.47,20.59,43.47,20.65Zm3.5,0c0-.06,0-.12,0-.18a7,7,0,0,1,14,0c0,.06,0,.12,0,.18ZM66,40.32a6,6,0,1,1,6-6A6,6,0,0,1,66,40.32Z" fill="#242b2e"/><polygon points="88.42 28.34 84.68 37.56 83.19 35.07 53.96 52.28 21.73 39.51 0 52.28 21.73 32.37 53.96 45.12 79.97 29.71 78.52 27.27 88.42 28.34" fill="#18cc6c"/></g></g></symbol><symbol id="svg-map" data-name="map" viewBox="0 0 24 24" width="24" height="24" ><path d="M1.79997 18.025L0.466966 22.025C0.391758 22.2503 0.371117 22.4902 0.406742 22.725C0.442368 22.9598 0.533241 23.1828 0.671885 23.3756C0.810528 23.5685 0.992979 23.7256 1.20422 23.8342C1.41547 23.9427 1.64947 23.9996 1.88697 24H22.113C22.3506 23.9999 22.5849 23.9433 22.7964 23.8349C23.0079 23.7264 23.1906 23.5693 23.3295 23.3765C23.4683 23.1836 23.5594 22.9605 23.5951 22.7255C23.6308 22.4905 23.6102 22.2504 23.535 22.025L22.202 18.025C22.1024 17.7266 21.9115 17.4671 21.6563 17.2832C21.4011 17.0992 21.0945 17.0002 20.78 17H15.211C15.1684 17.0001 15.1265 17.0109 15.0893 17.0316C15.052 17.0522 15.0206 17.0819 14.998 17.118C14.212 18.388 13.554 19.38 13.244 19.84C13.1067 20.0438 12.9214 20.2107 12.7045 20.3261C12.4876 20.4415 12.2457 20.5019 12 20.5019C11.7543 20.5019 11.5123 20.4415 11.2954 20.3261C11.0785 20.2107 10.8933 20.0438 10.756 19.84C10.446 19.38 9.78797 18.388 9.00197 17.118C8.97925 17.082 8.94783 17.0523 8.9106 17.0317C8.87336 17.0111 8.83153 17.0002 8.78897 17H3.22097C2.90657 17.0004 2.60024 17.0995 2.34526 17.2835C2.09027 17.4674 1.89953 17.7268 1.79997 18.025V18.025Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12.1184 18.7701C12.082 18.7896 12.0413 18.7999 12 18.8C11.9589 18.8 11.9184 18.7902 11.882 18.7712C11.8456 18.7522 11.8144 18.7247 11.791 18.691C10.697 17.031 5.67395 9.24897 5.67395 6.19997C5.68192 5.37742 5.8519 4.56449 6.17419 3.80766C6.49647 3.05082 6.96473 2.36491 7.55222 1.78913C8.1397 1.21335 8.83489 0.758977 9.59805 0.451984C10.3612 0.144992 11.1774 -0.00860429 12 -2.57111e-05C12.8225 -0.00847247 13.6386 0.145214 14.4017 0.452253C15.1648 0.759293 15.8599 1.21367 16.4474 1.78943C17.0349 2.36518 17.5031 3.05104 17.8254 3.80782C18.1478 4.56459 18.3179 5.37745 18.326 6.19997C18.326 9.24597 13.3 17.029 12.209 18.688C12.186 18.7224 12.1549 18.7506 12.1184 18.7701ZM12 8.99997C13.6569 8.99997 15 7.65682 15 5.99997C15 4.34312 13.6569 2.99997 12 2.99997C10.3431 2.99997 9 4.34312 9 5.99997C9 7.65682 10.3431 8.99997 12 8.99997Z"/></symbol><symbol id="svg-nav-menu" data-name="nav-menu" viewBox="0 0 24 24" width="24" height="24" ><path d="M22.9565 3H1.04348C0.467181 3 0 3.44772 0 4V5C0 5.55228 0.467181 6 1.04348 6H22.9565C23.5328 6 24 5.55228 24 5V4C24 3.44772 23.5328 3 22.9565 3Z"/><path d="M22.9565 10.5H1.04348C0.467181 10.5 0 10.9477 0 11.5V12.5C0 13.0523 0.467181 13.5 1.04348 13.5H22.9565C23.5328 13.5 24 13.0523 24 12.5V11.5C24 10.9477 23.5328 10.5 22.9565 10.5Z"/><path d="M22.9565 18H1.04348C0.467181 18 0 18.4477 0 19V20C0 20.5523 0.467181 21 1.04348 21H22.9565C23.5328 21 24 20.5523 24 20V19C24 18.4477 23.5328 18 22.9565 18Z"/></symbol><symbol id="svg-part" data-name="part" viewBox="0 0 24 24" width="24" height="24" ><path d="M15.973 8.271C16.0166 8.25111 16.0536 8.21909 16.0796 8.17875C16.1055 8.13841 16.1193 8.09146 16.1193 8.0435C16.1193 7.99554 16.1055 7.94858 16.0796 7.90825C16.0536 7.86791 16.0166 7.83589 15.973 7.816L6.21596 3.368C6.15205 3.33961 6.0829 3.32494 6.01296 3.32494C5.94303 3.32494 5.87387 3.33961 5.80996 3.368L1.99296 5.024C1.94787 5.04321 1.90941 5.07526 1.88238 5.11615C1.85535 5.15704 1.84094 5.20498 1.84094 5.254C1.84094 5.30302 1.85535 5.35096 1.88238 5.39185C1.90941 5.43274 1.94787 5.46479 1.99296 5.484L12.283 9.772C12.3465 9.79859 12.4148 9.81178 12.4836 9.81075C12.5524 9.80971 12.6203 9.79448 12.683 9.766L15.973 8.271Z"/><path d="M22.062 5.5C22.1059 5.48025 22.1432 5.44822 22.1694 5.40777C22.1956 5.36732 22.2095 5.32017 22.2095 5.272C22.2095 5.22383 22.1956 5.17669 22.1694 5.13624C22.1432 5.09579 22.1059 5.06376 22.062 5.044L12.4 0.847004C12.2739 0.791941 12.1377 0.763519 12 0.763519C11.8624 0.763519 11.7262 0.791941 11.6 0.847004L8.38002 2.247C8.3358 2.26663 8.29823 2.29867 8.27185 2.33923C8.24548 2.37979 8.23145 2.42713 8.23145 2.4755C8.23145 2.52388 8.24548 2.57122 8.27185 2.61178C8.29823 2.65234 8.3358 2.68438 8.38002 2.704L18.08 7.126C18.145 7.15557 18.2156 7.17087 18.287 7.17087C18.3584 7.17087 18.429 7.15557 18.494 7.126L22.062 5.5Z"/><path d="M0.846 6.63001C0.807998 6.6142 0.766683 6.60802 0.72572 6.61202C0.684758 6.61602 0.645416 6.63007 0.611186 6.65292C0.576957 6.67577 0.548899 6.70672 0.529503 6.74302C0.510107 6.77932 0.499973 6.81985 0.5 6.86101V18.007C0.499984 18.2044 0.558372 18.3973 0.667811 18.5616C0.77725 18.7258 0.932846 18.854 1.115 18.93L11.4 23.217C11.438 23.2328 11.4793 23.239 11.5203 23.235C11.5612 23.231 11.6006 23.2169 11.6348 23.1941C11.669 23.1712 11.6971 23.1403 11.7165 23.104C11.7359 23.0677 11.746 23.0272 11.746 22.986V11.34C11.7459 11.2906 11.7312 11.2424 11.7038 11.2013C11.6765 11.1602 11.6375 11.1281 11.592 11.109L0.846 6.63001Z"/><path d="M13.25 22.944C13.2502 22.9857 13.2608 23.0267 13.2809 23.0633C13.3009 23.0999 13.3298 23.1309 13.3648 23.1535C13.3999 23.1761 13.44 23.1897 13.4816 23.1929C13.5232 23.1961 13.5649 23.189 13.603 23.172L22.914 18.94C23.0887 18.8606 23.2368 18.7325 23.3408 18.5711C23.4447 18.4098 23.4999 18.2219 23.5 18.03V6.88601C23.5 6.8442 23.4896 6.80305 23.4696 6.76633C23.4496 6.72961 23.4208 6.69848 23.3856 6.6758C23.3505 6.65312 23.3103 6.6396 23.2686 6.6365C23.2269 6.63339 23.1851 6.64078 23.147 6.65801L13.4 11.09C13.3562 11.1096 13.3189 11.1414 13.2928 11.1817C13.2667 11.222 13.2529 11.269 13.253 11.317L13.25 22.944Z"/></symbol><symbol id="svg-place" data-name="place" viewBox="0 0 24 24" width="24" height="24" ><path d="M8 0C5.879 0.00238211 3.84555 0.846002 2.34578 2.34578C0.846002 3.84555 0.00238211 5.879 0 8C0 11.343 4.509 18.912 6.576 22.2C6.63331 22.2917 6.71881 22.3624 6.81968 22.4014C6.92055 22.4404 7.03135 22.4456 7.13546 22.4163C7.23956 22.3871 7.33137 22.3248 7.39709 22.2389C7.46282 22.153 7.49893 22.0481 7.5 21.94V16C7.49992 15.6286 7.60325 15.2645 7.79842 14.9486C7.99358 14.6326 8.27287 14.3772 8.605 14.211L11.605 12.711C11.883 12.5724 12.1894 12.5003 12.5 12.5003C12.8106 12.5003 13.117 12.5724 13.395 12.711L13.94 12.984C14.0006 13.0144 14.0668 13.0322 14.1345 13.0362C14.2022 13.0402 14.27 13.0304 14.3338 13.0074C14.3976 12.9844 14.4561 12.9486 14.5056 12.9023C14.5551 12.856 14.5947 12.8001 14.622 12.738C15.3679 11.2565 15.835 9.65045 16 8C15.9976 5.879 15.154 3.84555 13.6542 2.34578C12.1544 0.846002 10.121 0.00238211 8 0V0ZM8 11C7.40666 11 6.82664 10.8241 6.33329 10.4944C5.83994 10.1648 5.45542 9.69623 5.22836 9.14805C5.0013 8.59987 4.94189 7.99667 5.05764 7.41473C5.1734 6.83279 5.45912 6.29824 5.87868 5.87868C6.29824 5.45912 6.83279 5.1734 7.41473 5.05764C7.99667 4.94189 8.59987 5.0013 9.14805 5.22836C9.69623 5.45542 10.1648 5.83994 10.4944 6.33329C10.8241 6.82664 11 7.40666 11 8C11 8.79565 10.6839 9.55871 10.1213 10.1213C9.55871 10.6839 8.79565 11 8 11Z"/><path d="M15.724 15.553L12.724 14.053C12.6545 14.0182 12.5778 14 12.5 14C12.4222 14 12.3455 14.0182 12.276 14.053L9.276 15.553C9.19305 15.5946 9.12331 15.6584 9.07456 15.7373C9.02582 15.8163 9 15.9072 9 16V23.5C9 23.6326 9.05268 23.7598 9.14645 23.8536C9.24021 23.9473 9.36739 24 9.5 24H11C11.1326 24 11.2598 23.9473 11.3536 23.8536C11.4473 23.7598 11.5 23.6326 11.5 23.5V22.5C11.5 22.3674 11.5527 22.2402 11.6464 22.1464C11.7402 22.0527 11.8674 22 12 22H13C13.1326 22 13.2598 22.0527 13.3536 22.1464C13.4473 22.2402 13.5 22.3674 13.5 22.5V23.5C13.5 23.6326 13.5527 23.7598 13.6464 23.8536C13.7402 23.9473 13.8674 24 14 24H15.5C15.6326 24 15.7598 23.9473 15.8536 23.8536C15.9473 23.7598 16 23.6326 16 23.5V16C16 15.9072 15.9742 15.8163 15.9254 15.7373C15.8767 15.6584 15.8069 15.5946 15.724 15.553ZM14 20H11C10.8674 20 10.7402 19.9473 10.6464 19.8536C10.5527 19.7598 10.5 19.6326 10.5 19.5C10.5 19.3674 10.5527 19.2402 10.6464 19.1464C10.7402 19.0527 10.8674 19 11 19H14C14.1326 19 14.2598 19.0527 14.3536 19.1464C14.4473 19.2402 14.5 19.3674 14.5 19.5C14.5 19.6326 14.4473 19.7598 14.3536 19.8536C14.2598 19.9473 14.1326 20 14 20ZM14 17.5H11C10.8674 17.5 10.7402 17.4473 10.6464 17.3536C10.5527 17.2598 10.5 17.1326 10.5 17C10.5 16.8674 10.5527 16.7402 10.6464 16.6464C10.7402 16.5527 10.8674 16.5 11 16.5H14C14.1326 16.5 14.2598 16.5527 14.3536 16.6464C14.4473 16.7402 14.5 16.8674 14.5 17C14.5 17.1326 14.4473 17.2598 14.3536 17.3536C14.2598 17.4473 14.1326 17.5 14 17.5Z"/><path d="M23.692 12.038L17.692 9.538C17.616 9.50639 17.5334 9.49403 17.4514 9.50203C17.3695 9.51002 17.2908 9.53812 17.2224 9.58382C17.1539 9.62953 17.0978 9.69143 17.059 9.76403C17.0202 9.83663 16.9999 9.91768 17 10V23.5C17 23.6326 17.0527 23.7598 17.1464 23.8536C17.2402 23.9473 17.3674 24 17.5 24H23.5C23.6326 24 23.7598 23.9473 23.8536 23.8536C23.9473 23.7598 24 23.6326 24 23.5V12.5C24.0001 12.4012 23.9708 12.3045 23.916 12.2223C23.8612 12.1401 23.7832 12.0759 23.692 12.038ZM22 20H19C18.8674 20 18.7402 19.9473 18.6464 19.8536C18.5527 19.7598 18.5 19.6326 18.5 19.5C18.5 19.3674 18.5527 19.2402 18.6464 19.1464C18.7402 19.0527 18.8674 19 19 19H22C22.1326 19 22.2598 19.0527 22.3536 19.1464C22.4473 19.2402 22.5 19.3674 22.5 19.5C22.5 19.6326 22.4473 19.7598 22.3536 19.8536C22.2598 19.9473 22.1326 20 22 20ZM22 17.5H19C18.8674 17.5 18.7402 17.4473 18.6464 17.3536C18.5527 17.2598 18.5 17.1326 18.5 17C18.5 16.8674 18.5527 16.7402 18.6464 16.6464C18.7402 16.5527 18.8674 16.5 19 16.5H22C22.1326 16.5 22.2598 16.5527 22.3536 16.6464C22.4473 16.7402 22.5 16.8674 22.5 17C22.5 17.1326 22.4473 17.2598 22.3536 17.3536C22.2598 17.4473 22.1326 17.5 22 17.5ZM22 15H19C18.8674 15 18.7402 14.9473 18.6464 14.8536C18.5527 14.7598 18.5 14.6326 18.5 14.5C18.5 14.3674 18.5527 14.2402 18.6464 14.1464C18.7402 14.0527 18.8674 14 19 14H22C22.1326 14 22.2598 14.0527 22.3536 14.1464C22.4473 14.2402 22.5 14.3674 22.5 14.5C22.5 14.6326 22.4473 14.7598 22.3536 14.8536C22.2598 14.9473 22.1326 15 22 15Z"/></symbol><symbol id="svg-question" data-name="question" viewBox="0 0 24 24" width="24" height="24" ><g clip-path="url(#def-svg-question-0)"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.1618 3.44747C10.8132 3.11045 11.5446 2.95895 12.2762 3.00953C13.0078 3.06011 13.7114 3.31083 14.3101 3.73429C14.9089 4.15774 15.3797 4.73763 15.6711 5.41058C15.9625 6.08353 16.0634 6.82365 15.9626 7.55003C15.8618 8.27642 15.5633 8.96112 15.0996 9.52931C14.636 10.0975 14.0251 10.5273 13.3337 10.7717C12.5047 11.0648 11.787 11.6078 11.2795 12.3259C10.7722 13.0438 10.5 13.902 10.5003 14.781L10.5 15.5C10.5 16.3284 11.1716 17 12 17C12.8284 17 13.5 16.3284 13.5 15.5L13.5003 14.7795C13.5001 14.5208 13.5802 14.2685 13.7295 14.0573C13.8787 13.8461 14.0898 13.6864 14.3337 13.6002C15.5436 13.1724 16.6127 12.4203 17.424 11.426C18.2353 10.4317 18.7577 9.23347 18.9341 7.96233C19.1105 6.69119 18.934 5.39603 18.424 4.2184C17.9141 3.04077 17.0902 2.02598 16.0424 1.28496C14.9947 0.543938 13.7634 0.105192 12.4831 0.0166745C11.2028 -0.0718426 9.92289 0.193277 8.78313 0.783055C7.64336 1.37283 6.68765 2.26457 6.02046 3.36082C5.35326 4.45706 5.00025 5.71561 5 6.99893C4.99984 7.82736 5.67129 8.49906 6.49971 8.49922C7.32814 8.49937 7.99984 7.82793 8 6.9995C8.00014 6.26616 8.20187 5.54696 8.58313 4.92052C8.9644 4.29408 9.51053 3.7845 10.1618 3.44747ZM12 24C13.2426 24 14.25 22.9926 14.25 21.75C14.25 20.5074 13.2426 19.5 12 19.5C10.7574 19.5 9.75 20.5074 9.75 21.75C9.75 22.9926 10.7574 24 12 24Z"/></g></symbol><symbol id="svg-reminder" data-name="reminder" viewBox="0 0 24 24" width="24" height="24" ><path fill-rule="evenodd" clip-rule="evenodd" d="M13.5 3.18262V1.5C13.5 1.10218 13.342 0.720644 13.0607 0.43934C12.7794 0.158035 12.3978 0 12 0C11.6022 0 11.2206 0.158035 10.9393 0.43934C10.658 0.720644 10.5 1.10218 10.5 1.5V3.18262C8.83312 3.60469 7.34274 4.55706 6.25798 5.903C5.06583 7.38218 4.44226 9.23909 4.5 11.138V16C4.5 16.3978 4.34196 16.7794 4.06066 17.0607C3.77936 17.342 3.39782 17.5 3 17.5C2.73478 17.5 2.48043 17.6054 2.29289 17.7929C2.10536 17.9804 2 18.2348 2 18.5C2 18.7652 2.10536 19.0196 2.29289 19.2071C2.48043 19.3946 2.73478 19.5 3 19.5H21C21.2652 19.5 21.5196 19.3946 21.7071 19.2071C21.8946 19.0196 22 18.7652 22 18.5C22 18.2348 21.8946 17.9804 21.7071 17.7929C21.5196 17.6054 21.2652 17.5 21 17.5C20.6022 17.5 20.2206 17.342 19.9393 17.0607C19.658 16.7794 19.5 16.3978 19.5 16V11.138C19.5577 9.23909 18.9342 7.38218 17.742 5.903C16.6573 4.55706 15.1669 3.60469 13.5 3.18262ZM14.236 21H9.76401C9.70263 21.0001 9.64343 21.0228 9.59769 21.0637C9.55196 21.1047 9.52288 21.161 9.51601 21.222C9.50511 21.3143 9.49977 21.4071 9.50001 21.5C9.50001 22.163 9.7634 22.7989 10.2322 23.2678C10.7011 23.7366 11.337 24 12 24C12.663 24 13.2989 23.7366 13.7678 23.2678C14.2366 22.7989 14.5 22.163 14.5 21.5C14.5002 21.4071 14.4949 21.3143 14.484 21.222C14.4776 21.1608 14.4486 21.1042 14.4028 21.0632C14.357 21.0222 14.2975 20.9997 14.236 21Z"/></symbol><symbol id="svg-report" data-name="report" viewBox="0 0 24 24" width="24" height="24" ><path d="M23 10.5C23.1326 10.5 23.2598 10.4473 23.3536 10.3536C23.4473 10.2598 23.5 10.1326 23.5 10C23.4968 7.34881 22.4422 4.80712 20.5676 2.93244C18.6929 1.05776 16.1512 0.00317572 13.5 0C13.3674 0 13.2402 0.0526784 13.1464 0.146447C13.0527 0.240215 13 0.367392 13 0.5V9.525C13.0003 9.7836 13.103 10.0315 13.2858 10.2145C13.4686 10.3974 13.7164 10.5005 13.975 10.501L23 10.5Z"/><path d="M23.5 12H14C13.8527 11.9812 13.7032 12.0114 13.5747 12.0859C13.4461 12.1605 13.3457 12.2752 13.2888 12.4125C13.232 12.5497 13.2219 12.7019 13.26 12.8455C13.2982 12.989 13.3825 13.1161 13.5 13.207L20.218 19.925C20.3118 20.0187 20.4389 20.0714 20.5715 20.0714C20.7041 20.0714 20.8313 20.0187 20.925 19.925C21.903 18.9521 22.6783 17.795 23.2062 16.5205C23.734 15.246 24.0038 13.8795 24 12.5C24 12.3674 23.9474 12.2402 23.8536 12.1464C23.7598 12.0527 23.6326 12 23.5 12Z"/><path d="M10.588 24C11.9542 23.9971 13.3062 23.723 14.5657 23.1936C15.8252 22.6642 16.967 21.89 17.925 20.916C18.0188 20.8222 18.0714 20.6951 18.0714 20.5625C18.0714 20.4299 18.0188 20.3028 17.925 20.209L11.207 13.491C11.0889 13.3492 11.0167 13.1748 11 12.991V3.491C11 3.35839 10.9473 3.23121 10.8536 3.13744C10.7598 3.04368 10.6326 2.991 10.5 2.991C7.71405 3.00267 5.04683 4.12058 3.08511 6.09881C1.12338 8.07703 0.0278515 10.7535 0.039521 13.5395C0.0511905 16.3255 1.1691 18.9927 3.14733 20.9544C5.12556 22.9161 7.80205 24.0117 10.588 24V24Z"/></symbol><symbol id="svg-search" data-name="search" viewBox="0 0 25 25" width="25" height="25" ><path d="M24.414 21.591L19.769 16.946C21.1833 14.8289 21.7596 12.2613 21.3857 9.74285C21.0118 7.22435 19.7145 4.93497 17.7461 3.32002C15.7778 1.70506 13.279 0.880008 10.736 1.00534C8.19303 1.13067 5.78756 2.19742 3.98752 3.9981C2.18748 5.79878 1.12157 8.20463 0.997143 10.7477C0.872712 13.2907 1.69865 15.7891 3.3143 17.757C4.92995 19.7248 7.21979 21.0213 9.73841 21.3943C12.257 21.7672 14.8244 21.1901 16.941 19.775L21.586 24.419C21.9642 24.7879 22.4716 24.9944 23 24.9944C23.5284 24.9944 24.0358 24.7879 24.414 24.419C24.7889 24.0439 24.9996 23.5353 24.9996 23.005C24.9996 22.4747 24.7889 21.9661 24.414 21.591ZM11.25 4.005C12.6839 4.005 14.0856 4.43021 15.2779 5.22685C16.4701 6.02349 17.3994 7.15578 17.9481 8.48055C18.4969 9.80531 18.6404 11.263 18.3607 12.6694C18.0809 14.0758 17.3905 15.3676 16.3765 16.3815C15.3626 17.3955 14.0708 18.0859 12.6644 18.3657C11.258 18.6454 9.80031 18.5019 8.47554 17.9531C7.15078 17.4044 6.01848 16.4751 5.22184 15.2829C4.4252 14.0906 4 12.6889 4 11.255C4.00211 9.33283 4.76663 7.48999 6.12581 6.13081C7.48499 4.77163 9.32783 4.00712 11.25 4.005Z"/></symbol><symbol id="svg-service" data-name="service" viewBox="0 0 24 24" width="24" height="24" ><path d="M23.582 4.986C23.5558 4.9042 23.509 4.83051 23.4461 4.77205C23.3832 4.71358 23.3063 4.67231 23.2228 4.65221C23.1393 4.63212 23.052 4.63387 22.9694 4.6573C22.8867 4.68074 22.8115 4.72506 22.751 4.786L19.194 8.341C19.142 8.39292 19.0792 8.43274 19.0101 8.45763C18.9409 8.48252 18.8672 8.49186 18.794 8.485L16.2 8.249C16.0836 8.23851 15.9745 8.18754 15.8917 8.10496C15.809 8.02239 15.7578 7.91342 15.747 7.797L15.513 5.2C15.5063 5.12677 15.5158 5.05295 15.5408 4.98381C15.5659 4.91467 15.6059 4.85191 15.658 4.8L19.216 1.242C19.2767 1.18146 19.3208 1.10633 19.3441 1.02382C19.3674 0.941313 19.3691 0.854204 19.349 0.770858C19.3289 0.687512 19.2877 0.610731 19.2294 0.547888C19.1711 0.485044 19.0976 0.438251 19.016 0.412001C17.7707 0.0462067 16.4496 0.0246879 15.1931 0.349733C13.9366 0.674777 12.7917 1.33424 11.88 2.258C10.913 3.21722 10.2475 4.4382 9.96533 5.77072C9.68319 7.10324 9.79674 8.48917 10.292 9.758C10.3294 9.84669 10.3399 9.94445 10.3221 10.0391C10.3043 10.1337 10.2591 10.221 10.192 10.29L0.912001 19.563C0.537436 19.9223 0.279838 20.3861 0.172808 20.8939C0.0657783 21.4018 0.114285 21.9301 0.312001 22.41C0.478494 22.7791 0.731664 23.1025 1.04998 23.3527C1.36829 23.6029 1.74232 23.7725 2.14027 23.8471C2.53822 23.9218 2.9483 23.8992 3.33564 23.7813C3.72298 23.6634 4.07611 23.4537 4.365 23.17L13.7 13.834C13.7693 13.7673 13.8565 13.7222 13.951 13.7045C14.0456 13.6867 14.1432 13.697 14.232 13.734C15.4985 14.2337 16.8836 14.3517 18.2164 14.0734C19.5491 13.7951 20.7713 13.1327 21.732 12.168C22.661 11.2501 23.3237 10.0974 23.6495 8.83265C23.9753 7.56793 23.9519 6.23852 23.582 4.986V4.986Z"/></symbol><symbol id="svg-settings" data-name="settings" viewBox="0 0 24 24" width="24" height="24" ><path d="M22.5 9.5H20.638C20.4529 8.8602 20.197 8.24305 19.875 7.66L21.192 6.344C21.3314 6.2047 21.442 6.0393 21.5174 5.85725C21.5928 5.6752 21.6317 5.48006 21.6317 5.283C21.6317 5.08594 21.5928 4.8908 21.5174 4.70875C21.442 4.5267 21.3314 4.3613 21.192 4.222L19.777 2.809C19.4957 2.52779 19.1142 2.36982 18.7165 2.36982C18.3188 2.36982 17.9373 2.52779 17.656 2.809L16.338 4.126C15.7558 3.8038 15.1392 3.54787 14.5 3.363V1.5C14.5 1.10218 14.342 0.720644 14.0607 0.43934C13.7794 0.158035 13.3978 0 13 0L11 0C10.6022 0 10.2206 0.158035 9.93934 0.43934C9.65804 0.720644 9.5 1.10218 9.5 1.5V3.363C8.86058 3.5483 8.24378 3.8042 7.661 4.126L6.343 2.809C6.06171 2.52779 5.68025 2.36982 5.2825 2.36982C4.88475 2.36982 4.50329 2.52779 4.222 2.809L2.807 4.223C2.66761 4.3623 2.55704 4.5277 2.48159 4.70975C2.40615 4.8918 2.36732 5.08694 2.36732 5.284C2.36732 5.48106 2.40615 5.6762 2.48159 5.85825C2.55704 6.0403 2.66761 6.2057 2.807 6.345L4.125 7.662C3.80259 8.24414 3.54665 8.86067 3.362 9.5H1.5C1.10218 9.5 0.720644 9.65804 0.43934 9.93934C0.158035 10.2206 0 10.6022 0 11L0 13C0 13.3978 0.158035 13.7794 0.43934 14.0607C0.720644 14.342 1.10218 14.5 1.5 14.5H3.362C3.54657 15.1397 3.80252 15.7565 4.125 16.339L2.806 17.658C2.52479 17.9393 2.36682 18.3208 2.36682 18.7185C2.36682 19.1162 2.52479 19.4977 2.806 19.779L4.22 21.193C4.50682 21.464 4.88643 21.6149 5.281 21.6149C5.67557 21.6149 6.05518 21.464 6.342 21.193L7.66 19.876C8.24309 20.1981 8.86022 20.4544 9.5 20.64V22.5C9.5 22.8978 9.65804 23.2794 9.93934 23.5607C10.2206 23.842 10.6022 24 11 24H13C13.3978 24 13.7794 23.842 14.0607 23.5607C14.342 23.2794 14.5 22.8978 14.5 22.5V20.64C15.1394 20.4547 15.7562 20.1988 16.339 19.877L17.657 21.194C17.9383 21.4752 18.3198 21.6332 18.7175 21.6332C19.1152 21.6332 19.4967 21.4752 19.778 21.194L21.192 19.78C21.4732 19.4987 21.6312 19.1172 21.6312 18.7195C21.6312 18.3218 21.4732 17.9403 21.192 17.659L19.875 16.342C20.1973 15.7591 20.4532 15.1419 20.638 14.502H22.5C22.6972 14.502 22.8924 14.4631 23.0745 14.3876C23.2566 14.3121 23.4221 14.2015 23.5614 14.062C23.7007 13.9225 23.8111 13.7569 23.8864 13.5746C23.9617 13.3924 24.0003 13.1972 24 13V11C24 10.6022 23.842 10.2206 23.5607 9.93934C23.2794 9.65804 22.8978 9.5 22.5 9.5ZM12 17C11.0111 17 10.0444 16.7068 9.22215 16.1573C8.3999 15.6079 7.75904 14.827 7.3806 13.9134C7.00216 12.9998 6.90315 11.9945 7.09607 11.0245C7.289 10.0546 7.7652 9.16373 8.46447 8.46447C9.16373 7.7652 10.0546 7.289 11.0245 7.09607C11.9945 6.90315 12.9998 7.00216 13.9134 7.3806C14.827 7.75904 15.6079 8.3999 16.1573 9.22215C16.7068 10.0444 17 11.0111 17 12C16.9984 13.3256 16.4711 14.5964 15.5338 15.5338C14.5964 16.4711 13.3256 16.9984 12 17V17Z"/></symbol><symbol id="svg-trip" data-name="trip" viewBox="0 0 24 24" width="24" height="24" ><path d="M19.012 14.552C18.9988 14.5198 18.9787 14.4908 18.9531 14.4671C18.9276 14.4435 18.8971 14.4257 18.864 14.415C18.5501 14.3134 18.2667 14.1346 18.04 13.895C16.34 12.08 13.5 8.609 13.5 5.75C13.5 5.579 13.509 5.411 13.524 5.244C13.539 5.077 13.604 4.75 13.275 4.75H12C11.9337 4.75 11.8701 4.77634 11.8232 4.82322C11.7763 4.87011 11.75 4.9337 11.75 5V7.75C11.75 7.94891 11.6709 8.13968 11.5303 8.28033C11.3896 8.42098 11.1989 8.5 11 8.5C10.801 8.5 10.6103 8.42098 10.4696 8.28033C10.329 8.13968 10.25 7.94891 10.25 7.75V5C10.25 4.9337 10.2236 4.87011 10.1767 4.82322C10.1299 4.77634 10.0663 4.75 9.99996 4.75H7.18096C7.08059 4.75006 6.98256 4.78033 6.89963 4.83687C6.81669 4.8934 6.7527 4.97359 6.71596 5.067L0.0339605 22.067C0.00412291 22.1429 -0.00671146 22.2249 0.00240122 22.3059C0.0115139 22.3869 0.0402972 22.4645 0.0862436 22.5318C0.13219 22.5991 0.193906 22.6542 0.266014 22.6923C0.338123 22.7303 0.418437 22.7501 0.49996 22.75H9.99996C10.0663 22.75 10.1299 22.7237 10.1767 22.6768C10.2236 22.6299 10.25 22.5663 10.25 22.5V19.75C10.25 19.5511 10.329 19.3603 10.4696 19.2197C10.6103 19.079 10.801 19 11 19C11.1989 19 11.3896 19.079 11.5303 19.2197C11.6709 19.3603 11.75 19.5511 11.75 19.75V22.5C11.75 22.5663 11.7763 22.6299 11.8232 22.6768C11.8701 22.7237 11.9337 22.75 12 22.75H21.5C21.5815 22.7501 21.6618 22.7303 21.7339 22.6923C21.806 22.6542 21.8677 22.5991 21.9137 22.5318C21.9596 22.4645 21.9884 22.3869 21.9975 22.3059C22.0066 22.2249 21.9958 22.1429 21.966 22.067L19.012 14.552ZM11.75 15.752C11.75 15.9509 11.6709 16.1417 11.5303 16.2823C11.3896 16.423 11.1989 16.502 11 16.502C10.801 16.502 10.6103 16.423 10.4696 16.2823C10.329 16.1417 10.25 15.9509 10.25 15.752V11.752C10.25 11.5531 10.329 11.3623 10.4696 11.2217C10.6103 11.081 10.801 11.002 11 11.002C11.1989 11.002 11.3896 11.081 11.5303 11.2217C11.6709 11.3623 11.75 11.5531 11.75 11.752V15.752Z"/><path d="M19.864 12.87C20.935 11.723 24 8.226 24 5.75C24 4.55653 23.5259 3.41193 22.682 2.56802C21.8381 1.72411 20.6935 1.25 19.5 1.25C18.3065 1.25 17.1619 1.72411 16.318 2.56802C15.4741 3.41193 15 4.55653 15 5.75C15 8.226 18.065 11.723 19.136 12.87C19.1827 12.9196 19.2392 12.9592 19.3018 12.9862C19.3643 13.0133 19.4318 13.0272 19.5 13.0272C19.5682 13.0272 19.6357 13.0133 19.6982 12.9862C19.7608 12.9592 19.8173 12.9196 19.864 12.87V12.87ZM18 5.75C18 5.45333 18.088 5.16332 18.2528 4.91664C18.4176 4.66997 18.6519 4.47771 18.926 4.36418C19.2001 4.25065 19.5017 4.22094 19.7926 4.27882C20.0836 4.3367 20.3509 4.47956 20.5607 4.68934C20.7704 4.89912 20.9133 5.16639 20.9712 5.45736C21.0291 5.74834 20.9993 6.04994 20.8858 6.32403C20.7723 6.59811 20.58 6.83238 20.3334 6.9972C20.0867 7.16203 19.7967 7.25 19.5 7.25C19.1022 7.25 18.7206 7.09196 18.4393 6.81066C18.158 6.52936 18 6.14782 18 5.75Z"/></symbol><symbol id="svg-vehicle" data-name="vehicle" viewBox="0 0 24 24" width="24" height="24" ><path fill-rule="evenodd" clip-rule="evenodd" d="M22.1929 10.3308C22.2048 10.3578 22.2214 10.3826 22.242 10.404C23.048 11.2339 23.4992 12.3451 23.5 13.502V15.502C23.4984 16.0032 23.3457 16.4924 23.0618 16.9055C22.7966 17.2916 22.4284 17.5946 22 17.7806V20C22 20.5523 21.5523 21 21 21H19C18.4477 21 18 20.5523 18 20V17.8172L6 17.8148V20C6 20.5523 5.55228 21 5 21H3C2.44772 21 2 20.5523 2 20V17.7766C1.57156 17.5906 1.20334 17.2876 0.938115 16.9015C0.654299 16.4884 0.501613 15.9992 0.499983 15.498V13.498C0.501514 12.3436 0.951506 11.2349 1.75498 10.406C1.78137 10.3786 1.80119 10.3455 1.81297 10.3093L1.81341 10.3088C1.81453 10.3042 1.81553 10.2995 1.81639 10.2947C1.82517 10.2465 1.81956 10.1967 1.80027 10.1517C1.78098 10.1066 1.74885 10.0681 1.70789 10.0412C1.66693 10.0142 1.61894 9.9999 1.5699 10H1.28198C1.01677 10 0.762411 9.89464 0.574875 9.70711C0.387338 9.51957 0.281982 9.26522 0.281982 9V8C0.281982 7.73478 0.387338 7.48043 0.574875 7.29289C0.762411 7.10536 1.01677 7 1.28198 7H2.63198C2.86474 7.00062 3.0942 7.0551 3.30238 7.1592C3.4838 7.24991 3.64477 7.37614 3.77591 7.53007L3.78758 7.50165C3.81197 7.46945 3.82823 7.43184 3.83498 7.39201L4.23498 5.00901C4.34955 4.30737 4.71029 3.66948 5.25253 3.2097C5.79477 2.74992 6.48305 2.49832 7.19398 2.50001H16.802C17.5126 2.49825 18.2007 2.74956 18.7429 3.20894C19.2851 3.66832 19.646 4.30574 19.761 5.00701L20.161 7.39001C20.1676 7.42981 20.1837 7.46743 20.208 7.49964C20.2145 7.50829 20.2216 7.51648 20.2291 7.52417C20.3593 7.37291 20.5185 7.24874 20.6976 7.1592C20.9058 7.0551 21.1352 7.00062 21.368 7H22.718C22.9832 7 23.2376 7.10536 23.4251 7.29289C23.6126 7.48043 23.718 7.73478 23.718 8V9C23.718 9.26522 23.6126 9.51957 23.4251 9.70711C23.2376 9.89464 22.9832 10 22.718 10H22.4301C22.381 9.9999 22.333 10.0142 22.2921 10.0412C22.2511 10.0681 22.219 10.1066 22.1997 10.1517C22.1804 10.1967 22.1748 10.2465 22.1836 10.2947C22.1858 10.307 22.1889 10.3191 22.1929 10.3308ZM7.19398 4.50201H16.806C17.0427 4.50212 17.2717 4.58619 17.4522 4.73927C17.6328 4.89235 17.7532 5.10451 17.792 5.33801L18.271 8.21101C18.2763 8.24641 18.2741 8.28254 18.2645 8.31702C18.2548 8.3515 18.2379 8.38353 18.215 8.41101C18.1915 8.43867 18.1622 8.46087 18.1292 8.47607C18.0962 8.49127 18.0603 8.49909 18.024 8.49901H5.97598C5.93965 8.49907 5.90374 8.4912 5.87076 8.47597C5.83778 8.46073 5.80851 8.43849 5.785 8.41079C5.76149 8.38309 5.7443 8.3506 5.73462 8.31558C5.72495 8.28056 5.72302 8.24385 5.72898 8.20801L6.20798 5.33501C6.24744 5.10206 6.3681 4.8906 6.54859 4.73812C6.72907 4.58565 6.95771 4.502 7.19398 4.50201ZM7 13.5C7 14.3284 6.32843 15 5.5 15C4.67157 15 4 14.3284 4 13.5C4 12.6716 4.67157 12 5.5 12C6.32843 12 7 12.6716 7 13.5ZM18.5 15C19.3284 15 20 14.3284 20 13.5C20 12.6716 19.3284 12 18.5 12C17.6716 12 17 12.6716 17 13.5C17 14.3284 17.6716 15 18.5 15Z"/></symbol><symbol id="svg-vendor" data-name="vendor" viewBox="0 0 24 24" width="24" height="24" ><path d="M21.379 11.9C20.8074 11.8915 20.2455 11.7506 19.7375 11.4884C19.2295 11.2263 18.7891 10.8499 18.451 10.389C18.4277 10.358 18.3975 10.3328 18.3628 10.3154C18.3281 10.298 18.2898 10.289 18.251 10.289C18.2122 10.289 18.1739 10.298 18.1392 10.3154C18.1045 10.3328 18.0743 10.358 18.051 10.389C17.7189 10.8563 17.2799 11.2373 16.7705 11.5002C16.2611 11.7631 15.6962 11.9003 15.123 11.9003C14.5498 11.9003 13.9849 11.7631 13.4755 11.5002C12.9661 11.2373 12.527 10.8563 12.195 10.389C12.1717 10.358 12.1415 10.3328 12.1068 10.3154C12.0721 10.298 12.0338 10.289 11.995 10.289C11.9562 10.289 11.9179 10.298 11.8832 10.3154C11.8485 10.3328 11.8183 10.358 11.795 10.389C11.4576 10.849 11.0183 11.2248 10.5116 11.4869C10.0049 11.749 9.44441 11.8904 8.87399 11.9C8.30221 11.8916 7.74016 11.7508 7.23196 11.4886C6.72376 11.2265 6.28324 10.8501 5.94499 10.389C5.9217 10.358 5.89151 10.3328 5.85679 10.3154C5.82208 10.298 5.7838 10.289 5.74499 10.289C5.70618 10.289 5.6679 10.298 5.63319 10.3154C5.59847 10.3328 5.56828 10.358 5.54499 10.389C5.20725 10.8494 4.76753 11.2254 4.26025 11.4875C3.75298 11.7497 3.19192 11.8908 2.62099 11.9C2.49268 11.8998 2.36449 11.8924 2.23699 11.878C2.20194 11.8739 2.16642 11.8773 2.13278 11.8879C2.09913 11.8986 2.06814 11.9163 2.04186 11.9398C2.01557 11.9634 1.99459 11.9922 1.9803 12.0245C1.96601 12.0568 1.95875 12.0917 1.95899 12.127V21.15C1.95899 21.5478 2.11703 21.9294 2.39833 22.2107C2.67963 22.492 3.06117 22.65 3.45899 22.65H20.459C20.8568 22.65 21.2383 22.492 21.5197 22.2107C21.801 21.9294 21.959 21.5478 21.959 21.15V12.134C21.9588 12.0992 21.9515 12.0648 21.9374 12.0329C21.9233 12.0011 21.9027 11.9725 21.877 11.949C21.8514 11.9256 21.8212 11.9078 21.7883 11.8967C21.7554 11.8857 21.7205 11.8817 21.686 11.885C21.584 11.894 21.482 11.9 21.379 11.9ZM14.957 15.01C14.9624 14.9092 15.0075 14.8146 15.0825 14.747C15.1575 14.6793 15.2561 14.6441 15.357 14.649H18.557C18.6578 14.6441 18.7565 14.6793 18.8315 14.747C18.9064 14.8146 18.9516 14.9092 18.957 15.01V20.149C18.957 20.2816 18.9043 20.4088 18.8105 20.5026C18.7168 20.5963 18.5896 20.649 18.457 20.649H15.457C15.3244 20.649 15.1972 20.5963 15.1034 20.5026C15.0097 20.4088 14.957 20.2816 14.957 20.149V15.01ZM5.45699 14.982C5.46266 14.8883 5.50519 14.8007 5.57527 14.7383C5.64536 14.6759 5.7373 14.6438 5.83099 14.649H11.078C11.1718 14.6438 11.2638 14.6759 11.3341 14.7383C11.4043 14.8006 11.4471 14.8882 11.453 14.982V18.316C11.4471 18.4098 11.4043 18.4974 11.3341 18.5597C11.2638 18.6221 11.1718 18.6542 11.078 18.649H5.83099C5.7373 18.6542 5.64536 18.6221 5.57527 18.5597C5.50519 18.4973 5.46266 18.4097 5.45699 18.316V14.982Z"/><path d="M21.379 10.4C21.9018 10.3658 22.3999 10.1654 22.8007 9.82812C23.2016 9.49081 23.4841 9.03421 23.607 8.52499C23.7443 8.07794 23.7398 7.59935 23.594 7.15499L21.794 1.68499C21.7757 1.60101 21.7327 1.52443 21.6705 1.46509C21.6083 1.40575 21.5298 1.36637 21.445 1.35199H2.55104C2.46629 1.36637 2.38778 1.40575 2.32559 1.46509C2.2634 1.52443 2.22037 1.60101 2.20204 1.68499L0.405038 7.15299C0.260149 7.59788 0.255959 8.07663 0.393038 8.52399C0.515827 9.0334 0.798259 9.49021 1.19909 9.82772C1.59992 10.1652 2.09816 10.3657 2.62104 10.4C3.31538 10.3276 3.95359 9.98564 4.39846 9.44764C4.84333 8.90965 5.05934 8.21857 5.00004 7.52299C5.00004 7.32408 5.07906 7.13331 5.21971 6.99266C5.36036 6.85201 5.55113 6.77299 5.75004 6.77299C5.94895 6.77299 6.13972 6.85201 6.28037 6.99266C6.42102 7.13331 6.50004 7.32408 6.50004 7.52299C6.44067 8.21779 6.656 8.90818 7.09982 9.44604C7.54364 9.9839 8.1806 10.3264 8.87404 10.4C9.56784 10.3269 10.2053 9.9846 10.6495 9.44668C11.0938 8.90877 11.3094 8.2181 11.25 7.52299C11.25 7.32408 11.3291 7.13331 11.4697 6.99266C11.6104 6.85201 11.8011 6.77299 12 6.77299C12.199 6.77299 12.3897 6.85201 12.5304 6.99266C12.671 7.13331 12.75 7.32408 12.75 7.52299C12.6907 8.21826 12.9064 8.90906 13.3509 9.447C13.7953 9.98494 14.4331 10.3271 15.127 10.4C15.8204 10.3264 16.4573 9.98387 16.9009 9.44598C17.3446 8.90808 17.5597 8.21769 17.5 7.52299C17.5 7.32408 17.5791 7.13331 17.7197 6.99266C17.8604 6.85201 18.0511 6.77299 18.25 6.77299C18.449 6.77299 18.6397 6.85201 18.7804 6.99266C18.921 7.13331 19 7.32408 19 7.52299C18.941 8.21851 19.1571 8.90945 19.6019 9.44739C20.0467 9.98532 20.6848 10.3273 21.379 10.4Z"/></symbol><symbol id="svg-alert-triangle" data-name="alert-triangle" viewBox="0 0 24 24" width="24" height="24" ><path d="M23.119 19L13.772 1.15C13.6026 0.826739 13.348 0.555993 13.0357 0.367088C12.7235 0.178184 12.3655 0.0783234 12.0005 0.0783234C11.6355 0.0783234 11.2775 0.178184 10.9653 0.367088C10.653 0.555993 10.3984 0.826739 10.229 1.15L0.881002 19C0.721322 19.3048 0.643006 19.6457 0.653624 19.9897C0.664243 20.3337 0.763438 20.6691 0.941617 20.9635C1.1198 21.2579 1.37093 21.5014 1.67073 21.6704C1.97054 21.8393 2.30887 21.9281 2.653 21.928H21.347C21.6911 21.9281 22.0295 21.8393 22.3293 21.6704C22.6291 21.5014 22.8802 21.2579 23.0584 20.9635C23.2366 20.6691 23.3358 20.3337 23.3464 19.9897C23.357 19.6457 23.2787 19.3048 23.119 19ZM11 7.423C11 7.15778 11.1054 6.90343 11.2929 6.71589C11.4804 6.52836 11.7348 6.423 12 6.423C12.2652 6.423 12.5196 6.52836 12.7071 6.71589C12.8946 6.90343 13 7.15778 13 7.423V13.423C13 13.6882 12.8946 13.9426 12.7071 14.1301C12.5196 14.3176 12.2652 14.423 12 14.423C11.7348 14.423 11.4804 14.3176 11.2929 14.1301C11.1054 13.9426 11 13.6882 11 13.423V7.423ZM12.05 18.933H12.022C11.6276 18.9317 11.249 18.778 10.9654 18.5041C10.6817 18.2301 10.515 17.8571 10.5 17.463C10.4928 17.267 10.5247 17.0715 10.5939 16.888C10.6631 16.7045 10.7682 16.5366 10.903 16.3942C11.0378 16.2517 11.1996 16.1376 11.3791 16.0584C11.5585 15.9792 11.7519 15.9366 11.948 15.933H11.976C12.3703 15.9335 12.7491 16.0864 13.0332 16.3599C13.3172 16.6333 13.4845 17.006 13.5 17.4C13.5078 17.5964 13.4762 17.7924 13.4071 17.9765C13.338 18.1605 13.2328 18.3289 13.0977 18.4718C12.9626 18.6146 12.8004 18.729 12.6204 18.8082C12.4405 18.8874 12.2466 18.9298 12.05 18.933Z"/></symbol><symbol id="svg-indicator-dot" data-name="indicator-dot" viewBox="0 0 24 24" width="24" height="24" ><circle cx="12" cy="12" r="11.5"/></symbol></svg>')
106
108
  }
107
109
  }
108
110
 
109
- // If DOM is already ready, embed SVGs
110
- if (document.readyState == 'interactive') { embed() }
111
-
112
111
  // Handle Turbolinks page change events
113
112
  if ( window.Turbolinks ) {
114
113
  document.addEventListener("turbolinks:load", function(event) { embed() })
115
114
  }
116
115
 
117
- // Handle standard DOM ready events
118
- document.addEventListener("DOMContentLoaded", function(event) { embed() })
116
+ embed()
119
117
  })()
118
+
120
119
  },{}],4:[function(require,module,exports){
121
120
  var toolbox = require( 'compose-toolbox' ),
122
121
  Event = toolbox.event,
@@ -196,6 +195,8 @@ var Modal = {
196
195
  Stack.push( modal )
197
196
 
198
197
  document.body.classList.add( 'modal-active' )
198
+ document.body.dataset.modal = el.id || ''
199
+
199
200
  el.classList.remove( 'hidden' )
200
201
  el.setAttribute( 'aria-hidden', false )
201
202
 
@@ -257,6 +258,9 @@ var Modal = {
257
258
  if ( !Stack.length ) {
258
259
  Event.off( document, 'keydown', keyPress )
259
260
  document.body.classList.remove( 'modal-active' )
261
+ document.body.dataset.modal = ''
262
+ } else {
263
+ document.body.dataset.modal = activeModal().el.id
260
264
  }
261
265
  })
262
266
 
@@ -628,15 +632,21 @@ var toolbox = require( 'compose-toolbox' ),
628
632
  Event = toolbox.event
629
633
 
630
634
  Event.ready( function() {
631
- Event.on( document, 'click', '.sidebar-nav-toggle', function( event ) {
632
- document.body.classList.toggle( 'hide-sidebar' )
633
-
634
- var visible = !document.body.classList.contains( 'hide-sidebar' )
635
- cookie.update( 'sidebar-nav', { sidebar: visible } )
636
- })
637
- if ( cookie.get( 'sidebar-nav' ).sidebar === false ) document.body.classList.add( 'hide-sidebar' )
635
+ Event.keyOn( 'esc', 'sidebar', toggle )
636
+ Event.keyOn( '],[,\\', toggle )
637
+ Event.on( document, 'click', '.sidebar-nav-toggle', toggle )
638
638
  })
639
639
 
640
+ function toggle() {
641
+
642
+ document.body.classList.toggle( 'show-sidebar' )
643
+
644
+ if ( document.body.classList.contains( 'show-sidebar' ) )
645
+ Event.key.setScope( 'sidebar' )
646
+ else
647
+ Event.key.setScope( 'all' )
648
+ }
649
+
640
650
  },{"./_cookie":1,"compose-toolbox":30}],7:[function(require,module,exports){
641
651
  var toolbox = require( 'compose-toolbox' ),
642
652
  Event = toolbox.event,
@@ -11925,4 +11935,4 @@ exports.Settings = Settings;
11925
11935
  },{}]},{},[10])(10)
11926
11936
  });
11927
11937
 
11928
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJhcHA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GwgYmUgYWRkZWQgYXMgYSBzdGFjayBwdXNoXG5cbiAgICB2YXIgc3RhY2sgPSB7XG4gICAgICByb290OiByb290LFxuICAgICAgY3VycmVudDogMCxcbiAgICAgIHBhbmVsczogW10sXG4gICAgICBmb2N1czogW10sXG5cbiAgICAgIGFkZDogZnVuY3Rpb24gKCBwYW5lbEVsLCBuYW1lICkge1xuICAgICAgICBwYW5lbEVsLmRhdGFzZXQuc3RhY2tJbmRleCA9IHN0YWNrLnBhbmVscy5sZW5ndGhcblxuICAgICAgICAvLyBIaWRlIGFsbCBwYW5lbHMgYnV0IHRoZSBmaXJzdCBwYW5lbFxuICAgICAgICBpZiAoIHN0YWNrLnBhbmVscy5sZW5ndGggPT0gMCApIHsgXG4gICAgICAgICAgc2hvd0VsKCBwYW5lbEVsIClcbiAgICAgICAgfSBlbHNlIHsgXG4gICAgICAgICAgaGlkZUVsKCBwYW5lbEVsIClcbiAgICAgICAgfVxuXG4gICAgICAgIHN0YWNrLnBhbmVscy5wdXNoKCBwYW5lbEVsIClcbiAgICAgIH0sXG5cbiAgICAgIC8vIFJlc2V0IHN0YWNrIHRvIGZpcnN0IHBhbmVsXG4gICAgICByZXNldDogZnVuY3Rpb24gKCkge1xuXG4gICAgICAgIC8vIEFscmVhZHkgcmVzZXQ/IFdlJ3JlIGRvbmUuXG4gICAgICAgIGlmICggc3RhY2suY3VycmVudCA9PSAwICkgcmV0dXJuXG5cbiAgICAgICAgLy8gSWYgaGlkZGVuLCBtYW51YWxseSByZXNldCBhbGxcbiAgICAgICAgaWYgKCBzdGFjay5yb290Lm9mZnNldFBhcmVudCA9PSBudWxsICkge1xuICAgICAgICAgIHN0YWNrLmZvY3VzID0gW10gLy8gQ2xlYXIgZm9jdXMgc3RhY2tcblxuICAgICAgICAgIC8vIEhpZGUgYW5kIHJlc2V0IHNjcm9sbCBvbiBhbGwgcGFuZWxzXG4gICAgICAgICAgc3RhY2sucGFuZWxzLmZvckVhY2goIGZ1bmN0aW9uKCBlb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wYXRpYmlsaXR5XG5pZiAoIUZ1bmN0aW9uLnByb3RvdHlwZS5iaW5kKSB7XG4gICAgRnVuY3Rpb24ucHJvdG90eXBlLmJpbmQgPSBmdW5jdGlvbiAob1RoaXMpIHtcbiAgICAgICAgJ3VzZSBzdHJpY3QnO1xuICAgICAgICBpZiAodHlwZW9mIHRoaXMgIT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICAgICAgLy8gY2xvc2VzdCB0aGluZyBwb3NzaWJsZSB0byB0aGUgRUNNQVNjcmlwdCA1IGludGVybmFsIElzQ2FsbGFibGUgZnVuY3Rpb25cbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJGdW5jdGlvbi5wcm90b3R5cGUuYmluZCAtIHdoYXQgaXMgdHJ5aW5nIHRvIGJlIGJvdW5kIGlzIG5vdCBjYWxsYWJsZVwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBhQXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3VtZW50cywgMSksXG4gICAgICAgICAgICBmVG9CaW5kID0gdGhpcyxcbiAgICAgICAgICAgIEZOT1AgPSBmdW5jdGlvbiAoKSB7fSxcbiAgICAgICAgICAgIGZCb3VuZCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZlRvQmluZC5hcHBseShcbiAgICAgICAgICAgICAgICAgICAgdGhpcyBpbnN0YW5jZW9mIEZOT1AgJiYgb1RoaXMgPyB0aGlzIDogb1RoaXMsXG4gICAgICAgICAgICAgICAgICAgYUFyZ3MuY29uY2F0KEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3VtZW50cykpXG4gICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICBGTk9QLnByb3RvdHlwZSA9IHRoaXMucHJvdG90eXBlO1xuICAgICAgICBmQm91bmQucHJvdG90eXBlID0gbmV3IEZOT1AoKTtcblxuICAgICAgICByZXR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gICAgICAgICAgICAgaWYgKCFsb29rdXBHZXR0ZXIuY2FsbChvYmosIHByb3ApICYmICFsb29rdXBTZXR0ZXIuY2FsbChvYmosIHByb3ApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBkYXRhIHByb3BlcnR5IGRlZmluZWQgYW5kIG5vIHByZS1leGlzdGluZyBhY2Nlc3NvcnNcbiAgICAgICAgICAgICAgICAgICAgICAgIG9ialtwcm9wXSA9IGRlc2NyaXB0b3IudmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAoKGhhc093blByb3AuY2FsbChkZXNjcmlwdG9yLCBcImdldFwiKSB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgIGhhc093blByb3AuY2FsbChkZXNjcmlwdG9yLCBcInNldFwiKSkpIFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBkZXNjcmlwdG9yIGhhcyBhIHZhbHVlIHByb3AgYnV0IGFjY2Vzc29yIGFscmVhZHkgZXhpc3RzXG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiQ2Fubm90IHNwZWNpZnkgYW4gYWNjZXNzb3IgYW5kIGEgdmFsdWVcIik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBjYW4ndCBzd2l0Y2ggb2ZmIHRoZXNlIGZlYXR1cmVzIGluIEVDTUFTY3JpcHQgM1xuICAgICAgICAgICAgICAgIC8vIHNvIHRocm93IGEgVHlwZUVycm9yIGlmIGFueSBhcmUgZmFsc2VcbiAgICAgICAgICAgICAgICBpZiAoIShkZXNjcmlwdG9yLndyaXRhYmxlICYmIGRlc2NyaXB0b3IuZW51bWVyYWJsZSAmJiBcbiAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRvci5jb25maWd1cmFibGUpKVxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiVGhpcyBpbXBsZW1lbnRhdGlvbiBvZiBPYmplY3QuZGVmaW5lUHJvcGVydHkgZG9lcyBub3Qgc3VwcG9ydFwiICtcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiIGZhbHNlIGZvciBjb25maWd1cmFibGUsIGVudW1lcmFibGUsIG9yIHdyaXRhYmxlLlwiXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIGlmIChkZXNjcmlwdG9yLmdldCkge1xuICAgICAgICAgICAgICAgICAgICBkZWZpbmVHZXR0ZXIuY2FsbChvYmosIHByb3AsIGRlc2NyaXB0b3IuZ2V0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGRlc2NyaXB0b3Iuc2V0KSB7XG4gICAgICAgICAgICAgICAgICAgIGRlZmluZVNldHRlci5jYWxsKG9iaiwgcHJvcCwgZGVzY3JpcHRvci5zZXQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHJldHVybiBvYmo7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKSB7XG4gICAgICAgICAgICBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yID0gZnVuY3Rpb24gKG9iaiwgcHJvcCkge1xuICAgICAgICAgICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoIDwgMikgeyAvLyBhbGwgYXJndW1lbnRzIHJlcXVpcmVkXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJBcmd1bWVudHMgbm90IG9wdGlvbmFsLlwiKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgcHJvcCArPSBcIlwiOyAvLyBjb252ZXJ0IHByb3AgdG8gc3RyaW5nXG5cbiAgICAgICAgICAgICAgICB2YXIgZGVzY3JpcHRvciA9IHtcbiAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICBlbnVtZXJhYmxlICA6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgIHdyaXRhYmxlICAgIDogdHJ1ZVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgZ2V0dGVyID0gbG9va3VwR2V0dGVyLmNhbGwob2JqLCBwcm9wKSxcbiAgICAgICAgICAgICAgICBzZXR0ZXIgPSBsb29rdXBTZXR0ZXIuY2FsbChvYmosIHByb3ApO1xuXG4gICAgICAgICAgICAgICAgaWYgKCFoYXNPd25Qcm9wLmNhbGwob2JqLCBwcm9wKSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBwcm9wZXJ0eSBkb2Vzbid0IGV4aXN0IG9yIGlzIGluaGVyaXRlZFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVzY3JpcHRvcjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCFnZXR0ZXIgJiYgIXNldHRlcikgeyAvLyBub3QgYW4gYWNjZXNzb3Igc28gcmV0dXJuIHByb3BcbiAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRvci52YWx1ZSA9IG9ialtwcm9wXTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRlc2NyaXB0b3I7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gdGhlcmUgaXMgYW4gYWNjZXNzb3IsIHJlbW92ZSBkZXNjcmlwdG9yLndyaXRhYmxlO1xuICAgICAgICAgICAgICAgIC8vIHBvcHVsYXRlIGRlc2NyaXB0b3IuZ2V0IGFuZCBkZXNjcmlwdG9yLnNldCAoSUUncyBiZWhhdmlvcilcbiAgICAgICAgICAgICAgICBkZWxldGUgZGVzY3JpcHRvci53cml0YWJsZTtcbiAgICAgICAgICAgICAgICBkZXNjcmlwdG9yLmdldCA9IGRlc2NyaXB0b3Iuc2V0ID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIGlmIChnZXR0ZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRvci5nZXQgPSBnZXR0ZXI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzZXR0ZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRvci5zZXQgPSBzZXR0ZXI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHJldHVybiBkZXNjcmlwdG9yO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghT2JqZWN0LmRlZmluZVByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0aWVzID0gZnVuY3Rpb24gKG9iaiwgcHJvcHMpIHtcbiAgICAgICAgICAgICAgICB2YXIgcHJvcDtcbiAgICAgICAgICAgICAgICBmb3IgKHByb3AgaW4gcHJvcHMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGhhc093blByb3AuY2FsbChwcm9wcywgcHJvcCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShvYmosIHByb3AsIHByb3BzW3Byb3BdKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICB9XG59KCkpO1xuXG4vLyBCZWdpbiBkYXRhc2V0IGNvZGVcblxuaWYgKCFkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQuZGF0YXNldCAmJiBcbiAgICAgICAgIC8vIEZGIGlzIGVtcHR5IHdoaWxlIElFIGdpdmVzIGVtcHR5IG9iamVjdFxuICAgICAgICAoIU9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoRWxlbWVudC5wcm90b3R5cGUsICdkYXRhc2V0JykgIHx8XG4gICAgICAgICFPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKEVsZW1lbnQucHJvdG90eXBlLCAnZGF0YXNldCcpLmdldClcbiAgICApIHtcbiAgICB2YXIgcHJvcERlc2NyaXB0b3IgPSB7XG4gICAgICAgIGVudW1lcmFibGU6IHRydWUsXG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgJ3VzZSBzdHJpY3QnO1xuICAgICAgICAgICAgdmFyIGksIFxuICAgICAgICAgICAgICAgIHRoYXQgPSB0aGlzLFxuICAgICAgICAgICAgICAgIEhUTUw1X0RPTVN0cmluZ01hcCwgXG4gICAgICAgICAgICAgICAgYXR0clZhbCwgYXR0ck5hbWUsIHByb3BOYW1lLFxuICAgICAgICAgICAgICAgIGF0dHJpYnV0ZSxcbiAgICAgICAgICAgICAgICBhdHRyaWJ1dGVzID0gdGhpcy5hdHRyaWJ1dGVzLFxuICAgICAgICAgICAgICAgIGF0dHNMZW5ndGggPSBhdHRyaWJ1dGVzLmxlbmd0aCxcbiAgICAgICAgICAgICAgICB0b1VwcGVyQ2FzZSA9IGZ1bmN0aW9uIChuMCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbjAuY2hhckF0KDEpLnRvVXBwZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBnZXR0ZXIgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgc2V0dGVyID0gZnVuY3Rpb24gKGF0dHJOYW1lLCB2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gKHR5cGVvZiB2YWx1ZSAhPT0gJ3VuZGVmaW5lZCcpID8gXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNldEF0dHJpYnV0ZShhdHRyTmFtZSwgdmFsdWUpIDogXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbW92ZUF0dHJpYnV0ZShhdHRyTmFtZSk7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHRyeSB7IC8vIFNpbXVsYXRlIERPTVN0cmluZ01hcCB3L2FjY2Vzc29yIHN1cHBvcnRcbiAgICAgICAgICAgICAgICAvLyBUZXN0IHNldHRpbmcgYWNjZXNzb3Igb24gbm9ybWFsIG9iamVjdFxuICAgICAgICAgICAgICAgICh7fSkuX19kZWZpbmVHZXR0ZXJfXygndGVzdCcsIGZ1bmN0aW9uICgpIHt9KTtcbiAgICAgICAgICAgICAgICBIVE1MNV9ET01TdHJpbmdNYXAgPSB7fTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhdGNoIChlMSkgeyAvLyBVc2UgYSBET00gb2JqZWN0IGZvciBJRThcbiAgICAgICAgICAgICAgICBIVE1MNV9ET01TdHJpbmdNYXAgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBhdHRzTGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBhdHRyaWJ1dGUgPSBhdHRyaWJ1dGVzW2ldO1xuICAgICAgICAgICAgICAgIC8vIEZpeDogVGhpcyB0ZXN0IHJlYWxseSBzaG91bGQgYWxsb3cgYW55IFhNTCBOYW1lIHdpdGhvdXQgXG4gICAgICAgICAgICAgICAgLy8gICAgICAgICBjb2xvbnMgKGFuZCBub24tdXBwZXJjYXNlIGZvciBYSFRNTClcbiAgICAgICAgICAgICAgICBpZiAoYXR0cmlidXRlICYmIGF0dHJpYnV0ZS5uYW1lICYmIFxuICAgICAgICAgICAgICAgICAgICAoL15kYXRhLVxcd1tcXHdcXC1dKiQvKS50ZXN0KGF0dHJpYnV0ZS5uYW1lKSkge1xuICAgICAgICAgICAgICAgICAgICBhdHRyVmFsID0gYXR0cmlidXRlLnZhbHVlO1xuICAgICAgICAgICAgICAgICAgICBhdHRyTmFtZSA9IGF0dHJpYnV0ZS5uYW1lO1xuICAgICAgICAgICAgICAgICAgICAvLyBDaGFuZ2UgdG8gQ2FtZWxDYXNlXG4gICAgICAgICAgICAgICAgICAgIHByb3BOYW1lID0gYXR0ck5hbWUuc3Vic3RyKDUpLnJlcGxhY2UoLy0uL2csIHRvVXBwZXJDYXNlKTtcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShIVE1MNV9ET01TdHJpbmdNYXAsIHByb3BOYW1lLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZW51bWVyYWJsZTogdGhpcy5lbnVtZXJhYmxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdldDogZ2V0dGVyLmJpbmQoYXR0clZhbCB8fCAnJyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0OiBzZXR0ZXIuYmluZCh0aGF0LCBhdHRyTmFtZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNhdGNoIChlMikgeyAvLyBpZiBhY2Nlc3NvcnMgYXJlIG5vdCB3b3JraW5nXG4gICAgICAgICAgICAgICAgICAgICAgICBIVE1MNV9ET01TdHJpbmdNYXBbcHJvcE5hbWVdID0gYXR0clZhbDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBIVE1MNV9ET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8gZXZlbnRzIHRoYXQgd2UgY29uc2lkZXIgdG8gYmUgJ25hdGl2ZScsIGFueXRoaW5nIG5vdCBpbiB0aGlzIGxpc3Qgd2lsbFxuICAgICAgLy8gYmUgdHJlYXRlZCBhcyBhIGN1c3RvbSBldmVudFxuICAgICwgc3RhbmRhcmROYXRpdmVFdmVudHMgPVxuICAgICAgICAnY2xpY2sgZGJsY2xpY2sgbW91c2V1cCBtb3VzZWRvd24gY29udGV4dG1lbnUgJyAgICAgICAgICAgICAgICAgICsgLy8gbW91c2UgYnV0dG9uc1xuICAgICAgICAnbW91c2V3aGVlbCBtb3VzZW11bHRpd2hlZWwgRE9NTW91c2VTY3JvbGwgJyAgICAgICAgICAgICAgICAgICAgICsgLy8gbW91c2Ugd2hlZWxcbiAgICAgICAgJ21vdXNlb3ZlciBtb3VzZW91dCBtb3VzZW1vdmUgc2VsZWN0c3RhcnQgc2VsZWN0ZW5kICcgICAgICAgICAgICArIC8vIG1vdXNlIG1vdmVtZW50XG4gICAgICAgICdrZXlkb3duIGtleXByZXNzIGtleXVwICcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBrZXlib2FyZFxuICAgICAgICAnb3JpZW50YXRpb25jaGFuZ2UgJyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgLy8gbW9iaWxlXG4gICAgICAgICdmb2N1cyBibHVyIGNoYW5nZSByZXNldCBzZWxlY3Qgc3VibWl0ICcgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBmb3JtIGVsZW1lbnRzXG4gICAgICAgICdsb2FkIHVubG9hZCBiZWZvcmV1bmxvYWQgcmVzaXplIG1vdmUgRE9NQ29udGVudExvYWRlZCAnICAgICAgICAgKyAvLyB3aW5kb3dcbiAgICAgICAgJ3JlYWR5c3RhdGVjaGFuZ2UgbWVzc2FnZSAnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIC8vIHdpbmRvd1xuICAgICAgICAnZXJyb3IgYWJvcnQgc2Nyb2xsICcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbWlzY1xuICAgICAgLy8gZWxlbWVudC5maXJlRXZlbnQoJ29uWFlaJy4uLiBpcyBub3QgZm9yZ2l2aW5nIGlmIHdlIHRyeSB0byBmaXJlIGFuIGV2ZW50XG4gICAgICAvLyB0aGF0IGRvZXNuJ3QgYWN0dWFsbHkgZXhpc3QsIHNvIG1ha2Ugc3VyZSB3ZSBvbmx5IGRvIHRoZXNlIG9uIG5ld2VyIGJyb3dzZXJzXG4gICAgLCB3M2NOYXRpdmVFdmVudHMgPVxuICAgICAgICAnc2hvdyAnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgLy8gbW91c2UgYnV0dG9uc1xuICAgICAgICAnaW5wdXQgaW52YWxpZCAnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgLy8gZm9ybSBlbGVtZW50c1xuICAgICAgICAndG91Y2hzdGFydCB0b3VjaG1vdmUgdG91Y2hlbmQgdG91Y2hjYW5jZWwgJyAgICAgICAgICAgICAgICAgICAgICsgLy8gdG91Y2hcbiAgICAgICAgJ2dlc3R1cmVzdGFydCBnZXN0dXJlY2hhbmdlIGdlc3R1cmVlbmQgJyAgICAgICAgICAgICAgICAgICAgICAgICArIC8vIGdlc3R1cmVcbiAgICAgICAgJ3RleHRpbnB1dCAnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIC8vIFRleHRFdmVudFxuICAgICAgICAncmVhZHlzdGF0ZWNoYW5nZSBwYWdlc2hvdyBwYWdlaGlkZSBwb3BzdGF0ZSAnICAgICAgICAgICAgICAgICAgICsgLy8gd2luZG93XG4gICAgICAgICdoYXNoY2hhbmdlIG9mZmxpbmUgb25saW5lICcgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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c3RyMmFycihzdGFuZGFyZE5hdGl2ZUV2ZW50cyArIChXM0NfTU9ERUwgPyB3M2NOYXRpdmVFdmVudHMgOiAnJykpKSlcblxuICAgICAgLy8gY3VzdG9tIGV2ZW50cyBhcmUgZXZlbnRzIHRoYXQgd2UgKmZha2UqLCB0aGV5IGFyZSBub3QgcHJvdmlkZWQgbmF0aXZlbHkgYnV0XG4gICAgICAvLyB3ZSBjYW4gdXNlIG5hdGl2ZSBldmVudHMgdG8gZ2VuZXJhdGUgdGhlbVxuICAgICwgY3VzdG9tRXZlbnRzID0gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIGlzQW5jZXN0b3IgPSAnY29tcGFyZURvY3VtZW50UG9zaXRpb24nIGluIHJvb3RcbiAgICAgICAgICAgICAgPyBmdW5jdGlvbiAoZWxlbWVudCwgY29udGFpbmVyKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gY29udGFpbmVyLmNvbXBhcmVEb2N1bWVudFBvc2l0aW9uICYmIChjb250YWluZXIuY29tcGFyZURvY3VtZW50UG9zaXRpb24oZWxlbWVudCkgJiAxNikgPT09IDE2XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICA6ICdjb250YWlucycgaW4gcm9vdFxuICAgICAgICAgICAgICAgID8gZnVuY3Rpb24gKGVsZW1lbnQsIGNvbnRhaW5lcikge1xuICAgICAgICAgICAgICAgICAgICBjb250YWluZXIgPSBjb250YWluZXIubm9kZVR5cGUgPT09IDkgfHwgY29udGFpbmVyID09PSB3aW5kb3cgPyByb290IDogY29udGFpbmVyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjb250YWluZXIgIT09IGVsZW1lbnQgJiYgY29udGFpbmVyLmNvbnRhaW5zKGVsZW1lbnQpXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgOiBmdW5jdGlvbiAoZWxlbWVudCwgY29udGFpbmVyKSB7XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlIChlbGVt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cycpKSAvLyAnYXhpcycgaXMgRkYgc3BlY2lmaWNcbiAgICAgICAgICAsIGtleVByb3BzICAgICA9IGNvbW1vblByb3BzLmNvbmNhdChzdHIyYXJyKCdjaGFyIGNoYXJDb2RlIGtleSBrZXlDb2RlIGtleUlkZW50aWZpZXIgJyAgICAgICAgICArXG4gICAgICAgICAgICAgICdrZXlMb2NhdGlvbiBsb2NhdGlvbiBpc0NvbXBvc2luZyBjb2RlJykpXG4gICAgICAgICAgLCB0ZXh0UHJvcHMgICAgPSBjb21tb25Qcm9wcy5jb25jYXQoc3RyMmFycignZGF0YScpKVxuICAgICAgICAgICwgdG91Y2hQcm9wcyAgID0gY29tbW9uUHJvcHMuY29uY2F0KHN0cjJhcnIoJ3RvdWNoZXMgdGFyZ2V0VG91Y2hlcyBjaGFuZ2VkVG91Y2hlcyBzY2FsZSByb3RhdGlvbicpKVxuICAgICAgICAgICwgbWVzc2FnZVByb3BzID0gY29tbW9uUHJvcHMuY29uY2F0KHN0cjJhcnIoJ2RhdGEgb3JpZ2luIHNvdXJjZScpKVxuICAgICAgICAgICwgc3RhdGVQcm9wcyAgID0gY29tbW9uUHJvcHMuY29uY2F0KHN0cjJhcnIoJ3N0YXRlJykpXG4gICAgICAgICAgLCBvdmVyT3V0UmVnZXggPSAvb3ZlcnxvdXQvXG4gICAgICAgICAgICAvLyBzb21lIGV2ZW50IHR5cGVzIG5lZWQgc3BlY2lhbCBoYW5kbGluZyBhbmQgc29tZSBuZWVkIHNwZWNpYWwgcHJvcGVydGllcywgZG8gdGhhdCBhbGwgaGVyZVxuICAgICAgICAgICwgdHlwZUZpeGVycyAgID0gW1xuICAgICAgICAgICAgICAgIHsgLy8ga2V5IGV2ZW50c1xuICAgICAgICAgICAgICAgICAgICByZWc6IC9rZXkvaVxuICAgICAgICAgICAgICAgICAgLCBmaXg6IGZ1bmN0aW9uIChldmVudCwgbmV3RXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICBuZXdFdmVudC5rZXlDb2RlID0gZXZlbnQua2V5Q29kZSB8fCBldmVudC53aGljaFxuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBrZXlQcm9wc1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAsIHsgLy8gbW91c2UgZXZlbnRzXG4gICAgICAgICAgICAgICAgICAgIHJlZzogL2NsaWNrfG1vdXNlKD8hKC4qd2hlZWx8c2Nyb2xsKSl8bWVudXxkcmFnfGRyb3AvaVxuICAgICAgICAgICAgICAgICAgLCBmaXg6IGZ1bmN0aW9uIChldmVudCwgbmV3RXZlbnQsIHR5cGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICBuZXdFdmVudC5yaWdodENsaWNrID0gZXZlbnQud2hpY2ggPT09IDMgfHwgZXZlbnQuYnV0dG9uID09PSAyXG4gICAgICAgICAgICAgICAgICAgICAgbmV3RXZlbnQucG9zID0geyB4OiAwLCB5OiAwIH1cbiAgICAgICAgICAgICAgICAgICAgICBpZiAoZXZlbnQucGFnZVggfHwgZXZlbnQucGFnZVkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld0V2ZW50LmNsaWVudFggPSBldmVudC5wYWdlWFxuICAgICAgICAgICAgICAgICAgICAgICAgbmV3RXZlbnQuY2xpZW50WSA9IGV2ZW50LnBhZ2VZXG4gICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChldmVudC5jbGllbnRYIHx8IGV2ZW50LmNsaWVudFkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld0V2ZW50LmNsaWVudFggPSBldmVudC5jbGllbnRYICsgZG9jLmJvZHkuc2Nyb2xsTGVmdCArIHJvb3Quc2Nyb2xsTGVmdFxuICAgICAgICAgICAgICAgICAgICAgICAgbmV3RXZlbnQuY2xpZW50WSA9IGV2ZW50LmNsaWVudFkgKyBkb2MuYm9keS5zY3JvbGxUb3AgKyByb290LnNjcm9sbFRvcFxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICBpZiAob3Zlck91dFJlZ2V4LnRlc3QodHlwZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld0V2ZW50LnJlbGF0ZWRUYXJnZXQgPSBldmVudC5yZWxhdGVkVGFyZ2V0XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHx8IGV2ZW50Wyh0eXBlID09ICdtb3VzZW92ZXInID8gJ2Zyb20nIDogJ3RvJykgKyAnRWxlbWVudCddXG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBtb3VzZVByb3BzXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICwgeyAvLyBtb3VzZSB3aGVlbCBldmVudHNcbiAgICAgICAgICAgICAgICAgICAgcmVnOiAvbW91c2UuKih3aGVlbHxzY3JvbGwpL2lcbiAgICAgICAgICAgICAgICAgICwgZml4OiBmdW5jdGlvbiAoKSB7IHJldHVybiBtb3VzZVdoZWVsUHJvcHMgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgLCB7IC8vIFRleHRFdmVudFxuICAgICAgICAgICAgICAgICAgICByZWc6IC9edGV4dC9pXG4gICAgICAgICAgICAgICAgICAsIGZpeDogZnVuY3Rpb24gKCkgeyByZXR1cm4gdGV4dFByb3BzIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICwgeyAvLyB0b3VjaCBhbmQgZ2VzdHVyZSBldmVudHNcbiAgICAgICAgICAgICAgICAgICAgcmVnOiAvXnRvdWNofF5nZXN0dXJlL2lcbiAgICAgICAgICAgICAgICAgICwgZml4OiBmdW5jdGlvbiAoKSB7IHJldHVybiB0b3VjaFByb3BzIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICwgeyAvLyBtZXNzYWdlIGV2ZW50c1xuICAgICAgICAgICAgICAgICAgICByZWc6IC9ebWVzc2FnZSQvaVxuICAgICAgICAgICAgICAgICAgLCBmaXg6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIG1lc3NhZ2VQcm9wcyB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAsIHsgLy8gcG9wc3RhdGUgZXZlbnRzXG4gICAgICAgICAgICAgICAgICAgIHJlZzogL15wb3BzdGF0ZSQvaVxuICAgICAgICAgICAgICAgICAgLCBmaXg6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIHN0YXRlUHJvcHMgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgLCB7IC8vIGV2ZXJ5dGhpbmcgZWxzZVxuICAgICAgICAgICAgICAgICAgICByZWc6IC8uKi9cbiAgICAgICAgICAgICAgICAgICwgZml4OiBmdW5jdGlvbiAoKSB7IHJldHVybiBjb21tb25Qcm9wcyB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgXVxuICAgICAgICAgICwgdHlwZUZpeGVyTWFwID0ge30gLy8gdXNlZCB0byBtYXAgZXZlbnQgdHlwZXMgdG8gZml4ZXIgZnVuY3Rpb25zIChhYm92ZSksIGEgYmFzaWMgY2FjaGUgbWVjaGFuaXNtXG5cbiAgICAgICAgICAsIEV2ZW50ID0gZnVuY3Rpb24gKGV2ZW50LCBlbGVtZW50LCBpc05hdGl2ZSkge1xuICAgICAgICAgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVyblxuICAgICAgICAgICAgICBldmVudCA9IGV2ZW50IHx8ICgoZWxlbWVudC5vd25lckRvY3VtZW50IHx8IGVsZW1lbnQuZG9jdW1lbnQgfHwgZWxlbWVudCkucGFyZW50V2luZG93IHx8IHdpbikuZXZlbnRcbiAgICAgICAgICAgICAgdGhpcy5vcmlnaW5hbEV2ZW50ID0gZXZlbnRcbiAgICAgICAgICAgICAgdGhpcy5pc05hdGl2ZSAgICAgICA9IGlzTmF0aXZlXG4gICAgICAgICAgICAgIHRoaXMuaXNCZWFuIC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QgPSBmaW5kVGFyZ2V0KGV2ZW50LCB0aGlzKSAvLyBkZWxlYXRlZCBldmVudFxuICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25kaXRpb24uYXBwbHkodGFyZ2V0LCBhcmd1bWVudHMpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXZlbnQpIGV2ZW50LmN1cnJlbnRUYXJnZXQgPSB0YXJnZXRcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsKGV2ZW50LCBhcmd1bWVudHMpXG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICA6IGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgICAgICAgICAgIGlmIChmbi5fX2JlYW5EZWwpIGV2ZW50ID0gZXZlbnQuY2xvbmUoZmluZFRhcmdldChldmVudCkpIC8vIGRlbGVnYXRlZCBldmVudCwgZml4IHRoZSBmaXhcbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FsbChldmVudCwgYXJndW1lbnRzKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBoYW5kbGVyLl9fYmVhbkRlbCA9IGZuLl9fYmVhbkRlbFxuICAgICAgICAgICAgcmV0dXJuIGhhbmRsZXJcbiAgICAgICAgICB9XG5cbiAgICAgICAgLCBSZWdFbnRyeSA9IGZ1bmN0aW9uIChlbGVtZW50LCB0eXBlLCBoYW5kbGVyLCBvcmlnaW5hbCwgbmFtZXNwYWNlcywgYXJncywgcm9vdCkge1xuICAgICAgICAgICAgdmFyIGN1c3RvbVR5cGUgICAgID0gY3VzdG9tRXZlbnRzW3R5cGVdXG4gICAgICAgICAgICAgICwgaXNOYXRpdmVcblxuICAgICAgICAgICAgaWYgKHR5cGUgPT0gJ3VubG9hZCcpIHtcbiAgICAgICAgICAgICAgLy8gc2VsZiBjbGVhbi11cFxuICAgICAgICAgICAgICBoYW5kbGVyID0gb25jZShyZ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0XVxuICAgICAgICAgICAgdGhpcy5yb290ICAgICAgICAgID0gcm9vdFxuICAgICAgICAgICAgdGhpcy5oYW5kbGVyICAgICAgID0gd3JhcHBlZEhhbmRsZXIoZWxlbWVudCwgaGFuZGxlciwgbnVsbCwgYXJncylcbiAgICAgICAgICB9XG5cbiAgICAgICAgLy8gZ2l2ZW4gYSBsaXN0IG9mIG5hbWVzcGFjZXMsIGlzIG91ciBlbnRyeSBpbiBhbnkgb2YgdGhlbT9cbiAgICAgICAgUmVnRW50cnkucHJvdG90eXBlLmluTmFtZXNwYWNlcyA9IGZ1bmN0aW9uIChjaGVja05hbWVzcGFjZXMpIHtcbiAgICAgICAgICB2YXIgaSwgaiwgYyA9IDBcbiAgICAgICAgICBpZiAoIWNoZWNrTmFtZXNwYWNlcykgcmV0dXJuIHRydWVcbiAgICAgICAgICBpZiAoIXRoaXMubmFtZXNwYWNlcykgcmV0dXJuIGZhbHNlXG4gICAgICAgICAgZm9yIChpID0gY2hlY2tOYW1lc3BhY2VzLmxlbmd0aDsgaS0tOykge1xuICAgICAgICAgICAgZm9yIChqID0gdGhpcy5uYW1lc3BhY2VzLmxlbmd0aDsgai0tOykge1xuICAgICAgICAgICAgICBpZiAoY2hlY2tOYW1lc3BhY2VzW2ldID09IHRoaXMubmFtZXNwYWNlc1tqXSkgYysrXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBjaGVja05hbWVzcGFjZXMubGVuZ3RoID09PSBjXG4gICAgICAgIH1cblxuICAgICAgICAvLyBtYXRjaCBieSBlbGVtZW50LCBvcmlnaW5hbCBmbiAob3B0KSwgaGFuZGxlciBmbiAob3B0KVxuICAgICAgICBSZWdFbnRyeS5wcm90b3R5cGUubWF0Y2hlcyA9IGZ1bmN0aW9uIChjaGVja0VsZW1lbnQsIGNoZWNrT3JpZ2luYWwsIGNoZWNrSGFuZGxlcikge1xuICAgICAgICAgIHJldHVybiB0aGlzLmVsZW1lbnQgPT09IGNoZ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4gICAgICAgICAgICAgICAgLy8gc2VhcmNoIHRoZSB3aG9sZSByZWdpc3RyeVxuICAgICAgICAgICAgICAgIGZvciAodmFyIHQgaW4gbWFwKSB7XG4gICAgICAgICAgICAgICAgICBpZiAodC5jaGFyQXQoMCkgPT0gcGZ4KSB7XG4gICAgICAgICAgICAgICAgICAgIGZvckFsbChlbGVtZW50LCB0LnN1YnN0cigxKSwgb3JpZ2luYWwsIGhhbmRsZXIsIHJvb3QsIGZuKVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgaSA9IDAsIGwsIGxpc3QgPSBtYXBbcGZ4ICsgdHlwZV0sIGFsbCA9IGVsZW1lbnQgPT0gJyonXG4gICAgICAgICAgICAgICAgaWYgKCFsaXN0KSByZXR1cm5cbiAgICAgICAgICAgICAgICBmb3IgKGwgPSBsaXN0Lmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgICAgICAgICAgaWYgKChhbGwgfHwgbGlzdFtpXS5tYXRjaGVzKGVsZW1lbnQsIG9yaWdpbmFsLCBoYW5kbGVyKSkgJiYgIWZuKGxpc3RbaV0sIGxpc3QsIGksIHR5cGUpKSByZXR1cm5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICwgaGFzID0gZnVuY3Rpb24gKGVsZW1lbnQsIHR5cGUsIG9yaWdpbmFsLCByb290KSB7XG4gICAgICAgICAgICAgIC8vIHdlJ3JlIG5vdCB1c2luZyBmb3JBbGwgaGVyZSBzaW1wbHkgYmVjYXVzZSBpdCdzIGEgYml0IHNsb3dlciBhbmQgdGhpc1xuICAgICAgICAgICAgICAvLyBuZWVkcyB0byBiZSBmYXN0XG4gICAgICAgICAgICAgIHZhciBpLCBsaXN0ID0gbWFwWyhyb290ID8gJ3InIDogJyQnKSArIHR5cGVdXG4gICAgICAgICAgICAgIGlmIChsaXN0KSB7XG4gICAgICAgICAgICAgICAgZm9yIChpID0gbGlzdC5sZW5ndGg7IGktLTspIHtcbiAgICAgICAgICAgICAgICAgIGlmICghbGlzdFtpXS5yb290ICYmIGxpc3RbaV0ubWF0Y2hlcyhlbGVtZW50LCBvcmlnaW5hbCwgbnVsbCkpIHJldHVybiB0cnVlXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHJldHVybiBmYWxzZVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgLCBnZXQgPSBmdW5jdGlvbiAoZWxlbWVudCwgdHlwZSwgb3JpZ2luYWwsIHJvb3QpIHtcbiAgICAgICAgICAgICAgdmFyIGVudHJpZXMgPSBbXVxuICAgICAgICAgICAgICBmb3JBbGwoZWxlbWVudCwgdHlwZSwgb3JpZ2luYWwsIG51bGwsIHJvb3QsIGZ1bmN0aW9uIChlbnRyeSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBlbnRyaWVzLnB1c2goZW50cnkpXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIHJldHVybiBlbnRyaWVzXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAsIHB1dCA9IGZ1bmN0aW9uIChlbnRyeSkge1xuICAgICAgICAgICAgICB2YXIgaGFzID0gIWVudHJ5LnJvb3QgJiYgIXRoaXMuaGFzKGVudHJ5LmVsZW1lbnQsIGVudHJ5LnR5cGUsIG51bGwsIGZhbHNlKVxuICAgICAgICAgICAgICAgICwga2V5ID0gKGVudHJ5LnJvb3QgPyAncicgOiAnJCcpICsgZW50cnkudHlwZVxuICAgICAgICAgICAgICA7KG1hcFtrZXldIHx8IChtYXBba2V5XSA9IFtdKSkucHVzaChlbnRyeSlcbiAgICAgICAgICAgICAgcmV0dXJuIGhhc1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgLCBkZWwgPSBmdW5jdGlvbiAoZW50cnkpIHtcbiAgICAgICAgICAgICAgZm9yQWxsKGVudHJ5LmVsZW1lbnQsIGVudHJ5LnR5cGUsIG51bGwsIGVudHJ5LmhhbmRsZXIsIGVudHJ5LnJvb3QsIGZ1bmN0aW9uIChlbnRyeSwgbGlzdCwgaSkge1xuICAgICAgICAgICAgICAgIGxpc3Quc3BsaWNlKGksIDEpXG4gICAgICAgICAgICAgICAgZW50cnkucmVtb3ZlZCA9IHRydWVcbiAgICAgICAgICAgICAgICBpZiAobGlzdC5sZW5ndGggPT09IDApIGRlbGV0ZSBtYXBbKGVudHJ5LnJvb3QgPyAncicgOiAnJCcpICsgZW50cnkudHlwZV1cbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2VcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gZHVtcCBhbGwgZW50cmllcywgdXNlZCBmb3Igb251bmxvYWRcbiAgICAgICAgICAsIGVudHJpZXMgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgIHZhciB0LCBlbnRyaWVzID0gW11cbiAgICAgICAgICAgICAgZm9yICh0IGluIG1hcCkge1xuICAgICAgICAgICAgICAgIGlmICh0LmNoYXJBdCgwKSA9PSAnJCcpIGVudHJpZXMgPSBlbnRyaWVzLmNvbmNhdChtYXBbdF0pXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgcmV0dXJuIGVudHJpZXNcbiAgICAgICAgICAgIH1cblxuICAgICAgICByZXR1cm4geyBoYXM6IGhhcywgZ2V0OiBnZXQsIHB1dDogcHV0LCBkZWw6IGRlbCwgZW50cmllczogZW50cmllcyB9XG4gICAgICB9KCkpXG5cbiAgICAgIC8vIHdlIG5lZWQgYSBzZWxlY3RvciBlbmdpbmUgZm9yIGRlbGVnYXRlZCBldmVudHMsIHVzZSBxdWVyeVNlbGVjdG9yQWxsIGlmIGl0IGV4aXN0c1xuICAgICAgLy8gYnV0IGZvciBvbGRlciBicm93c2VycyB3ZSBuZWVkIFF3ZXJ5LCBT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csIHVzZSBhdHRhY2hFdmVudC9kZXRhY2hFdmVudCBhbmQgd2UgaGF2ZSB0byBwaWdneS1iYWNrIHByb3BlcnR5Y2hhbmdlIGV2ZW50c1xuICAgICAgICAgICAgLy8gdG8gc2ltdWxhdGUgZXZlbnQgYnViYmxpbmcgZXRjLlxuICAgICAgICAgICAgdmFyIGVudHJ5XG4gICAgICAgICAgICBpZiAoYWRkKSB7XG4gICAgICAgICAgICAgIHJlZ2lzdHJ5LnB1dChlbnRyeSA9IG5ldyBSZWdFbnRyeShcbiAgICAgICAgICAgICAgICAgIGVsZW1lbnRcbiAgICAgICAgICAgICAgICAsIGN1c3RvbSB8fCB0eXBlXG4gICAgICAgICAgICAgICAgLCBmdW5jdGlvbiAoZXZlbnQpIHsgLy8gaGFuZGxlclxuICAgICAgICAgICAgICAgICAgICByb290TGlzdGVuZXIuY2FsbChlbGVtZW50LCBldmVudCwgY3VzdG9tKVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICwgcm9vdExpc3RlbmVyXG4gICAgICAgICAgICAgICAgLCBudWxsXG4gICAgICAgICAgICAgICAgLCBudWxsXG4gICAgICAgICAgICAgICAgLCB0cnVlIC8vIGlzIHJvb3RcbiAgICAgICAgICAgICAgKSlcbiAgICAgICAgICAgICAgaWYgKGN1c3RvbSAmJiBlbGVtZW50Wydfb24nICsgY3VzdG9tXSA9PSBudWxsKSBlbGVtZW50Wydfb24nICsgY3VzdG9tXSA9IDBcbiAgICAgICAgICAgICAgZW50cnkudGFyZ2V0LmF0dGFjaEV2ZW50KCdvbicgKyBlbnRyeS5ldmVudFR5cGUsIGVudHJ5LmhhbmRsZXIpXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBlbnRyeSA9IHJlZ2lzdHJ5LmdldChlbGVtZW50LCBjdXN0b20gfHwgdHlwZSwgcm9vdExpc3RlbmVyLCB0cnVlKVswXVxuICAgICAgICAgICAgICBpZiAoZW50cnkpIHtcbiAgICAgIC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IChldmVudHMuaGFzT3duUHJvcGVydHkodHlwZSkpIHtcbiAgICAgICAgICAgICAgb24uY2FsbCh0aGlzLCBlbGVtZW50LCB0eXBlLCBldmVudHNbdHlwZV0pXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVyblxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFpc0Z1bmN0aW9uKHNlbGVjdG9yKSkge1xuICAgICAgICAgIC8vIGRlbGVnYXRlZCBldmVudFxuICAgICAgICAgIG9yaWdpbmFsRm4gPSBmblxuICAgICAgICAgIGFyZ3MgICAgICAgPSBzbGljZS5jYWxsKGFyZ3VtZW50cywgNClcbiAgICAgICAgICBmbiAgICAgICAgID0gZGVsZWdhdGUoc2VsZWN0b3IsIG9yaWdpbmFsRm4sIHNlbGVjdG9yRW5naW5lKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGFyZ3MgICAgICAgPSBzbGljZS5jYWxsKGFyZ3VtZW50cywgMylcbiAgICAgICAgICBmbiAgICAgICAgID0gb3JpZ2luYWxGbiA9IHNlbGVjdG9yXG4gICAgICAgIH1cblxuICAgICAgICBvcHRzID0gYnVpbGRPcHRpb25zKGRlZmF1bHRPcHRzLCBhcmdzW2FyZ3MubGVuZ3RoIC0gMV0pXG4gICAgICAgIHR5cGVzID0gc3RyMmFycihldmVudHMpXG5cbiAgICAgICAgLy8gc3BlY2lhbCBjYXNlIGZvciBvbmUoKSwgd3JhcCBpbiBhIHNlbGYtcmVtb3ZpbmcgaGFuZGxlclxuICAgICAgICBpZiAodGhpcyA9PT0gT05FKSB7XG4gICAgICAgICAgZm4gPSBvbmNlKG9mZiwgZWxlbWVudCwgZXZlbnRzLCBmbiwgb3JpZ2luYWxGbilcbiAgICAgICAgfVxuXG4gICAgICAgIGZvciAoaSA9IHR5cGVzLmxlbmd0aDsgaS0tOykge1xuICAgICAgICAgIC8vIGFkZCBuZXcgaGFuZGxlciB0byB0aGUgcmVnaXN0cnkgYW5kI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GVtZW50LCBldmVudHMsIGZuLCBkZWxmbiwgb3B0aW9ucykge1xuICAgICAgICByZXR1cm4gb24uYXBwbHkoXG4gICAgICAgICAgICBudWxsXG4gICAgICAgICAgLCAhaXNTdHJpbmcoZm4pXG4gICAgICAgICAgICAgID8gc2xpY2UuY2FsbChhcmd1bWVudHMpXG4gICAgICAgICAgICAgIDogWyBlbGVtZW50LCBmbiwgZXZlbnRzLCBkZWxmbiBdLmNvbmNhdChhcmd1bWVudHMubGVuZ3RoID4gMyA/IHNsaWNlLmNhbGwoYXJndW1lbnRzLCA0KSA6IFtdKVxuICAgICAgICApXG4gICAgICB9XG5cbiAgICAgIC8qKlxuICAgICAgICAqIG9uZShlbGVtZW50LCBldmVudFR5cGUocylbLCBzZWxlY3Rvcl0sIGhhbmRsZXJbLCBhcmdzIF0pXG4gICAgICAgICovXG4gICAgLCBvbmUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiBvbi5hcHBseShPTkUsIGFyZ3VtZW50cylcbiAgICAgIH1cblxuICAgICAgLyoqXG4gICAgICAgICogZmlyZShlbGVtZW50LCBldmVudFR5cGUocylbLCBhcmdzIF0pXG4gICAgICAgICpcbiAgICAgICAgKiBUaGUgb3B0aW9uYWwgJ2FyZ3MnIGFyZ3VtZW50IG11c3QgYmUgYW4gYXJyYXksIGlmIG5vICdhcmdzJyBhcmd1bWVudCBpcyBwcm92aWRlZFxuICAgICAgICAqIHRoZW4gd2UgY2FuIHVzZSB0aGUgYnJvd3NlcidzIERPTSBldmVudCBzeXN0ZW0sIG90aGVyd2lzZSB3ZSB0cmlnZ2VyIGhhbmRsZXJzIG1hbnVhbGx5XG4gICAgICAgICovXG4gICAgLCBmaXJlID0gZnVuY3Rpb24gKGVsZW1lbnQsIHR5cGUsIGFyZ3MpIHtcbiAgICAgICAgdmFyIHR5cGVzID0gc3RyMmFycih0eXBlKVxuICAgICAgICAgICwgaSwgaiwgbCwgbmFtZXMsIGhhbmRsZXJzXG5cbiAg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XG4gICAgICAvKipcbiAgICAgICAgKiBjbG9uZShkc3RFbGVtZW50LCBzcmNFbGVtZW50WywgZXZlbnRUeXBlIF0pXG4gICAgICAgICpcbiAgICAgICAgKiBUT0RPOiBwZXJoYXBzIGZvciBjb25zaXN0ZW5jeSB3ZSBzaG91bGQgYWxsb3cgdGhlIHNhbWUgZmxleGliaWxpdHkgaW4gdHlwZSBzcGVjaWZpZXJzP1xuICAgICAgICAqL1xuICAgICwgY2xvbmUgPSBmdW5jdGlvbiAoZWxlbWVudCwgZnJvbSwgdHlwZSkge1xuICAgICAgICB2YXIgaGFuZGxlcnMgPSByZWdpc3RyeS5nZXQoZnJvbSwgdHlwZSwgbnVsbCwgZmFsc2UpXG4gICAgICAgICAgLCBsID0gaGFuZGxlcnMubGVuZ3RoXG4gICAgICAgICAgLCBpID0gMFxuICAgICAgICAgICwgYXJncywgYmVhbkRlbFxuXG4gICAgICAgIGZvciAoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgaWYgKGhhbmRsZXJzW2ldLm9yaWdpbmFsKSB7XG4gICAgICAgICAgICBhcmdzID0gWyBlbGVtZW50LCBoYW5kbGVyc1tpXS50eXBlIF1cbiAgICAgICAgICAgIGlmIChiZWFuRGVsID0gaGFuZGxlcnNbaV0uaGFuZGxlci5fX2JlYW5EZWwpIGFyZ3MucHVzaChiZWFuRGVsLnNlbGVjdG9yKVxuICAgICAgICAgICAgYXJncy5wdXNoKGhhbmRsZXJzW2ldLm9yaWdpbmFsKVxuICAgICAgICAgICAgb24uYXBwbHkobnVsbCwgYXJncylcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGVsZW1lbnRcbiAgICAgIH1cblxuICAgICwgYmVhbiA9IHtcbiAgICAgICAgICAnb24nICAgICAgICAgICAgICAgIDogb25cbiAgICAgICAgLCAnYWRkJyAgICAgICAgICAgICAgIDogYWRkXG4gICAgICAgICwgJ29uZScgICAgICAgICAgICAgICA6IG9uZVxuICAgICAgICAsICdvZmYnICAgICAgICAgICAgICAgOiBvZmZcbiAgICAgICAgLCAncmVtb3ZlJyAgICAgICAgICAgIDogb2ZmXG4gICAgICAgICwgJ2Nsb25lJyAgICAgICAgICAgICA6IGNsb25lXG4gICAgICAgICwgJ2ZpcmUnICAgICAgICAgICAgICA6IGZpcmVcbiAgICAgICAgLCAnRXZlbnQnICAgICAgICAgICAgIDogRXZlbnRcbiAgICAgICAgLCAnc2V0U2VsZWN0b3JFbmdpbmUnIDogc2V0U2VsZWN0b3JFbmdpbmVcbiAgICAgICAgLCAnbm9Db25mbGljdCcgICAgICAgIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgY29udGV4dFtuYW1lXSA9IG9sZFxuICAgICAgICAgICAgcmV0dXJuIHRoaXNcbiAgICAgICAgICB9XG4gICAgICB9XG5cbiAgLy8gZm9yIElFLCBjbGVhbiB1cCBvbiB1bmxvYWQgdG8gYXZvaWQgbGVha3NcbiAgaWYgKHdpbi5hdHRhY2hFdmVudCkge1xuICAgIHZhciBjbGVhbnVwID0gZnVuY3Rpb24gKCkge1xuICAgICAgdmFyIGksIGVudHJpZXMgPSByZWdpc3RyeS5lbnRyaWVzKClcbiAgICAgIGZvciAoaSBpbiBlbnRyaWVzKSB7XG4gICAgICAgIGlmIChlbnRyaWVzW2ldLnR5cGUgJiYgZW50cmllc1tpXS50eXBlICE9PSAndW5sb2FkJykgb2ZmKGVudHJpZXNbaV0uZWxlbWVudCwgZW50cmllc1tpXS50eXBlKVxuICAgICAgfVxuICAgICAgd2luLmRldGFjaEV2ZW50KCdvbnVubG9hZCcsIGNsZWFudXApXG4gICAgICB3aW4uQ29sbGVjdEdhcmJhZ2UgJiYgd2luLkNvbGxlY3RHYXJiYWdlKClcbiAgICB9XG4gICAgd2luLmF0dGFjaEV2ZW50KCdvbnVubG9hZCcsIGNsZWFudXApXG4gIH1cblxuICAvLyBpbml0aWFsaXplIHNlbGVjdG9yIGVuZ2luZSB0byBpbnRlcm5hbCBkZWZhdWx0IChxU0Egb3IgdGhyb3cgRXJyb3IpXG4gIHNldFNlbGVjdG9yRW5naW5lKClcblxuICByZXR1cm4gYmVhblxufSk7XG4iLCJyZXF1aXJlKCAnLi9saWIvc2hpbXMvY3VzdG9tLWV2ZW50JyApXG5cbnZhciBiZWFuID0gcmVxdWlyZSggJ2JlYW4nICksXG4gICAga2V5ICA9IHJlcXVpcmUoICdrZXltYXN0ZXInICksXG4gICAgYW5pbWF0aW9uRXZlbnQgICAgPSByZXF1aXJlKCAnLi9saWIvYW5pbWF0aW9uLWV2ZW50cycgKSxcbiAgICBhZnRlckFuaW1hdGlvbiAgICA9IHJlcXVpcmUoICcuL2xpYi9hZnRlci1hbmltYXRpb24nICksXG4gICAgcGFnZSAgICAgICAgICAgICAgPSByZXF1aXJlKCAnLi9saWIvcGFnZScgKSxcbiAgICB0YXAgICAgICAgICAgICAgICA9IHJlcXVpcmUoICcuL2xpYi90YXAtZXZlbnRzJyApLFxuICAgIGRlYm91bmNlICAgICAgICAgID0gcmVxdWlyZSggJy4vbGliL2RlYm91bmNlJyApLFxuICAgIHRocm90dGxlICAgICAgICAgID0gcmVxdWlyZSggJy4vbGliL3Rocm90dGxlJyApLFxuICAgIGRlbGF5ICAgICAgICAgICAgID0gcmVxdWlyZSggJy4vbGliL2RlbGF5JyApLFxuICAgIHJlcGVhdCAgICAgICAgICAgID0gcmVxdWlyZSggJy4vbGliL3JlcGVhdCcgKSxcbiAgICBidWJibGVGb3JtRXZlbnRzICA9IHJlcXVpcmUoICcuL2xpYi9idWJibGUtZm9ybS1ldmVudHMnICksXG4gICAgc3VibWl0ICAgICAgICAgICAgPSByZXF1aXJlKCAnLi9saWIvc3VibWl0JyApLFxuICAgIHNjcm9sbCAgICAgICAgICAgID0gcmVxdWlyZSggJy4vbGliL3Njcm9sbCcgKSxcbiAgICByZXNpemUgICAgICAgICAgICA9IHJlcXVpcmUoICcuL2xpYi9yZXNpemUnICksXG4gICAgY2FsbGJhY2tNYW5hZ2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HJQcm90byAgPSB2aWV3LkVsZW1lbnRbIHByb3RvUHJvcCBdLFxuICAgICAgb2JqQ3RyICAgICAgICA9IE9iamVjdCxcblxuICAgICAgc3RyVHJpbSA9IFN0cmluZ1sgcHJvdG9Qcm9wIF0udHJpbSB8fCBmdW5jdGlvbigpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMucmVwbGFjZSggL15cXHMrfFxccyskL2csICcnICk7XG4gICAgICB9LFxuXG4gICAgICBhcnJJbmRleE9mID0gQXJyYXlbIHByb3RvUHJvcCBdLmluZGV4T2YgfHwgZnVuY3Rpb24oIGl0ZW0gKSB7XG4gICAgICAgIGZvciAoIHZhciBpID0gMDsgaSA8IHRoaXMubGVuZ3RoOyBpKysgKSB7XG4gICAgICAgICAgaWYgKCBpIGluIHRoaXMgJiYgdGhpc1sgaSBdID09PSBpdGVtICkge1xuICAgICAgICAgICAgcmV0dXJuIGk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiAtMTtcbiAgICAgIH0sXG5cbiAgICAgIERPTUV4ID0gZnVuY3Rpb24oIHR5cGUsIG1lc3NhZ2UgKSB7XG4gICAgICAgIHRoaXMubmFtZSAgICA9IHR5cGU7XG4gICAgICAgIHRoaXMuY29kZSAgICA9IERPTUV4Y2VwdGlvblsgdHlwZSBdO1xuICAgICAgICB0aGlzLm1lc3NhZ2UgPSBtZXNzYWdlO1xuICAgICAgfSxcblxuICAgICAgY2hlY2tUb2tlbkFuZEdldEluZGV4ID0gZnVuY3Rpb24oIGNsYXNzTGlzdCwgdG9rZW4gKSB7XG4gICAgICAgIGlmICggdG9rZW4gPT09ICcnICkge1xuICAgICAgICAgIHRocm93IG5ldyBET01FeChcbiAgICAgICAgICAgICdTWU5UQVhfRVJSJyxcbiAgICAgICAgICAgICdBbiBpbnZhbGlkIG9yIGlsbGVnYWwgc3RyaW5nIHdhcyBzcGVjaWZpZWQnXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICBpZ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1bmN0aW9uKCkge1xuXG4gICAgICAndXNlIHN0cmljdCc7XG5cbiAgICAgIHZhciB0ZXN0RWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoICdfJyApO1xuXG4gICAgICB0ZXN0RWxlbWVudC5jbGFzc0xpc3QuYWRkKCAnYzEnLCAnYzInICk7XG5cbiAgICAgIGlmICggIXRlc3RFbGVtZW50LmNsYXNzTGlzdC5jb250YWlucyggJ2MyJyApICkge1xuICAgICAgICB2YXIgY3JlYXRlTWV0aG9kID0gZnVuY3Rpb24oIG1ldGhvZCApIHtcbiAgICAgICAgICB2YXIgb3JpZ2luYWwgPSBET01Ub2tlbkxpc3QucHJvdG90eXBlWyBtZXRob2QgXTtcblxuICAgICAgICAgIERPTVRva2VuTGlzdC5wcm90b3R5cGVbIG1ldGhvZCBdID0gZnVuY3Rpb24oIHRva2VuICkge1xuICAgICAgICAgICAgdmFyIGksIGxlbiA9IGFyZ3VtZW50cy5sZW5ndGg7XG5cbiAgICAgICAgICAgIGZvciAoIGkgPSAwOyBpIDwgbGVuOyBpKysgKSB7XG4gICAgICAgICAgICAgIHRva2VuID0gYXJndW1lbnRzWyBpIF07XG4gICAgICAgICAgICAgIG9yaWdpbmFsLmNhbGwoIHRoaXMsIHRva2VuICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfTtcbiAgICAgICAgfTtcbiAgICAgICAgY3JlYXRlTWV0aG9kKCAnYWRkJyApO1xuICAgICAgICBjcmVhdGVNZXRob2QoICdyZW1vdmUnICk7XG4gICAgICB9XG5cbiAgICAgIHRlc3RFbGVtZW50LmNsYXNzTGlzdC50b2dnbGUoICdjMycsIGZhbHNlICk7XG5cbiAgICAgIGlmICggdGVzdEVsZW1lbnQuY2xhc3NMaXN0LmNvbnRhaW5zKCAnYzMnICkgKSB7XG4gICAgICAgIHZhciBfdG9nZ2xlID0gRE9NVG9rZW5MaXN0LnByb3RvdHlwZS50b2dnbGU7XG5cbiAgICAgICAgRE9NVG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ICAgICBjYXNlIFwiaFwiOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQuaG91ciAlIDEyID09PSAwID8gMTIgOiBkdC5ob3VyICUgMTIpO1xuXG4gICAgICAgIGNhc2UgXCJoaFwiOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQuaG91ciAlIDEyID09PSAwID8gMTIgOiBkdC5ob3VyICUgMTIsIDIpO1xuXG4gICAgICAgIGNhc2UgXCJIXCI6XG4gICAgICAgICAgcmV0dXJuIF90aGlzLm51bShkdC5ob3VyKTtcblxuICAgICAgICBjYXNlIFwiSEhcIjpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LmhvdXIsIDIpO1xuICAgICAgICAvLyBvZmZzZXRcblxuICAgICAgICBjYXNlIFwiWlwiOlxuICAgICAgICAgIC8vIGxpa2UgKzZcbiAgICAgICAgICByZXR1cm4gZm9ybWF0T2Zmc2V0KHtcbiAgICAgICAgICAgIGZvcm1hdDogXCJuYXJyb3dcIixcbiAgICAgICAgICAgIGFsbG93WjogX3RoaXMub3B0cy5hbGxvd1pcbiAgICAgICAgICB9KTtcblxuICAgICAgICBjYXNlIFwiWlpcIjpcbiAgICAgICAgICAvLyBsaWtlICswNjowMFxuICAgICAgICAgIHJldHVybiBmb3JtYXRPZmZzZXQoe1xuICAgICAgICAgICAgZm9ybWF0OiBcInNob3J0XCIsXG4gICAgICAgICAgICBhbGxvd1o6IF90aGlzLm9wdHMuYWxsb3daXG4gICAgICAgICAgfSk7XG5cbiAgICAgICAgY2FzZSBcIlpaWlwiOlxuICAgICAgICAgIC8vIGxpa2UgKzA2MDBcbiAgICAgICAgICByZXR1cm4gZm9ybWF0T2Zmc2V0KHtcbiAgICAgICAgICAgIGZvcm1hdDogXCJ0ZWNoaWVcIixcbiAgICAgICAgICAgIGFsbG93WjogZmFsc2VcbiAgICAgICAgICB9KTtcblxuICAgICAgICBjYXNlIFwiWlpaWlwiOlxuICAgICAgICAgIC8vIGxpa2UgRVNUXG4gICAgICAgICAgcmV0dXJuIGR0Lm9mZnNldE5hbWVTaG9ydDtcblxuICAgICAgICBjYXNlIFwiWlpaWlpcIjpcbiAgICAgICAgICAvLyBsaWtlIEVhc3Rlcm4gU3RhbmRhcmQgVGltZVxuICAgICAgICAgIHJldHVybiBkdC5vZmZzZXROYW1lTG9uZztcbiAgICAgICAgLy8gem9uZVxuXG4gICAgICAgIGNhc2UgXCJ6XCI6XG4gICAgICAgICAgLy8gbGlrZSBBbWVyaWNhL05ld19Zb3JrXG4gICAgICAgICAgcmV0dXJuIGR0LnpvbmVOYW1lO1xuICAgICAgICAvLyBtZXJpZGllbXNcblxuICAgICAgICBjYXNlIFwiYVwiOlxuICAgICAgICAgIHJldHVybiBtZXJpZGllbSgpO1xuICAgICAgICAvLyBkYXRlc1xuXG4gICAgICAgIGNhc2UgXCJkXCI6XG4gICAgICAgICAgcmV0dXJuIG91dHB1dENhbCA/IHN0cmluZyh7XG4gICAgICAgICAgICBkYXk6IFwibnVtZXJpY1wiXG4gICAgICAgICAgfSwgXCJkYXlcIikgOiBfdGhpcy5udW0oZHQuZGF5KTtcblxuICAgICAgICBjYXNlIFwiZGRcIjpcbiAgICAgICAgICByZXR1cm4gb3V0cHV0Q2FsID8gc3RyaW5nKHtcbiAgICAgICAgICAgIGRheTogXCIyLWRpZ2l0XCJcbiAgICAgICAgICB9LCBcImRheVwiKSA6IF90aGlzLm51bShkdC5kYXksIDIpO1xuICAgICAgICAvLyB3ZWVrZGF5cyAtIHN0YW5kYWxvbmVcblxuICAgICAgICBjYXNlIFwiY1wiOlxuICAgICAgICAgIC8vIGxpa2UgMVxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQud2Vla2RheSk7XG5cbiAgICAgICAgY2FzZSBcImNjY1wiOlxuICAgICAgICAgIC8vIGxpa2UgJ1R1ZXMnXG4gICAgICAgICAgcmV0dXJuIHdlZWtkYXkoXCJzaG9ydFwiLCB0cnVlKTtcblxuICAgICAgICBjYX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iAgICAgICAgICAvLyBsaWtlIDAxLCBkb2Vzbid0IHNlZW0gdG8gd29ya1xuICAgICAgICAgIHJldHVybiBvdXRwdXRDYWwgPyBzdHJpbmcoe1xuICAgICAgICAgICAgbW9udGg6IFwiMi1kaWdpdFwiLFxuICAgICAgICAgICAgZGF5OiBcIm51bWVyaWNcIlxuICAgICAgICAgIH0sIFwibW9udGhcIikgOiBfdGhpcy5udW0oZHQubW9udGgsIDIpO1xuXG4gICAgICAgIGNhc2UgXCJMTExcIjpcbiAgICAgICAgICAvLyBsaWtlIEphblxuICAgICAgICAgIHJldHVybiBtb250aChcInNob3J0XCIsIHRydWUpO1xuXG4gICAgICAgIGNhc2UgXCJMTExMXCI6XG4gICAgICAgICAgLy8gbGlrZSBKYW51YXJ5XG4gICAgICAgICAgcmV0dXJuIG1vbnRoKFwibG9uZ1wiLCB0cnVlKTtcblxuICAgICAgICBjYXNlIFwiTExMTExcIjpcbiAgICAgICAgICAvLyBsaWtlIEpcbiAgICAgICAgICByZXR1cm4gbW9udGgoXCJuYXJyb3dcIiwgdHJ1ZSk7XG4gICAgICAgIC8vIG1vbnRocyAtIGZvcm1hdFxuXG4gICAgICAgIGNhc2UgXCJNXCI6XG4gICAgICAgICAgLy8gbGlrZSAxXG4gICAgICAgICAgcmV0dXJuIG91dHB1dENhbCA/IHN0cmluZyh7XG4gICAgICAgICAgICBtb250aDogXCJudW1lcmljXCJcbiAgICAgICAgICB9LCBcIm1vbnRoXCIpIDogX3RoaXMubnVtKGR0Lm1vbnRoKTtcblxuICAgICAgICBjYXNlIFwiTU1cIjpcbiAgICAgICAgICAvLyBsaWtlIDAxXG4gICAgICAgICAgcmV0dXJuIG91dHB1dENhbCA/IHN0cmluZyh7XG4gICAgICAgICAgICBtb250aDogXCIyLWRpZ2l0XCJcbiAgICAgICAgICB9LCBcIm1vbnRoXCIpIDogX3RoaXMubnVtKGR0Lm1vbnRoLCAyKTtcblxuICAgICAgICBjYXNlIFwiTU1NXCI6XG4gICAgICAgICAgLy8gbGlrZSBKYW5cbiAgICAgICAgICByZXR1cm4gbW9udGgoXCJzaG9ydFwiLCBmYWxzZSk7XG5cbiAgICAgICAgY2FzZSBcIk1NTU1cIjpcbiAgICAgICAgICAvLyBsaWtlIEphbnVhcnlcbiAgICAgICAgICByZXR1cm4gbW9udGgoXCJsb25nXCIsIGZhbHNlKTtcblxuICAgICAgICBjYXNlIFwiTU1NTU1cIjpcbiAgICAgICAgICAvLyBsaWtlIEpcbiAgICAgICAgICByZXR1cm4gbW9udGgoXCJuYXJyb3dcIiwgZmFsc2UpO1xuICAgICAgICAvLyB5ZWFyc1xuXG4gICAgICAgIGNhc2UgXCJ5XCI6XG4gICAgICAgICAgLy8gbGlrZSAyMDE0XG4gICAgICAgICAgcmV0dXJuIG91dHB1dENhbCA/IHN0cmluZyh7XG4gICAgICAgICAgICB5ZWFyOiBcIm51bWVyaWNcIlxuICAgICAgICAgIH0sIFwieWVhclwiKSA6IF90aGlzLm51bShkdC55ZWFyKTtcblxuICAgICAgICBjYXNlIFwieXlcIjpcbiAgICAgICAgICAvLyBsaWtlIDE0XG4gICAgICAgICAgcmV0dXJuIG91dHB1dENhbCA/IHN0cmluZyh7XG4gICAgICAgICAgICB5ZWFyOiBcIjItZGlnaXRcIlxuICAgICAgICAgIH0sIFwieWVhclwiKSA6IF90aGlzLm51bShkdC55ZWFyLnRvU3RyaW5nKCkuc2xpY2UoLTIpLCAyKTtcblxuICAgICAgICBjYXNlIFwieXl5eVwiOlxuICAgICAgICAgIC8vIGxpa2UgMDAxMlxuICAgICAgICAgIHJldHVybiBvdXRwdXRDYWwgPyBzdHJpbmcoe1xuICAgICAgICAgICAgeWVhcjogXCJudW1lcmljXCJcbiAgICAgICAgICB9LCBcInllYXJcIikgOiBfdGhpcy5udW0oZHQueWVhciwgNCk7XG5cbiAgICAgICAgY2FzZSBcInl5eXl5eVwiOlxuICAgICAgICAgIC8vIGxpa2UgMDAwMDEyXG4gICAgICAgICAgcmV0dXJuIG91dHB1dENhbCA/IHN0cmluZyh7XG4gICAgICAgICAgICB5ZWFyOiBcIm51bWVyaWNcIlxuICAgICAgICAgIH0sIFwieWVhclwiKSA6IF90aGlzLm51bShkdC55ZWFyLCA2KTtcbiAgICAgICAgLy8gZXJhc1xuXG4gICAgICAgIGNhc2UgXCJHXCI6XG4gICAgICAgICAgLy8gbGlrZSBBRFxuICAgICAgICAgIHJldHVybiBlcmEoXCJzaG9ydFwiKTtcblxuICAgICAgICBjYXNlIFwiR0dcIjpcbiAgICAgICAgICAvLyBsaWtlIEFubm8gRG9taW5pXG4gICAgICAgICAgcmV0dXJuIGVyYShcImxvbmdcIik7XG5cbiAgICAgICAgY2FzZSBcIkdHR0dHXCI6XG4gICAgICAgICAgcmV0dXJuIGVyYShcIm5hcnJvd1wiKTtcblxuICAgICAgICBjYXNlIFwia2tcIjpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LndlZWtZZWFyLnRvU3RyaW5nKCkuc2xpY2UoLTIpLCAyKTtcblxuICAgICAgICBjYXNlIFwia2tra1wiOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQud2Vla1llYXIsIDQpO1xuXG4gICAgICAgIGNhc2UgXCJXXCI6XG4gICAgICAgICAgcmV0dXJuIF90aGlzLm51bShkdC53ZWVrTnVtYmVyKTtcblxuICAgICAgICBjYXNlIFwiV1dcIjpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LndlZWtOdW1iZXIsIDIpO1xuXG4gICAgICAgIGNhc2UgXCJvXCI6XG4gICAgICAgICAgcmV0dXJuIF90aGlzLm51bShkdC5vcmRpbmFsKTtcblxuICAgICAgICBjYXNlIFwib29vXCI6XG4gICAgICAgICAgcmV0dXJuIF90aGlzLm51bShkdC5vcmRpbmFsLCAzKTtcblxuICAgICAgICBjYXNlIFwicVwiOlxuICAgICAgICAgIC8vIGxpa2UgMVxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQucXVhcnRlcik7XG5cbiAgICAgICAgY2FzZSBcInFxXCI6XG4gICAgICAgICAgLy8gbGlrZSAwMVxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQucXVhcnRlciwgMik7XG5cbiAgICAgICAgY2FzZSBcIlhcIjpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKE1hdGguZmxvb3IoZHQudHMgLyAxMDAwKSk7XG5cbiAgICAgICAgY2FzZSBcInhcIjpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LnRzKTtcblxuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIHJldHVybiBtYXliZU1hY3JvKHRva2VuKTtcbiAgICAgIH1cbiAgICB9O1xuXG4gICAgcmV0dXJuIHN0cmluZ2lmeVRva2VucyhGb3JtYXR0ZXIucGFyc2VGb3JtYXQoZm10KSwgdG9rZW5Ub1N0cmluZyk7XG4gIH07XG5cbiAgX3Byb3RvLmZvcm1hdER1cmF0aW9uRnJvbVN0cmluZyA9IGZ1bmN0aW9uIGZvcm1hdER1cmF0aW9uRnJvbVN0cmluZyhkdXIsIGZtdCkge1xuICAgIHZhciBfdGhpczIgPSB0aGlzO1xuXG4gICAgdmFyIHRva2VuVG9GaWVsZCA9IGZ1bmN0aW9uIHRva2VuVG9GaWVsZCh0b2tlbikge1xuICAgICAgc3dpdGNoICh0b2tlblswXSkge1xuICAgICAgICBjYXNlIFwiU1wiOlxuICAgICAgICAgIHJldHVybiBcIm1pbGxpc2Vjb25kXCI7XG5cbiAgICAgICAgY2FzZSBcInNcIjpcbiAgICAgICAgICByZXR1cm4gXCJzZWNvbmRcIjtcblxuICAgICAgICBjYXNlIFwibVwiOlxuICAgICAgICAgIHJldHVybiBcIm1pbnV0ZVwiO1xuXG4gICAgICAgIGNhc2UgXCJoXCI6XG4gICAgICAgICAgcmV0dXJuIFwiaG91clwiO1xuXG4gICAgICAgIGNhc2UgXCJkXCI6XG4gICAgICAgICAgcmV0dXJuIFwiZGF5XCI7XG5cbiAgICAgICA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fcmVmNSkge1xuICAgICAgICB2YXIgcyA9IF9yZWY1WzBdO1xuICAgICAgICByZXR1cm4gcztcbiAgICAgIH0sXG4gICAgICBsaXRlcmFsOiB0cnVlXG4gICAgfTtcbiAgfSxcbiAgICAgIHVuaXRhdGUgPSBmdW5jdGlvbiB1bml0YXRlKHQpIHtcbiAgICBpZiAodG9rZW4ubGl0ZXJhbCkge1xuICAgICAgcmV0dXJuIGxpdGVyYWwodCk7XG4gICAgfVxuXG4gICAgc3dpdGNoICh0LnZhbCkge1xuICAgICAgLy8gZXJhXG4gICAgICBjYXNlIFwiR1wiOlxuICAgICAgICByZXR1cm4gb25lT2YobG9jLmVyYXMoXCJzaG9ydFwiLCBmYWxzZSksIDApO1xuXG4gICAgICBjYXNlIFwiR0dcIjpcbiAgICAgICAgcmV0dXJuIG9uZU9mKGxvYy5lcmFzKFwibG9uZ1wiLCBmYWxzZSksIDApO1xuICAgICAgLy8geWVhcnNcblxuICAgICAgY2FzZSBcInlcIjpcbiAgICAgICAgcmV0dXJuIGludFVuaXQoL1xcZHsxLDZ9Lyk7XG5cbiAgICAgIGNhc2UgXCJ5eVwiOlxuICAgICAgICByZXR1cm4gaW50VW5pdCh0d29Ub0ZvdXIsIHVudHJ1bmNhdGVZZWFyKTtcblxuICAgICAgY2FzZSBcInl5eXlcIjpcbiAgICAgICAgcmV0dXJuIGludFVuaXQoZm91cik7XG5cbiAgICAgIGNhc2UgXCJ5eXl5eVwiOlxuICAgICAgICByZXR1cm4gaW50VW5pdCgvXFxkezQsNn0vKTtcblxuICAgICAgY2FzZSBcInl5eXl5eVwiOlxuICAgICAgICByZXR1cm4gaW50VW5pdCgvXFxkezZ9Lyk7XG4gICAgICAvLyBtb250aHNcblxuICAgICAgY2FzZSBcIk1cIjpcbiAgICAgICAgcmV0dXJuIGludFVuaXQob25lT3JUd28pO1xuXG4gICAgICBjYXNlIFwiTU1cIjpcbiAgICAgICAgcmV0dXJuIGludFVuaXQodHdvKTtcblxuICAgICAgY2FzZSBcIk1NTVwiOlxuICAgICAgICByZXR1cm4gb25lT2YobG9jLm1vbnRocyhcInNob3J0XCIsIGZhbHNlLCBmYWxzZSksIDEpO1xuXG4gICAgICBjYXNlIFwiTU1NTVwiOlxuICAgICAgICByZXR1cm4gb25lT2YobG9jLm1vbnRocyhcImxvbmdcIiwgZmFsc2UsIGZhbHNlKSwgMSk7XG5cbiAgICAgIGNhc2UgXCJMXCI6XG4gICAgICAgIHJldHVybiBpbnRVbml0KG9uZU9yVHdvKTtcblxuICAgICAgY2FzZSBcIkxMXCI6XG4gICAgICAgIHJldHVybiBpbnRVbml0KHR3byk7XG5cbiAgICAgIGNhc2UgXCJMTExcIjpcbiAgICAgICAgcmV0dXJuIG9uZU9mKGxvYy5tb250aHMoXCJzaG9ydFwiLCB0cnVlLCBmYWxzZSksIDEpO1xuXG4gICAgICBjYXNlIFwiTExMTFwiOlxuICAgICAgICByZXR1cm4gb25lT2YobG9jLm1vbnRocyhcImxvbmdcIiwgdHJ1ZSwgZmFsc2UpLCAxKTtcbiAgICAgIC8vIGRhdGVzXG5cbiAgICAgIGNhc2UgXCJkXCI6XG4gICAgICAgIHJldHVybiBpbnRVbml0KG9uZU9yVHdvKTtcblxuICAgICAgY2FzZSBcImRkXCI6XG4gICAgICAgIHJldHVybiBpbnRVbml0KHR3byk7XG4gICAgICAvLyBvcmRpbmFsc1xuXG4gICAgICBjYXNlIFwib1wiOlxuICAgICAgICByZXR1cm4gaW50VW5pdChvbmVUb1RocmVlKTtcblxuICAgICAgY2FzZSBcIm9vb1wiOlxuICAgICAgICByZXR1cm4gaW50VW5pdCh0aHJlZSk7XG4gICAgICAvLyB0aW1lXG5cbiAgICAgIGNhc2UgXCJISFwiOlxuICAgICAgICByZXR1cm4gaW50VW5pdCh0d28pO1xuXG4gICAgICBjYXNlIFwiSFwiOlxuICAgICAgICByZXR1cm4gaW50VW5pdChvbmVPclR3byk7XG5cbiAgICAgIGNhc2UgXCJoaFwiOlxuICAgICAgICByZXR1cm4gaW50VW5pdCh0d28pO1xuXG4gICAgICBjYXNlIFwiaFwiOlxuICAgICAgICByZXR1cm4gaW50VW5pdChvbmVPclR3byk7XG5cbiAgICAgIGNhc2UgXCJtbVwiOlxuICAgICAgICByZXR1cm4gaW50VW5pdCh0d28pO1xuXG4gICAgICBjYXNlIFwibVwiOlxuICAgICAgICByZXR1cm4gaW50VW5pdChvbmVPclR3byk7XG5cbiAgICAgIGNhc2UgXCJzXCI6XG4gICAgICAgIHJldHVybiBpbnRVbml0KG9uZU9yVHdvKTtcblxuICAgICAgY2FzZSBcInNzXCI6XG4gICAgICAgIHJldHVybiBpbnRVbml0KHR3byk7XG5cbiAgICAgIGNhc2UgXCJTXCI6XG4gICAgICAgIHJldHVybiBpbnRVbml0KG9uZVRvVGhyZWUpO1xuXG4gICAgICBjYXNlIFwiU1NTXCI6XG4gICAgICAgIHJldHVybiBpbnRVbml0KHRocmVlKTtcblxuICAgICAgY2FzZSBcInVcIjpcbiAgICAgICAgcmV0dXJuIHNpbXBsZSgvXFxkezEsOX0vKTtcbiAgICAgIC8vIG1lcmlkaWVtXG5cbiAgICAgIGNhc2UgXCJhXCI6XG4gICAgICAgIHJldHVybiBvbmVPZihsb2MubWVyaWRpZW1zKCksIDApO1xuICAgICAgLy8gd2Vla1llYXIgKGspXG5cbiAgICAgIGNhc2UgXCJra2trXCI6XG4gICAgICAgIHJldHVybiBpbnRVbml0KGZvdXIpO1xuXG4gICAgICBjYXNlIFwia2tcIjpcbiAgICAgICAgcmV0dXJuIGludFVuaXQodHdvVG9Gb3VyLCB1bnRydW5jYXRlWWVhcik7XG4gICAgICAvLyB3ZWVrTnVtYmVyIChXKVxuXG4gICAgICBjYXNlIFwiV1wiOlxuICAgICAgICByZXR1cm4gaW50VW5pdChvbmVPclR3byk7XG5cbiAgICAgIGNhc2UgXCJXV1wiOlxuICAgICAgICByZXR1cm4gaW50VW5pdCh0d28pO1xuICAgICAgLy8gd2Vla2RheXNcblxuICAgICAgY2FzZS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XCIsIFwic2Vjb25kXCIsIFwibWlsbGlzZWNvbmRcIl07IC8vIHN0YW5kYXJkaXplIGNhc2UgYW5kIHBsdXJhbGl0eSBpbiB1bml0c1xuXG5mdW5jdGlvbiBub3JtYWxpemVVbml0KHVuaXQsIGlnbm9yZVVua25vd24pIHtcbiAgaWYgKGlnbm9yZVVua25vd24gPT09IHZvaWQgMCkge1xuICAgIGlnbm9yZVVua25vd24gPSBmYWxzZTtcbiAgfVxuXG4gIHZhciBub3JtYWxpemVkID0ge1xuICAgIHllYXI6IFwieWVhclwiLFxuICAgIHllYXJzOiBcInllYXJcIixcbiAgICBtb250aDogXCJtb250aFwiLFxuICAgIG1vbnRoczogXCJtb250aFwiLFxuICAgIGRheTogXCJkYXlcIixcbiAgICBkYXlzOiBcImRheVwiLFxuICAgIGhvdXI6IFwiaG91clwiLFxuICAgIGhvdXJzOiBcImhvdXJcIixcbiAgICBtaW51dGU6IFwibWludXRlXCIsXG4gICAgbWludXRlczogXCJtaW51dGVcIixcbiAgICBzZWNvbmQ6IFwic2Vjb25kXCIsXG4gICAgc2Vjb25kczogXCJzZWNvbmRcIixcbiAgICBtaWxsaXNlY29uZDogXCJtaWxsaXNlY29uZFwiLFxuICAgIG1pbGxpc2Vjb25kczogXCJtaWxsaXNlY29uZFwiLFxuICAgIHdlZWtkYXk6IFwid2Vla2RheVwiLFxuICAgIHdlZWtkYXlzOiBcIndlZWtkYXlcIixcbiAgICB3ZWVrbnVtYmVyOiBcIndlZWtOdW1iZXJcIixcbiAgICB3ZWVrc251bWJlcjogXCJ3ZWVrTnVtYmVyXCIsXG4gICAgd2Vla251bWJlcnM6IFwid2Vla051bWJlclwiLFxuICAgIHdlZWt5ZWFyOiBcIndlZWtZZWFyXCIsXG4gICAgd2Vla3llYXJzOiBcIndlZWtZZWFyXCIsXG4gICAgb3JkaW5hbDogXCJvcmRpbmFsXCJcbiAgfVt1bml0ID8gdW5pdC50b0xvd2VyQ2FzZSgpIDogdW5pdF07XG4gIGl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GggPCAzKSB7IC8vIGFsbCBhcmd1bWVudHMgcmVxdWlyZWRcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcIkFyZ3VtZW50cyBub3Qgb3B0aW9uYWxcIik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHByb3AgKz0gXCJcIjsgLy8gY29udmVydCBwcm9wIHRvIHN0cmluZ1xuXG4gICAgICAgICAgICAgICAgaWYgKGhhc093blByb3AuY2FsbChkZXNjcmlwdG9yLCBcInZhbHVlXCIpKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghbG9va3VwR2V0dGVyLmNhbGwob2JqLCBwcm9wKSAmJiAhbG9va3VwU2V0dGVyLmNhbGwob2JqLCBwcm9wKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZGF0YSBwcm9wZXJ0eSBkZWZpbmVkIGFuZCBubyBwcmUtZXhpc3RpbmcgYWNjZXNzb3JzXG4gICAgICAgICAgICAgICAgICAgICAgICBvYmpbcHJvcF0gPSBkZXNjcmlwdG9yLnZhbHVlO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKChoYXNPd25Qcm9wLmNhbGwoZGVzY3JpcHRvciwgXCJnZXRcIikgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICBoYXNPd25Qcm9wLmNhbGwoZGVzY3JpcHRvciwgXCJzZXRcIikpKSBcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZGVzY3JpcHRvciBoYXMgYSB2YWx1ZSBwcm9wIGJ1dCBhY2Nlc3NvciBhbHJlYWR5IGV4aXN0c1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcIkNhbm5vdCBzcGVjaWZ5IGFuIGFjY2Vzc29yIGFuZCBhIHZhbHVlXCIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gY2FuJ3Qgc3dpdGNoIG9mZiB0aGVzZSBmZWF0dXJlcyBpbiBFQ01BU2NyaXB0IDNcbiAgICAgICAgICAgICAgICAvLyBzbyB0aHJvdyBhIFR5cGVFcnJvciBpZiBhbnkgYXJlIGZhbHNlXG4gICAgICAgICAgICAgICAgaWYgKCEoZGVzY3JpcHRvci53cml0YWJsZSAmJiBkZXNjcmlwdG9yLmVudW1lcmFibGUgJiYgXG4gICAgICAgICAgICAgICAgICAgIGRlc2NyaXB0b3IuY29uZmlndXJhYmxlKSlcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgICAgICBcIlRoaXMgaW1wbGVtZW50YXRpb24gb2YgT2JqZWN0LmRlZmluZVByb3BlcnR5IGRvZXMgbm90IHN1cHBvcnRcIiArXG4gICAgICAgICAgICAgICAgICAgICAgICBcIiBmYWxzZSBmb3IgY29uZmlndXJhYmxlLCBlbnVtZXJhYmxlLCBvciB3cml0YWJsZS5cIlxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBpZiAoZGVzY3JpcHRvci5nZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVmaW5lR2V0dGVyLmNhbGwob2JqLCBwcm9wLCBkZXNjcmlwdG9yLmdldCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChkZXNjcmlwdG9yLnNldCkge1xuICAgICAgICAgICAgICAgICAgICBkZWZpbmVTZXR0ZXIuY2FsbChvYmosIHByb3AsIGRlc2NyaXB0b3Iuc2V0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgICAgICByZXR1cm4gb2JqO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcikge1xuICAgICAgICAgICAgT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvciA9IGZ1bmN0aW9uIChvYmosIHByb3ApIHtcbiAgICAgICAgICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA8IDIpIHsgLy8gYWxsIGFyZ3VtZW50cyByZXF1aXJlZFxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiQXJndW1lbnRzIG5vdCBvcHRpb25hbC5cIik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHByb3AgKz0gXCJcIjsgLy8gY29udmVydCBwcm9wIHRvIHN0cmluZ1xuXG4gICAgICAgICAgICAgICAgdmFyIGRlc2NyaXB0b3IgPSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgZW51bWVyYWJsZSAgOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICB3cml0YWJsZSAgICA6IHRydWVcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGdldHRlciA9IGxvb2t1cEdldHRlci5jYWxsKG9iaiwgcHJvcCksXG4gICAgICAgICAgICAgICAgc2V0dGVyID0gbG9va3VwU2V0dGVyLmNhbGwob2JqLCBwcm9wKTtcblxuICAgICAgICAgICAgICAgIGlmICghaGFzT3duUHJvcC5jYWxsKG9iaiwgcHJvcCkpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gcHJvcGVydHkgZG9lc24ndCBleGlzdCBvciBpcyBpbmhlcml0ZWRcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRlc2NyaXB0b3I7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghZ2V0dGVyICYmICFzZXR0ZXIpIHsgLy8gbm90IGFuIGFjY2Vzc29yIHNvIHJldHVybiBwcm9wXG4gICAgICAgICAgICAgICAgICAgIGRlc2NyaXB0b3IudmFsdWUgPSBvYmpbcHJvcF07XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBkZXNjcmlwdG9yO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIHRoZXJlIGlzIGFuIGFjY2Vzc29yLCByZW1vdmUgZGVzY3JpcHRvci53cml0YWJsZTtcbiAgICAgICAgICAgICAgICAvLyBwb3B1bGF0ZSBkZXNjcmlwdG9yLmdldCBhbmQgZGVzY3JpcHRvci5zZXQgKElFJ3MgYmVoYXZpb3IpXG4gICAgICAgICAgICAgICAgZGVsZXRlIGRlc2NyaXB0b3Iud3JpdGFibGU7XG4gICAgICAgICAgICAgICAgZGVzY3JpcHRvci5nZXQgPSBkZXNjcmlwdG9yLnNldCA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBpZiAoZ2V0dGVyKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlc2NyaXB0b3IuZ2V0ID0gZ2V0dGVyO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc2V0dGVyKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlc2NyaXB0b3Iuc2V0ID0gc2V0dGVyO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICByZXR1cm4gZGVzY3JpcHRvcjtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIU9iamVjdC5kZWZpbmVQcm9wZXJ0aWVzKSB7XG4gICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydGllcyA9IGZ1bmN0aW9uIChvYmosIHByb3BzKSB7XG4gICAgICAgICAgICAgICAgdmFyIHByb3A7XG4gICAgICAgICAgICAgICAgZm9yIChwcm9wIGluIHByb3BzKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChoYXNPd25Qcm9wLmNhbGwocHJvcHMsIHByb3ApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkob2JqLCBwcm9wLCBwcm9wc1twcm9wXSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgfVxufSgpKTtcblxuLy8gQmVnaW4gZGF0YXNldCBjb2RlXG5cbmlmICghZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LmRhdGFzZXQgJiYgXG4gICAgICAgICAvLyBGRiBpcyBlbXB0eSB3aGlsZSBJRSBnaXZlcyBlbXB0eSBvYmplY3RcbiAgICAgICAgKCFPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKEVsZW1lbnQucHJvdG90eXBlLCAnZGF0YXNldCcpICB8fFxuICAgICAgICAhT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihFbGVtZW50LnByb3RvdHlwZSwgJ2RhdGFzZXQnKS5nZXQpXG4gICAgKSB7XG4gICAgdmFyIHByb3BEZXNjcmlwdG9yID0ge1xuICAgICAgICBlbnVtZXJhYmxlOiB0cnVlLFxuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICd1c2Ugc3RyaWN0JztcbiAgICAgICAgICAgIHZhciBpLCBcbiAgICAgICAgICAgICAgICB0aGF0ID0gdGhpcyxcbiAgICAgICAgICAgICAgICBIVE1MNV9ET01TdHJpbmdNYXAsIFxuICAgICAgICAgICAgICAgIGF0dHJWYWwsIGF0dHJOYW1lLCBwcm9wTmFtZSxcbiAgICAgICAgICAgICAgICBhdHRyaWJ1dGUsXG4gICAgICAgICAgICAgICAgYXR0cmlidXRlcyA9IHRoaXMuYXR0cmlidXRlcyxcbiAgICAgICAgICAgICAgICBhdHRzTGVuZ3RoID0gYXR0cmlidXRlcy5sZW5ndGgsXG4gICAgICAgICAgICAgICAgdG9VcHBlckNhc2UgPSBmdW5jdGlvbiAobjApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4wLmNoYXJBdCgxKS50b1VwcGVyQ2FzZSgpO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgZ2V0dGVyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHNldHRlciA9IGZ1bmN0aW9uIChhdHRyTmFtZSwgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICh0eXBlb2YgdmFsdWUgIT09ICd1bmRlZmluZWQnKSA/IFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRBdHRyaWJ1dGUoYXR0ck5hbWUsIHZhbHVlKSA6IFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yZW1vdmVBdHRyaWJ1dGUoYXR0ck5hbWUpO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB0cnkgeyAvLyBTaW11bGF0ZSBET01TdHJpbmdNYXAgdy9hY2Nlc3NvciBzdXBwb3J0XG4gICAgICAgICAgICAgICAgLy8gVGVzdCBzZXR0aW5nIGFjY2Vzc29yIG9uIG5vcm1hbCBvYmplY3RcbiAgICAgICAgICAgICAgICAoe30pLl9fZGVmaW5lR2V0dGVyX18oJ3Rlc3QnLCBmdW5jdGlvbiAoKSB7fSk7XG4gICAgICAgICAgICAgICAgSFRNTDVfRE9NU3RyaW5nTWFwID0ge307XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXRjaCAoZTEpIHsgLy8gVXNlIGEgRE9NIG9iamVjdCBmb3IgSUU4XG4gICAgICAgICAgICAgICAgSFRNTDVfRE9NU3RyaW5nTWFwID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgYXR0c0xlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgYXR0cmlidXRlID0gYXR0cmlidXRlc1tpXTtcbiAgICAgICAgICAgICAgICAvLyBGaXg6IFRoaXMgdGVzdCByZWFsbHkgc2hvdWxkIGFsbG93IGFueSBYTUwgTmFtZSB3aXRob3V0IFxuICAgICAgICAgICAgICAgIC8vICAgICAgICAgY29sb25zIChhbmQgbm9uLXVwcGVyY2FzZSBmb3IgWEhUTUwpXG4gICAgICAgICAgICAgICAgaWYgKGF0dHJpYnV0ZSAmJiBhdHRyaWJ1dGUubmFtZSAmJiBcbiAgICAgICAgICAgICAgICAgICAgKC9eZGF0YS1cXHdbXFx3XFwtXSokLykudGVzdChhdHRyaWJ1dGUubmFtZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgYXR0clZhbCA9IGF0dHJpYnV0ZS52YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgYXR0ck5hbWUgPSBhdHRyaWJ1dGUubmFtZTtcbiAgICAgICAgICAgICAgICAgICAgLy8gQ2hhbmdlIHRvIENhbWVsQ2FzZVxuICAgICAgICAgICAgICAgICAgICBwcm9wTmFtZSA9IGF0dHJOYW1lLnN1YnN0cig1KS5yZXBsYWNlKC8tLi9nLCB0b1VwcGVyQ2FzZSk7XG4gICAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoSFRNTDVfRE9NU3RyaW5nTWFwLCBwcm9wTmFtZSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IHRoaXMuZW51bWVyYWJsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXQ6IGdldHRlci5iaW5kKGF0dHJWYWwgfHwgJycpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldDogc2V0dGVyLmJpbmQodG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4gICAgICAgICAgcmV0dXJuIGRlZmF1bHRzO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yIChrZXkgaW4gZGVmYXVsdHMpIHtcbiAgICAgICAgICBpZiAoZGVmYXVsdHMuaGFzT3duUHJvcGVydHkoa2V5KSAmJiBtYXliZU9wdGlvbnMuaGFzT3duUHJvcGVydHkoa2V5KSkge1xuICAgICAgICAgICAgZGVmYXVsdHNba2V5XSA9IG1heWJlT3B0aW9uc1trZXldXG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGRlZmF1bHRzXG4gICAgICB9XG5cbiAgICAgIC8vIGV2ZW50cyB0aGF0IHdlIGNvbnNpZGVyIHRvIGJlICduYXRpdmUnLCBhbnl0aGluZyBub3QgaW4gdGhpcyBsaXN0IHdpbGxcbiAgICAgIC8vIGJlIHRyZWF0ZWQgYXMgYSBjdXN0b20gZXZlbnRcbiAgICAsIHN0YW5kYXJkTmF0aXZlRXZlbnRzID1cbiAgICAgICAgJ2NsaWNrIGRibGNsaWNrIG1vdXNldXAgbW91c2Vkb3duIGNvbnRleHRtZW51ICcgICAgICAgICAgICAgICAgICArIC8vIG1vdXNlIGJ1dHRvbnNcbiAgICAgICAgJ21vdXNld2hlZWwgbW91c2VtdWx0aXdoZWVsIERPTU1vdXNlU2Nyb2xsICcgICAgICAgICAgICAgICAgICAgICArIC8vIG1vdXNlIHdoZWVsXG4gICAgICAgICdtb3VzZW92ZXIgbW91c2VvdXQgbW91c2Vtb3ZlIHNlbGVjdHN0YXJ0IHNlbGVjdGVuZCAnICAgICAgICAgICAgKyAvLyBtb3VzZSBtb3ZlbWVudFxuICAgICAgICAna2V5ZG93biBrZXlwcmVzcyBrZXl1cCAnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgLy8ga2V5Ym9hcmRcbiAgICAgICAgJ29yaWVudGF0aW9uY2hhbmdlICcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIC8vIG1vYmlsZVxuICAgICAgICAnZm9jdXMgYmx1ciBjaGFuZ2UgcmVzZXQgc2VsZWN0IHN1Ym1pdCAnICAgICAgICAgICAgICAgICAgICAgICAgICsgLy8gZm9ybSBlbGVtZW50c1xuICAgICAgICAnbG9hZCB1bmxvYWQgYmVmb3JldW5sb2FkIHJlc2l6ZSBtb3ZlIERPTUNvbnRlbnRMb2FkZWQgJyAgICAgICAgICsgLy8gd2luZG93XG4gICAgICAgICdyZWFkeXN0YXRlY2hhbmdlIG1lc3NhZ2UgJyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyB3aW5kb3dcbiAgICAgICAgJ2Vycm9yIGFib3J0IHNjcm9sbCAnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG1pc2NcbiAgICAgIC8vIGVsZW1lbnQuZmlyZUV2ZW50KCdvblhZWicuLi4gaXMgbm90IGZvcmdpdmluZyBpZiB3ZSB0cnkgdG8gZmlyZSBhbiBldmVudFxuICAgICAgLy8gdGhhdCBkb2Vzbid0IGFjdHVhbGx5IGV4aXN0LCBzbyBtYWtlIHN1cmUgd2Ugb25seSBkbyB0aGVzZSBvbiBuZXdlciBicm93c2Vyc1xuICAgICwgdzNjTmF0aXZlRXZlbnRzID1cbiAgICAgICAgJ3Nob3cgJyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIC8vIG1vdXNlIGJ1dHRvbnNcbiAgICAgICAgJ2lucHV0IGludmFsaWQgJyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArIC8vIGZvcm0gZWxlbWVudHNcbiAgICAgICAgJ3RvdWNoc3RhcnQgdG91Y2htb3ZlIHRvdWNoZW5kIHRvdWNoY2FuY2VsICcgICAgICAgICAgICAgICAgICAgICArIC8vIHRvdWNoXG4gICAgICAgICdnZXN0dXJlc3RhcnQgZ2VzdHVyZWNoYW5nZSBnZXN0dXJlZW5kICcgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBnZXN0dXJlXG4gICAgICAgICd0ZXh0aW5wdXQgJyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBUZXh0RXZlbnRcbiAgICAgICAgJ3JlYWR5c3RhdGVjaGFuZ2UgcGFnZXNob3cgcGFnZWhpZGUgcG9wc3RhdGUgJyAgICAgICAgICAgICAgICAgICArIC8vIHdpbmRvd1xuICAgICAgICAnaGFzaGNoYW5nZSBvZmZsaW5lIG9ubGluZSAnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgLy8gd2luZG93XG4gICAgICAgICdhZnRlcnByaW50IGJlZm9yZXByaW50ICcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBwcmludGluZ1xuICAgICAgICAnZHJhZ3N0YXJ0IGRyYWdlbnRlciBkcmFnb3ZlciBkcmFnbGVhdmUgZHJhZyBkcm9wIGRyYWdlbmQgJyAgICAgICsgLy8gZG5kXG4gICAgICAgICdsb2Fkc3RhcnQgcHJvZ3Jlc3Mgc3VzcGVuZCBlbXB0aWVkIHN0YWxsZWQgbG9hZG1ldGFkYXRhICcgICAgICAgKyAvLyBtZWRpYVxuICAgICAgICAnbG9hZGVkZGF0YSBjYW5wbGF5IGNhbnBsYXl0aHJvdWdoIHBsYXlpbmcgd2FpdGluZyBzZWVraW5nICcgICAgICsgLy8gbWVkaWFcbiAgICAgICAgJ3NlZWtlZCBlbmRlZCBkdXJhdGlvbmNoYW5nZSB0aW1ldXBkYXRlIHBsYXkgcGF1c2UgcmF0ZWNoYW5nZSAnICArIC8vIG1lZGlhXG4gICAgICAgICd2b2x1bWVjaGFuZ2UgY3VlY2hhbmdlICcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBtZWRpYVxuICAgICAgICAnY2hlY2tpbmcgb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1bmN0aW9uIChlbGVtZW50LCBjb250YWluZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyID0gY29udGFpbmVyLm5vZGVUeXBlID09PSA5IHx8IGNvbnRhaW5lciA9PT0gd2luZG93ID8gcm9vdCA6IGNvbnRhaW5lclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29udGFpbmVyICE9PSBlbGVtZW50ICYmIGNvbnRhaW5lci5jb250YWlucyhlbGVtZW50KVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIDogZnVuY3Rpb24gKGVsZW1lbnQsIGNvbnRhaW5lcikge1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoZWxlbWVudCA9IGVsZW1lbnQucGFyZW50Tm9kZSkgaWYgKGVsZW1lbnQgPT09IGNvbnRhaW5lcikgcmV0dXJuIDFcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDBcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAsIGNoZWNrID0gZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICAgIHZhciByZWxhdGVkID0gZXZlbnQucmVsYXRlZFRhcmdldFxuICAgICAgICAgICAgICByZXR1cm4gIXJlbGF0ZWRcbiAgICAgICAgICAgICAgICA/IHJlbGF0ZWQgPT0gbnVsbFxuICAgICAgICAgICAgICAgIDogKHJlbGF0ZWQgIT09IHRoaXMgJiYgcmVsYXRlZC5wcmVmaXggIT09ICd4dWwnICYmICEvZG9jdW1lbnQvLnRlc3QodGhpcy50b1N0cmluZygpKVxuICAgICAgICAgICAgICAgICAgICAmJiAhaXNBbmNlc3RvcihyZWxhdGVkLCB0aGlzKSlcbiAgICAgICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgbW91c2VlbnRlcjogeyBiYXNlOiAnbW91c2VvdmVyJywgY29uZGl0aW9uOiBjaGVjayB9XG4gICAgICAgICAgLCBtb3VzZWxlYXZlOiB7IGJhc2U6IC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SBldmVudCB0eXBlcyBuZWVkIHNwZWNpYWwgaGFuZGxpbmcgYW5kIHNvbWUgbmVlZCBzcGVjaWFsIHByb3BlcnRpZXMsIGRvIHRoYXQgYWxsIGhlcmVcbiAgICAgICAgICAsIHR5cGVGaXhlcnMgICA9IFtcbiAgICAgICAgICAgICAgICB7IC8vIGtleSBldmVudHNcbiAgICAgICAgICAgICAgICAgICAgcmVnOiAva2V5L2lcbiAgICAgICAgICAgICAgICAgICwgZml4OiBmdW5jdGlvbiAoZXZlbnQsIG5ld0V2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgbmV3RXZlbnQua2V5Q29kZSA9IGV2ZW50LmtleUNvZGUgfHwgZXZlbnQud2hpY2hcbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ga2V5UHJvcHNcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgLCB7IC8vIG1vdXNlIGV2ZW50c1xuICAgICAgICAgICAgICAgICAgICByZWc6IC9jbGlja3xtb3VzZSg/ISguKndoZWVsfHNjcm9sbCkpfG1lbnV8ZHJhZ3xkcm9wL2lcbiAgICAgICAgICAgICAgICAgICwgZml4OiBmdW5jdGlvbiAoZXZlbnQsIG5ld0V2ZW50LCB0eXBlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgbmV3RXZlbnQucmlnaHRDbGljayA9IGV2ZW50LndoaWNoID09PSAzIHx8IGV2ZW50LmJ1dHRvbiA9PT0gMlxuICAgICAgICAgICAgICAgICAgICAgIG5ld0V2ZW50LnBvcyA9IHsgeDogMCwgeTogMCB9XG4gICAgICAgICAgICAgICAgICAgICAgaWYgKGV2ZW50LnBhZ2VYIHx8IGV2ZW50LnBhZ2VZKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdFdmVudC5jbGllbnRYID0gZXZlbnQucGFnZVhcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld0V2ZW50LmNsaWVudFkgPSBldmVudC5wYWdlWVxuICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZXZlbnQuY2xpZW50WCB8fCBldmVudC5jbGllbnRZKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdFdmVudC5jbGllbnRYID0gZXZlbnQuY2xpZW50WCArIGRvYy5ib2R5LnNjcm9sbExlZnQgKyByb290LnNjcm9sbExlZnRcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld0V2ZW50LmNsaWVudFkgPSBldmVudC5jbGllbnRZICsgZG9jLmJvZHkuc2Nyb2xsVG9wICsgcm9vdC5zY3JvbGxUb3BcbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgaWYgKG92ZXJPdXRSZWdleC50ZXN0KHR5cGUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdFdmVudC5yZWxhdGVkVGFyZ2V0ID0gZXZlbnQucmVsYXRlZFRhcmdldFxuICAgICAgICAgICAgICAgICAgICAgICAgICB8fCBldmVudFsodHlwZSA9PSAnbW91c2VvdmVyJyA/ICdmcm9tJyA6ICd0bycpICsgJ0VsZW1lbnQnXVxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbW91c2VQcm9wc1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAsIHsgLy8gbW91c2Ugd2hlZWwgZXZlbnRzXG4gICAgICAgICAgICAgICAgICAgIHJlZzogL21vdXNlLiood2hlZWx8c2Nyb2xsKS9pXG4gICAgICAgICAgICAgICAgICAsIGZpeDogZnVuY3Rpb24gKCkgeyByZXR1cm4gbW91c2VXaGVlbFByb3BzIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICwgeyAvLyBUZXh0RXZlbnRcbiAgICAgICAgICAgICAgICAgICAgcmVnOiAvXnRleHQvaVxuICAgICAgICAgICAgICAgICAgLCBmaXg6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIHRleHRQcm9wcyB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAsIHsgLy8gdG91Y2ggYW5kIGdlc3R1cmUgZXZlbnRzXG4gICAgICAgICAgICAgICAgICAgIHJlZzogL150b3VjaHxeZ2VzdHVyZS9pXG4gICAgICAgICAgICAgICAgICAsIGZpeDogZnVuY3Rpb24gKCkgeyByZXR1cm4gdG91Y2hQcm9wcyB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAsIHsgLy8gbWVzc2FnZSBldmVudHNcbiAgICAgICAgICAgICAgICAgICAgcmVnOiAvXm1lc3NhZ2UkL2lcbiAgICAgICAgICAgICAgICAgICwgZml4OiBmdW5jdGlvbiAoKSB7IHJldHVybiBtZXNzYWdlUHJvcHMgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgLCB7IC8vIHBvcHN0YXRlIGV2ZW50c1xuICAgICAgICAgICAgICAgICAgICByZWc6IC9ecG9wc3RhdGUkL2lcbiAgICAgICAgICAgICAgICAgICwgZml4OiBmdW5jdGlvbiAoKSB7IHJldHVybiBzdGF0ZVByb3BzIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICwgeyAvLyBldmVyeXRoaW5nIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgcmVnOiAvLiovXG4gICAgICAgICAgICAgICAgICAsIGZpeDogZnVuY3Rpb24gKCkgeyByZXR1cm4gY29tbW9uUHJvcHMgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIF1cbiAgICAgICAgICAsIHR5cGVGaXhlck1hcCA9IHt9IC8vIHVzZWQgdG8gbWFwIGV2ZW50IHR5cGVzIHRvIGZpeGVyIGZ1bmN0aW9ucyAoYWJvdmUpLCBhIGJhc2ljIGNhY2hlIG1lY2hhbmlzbVxuXG4gICAgICAgICAgLCBFdmVudCA9IGZ1bmN0aW9uIChldmVudCwgZWxlbWVudCwgaXNOYX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AgICAgICAgICAgIGZvciAoaSA9IDAsIGwgPSB0eXBlRml4ZXJzLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZUZpeGVyc1tpXS5yZWcudGVzdCh0eXBlKSkgeyAvLyBndWFyYW50ZWVkIHRvIG1hdGNoIGF0IGxlYXN0IG9uZSwgbGFzdCBpcyAuKlxuICAgICAgICAgICAgICAgICAgICAgIHR5cGVGaXhlck1hcFt0eXBlXSA9IGZpeGVyID0gdHlwZUZpeGVyc1tpXS5maXhcbiAgICAgICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcHJvcHMgPSBmaXhlcihldmVudCwgdGhpcywgdHlwZSlcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSBwcm9wcy5sZW5ndGg7IGktLTspIHtcbiAgICAgICAgICAgICAgICAgIGlmICghKChwID0gcHJvcHNbaV0pIGluIHRoaXMpICYmIHAgaW4gZXZlbnQpIHRoaXNbcF0gPSBldmVudFtwXVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgIC8vIHByZXZlbnREZWZhdWx0KCkgYW5kIHN0b3BQcm9wYWdhdGlvbigpIGFyZSBhIGNvbnNpc3RlbnQgaW50ZXJmYWNlIHRvIHRob3NlIGZ1bmN0aW9uc1xuICAgICAgICAvLyBvbiB0aGUgRE9NLCBzdG9wKCkgaXMgYW4gYWxpYXMgZm9yIGJvdGggb2YgdGhlbSB0b2dldGhlclxuICAgICAgICBFdmVudC5wcm90b3R5cGUucHJldmVudERlZmF1bHQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgaWYgKHRoaXMub3JpZ2luYWxFdmVudC5wcmV2ZW50RGVmYXVsdCkgdGhpcy5vcmlnaW5hbEV2ZW50LnByZXZ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ZmluZFRhcmdldCA9IGZ1bmN0aW9uIChldmVudCwgZXZlbnRFbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gZm4uX19iZWFuRGVsID8gZm4uX19iZWFuRGVsLmZ0KGV2ZW50LnRhcmdldCwgZWxlbWVudCkgOiBldmVudEVsZW1lbnRcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICwgaGFuZGxlciA9IGNvbmRpdGlvblxuICAgICAgICAgICAgICAgICAgPyBmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICB2YXIgdGFyZ2V0ID0gZmluZFRhcmdldChldmVudCwgdGhpcykgLy8gZGVsZWF0ZWQgZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgICBpZiAoY29uZGl0aW9uLmFwcGx5KHRhcmdldCwgYXJndW1lbnRzKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGV2ZW50KSBldmVudC5jdXJyZW50VGFyZ2V0ID0gdGFyZ2V0XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FsbChldmVudCwgYXJndW1lbnRzKVxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgOiBmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICBpZiAoZm4uX19iZWFuRGVsKSBldmVudCA9IGV2ZW50LmNsb25lKGZpbmRUYXJnZXQoZXZlbnQpKSAvLyBkZWxlZ2F0ZWQgZXZlbnQsIGZpeCB0aGUgZml4XG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNhbGwoZXZlbnQsIGFyZ3VtZW50cylcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgaGFuZGxlci5fX2JlYW5EZWwgPSBmbi5fX2JlYW5EZWxcbiAgICAgICAgICAgIHJldHVybiBoYW5kbGVyXG4gICAgICAgICAgfVxuXG4gICAgICAgICwgUmVnRW50cnkgPSBmdW5jdGlvbiAoZWxlbWVudCwgdHlwZSwgaGFuZGxlciwgb3JpZ2luYWwsIG5hbWVzcGFjZXMsIGFyZ3MsIHJvb3QpIHtcbiAgICAgICAgICAgIHZhciBjdXN0b21UeXBlICAgICA9IGN1c3RvbUV2ZW50c1t0eXBlXVxuICAgICAgICAgICAgICAsIGlzTmF0aXZlXG5cbiAgICAgICAgICAgIGlmICh0eXBlID09ICd1bmxvYWQnKSB7XG4gICAgICAgICAgICAgIC8vIHNlbGYgY2xlYW4tdXBcbiAgICAgICAgICAgICAgaGFuZGxlciA9IG9uY2UocmVtb3ZlTGlzdGVuZXIsIGVsZW1lbnQsIHR5cGUsIGhhbmRsZXIsIG9yaWdpbmFsKVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoY3VzdG9tVHlwZSkge1xuICAgICAgICAgICAgICBpZiAoY3VzdG9tVHlwZS5jb25kaXRpb24pIHtcbiAgICAgICAgICAgICAgICBoYW5kbGVyID0gd3JhcHBlZEhhbmRsZXIoZWxlbWVudCwgaGFuZGxlciwgY3VzdG9tVHlwZS5jb25kaXRpb24sIGFyZ3MpXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgdHlwZSA9IGN1c3RvbVR5cGUuYmFzZSB8fCB0eXBlXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMuaXNOYXRpdmUgICAgICA9IGlzTmF0aXZlID0gbmF0aXZlRXZlbnRzW3R5cGVdICYmICEhZWxlbWVudFtldmVudFN1cHBvcnRdXG4gICAgICAgICAgICB0aGlzLmN1c3RvbVR5cGUgICAgPSAhVzNDX01PREVMICYmICFpc05hdGl2ZSAmJiB0eXBlXG4gICAgICAgICAgICB0aGlzLmVsZW1lbnQgICAgICAgPSBlbGVtZW50XG4gICAgICAgICAgICB0aGlzLnR5cGUgICAgICAgICAgPSB0eXBlXG4gICAgICAgICAgICB0aGlzLm9yaWdpbmFsICAgICAgPSBvc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sIHNlYXJjaCBvZiBvdXIgcmVnaXN0cnkgZm9yIG1hdGNoaW5nIGxpc3RlbmVycyxcbiAgICAgICAgICAvLyBgZm5gIHJldHVybnMgZmFsc2UgdG8gYnJlYWsgb3V0IG9mIHRoZSBsb29wXG4gICAgICAgICAgLCBmb3JBbGwgPSBmdW5jdGlvbiAoZWxlbWVudCwgdHlwZSwgb3JpZ2luYWwsIGhhbmRsZXIsIHJvb3QsIGZuKSB7XG4gICAgICAgICAgICAgIHZhciBwZnggPSByb290ID8gJ3InIDogJyQnXG4gICAgICAgICAgICAgIGlmICghdHlwZSB8fCB0eXBlID09ICcqJykge1xuICAgICAgICAgICAgICAgIC8vIHNlYXJjaCB0aGUgd2hvbGUgcmVnaXN0cnlcbiAgICAgICAgICAgICAgICBmb3IgKHZhciB0IGluIG1hcCkge1xuICAgICAgICAgICAgICAgICAgaWYgKHQuY2hhckF0KDApID09IHBmeCkge1xuICAgICAgICAgICAgICAgICAgICBmb3JBbGwoZWxlbWVudCwgdC5zdWJzdHIoMSksIG9yaWdpbmFsLCBoYW5kbGVyLCByb290LCBmbilcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIGkgPSAwLCBsLCBsaXN0ID0gbWFwW3BmeCArIHR5cGVdLCBhbGwgPSBlbGVtZW50ID09ICcqJ1xuICAgICAgICAgICAgICAgIGlmICghbGlzdCkgcmV0dXJuXG4gICAgICAgICAgICAgICAgZm9yIChsID0gbGlzdC5sZW5ndGg7IGkgPCBsOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgIGlmICgoYWxsIHx8IGxpc3RbaV0ubWF0Y2hlcyhlbGVtZW50LCBvcmlnaW5hbCwgaGFuZGxlcikpICYmICFmbihsaXN0W2ldLCBsaXN0LCBpLCB0eXBlKSkgcmV0dXJuXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAsIGhhcyA9IGZ1bmN0aW9uIChlbGVtZW50LCB0eXBlLCBvcmlnaW5hbCwgcm9vdCkge1xuICAgICAgICAgICAgICAvLyB3ZSdyZSBub3QgdXNpbmcgZm9yQWxsIGhlcmUgc2ltcGx5IGJlY2F1c2UgaXQncyBhIGJpdCBzbG93ZXIgYW5kIHRoaXNcbiAgICAgICAgICAgICAgLy8gbmVlZHMgdG8gYmUgZmFzdFxuICAgICAgICAgICAgICB2YXIgaSwgbGlzdCA9IG1hcFsocm9vdCA/ICdyJyA6ICckJykgKyB0eXBlXVxuICAgICAgICAgICAgICBpZiAobGlzdCkge1xuICAgICAgICAgICAgICAgIGZvciAoaSA9IGxpc3QubGVuZ3RoOyBpLS07KSB7XG4gICAgICAgICAgICAgICAgICBpZiAoIWxpc3RbaV0ucm9vdCAmJiBsaXN0W2ldLm1hdGNoZXMoZWxlbWVudCwgb3JpZ2luYWwsIG51bGwpKSByZXR1cm4gdHJ1ZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICByZXR1cm4gZmFsc2VcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICwgZ2V0ID0gZnVuY3Rpb24gKGVsZW1lbnQsIHR5cGUsIG9yaWdpbmFsLCByb290KSB7XG4gICAgICAgICAgICAgIHZhciBlbnRyaWVzID0gW11cbiAgICAgICAgICAgICAgZm9yQWxsKGVsZW1lbnQsIHR5cGUsIG9yaWdpbmFsLCBudWxsLCByb290LCBmdW5jdGlvbiAoZW50cnkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZW50cmllcy5wdXNoKGVudHJ5KVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICByZXR1cm4gZW50cmllc1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgLCBwdXQgPSBmdW5jdGlvbiAoZW50cnkpIHtcbiAgICAgICAgICAgICAgdmFyIGhhcyA9ICFlbnRyeS5yb290ICYmICF0aGlzLmhhcyhlbnRyeS5lbGVtZW50LCBlbnRyeS50eXBlLCBudWxsLCBmYWxzZSlcbiAgICAgICAgICAgICAgICAsIGtleSA9IChlbnRyeS5yb290ID8gJ3InIDogJyQnKSArIGVudHJ5LnR5cGVcbiAgICAgICAgICAgICAgOyhtYXBba2V5XSB8fCAobWFwW2tleV0gPSBbXSkpLnB1c2goZW50cnkpXG4gICAgICAgICAgICAgIHJldHVybiBoYXNcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICwgZGVsID0gZnVuY3Rpb24gKGVudHJ5KSB7XG4gICAgICAgICAgICAgIGZvckFsbChlbnRyeS5lbGVtZW50LCBlbnRyeS50eXBlLCBudWxsLCBlbnRyeS5oYW5kbGVyLCBlbnRyeS5yb290LCBmdW5jdGlvbiAoZW50cnksIGxpc3QsIGkpIHtcbiAgICAgICAgICAgICAgICBsaXN0LnNwbGljZShpLCAxKVxuICAgICAgICAgICAgICAgIGVudHJ5LnJlbW92ZWQgPSB0cnVlXG4gICAgICAgICAgICAgICAgaWYgKGxpc3QubGVuZ3RoID09PSAwKSBkZWxldGUgbWFwWyhlbnRyeS5yb290ID8gJ3InIDogJyQnKSArIGVudHJ5LnR5cGVdXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIGR1bXAgYWxsIGVudHJpZXMsIHVzZWQgZm9yIG9udW5sb2FkXG4gICAgICAgICAgLCBlbnRyaWVzID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICB2YXIgdCwgZW50cmllcyA9IFtdXG4gICAgICAgICAgICAgIGZvciAodCBpbiBtYXApIHtcbiAgICAgICAgICAgICAgICBpZiAodC5jaGFyQXQoMCkgPT0gJyQnKSBlbnRyaWVzID0gZW50cmllcy5jb25jYXQobWFwW3RdKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHJldHVybiBlbnRyaW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bmN0aW9uIChlbGVtZW50LCB0eXBlLCBhZGQsIGN1c3RvbSwgdXNlQ2FwdHVyZSkge1xuICAgICAgICAgICAgLy8gbmV3IGJyb3dzZXJzXG4gICAgICAgICAgICBlbGVtZW50W2FkZCA/IGFkZEV2ZW50IDogcmVtb3ZlRXZlbnRdKHR5cGUsIHJvb3RMaXN0ZW5lciwgdXNlQ2FwdHVyZSlcbiAgICAgICAgICB9XG4gICAgICAgIDogZnVuY3Rpb24gKGVsZW1lbnQsIHR5cGUsIGFkZCwgY3VzdG9tIC8qLCB1c2VDYXB0dXJlICovKSB7XG4gICAgICAgICAgICAvLyBJRTggYW5kIGJlbG93LCB1c2UgYXR0YWNoRXZlbnQvZGV0YWNoRXZlbnQgYW5kIHdlIGhhdmUgdG8gcGlnZ3ktYmFjayBwcm9wZXJ0eWNoYW5nZSBldmVudHNcbiAgICAgICAgICAgIC8vIHRvIHNpbXVsYXRlIGV2ZW50IGJ1YmJsaW5nIGV0Yy5cbiAgICAgICAgICAgIHZhciBlbnRyeVxuICAgICAgICAgICAgaWYgKGFkZCkge1xuICAgICAgICAgICAgICByZWdpc3RyeS5wdXQoZW50cnkgPSBuZXcgUmVnRW50cnkoXG4gICAgICAgICAgICAgICAgICBlbGVtZW50XG4gICAgICAgICAgICAgICAgLCBjdXN0b20gfHwgdHlwZVxuICAgICAgICAgICAgICAgICwgZnVuY3Rpb24gKGV2ZW50KSB7IC8vIGhhbmRsZXJcbiAgICAgICAgICAgICAgICAgICAgcm9vdExpc3RlbmVyLmNhbGwoZWxlbWVudCwgZXZlbnQsIGN1c3RvbSlcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAsIHJvb3RMaXN0ZW5lclxuICAgICAgICAgICAgICAgICwgbnVsbFxuICAgICAgICAgICAgICAgICwgbnVsbFxuICAgICAgICAgICAgICAgICwgdHJ1ZSAvLyBpcyByb290XG4gICAgICAgICAgICAgICkpXG4gICAgICAgICAgICAgIGlmIChjdXN0b20gJi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XQncyBvbmx5IG5lZWRlZCBvbmNlXG4gICAgICAgIHZhciBmaW5kVGFyZ2V0ID0gZnVuY3Rpb24gKHRhcmdldCwgcm9vdCkge1xuICAgICAgICAgICAgICB2YXIgaSwgYXJyYXkgPSBpc1N0cmluZyhzZWxlY3RvcikgPyBzZWxlY3RvckVuZ2luZShzZWxlY3Rvciwgcm9vdCkgOiBzZWxlY3RvclxuICAgICAgICAgICAgICBmb3IgKDsgdGFyZ2V0ICYmIHRhcmdldCAhPT0gcm9vdDsgdGFyZ2V0ID0gdGFyZ2V0LnBhcmVudE5vZGUpIHtcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSBhcnJheS5sZW5ndGg7IGktLTspIHtcbiAgICAgICAgICAgICAgICAgIGlmIChhcnJheVtpXSA9PT0gdGFyZ2V0KSByZXR1cm4gdGFyZ2V0XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgLCBoYW5kbGVyID0gZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgdmFyIG1hdGNoID0gZmluZFRhcmdldChlLnRhcmdldCwgdGhpcylcbiAgICAgICAgICAgICAgaWYgKG1hdGNoKSBmbi5hcHBseShtYXRjaCwgYXJndW1lbnRzKVxuICAgICAgICAgICAgfVxuXG4gICAgICAgIC8vIF9fYmVhbkRlbCBpc24ndCBwbGVhc2FudCBidXQgaXQncyBhIHByaXZhdGUgZnVuY3Rpb24sIG5vdCBleHBvc2VkIG91dHNpZGUgb2YgQmVhblxuICAgICAgICBoYW5kbGVyLl9fYmVhbkRlbCA9IHtcbiAgICAgICAgICAgIGZ0ICAgICAgIDogZmluZFRhcmdldCAvLyBhdHRhY2ggaXQgaGVyZSBmb3IgY3VzdG9tRXZlbnRzIHRvIHVzZSB0b29cbiAgICAgICAgICAsIHNlbGVjdG9yIDogc2VsZWN0b3JcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gaGFuZGxlclxuICAgICAgfV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B0cnVlLCBlbnRyeS5jdXN0b21UeXBlLCBvcHRzLnVzZUNhcHR1cmUpXG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGVsZW1lbnRcbiAgICAgIH1cblxuICAgICAgLyoqXG4gICAgICAgICogYWRkKGVsZW1lbnRbLCBzZWxlY3Rvcl0sIGV2ZW50VHlwZShzKSwgaGFuZGxlclssIGFyZ3MgXSlcbiAgICAgICAgKlxuICAgICAgICAqIERlcHJlY2F0ZWQ6IGtlcHQgKGZvciBub3cpIGZvciBiYWNrd2FyZC1jb21wYXRpYmlsaXR5XG4gICAgICAgICovXG4gICAgLCBhZGQgPSBmdW5jdGlvbiAoZWxlbWVudCwgZXZlbnRzLCBmbiwgZGVsZm4sIG9wdGlvbnMpIHtcbiAgICAgICAgcmV0dXJuIG9uLmFwcGx5KFxuICAgICAgICAgICAgbnVsbFxuICAgICAgICAgICwgIWlzU3RyaW5nKGZuKVxuICAgICAgICAgICAgICA/IHNsaWNlLmNhbGwoYXJndW1lbnRzKVxuICAgICAgICAgICAgICA6IFsgZWxlbWVudCwgZm4sIGV2ZW50cywgZGVsZm4gXS5jb25jYXQoYXJndW1lbnRzLmxlbmd0aCA+IDMgPyBzbGljZS5jYWxsKGFyZ3VtZW50cywgNCkgOiBbXSlcbiAgICAgICAgKVxuICAgICAgfVxuXG4gICAgICAvKipcbiAgICAgICAgKiBvbmUoZWxlbWVudCwgZXZlbnRUeXBlKHMpWywgc2VsZWN0b3JdLCBoYW5kbGVyWywgYXJncyBdKVxuICAgICAgICAqL1xuICAgICwgb25lID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gb24uYXBwbHkoT05FLCBhcmd1bWVudHMpXG4gICAgICB9XG5cbiAgICAgIC8qKlxuICAgICAgICAqIGZpcmUoZWxlbWVudCwgZXZlbnRUeXBlKHMpWywgYXJncyBdKVxuICAgICAgICAqXG4gICAgICAgICogVGhlIG9wdGlvbmFsICdhcmdzJyBhcm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ldLmhhbmRsZXIuX19iZWFuRGVsKSBhcmdzLnB1c2goYmVhbkRlbC5zZWxlY3RvcilcbiAgICAgICAgICAgIGFyZ3MucHVzaChoYW5kbGVyc1tpXS5vcmlnaW5hbClcbiAgICAgICAgICAgIG9uLmFwcGx5KG51bGwsIGFyZ3MpXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBlbGVtZW50XG4gICAgICB9XG5cbiAgICAsIGJlYW4gPSB7XG4gICAgICAgICAgJ29uJyAgICAgICAgICAgICAgICA6IG9uXG4gICAgICAgICwgJ2FkZCcgICAgICAgICAgICAgICA6IGFkZFxuICAgICAgICAsICdvbmUnICAgICAgICAgICAgICAgOiBvbmVcbiAgICAgICAgLCAnb2ZmJyAgICAgICAgICAgICAgIDogb2ZmXG4gICAgICAgICwgJ3JlbW92ZScgICAgICAgICAgICA6IG9mZlxuICAgICAgICAsICdjbG9uZScgICAgICAgICAgICAgOiBjbG9uZVxuICAgICAgICAsICdmaXJlJyAgICAgICAgICAgICAgOiBmaXJlXG4gICAgICAgICwgJ0V2ZW50JyAgICAgICAgICAgICA6IEV2ZW50XG4gICAgICAgICwgJ3NldFNlbGVjdG9yRW5naW5lJyA6IHNldFNlbGVjdG9yRW5naW5lXG4gICAgICAgICwgJ25vQ29uZmxpY3QnICAgICAgICA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGNvbnRleHRbbmFtZV0gPSBvbGRcbiAgICAgICAgICAgIHJldHVybiB0aGlzXG4gICAgICAgICAgfVxuICAgICAgfVxuXG4gIC8vIGZvciBJRSwgY2xlYW4gdXAgb24gdW5sb2FkIHRvIGF2b2lkIGxlYWtzXG4gIGlmICh3aW4uYXR0YWNoRXZlbnQpIHtcbiAgICB2YXIgY2xlYW51cCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgIHZhciBpLCBlbnRyaWVzID0gcmVnaXN0cnkuZW50cmllcygpXG4gICAgICBmb3IgKGkgaW4gZW50cmllcykge1xuICA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ggdG9rZW4gKTtcbiAgICAgICAgICB1cGRhdGVkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB3aGlsZSAoICsraXRlciA8IGxlbiApO1xuXG4gICAgICBpZiAoIHVwZGF0ZWQgKSB7XG4gICAgICAgIHRoaXMuX3VwZGF0ZUNsYXNzTmFtZSgpO1xuICAgICAgfVxuICAgIH07XG5cbiAgICBjbGFzc0xpc3RQcm90by5yZW1vdmUgPSBmdW5jdGlvbigpIHtcbiAgICAgIHZhclxuICAgICAgICB0b2tlbnMgID0gYXJndW1lbnRzLFxuICAgICAgICBpdGVyICAgID0gMCxcbiAgICAgICAgbGVuICAgICA9IHRva2Vucy5sZW5ndGgsXG4gICAgICAgIHVwZGF0ZWQgPSBmYWxzZSxcbiAgICAgICAgdG9rZW4sXG4gICAgICAgIGluZGV4O1xuXG4gICAgICBkbyB7XG4gICAgICAgIHRva2VuID0gdG9rZW5zWyBpdGVyIF0gKyAnJztcbiAgICAgICAgaW5kZXggPSBjaGVja1Rva2VuQW5kR2V0SW5kZXgoIHRoaXMsIHRva2VuICk7XG5cbiAgICAgICAgd2hpbGUgKCBpbmRleCAhPT0gLTEgKSB7XG4gICAgICAgICAgdGhpcy5zcGxpY2UoIGluZGV4LCAxICk7XG4gICAgICAgICAgdXBkYXRlZCA9IHRydWU7XG4gICAgICAgICAgaW5kZXggPSBjaGVja1Rva2VuQW5kR2V0SW5kZXgoIHRoaXMsIHRva2VuICk7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgd2hpbGUgKCArK2l0ZXIgPCBsZW4gKTtcblxuICAgICAgaWYgKCB1cGRhdGVkICkge1xuICAgICAgICB0aGlzLl91cGRhdGVDbGFzc05hbWUoKTtcbiAgICAgIH1cbiAgICB9O1xuXG4gICAgY2xhc3NMaXN0UHJvdG8udG9nZ2xlID0gZnVuY3Rpb24oIHRva2VuLCBmb3JjZSApIHtcbiAgICAgIHRva2VuICs9ICcnO1xuXG4gICAgICB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09IFwiJ1wiKSB7XG4gICAgICAgIGlmIChjdXJyZW50RnVsbC5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgc3BsaXRzLnB1c2goe1xuICAgICAgICAgICAgbGl0ZXJhbDogYnJhY2tldGVkLFxuICAgICAgICAgICAgdmFsOiBjdXJyZW50RnVsbFxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgY3VycmVudCA9IG51bGw7XG4gICAgICAgIGN1cnJlbnRGdWxsID0gXCJcIjtcbiAgICAgICAgYnJhY2tldGVkID0gIWJyYWNrZXRlZDtcbiAgICAgIH0gZWxzZSBpZiAoYnJhY2tldGVkKSB7XG4gICAgICAgIGN1cnJlbnRGdWxsICs9IGM7XG4gICAgICB9IGVsc2UgaWYgKGMgPT09IGN1cnJlbnQpIHtcbiAgICAgICAgY3VycmVudEZ1bGwgKz0gYztcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGlmIChjdXJyZW50RnVsbC5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgc3BsaXRzLnB1c2goe1xuICAgICAgICAgICAgbGl0ZXJhbDogZmFsc2UsXG4gICAgICAgICAgICB2YWw6IGN1cnJlbnRGdWxsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICBjdXJyZW50RnVsbCA9IGM7XG4gICAgICAgIGN1cnJlbnQgPSBjO1xuICAgICAgfVxuICAgIH1cblxuICAgIGlmIChjdXJyZW50RnVsbC5sZW5ndGggPiAwKSB7XG4gICAgICBzcGxpdHMucHVzaCh7XG4gICAgICAgIGxpdGVyYWw6IGJyYWNrZXRlZCxcbiAgICAgICAgdmFsOiBjdXJyZW50RnVsbFxuICAgICAgfSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHNwbGl0cztcbiAgfTtcblxuICBmdW5jdGlvbiBGb3JtYXR0ZXIobG9jYWxlLCBmb3JtYXRPcHRzKSB7XG4gICAgdGhpcy5vcHRzID0gZm9ybWF0T3B0cztcbiAgICB0aGlz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AgICAgIC8vIHNlY29uZHNcblxuICAgICAgICBjYXNlIFwic1wiOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQuc2Vjb25kKTtcblxuICAgICAgICBjYXNlIFwic3NcIjpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LnNlY29uZCwgMik7XG4gICAgICAgIC8vIG1pbnV0ZXNcblxuICAgICAgICBjYXNlIFwibVwiOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQubWludXRlKTtcblxuICAgICAgICBjYXNlIFwibW1cIjpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0Lm1pbnV0ZSwgMik7XG4gICAgICAgIC8vIGhvdXJzXG5cbiAgICAgICAgY2FzZSBcImhcIjpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LmhvdXIgJSAxMiA9PT0gMCA/IDEyIDogZHQuaG91ciAlIDEyKTtcblxuICAgICAgICBjYXNlIFwiaGhcIjpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LmhvdXIgJSAxMiA9PT0gMCA/IDEyIDogZHQuaG91ciAlIDEyLCAyKTtcblxuICAgICAgICBjYXNlIFwiSFwiOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQuaG91cik7XG5cbiAgICAgICAgY2FzZSBcIkhIXCI6XG4gICAgICAgICAgcmV0dXJuIF90aGlzLm51bShkdC5ob3VyLCAyKTtcbiAgICAgICAgLy8gb2Zmc2V0XG5cbiAgICAgICAgY2FzZSBcIlpcIjpcbiAgICAgICAgICAvLyBsaWtlICs2XG4gICAgICAgICAgcmV0dXJuIGZvcm1hdE9mZnNldCh7XG4gICAgICAgICAgICBmb3JtYXQ6IFwibmFycm93XCIsXG4gICAgICAgICAgICBhbGxvd1o6IF90aGlzLm9wdHMuYWxsb3daXG4gICAgICAgICAgfSk7XG5cbiAgICAgICAgY2FzZSBcIlpaXCI6XG4gICAgICAgICAgLy8gbGlrZSArMDY6MDBcbiAgICAgICAgICByZXR1cm4gZm9ybWF0T2Zmc2V0KHtcbiAgICAgICAgICAgIGZvcm1hdDogXCJzaG9ydFwiLFxuICAgICAgICAgICAgYWxsb3daOiBfdGhpcy5vcHRzLmFsbG93WlxuICAgICAgICAgIH0pO1xuXG4gICAgICAgIGNhc2UgXCJaWlpcIjpcbiAgICAgICAgICAvLyBsaWtlICswNjAwXG4gICAgICAgICAgcmV0dXJuIGZvcm1hdE9mZnNldCh7XG4gICAgICAgICAgICBmb3JtYXQ6IFwidGVjaGllXCIsXG4gICAgICAgICAgICBhbGxvd1o6IGZhbHNlXG4gICAgICAgICAgfSk7XG5cbiAgICAgICAgY2FzZSBcIlpaWlpcIjpcbiAgICAgICAgICAvLyBsaWtlIEVTVFxuICAgICAgICAgIHJldHVybiBkdC5vZmZzZXROYW1lU2hvcnQ7XG5cbiAgICAgICAgY2FzZSBcIlpaWlpaXCI6XG4gICAgICAgICAgLy8gbGlrZSBFYXN0ZXJuIFN0YW5kYXJkIFRpbWVcbiAgICAgICAgICByZXR1cm4gZHQub2Zmc2V0TmFtZUxvbmc7XG4gICAgICAgIC8vIHpvbmVcblxuICAgICAgICBjYXNlIFwielwiOlxuICAgICAgICAgIC8vIGxpa2UgQW1lcmljYS9OZXdfWW9ya1xuICAgICAgICAgIHJldHVybiBkdC56b25lTmFtZTtcbiAgICAgICAgLy8gbWVyaWRpZW1zXG5cbiAgICAgICAgY2FzZSBcImFcIjpcbiAgICAgICAgICByZXR1cm4gbWVyaWRpZW0oKTtcbiAgICAgICAgLy8gZGF0ZXNcblxuICAgICAgICBjYXNlIFwiZFwiOlxuICAgICAgICAgIHJldHVybiBvdXRwdXRDYWwgPyBzdHJpbmcoe1xuICAgICAgICAgICAgZGF5OiBcIm51bWVyaWNcIlxuICAgICAgICAgIH0sIFwiZGF5XCIpIDogX3RoaXMubnVtKGR0LmRheSk7XG5cbiAgICAgICAgY2FzZSBcImRkXCI6XG4gICAgICAgICAgcmV0dXJuIG91dHB1dENhbCA/IHN0cmluZyh7XG4gICAgICAgICAgICBkYXk6IFwiMi1kaWdpdFwiXG4gICAgICAgICAgfSwgXCJkYXlcIikgOiBfdGhpcy5udW0oZHQuZGF5LCAyKTtcbiAgICAgICAgLy8gd2Vla2RheXMgLSBzdGFuZGFsb25lXG5cbiAgICAgICAgY2FzZSBcImNcIjpcbiAgICAgICAgICAvLyBsaWtlIDFcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LndlZWtkYXkpO1xuXG4gICAgICAgIGNhc2UgXCJjY2NcIjpcbiAgICAgICAgICAvLyBsaWtlICdUdWVzJ1xuICAgICAgICAgIHJldHVybiB3ZWVrZGF5KFwic2hvcnRcIiwgdHJ1ZSk7XG5cbiAgICAgICAgY2FzZSBcImNjY2NcIjpcbiAgICAgICAgICAvLyBsaWtlICdUdWVzZGF5J1xuICAgICAgICAgIHJldHVybiB3ZWVrZGF5KFwibG9uZ1wiLCB0cnVlKTtcblxuICAgICAgICBjYXNlIFwiY2NjY2NcIjpcbiAgICAgICAgICAvLyBsaWtlICdUJ1xuICAgICAgICAgIHJldHVybiB3ZWVrZGF5KFwibmFycm93XCIsIHRydWUpO1xuICAgICAgICAvLyB3ZWVrZGF5cyAtIGZvcm1hdFxuXG4gICAgICAgIGNhc2UgXCJFXCI6XG4gICAgICAgICAgLy8gbGlrZSAxXG4gICAgICAgICAgcmV0dXJuIF90aGlzLm51bShkdC53ZWVrZGF5KTtcblxuICAgICAgICBjYXNlIFwiRUVFXCI6XG4gICAgICAgICAgLy8gbGlrZSAnVHVlcydcbiAgICAgICAgICByZXR1cm4gd2Vla2RheShcInNob3J0XCIsIGZhbHNlKTtcblxuICAgICAgICBjYXNlIFwiRUVFRVwiOlxuICAgICAgICAgIC8vIGxpa2UgJ1R1ZXNkYXknXG4gICAgICAgICAgcmV0dXJuIHdlZWtkYXkoXCJsb25nXCIsIGZhbHNlKTtcblxuICAgICAgICBjYXNlIFwiRUVFRUVcIjpcbiAgICAgICAgICAvLyBsaWtlICdUJ1xuICAgICAgICAgIHJldHVybiB3ZWVrZGF5KFwibmFycm93XCIsIGZhbHNlKTtcbiAgICAgICAgLy8gbW9udGhzIC0gc3RhbmRhbG9uZVxuXG4gICAgICAgIGNhc2UgXCJMXCI6XG4gICAgICAgICAgLy8gbGlrZSAxXG4gICAgICAgICAgcmV0dXJuIG91dHB1dENhbCA/IHN0cmluZyh7XG4gICAgICAgICAgICBtb250aDogXCJudW1lcmljXCIsXG4gICAgICAgICAgICBkYXk6IFwibnVtZXJpY1wiXG4gICAgICAgICAgfSwgXCJtb250aFwiKSA6IF90aGlzLm51bShkdC5tb250aCk7XG5cbiAgICAgICAgY2FzZSBcIkxMXCI6XG4gICAgICAgICAgLy8gbGlrZSAwMSwgZG9lc24ndCBzZWVtIHRvIHdvcmtcbiAgICAgICAgICByZXR1cm4gb3V0cHV0Q2FsID8gc3RyaW5nKHtcbiAgICAgICAgICAgIG1vbnRoOiBcIjItZGlnaXRcIixcbiAgICAgICAgICAgIGRheTogXCJudW1lcmljXCJcbiAgICAgICAgICB9LCBcIm1vbnRoXCIpIDogX3RoaXMubnVtKGR0Lm1vbnRoLCAyKTtcblxuICAgICAgICBjYXNlIFwiTExMXCI6XG4gICAgICAgICAgLy8gbGlrZSBKYW5cbiAgICAgICAgICByZXR1cm4gbW9udGgoXCJzaG9ydFwiLCB0cnVlKTtcblxuICAgICAgICBjYXNlIFwiTExMTFwiOlxuICAgICAgICAgIC8vIGxpa2UgSmFudWFyeVxuICAgICAgICAgIHJldHVybiBtb250aChcImxvbmdcIiwgdHJ1ZSk7XG5cbiAgICAgICAgY2FzZSBcIkxMTExMXCI6XG4gICAgICAgICAgLy8gbGlrZSBKXG4gICAgICAgICAgcmV0dXJuIG1vbnRoKFwibmFycm93XCIsIHRydWUpO1xuICAgICAgICAvLyBtb250aHMgLSBmb3JtYXRcblxuICAgICAgICBjYXNlIFwiTVwiOlxuICAgICAgICAgIC8vIGxpa2UgMVxuICAgICAgICAgIHJldHVybiBvdXRwdXRDYWwgPyBzdHJpbmcoe1xuICAgICAgICAgICAgbW9udGg6IFwibnVtZXJpY1wiXG4gICAgICAgICAgfSwgXCJtb250aFwiKSA6IF90aGlzLm51bShkdC5tb250aCk7XG5cbiAgICAgICAgY2FzZSBcIk1NXCI6XG4gICAgICAgICAgLy8gbGlrZSAwMVxuICAgICAgICAgIHJldHVybiBvdXRwdXRDYWwgPyBzdHJpbmcoe1xuICAgICAgICAgICAgbW9udGg6IFwiMi1kaWdpdFwiXG4gICAgICAgICAgfSwgXCJtb250aFwiKSA6IF90aGlzLm51bShkdC5tb250aCwgMik7XG5cbiAgICAgICAgY2FzZSBcIk1NTVwiOlxuICAgICAgICAgIC8vIGxpa2UgSmFuXG4gICAgICAgICAgcmV0dXJuIG1vbnRoKFwic2hvcnRcIiwgZmFsc2UpO1xuXG4gICAgICAgIGNhc2UgXCJNTU1NXCI6XG4gICAgICAgICAgLy8gbGlrZSBKYW51YXJ5XG4gICAgICAgICAgcmV0dXJuIG1vbnRoKFwibG9uZ1wiLCBmYWxzZSk7XG5cbiAgICAgICAgY2FzZSBcIk1NTU1NXCI6XG4gICAgICAgICAgLy8gbGlrZSBKXG4gICAgICAgICAgcmV0dXJuIG1vbnRoKFwibmFycm93XCIsIGZhbHNlKTtcbiAgICAgICAgLy8geWVhcnNcblxuICAgICAgICBjYXNlIFwieVwiOlxuICAgICAgICAgIC8vIGxpa2UgMjAxNFxuICAgICAgICAgIHJldHVybiBvdXRwdXRDYWwgPyBzdHJpbmcoe1xuICAgICAgICAgICAgeWVhcjogXCJudW1lcmljXCJcbiAgICAgICAgICB9LCBcInllYXJcIikgOiBfdGhpcy5udW0oZHQueWVhcik7XG5cbiAgICAgICAgY2FzZSBcInl5XCI6XG4gICAgICAgICAgLy8gbGlrZSAxNFxuICAgICAgICAgIHJldHVybiBvdXRwdXRDYWwgPyBzdHJpbmcoe1xuICAgICAgICAgICAgeWVhcjogXCIyLWRpZ2l0XCJcbiAgICAgICAgICB9LCBcInllYXJcIikgOiBfdGhpcy5udW0oZHQueWVhci50b1N0cmluZygpLnNsaWNlKC0yKSwgMik7XG5cbiAgICAgICAgY2FzZSBcInl5eXlcIjpcbiAgICAgICAgICAvLyBsaWtlIDAwMTJcbiAgICAgICAgICByZXR1cm4gb3V0cHV0Q2FsID8gc3RyaW5nKHtcbiAgICAgICAgICAgIHllYXI6IFwibnVtZXJpY1wiXG4gICAgICAgICAgfSwgXCJ5ZWFyXCIpIDogX3RoaXMubnVtKGR0LnllYXIsIDQpO1xuXG4gICAgICAgIGNhc2UgXCJ5eXl5eXlcIjpcbiAgICAgICAgICAvLyBsaWtlIDAwMDAxMlxuICAgICAgICAgIHJldHVybiBvdXRwdXRDYWwgPyBzdHJpbmcoe1xuICAgICAgICAgICAgeWVhcjogXCJudW1lcmljXCJcbiAgICAgICAgICB9LCBcInllYXJcIikgOiBfdGhpcy5udW0oZHQueWVhciwgNik7XG4gICAgICAgIC8vIGVyYXNcblxuICAgICAgICBjYXNlIFwiR1wiOlxuICAgICAgICAgIC8vIGxpa2UgQURcbiAgICAgICAgICByZXR1cm4gZXJhKFwic2hvcnRcIik7XG5cbiAgICAgICAgY2FzZSBcIkdHXCI6XG4gICAgICAgICAgLy8gbGlrZSBBbm5vIERvbWluaVxuICAgICAgICAgIHJldHVybiBlcmEoXCJsb25nXCIpO1xuXG4gICAgICAgIGNhc2UgXCJHR0dHR1wiOlxuICAgICAgICAgIHJldHVybiBlcmEoXCJuYXJyb3dcIik7XG5cbiAgICAgICAgY2FzZSBcImtrXCI6XG4gICAgICAgICAgcmV0dXJuIF90aGlzLm51bShkdC53ZWVrWWVhci50b1N0cmluZygpLnNsaWNlKC0yKSwgMik7XG5cbiAgICAgICAgY2FzZSBcImtra2tcIjpcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LndlZWtZZWFyLCA0KTtcblxuICAgICAgICBjYXNlIFwiV1wiOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQud2Vla051bWJlcik7XG5cbiAgICAgICAgY2FzZSBcIldXXCI6XG4gICAgICAgICAgcmV0dXJuIF90aGlzLm51bShkdC53ZWVrTnVtYmVyLCAyKTtcblxuICAgICAgICBjYXNlIFwib1wiOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQub3JkaW5hbCk7XG5cbiAgICAgICAgY2FzZSBcIm9vb1wiOlxuICAgICAgICAgIHJldHVybiBfdGhpcy5udW0oZHQub3JkaW5hbCwgMyk7XG5cbiAgICAgICAgY2FzZSBcInFcIjpcbiAgICAgICAgICAvLyBsaWtlIDFcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LnF1YXJ0ZXIpO1xuXG4gICAgICAgIGNhc2UgXCJxcVwiOlxuICAgICAgICAgIC8vIGxpa2UgMDFcbiAgICAgICAgICByZXR1cm4gX3RoaXMubnVtKGR0LnF1YXJ0ZXIsIDIpO1xuXG4gICAgICAgIGNhc2UgXCJYXCI6XG4gICAgICAgICAgcmV0dXJuIF90aGlzLm51bShNYXRoLmZsb29yKGR0LnRzIC8gMTAwMCkpO1xuXG4gICAgICAgIGNhc2UgXCJ4XCI6XG4gICAgICAgICAgcmV0dXJuIF90aGlzLm51bShkdC50cyk7XG5cbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICByZXR1cm4gbWF5YmVNYWNybyh0b2tlbik7XG4gICAgICB9XG4gICAgfTtcblxuICAgIHJldHVybiBzdHJpbmdpZnlUb2tlbnMoRm9ybWF0dGVyLnBhcnNlRm9ybWF0KGZtdCksIHRva2VuVG9TdHJpbmcpO1xuICB9O1xuXG4gIF9wcm90by5mb3JtYXREdXJhdGlvbkZyb21TdHJpbmcgPSBmdW5jdGlvbiBmb3JtYXREdXJhdGlvbkZyb21TdHJpbmcoZHVyLCBmbXQpIHtcbiAgICB2YXIgX3RoaXMyID0gdGhpcztcblxuICAgIHZhciB0b2tlblRvRmllbGQgPSBmdW5jdGlvbiB0b2tlblRvRmllbGQodG9rZW4pIHtcbiAgICAgIHN3aXRjaCAodG9rZW5bMF0pIHtcbiAgICAgICAgY2FzZSBcIlNcIjpcbiAgICAgICAgICByZXR1cm4gXCJtaWxsaXNlY29uZFwiO1xuXG4gICAgICAgIGNhc2UgXCJzXCI6XG4gICAgICAgICAgcmV0dXJuIFwic2Vjb25kXCI7XG5cbiAgICAgICAgY2FzZSBcIm1cIjpcbiAgICAgICAgICByZXR1cm4gXCJtaW51dGVcIjtcblxuICAgICAgICBjYXNlIFwiaFwiOlxuICAgICAgICAgIHJldHVybiBcImhvdXJcIjtcblxuICAgICAgICBjYXNlIFwiZFwiOlxuICAgICAgICAgIHJldHVybiBcImRheVwiO1xuXG4gICAgICAgIGNhc2UgXCJNXCI6XG4gICAgICAgICAgcmV0dXJuIFwibW9udGhcIjtcblxuICAgICAgICBjYXNlIFwieVwiOlxuICAgICAgICAgIHJldHVybiBcInllYXJcIjtcblxuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgIH0sXG4gICAgICAgIHRva2VuVG9TdHJpbmcgPSBmdW5jdGlvbiB0b2tlblRvU3RyaW5nKGxpbGR1cikge1xuICAgICAgcmV0dXJuIGZ1bmN0aW9uICh0b2tlbikge1xuICAgICAgICB2YXIgbWFwcGVkID0gdG9rZW5Ub0ZpZWxkKHRva2VuKTtcblxuICAgICAgICBpZiAobWFwcGVkKSB7XG4gICAgICAgICAgcmV0dXJuIF90aGlzMi5udW0obGlsZHVyLmdldChtYXBwZWQpLCB0b2tlbi5sZW5ndGgpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldHVybiB0b2tlbjtcbiAgICAgICAgfVxuICAgICAgfTtcbiAgICB9LFxuICAgICAgICB0b2tlbnMgPSBGb3JtYXR0ZXIucGFyc2VGb3JtYXQoZm10KSxcbiAgICAgICAgcmVhbFRva2VucyA9IHRva2Vucy5yZWR1Y2UoZnVuY3Rpb24gKGZvdW5kLCBfcmVmMikge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kludmFsaWQpIHtcbiAgICAgIHRocm93IG5ldyBJbnZhbGlkRHVyYXRpb25FcnJvcihpbnZhbGlkKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIG5ldyBEdXJhdGlvbih7XG4gICAgICAgIGludmFsaWQ6IGludmFsaWRcbiAgICAgIH0pO1xuICAgIH1cbiAgfTtcbiAgLyoqXHJcbiAgICogQHByaXZhdGVcclxuICAgKi9cblxuXG4gIER1cmF0aW9uLm5vcm1hbGl6ZVVuaXQgPSBmdW5jdGlvbiBub3JtYWxpemVVbml0KHVuaXQsIGlnbm9yZVVua25vd24pIHtcbiAgICBpZiAoaWdub3JlVW5rbm93biA9PT0gdm9pZCAwKSB7XG4gICAgICBpZ25vcmVVbmtub3duID0gZmFsc2U7XG4gICAgfVxuXG4gICAgdmFyIG5vcm1hbGl6ZWQgPSB7XG4gICAgICB5ZWFyOiBcInllYXJzXCIsXG4gICAgICB5ZWFyczogXCJ5ZWFyc1wiLFxuICAgICAgcXVhcnRlcjogXCJxdWFydGVyc1wiLFxuICAgICAgcXVhcnRlcnM6IFwicXVhcnRlcnNcIixcbiAgICAgIG1vbnRoOiBcIm1vbnRoc1wiLFxuICAgICAgbW9udGhzOiBcIm1vbnRoc1wiLFxuICAgICAgd2VlazogXCJ3ZWVrc1wiLFxuICAgICAgd2Vla3M6IFwid2Vla3NcIixcbiAgICAgIGRheTogXCJkYXlzXCIsXG4gICAgICBkYXlzOiBcImRheXNcIixcbiAgICAgIGhvdXI6IFwiaG91cnNcIixcbiAgICAgIGhvdXJzOiBcImhvdXJzXCIsXG4gICAgICBtaW51dGU6IFwibWludXRlc1wiLFxuICAgICAgbWludXRlczogXCJtaW51dGVzXCIsXG4gICAgICBzZWNvbmQ6IFwic2Vjb25kc1wiLFxuICAgICAgc2Vjb25kczogXCJzZWNvbmRzXCIsXG4gICAgICBtaWxsaXNlY29uZDogXCJtaWxsaXNlY29uZHNcIixcbiAgICAgIG1pbGxpc2Vjb25kczogXCJt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IGFjY3VtdWxhdGVkKSB7XG4gICAgICAgICAgaWYgKGFjY3VtdWxhdGVkLmhhc093blByb3BlcnR5KGFrKSkge1xuICAgICAgICAgICAgb3duICs9IHRoaXMubWF0cml4W2FrXVtrXSAqIGFjY3VtdWxhdGVkW2FrXTtcbiAgICAgICAgICAgIGFjY3VtdWxhdGVkW2FrXSA9IDA7XG4gICAgICAgICAgfVxuICAgICAgICB9IC8vIHBsdXMgYW55dGhpbmcgdGhhdCdzIGFscmVhZHkgaW4gdGhpcyB1bml0XG5cblxuICAgICAgICBpZiAoaXNOdW1iZXIodmFsc1trXSkpIHtcbiAgICAgICAgICBvd24gKz0gdmFsc1trXTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBpID0gTWF0aC50cnVuYyhvd24pO1xuICAgICAgICBidWlsdFtrXSA9IGk7XG4gICAgICAgIGFjY3VtdWxhdGVkW2tdID0gb3duIC0gaTsgLy8gd2UnZCBsaWtlIHRvIGFic29yYiB0aGVzZSBmcmFjdGlvbnMgaW4gYW5vdGhlciB1bml0XG4gICAgICAgIC8vIHBsdXMgYW55dGhpbmcgZnVydGhlciBkb3duIHRoZSBjaGFpbiB0aGF0IHNob3VsZCBiZSByb2xsZWQgdXAgaW4gdG8gdGhpc1xuXG4gICAgICAgIGZvciAodmFyIGRvd24gaW4gdmFscykge1xuICAgICAgICAgIGlmIChvcmRlcmVkVW5pdHMuaW5kZXhPZihkb3duKSA+IG9yZGVyZWRVbml0cy5pbmRleE9mKGspKSB7XG4gICAgICAgICAgICBjb252ZXJ0KHRoaXMubWF0cml4LCB2YWxzLCBkb3duLCBidWlsdCwgayk7XG4gICAgICAgICAgfVxuICAgICAgICB9IC8vIG90aGVyd2lzZSwga2VlcCBpdCBpbiB0aGUgd2luZ3MgdG8gYm9pbCBpdCBsYXRlclxuXG4gICAgICB9IGVsc2UgaWYgKGlzTnVtYmVyKHZhbHNba10pKSB7XG4gICAgICAgIGFjY3VtdWxhdGVkW2tdID0gdmFsc1trXT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yA9IGludGVydmFscy5tYXAoZnVuY3Rpb24gKGkpIHtcbiAgICAgIHJldHVybiBbe1xuICAgICAgICB0aW1lOiBpLnMsXG4gICAgICAgIHR5cGU6IFwic1wiXG4gICAgICB9LCB7XG4gICAgICAgIHRpbWU6IGkuZSxcbiAgICAgICAgdHlwZTogXCJlXCJcbiAgICAgIH1dO1xuICAgIH0pLFxuICAgICAgICBmbGF0dGVuZWQgPSAoX0FycmF5JHByb3RvdHlwZSA9IEFycmF5LnByb3RvdHlwZSkuY29uY2F0LmFwcGx5KF9BcnJheSRwcm90b3R5cGUsIGVuZHMpLFxuICAgICAgICBhcnIgPSBmbGF0dGVuZWQuc29ydChmdW5jdGlvbiAoYSwgYikge1xuICAgICAgcmV0dXJuIGEudGltZSAtIGIudGltZTtcbiAgICB9KTtcblxuICAgIGZvciAodmFyIF9pdGVyYXRvciA9IGFyciwgX2lzQXJyYXkgPSBBcnJheS5pc0FycmF5KF9pdGVyYXRvciksIF9pID0gMCwgX2l0ZXJhdG9yID0gX2lzQXJyYXkgPyBfaXRlcmF0b3IgOiBfaXRlcmF0b3JbU3ltYm9sLml0ZXJhdG9yXSgpOzspIHtcbiAgICAgIHZhciBfcmVmMztcblxuICAgICAgaWYgKF9pc0FycmF5KSB7XG4gICAgICAgIGlmIChfaSA+PSBfaXRlcmF0b3IubGVuZ3RoKSBicmVhaztcbiAgICAgICAgX3JlZjMgPSBfaXRlcmF0b3JbX2krK107XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBfaSA9IF9pdGVyYXRvci5uZXh0KCk7XG4gICAgICAgIGlmIChfaS5kb25lKSBicmVhaztcbiAgICAgICAgX3JlZjMgPSBfaS52YWx1ZTtcbiAgICAgIH1cblxuICAgICAgdmFyIGkgPSBfcmVmMztcbiAgICAgIGN1cnJlbnRDb3VudCArPSBpLnR5cGUgPT09IFwic1wiID8gMSA6IC0xO1xuXG4gICAgICBpZiAoY3VycmVudENvdW50ID09PSAxKSB7XG4gICAgICAgIHN0YX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vLyBkYXRlc1xuXG4gICAgICBjYXNlIFwiZFwiOlxuICAgICAgICByZXR1cm4gaW50VW5pdChvbmVPclR3byk7XG5cbiAgICAgIGNhc2UgXCJkZFwiOlxuICAgICAgICByZXR1cm4gaW50VW5pdCh0d28pO1xuICAgICAgLy8gb3JkaW5hbHNcblxuICAgICAgY2FzZSBcIm9cIjpcbiAgICAgICAgcmV0dXJuIGludFVuaXQob25lVG9UaHJlZSk7XG5cbiAgICAgIGNhc2UgXCJvb29cIjpcbiAgICAgICAgcmV0dXJuIGludFVuaXQodGhyZWUpO1xuICAgICAgLy8gdGltZVxuXG4gICAgICBjYXNlIFwiSEhcIjpcbiAgICAgICAgcmV0dXJuIGludFVuaXQodHdvKTtcblxuICAgICAgY2FzZSBcIkhcIjpcbiAgICAgICAgcmV0dXJuIGludFVuaXQob25lT3JUd28pO1xuXG4gICAgICBjYXNlIFwiaGhcIjpcbiAgICAgICAgcmV0dXJuIGludFVuaXQodHdvKTtcblxuICAgICAgY2FzZSBcImhcIjpcbiAgICAgICAgcmV0dXJuIGludFVuaXQob25lT3JUd28pO1xuXG4gICAgICBjYXNlIFwibW1cIjpcbiAgICAgICAgcmV0dXJuIGludFVuaXQodHdvKTtcblxuICAgICAgY2FzZSBcIm1cIjpcbiAgICAgICAgcmV0dXJuIGludFVuaXQob25lT3JUd28pO1xuXG4gICAgICBjYXNlIFwic1wiOlxuICAgICAgICByZXR1cm4gaW50VW5pdChvbmVPclR3byk7XG5cbiAgICAgIGNhc2UgXCJzc1wiOlxuICAgICAgICByZXR1cm4gaW50VW5pdCh0d28pO1xuXG4gICAgICBjYXNlIFwiU1wiOlxuICAgICAgICByZXR1cm4gaW50VW5pdChvbmVUb1RocmVlKTtcblxuICAgICAgY2FzZSBcIlNTU1wiOlxuICAgICAgICByZXR1cm4gaW50VW5pdCh0aHJlZSk7XG5cbiAgICAgIGNhc2UgXCJ1XCI6XG4gICAgICAgIHJldHVybiBzaW1wbGUoL1xcZHsxLDl9Lyk7XG4gICAgICAvLyBtZXJpZGllbVxuXG4gICAgICBjYXNlIFwiYVwiOlxuICAgICAgICByZXR1cm4gb25lT2YobG9jLm1lcmlkaWVtcygpLCAwKTtcbiAgICAgIC8vIHdlZWtZZWFyIChrKVxuXG4gICAgICBjYXNlIFwia2tra1wiOlxuICAgICAgICByZXR1cm4gaW50VW5pdChmb3VyKTtcblxuICAgICAgY2FzZSBcImtrXCI6XG4gICAgICAgIHJldHVybiBpbnRVbml0KHR3b1RvRm91ciwgdW50cnVuY2F0ZVllYXIpO1xuICAgICAgLy8gd2Vla051bWJlciAoVylcblxuICAgICAgY2FzZSBcIldcIjpcbiAgICAgICAgcmV0dXJuIGludFVuaXQob25lT3JUd28pO1xuXG4gICAgICBjYXNlIFwiV1dcIjpcbiAgICAgICAgcmV0dXJuIGludFVuaXQodHdvKTtcbiAgICAgIC8vIHdlZWtkYXlzXG5cbiAgICAgIGNhc2UgXCJFXCI6XG4gICAgICBjYXNlIFwiY1wiOlxuICAgICAgICByZXR1cm4gaW50VW5pdChvbmUpO1xuXG4gICAgICBjYXNlIFwiRUVFXCI6XG4gICAgICAgIHJldHVybiBvbmVPZihsb2Mud2Vla2RheXMoXCJzaG9ydFwiLCBmYWxzZSwgZmFsc2UpLCAxKTtcblxuICAgICAgY2FzZSBcIkVFRUVcIjpcbiAgICAgICAgcmV0dXJuIG9uZU9mKGxvYy53ZWVrZGF5cyhcImxvbmdcIiwgZmFsc2UsIGZhbHNlKSwgMSk7XG5cbiAgICAgIGNhc2UgXCJjY2NcIjpcbiAgICAgICAgcmV0dXJuIG9uZU9mKGxvYy53ZWVrZGF5cyhcInNob3J0XCIsIHRydWUsIGZhbHNlKSwgMSk7XG5cbiAgICAgIGNhc2UgXCJjY2NjXCI6XG4gICAgICAgIHJldHVybiBvbmVPZihsb2Mud2Vla2RheXMoXCJsb25nXCIsIHRydWUsIGZhbHNlKSwgMSk7XG4gICAgICAvLyBvZmZzZXQvem9uZVxuXG4gICAgICBjYXNlIFw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2FtZSBhcyBgdG9Mb2NhbGVTdHJpbmdgLlxyXG4gICAqIEBleGFtcGxlIERhdGVUaW1lLmxvY2FsKCkudG9Mb2NhbGVTdHJpbmcoKTsgLy89PiBbXHJcbiAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLz0+ICAgeyB0eXBlOiAnZGF5JywgdmFsdWU6ICcyNScgfSxcclxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vPT4gICB7IHR5cGU6ICdsaXRlcmFsJywgdmFsdWU6ICcvJyB9LFxyXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy89PiAgIHsgdHlwZTogJ21vbnRoJywgdmFsdWU6ICcwNScgfSxcclxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vPT4gICB7IHR5cGU6ICdsaXRlcmFsJywgdmFsdWU6ICcvJyB9LFxyXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy89PiAgIHsgdHlwZTogJ3llYXInLCB2YWx1ZTogJzE5ODInIH1cclxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vPT4gXVxyXG4gICAqL1xuXG5cbiAgX3Byb3RvLnRvTG9jYWxlUGFydHMgPSBmdW5jdGlvbiB0b0xvY2FsZVBhcnRzKG9wdHMpIHtcbiAgICBpZiAob3B0cyA9PT0gdm9pZCAwKSB7XG4gICAgICBvcHRzID0ge307XG4gICAgfVxuXG4gICAgcmV0dXJuIHRoaXMuaXNWYWxpZCA/IEZvcm1hdHRlci5jcmVhdGUodGhpcy5sb2MuY2xvbmUob3B0cyksIG9wdHMpLmZvcm1hdERhdGVUaW1lUGFydHModGhpcykgOiBbXTtcbiAgfTtcbiAgLyoqXHJcbiAgICogUmV0dXJucyBhbiBJU08gODYwMS1jb21wbGlhbnQgc3RyaW5nIHJlcHJlc2VudGF0aW9uIG9mIHRoaXMgRGF0ZVR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9IExvY2FsWm9uZTtcbmV4cG9ydHMuU2V0dGluZ3MgPSBTZXR0aW5ncztcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWx1eG9uLmpzLm1hcFxuIl19
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fleetio_spark
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-09 00:00:00.000000000 Z
11
+ date: 2019-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 4.6.3
47
+ version: 4.6.4
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 4.6.3
54
+ version: 4.6.4
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: slim-rails
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -115,6 +115,7 @@ files:
115
115
  - app/assets/javascripts/spark/spark.js
116
116
  - app/assets/stylesheets/spark/_icons.scss
117
117
  - app/assets/stylesheets/spark/_index.scss
118
+ - app/assets/stylesheets/spark/components/_dropdown.scss
118
119
  - app/assets/stylesheets/spark/components/_index.scss
119
120
  - app/assets/stylesheets/spark/components/_modal.scss
120
121
  - app/assets/stylesheets/spark/components/_nav-menu.scss
@@ -141,12 +142,14 @@ files:
141
142
  - app/assets/stylesheets/spark/spark.scss
142
143
  - app/assets/svgs/spark/add.svg
143
144
  - app/assets/svgs/spark/admin-user.svg
145
+ - app/assets/svgs/spark/alert-triangle.svg
144
146
  - app/assets/svgs/spark/chevron-down.svg
145
147
  - app/assets/svgs/spark/chevron-up.svg
146
148
  - app/assets/svgs/spark/close.svg
147
149
  - app/assets/svgs/spark/contact.svg
148
150
  - app/assets/svgs/spark/dashboard.svg
149
151
  - app/assets/svgs/spark/fuel.svg
152
+ - app/assets/svgs/spark/indicator-dot.svg
150
153
  - app/assets/svgs/spark/inspection.svg
151
154
  - app/assets/svgs/spark/issue.svg
152
155
  - app/assets/svgs/spark/leaderboard.svg
@@ -170,6 +173,7 @@ files:
170
173
  - app/helpers/spark/menu_helper.rb
171
174
  - app/helpers/spark/modal_helper.rb
172
175
  - app/helpers/spark/nav_menu_helper.rb
176
+ - app/helpers/spark/search_helper.rb
173
177
  - app/helpers/spark/tag_helper.rb
174
178
  - app/helpers/spark/trial_helper.rb
175
179
  - app/views/layouts/spark/application.html.slim
@@ -180,10 +184,10 @@ files:
180
184
  - lib/fleetio_spark.rb
181
185
  - lib/fleetio_spark/helper.rb
182
186
  - lib/fleetio_spark/version.rb
183
- - public/spark-0.1.3.css
184
- - public/spark-0.1.3.css.gz
185
- - public/spark-0.1.3.js
186
- - public/spark-0.1.3.js.gz
187
+ - public/spark-0.1.4.css
188
+ - public/spark-0.1.4.css.gz
189
+ - public/spark-0.1.4.js
190
+ - public/spark-0.1.4.js.gz
187
191
  homepage:
188
192
  licenses:
189
193
  - MIT
Binary file
Binary file