diff --git a/app/asset/lib/style.css b/app/asset/css/style.css similarity index 99% rename from app/asset/lib/style.css rename to app/asset/css/style.css index 997ef0fa..e89ebf1f 100644 --- a/app/asset/lib/style.css +++ b/app/asset/css/style.css @@ -1,5 +1,5 @@ :root{--light:#edf2f9;--dark:#2d4058;--darker:#253243;--color-primary:var(--color-cyan);--color-primary-50:var(--color-cyan-50);--color-primary-100:var(--color-cyan-100);--color-primary-light:var(--color-cyan-light);--color-primary-lighter:var(--color-cyan-lighter);--color-primary-dark:var(--color-cyan-dark);--color-primary-darker:var(--color-cyan-darker);--color-green:#16a34a;--color-green-50:#f0fdf4;--color-green-100:#dcfce7;--color-green-light:#22c55e;--color-green-lighter:#4ade80;--color-green-dark:#15803d;--color-green-darker:#166534;--color-blue:#2563eb;--color-blue-50:#eff6ff;--color-blue-100:#dbeafe;--color-blue-light:#3b82f6;--color-blue-lighter:#60a5fa;--color-blue-dark:#1d4ed8;--color-blue-darker:#1e40af;--color-cyan:#0891b2;--color-cyan-50:#ecfeff;--color-cyan-100:#cffafe;--color-cyan-light:#06b6d4;--color-cyan-lighter:#22d3ee;--color-cyan-dark:#0e7490;--color-cyan-darker:#155e75;--color-red:#b91c1c;--color-red-50:#fdf4ff;--color-red-100:#fee2e2;--color-red-light:#f87171;--color-red-lighter:#dc2626;--color-red-dark:#dc2626;--color-red-darker:#991b1b;--color-violet:#7c3aed;--color-violet-50:#f5f3ff;--color-violet-100:#ede9fe;--color-violet-light:#8b5cf6;--color-violet-lighter:#a78bfa;--color-violet-dark:#6d28d9;--color-violet-darker:#5b21b6; -/* -------------------- -------------------- SCROLLBAR FIREFOX */ +/* -------------------- SCROLLBAR FIREFOX */ scrollbar-color: var(--color-primary) transparent; /* thumb-color track-color */ scrollbar-width: thin; } @@ -7,7 +7,7 @@ ::-moz-selection{background-color:transparent;color:var(--color-primary)} ::selection{background-color:transparent;color:var(--color-primary)} -/* -------------------- -------------------- BROWSER SPECS */ +/* -------------------- BROWSER SPECS */ /* Text Selection */ ::selection { background-color: var(--color-primary-100); @@ -42,7 +42,8 @@ main{min-height: 0;height: 100%;} footer{margin-top: auto;} h1,h2,h3,h4,h5,h6 {font-weight: 600;} h5,h6 {font-weight: 200;text-transform: uppercase;} -.updir { +a.download{cursor: pointer;} +.icon-updir { display: inline-block; width: 1em; height: 1em; @@ -55,7 +56,7 @@ mask-repeat: no-repeat; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; } -.download { +.icon-download { display: inline-block; width: 1em; height: 1em; @@ -68,7 +69,7 @@ mask-repeat: no-repeat; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; } - +.logo>img {border-radius: 12px;} /*! tailwindcss v2.2.7 | MIT License | https://tailwindcss.com*/ /*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */html{-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}legend{padding:0}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:initial;background-image:none}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:"Nunito",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{font-family:inherit;line-height:inherit}*,:after,:before{box-sizing:border-box;border:0 solid}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity));--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}.toggle:checked+span{top:0;left:1.5rem;background-color:var(--color-primary)}.toggle:disabled+span{--tw-bg-opacity:1;background-color:rgba(107,114,128,var(--tw-bg-opacity));--tw-shadow:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.toggle:checked:disabled{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.toggle:checked:disabled+span{background-color:var(--color-primary-lighter);--tw-shadow:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.toggle:focus+span{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:var(--color-primary-lighter)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-4{left:1rem;right:1rem}.inset-y-0{top:0;bottom:0}.top-0{top:0}.left-0{left:0}.right-0{right:0}.top-12{top:3rem}.top-16{top:4rem}.left-1\/2{left:50%}.bottom-5{bottom:1.25rem}.left-5{left:1.25rem}.bottom-full{bottom:100%}.top-5{top:1.25rem}.right-10{right:2.5rem}.right-5{right:1.25rem}.z-50{z-index:50}.z-10{z-index:10}.z-20{z-index:20}.col-span-2{grid-column:span 2/span 2}.col-span-1{grid-column:span 1/span 1}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mr-2{margin-right:.5rem}.m-3{margin:0 .75rem}.-mt-3{margin-top:-.75rem}.-ml-px{margin-left:-1px}.mb-6{margin-bottom:1.5rem}.ml-3{margin-left:.75rem}.mb-4{margin-bottom:1rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-screen{height:100vh}.h-full{height:100%}.h-5{height:1.25rem}.h-4{height:1rem}.h-8{height:2rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-72{height:18rem}.h-24{height:6rem}.h-9{height:2.25rem}.h-px{height:1px}.h-20{height:5rem}.min-h-screen{min-height:100vh}.w-64{width:16rem}.w-5{width:1.25rem}.w-4{width:1rem}.w-full{width:100%}.w-8{width:2rem}.w-12{width:3rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-10{width:2.5rem}.w-48{width:12rem}.w-9{width:2.25rem}.w-20{width:5rem}.w-80{width:20rem}.w-16{width:4rem}.w-56{width:14rem}.min-w-max{min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.max-w-xs{max-width:18rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.origin-top-right{transform-origin:top right}.translate-x-0{--tw-translate-x:0px;transform:var(--tw-transform)}.-translate-y-px{--tw-translate-y:-1px;transform:var(--tw-transform)}.translate-x-6{--tw-translate-x:1.5rem;transform:var(--tw-transform)}.translate-y-1\/2{--tw-translate-y:50%;transform:var(--tw-transform)}.translate-y-0{--tw-translate-y:0px;transform:var(--tw-transform)}.-translate-y-full{--tw-translate-y:-100%;transform:var(--tw-transform)}.translate-x-full{--tw-translate-x:100%;transform:var(--tw-transform)}.-translate-x-full{--tw-translate-x:-100%;transform:var(--tw-transform)}.translate-y-px{--tw-translate-y:1px;transform:var(--tw-transform)}.-translate-y-1\/2{--tw-translate-y:-50%;transform:var(--tw-transform)}.rotate-180{--tw-rotate:180deg}.rotate-180,.scale-110{transform:var(--tw-transform)}.scale-110{--tw-scale-x:1.1;--tw-scale-y:1.1}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.scale-150,.transform{transform:var(--tw-transform)}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-8{gap:2rem}.gap-4{gap:1rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2rem*var(--tw-space-x-reverse));margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.25rem*var(--tw-space-x-reverse));margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem*var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.rounded-md{border-radius:.375rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.border{border-width:1px}.border-r{border-right-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-gray-900{--tw-border-opacity:1;border-color:rgba(17,24,39,var(--tw-border-opacity))}.border-primary-dark{border-color:var(--color-primary-dark)}.border-transparent{border-color:transparent}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.bg-primary-darker{background-color:var(--color-primary-darker)}.bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-primary-100{background-color:var(--color-primary-100)}.bg-primary{background-color:var(--color-primary)}.bg-primary-50{background-color:var(--color-primary-50)}.bg-green-100{--tw-bg-opacity:1;background-color:rgba(209,250,229,var(--tw-bg-opacity))}.bg-primary-light{background-color:var(--color-primary-light)}.bg-gray-200{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgba(209,213,219,var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-1{padding:.25rem}.p-4{padding:1rem}.p-px{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-px{padding-top:1px;padding-bottom:1px}.py-8{padding-top:2rem;padding-bottom:2rem}.px-px{padding-left:1px;padding-right:1px}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pt-4{padding-top:1rem}.pb-4{padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pr-10{padding-right:2.5rem}.pl-4{padding-left:1rem}.pr-4{padding-right:1rem}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-xl{font-size:1.25rem}.text-lg,.text-xl{line-height:1.75rem}.text-lg{font-size:1.125rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-9xl{font-size:8rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.font-semibold{font-weight:600}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.tracking-wider{letter-spacing:.05em}.text-gray-900{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}.text-primary-lighter{color:var(--color-primary-lighter)}.text-primary-dark{color:var(--color-primary-dark)}.text-primary-100{color:var(--color-primary-100)}.text-green-500{--tw-text-opacity:1;color:rgba(16,185,129,var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgba(59,130,246,var(--tw-text-opacity))}.text-primary-light{color:var(--color-primary-light)}.text-gray-600{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgba(37,99,235,var(--tw-text-opacity))}.text-dark{color:var(--dark)}.text-danger-light{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity))}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,0.05)}.shadow-lg,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,0.1),0 10px 10px -5px rgba(0,0,0,0.04)}.shadow-md,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -1px rgba(0,0,0,0.06)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,0.06)}.shadow,.shadow-inner{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px 0 rgba(0,0,0,0.06)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgba(0,0,0,var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity:0.05}.transition-colors{transition-property:background-color,border-color,color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition{transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-150{transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.checked\:bg-primary-light:checked{background-color:var(--color-primary-light)}.focus-within\:text-gray-700:focus-within{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.hover\:overflow-y-auto:hover{overflow-y:auto}.hover\:border-gray-900:hover{--tw-border-opacity:1;border-color:rgba(17,24,39,var(--tw-border-opacity))}.hover\:bg-primary-100:hover{background-color:var(--color-primary-100)}.hover\:bg-primary-dark:hover{background-color:var(--color-primary-dark)}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.hover\:bg-primary-darker:hover{background-color:var(--color-primary-darker)}.hover\:bg-opacity-80:hover{--tw-bg-opacity:0.8}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.hover\:text-primary:hover{color:var(--color-primary)}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.hover\:underline:hover{text-decoration:underline}.focus\:bg-primary-100:focus{background-color:var(--color-primary-100)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-2:focus,.focus\:ring:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-primary-dark:focus{--tw-ring-color:var(--color-primary-dark)}.focus\:ring-primary-darker:focus{--tw-ring-color:var(--color-primary-darker)}.focus\:ring-primary:focus{--tw-ring-color:var(--color-primary)}.focus\:ring-primary-lighter:focus{--tw-ring-color:var(--color-primary-lighter)}.focus\:ring-primary-100:focus{--tw-ring-color:var(--color-primary-100)}.focus\:ring-black:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(0,0,0,var(--tw-ring-opacity))}.focus\:ring-primary-light:focus{--tw-ring-color:var(--color-primary-light)}.focus\:ring-offset-1:focus{--tw-ring-offset-width:1px}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus\:ring-offset-white:focus{--tw-ring-offset-color:#fff}.disabled\:bg-gray-200:disabled{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.group:hover .group-hover\:text-gray-900{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.dark .dark\:border-primary-darker{border-color:var(--color-primary-darker)}.dark .dark\:border-primary{border-color:var(--color-primary)}.dark .dark\:border-primary-dark{border-color:var(--color-primary-dark)}.dark .dark\:border-primary-light{border-color:var(--color-primary-light)}.dark .dark\:border-transparent{border-color:transparent}.dark .dark\:border-gray-700{--tw-border-opacity:1;border-color:rgba(55,65,81,var(--tw-border-opacity))}.dark .dark\:bg-dark{background-color:var(--dark)}.dark .dark\:bg-darker{background-color:var(--darker)}.dark .dark\:bg-primary{background-color:var(--color-primary)}.dark .dark\:bg-primary-lighter{background-color:var(--color-primary-lighter)}.dark .dark\:bg-primary-darker{background-color:var(--color-primary-darker)}.dark .dark\:bg-primary-100{background-color:var(--color-primary-100)}.dark .dark\:bg-primary-dark{background-color:var(--color-primary-dark)}.dark .dark\:text-light{color:var(--light)}.dark .dark\:text-gray-400{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}.dark .dark\:text-primary-light{color:var(--color-primary-light)}.dark .dark\:text-primary-dark{color:var(--color-primary-dark)}.dark .dark\:text-primary{color:var(--color-primary)}.dark .dark\:text-primary-100{color:var(--color-primary-100)}.dark .dark\:text-primary-lighter{color:var(--color-primary-lighter)}.dark .dark\:text-danger{--tw-text-opacity:1;color:rgba(220,38,38,var(--tw-text-opacity))}.dark .dark\:text-gray-300{--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}.dark .dark\:text-blue-500{--tw-text-opacity:1;color:rgba(59,130,246,var(--tw-text-opacity))}.dark .dark\:opacity-75{opacity:.75}.dark .dark\:opacity-70{opacity:.7}.dark .dark\:focus-within\:text-light:focus-within{color:var(--light)}.dark .dark\:hover\:border-primary-light:hover{border-color:var(--color-primary-light)}.dark .dark\:hover\:bg-primary:hover{background-color:var(--color-primary)}.dark .dark\:hover\:bg-primary-dark:hover{background-color:var(--color-primary-dark)}.dark .dark\:hover\:bg-primary-darker:hover{background-color:var(--color-primary-darker)}.dark .dark\:hover\:text-light:hover{color:var(--light)}.dark .dark\:hover\:text-primary-100:hover{color:var(--color-primary-100)}.dark .dark\:hover\:opacity-100:hover{opacity:1}.dark .dark\:focus\:bg-primary-dark:focus{background-color:var(--color-primary-dark)}.dark .dark\:focus\:opacity-100:focus{opacity:1}.dark .dark\:focus\:ring-primary-dark:focus{--tw-ring-color:var(--color-primary-dark)}.dark .dark\:focus\:ring-primary-darker:focus{--tw-ring-color:var(--color-primary-darker)}.dark .dark\:focus\:ring-offset-dark:focus{--tw-ring-offset-color:var(--dark)}.dark .dark\:focus\:ring-offset-darker:focus{--tw-ring-offset-color:var(--darker)}.dark .group:hover .dark\:group-hover\:text-primary-lighter{color:var(--color-primary-lighter)}@media (min-width:640px){.sm\:max-w-md{max-width:20rem}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.sm\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem*var(--tw-space-x-reverse));margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)))}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:duration-500{transition-duration:.5s}}@media (min-width:768px){.md\:static{position:static}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:items-center{align-items:center}.md\:space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0px*var(--tw-space-x-reverse));margin-left:calc(0px*(1 - var(--tw-space-x-reverse)))}.md\:p-8{padding:2rem}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width:1024px){.lg\:static{position:static}.lg\:hidden{display:none}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:gap-8{gap:2rem}.lg\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.lg\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}}@media (min-width:1280px){.xl\:sticky{position:sticky}.xl\:z-0{z-index:0}.xl\:hidden{display:none}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:border-l{border-left-width:1px}}@media (min-width:1536px){.\32xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}} \ No newline at end of file diff --git a/app/asset/img/codemo-logo.png b/app/asset/img/codemo-logo.png new file mode 100644 index 00000000..607bcb52 Binary files /dev/null and b/app/asset/img/codemo-logo.png differ diff --git a/app/asset/lib/lib.module.js b/app/asset/lib/lib.module.js index 333f45fa..297f3caf 100644 --- a/app/asset/lib/lib.module.js +++ b/app/asset/lib/lib.module.js @@ -3,3 +3,10 @@ import * as FileSaver from "./filesaver.js"; import * as JSZip from "./jszip.min.js"; import * as api from "./api.js"; + +window.notificationOptions = { + wrapperId: 'notificationWrapper', + templateFile: 'https://gigamaster.github.io/codemo/asset/notification.html', + autoClose: 3000, + autoRemove: 4000, + } \ No newline at end of file diff --git a/app/asset/notification.html b/app/asset/notification.html new file mode 100644 index 00000000..c2a407e3 --- /dev/null +++ b/app/asset/notification.html @@ -0,0 +1,95 @@ + + \ No newline at end of file diff --git a/app/style.css b/app/style.css deleted file mode 100644 index 997ef0fa..00000000 --- a/app/style.css +++ /dev/null @@ -1,74 +0,0 @@ -:root{--light:#edf2f9;--dark:#2d4058;--darker:#253243;--color-primary:var(--color-cyan);--color-primary-50:var(--color-cyan-50);--color-primary-100:var(--color-cyan-100);--color-primary-light:var(--color-cyan-light);--color-primary-lighter:var(--color-cyan-lighter);--color-primary-dark:var(--color-cyan-dark);--color-primary-darker:var(--color-cyan-darker);--color-green:#16a34a;--color-green-50:#f0fdf4;--color-green-100:#dcfce7;--color-green-light:#22c55e;--color-green-lighter:#4ade80;--color-green-dark:#15803d;--color-green-darker:#166534;--color-blue:#2563eb;--color-blue-50:#eff6ff;--color-blue-100:#dbeafe;--color-blue-light:#3b82f6;--color-blue-lighter:#60a5fa;--color-blue-dark:#1d4ed8;--color-blue-darker:#1e40af;--color-cyan:#0891b2;--color-cyan-50:#ecfeff;--color-cyan-100:#cffafe;--color-cyan-light:#06b6d4;--color-cyan-lighter:#22d3ee;--color-cyan-dark:#0e7490;--color-cyan-darker:#155e75;--color-red:#b91c1c;--color-red-50:#fdf4ff;--color-red-100:#fee2e2;--color-red-light:#f87171;--color-red-lighter:#dc2626;--color-red-dark:#dc2626;--color-red-darker:#991b1b;--color-violet:#7c3aed;--color-violet-50:#f5f3ff;--color-violet-100:#ede9fe;--color-violet-light:#8b5cf6;--color-violet-lighter:#a78bfa;--color-violet-dark:#6d28d9;--color-violet-darker:#5b21b6; -/* -------------------- -------------------- SCROLLBAR FIREFOX */ - scrollbar-color: var(--color-primary) transparent; /* thumb-color track-color */ - scrollbar-width: thin; -} -/* -------------------- TEXT SELECTION */ -::-moz-selection{background-color:transparent;color:var(--color-primary)} -::selection{background-color:transparent;color:var(--color-primary)} - -/* -------------------- -------------------- BROWSER SPECS */ -/* Text Selection */ -::selection { - background-color: var(--color-primary-100); - color : var(--color-primary-dark); -} -* {scrollbar-width: thin;} -/* Webkit Scrollbar */ -* ::-webkit-scrollbar { - width : 9px; - height : 9px; -} -::-webkit-scrollbar-thumb { - background : var(--color-primary-dark); -} -::-webkit-scrollbar-thumb:hover { - background : var(--color-primary-lighter, rgb(14, 20, 24)); -} -::-webkit-scrollbar-track { - background-color: transparent; -} -/* Font - : Use a unique and descriptive class name - : Use a value from 200 to 1000 */ -.nunito { -font-family: "Nunito", sans-serif; -font-optical-sizing: auto; -font-weight: 400; -font-style: normal; -} -nav[aria-label="main"] {scrollbar-gutter: stable both-edges;} -main{min-height: 0;height: 100%;} -footer{margin-top: auto;} -h1,h2,h3,h4,h5,h6 {font-weight: 600;} -h5,h6 {font-weight: 200;text-transform: uppercase;} -.updir { -display: inline-block; -width: 1em; -height: 1em; ---svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23000' d='M19 9v7h-3v-6H6v3L1 8.5L6 4v3h11c1.104 0 2 .897 2 2'/%3E%3C/svg%3E"); -background-color: currentColor; --webkit-mask-image: var(--svg); -mask-image: var(--svg); --webkit-mask-repeat: no-repeat; -mask-repeat: no-repeat; --webkit-mask-size: 100% 100%; -mask-size: 100% 100%; -} -.download { -display: inline-block; -width: 1em; -height: 1em; ---svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23000' d='M13 8V2H7v6H2l8 8l8-8zM0 18h20v2H0z'/%3E%3C/svg%3E"); -background-color: currentColor; --webkit-mask-image: var(--svg); -mask-image: var(--svg); --webkit-mask-repeat: no-repeat; -mask-repeat: no-repeat; --webkit-mask-size: 100% 100%; -mask-size: 100% 100%; -} - -/*! tailwindcss v2.2.7 | MIT License | https://tailwindcss.com*/ - -/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */html{-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}legend{padding:0}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:initial;background-image:none}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:"Nunito",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{font-family:inherit;line-height:inherit}*,:after,:before{box-sizing:border-box;border:0 solid}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity));--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000}.toggle:checked+span{top:0;left:1.5rem;background-color:var(--color-primary)}.toggle:disabled+span{--tw-bg-opacity:1;background-color:rgba(107,114,128,var(--tw-bg-opacity));--tw-shadow:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.toggle:checked:disabled{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.toggle:checked:disabled+span{background-color:var(--color-primary-lighter);--tw-shadow:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.toggle:focus+span{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:var(--color-primary-lighter)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-4{left:1rem;right:1rem}.inset-y-0{top:0;bottom:0}.top-0{top:0}.left-0{left:0}.right-0{right:0}.top-12{top:3rem}.top-16{top:4rem}.left-1\/2{left:50%}.bottom-5{bottom:1.25rem}.left-5{left:1.25rem}.bottom-full{bottom:100%}.top-5{top:1.25rem}.right-10{right:2.5rem}.right-5{right:1.25rem}.z-50{z-index:50}.z-10{z-index:10}.z-20{z-index:20}.col-span-2{grid-column:span 2/span 2}.col-span-1{grid-column:span 1/span 1}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mr-2{margin-right:.5rem}.m-3{margin:0 .75rem}.-mt-3{margin-top:-.75rem}.-ml-px{margin-left:-1px}.mb-6{margin-bottom:1.5rem}.ml-3{margin-left:.75rem}.mb-4{margin-bottom:1rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-screen{height:100vh}.h-full{height:100%}.h-5{height:1.25rem}.h-4{height:1rem}.h-8{height:2rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-72{height:18rem}.h-24{height:6rem}.h-9{height:2.25rem}.h-px{height:1px}.h-20{height:5rem}.min-h-screen{min-height:100vh}.w-64{width:16rem}.w-5{width:1.25rem}.w-4{width:1rem}.w-full{width:100%}.w-8{width:2rem}.w-12{width:3rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-10{width:2.5rem}.w-48{width:12rem}.w-9{width:2.25rem}.w-20{width:5rem}.w-80{width:20rem}.w-16{width:4rem}.w-56{width:14rem}.min-w-max{min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.max-w-xs{max-width:18rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.origin-top-right{transform-origin:top right}.translate-x-0{--tw-translate-x:0px;transform:var(--tw-transform)}.-translate-y-px{--tw-translate-y:-1px;transform:var(--tw-transform)}.translate-x-6{--tw-translate-x:1.5rem;transform:var(--tw-transform)}.translate-y-1\/2{--tw-translate-y:50%;transform:var(--tw-transform)}.translate-y-0{--tw-translate-y:0px;transform:var(--tw-transform)}.-translate-y-full{--tw-translate-y:-100%;transform:var(--tw-transform)}.translate-x-full{--tw-translate-x:100%;transform:var(--tw-transform)}.-translate-x-full{--tw-translate-x:-100%;transform:var(--tw-transform)}.translate-y-px{--tw-translate-y:1px;transform:var(--tw-transform)}.-translate-y-1\/2{--tw-translate-y:-50%;transform:var(--tw-transform)}.rotate-180{--tw-rotate:180deg}.rotate-180,.scale-110{transform:var(--tw-transform)}.scale-110{--tw-scale-x:1.1;--tw-scale-y:1.1}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.scale-150,.transform{transform:var(--tw-transform)}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-8{gap:2rem}.gap-4{gap:1rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2rem*var(--tw-space-x-reverse));margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.25rem*var(--tw-space-x-reverse));margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem*var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.rounded-md{border-radius:.375rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.border{border-width:1px}.border-r{border-right-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-gray-900{--tw-border-opacity:1;border-color:rgba(17,24,39,var(--tw-border-opacity))}.border-primary-dark{border-color:var(--color-primary-dark)}.border-transparent{border-color:transparent}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.bg-primary-darker{background-color:var(--color-primary-darker)}.bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-primary-100{background-color:var(--color-primary-100)}.bg-primary{background-color:var(--color-primary)}.bg-primary-50{background-color:var(--color-primary-50)}.bg-green-100{--tw-bg-opacity:1;background-color:rgba(209,250,229,var(--tw-bg-opacity))}.bg-primary-light{background-color:var(--color-primary-light)}.bg-gray-200{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgba(209,213,219,var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-1{padding:.25rem}.p-4{padding:1rem}.p-px{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-px{padding-top:1px;padding-bottom:1px}.py-8{padding-top:2rem;padding-bottom:2rem}.px-px{padding-left:1px;padding-right:1px}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pt-4{padding-top:1rem}.pb-4{padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pr-10{padding-right:2.5rem}.pl-4{padding-left:1rem}.pr-4{padding-right:1rem}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-xl{font-size:1.25rem}.text-lg,.text-xl{line-height:1.75rem}.text-lg{font-size:1.125rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-9xl{font-size:8rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.font-semibold{font-weight:600}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.tracking-wider{letter-spacing:.05em}.text-gray-900{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}.text-primary-lighter{color:var(--color-primary-lighter)}.text-primary-dark{color:var(--color-primary-dark)}.text-primary-100{color:var(--color-primary-100)}.text-green-500{--tw-text-opacity:1;color:rgba(16,185,129,var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgba(59,130,246,var(--tw-text-opacity))}.text-primary-light{color:var(--color-primary-light)}.text-gray-600{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgba(37,99,235,var(--tw-text-opacity))}.text-dark{color:var(--dark)}.text-danger-light{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity))}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,0.05)}.shadow-lg,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,0.1),0 10px 10px -5px rgba(0,0,0,0.04)}.shadow-md,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -1px rgba(0,0,0,0.06)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,0.06)}.shadow,.shadow-inner{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px 0 rgba(0,0,0,0.06)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgba(0,0,0,var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity:0.05}.transition-colors{transition-property:background-color,border-color,color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition{transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-150{transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.checked\:bg-primary-light:checked{background-color:var(--color-primary-light)}.focus-within\:text-gray-700:focus-within{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.hover\:overflow-y-auto:hover{overflow-y:auto}.hover\:border-gray-900:hover{--tw-border-opacity:1;border-color:rgba(17,24,39,var(--tw-border-opacity))}.hover\:bg-primary-100:hover{background-color:var(--color-primary-100)}.hover\:bg-primary-dark:hover{background-color:var(--color-primary-dark)}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.hover\:bg-primary-darker:hover{background-color:var(--color-primary-darker)}.hover\:bg-opacity-80:hover{--tw-bg-opacity:0.8}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.hover\:text-primary:hover{color:var(--color-primary)}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.hover\:underline:hover{text-decoration:underline}.focus\:bg-primary-100:focus{background-color:var(--color-primary-100)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-2:focus,.focus\:ring:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-primary-dark:focus{--tw-ring-color:var(--color-primary-dark)}.focus\:ring-primary-darker:focus{--tw-ring-color:var(--color-primary-darker)}.focus\:ring-primary:focus{--tw-ring-color:var(--color-primary)}.focus\:ring-primary-lighter:focus{--tw-ring-color:var(--color-primary-lighter)}.focus\:ring-primary-100:focus{--tw-ring-color:var(--color-primary-100)}.focus\:ring-black:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(0,0,0,var(--tw-ring-opacity))}.focus\:ring-primary-light:focus{--tw-ring-color:var(--color-primary-light)}.focus\:ring-offset-1:focus{--tw-ring-offset-width:1px}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus\:ring-offset-white:focus{--tw-ring-offset-color:#fff}.disabled\:bg-gray-200:disabled{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.group:hover .group-hover\:text-gray-900{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.dark .dark\:border-primary-darker{border-color:var(--color-primary-darker)}.dark .dark\:border-primary{border-color:var(--color-primary)}.dark .dark\:border-primary-dark{border-color:var(--color-primary-dark)}.dark .dark\:border-primary-light{border-color:var(--color-primary-light)}.dark .dark\:border-transparent{border-color:transparent}.dark .dark\:border-gray-700{--tw-border-opacity:1;border-color:rgba(55,65,81,var(--tw-border-opacity))}.dark .dark\:bg-dark{background-color:var(--dark)}.dark .dark\:bg-darker{background-color:var(--darker)}.dark .dark\:bg-primary{background-color:var(--color-primary)}.dark .dark\:bg-primary-lighter{background-color:var(--color-primary-lighter)}.dark .dark\:bg-primary-darker{background-color:var(--color-primary-darker)}.dark .dark\:bg-primary-100{background-color:var(--color-primary-100)}.dark .dark\:bg-primary-dark{background-color:var(--color-primary-dark)}.dark .dark\:text-light{color:var(--light)}.dark .dark\:text-gray-400{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}.dark .dark\:text-primary-light{color:var(--color-primary-light)}.dark .dark\:text-primary-dark{color:var(--color-primary-dark)}.dark .dark\:text-primary{color:var(--color-primary)}.dark .dark\:text-primary-100{color:var(--color-primary-100)}.dark .dark\:text-primary-lighter{color:var(--color-primary-lighter)}.dark .dark\:text-danger{--tw-text-opacity:1;color:rgba(220,38,38,var(--tw-text-opacity))}.dark .dark\:text-gray-300{--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}.dark .dark\:text-blue-500{--tw-text-opacity:1;color:rgba(59,130,246,var(--tw-text-opacity))}.dark .dark\:opacity-75{opacity:.75}.dark .dark\:opacity-70{opacity:.7}.dark .dark\:focus-within\:text-light:focus-within{color:var(--light)}.dark .dark\:hover\:border-primary-light:hover{border-color:var(--color-primary-light)}.dark .dark\:hover\:bg-primary:hover{background-color:var(--color-primary)}.dark .dark\:hover\:bg-primary-dark:hover{background-color:var(--color-primary-dark)}.dark .dark\:hover\:bg-primary-darker:hover{background-color:var(--color-primary-darker)}.dark .dark\:hover\:text-light:hover{color:var(--light)}.dark .dark\:hover\:text-primary-100:hover{color:var(--color-primary-100)}.dark .dark\:hover\:opacity-100:hover{opacity:1}.dark .dark\:focus\:bg-primary-dark:focus{background-color:var(--color-primary-dark)}.dark .dark\:focus\:opacity-100:focus{opacity:1}.dark .dark\:focus\:ring-primary-dark:focus{--tw-ring-color:var(--color-primary-dark)}.dark .dark\:focus\:ring-primary-darker:focus{--tw-ring-color:var(--color-primary-darker)}.dark .dark\:focus\:ring-offset-dark:focus{--tw-ring-offset-color:var(--dark)}.dark .dark\:focus\:ring-offset-darker:focus{--tw-ring-offset-color:var(--darker)}.dark .group:hover .dark\:group-hover\:text-primary-lighter{color:var(--color-primary-lighter)}@media (min-width:640px){.sm\:max-w-md{max-width:20rem}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.sm\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem*var(--tw-space-x-reverse));margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)))}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:duration-500{transition-duration:.5s}}@media (min-width:768px){.md\:static{position:static}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:items-center{align-items:center}.md\:space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0px*var(--tw-space-x-reverse));margin-left:calc(0px*(1 - var(--tw-space-x-reverse)))}.md\:p-8{padding:2rem}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width:1024px){.lg\:static{position:static}.lg\:hidden{display:none}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:gap-8{gap:2rem}.lg\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px*var(--tw-space-y-reverse))}.lg\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}}@media (min-width:1280px){.xl\:sticky{position:sticky}.xl\:z-0{z-index:0}.xl\:hidden{display:none}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:border-l{border-left-width:1px}}@media (min-width:1536px){.\32xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}} \ No newline at end of file diff --git a/app/asset/lib/LICENSE.md b/app/test/LICENSE.md similarity index 100% rename from app/asset/lib/LICENSE.md rename to app/test/LICENSE.md diff --git a/app/asset/lib/README.md b/app/test/README.md similarity index 100% rename from app/asset/lib/README.md rename to app/test/README.md diff --git a/app/test/alpine-notify.html b/app/test/alpine-notify.html new file mode 100644 index 00000000..39c259e2 --- /dev/null +++ b/app/test/alpine-notify.html @@ -0,0 +1,77 @@ + + + + + + + Notifications + + + + + +
+
+
+ +
+ + + + + +
+ + +
+ + + + + + \ No newline at end of file diff --git a/app/test/alpinejs-notification-promises/index.html b/app/test/alpinejs-notification-promises/index.html new file mode 100644 index 00000000..03b3ed0f --- /dev/null +++ b/app/test/alpinejs-notification-promises/index.html @@ -0,0 +1,108 @@ + + + + + CodePen - Alpinejs notification+promises + + + + + +
+

Alpine.js Notification

+
+ +
+

Button onclick triggers notification

+
+
+ + + + + Href Notify + + +

Note: Cannot use button close to dismiss Notification!

+ + +
+ +
+

Second button using Promises

+

$nextTick returns a promise, allowing the use of $nextTick to pause an async function until after pending dom updates. When used like this, $nextTick also does not require an argument to be passed.

+
+ +
+ + + <button + @click="title = 'Hello World!'; + await $nextTick(); + $notify('Hello there, I am a notification!', { + wrapperId: 'notificationWrapper', + templateId: 'notificationAlert', + autoClose: false, + autoRemove: false + })" + x-text="title" + class="notify" + > + </button> + + +
+
+ + + + + diff --git a/app/test/alpinejs-notification-promises/src/LICENSE.txt b/app/test/alpinejs-notification-promises/src/LICENSE.txt new file mode 100644 index 00000000..8b5a9b34 --- /dev/null +++ b/app/test/alpinejs-notification-promises/src/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2024 Info Opensource (https://codepen.io/iopensource/pen/XWwVEOb) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/app/test/alpinejs-notification-promises/src/README.md b/app/test/alpinejs-notification-promises/src/README.md new file mode 100644 index 00000000..e91bcdad --- /dev/null +++ b/app/test/alpinejs-notification-promises/src/README.md @@ -0,0 +1,4 @@ +# Alpinejs notification+promises + +A Pen created on CodePen.io. Original URL: [https://codepen.io/iopensource/pen/XWwVEOb](https://codepen.io/iopensource/pen/XWwVEOb). + diff --git a/app/test/alpinejs-notification-promises/src/index.html b/app/test/alpinejs-notification-promises/src/index.html new file mode 100644 index 00000000..836f0e72 --- /dev/null +++ b/app/test/alpinejs-notification-promises/src/index.html @@ -0,0 +1,82 @@ + +
+

Alpine.js Notification

+
+ +
+

Button onclick triggers notification

+
+
+ + + +

Note: Cannot use button close to dismiss Notification!

+ + +
+ +
+

Second button using Promises

+

$nextTick returns a promise, allowing the use of $nextTick to pause an async function until after pending dom updates. When used like this, $nextTick also does not require an argument to be passed.

+
+ +
+ + + <button + @click="title = 'Hello World!'; + await $nextTick(); + $notify('Hello there, I am a notification!', { + wrapperId: 'notificationWrapper', + templateId: 'notificationAlert', + autoClose: false, + autoRemove: false + })" + x-text="title" + class="notify" + > + </button> + + +
+
\ No newline at end of file diff --git a/app/test/alpinejs-notification-promises/src/style.css b/app/test/alpinejs-notification-promises/src/style.css new file mode 100644 index 00000000..52d464cb --- /dev/null +++ b/app/test/alpinejs-notification-promises/src/style.css @@ -0,0 +1,164 @@ +html, body { + background: hsl(210, 5%, 15%); + box-sizing: border-box; + color: #abc; + font:normal 16px/1.5 Arial, Helvetica, sans-serif; + margin: 0; + padding: 0; +} +header { + background: hsl(210, 5%, 19%); + border-bottom: 1px solid hsl(210, 5%, 21%); + padding: 1em 2em; +} +header h1 { + margin: 0 auto +} +h2, h3 { + font-weight: 200; + line-height: 1.5; + margin: 1em auto; +} +hr { + border: 3px dotted hsl(210, 5%, 19%); + margin: 1.5rem auto; +} +svg:not('.notify-icon') {vertical-align: middle;} +main { + margin: 0 auto 1rem; + padding: 2em; +} +xmp { + background: hsl(210, 14%, 18%); + border:1px solid hsl(210, 14%, 18%); + border-radius: 7px; + text-wrap: wrap; + word-break: break-all; +} +a, +button.notify { + position: relative; + display: inline-block; + margin-top: 20px; + cursor: pointer; + color:#abc; + background: hsl(210, 5%, 19%); + border: 1px solid hsl(223, 99%, 59%); + border-radius: 8px; + padding: .5em .75em; + text-decoration: none; + transition: all 500ms ease-in-out; +} +a > svg {vertical-align: middle;} +a:hover { + background: hsl(223, 90%, 55%); + border: 1px solid hsl(223, 90%, 55%); + color: #f1f1f1; +} +a[title]:hover::after { + content: attr(title); + background: hsla(223, 70%, 45%, 0.7); + color:#f1f1f1; + border: 1px solid hsl(223, 90%, 55%); + border-radius: 0.75em; + padding:.25em 1em; + position: absolute; + text-wrap: nowrap; + top: -90%; + left: -18%; +} +/* +.notification { + padding-bottom: 0.75em; + position: fixed; + top: 1.5em; + right: 1.5em; + width: 18.75em; + + max-width: 60vw; + width: 12rem; + transition: transform 0.5s ease-out; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + visibility: hidden; +} +.show {visibility: visible;} +*/ +.notify-box { + display: flex; + align-items: center; + animation: flyIn 0.3s ease-out; + background: hsl(210, 20%, 27%); + border: 1px solid hsl(210, 30%, 27%); + border-radius: 8px; + box-shadow: 0 0.5em 1em hsla(210,10%,10%,0.4); + margin: 1rem 0; + height: 4em; + width:18rem; +} +.notify-in { +animation: flyIn 0.3s ease-out; +} +.notify-out { + animation: flyOut 0.5s ease-out forwards; +} +.notify-icon { + flex-shrink: 0; + margin: 0.5em; + width: 2em; + height: 2em; +} +.notify-icon > svg { + font-size: 2em; +} +.notify-text { + /* color:#ff9800; */ + font-size: 0.85em; + font-weight: bold; + line-height: 1.5; + padding: 0.375em 1em; + place-content: center; + width: 100%; + height: 100%; +} +button.notify-btn { + display: flex; + flex-direction: column; + flex-shrink: 0; + min-width: 4em; + height: 100%; + place-content: center; + + background-color: hsla(223, 70%, 45%, 0.5); + border: 1px solid hsl(223, 90%, 55%); + border-top-right-radius: 8px; + border-bottom-right-radius: 8px; + color: inherit; + font-size: .85em; + font-weight: 400; + + padding: 1rem 0.5rem; + transition: all .5s ease-in-out; + -webkit-appearance: none; + appearance: none; + -webkit-tap-highlight-color: transparent; +} +button.notify-btn:hover { + background: hsl(223, 90%, 55%); + color:#f1f1f1; + border: 1px solid hsl(223, 90%, 55%); +} +.notify-btn-text { + display: inline-block; + pointer-events: none; +} +/* Animation */ +@keyframes flyIn { + from {transform: translateX(calc(100% + 1.5em));} + to {transform: translateX(0);} +} +@keyframes flyOut { + from {transform: translateX(0);} + to {transform: translateX(calc(100% + 1.5em));} +} \ No newline at end of file diff --git a/app/test/alpinejs-notification-promises/style.css b/app/test/alpinejs-notification-promises/style.css new file mode 100644 index 00000000..52d464cb --- /dev/null +++ b/app/test/alpinejs-notification-promises/style.css @@ -0,0 +1,164 @@ +html, body { + background: hsl(210, 5%, 15%); + box-sizing: border-box; + color: #abc; + font:normal 16px/1.5 Arial, Helvetica, sans-serif; + margin: 0; + padding: 0; +} +header { + background: hsl(210, 5%, 19%); + border-bottom: 1px solid hsl(210, 5%, 21%); + padding: 1em 2em; +} +header h1 { + margin: 0 auto +} +h2, h3 { + font-weight: 200; + line-height: 1.5; + margin: 1em auto; +} +hr { + border: 3px dotted hsl(210, 5%, 19%); + margin: 1.5rem auto; +} +svg:not('.notify-icon') {vertical-align: middle;} +main { + margin: 0 auto 1rem; + padding: 2em; +} +xmp { + background: hsl(210, 14%, 18%); + border:1px solid hsl(210, 14%, 18%); + border-radius: 7px; + text-wrap: wrap; + word-break: break-all; +} +a, +button.notify { + position: relative; + display: inline-block; + margin-top: 20px; + cursor: pointer; + color:#abc; + background: hsl(210, 5%, 19%); + border: 1px solid hsl(223, 99%, 59%); + border-radius: 8px; + padding: .5em .75em; + text-decoration: none; + transition: all 500ms ease-in-out; +} +a > svg {vertical-align: middle;} +a:hover { + background: hsl(223, 90%, 55%); + border: 1px solid hsl(223, 90%, 55%); + color: #f1f1f1; +} +a[title]:hover::after { + content: attr(title); + background: hsla(223, 70%, 45%, 0.7); + color:#f1f1f1; + border: 1px solid hsl(223, 90%, 55%); + border-radius: 0.75em; + padding:.25em 1em; + position: absolute; + text-wrap: nowrap; + top: -90%; + left: -18%; +} +/* +.notification { + padding-bottom: 0.75em; + position: fixed; + top: 1.5em; + right: 1.5em; + width: 18.75em; + + max-width: 60vw; + width: 12rem; + transition: transform 0.5s ease-out; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + visibility: hidden; +} +.show {visibility: visible;} +*/ +.notify-box { + display: flex; + align-items: center; + animation: flyIn 0.3s ease-out; + background: hsl(210, 20%, 27%); + border: 1px solid hsl(210, 30%, 27%); + border-radius: 8px; + box-shadow: 0 0.5em 1em hsla(210,10%,10%,0.4); + margin: 1rem 0; + height: 4em; + width:18rem; +} +.notify-in { +animation: flyIn 0.3s ease-out; +} +.notify-out { + animation: flyOut 0.5s ease-out forwards; +} +.notify-icon { + flex-shrink: 0; + margin: 0.5em; + width: 2em; + height: 2em; +} +.notify-icon > svg { + font-size: 2em; +} +.notify-text { + /* color:#ff9800; */ + font-size: 0.85em; + font-weight: bold; + line-height: 1.5; + padding: 0.375em 1em; + place-content: center; + width: 100%; + height: 100%; +} +button.notify-btn { + display: flex; + flex-direction: column; + flex-shrink: 0; + min-width: 4em; + height: 100%; + place-content: center; + + background-color: hsla(223, 70%, 45%, 0.5); + border: 1px solid hsl(223, 90%, 55%); + border-top-right-radius: 8px; + border-bottom-right-radius: 8px; + color: inherit; + font-size: .85em; + font-weight: 400; + + padding: 1rem 0.5rem; + transition: all .5s ease-in-out; + -webkit-appearance: none; + appearance: none; + -webkit-tap-highlight-color: transparent; +} +button.notify-btn:hover { + background: hsl(223, 90%, 55%); + color:#f1f1f1; + border: 1px solid hsl(223, 90%, 55%); +} +.notify-btn-text { + display: inline-block; + pointer-events: none; +} +/* Animation */ +@keyframes flyIn { + from {transform: translateX(calc(100% + 1.5em));} + to {transform: translateX(0);} +} +@keyframes flyOut { + from {transform: translateX(0);} + to {transform: translateX(calc(100% + 1.5em));} +} \ No newline at end of file diff --git a/app/test/api.js b/app/test/api.js new file mode 100644 index 00000000..be1ea5d3 --- /dev/null +++ b/app/test/api.js @@ -0,0 +1,561 @@ + +// The one and only way of getting global scope in all environments +// https://stackoverflow.com/q/3277182/1008999 +var _global = typeof window === 'object' && window.window === window + ? window : typeof self === 'object' && self.self === self + ? self : typeof global === 'object' && global.global === global + ? global + : this; + +(function(){ + function fn(){}; + + var repoExp = new RegExp("^https://github.com/([^/]+)/([^/]+)(/(tree|blob)/([^/]+)(/(.*))?)?"); + var githubProvidedUrl = new RegExp("^https://api.github.com/.*"); + var githubDownloadUrl = new RegExp("^https://raw.githubusercontent.com/.*"); + var isBusy = false; + var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0 && + /Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent); + + var token; + + var _filterTailSlash = function(str){ + if ( str.length && str[str.length - 1] == "/" ) return str.substring(0, str.length - 1); + return str; + }; + + var statusHandle = function(status){ + if(status == 'error' || status == 'done') isBusy = false; + else isBusy = true; + }; + + /** + * @typedef ResolvedURL + * @type Object + * @property {string} author - The project owner + * @property {string} project - The project name + * @property {string} branch - The default branch or other branches + * @property {string} type - The type of url link, values: tree, blob, link? + * @property {string} path - The path of target file/dir based on root repo url. + * @property {string} inputUrl - The input url + * @property {string} rootUrl - The root dir url + */ + + /** + * This callback would call by each progress changes. + * @callback progressCallback + * @param {string} status - status description like 'error', 'prepare', 'processing', 'done' + * @param {string} message - the messages of the above status. + */ + var progressCallback = function(status, message){}; + + var resolveUrl = function(repoUrl){ + if(typeof repoUrl != 'string') return; + var matches = repoUrl.match(repoExp); + if(matches && matches.length > 0){ + var root = (matches[5])? + "https://github.com/" + matches[1] + "/" + matches[2] + "/tree/" + matches[5] : + repoUrl; + return { + author: matches[1], + project: matches[2], + branch: matches[5] || 'master', + type: matches[4] || '', + path: _filterTailSlash(matches[7] || ''), + inputUrl: repoUrl, + rootUrl: root + }; + } + }; + + var _githubUrlChecker = { + _workerBlobUrl: null, + _branchChecker: function(baseUrl, branch, path){ + + if(!this._workerBlobUrl){ + this._workerBlobUrl = URL.createObjectURL( new Blob([ '(', + function(){ + //Long-running work here + function makeRequest (opts) { + var xhr = new XMLHttpRequest(); + var params = opts.params, strParams; + if (params && typeof params === 'object') { + strParams = Object.keys(params).map(function (key) { + return encodeURIComponent(key) + '=' + encodeURIComponent(params[key]); + }).join('&'); + } + xhr.open(opts.method || 'GET', opts.url + "?" + strParams, false); + if (opts.headers) { + Object.keys(opts.headers).forEach(function (key) { + xhr.setRequestHeader(key, opts.headers[key]); + }); + } + xhr.send(); + if(xhr.status == 200) return xhr.response; + return { status: xhr.status, statusText: xhr.statusText }; + } + onmessage = function(e){ + // e.data + var inputData = e.data; + + var toBreak = false; + var branchTry = inputData.branchTry, + pathTry = inputData.pathTry, + params = inputData.params, + pathTryQueue = pathTry.split('/'); + + if(pathTryQueue[pathTryQueue.length-1] == "") pathTryQueue.pop(); + var results = {}; + while(!toBreak){ // case: release, release/1.x + params["ref"] = branchTry; + + var res = makeRequest({ + url: inputData.baseUrl + pathTry, + params: params + }); + + if(res.status){ + if(pathTryQueue.length){ + branchTry += "/" + pathTryQueue.shift(); + pathTry = pathTryQueue.join('/'); + // case: 1.0/example/lib/test, example/lib/test + }else toBreak = true; + }else{ + results.branch = branchTry; + results.path = pathTry; + toBreak = true; + } + } + if(results.branch) postMessage(results); + else postMessage(null); + close(); + }; + }.toString(), + ')()' ], { type: 'application/javascript' } ) ); + } + + var checkWorker = new Worker( this._workerBlobUrl ); + + if(path && path[path.length-1] == "/") path = path.substring(0, path.length - 1); + // pass parameter to worker + checkWorker.postMessage({ + baseUrl: baseUrl, + branchTry: branch, + pathTry: path || "", + params: token? { "access_token" : token } : {} + }); + + return new Promise(function(resolve, reject){ + checkWorker.onmessage = function(e){ + // e.data + if(e.data && typeof e.data == "object") resolve(e.data); + else reject(e.data); + }; + }); + }, + caches: [], + /** + * Resolve the github repo url for author, project name, branch name, and so on. + * @private + * @param {string} repoUrl - The github repo url. + * @return {Promise} + */ + check: function(repoUrl){ + if(typeof repoUrl != 'string') return Promise.reject(); + + var self = this, + results = {}; + + if(repoUrl[repoUrl.length-1] == "/") repoUrl = repoUrl.substring(0, repoUrl.length - 1); + + if(!window.Worker){ + results = resolveUrl(repoUrl); + if(results) return Promise.resolve(results); + else return Promise.reject(); + } + + results.inputUrl = repoUrl; + // load from cache + if(self.caches.length > 0){ + for(var i = 0, len = self.caches.length; i < len; i++){ + var item = self.caches[i]; + // https://github.com/author/repo/(tree|blob)/release/1.0(/.*)? + var patternExp = new RegExp("^" + item.pattern); + var matches = repoUrl.match(patternExp); + if(matches && matches.length > 0){ + results.author = item.author; + results.project = item.project; + results.branch = item.branch || "master"; + results.type = matches[1] || ""; + results.path = matches[3] || ""; + results.inputUrl = repoUrl; + results.rootUrl = item.rootUrl; + return Promise.resolve(results); + } + } + } + + var matches = repoUrl.match(repoExp); + if(matches && matches.length > 0){ + results.author = matches[1]; + results.project = matches[2]; + results.branch = results.path = results.rootUrl = ""; + if(matches[4]){ // tree + + results.type = matches[4]; + + return new Promise(function(resolve, reject){ + self._branchChecker("https://api.github.com/repos/"+ results.author + "/" + results.project + "/contents/", matches[5], matches[7]) + .then(function(res){ + var rootUrl = "https://github.com/" + results.author + "/" + results.project + "/tree/" + res.branch; + self.caches.push({ + author: results.author, + project: results.project, + branch: res.branch, + pattern: "https://github.com/" + results.author + "/" + results.project + "/(tree|blob)/" + res.branch + "(/(.*))?", + rootUrl: rootUrl + }); + results.branch = res.branch; + results.path = _filterTailSlash(res.path); + results.rootUrl = rootUrl; + resolve(results); + }) + .catch(function(msg){ reject(msg); }); + }); + }else{ + results.rootUrl = "https://github.com/" + results.author + "/" + results.project; + return Promise.resolve(results); + } + } + return Promise.reject(); + } + } + + var _getRequestUri = function(param){ + var uri = Object.keys(param) + .map(function(key){ return key + "=" + encodeURIComponent(param[key]); }) + .join('&'); + return uri ? ("?" + uri) : ""; + } + + // default type is "json" + var _callAjax = function(url, params, type){ + return new Promise(function(resolve, reject){ + var xmlhttp; + // compatible with IE, Firefox, Chrome, Opera, Safari + xmlhttp = new XMLHttpRequest(); + xmlhttp.onreadystatechange = function(){ + if (xmlhttp.readyState == 4){ + if(xmlhttp.status == 200){ + resolve(xmlhttp); + }else if(xmlhttp.status >= 400){ + reject(xmlhttp); + } + } + } + xmlhttp.responseType = (typeof type !== "undefined") ? type : "json"; + xmlhttp.open("GET", url + _getRequestUri(params), true); + xmlhttp.send(); + }); + }; + + var _handleApiError = function(xmlResponse){ + if ( xmlResponse ) { + var status = xmlResponse.status; + var response = xmlResponse.response; + var message = (response && response.message) ? response.message : xmlResponse.statusText; + progressCallback.call(this, 'error', "Error: " + message); + } + }; + + var _checkAndGetDownloadURL = function(url){ + if ( url ) { + if ( githubDownloadUrl.test(url) ) return Promise.resolve(url); + else return _githubUrlChecker + .check(url) + .then(function(resolved){ + return "https://raw.githubusercontent.com/" + [resolved.author, resolved.project, resolved.branch, resolved.path].join("/"); + }); + } else return Promise.reject(); + }; + + var _getContentOfGitUrl = function(url, params){ + params = params || {}; + if(token) params["access_token"] = token; + return _callAjax(url, params) + .then(function(xmlResponse){ + return xmlResponse.response.content; + }); + }; + + var _getTreeOfGitUrl = function(url, params){ + params = params || {}; + if(token) params["access_token"] = token; + params["recursive"] = 1; + return _callAjax(url, params) + .then(function(xmlResponse){ + var results = xmlResponse.response; + var nextReturn = []; + if(results.truncated){ + progressCallback.call(callbackScope, 'error', 'The tree travels is over than API limitation (500 files)'); + throw ("The tree travels is over than API limitation (500 files)"); + }; + results.tree.forEach(function(item){ + if(item.type == "blob"){ + nextReturn.push({url: item.url, path: item.path}); + } + }); + return nextReturn; + }); + }; + + var _zipContents = function(filename, contents, callbackScope){ + var zip = new JSZip(); + contents.forEach(function(item){ + progressCallback.call(callbackScope, 'processing', 'Compressing ' + item.path); + zip.file(item.path, item.content, {createFolders:true,base64:true}); + }); + if(isSafari){ + zip.generateAsync({type:"base64"}) + .then(function (content) { + downloadZipUseElement("data:application/zip;base64," + content); + alert("Please remember change file name to xxx.zip"); + }); + }else{ + zip.generateAsync({type:"blob"}) + .then(function (content) { + saveAs(content, filename + ".zip"); + }, function(error){ + console.log(error); + }); + } + progressCallback.call(callbackScope, 'done', 'Saving ' + filename + '.zip'); + }; + + /** + * Force to trigger download dialog for any mine-type files using Native A Element. + * @param {string} url - The URL. + * @param {object|undefined} callbackScope - The scope of the progressCallback function. + */ + function downloadZipUseElement(url, callbackScope){ + var down = document.createElement('a'); + down.setAttribute('download', true); + down.href = url; + down.addEventListener('click', function(e){ + progressCallback.call(callbackScope, 'done', 'Saving File.'); + }); + setTimeout(function(){ + // link has to be in the page DOM for it to work with Firefox + document.body.appendChild(down); + down.click(); + down.parentNode.removeChild(down); + },100); + } + + /** + * Force to trigger download dialog for any mine-type files. + * @param {string} url - The URL. + * @param {object|undefined} callbackScope - The scope of the progressCallback function. + */ + function downloadZip(url, callbackScope){ + callbackScope = callbackScope || _global; + progressCallback.call(callbackScope, 'processing', 'Fetching target url: ' + url); + var params = {}; + if(token) params["access_token"] = token; + + return _checkAndGetDownloadURL(url) + .then(function(validUrl){ + return _callAjax(validUrl, params, "text") + }) + .then(function(xmlResponse){ + var data = xmlResponse.response; + var contentType = xmlResponse.getResponseHeader('Content-Type'); + + var blob = new Blob([data], { + type: contentType || 'application/octet-stream' + }); + + var down = document.createElement('a'); + down.download = url.substring(url.lastIndexOf('/') + 1); + down.href = URL.createObjectURL(blob); + + down.addEventListener('click', function(e){ + progressCallback.call(callbackScope, 'done', 'Saving File.'); + }); + + setTimeout(function(){ + // link has to be in the page DOM for it to work with Firefox + document.body.appendChild(down); + down.click(); + down.parentNode.removeChild(down); + }, 100); + }) + .catch(_handleApiError.bind(callbackScope)); + } + + /** + * Download zip file from github api url. + * @param {string} zipName - The zip file name. + * @param {string} url - The github api url. + * @param {object|undefined} callbackScope - The scope of the progressCallback function. + */ + function zipIt(zipName, url, callbackScope){ + callbackScope = callbackScope || _global; + if(url && githubProvidedUrl.test(url)){ + progressCallback.call(callbackScope, 'prepare', 'Fetching list of Dir contains files.'); + var params = {}; + if(token) params["access_token"] = token; + params["recursive"] = 1; + + return _callAjax(url, params) + .then(function(xmlResponse){ + var results = xmlResponse.response; + var promises = []; + var fileContents = []; + if(results.truncated){ + progressCallback.call(callbackScope, 'error', 'The tree travels is over than API limitation (500 files)'); + throw ("The tree travels is over than API limitation (500 files)"); + }; + results.tree.forEach(function(item){ + if(item.type == "blob"){ + var p = {}; + promises.push( + _getContentOfGitUrl(item.url, p) + .then(function(content){ + var path = item.path; + fileContents.push({path:path,content:content}); + progressCallback.call(callbackScope, 'processing', 'Fetched ' + path + ' content.'); + }) + ); + } + }); + + return Promise.all(promises).then(function() { + _zipContents(zipName, fileContents, callbackScope); + }); + }) + .catch(_handleApiError.bind(callbackScope)); + } + } + + /** + * Download zip for single file from input repo URL. + * @param {string} pathToFolder - The URL of the Github repository. + * @param {object|undefined} callbackScope - The scope of the progressCallback function. + */ + function createURL(pathToFolder, callbackScope){ + if(isBusy) throw "GitZip is busy..."; + callbackScope = callbackScope || _global; + progressCallback.call(callbackScope, 'prepare', 'Resolving URL'); + _githubUrlChecker.check(pathToFolder) + .then(function(resolved){ + if(!resolved.path){ + // root + var durl = [ + "https://github.com", resolved.author, resolved.project, + "archive", (resolved.branch || 'master') + ].join('/'); + var gitURL = durl + ".zip"; + // downloadZip(gitURL, callbackScope); + downloadZipUseElement(gitURL, callbackScope); + } else{ + + progressCallback.call(callbackScope, 'prepare', 'Finding file/dir content path from resolved URL'); + var params = {}; + if(resolved.branch) params["ref"] = resolved.branch; + if(token) params["access_token"] = token; + + if(resolved.type == "tree"){ + // for tree handles + _callAjax("https://api.github.com/repos/" + resolved.author + + "/" + resolved.project + "/contents/" + resolved.path, params) + .then(function(xmlResponse){ + var results = xmlResponse.response; + + var promises = []; + results.forEach(function(item){ + if( item.type == "dir") { + var currentPath = item.name; + promises.push( + _getTreeOfGitUrl(item.git_url) + .then(function(results){ + // add currentPath + results.forEach(function(inner){ + inner.path = currentPath + "/" + inner.path; + progressCallback.call(callbackScope, 'processing', 'Path: ' + inner.path + ' found.'); + }); + return results; + }) + ); + } else if ( item.type == "file" ) { + promises.push( + Promise.resolve([ { url: item.git_url, path: item.name } ]) + ); + progressCallback.call(callbackScope, 'processing', 'Path: ' + item.name + ' found.'); + } + }); + return Promise.all(promises); + }) + .then(function(results){ + return results.reduce(function(a, b){ return a.concat(b); }, []); + }) + .then(function(urls){ + var fetches = urls.map(function(item){ + return _getContentOfGitUrl(item.url) + .then(function(content){ + var path = item.path; + progressCallback.call(callbackScope, 'processing', 'Fetched ' + path + ' content.'); + return { path: path, content: content }; + }); + }); + return Promise.all(fetches); + }) + .then(function(contents){ + _zipContents(resolved.path.split('/').pop(), contents, callbackScope); + }); + } else { + // for blob + downloadZip( + "https://raw.githubusercontent.com/" + [resolved.author, resolved.project, resolved.branch, resolved.path].join("/"), + callbackScope + ); + } + } + }) + .catch(function(){ + progressCallback.call(callbackScope, 'error', 'Invalid URL: value is [' + pathToFolder.toString() + ']'); + throw "INVALID URL"; + }); + } + + /** + * Register the progress callback for handleing the progress is changing. + * @param {progressCallback} inputFn - The progress callback. + */ + function registerCallback(inputFn){ + if(typeof inputFn == 'function'){ + // progressCallback = callback; + progressCallback = function(){ + inputFn.apply(this, arguments); + statusHandle.apply(this, arguments); + }; + } + } + + function setAccessToken(strToken){ + token = strToken; + } + + fn.zipRepo = createURL; + fn.zipFromApiUrl = zipIt; + fn.downloadFile = downloadZip; + fn.registerCallback = registerCallback; + fn.setAccessToken = setAccessToken; + fn.urlResolver = _githubUrlChecker; + + _global.GitZip = fn.GitZip = fn; + + if (typeof module !== 'undefined') { + module.exports = fn; + } +})(); diff --git a/app/asset/lib/example.html b/app/test/example.html similarity index 100% rename from app/asset/lib/example.html rename to app/test/example.html diff --git a/app/test/filename.txt b/app/test/filename.txt new file mode 100644 index 00000000..f3916e4a Binary files /dev/null and b/app/test/filename.txt differ diff --git a/app/test/filesaver.js b/app/test/filesaver.js new file mode 100644 index 00000000..bb031f68 --- /dev/null +++ b/app/test/filesaver.js @@ -0,0 +1,172 @@ +/* +* FileSaver.js +* A saveAs() FileSaver implementation. +* +* By Eli Grey, http://eligrey.com +* +* License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT) +* source : http://purl.eligrey.com/github/FileSaver.js +*/ + +// The one and only way of getting global scope in all environments +// https://stackoverflow.com/q/3277182/1008999 +var _global = typeof window === 'object' && window.window === window + ? window : typeof self === 'object' && self.self === self + ? self : typeof global === 'object' && global.global === global + ? global + : this + +function bom (blob, opts) { + if (typeof opts === 'undefined') opts = { autoBom: false } + else if (typeof opts !== 'object') { + console.warn('Deprecated: Expected third argument to be a object') + opts = { autoBom: !opts } + } + + // prepend BOM for UTF-8 XML and text/* types (including HTML) + // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF + if (opts.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { + return new Blob([String.fromCharCode(0xFEFF), blob], { type: blob.type }) + } + return blob +} + +function download (url, name, opts) { + var xhr = new XMLHttpRequest() + xhr.open('GET', url) + xhr.responseType = 'blob' + xhr.onload = function () { + saveAs(xhr.response, name, opts) + } + xhr.onerror = function () { + console.error('could not download file') + } + xhr.send() +} + +function corsEnabled (url) { + var xhr = new XMLHttpRequest() + // use sync to avoid popup blocker + xhr.open('HEAD', url, false) + try { + xhr.send() + } catch (e) {} + return xhr.status >= 200 && xhr.status <= 299 +} + +// `a.click()` doesn't work for all browsers (#465) +function click (node) { + try { + node.dispatchEvent(new MouseEvent('click')) + } catch (e) { + var evt = document.createEvent('MouseEvents') + evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80, + 20, false, false, false, false, 0, null) + node.dispatchEvent(evt) + } +} + +// Detect WebView inside a native macOS app by ruling out all browsers +// We just need to check for 'Safari' because all other browsers (besides Firefox) include that too +// https://www.whatismybrowser.com/guides/the-latest-user-agent/macos +var isMacOSWebView = _global.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent) + +var saveAs = _global.saveAs || ( + // probably in some web worker + (typeof window !== 'object' || window !== _global) + ? function saveAs () { /* noop */ } + + // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView + : ('download' in HTMLAnchorElement.prototype && !isMacOSWebView) + ? function saveAs (blob, name, opts) { + var URL = _global.URL || _global.webkitURL + // Namespace is used to prevent conflict w/ Chrome Poper Blocker extension (Issue #561) + var a = document.createElementNS('http://www.w3.org/1999/xhtml', 'a') + name = name || blob.name || 'download' + + a.download = name + a.rel = 'noopener' // tabnabbing + + // TODO: detect chrome extensions & packaged apps + // a.target = '_blank' + + if (typeof blob === 'string') { + // Support regular links + a.href = blob + if (a.origin !== location.origin) { + corsEnabled(a.href) + ? download(blob, name, opts) + : click(a, a.target = '_blank') + } else { + click(a) + } + } else { + // Support blobs + a.href = URL.createObjectURL(blob) + setTimeout(function () { URL.revokeObjectURL(a.href) }, 4E4) // 40s + setTimeout(function () { click(a) }, 0) + } + } + + // Use msSaveOrOpenBlob as a second approach + : 'msSaveOrOpenBlob' in navigator + ? function saveAs (blob, name, opts) { + name = name || blob.name || 'download' + + if (typeof blob === 'string') { + if (corsEnabled(blob)) { + download(blob, name, opts) + } else { + var a = document.createElement('a') + a.href = blob + a.target = '_blank' + setTimeout(function () { click(a) }) + } + } else { + navigator.msSaveOrOpenBlob(bom(blob, opts), name) + } + } + + // Fallback to using FileReader and a popup + : function saveAs (blob, name, opts, popup) { + // Open a popup immediately do go around popup blocker + // Mostly only available on user interaction and the fileReader is async so... + popup = popup || open('', '_blank') + if (popup) { + popup.document.title = + popup.document.body.innerText = 'downloading...' + } + + if (typeof blob === 'string') return download(blob, name, opts) + + var force = blob.type === 'application/octet-stream' + var isSafari = /constructor/i.test(_global.HTMLElement) || _global.safari + var isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent) + + if ((isChromeIOS || (force && isSafari) || isMacOSWebView) && typeof FileReader !== 'undefined') { + // Safari doesn't allow downloading of blob URLs + var reader = new FileReader() + reader.onloadend = function () { + var url = reader.result + url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, 'data:attachment/file;') + if (popup) popup.location.href = url + else location = url + popup = null // reverse-tabnabbing #460 + } + reader.readAsDataURL(blob) + } else { + var URL = _global.URL || _global.webkitURL + var url = URL.createObjectURL(blob) + if (popup) popup.location = url + else location.href = url + popup = null // reverse-tabnabbing #460 + setTimeout(function () { URL.revokeObjectURL(url) }, 4E4) // 40s + } + } +) + +_global.saveAs = saveAs.saveAs = saveAs + +if (typeof module !== 'undefined') { + module.exports = saveAs; +} diff --git a/app/test/index.html b/app/test/index.html new file mode 100644 index 00000000..1a9e25c7 --- /dev/null +++ b/app/test/index.html @@ -0,0 +1,187 @@ + + + + + +\_github_gigamaster\codemo\app + + + + + + + + + + +
Folders
asset css js projectmanagement
authentication dataviz layout rd
components ecommerce page test
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Anchors
<root>
asset\favicon
asset\lib
authentication
authentication\login
authentication\register
components
components\alert
components\button
components\card
components\color
components\dropdown
components\form
components\list
components\modal
css
dataviz
dataviz\gui-app-build-diagram
ecommerce
layout
layout\flexbox
layout\grid
layout\samples
page\homepage
page\portfolio
page\product
page\profile
page\server
page\starter
page\support
projectmanagement
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<root>
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
filename.txt4 K06/16/247:37 pm note.md0 K06/08/245:29 pm style.css26 K06/14/245:05 pm 
asset\favicon
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
android-chrome-192x192.png53 K06/16/245:36 pm apple-touch-icon.png47 K06/16/245:36 pm favicon-32x32.png2 K06/16/245:36 pm mstile-310x310.png115 K06/16/245:36 pm 
android-chrome-512x512.png318 K06/16/245:36 pm browserconfig.xml0 K06/16/245:36 pm favicon.ico11 K06/16/245:36 pm safari-pinned-tab.svg73 K06/16/245:36 pm 
apple-touch-icon-precomposed.png54 K06/16/245:36 pm favicon-16x16.png1 K06/16/245:36 pm mstile-150x150.png29 K06/16/245:36 pm site.webmanifest0 K06/16/245:36 pm 
asset\lib
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
api.js23 K06/15/244:03 am jszip.min.js95 K06/15/242:22 am LICENSE.md0 K06/15/242:17 am style.css26 K06/14/245:05 pm 
example.html2 K06/16/245:47 pm lib.module.js0 K06/16/245:42 pm README.md2 K06/16/245:52 am test.html7 K06/16/247:48 am 
filesaver.js5 K06/15/243:38 am 
authentication
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/11/2412:37 am 
authentication\login
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/11/2412:37 am 
authentication\register
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
components
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/246:03 pm 
components\alert
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/246:03 pm 
components\button
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/246:03 pm 
components\card
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
components\color
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/246:03 pm 
components\dropdown
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
components\form
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
components\list
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
components\modal
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
css
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/246:03 pm 
dataviz
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
gui-app-build-data-diagram.md1 K06/11/2412:23 pm 
dataviz\gui-app-build-diagram
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
index.html0 K06/11/2412:11 pm script.js0 K06/11/2412:11 pm style.css0 K06/11/2412:11 pm 
ecommerce
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
js
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/246:03 pm 
layout
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
layout\flexbox
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
layout\grid
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
layout\samples
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
page\homepage
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
page\portfolio
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
page\product
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
page\profile
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
page\server
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
page\starter
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
page\support
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
projectmanagement
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
note.md0 K06/08/245:29 pm 
rd
FileSizeDateFileSizeDateFileSizeDateFileSizeDate
index.js0 K06/14/246:30 pm note.md0 K06/08/245:29 pm sample.html0 K06/14/246:38 pm style.css0 K06/14/246:36 pm 
+ + + + \ No newline at end of file diff --git a/app/test/jszip.min.js b/app/test/jszip.min.js new file mode 100644 index 00000000..3e7d5ffc --- /dev/null +++ b/app/test/jszip.min.js @@ -0,0 +1,7 @@ +/*! +JSZip v3.10.1 - (c) 2009-2016 Stuart Knightley +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. +JSZip uses the library pako released under the MIT license : +https://github.com/nodeca/pako/blob/main/LICENSE +*/ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JSZip=e()}}(function(){return function s(a,o,h){function u(r,e){if(!o[r]){if(!a[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var i=o[r]={exports:{}};a[r][0].call(i.exports,function(e){var t=a[r][1][e];return u(t||e)},i,i.exports,s,a,o,h)}return o[r].exports}for(var l="function"==typeof require&&require,e=0;e>2,s=(3&t)<<4|r>>4,a=1>6:64,o=2>4,r=(15&i)<<4|(s=p.indexOf(e.charAt(o++)))>>2,n=(3&s)<<6|(a=p.indexOf(e.charAt(o++))),l[h++]=t,64!==s&&(l[h++]=r),64!==a&&(l[h++]=n);return l}},{"./support":30,"./utils":32}],2:[function(e,t,r){"use strict";var n=e("./external"),i=e("./stream/DataWorker"),s=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function o(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}o.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(e,t,r){return e.pipe(new s).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){"use strict";var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){"use strict";var n=e("./utils");var o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t[a])];return-1^e}(0|t,e,e.length,0):function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){"use strict";var n=null;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),s=e("./utils"),a=e("./stream/GenericWorker"),o=n?"uint8array":"array";function h(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",s.inherits(h,a),h.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,e.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(e){return new h("Deflate",e)},r.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){"use strict";function A(e,t){var r,n="";for(r=0;r>>=8;return n}function n(e,t,r,n,i,s){var a,o,h=e.file,u=e.compression,l=s!==O.utf8encode,f=I.transformTo("string",s(h.name)),c=I.transformTo("string",O.utf8encode(h.name)),d=h.comment,p=I.transformTo("string",s(d)),m=I.transformTo("string",O.utf8encode(d)),_=c.length!==h.name.length,g=m.length!==d.length,b="",v="",y="",w=h.dir,k=h.date,x={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(x.crc32=e.crc32,x.compressedSize=e.compressedSize,x.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),l||!_&&!g||(S|=2048);var z=0,C=0;w&&(z|=16),"UNIX"===i?(C=798,z|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(h.unixPermissions,w)):(C=20,z|=function(e){return 63&(e||0)}(h.dosPermissions)),a=k.getUTCHours(),a<<=6,a|=k.getUTCMinutes(),a<<=5,a|=k.getUTCSeconds()/2,o=k.getUTCFullYear()-1980,o<<=4,o|=k.getUTCMonth()+1,o<<=5,o|=k.getUTCDate(),_&&(v=A(1,1)+A(B(f),4)+c,b+="up"+A(v.length,2)+v),g&&(y=A(1,1)+A(B(p),4)+m,b+="uc"+A(y.length,2)+y);var E="";return E+="\n\0",E+=A(S,2),E+=u.magic,E+=A(a,2),E+=A(o,2),E+=A(x.crc32,4),E+=A(x.compressedSize,4),E+=A(x.uncompressedSize,4),E+=A(f.length,2),E+=A(b.length,2),{fileRecord:R.LOCAL_FILE_HEADER+E+f+b,dirRecord:R.CENTRAL_FILE_HEADER+A(C,2)+E+A(p.length,2)+"\0\0\0\0"+A(z,4)+A(n,4)+f+b+p}}var I=e("../utils"),i=e("../stream/GenericWorker"),O=e("../utf8"),B=e("../crc32"),R=e("../signature");function s(e,t,r,n){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}I.inherits(s,i),s.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},s.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=n(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},s.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=n(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return R.DATA_DESCRIPTOR+A(e.crc32,4)+A(e.compressedSize,4)+A(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},s.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,r){"use strict";var n=e("./Uint8ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){"use strict";var n=e("./DataReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){"use strict";var n=e("./ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){"use strict";var n=e("../utils"),i=e("../support"),s=e("./ArrayReader"),a=e("./StringReader"),o=e("./NodeBufferReader"),h=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new o(e):i.uint8array?new h(n.transformTo("uint8array",e)):new s(n.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../utils");function s(e){n.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(s,n),s.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../crc32");function s(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(s,n),s.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(s,i),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}n.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){"use strict";function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r "+e:e}},t.exports=n},{}],29:[function(e,t,r){"use strict";var h=e("../utils"),i=e("./ConvertWorker"),s=e("./GenericWorker"),u=e("../base64"),n=e("../support"),a=e("../external"),o=null;if(n.nodestream)try{o=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function l(e,o){return new a.Promise(function(t,r){var n=[],i=e._internalType,s=e._outputType,a=e._mimeType;e.on("data",function(e,t){n.push(e),o&&o(t)}).on("error",function(e){n=[],r(e)}).on("end",function(){try{var e=function(e,t,r){switch(e){case"blob":return h.newBlob(h.transformTo("arraybuffer",t),r);case"base64":return u.encode(t);default:return h.transformTo(e,t)}}(s,function(e,t){var r,n=0,i=null,s=0;for(r=0;r>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},s.utf8decode=function(e){return h.nodebuffer?o.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,n,i,s=e.length,a=new Array(2*s);for(t=r=0;t>10&1023,a[r++]=56320|1023&n)}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),o.applyFromCharCode(a)}(e=o.transformTo(h.uint8array?"uint8array":"array",e))},o.inherits(a,n),a.prototype.processChunk=function(e){var t=o.transformTo(h.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var r=t;(t=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),t.set(r,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var n=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}(t),i=t;n!==t.length&&(h.uint8array?(i=t.subarray(0,n),this.leftOver=t.subarray(n,t.length)):(i=t.slice(0,n),this.leftOver=t.slice(n,t.length))),this.push({data:s.utf8decode(i),meta:e.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=a,o.inherits(l,n),l.prototype.processChunk=function(e){this.push({data:s.utf8encode(e.data),meta:e.meta})},s.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,a){"use strict";var o=e("./support"),h=e("./base64"),r=e("./nodejsUtils"),u=e("./external");function n(e){return e}function l(e,t){for(var r=0;r>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new h.Buf8(e.length),r=0,n=t.length;r>10&1023,o[n++]=56320|1023&i)}return l(o,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var i=65535&e|0,s=e>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,r){"use strict";var h,c=e("../utils/common"),u=e("./trees"),d=e("./adler32"),p=e("./crc32"),n=e("./messages"),l=0,f=4,m=0,_=-2,g=-1,b=4,i=2,v=8,y=9,s=286,a=30,o=19,w=2*s+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(e,t){return e.msg=n[t],t}function T(e){return(e<<1)-(4e.avail_out&&(r=e.avail_out),0!==r&&(c.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function N(e,t){u._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function U(e,t){e.pending_buf[e.pending++]=t}function P(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function L(e,t){var r,n,i=e.max_chain_length,s=e.strstart,a=e.prev_length,o=e.nice_match,h=e.strstart>e.w_size-z?e.strstart-(e.w_size-z):0,u=e.window,l=e.w_mask,f=e.prev,c=e.strstart+S,d=u[s+a-1],p=u[s+a];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(u[(r=t)+a]===p&&u[r+a-1]===d&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&sh&&0!=--i);return a<=e.lookahead?a:e.lookahead}function j(e){var t,r,n,i,s,a,o,h,u,l,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-z)){for(c.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=r=e.hash_size;n=e.head[--t],e.head[t]=f<=n?n-f:0,--r;);for(t=r=f;n=e.prev[--t],e.prev[t]=f<=n?n-f:0,--r;);i+=f}if(0===e.strm.avail_in)break;if(a=e.strm,o=e.window,h=e.strstart+e.lookahead,u=i,l=void 0,l=a.avail_in,u=x)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<=x&&(e.ins_h=(e.ins_h<=x)if(n=u._tr_tally(e,e.strstart-e.match_start,e.match_length-x),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=x){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=x&&(e.ins_h=(e.ins_h<=x&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-x,n=u._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-x),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(j(e),0===e.lookahead&&t===l)return A;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,N(e,!1),0===e.strm.avail_out))return A;if(e.strstart-e.block_start>=e.w_size-z&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):(e.strstart>e.block_start&&(N(e,!1),e.strm.avail_out),A)}),new M(4,4,8,4,Z),new M(4,5,16,8,Z),new M(4,6,32,32,Z),new M(4,4,16,16,W),new M(8,16,32,32,W),new M(8,16,128,128,W),new M(8,32,128,256,W),new M(32,128,258,1024,W),new M(32,258,258,4096,W)],r.deflateInit=function(e,t){return Y(e,t,v,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?_:(e.state.gzhead=t,m):_},r.deflate=function(e,t){var r,n,i,s;if(!e||!e.state||5>8&255),U(n,n.gzhead.time>>16&255),U(n,n.gzhead.time>>24&255),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(U(n,255&n.gzhead.extra.length),U(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=p(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(U(n,0),U(n,0),U(n,0),U(n,0),U(n,0),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,3),n.status=E);else{var a=v+(n.w_bits-8<<4)<<8;a|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(a|=32),a+=31-a%31,n.status=E,P(n,a),0!==n.strstart&&(P(n,e.adler>>>16),P(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending!==n.pending_buf_size));)U(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindexi&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindexi&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&F(e),n.pending+2<=n.pending_buf_size&&(U(n,255&e.adler),U(n,e.adler>>8&255),e.adler=0,n.status=E)):n.status=E),0!==n.pending){if(F(e),0===e.avail_out)return n.last_flush=-1,m}else if(0===e.avail_in&&T(t)<=T(r)&&t!==f)return R(e,-5);if(666===n.status&&0!==e.avail_in)return R(e,-5);if(0!==e.avail_in||0!==n.lookahead||t!==l&&666!==n.status){var o=2===n.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(j(e),0===e.lookahead)){if(t===l)return A;break}if(e.match_length=0,r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):3===n.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=S){if(j(e),e.lookahead<=S&&t===l)return A;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=x&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=x?(r=u._tr_tally(e,1,e.match_length-x),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):h[n.level].func(n,t);if(o!==O&&o!==B||(n.status=666),o===A||o===O)return 0===e.avail_out&&(n.last_flush=-1),m;if(o===I&&(1===t?u._tr_align(n):5!==t&&(u._tr_stored_block(n,0,0,!1),3===t&&(D(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),F(e),0===e.avail_out))return n.last_flush=-1,m}return t!==f?m:n.wrap<=0?1:(2===n.wrap?(U(n,255&e.adler),U(n,e.adler>>8&255),U(n,e.adler>>16&255),U(n,e.adler>>24&255),U(n,255&e.total_in),U(n,e.total_in>>8&255),U(n,e.total_in>>16&255),U(n,e.total_in>>24&255)):(P(n,e.adler>>>16),P(n,65535&e.adler)),F(e),0=r.w_size&&(0===s&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new c.Buf8(r.w_size),c.arraySet(u,t,l-r.w_size,r.w_size,0),t=u,l=r.w_size),a=e.avail_in,o=e.next_in,h=e.input,e.avail_in=l,e.next_in=0,e.input=t,j(r);r.lookahead>=x;){for(n=r.strstart,i=r.lookahead-(x-1);r.ins_h=(r.ins_h<>>=y=v>>>24,p-=y,0===(y=v>>>16&255))C[s++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(d&(1<>>=y,p-=y),p<15&&(d+=z[n++]<>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(d&(1<>>=y,p-=y,(y=s-a)>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=P,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new I.Buf32(n),t.distcode=t.distdyn=new I.Buf32(i),t.sane=1,t.back=-1,N):U}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,a(e)):U}function h(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=s.wsize?(I.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(n<(i=s.wsize-s.wnext)&&(i=n),I.arraySet(s.window,t,r-n,i,s.wnext),(n-=i)?(I.arraySet(s.window,t,r-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&u)){e.msg="unknown compression method",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break e;o--,u+=n[s++]<>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[s++]<>>8&255,r.check=B(r.check,E,2,0)),l=u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(d=r.length)&&(d=o),d&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,n,s,d,k)),512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,r.length-=d),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break e;for(d=0;k=n[s+d++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&d>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break e;o--,u+=n[s++]<>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==t)break;u>>>=2,l-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break e;o--,u+=n[s++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(d=r.length){if(o>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286>>=3,l-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=_,l-=_,r.lens[r.have++]=b;else{if(16===b){for(z=_+2;l>>=_,l-=_,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],d=3+(3&u),u>>>=2,l-=2}else if(17===b){for(z=_+3;l>>=_)),u>>>=3,l-=3}else{for(z=_+7;l>>=_)),u>>>=7,l-=7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;d--;)r.lens[r.have++]=k}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=o&&258<=h){e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,R(e,c),a=e.next_out,i=e.output,h=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,64&g){e.msg="invalid distance code",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===h)break e;if(d=c-h,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}p=d>r.wnext?(d-=r.wnext,r.wsize-d):r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=i,p=a-r.offset,d=r.length;for(hd?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=t[r+a[v]]}if(k>>7)]}function U(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function P(e,t,r){e.bi_valid>d-r?(e.bi_buf|=t<>d-e.bi_valid,e.bi_valid+=r-d):(e.bi_buf|=t<>>=1,r<<=1,0<--t;);return r>>>1}function Z(e,t,r){var n,i,s=new Array(g+1),a=0;for(n=1;n<=g;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=j(s[o]++,o))}}function W(e){var t;for(t=0;t>1;1<=r;r--)G(e,s,r);for(i=h;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],G(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,G(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,a,o,h=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,c=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(s=0;s<=g;s++)e.bl_count[s]=0;for(h[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<_;r++)p<(s=h[2*h[2*(n=e.heap[r])+1]+1]+1)&&(s=p,m++),h[2*n+1]=s,u>=7;n>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return h;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?J(e,t,r,n):4===e.strategy||s===i?(P(e,2+(n?1:0),3),K(e,z,C)):(P(e,4+(n?1:0),3),function(e,t,r,n){var i;for(P(e,t-257,5),P(e,r-1,5),P(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(A[r]+u+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){P(e,2,3),L(e,m,z),function(e){16===e.bi_valid?(U(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,r){(function(e){!function(r,n){"use strict";if(!r.setImmediate){var i,s,t,a,o=1,h={},u=!1,l=r.document,e=Object.getPrototypeOf&&Object.getPrototypeOf(r);e=e&&e.setTimeout?e:r,i="[object process]"==={}.toString.call(r.process)?function(e){process.nextTick(function(){c(e)})}:function(){if(r.postMessage&&!r.importScripts){var e=!0,t=r.onmessage;return r.onmessage=function(){e=!1},r.postMessage("","*"),r.onmessage=t,e}}()?(a="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",d,!1):r.attachEvent("onmessage",d),function(e){r.postMessage(a+e,"*")}):r.MessageChannel?((t=new MessageChannel).port1.onmessage=function(e){c(e.data)},function(e){t.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(s=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){c(e),t.onreadystatechange=null,s.removeChild(t),t=null},s.appendChild(t)}):function(e){setTimeout(c,0,e)},e.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r" + "" + "" + - "--" + + "--" + "-" if dirname != "." else "", ])) #sort dirnames alphabetically @@ -60,7 +60,7 @@ def main(): "" + subdirname + "--" + "" + - "\n") + "\n") #sort filenames alphabetically filenames.sort() for filename in filenames: @@ -73,7 +73,7 @@ def main(): filename + "" + get_file_size(path) + "" + get_file_modified_time(path) + "" + "" + - "\n") + "\n") f.write("\n".join([ get_template_foot(), diff --git a/src/template/foot.html b/src/template/foot.html index 78b26f0d..70bdabf6 100644 --- a/src/template/foot.html +++ b/src/template/foot.html @@ -161,15 +161,17 @@
Colors
> - - - + + -
Gigamaster openSettingsPanel() { this.isSettingsPanelOpen = true this.$nextTick(() => { -this.$refs.settingsPanel.focus() -}) +this.$refs.settingsPanel.focus()}) }, isNotificationsPanelOpen: false, openNotificationsPanel() { this.isNotificationsPanelOpen = true this.$nextTick(() => { -this.$refs.notificationsPanel.focus() -}) +this.$refs.notificationsPanel.focus()}) }, isMobileSubMenuOpen: false, openMobileSubMenu() { this.isMobileSubMenuOpen = true this.$nextTick(() => { -this.$refs.mobileSubMenu.focus() -}) +this.$refs.mobileSubMenu.focus()}) }, isMobileMainMenuOpen: false, openMobileMainMenu() { this.isMobileMainMenuOpen = true this.$nextTick(() => { -this.$refs.mobileMainMenu.focus() -}) +this.$refs.mobileMainMenu.focus()}) } } } diff --git a/src/template/head.html b/src/template/head.html index 86c09afb..f362f26e 100644 --- a/src/template/head.html +++ b/src/template/head.html @@ -29,16 +29,20 @@ - + + +
- +