-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathindex.html
7 lines (7 loc) · 196 KB
/
index.html
1
2
3
4
5
6
7
<!doctype html><html class=app-animate-in lang=en prefix="og: http://ogp.me/ns#"><title>Unofficial Gunn Web App (UGWA)</title><meta charset=UTF-8><meta content="width=device-width,initial-scale=1" name=viewport><script>window.errorLogger=null,window.logError=function(r){window.errors||(window.errors="[!] If this covers your screen, then UGWA has crashed! Please send a screenshot or copy and paste this error to [email protected]\n"),window.errors+="\n"+r,window.errorLogger&&(window.errorLogger.value=window.errors),"string"==typeof r&&"[!]"===r.slice(0,3)||console.error("[BIG WUCKY]\n"+r)},window.addEventListener&&(window.addEventListener("error",function(r){r.message?window.logError(r.error&&r.error.stack&&0!==r.message.indexOf("Uncaught SyntaxError")?r.error.stack:r.message+" at "+r.filename+":"+r.lineno+":"+r.colno):window.logError("Problem loading "+(r.target.src||r.target.href)),window.onerror=null},!0),window.addEventListener("unhandledrejection",function(r){window.logError(r.reason&&(r.reason.stack||r.reason.message||r.reason))},!1)),window.onerror=function(r,o,e,n,s){n&&(e+=":"+n),window.logError(s&&s.stack?s.stack:r+" at "+o+":"+e)},navigator.serviceWorker&&navigator.serviceWorker.addEventListener("message",function(r){r.data.error&&window.logError(r.data.error)})</script><link href=favicon/apple-touch-icon.png rel=apple-touch-icon sizes=180x180><link href=favicon/favicon-32x32.png rel=icon sizes=32x32 type=image/png><link href=favicon/favicon-16x16.png rel=icon sizes=16x16 type=image/png><link href=favicon/manifest.json rel=manifest><link href=favicon/safari-pinned-tab.svg rel=mask-icon color=#ff594c><link href=favicon/favicon.ico rel="shortcut icon" id=favicon><meta content=favicon/browserconfig.xml name=msapplication-config><meta content=#ff594c name=theme-color><meta content=yes name=apple-mobile-web-app-capable><meta content=black name=apple-mobile-web-app-status-bar-style><meta content="The Gunn HS schedule, including alternates, and a few other features. Serving Gunn students 2017–2021." name=description><meta content=UGWA property=og:title><meta content=website property=og:type><meta content=https://orbiit.github.io/gunn-web-app/ property=og:url><meta content=https://orbiit.github.io/gunn-web-app/images/opengraph.png property=og:image><meta content="The Gunn HS schedule, including alternates, and a few other features. Serving Gunn students 2017–2021." property=og:description><meta content=summary name=twitter:card><meta content=UGWA name=twitter:title><meta content="The Gunn HS schedule, including alternates, and a few other features. Serving Gunn students 2017–2021." name=twitter:description><meta content=https://orbiit.github.io/gunn-web-app/images/opengraph.png name=twitter:image><link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400&family=Material+Icons&display=swap" rel=stylesheet><style>*{-webkit-tap-highlight-color:transparent;-webkit-overflow-scrolling:touch}@media (prefers-reduced-motion){*,::after,::before{animation-duration:0s!important;transition-duration:0s!important}}:focus{outline:0}:root{--theme:#ff594c;--focus:rgba(255, 89, 76, 0.2);--active-back:rgba(255, 89, 76, 0.5)}body{margin:0;font-family:Roboto,sans-serif;font-size:0;transition:all .2s,opacity 0;background-color:var(--background);color:var(--colour);margin-bottom:56px}.hidden,.hide-app>body{opacity:0}.app-animate-in>body{transition:all .2s,opacity .5s}.light{--navbar:#f5f5f5;--background:#fafafa;--off-switch-other-thing:#fafafa;--card:#ffffff;--colour:rgba(0, 0, 0, 0.87);--secondary:rgba(0, 0, 0, 0.54);--input-line:rgba(0, 0, 0, 0.42);--disabled:rgba(0, 0, 0, 0.38);--off-switch-back:rgba(0, 0, 0, 0.38);--ripple:rgba(0, 0, 0, 0.2);--fill:rgba(0, 0, 0, 0.12);--light-border:rgba(0, 0, 0, 0.05);--ripple-focus:rgba(0, 0, 0, 0.05);--pure-contrast:black}.dark{--navbar:#212121;--background:#303030;--off-switch-other-thing:#bdbdbd;--card:#424242;--colour:white;--secondary:rgba(255, 255, 255, 0.7);--input-line:rgba(255, 255, 255, 0.7);--disabled:rgba(255, 255, 255, 0.5);--off-switch-back:rgba(255, 255, 255, 0.3);--ripple:rgba(255, 255, 255, 0.3);--fill:rgba(255, 255, 255, 0.12);--light-border:rgba(0, 0, 0, 0.1);--ripple-focus:rgba(255, 255, 255, 0.05);--pure-contrast:white}label{font-size:14px}.center{text-align:center}.right{text-align:right}.flex{flex:auto}a{color:var(--theme);text-decoration:none}.tab-focus a:focus,a:hover{text-decoration:underline}hr{border:none;border-top:1px solid CurrentColor;opacity:.2;width:150px;margin-left:0}button,input,select,textarea{font:inherit;-webkit-appearance:none}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.material-icons{font-family:'Material Icons';font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:'liga';-webkit-font-smoothing:antialiased;width:24px;overflow:hidden}.section{display:none;max-width:1000px;margin:0 auto;padding:20px;box-sizing:border-box}.section h1{font-size:20px;font-weight:400;display:flex;align-items:center}.section h2{font-size:16px;font-weight:400}.section p{font-size:14px}.footer-utilities .section.utilities{display:block}.footer-clubs .section.clubs{display:block}.footer-schedule .section.schedule{display:block}.footer-staff .section.staff{display:block}.footer-options .section.options{display:block}#footer{box-shadow:0 0 4px rgba(0,0,0,.3);position:fixed;z-index:10;bottom:0;left:0;width:100%;transition:all .2s;background-color:var(--navbar)}#footer ul{max-width:1000px;margin:0 auto;padding:0;list-style:none;display:flex;height:56px;position:relative}#footer .footer-item{display:inline-block;height:100%;cursor:pointer;flex:1 0 0;text-align:center;padding-top:8px;position:relative;box-sizing:border-box;overflow:hidden;transition:all .2s;-webkit-user-select:none;user-select:none;color:var(--secondary)}.tab-focus #footer .footer-item:focus{background-color:var(--focus)}body #footer .footer-item.active{color:var(--theme);padding-top:6px}#footer .footer-item i{font-size:24px}#footer .footer-item span{display:block;text-align:center;font-size:12px;position:absolute;bottom:10px;left:0;right:0;white-space:nowrap;transition:font-size .2s}#footer .footer-item.active span{font-size:14px}#weekwrapper{display:flex;justify-content:center}#weekwrapper>div{width:30px;box-sizing:border-box;padding:0 2px;cursor:pointer;border-radius:5px;position:relative;overflow:hidden;transition:width .2s}#weekwrapper div.today{width:40px}#weekwrapper h1{text-align:center;margin:0;opacity:.5;line-height:1;justify-content:center}#weekwrapper div.today h1{font-weight:700;opacity:1}#weekwrapper span{display:block;width:100%;height:10px;box-shadow:0 1px 3px 0 rgba(0,0,0,.3);margin:4px 0;background-size:cover;background-position:center}#seconds{font-size:50px;display:block;margin:0 auto;border:1px solid transparent;border-radius:50%;height:60px;width:60px;padding:15px;line-height:60px;text-align:center;position:relative;border-color:var(--fill)}#seconds::after{content:'';background-color:#f44336;width:1px;height:40%;position:absolute;bottom:50%;left:0;right:0;margin:auto;transform:var(--rotation);transform-origin:bottom;z-index:-1;transition:transform .2s cubic-bezier(0,1.4,1,1.23);will-change:transform}#seconds.notransition::after{transition:none}.header-with-search{display:flex}.search-wrapper{position:relative;display:inline-flex;margin:0 20px;align-items:center;flex:auto;max-width:300px;margin-top:-12px}.search-wrapper>.material-icons{opacity:.5}.search-wrapper>.customiser-inputwrapper{margin:0;margin-left:16px;height:48px}.search-wrapper>.material.icon{position:absolute;right:0;width:24px;min-height:24px}.search-wrapper>.material.icon>.material-icons{font-size:16px}.notmaterial-input{border:none;background:0 0;color:inherit;font-size:14px;vertical-align:top;padding:5px;border-radius:5px;background-color:var(--fill)}#barcode{margin:0;padding:0;list-style:none}#barcode li:not(.right){display:flex;margin-bottom:10px}#barcode .canvas{flex:auto;position:relative}#barcode canvas{position:absolute;background-color:#fff;padding:20px;box-sizing:border-box;height:102px;width:100%;box-shadow:inset 0 0 3px rgba(0,0,0,.3);bottom:0;left:0;z-index:-1;border-radius:5px}#barcode .viewbarcode canvas{position:fixed;top:0;left:0;right:0;bottom:0;height:150px;width:320px;border-color:#000;border-style:solid;border-width:calc(50vh - 95px) 0;padding:20px calc(50vw - 160px);box-sizing:content-box;border-radius:0;box-shadow:none;z-index:40}.barcode-instructions{display:none}#barcode .viewbarcode .barcode-instructions{display:block;position:fixed;z-index:41;top:0;left:0;font-size:16px;color:rgba(255,255,255,.3);margin:10px}@media (max-width:340px){#barcode .viewbarcode canvas{border-width:calc(50vw - 95px) 0;padding:20px calc(50vh - 160px);transform:translateX(100vw) rotate(90deg);transform-origin:0 0}#barcode .viewbarcode .barcode-instructions{right:0;left:auto;transform:rotate(-90deg);transform-origin:right bottom}}#barcode input{width:100%;border:none;background:0 0;text-align:center;font-family:monospace;cursor:pointer;box-sizing:border-box;border-radius:5px}#barcode .barcode-student-id{font-size:50px;background-color:rgba(255,255,255,.8);padding:20px;height:102px;color:#000}#barcode .barcode-student-name{font-size:16px;padding:0;padding-top:10px;color:inherit}#barcode input:focus{cursor:text}#barcode div{font-size:0}#barcode div button{display:block;margin:10px}#mapimage{max-height:100vh;max-width:100%;margin:0 auto;display:block}body.dark #mapimage{-webkit-filter:hue-rotate(180deg) invert(1);filter:hue-rotate(180deg) invert(1)}.zoom-rotate{border-radius:50%;height:50px;width:50px;pointer-events:none;box-shadow:0 6px 24px rgba(0,0,0,.3);position:fixed;margin-left:-25px;margin-top:-25px;background-color:var(--card);z-index:30}.zoom-dial{background-color:#f44336;position:absolute;top:5px;bottom:50%;left:0;right:0;margin:0 auto;width:1px}#mapgoogle{height:calc(100vh - 96px)}.lists-enabled{display:none}.block-of-text{line-height:1.8}.block-of-text p{margin:.5em 0}.block-of-text blockquote{border-left:5px solid var(--off-switch-back);padding-left:25px;margin-left:0}.percent-wrapper{display:inline-block;font-family:monospace;font-size:14px;background-color:rgba(255,255,255,.12);padding:5px 10px;border-radius:5px}body.light .percent-wrapper{background-color:rgba(0,0,0,.12)}.percent-wrapper input{width:6ch;text-align:right;padding:0;border:0;color:inherit;background:0 0;text-overflow:ellipsis}#anti-ugwaga{display:none;align-items:center;justify-content:center;text-align:center;position:fixed;top:0;left:0;right:0;bottom:0;cursor:pointer;z-index:100}#anti-ugwaga span{display:inline-block;max-width:400px;font-size:30px}.anti-ugwaga>:not(#anti-ugwaga){pointer-events:none;filter:blur(10px)}.anti-ugwaga #anti-ugwaga{display:flex}.small-heading{font-size:.8em;opacity:.7;text-transform:uppercase;display:block;margin-top:10px}.club-links{color:var(--secondary)}.club-links a{color:var(--colour)}.join-club-link{text-transform:uppercase;font-size:.9em}.chat-history{margin-top:-6px}.textarea{display:block;-webkit-appearance:none;border:none;background:0 0;background-color:rgba(0,0,0,.1);width:100%;box-sizing:border-box;resize:vertical;border-radius:10px;color:inherit;font-size:14px;font-family:monospace}#chat{min-height:0;height:0;padding:0 20px;transition:min-height .2s,padding .2s}.chat-enabled #chat,.textarea{min-height:150px;padding:20px}#chatter{display:none}.chat-enabled #chatter{display:block}#open-chat{display:block;margin:10px auto}.chat-enabled #open-chat{display:none}.send-msg-wrapper{display:flex}#msg-content{-webkit-appearance:none;border:none;background:0 0;background-color:var(--fill);color:inherit;height:36px;padding:0 15px;border-radius:20px;flex:auto;margin-right:10px}#preview{white-space:pre-wrap}.strikethrough{color:var(--theme);text-decoration:line-through}.chat-input-length{opacity:.5}#msg-content:disabled,#send:disabled{opacity:.5;pointer-events:none}.glitch,.glitch *{text-shadow:-1px 0 #0ff,1px 0 #ff00ff!important}.ios-cover,.ios-not-safari,.ios-ok,.not-ios-safari .ios-safari,.ok .ios-dialog{display:none}.ios-cover.show{display:block;position:fixed;top:0;left:0;bottom:0;right:0;z-index:20;background-color:rgba(0,0,0,.5)}.ios-dialog{position:absolute;background-color:rgba(255,255,255,.9);padding:0 20px;border-radius:20px;bottom:40px;left:20px;right:20px;text-align:center;color:#000;margin:0 auto;max-width:500px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.ios-dialog::after{content:'';position:absolute;top:100%;right:50%;margin-right:-15px;border-top:15px solid rgba(255,255,255,.9);border-left:15px solid transparent;border-right:15px solid transparent}@media (min-width:550px){.ipad .ios-dialog{bottom:auto;left:auto;right:20px;top:20px}.ipad .ios-dialog::after{top:auto;bottom:100%;right:121px;border-top:none;border-bottom:15px solid rgba(255,255,255,.9)}}.ios-dialog h1{font-size:18px;margin:0;margin-top:20px}.ios-dialog p{font-size:15px;margin:0;margin-top:10px}.ios-dialog .ios-small{font-size:12px}.ios-img{background-size:contain;background-repeat:no-repeat}.show .ios-share-icon{background-image:url(images/ios7share.png);height:20px;width:16px;display:inline-block}.show .ios-add-home{display:block;width:60px;height:60px;background-image:url(images/add-to-home-screen.jpg);border-radius:15px;margin:5px auto}#ios-no-thanks{color:#007aff}.ios-add{color:#007aff;font-weight:700}.ios-button-div{border-top:1px solid rgba(0,0,0,.1);margin:0 -20px;margin-top:10px;padding:5px}.not-ios-safari .ios-dialog{top:50%;bottom:auto;left:20px;right:20px;margin:auto;transform:translateY(-50%)}.not-ios-safari .ios-dialog::after{display:none}.not-ios-safari .ios-not-safari{display:block}.ios-cover.ok{display:flex;align-items:center;justify-content:center;background-color:#fff;pointer-events:none;animation:fade-out 2s 1s forwards}@keyframes fade-out{0%{opacity:1}100%{opacity:0}}.ok .ios-ok{display:block;font-size:80px;color:#000}#error-log{-webkit-appearance:none;border:none;color:red;font-size:14px;font-family:monospace}.error-log{position:fixed;left:0;top:0;width:100%;height:100%;z-index:10000;background-color:#000;background-color:rgba(0,0,0,.8)}.error-log:invalid{display:none}#h-days{overflow-x:hidden}.slider-wrapper{flex:auto;display:inline-block;vertical-align:middle;margin-right:20px}.h-day{display:flex;align-items:center}.h-day .material-switch{vertical-align:middle;margin-left:20px}.h-day .material-range{width:100%}#iframe-window{padding-left:0;padding-right:0;padding-top:44px}#iframe{border:none;width:100%}#iframe-title .material-icons{font-size:16px;margin-left:10px}#club-ad-wrapper,#club-ads-wrapper{display:none}#club-ad-wrapper.club-ad-available,#club-ads-wrapper.club-ad-available{display:block}#club-ads{margin:0;padding:0;white-space:nowrap;overflow-x:auto;display:flex}.club-ad{overflow:hidden;position:relative;cursor:pointer;padding:10px;white-space:normal;width:120px;flex:none;color:inherit}.club-ad:hover{text-decoration:none}.club-ad-thumbnail{border-radius:2px;width:120px;height:90px;object-fit:contain;background-color:var(--ripple-focus)}.club-ad-name{font-size:14px;font-weight:700;display:block;margin-top:10px}#club-ad-viewer{border:none;width:100%;height:360px;resize:vertical;padding-bottom:10px;margin-bottom:-10px}#club-ad-wrapper h1{display:flex;align-items:center}#club-name{flex:auto}.club-ad-show-more.material{display:flex;flex-direction:column;justify-content:center;align-items:center;color:var(--theme);flex:none}.club-ad-show-more-label{margin-top:10px}.club-ad-yt-only{display:flex;justify-content:center;align-items:center;text-align:center;width:150px;padding:10px;flex:none;color:var(--secondary);font-size:14px;white-space:normal}p.secondary{color:var(--secondary);font-size:14px}.collapsible{overflow:hidden;transition:height .2s;box-sizing:border-box}.collapsible span{white-space:pre-wrap}.psa-date{opacity:.5}#next-psa,#prev-psa{vertical-align:middle;margin-left:10px}#psa img{max-width:100%;font-size:16px}.psa-video{position:relative;display:inline-block;overflow:hidden;font-size:0;border-radius:10px}.psa-video::before{content:'\e037';position:absolute;top:50%;left:50%;padding:12px;border-radius:50%;transform:translate(-50%,-50%);background-color:var(--active-back);box-shadow:0 3px 10px rgba(0,0,0,.5);color:#fff;transition:background-color .5s;font-family:'Material Icons';font-size:24px;line-height:1;display:inline-block;-webkit-font-feature-settings:'liga';-webkit-font-smoothing:antialiased;width:24px}.psa-video:hover::before{background-color:var(--theme)}#footer .material-icons{position:relative}#notif{display:none;position:absolute;bottom:100%;right:0;width:20%;justify-content:flex-end}#notif::after{content:'';display:block;position:absolute;right:50%;margin:0 -5px;top:100%;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid var(--theme)}#notif>span{display:block;padding:10px 15px;background-color:var(--theme);font-size:12px;color:#fff;white-space:pre;border-top-left-radius:10px;border-top-right-radius:10px}#new-psa-count{background-color:rgba(255,255,255,.2);padding:0 7.5px;border-radius:10px;margin-left:5px}#new-psa{display:none;background-color:var(--theme);color:#fff;padding:5px 10px;border-radius:2px;font-size:14px;margin-left:10px;vertical-align:middle}.previewing-future-notice-wrapper{max-width:1000px;box-sizing:border-box;padding:0 20px;margin:0 auto;position:absolute;left:0;right:0;top:0}.material-card.previewing-future-notice{display:flex;align-items:center;padding:12px;padding-left:24px;margin:20px;z-index:5;box-shadow:0 6px 24px rgba(0,0,0,.3)}.previewing-future-notice>span{flex:auto}.allowing-swipe{touch-action:pan-y pinch-zoom}#schedulewrapper{position:relative;overflow:hidden}#swipe-preview{display:none;position:absolute;width:100%;top:0;left:0;pointer-events:none}.schedule-container{transition:all .5s}.swiping .schedule-container{transition:none}.swiping #swipe-preview{display:block}.staff-schedule-table{border-top:1px solid var(--light-border);margin:16px 0}.staff-schedule-row{display:flex;text-align:center;align-items:center;min-height:48px;height:0;border-bottom:1px solid var(--light-border)}.staff-schedule-period{flex-basis:30px;font-weight:700}.staff-schedule-no-classes .staff-schedule-period{opacity:.2}.staff-schedule-class{flex:1 0 0}.staff-schedule-room{color:var(--secondary)}.ad.material{width:100%;justify-content:flex-start}.ad-badge{font-size:12px;border:1px solid #fff;padding:2px 5px;border-radius:2px;margin-right:10px;text-transform:uppercase}.health-screening-subtitle-wrapper{display:flex;align-items:center;flex-direction:column;text-align:center}.section .health-screening-subtitle{font-size:12px;color:var(--secondary);max-width:300px}#notif-not-supported{display:none;color:var(--theme)}#no-audio{display:none;position:fixed;top:0;left:0;color:var(--theme);font-size:14px;align-items:center;margin:10px;z-index:15;pointer-events:none}#no-audio .material-icons{margin-right:10px}.bell-volume{display:flex;align-items:center}.bell-volume .material-range{flex:auto;margin:0 24px}.showing-graduation{overflow:hidden}.graduation-wrapper{display:none;position:fixed;z-index:21;background-color:rgba(0,0,0,.5);top:0;left:0;width:100%;height:100%;padding-top:340px;padding-top:20vh;box-sizing:border-box;overflow:auto;flex-direction:column;align-items:center;animation:fade-in .5s}.showing-graduation .graduation-wrapper{display:flex}.showing-graduation-out .graduation-wrapper{display:flex;animation:fade-out .5s forwards;overflow:hidden;pointer-events:none}.graduation-close-msg{font-size:14px;color:rgba(255,255,255,.7);text-align:center;background-color:rgba(0,0,0,.5);padding:5px 10px;border-radius:30px}.showing-graduation .graduation-close-msg{animation:fade-in .5s 1s both}@keyframes fade-in{from{opacity:0}to{opacity:1}}.graduation{position:relative;background-color:var(--card);max-width:600px;width:100%;padding:40px;margin-top:70px;box-sizing:border-box;flex:auto;border-top-left-radius:40px;border-top-right-radius:40px;animation:graduation-in .5s}.showing-graduation-out .graduation{animation:graduation-out .5s forwards}@keyframes graduation-in{from{transform:translateY(50px)}to{transform:translateY(0)}}@keyframes graduation-out{from{transform:translateY(0)}to{transform:translateY(50px)}}.graduation-image{position:absolute;left:50%;top:0;border:10px solid var(--card);background-color:#ddd;width:80px;height:80px;border-radius:50%;margin:-50px;font-size:14px}.graduation h1{font-weight:lighter;font-size:64px;margin:0;line-height:1.1;margin-bottom:20px}.graduation p{font-size:14px;line-height:1.4}@media (max-width:600px){.graduation{border-radius:0;padding:20px;padding-top:40px}}#alternatives{display:grid;gap:20px;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));align-items:flex-start}.alternative{display:block;border:1px solid var(--fill);border-radius:20px;color:inherit;transition:border .2s;position:relative;overflow:hidden}.alternative:first-child{grid-column:1/-1}.alternative:hover,.tab-focus .alternative:focus{text-decoration:none;border-color:var(--colour)}.alternative h2{font-size:14px;margin:20px}.alternative p{margin:20px;white-space:pre-wrap}.alternative img{width:100%}#close-grad{display:flex;margin:0 auto}.grad-end-video{border:none;width:100%;height:300px;border-radius:20px}:disabled{opacity:.5;pointer-events:none}.label{font-size:12px;color:var(--secondary)}.ripple{position:absolute;height:20px;width:20px;margin-left:-10px;margin-top:-10px;transform:scale(0);pointer-events:none;border-radius:50%;background-color:var(--ripple)}@media (prefers-reduced-motion){.ripple{transform:unset!important;border-radius:0;margin:0;left:0!important;top:0!important;width:100%;height:100%}}.ripple.ripple-focus{margin:auto;top:0;left:0;right:0;bottom:0;transform:scale(1);animation:pulse 1s ease-in-out infinite alternate;background-color:var(--ripple-focus)}@keyframes pulse{from{transform:scale(1.05)}to{transform:scale(.95)}}.material{text-transform:uppercase;font-size:14px;line-height:14px;border:none;background:0 0;cursor:pointer;overflow:hidden;display:inline-flex;justify-content:center;align-items:center;text-align:center;position:relative;min-height:36px;box-sizing:border-box;border-radius:2px;font-weight:700;padding:11px 16px;vertical-align:bottom;color:var(--colour);margin:0}.tab-focus a.material:focus,a.material:hover{text-decoration:none}.material.icon{width:36px;padding:0;border-radius:50%;font-size:0;line-height:normal}.material.red{color:var(--theme)}.material.raised{background-color:var(--theme);color:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.3)}.tab-focus .material:focus{box-shadow:0 0 0 5px var(--focus)}.material-switch-wrapper{display:inline-flex;align-items:center}.material-switch{display:inline-block;margin:0;height:14px;width:36px;border-radius:7px;margin-right:15px;vertical-align:bottom;cursor:pointer;position:relative;transition:all .2s;background-color:var(--off-switch-back);flex:none}.material-switch.checked{background-color:var(--active-back)}.material-switch::before,.range-knob::before{content:'';position:absolute;opacity:0;pointer-events:none;height:12px;width:12px;margin:1px;border-radius:50%;transition:all .2s;left:0;background-color:var(--pure-contrast)}.material-switch:focus::before,.range-knob.range-controlled::before{opacity:.1;transform:scale(4)}.material-switch.checked::before{background-color:var(--theme);left:calc(100% - 14px)}.material-switch::after{content:'';display:block;border-radius:50%;height:20px;width:20px;margin-left:-3px;margin-top:-3px;position:absolute;left:0;transition:all .2s;box-shadow:0 1px 5px rgba(0,0,0,.3);background-color:var(--off-switch-other-thing)}.material-switch.checked::after{background-color:var(--theme);left:calc(100% - 20px);margin-left:3px}.radio-wrapper{display:flex;align-items:center}.radio-wrapper,.radio-wrapper *{cursor:pointer}.material-radio{-webkit-appearance:none;-moz-appearance:none;height:16px;width:16px;margin:0;vertical-align:bottom;display:inline-block;position:relative;border-radius:50%;box-sizing:border-box;border:2px solid #000;margin-right:15px;transition:all .2s;border-color:var(--secondary);flex:none}.material-radio::after,.material-radio::before{content:'';display:block;height:8px;width:8px;position:absolute;transform:scale(0);background:var(--theme);top:2px;left:2px;transition:all .2s;pointer-events:none;border-radius:50%}.material-radio::before{opacity:0;top:1px;left:1px;height:10px;width:10px}.material-radio:checked{border-color:var(--theme)}.material-radio:checked::after{transform:scale(1)}.material-radio:focus::before{transform:scale(4);opacity:.1}.is-joke{overflow:hidden;margin:0;max-height:0;transition:all .2s}.radios-wrapper:hover .is-joke{margin:1em 0;max-height:17px}.joke-explanation{margin-left:5px;opacity:0;transition:all .2s}.is-joke:hover .joke-explanation{margin-left:15px;opacity:.5}ul.material-list{margin:0;padding:0;list-style:none;padding:8px 0;margin-left:-20px;margin-right:-20px}ul.material-list li{display:inline-block;width:100%;padding:20px 16px;box-sizing:border-box;overflow:hidden;position:relative;vertical-align:top;font-size:14px}.tab-focus ul.material-list li:focus{background-color:var(--focus)}ul.material-list.clickables li{cursor:pointer}ul.material-list.two-line li{min-height:72px}ul.material-list.three-line li{min-height:88px}@media (min-width:540px){ul.material-list.short li{width:50%}}@media (min-width:710px){ul.material-list.short li{width:calc(100% / 3)}}@media (min-width:900px){ul.material-list.short li{width:25%}}ul.material-list span{display:block;white-space:pre-wrap}ul.material-list span.primary{font-size:16px}body.light .get-error,ul.material-list li.error,ul.material-list span.secondary{color:var(--secondary)}.get-error,ul.material-list li.error{width:100%;font-size:14px;cursor:default;text-align:center;min-height:auto}.scrim{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:15;background-color:rgba(0,0,0,.32);opacity:0;pointer-events:none;transition:opacity .2s}.show-scrim{opacity:1;pointer-events:all}.material-dialog{position:fixed;box-sizing:border-box;margin:auto;top:0;left:0;right:0;bottom:0;max-width:500px;height:80vh;max-height:500px;box-shadow:0 6px 24px rgba(0,0,0,.3);padding:24px;border-radius:2px;padding-top:64px;padding-bottom:52px;opacity:0;pointer-events:none;transform:translateY(-5px);transition:all .2s;z-index:20;word-break:break-word}.dialog-hidden{display:none}.material-dialog.show{opacity:1;pointer-events:all;transform:translateY(0)}.material-card,.material-dialog{background-color:var(--card)}.material-dialog>h1{position:absolute;top:0;left:0;margin:0;padding:24px;padding-bottom:20px;font-size:20px;line-height:1;width:100%;box-sizing:border-box;box-shadow:inset 0 -1px 0 var(--light-border)}.material-dialog>.content{font-size:14px;height:100%;box-sizing:border-box;padding:20px 0;overflow:auto;line-height:1.4}.material-dialog>.buttons{height:52px;box-sizing:border-box;padding:8px 24px;position:absolute;bottom:0;left:0;width:100%;text-align:right;box-shadow:inset 0 1px 0 var(--light-border)}.material-card{position:relative;margin:14px 0;padding:24px;border-radius:2px;box-shadow:0 1px 3px 0 rgba(0,0,0,.3);font-size:14px;overflow:auto}.material-dropdown{display:inline-block;position:relative;vertical-align:middle;font-size:14px;margin:0 5px}.tab-focus .material-dropdown :focus{box-shadow:0 0 0 5px var(--focus)}.mdrop-selected{display:inline-flex;overflow:hidden;height:48px;align-items:center;padding-left:16px;position:relative;cursor:pointer;border-radius:4px;box-shadow:0 1px 3px 0 rgba(0,0,0,.3);background-color:var(--card)}.mdrop-arrow{margin:0 12px}.mdrop-values{position:absolute;top:100%;margin-top:-5px;opacity:0;pointer-events:none;transform:translateY(-5px);transition:all .2s;z-index:20;border-radius:4px;box-shadow:0 1px 3px 0 rgba(0,0,0,.3);background-color:var(--card);padding:8px 0;white-space:nowrap}.mdrop-values.show{opacity:1;pointer-events:all;transform:translateY(0)}.mdrop-value{display:flex;height:48px;align-items:center;padding:0 16px;cursor:pointer;overflow:hidden;position:relative}.material-range{display:inline-block;position:relative;height:24px;width:120px}.material-range.disabled{pointer-events:none;overflow:hidden}.material-range::after,.material-range::before,.range-selected{content:'';position:absolute;height:2px;top:0;bottom:0;margin:auto 0;background-color:var(--active-back)}.material-range::before{left:0;width:var(--min)}.material-range::after{right:0;width:var(--max)}.range-knob{width:12px;height:12px;position:absolute;top:0;bottom:0;margin:auto -6px;border-radius:50%;background-color:var(--theme)}.range-min,.range-selected{left:var(--min)}.range-max,.range-selected{right:var(--max)}.range-knob::before{margin:0;background-color:var(--theme)}.range-selected{background-color:var(--theme)}.material-range.disabled::after,.material-range.disabled::before{background-color:var(--fill)}.material-range.disabled .range-knob,.material-range.disabled .range-selected{background-color:var(--disabled)}.material-range.disabled::before{margin-left:-9px}.material-range.disabled::after{margin-right:-9px}.material-range.disabled .range-selected{margin:auto 9px}.datepicker-wrapper{position:fixed;margin:auto;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;height:60vh;width:250px;box-shadow:0 6px 24px rgba(0,0,0,.3);border-radius:2px;line-height:1;transition:all .2s;z-index:20;background-color:var(--card)}.datepicker-wrapper.hide{opacity:0;pointer-events:none;transform:translateY(-5px)}.datepicker-dayheadings{flex:none;display:flex;align-items:center;height:64px;padding:0 24px;padding-top:4px;box-sizing:border-box;font-size:20px;border-bottom:1px solid var(--light-border)}.datepicker-dayheading{flex:1 0 0;text-align:center}.datepicker-days{flex:auto;height:0;padding:20px 24px;box-sizing:border-box;overflow:auto}.datepicker-has-month{justify-content:center;align-items:center;padding-top:10px}.datepicker-has-month:first-child{padding-top:0}.datepicker-month{font-size:12px;text-transform:uppercase;text-align:center}.datepicker-week{display:flex;position:relative;height:24px}.datepicker-day{cursor:pointer;font-size:14px;padding:5px 0;flex:1 0 0;text-align:center}.datepicker-day.datepicker-selected{background-color:var(--theme);color:#fff;border-radius:50px}.datepicker-day.datepicker-today:not(.datepicker-selected){color:var(--theme)}.there-is-no-school{color:var(--disabled)}.datepicker-days::-webkit-scrollbar{display:none}.datepicker-bottom{display:flex;justify-content:center;border-top:1px solid var(--light-border)}.datepicker-school-year-left{font-size:12px;color:var(--secondary);margin-bottom:0;text-align:center}.customiser-wrapper{display:flex;margin:20px 0}button.customiser-colour{width:36px;background-size:cover;background-position:center}.inputs-wrapper{display:flex;flex:auto}.customiser-inputwrapper{position:relative;flex:auto;margin-left:20px;line-height:1}.customiser-inputwrapper.input-disabled{color:var(--disabled)}@media (max-width:500px){.inputs-wrapper{flex-direction:column}.inputs-wrapper>.customiser-inputwrapper{height:36px;margin-top:-12px;margin-bottom:6px;transition:margin .2s}.inputs-wrapper>.customiser-inputwrapper.filled,.inputs-wrapper>.customiser-inputwrapper.focus{margin-top:5px;margin-bottom:12px}}.customiser-label{font-size:16px;position:absolute;top:16px;height:1em;transition:all .2s;pointer-events:none;color:var(--secondary)}.customiser-inputwrapper.filled .customiser-label{font-size:12px;top:-4px}.customiser-inputwrapper.focus .customiser-label{font-size:12px;color:var(--theme);top:-4px}.customiser-inputwrapper.input-disabled .customiser-label{color:var(--disabled)}body.light .customiser-inputwrapper.focus .customiser-label{opacity:.87}.customiser-input{font-size:16px;background:0 0;padding:0;border:0;position:absolute;color:inherit;top:16px;cursor:pointer;width:100%}.customiser-line{position:absolute;border-top:1px solid var(--input-line);top:32px;margin-top:8px;width:100%;transition:all .2s;pointer-events:none}.customiser-inputwrapper.hover .customiser-line{border-top:2px solid currentColor}.customiser-inputwrapper.focus .customiser-line{border-top:2px solid var(--theme)}.customiser-inputwrapper.input-disabled .customiser-line{border-top:1px dashed var(--disabled)}.customiser-colourwrapper{width:133.75px;margin-right:-6.75px;margin-top:5.25px}.customiser-materialcolour{margin-right:6.75px;margin-top:6.75px;display:inline-block;height:20px;width:20px;border-radius:50%;cursor:pointer;background-color:var(--pure-contrast)}.customiser-image{height:36px;margin:0;transition:margin-top .2s}.customiser-image.filled,.customiser-image.focus{margin-top:15px}.colourpicker-window{box-shadow:0 6px 24px rgba(0,0,0,.3);padding:24px;border-radius:2px;line-height:1;transition:all .2s;font-size:0;z-index:20;background-color:var(--card)}.colourpicker-input{height:48px;margin:0}.colourpicker-svslider{width:100px;height:100px;display:inline-block;margin-right:12px;border-radius:2px}.colourpicker-svindicator{border:1px solid #fff;border-radius:50%;height:5px;width:5px;margin-left:-3px;margin-top:-3px;box-shadow:0 0 3px rgba(0,0,0,.3),inset 0 0 3px rgba(0,0,0,.3)}.colourpicker-hueslider{width:15px;height:100px;display:inline-block;border-radius:2px}.colourpicker-hueindicator{border:1px solid #fff;border-width:1px 0;margin-top:-1px;width:100%;box-shadow:0 0 3px rgba(0,0,0,.3)}.confetti{position:fixed;margin:-60px;z-index:1000;pointer-events:none}button.material.icon.asgn-done-btn{width:48px;height:48px;vertical-align:middle;margin-left:-16px;color:inherit;text-shadow:inherit;flex:none}.asgn-done-btn .material-icons{pointer-events:none;padding:10px}.asgn-line{font-size:14px;position:relative;display:flex;align-items:center}.asgn-line .asgn-category{margin-right:10px}.asgn-due-date{color:var(--secondary);margin-left:10px}.asgn-text{cursor:pointer;font-size:16px;word-break:break-word}.asgn-is-done{opacity:.5}.asgn-is-done>span{text-decoration:line-through}.asgn-upcoming .asgn-is-done button.material.icon.asgn-done-btn{color:var(--theme)}.asgn-edit:hover .asgn-text,.tab-focus .asgn-edit:focus .asgn-text{text-decoration:underline}.tab-focus .asgn-edit:focus{box-shadow:0 0 0 5px var(--focus)}.asgn-due,.asgn-overdue{font-weight:700;color:#fff;text-shadow:none;background-color:#f44336;padding:5px 10px;border-radius:5px;text-transform:uppercase;margin-right:10px;font-size:12px}.asgn-overdue{background-color:#ff9800;color:#000}.asgn-line::after{position:absolute;right:0;top:0;font-size:24px}.asgn-importance-1:not(.asgn-is-done)::after{content:'!';color:var(--secondary)}.asgn-importance-2:not(.asgn-is-done)::after{content:'!!!';color:#2196f3}.asgn-category{display:inline-flex;height:32px;border-radius:16px;padding:0 12px;align-items:center;background-color:#969896;color:#fff;font-size:14px;text-shadow:none;color:#000}.asgn-category-homework{background-color:#8abeb7}.asgn-category-preparation{background-color:#b294bb}.asgn-category-worksheet{background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3)}.asgn-category-reading{background-color:#c66}.asgn-category-quiz{background-color:#b5bd68}.asgn-category-test{background-color:#81a2be}.asgn-category-exam{background-color:#de935f}.asgn-category-presentation{background-color:#f0c674}.asgn-category-materials{background-color:#a3685a}.asgn-category-lab{background-color:#373b41;color:#fff}.asgn-category-other{background-color:#969896}.add-asgn i{pointer-events:none}#asgn-editor .content button{vertical-align:middle}#asgn-content{-webkit-appearance:none;border:none;background:0 0;width:100%;padding:20px;box-sizing:border-box;resize:vertical;background-color:var(--fill);border-radius:10px;color:inherit}#asgn-delete{float:left}.importance button{margin-left:10px;color:var(--theme);transition:all .2s}#low-imp{--theme:#9e9e9e}#medium-imp{--theme:#607d8b}#high-imp{--theme:#2196f3}.assync-status{border-radius:5px;position:fixed;bottom:56px;margin:10px;left:50%;transform:translate(-50%);pointer-events:none;background-color:#27ae60;color:#fff;padding:5px 10px;font-size:14px;transition:opacity .2s,background-color .2s;z-index:30}.assync-disappearing{animation:fade-out .5s 2s forwards}.assync-hidden{opacity:0}.assync-error{background-color:#e74c3c;animation-delay:100s}#assync-auth-wrapper .notmaterial-input,#assync-auth-wrapper button{vertical-align:middle}.is-loading :not(.loading-assync),.is-using-assync .not-using-assync,.isnt-using-assync .using-assync,.loading-assync{display:none}.is-loading .loading-assync{display:block}#assync-id,#join-assync-id{font-family:monospace}button.assync-refresh{margin-left:10px}.schedule-container{width:100%;box-sizing:border-box;padding:0 10px;font-size:0;line-height:1.5;font-family:Roboto,sans-serif}.schedule-container .schedule-dayname{font-weight:400;font-size:60px;margin:0;text-align:center}.schedule-container .schedule-date{font-weight:400;font-size:20px;margin:0;text-align:center;margin-bottom:20px}.totally-not-a-link{color:inherit}.schedule-container .schedule-alternatemsg,.schedule-container .schedule-end,.schedule-container .schedule-noschool{font-size:14px;text-align:center;display:block}body.light .schedule-container .schedule-alternatemsg,body.light .schedule-container .schedule-noschool{color:rgba(0,0,0,.54)}body.dark .schedule-container .schedule-alternatemsg,body.dark .schedule-container .schedule-noschool{color:rgba(255,255,255,.7)}.schedule-container .schedule-noschool{margin:15px 0}.schedule-container .schedule-noschool-sheep{background-size:cover;width:260px;height:200px;margin:auto}body.light .schedule-container .schedule-noschool-sheep{background-image:url(images/sheep-black.png)}body.dark .schedule-container .schedule-noschool-sheep{background-image:url(images/sheep-white.png)}.schedule-container .schedule-endingin{font-size:14px}.schedule-endinginperiod{padding:5px;box-shadow:0 1px 3px 0 rgba(0,0,0,.3);border-radius:2px;background-size:cover;background-position:center;-webkit-box-decoration-break:clone;box-decoration-break:clone}.schedule-container .schedule-periodprogress{height:4px;margin:10px 0;border-radius:2px;overflow:hidden}body.light .schedule-container .schedule-periodprogress{background-color:rgba(0,0,0,.2)}body.dark .schedule-container .schedule-periodprogress{background-color:rgba(255,255,255,.2)}.schedule-container .schedule-periodprogress>div{height:100%;border-radius:2px}body.light .schedule-container .schedule-periodprogress>div{background-color:rgba(0,0,0,.8)}body.dark .schedule-container .schedule-periodprogress>div{background-color:rgba(255,255,255,.8)}.schedule-container .schedule-period{margin:14px 0;padding:24px;border-radius:2px;box-shadow:0 1px 3px 0 rgba(0,0,0,.3);font-size:14px;background-size:cover;background-position:center}.schedule-container .schedule-period>span{display:block}.schedule-container .schedule-periodname{font-size:24px;font-weight:300;margin-bottom:8px}.schedule-container .pd-btns{float:right;opacity:0;pointer-events:none;transition:all .2s}.schedule-container .pd-btns .material-icons{overflow:visible}.schedule-container .pd-btn{margin-left:10px;color:inherit;text-shadow:inherit}.schedule-container .schedule-period:hover .pd-btns,.tab-focus .schedule-container .schedule-period:focus-within .pd-btns{opacity:1;pointer-events:all}.schedule-container .schedule-period.gunn-together{background-image:url(images/gunn-together.svg)!important;background-size:100px;text-shadow:0 1px 3px rgba(0,0,0,.3)}.gt-confuse{background-image:linear-gradient(120deg,#f44336,#9c27b0,#2196f3,#009688,#4caf50,#ffeb3b,#ff9800,#f44336);text-shadow:0 1px 3px rgba(0,0,0,.3);color:#fff}.period-badge{display:inline-flex;align-items:center;height:32px;padding:0 12px;border-radius:16px;text-transform:uppercase;margin-bottom:10px;position:relative;z-index:0}.period-badge::before{content:'';position:absolute;top:0;left:0;height:100%;width:100%;z-index:-1;background-color:currentColor;opacity:.2;border-radius:16px}.finals-badge{color:#fff;text-shadow:none}.finals-badge::before{background-color:var(--theme);opacity:1}.ap-card h1{margin-top:0}.small-heading:not(:first-child){margin-top:10px}.ap-current{font-weight:700}.watt-ad{padding:24px;border-radius:10px;background-color:#fff;color:rgba(0,0,0,.87)}.light .watt-ad{background-color:var(--theme);color:#fff}.light .watt-ad .material.raised{background-color:#fff;color:var(--theme)}.watt-ad h3{font-size:24px;margin:0}</style><script>!function(){"use strict";const e=6,t=/<\/?(p|div|br).*?>|\),? *(?=[A-Z0-9])/g,n=/<.*?>/g,s=/ /g,a=/\(?(1?[0-9])(?::([0-9]{2}))? *(?:am)? *(?:-|–) *(1?[0-9])(?::([0-9]{2}))? *(noon|pm)?\)?/,o=/\r?\n/g,i=/\n\(/g,r=/schedule|extended|lunch/i,l=/holiday|no\s(students|school)|break|development/i;function d(d,c){if(r.test(d)){if(!c)return;const r=[];return(c="\n"+c.replace(i,"(").replace(t,"\n").replace(n,"").replace(s," ")).split(o).map(t=>{let n;const s=t.replace(a,(...e)=>(n=e,"")).trim();if(!n)return void(r.length>0&&(r[r.length-1].name+="\n"+s));let[,o,i=0,l,d=0,c]=n;i=+i,l=+l,d=+d,((o=+o)<e||"pm"===c)&&(o+=12),(l<e||"pm"===c)&&(l+=12);const u=60*o+i,m=60*l+d,p=r.findIndex(e=>e.start===u);~p?(r[p].name+="\n"+s,m>r[p].end&&(r[p].end=m)):r.push({name:s,start:u,end:m})}),r.length>0?r:void 0}if(l.test(d)){if(c)return;return null}}function c(e){const t={};for(let n=e.length;n--;){const s=d(e[n].summary,e[n].description);if(void 0!==s)if(e[n].start.date){const a=new Date(e[n].start.date);for(;a.toISOString().slice(5,10)!==e[n].end.date.slice(5,10);)t[a.toISOString().slice(5,10)]=s,a.setUTCDate(a.getUTCDate()+1)}else t[e[n].start.dateTime.slice(5,10)]=s}return t}const u="AIzaSyDBYs4DdIaTjYx5WDz6nfdEAftXuctZV0o",m="2021-08-11T00:00:00.000-07:00",p="2022-06-02T23:59:59.999-07:00",h="[gunn-web-app] alts.2021-22",g="America/Los_Angeles",f=encodeURIComponent("[email protected]"),y=()=>null,b=e=>e;function w(e){for(let t=e.length;t--;){const n=Math.random()*(t+1)|0;[e[t],e[n]]=[e[n],e[t]]}return e}const v=function(e){window.logError(e)},E=(()=>{try{return localStorage}catch(e){return v(e),{getItem:e=>E[e],setItem(e,t){E[e]=t},removeItem(e){delete E[e]},length:0,key:()=>null}}})();function L(e,t={},n=(e=>"object"==typeof e)){try{const s=JSON.parse(e);return n(s)?s:t}catch(e){return v(e),t}}function k(e,t={},{validate:n}={}){const s=E.getItem(e);return s?L(s,t,n):t}function C(){return new Date(I())}let I=()=>Date.now(),x=null;try{const{timeZone:e}=(new Intl.DateTimeFormat).resolvedOptions();if(e&&e!==g){console.log(e,"is not Gunn's time zone (",g,"), so UGWA will try to simulate it.");const t=new Intl.DateTimeFormat("en-US",{timeZone:g,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),n=function(e){const n=t.format(e),[s,a]=n.split(", "),[o,i,r]=s.split("/"),[l,d]=r.split(" "),[c,u,m]=a.split(":");return new Date("BC"===d?1-l:+l,+o-1,+i,"24"===c?0:+c,+u,+m,e.getMilliseconds())};I=(()=>n(new Date).getTime()),x=function(e){const t=e.getTime()-n(e).getTime();return new Date(e.getTime()+t)}}}catch(e){window.logError(e)}function S(e,t,n){const s=new XMLHttpRequest;s.onreadystatechange=(()=>{4===s.readyState&&(200===s.status?t(s.responseText):n&&n(s.status))}),s.open("GET",e,!0),s.send(null)}const T=fetch("./psa/psas.json"),A=T.then(()=>!0).catch(()=>!1);function D(e,t){const n=document.querySelectorAll(e);for(let e=0,s=n.length;e<s;e++)t(n[e],e)}const M=window.location.pathname.endsWith("appdesign.html")?"?for=appdesign":"",B="#ff594c",P=document.createElement("div");P.className="scrim";let N,O=null;function $(e){if(O){if(O.dialog===e)return;O.dialog.classList.remove("show"),O.onClose()}else P.parentNode||(document.body.appendChild(P),P.getBoundingClientRect()),P.classList.add("show-scrim");O={dialog:e};const t=new Promise(e=>{O.onClose=e});return e.classList.contains("dialog-hidden")?(e.classList.remove("dialog-hidden"),window.requestAnimationFrame(()=>{e.classList.add("show")})):e.classList.add("show"),t}function j(){O&&(O.dialog.classList.remove("show"),O.onClose(),P.classList.remove("show-scrim"),O=null)}function F(){return N||(N=new(window.AudioContext||window.webkitAudioContext)),N}function H(){return I().toString(36)+Math.random().toString(36).slice(2)}P.addEventListener("click",j);const G=new Promise(e=>{window.addEventListener("blur",e,{once:!0})}),R="material-ripple-target",U=new Map;function W({pointerId:e}){const t=U.get(e);t&&t()}function Y(e){if("string"!=typeof e)e.classList.add(R);else for(const t of document.querySelectorAll(e))Y(t)}function X(e,t="text",n=e){const s=document.createElement("div"),a=document.createElement("label"),o=document.createElement("input"),i=document.createElement("div");return s.classList.add("customiser-inputwrapper"),a.classList.add("customiser-label"),a.innerHTML=e,o.classList.add("customiser-input"),o.type=t,o.setAttribute("aria-label",n),o.addEventListener("change",()=>{o.value?s.classList.add("filled"):s.classList.remove("filled")},!1),o.addEventListener("mouseenter",()=>{s.classList.add("hover")},!1),o.addEventListener("mouseleave",()=>{s.classList.remove("hover")},!1),o.addEventListener("focus",()=>{s.classList.add("focus")},!1),o.addEventListener("blur",()=>{s.classList.remove("focus")},!1),i.classList.add("customiser-line"),s.appendChild(a),s.appendChild(o),s.appendChild(i),{wrapper:s,label:a,input:o,line:i,get disabled(){return o.disabled},set disabled(e){o.disabled=e,e?s.classList.add("input-disabled"):s.classList.remove("input-disabled")}}}function q(e,t){const n=document.createElement("span");n.classList.add("mdrop-selected"),n.tabIndex=0,Y(n);const s=document.createElement("span");n.appendChild(s),n.appendChild(Object.assign(document.createElement("i"),{className:"material-icons mdrop-arrow",textContent:""})),e.appendChild(n);const a=document.createElement("div");a.classList.add("mdrop-values"),a.classList.add("show");let o=!1;const i=t.map(([e,t],n)=>{const s=document.createElement("div");if(s.classList.add("mdrop-value"),s.dataset.value=n,s.tabIndex=0,Y(s),"string"==typeof t){const e=document.createElement("span");e.textContent=t,t=e}return s.appendChild(t),a.appendChild(s),t});function r(){a.classList.remove("show"),document.removeEventListener("click",r)}let l,d;return n.addEventListener("click",t=>{a.classList.add("show"),o?a.classList.add("show"):(e.appendChild(a),o=!0),document.addEventListener("click",r),t.stopPropagation()}),a.addEventListener("click",e=>{const n=e.target.closest(".mdrop-value");n&&(l=t[n.dataset.value][0],s.innerHTML=i[n.dataset.value].outerHTML,d&&d(l))}),{set(e){const n=t.findIndex(t=>t[0]===e);return-1!==n&&(l=e,s.innerHTML=i[n].outerHTML),this},get:()=>l,onChange(e){return d=e,this}}}function _({minRange:e=0,onchange:t=y,oninput:n=y,showMin:s=!0}={}){const a=document.createElement("div");a.classList.add("material-range"),a.tabIndex=0;const o=document.createElement("div");o.classList.add("range-knob"),o.classList.add("range-min"),s&&a.appendChild(o);const i=document.createElement("div");i.classList.add("range-knob"),i.classList.add("range-max"),a.appendChild(i);const r=document.createElement("div");r.classList.add("range-selected"),a.appendChild(r);let l,d=0,c=1,u=null;function m(e=!0){c>1&&(c=1),d<0&&(d=0),a.style.setProperty("--min",100*d+"%"),a.style.setProperty("--max",100*(1-c)+"%"),e&&n([d,c])}function p(e){return Math.max(Math.min(((e.touches?e.touches[0].clientX:e.clientX)-l.left)/l.width,1),0)}function h(e){if(u)return;l=a.getBoundingClientRect();const t=p(e);s&&t<(d+c)/2?(u="min",d=t):(u="max",c=t),("min"===u?o:i).classList.add("range-controlled"),document.addEventListener("touchstart"===e.type?"touchmove":"mousemove",g,{passive:!1}),document.addEventListener("touchstart"===e.type?"touchend":"mouseup",f,{passive:!1}),m(),e.preventDefault()}function g(e){const t=p(e);"min"===u?t>c?(u="max",i.classList.add("range-controlled"),o.classList.remove("range-controlled"),d=c,c=t):d=t:t<d?(u="min",o.classList.add("range-controlled"),i.classList.remove("range-controlled"),c=d,d=t):c=t,m(),e.preventDefault()}function f(n){("min"===u?o:i).classList.remove("range-controlled"),u=null,document.removeEventListener("touchend"===n.type?"touchmove":"mousemove",g),document.removeEventListener("touchend"===n.type?"touchend":"mouseup",f),function(n=!0){c-d<e&&(c=Math.min(1,d+e)),c-d<e&&(d=Math.max(0,c-e)),m(),n&&t([d,c])}(),n.preventDefault()}return a.addEventListener("mousedown",h),a.addEventListener("touchstart",h,{passive:!1}),{elem:a,get range(){return[d,c]},set range(e){[d,c]=e,m(!1)}}}document.addEventListener("pointerdown",function({target:e,clientX:t,clientY:n,pointerId:s}){const a=e.closest("."+R);if(!a)return;const o=a.getBoundingClientRect();a.setPointerCapture(s);const i=document.createElement("div");i.classList.add("ripple"),a.classList.contains("ripple-light")&&i.classList.add("ripple-light"),a.classList.contains("ripple-dark")&&i.classList.add("ripple-dark"),i.style.left=t-o.left+"px",i.style.top=n-o.top+"px",a.appendChild(i);const r=I(),l=Math.max(o.width,o.height)/10,d=31*l;let c,u=!1;U.set(s,()=>{u=!0,c=I(),U.delete(s)}),window.requestAnimationFrame(function e(){const t=(I()-r)/d,n=(I()-c)/500;u&&n>1?a.removeChild(i):(i.style.transform=`scale(${t*l})`,i.style.opacity=n?1-n:1,window.requestAnimationFrame(e))})}),document.addEventListener("pointerup",W),document.addEventListener("pointercancel",W),window.addEventListener("load",()=>{D(".radio-wrapper",e=>{const t=e.querySelector("input[type=radio]");e.addEventListener("click",()=>{t.click(),t.focus()},!1)}),D(".material-dialog > .buttons > .close",e=>{e.addEventListener("click",j)})},!1);const V={en:{html:{"12h":"12-hour","24h":"24-hour",about:"About","add-barcode":"Add barcode","add-home":'Tap the share button {share-icon}, select "{add-home|Add to Home Screen}" in the bottom row,{add-home-img}then tap "{add|Add}."',"add-ugwa":"Install UGWA as an app","allow-swipe":"Enable swiping between days?","android-instruct":'{name|Android}—tap on the menu and select "Add to Home Screen"',announcements:"Announcements","asgn-after":"After the schedule","asgn-algorithms":"By use of A L G O R I T H M S","asgn-before":"Before the schedule","asgn-buttons":"{delete|Delete}{cancel|Cancel}{save|Save}","asgn-chrono-primero":"By due date","asgn-display":"Upcoming assignments position","asgn-important-importance":"By priority","asgn-none":"New Zealand","asgn-period-date":"Due by {period} on {date}.","asgn-sort":"Sorting method","ash-creds":"{name|Ash} for a language.",assignments:"Assignments",assync:"Assignment Synchronization System (Assync)","assync-desc":"Assync allows you to sync your assignments across devices. This is an experimental feature.",barcode:"Barcode","barcode-desc":"Click on the eye icon to display; turn up your screen brightness to the max when scanning just in case. Edits are saved automatically. For the curious, student ID cards use Code 39, which you can read about on {wikipedia|Wikipedia}.",bell:"Virtual bell","bell-volume":"Set the volume to zero to disable.",browsers:"UGWA only aims to support the latest versions of Chrome and iOS Safari; others are low-priority.",bugs:"Bug reports",category:"Category: {category}","chrome-instruct":'{name|Chrome}—click the plus sign in the address bar and select "Install"',"click-for-audio":"{icon} Click/tap anywhere so the virtual bell can play.",close:"Close","club-list":"Club list","club-name":"Club name",clubs:"Clubs","clubs-disclaimer":"Please note that club information was taken from the administration's {doc-link|chartered club list document} and {link|spreadsheet as of January 29th, 2021}, so attribute inaccuracies to them.","club-ad-more-info":"More info",comm:"Interstudent communication","control-centre":"Control Centre","control-centre-desc":"If UGWA isn't updating, try these buttons.","coronavirus-heading":"School's closed!","coronavirus-pausd":"PAUSD updates about the coronavirus","coronavirus-subtitle":"Don't trust what UGWA says for the rest of the school year.",credits:"Credits","current-grade":"Current grade: {input}","dark-theme":"Dark theme","desktop-instruct":'{name|Other browsers}—click the star button in the address bar or right click the tab and select "Pin tab"',"disable-lists":"Disable club/staff lists","edit-asgn":"Assignment properties","edit-h":"Set period 8 times",errors:"Runtime error log",events:"Events","export-copy":"copy export code","export-file":"download export code","feature-based":"Many features based on the original Gunn App.","finals-worth":"Portion of grade the final determines: {input}","gmaps-instruct":"{for|For Google Maps}: Only works when you're connected to the internet. If you're on touchscreen and can't scroll back up, try scrolling on the buttons.",graduation:{alt:{title:"To stay up to date, you should use a modern app made by a current Gunn student.","new-app":"If you're reading this, you should join the {discord|unofficial Gunn Discord server}. Also, if you've made your own app, {notify|let us know} so we can list it here."},close:"Continue using UGWA","dismiss-msg":"Click in the shaded area to dismiss.",more:"Read more.",subtitle:"UGWA has updated its schedule for the 2021–2022 school year. There will no longer be new updates. {more}",suppress:"Do not show this again for like a week.",title:"Like the class of 2021, UGWA has graduated."},"h-editor":"Period 8 settings",heaucques:"OK.","health-screening":{subtitle:"Parents or students over 18 must complete ParentSquare before arriving on campus",title:"Health screening form"},"henry-creds":"{name|Henry} made the Google Maps overlay.","hide-preps":'Hide periods with "prep" in their names from the schedule?',"image-instruct":"{for|For the image}: You can use a finger to pan, or two to rotate, zoom, and pan. You can use your mouse to drag, or scroll to zoom or right-click to rotate.","import-file":"Or upload a file: {file} {import|Import}",importance:"Priority: {low|low} {medium|medium} {high|high}",intent:"The app was originally made to make the features of TheGunnApp available to Chromebook users.","ios-instruct":'{name|iOS}—in iOS Safari, tap on the share icon and select "Add to Home Screen"',"kevin-creds":"{name|Kevin} for the French translation.","kill-sw":"Unregister service worker",languages:"Languages","light-theme":"Light theme","lists-disabled":"You've disabled the club and staff lists",loading:"Loading...","loading-assync":"Loading...",lonely:"UGWA will graduate this school year. You should try making your own Gunn schedule app, so it can be advertised by UGWA for next year's students!",map:"Map","mark-psas-read":"{icon} Mark all as read","martin-ad":"{ad|Compelling utility} Martin's GPA Calculation Website",material:"Design based on {link|Material Design}'s icons, colours, and specifications.","matthew-creds":"{name|Matthew} for the virtual bell.","min-grade":"Minimum acceptable grade: {input}",minscore:"Minimum finals score calculator","msg-note":"Only consonants, numbers, spaces, and a few punctuation marks are allowed. 5 messages per 10 seconds.",naw:"Thanks but no thanks","neither-theme":"Neither theme",new:"NEW","new-psa":"New PSA! {count}","no-hour":"No hours","not-using-assync":"{create|Create Assync account} or {id} {join|Sync to account}","notif-no-support":"Your browser doesn't support web notifications.","notif-send-test":"{button|Send test notification} in five seconds.","notif-time-before":"Send a notification {time} when a period starts or ends. (Notifications will only be sent while UGWA is running.)",notifications:"Notifications",numbers:"Numbers only",ok:"OK","open-chat":"Join chat","open-link-before":'Automatically open a period\'s link {time} when it starts. {emphasis|NOTE: Pages cannot be opened automatically unless you allow the "Pop-ups and redirects" permission in the site settings.}',options:"Options","other-apps":"Gunn apps made by other people: {tga-ios|TheGunnApp} by the iOS App Development club · {tga-android|TheGunnApp} by David C. · {bellhop|Bellhop} by Kartik C. · {nugwa|Not UGWA} by Tomer S. · {hw-central|Homework Central} by Saumya S. · {ugwa-backend|WATT} by Yu-Ting C., Kevin Y., and Roger F. · {hwbounty|HWBounty} by John L., Ash R., Dylan L., and Syma C.","other-versions":"Other versions: {gunn-schedule|Gunn Schedule} (no alternate schedules) · {ugwita|Ugwita} (ugly) · {ugwa2|Ugwa 2} (not done) · {ugwisha|Ugwisha}.",periods:"Periods","periods-desc":"Click on the coloured box to change period colour.","prev-chats":"Chat history",reload:"Restart UGWA","report-bugs":"You can {gh|make a new issue on GitHub} or email {email|[email protected]} to make a feature request or bug report.",s1a:"Crisis Text Line",s1b:"741-741",s1c:'For everyone in crisis; text "Help"\nText "LGBTQ" for LGBTQQ-specific support',s2a:"Suicide Prevention Hotline",s2b:"800-273-8256",s2c:"Prevention and crisis resources (national)",s3a:"Suicide & Crisis Line",s3b:"855-278-4204",s3c:"For individuals in crisis (Santa Clara County)",s4a:"Star Vista",s4b:"650-579-0350",s4c:"Crisis intervention (San Mateo County)",s5a:"Uplift",s5b:"408-379-9085",s5c:"Mobile crisis intervention and safety planning",s6a:"Trevor Lifeline",s6b:"866-488-7386",s6c:"LGBTQ crisis intervention and suicide prevention","safari-only":"(this can only be done in the Safari app)",schedule:"Schedule","sean-creds":"{name|Sean} made most of the app.","select-date":"select date",send:"Send","service-creds":"{search|Google Search}, {so|Stack Overflow}, and {mdn|MDN} helped.","show-h":"Show period 8?",show0:"Show zero period?",source:"UGWA is open sourced on {github|Github}.",sponsor:"Sponsored by the ROCK team.",staff:"Staff","staff-disclaimer":"Please note that staff information was taken from the administration's {link|staff directory as of January 29th, 2021}, so attribute inaccuracies to them.","staff-list":"Staff list","staff-name":"Staff name",support:"Student resources",theme:"Theme","this-is-joke":"(This is a joke.)","time-formatting":"Time formatting","title-compact":"Tab title compactness","toggle-pd-add-asgn":'Show "Add assignment" button on period cards?',transfer:"Cross-device settings transfer","trick-cache":"trick the cache","turn-back-on":"Turn back on",units:"Units included","update-title":"Show the time left in the tab title and favicon?","use-iframe":"Open link in an embed as opposed to in a new tab? (Many sites don't allow themselves to be embedded, but Zoom works.)","use-safari":"Open UGWA in Safari first; this can't be done anywhere else.","using-assync":"Your Assync account ID: {id} {leave|Stop synching}",utilities:"Utilities",version:"You are using the {version} version.","want-ugwa-normal":"To install UGWA like a normal app:"},other:{"add-asgn":"Add assignment","add-to-list":"Add to my clubs","alt-msg":'This is an alternate schedule. The school says, "{D}"',"anti-ugwaga":"Click/tap to continue to the Unofficial Gunn Web App",ap:{digital:"Digital","in-person":"In person",source:"See full AP exam schedule",today:"AP exams today"},appname:"Unofficial Gunn Web App (UGWA)",asgn:"Upcoming assignments","asgn-cat-exam":"exam","asgn-cat-homework":"homework","asgn-cat-lab":"lab","asgn-cat-materials":"materials","asgn-cat-other":"other","asgn-cat-preparation":"preparation","asgn-cat-presentation":"presentation","asgn-cat-quiz":"quiz","asgn-cat-reading":"reading","asgn-cat-test":"test","asgn-cat-worksheet":"worksheet","asgn-edit-label":"Edit assignment","assync-loaded":"Assignments loaded.","assync-loading":"Loading assignments...","assync-loading-problem":"There was a problem loading the assignments.","assync-saved":"Changes saved.","assync-saving":"Saving changes...","assync-saving-problem":"There was a problem saving the changes.",async:"Asynchronous","barcode-close-instructions":"Click/tap anywhere to close.","barcode-default":"Intellectual student","barcode-legacy-default":"Student #{N}","barcode-student-placeholder":"Whose ID is this?","blamed-teacher":"Blamed Teacher",brunch:"Brunch",cannot:"There was a problem fetching the image.","close-future":"OK",club:{advisors:"Teacher advisor:",coadvisor:{email:"Coteacher advisor email",name:"Coteacher advisor name"},day:"Meeting day:",desc:"Description:",donation:"Suggested donation:",error:"; couldn't get club data; maybe you aren't connected to the internet?",location:"Location:",presidents:"President(s):",signup:"Sign-up form:",self:{club:"Fun Together Club",day:"Friday",desc:"A club to develop our empathy, resilience and other core social-emotional skills; to help us build trusting relationships with our peers and mentors; and to establish spaces where we feel safe and supported. We believe that we will benefit from challenging our assumptions about the world and each other by asking questions, having meaningful discussions, and remaining open-minded while maintaining our core values. In so doing, we will develop our own identity, without the pressure of formal grading or assessment, and with every effort to play, explore, and appreciate diversity. Our goal is to help ourselves realize that each of us is immeasurably valuable not because of what we have achieved but because of who we are and who we can become. We have one of the best attendance rates; all students are now allowed!",email:"[email protected]",prez:"Tara Firenzi",room:"Any room",teacher:"Courtney Carlomagno",time:"11:05 AM"},"teacher-email":"Teacher email:",tier:"Tier:",time:"Meeting time:",video:"Club presentation video:",zoom:"Zoom link:"},days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday","dead-club":"This club no longer exists at Gunn.","default-alt-msg":"good luck with our schedule lol",doneify:"Mark as done",ds:"S M T W Θ F S","enable-lists":"Enable club/staff lists",ended:"The school year ended.","events-error":"; couldn't get events; maybe you aren't connected to the internet?","export-file-name":"the-settings-of-a-great-intellectual-gunn-student.json",finals:"Finals",flex:"Prime",gmaps:"use google maps","gmaps-error":"Google Maps not loading! Maybe you aren't connected to the internet?",graduation:{alt:"Preview screenshot of {N}"},"gunn-together":{name:"Gunn Together",sem2:"Stay in Period 5 and ask your teacher where to go during Gunn Together. Those with prep should check Schoology.",subtitle:"Ask your Period 5 teacher whom you should meet with during this period."},hex:"Hex",image:"use the image","image-url":"Image URL","import-problem":"There was a problem.","import-warning":"This will permanently override your existing settings. Do you want that?",join:"Join",loading:"Loading...",lunch:"Lunch","lunch-clubs":"Clubs",minscore:"You'll need to score at least {S} to keep your parents happy.","minscore-too-high-addendum":" If there's no extra credit, you're screwed.",months:"January February March April May June July August September October November December",mos:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec","no-events":"No events today :(","no-school":"No school today!","no-study":"You {E}; even if you score 0%, you'll be above your threshold.","no-study-emph":"don't need to study","notif-click-desc":"Click to open link","notif-test":"UGWA test notification","notif-test-subtitle":"It works!",overdue:"overdue",p0:"Zero period","period-link":"{P} link","period-name-label":"Set label for {P}","period-set-link":"Set link for {P}",periodx:"Period {X}","previewing-future":"This is the schedule for the next school day.","psa-date":"Created on {D}.","psa-error":"Could not load PSA: ","remove-from-list":"Remove from my clubs","return-today":"Show today's schedule",self:"SELF","show-more":"Show more",staff:{basement:"Basement:",department:"Department:",email:"Email:",error:"; couldn't get staff data; maybe you aren't connected to the internet?",phone:"Phone:",schedule:"Schedule:",title:"Title:",website:"Website:"},"staff-self-meetings":({S:e,M:t})=>e?t?"Teaches SELF and has counseling.":"Teaches SELF.":t?"Has counseling.":"",summer:"Enjoy your summer!","supreme-leader":"Supreme Leader",symbols:{brunch:"🧃",flex:"Prim.",lunch:"🍱","period-a":"1","period-b":"2","period-c":"3","period-d":"4","period-e":"5","period-f":"6","period-g":"7","period-h":"8","period-zero":"0",self:"SELF"},"time-before":{"before-0-00-10":"10 seconds before","before-0-00-30":"30 seconds before","before-0-01-00":"a minute before","before-0-02-00":"2 minutes before","before-0-05-00":"5 minutes before","before-0-10-00":"10 minutes before","before-0-15-00":"15 minutes before","before-0-30-00":"30 minutes before","before-1-00-00":"an hour before",immediately:"immediately",never:"never"},today:"Today",undoneify:"Unmark as done",universe:"Universe",watt:{heading:"Why aren't you using WATT?",message:"It has the correct times for {NAME} and will be kept up-to-date by current Gunn students.",other:{heading:"Use WATT now.",message1:"It shows the schedule around a clock, which is pretty cool.",message2:"It's asbestos-free.",message3:"It doesn't have any ties with Russia.",message4:"Let go of the past.",message5:"It has updated staff schedules.",message6:"You're holding onto a sinking ship.",message7:"Don't be like those who held onto TheGunnApp even when it was out of date."},switch:"Switch to WATT"},you:"You","yt-only":"Only YouTube and public Google Drive videos are shown here (for thumbnail reasons).","zero-error":"Please don't enter so many zeroes."},placeholders:{assignment:"Assignment",assync:"Assync ID",clubs:"Search clubs",errors:"JavaScript runtime errors will be logged here",import:"Paste exported settings here","send-msg":"Send a message",staff:"Search staff"},times:{branded:"{T} · UGWA",date:"{M} {D}","due-date":({P:e,D:t})=>"due by "+(e?e+" on ":"")+t,duration:({T:e})=>e<1?"less than a minute":(e>=120?Math.floor(e/60)+" hours":e>=60?"an hour":"")+(e%60==0?"":(e>=60?" and ":"")+(e%60==1?"a minute":e%60+" minutes")),"end-date":"The school year ends in {D}.","end-time":"School ends at {T} today.","end-time-in":"School ends in {D} at {T}.",ended:"{P} ended {T} ago.",ending:"{P} ending in {T}.","ending-short":"{T} left",long:"{T} long",month:"{M} {Y}",over:"School's over!",range:"{T1}–{T2} · {D}","school-days":({D:e,W:t})=>`${e} school day${1===e?"":"s"} (${t} week${1===t?"":"s"})`,seconds:"{T}s","self-ended":"Ended {T} ago.","self-ending":"Ending in {T1}; started {T2} ago.","self-starting":"Starting in {T}.",starting:"{P} starting in {T}.","starting-short":"{T} until {P}",timezone:"{L} ({S} PT)"}}};window.langs=V;const z={en:"English","en-gt":"English (Google Translated through Chinese)",es:"español",fr:"français","en-bg":"Engrish",test:"le language test","x-mleng":"L'leng"},J=/(?:\?|&)all-langs/.exec(window.location.search)?Object.keys(z):["en","en-gt","fr"];if(!z[E.getItem("[gunn-web-app] language")]){let e="en";if(navigator.languages)e=navigator.languages.find(e=>z[e])||e;else{const t=navigator.language||navigator.userLanguage;z[t]&&(e=t)}E.setItem("[gunn-web-app] language",e)}const Q=E.getItem("[gunn-web-app] language");function K(e,t="other",n=Q){V[n]||(console.warn(`Language ${n} not loaded.`),V[n]={});const s=e.split("/");s.unshift(t);let a=V[n];for(const o of s){if(!Object.prototype.hasOwnProperty.call(a,o))return"en"===n?(console.warn(`Nothing set for en/${t}/${e}`),e):(console.warn(`Nothing set for ${n}/${t}/${e}`),K(e,t,"en"));a=a[o]}return a}function Z(e,t="other",n={}){let s=K(e,t);return"function"==typeof s?s(n):(s+="",Object.keys(n).forEach(e=>{s=s.replace(`{${e}}`,n[e])}),s)}const ee="en"!==Q?(te=Q,new Promise((e,t)=>{const n=document.createElement("script");n.addEventListener("load",e),n.addEventListener("error",t),n.src=`./js/languages/${te}.js`+M,document.head.appendChild(n)})):Promise.resolve();var te;class ne{constructor(e){this._date=e}get year(){return this._date.getUTCFullYear()}get month(){return this._date.getUTCMonth()}get date(){return this._date.getUTCDate()}get day(){return this._date.getUTCDay()}get dayId(){return this._date.getTime()/864e5}get sunday(){return this.add(-this.day)}add(e){const t=new Date(this._date);return t.setUTCDate(this.date+e),new ne(t)}ugwaLegacy(){return`${this.month+1}-${this.date}`}toLocal(){return new Date(this.year,this.month,this.date)}toString(){return[this.year.toString().padStart(4,"0"),(this.month+1).toString().padStart(2,"0"),this.date.toString().padStart(2,"0")].join("-")}valueOf(){return this.dayId}static get EPOCH(){return new ne(new Date(0))}static from(e,t,n){return new ne(new Date(Date.UTC(e,t,n)))}static today(){const e=C();return ne.from(e.getFullYear(),e.getMonth(),e.getDate())}static parse(e){const[t,n,s]=e.split("-").map(Number),a=ne.from(t,n-1,s);return Number.isNaN(a.dayId)?null:a}static fromDay(e){return ne.EPOCH.add(e)}}class se{constructor(e,t,n,{showDaysLeft:s=!1}={}){this._days=K("ds").split(" "),this._months=K("months").split(" ");const a=this._days;this.start=e,this.end=t,this.selected=null,this.todayEntry=null,this._onChange=new Set,this.dates={},this.weeks=[],this.showDaysLeft=s,this.wrapper=n||document.createElement("div"),this.wrapper.classList.add("datepicker-wrapper"),this.wrapper.classList.add("hide");let o=null,i=e.sunday;for(;i<t;){let n=[];this.weeks.push(n);for(let s=0;s<a.length;s++){if(o!==i.month)if(o=i.month,n.length>0){const e=new Array(n.length).fill({notinrange:!0,placeholder:!0});n.push(...new Array(7-n.length).fill({notinrange:!0,placeholder:!0})),this.weeks.push({month:o,year:i.year}),this.weeks.push(e),n=e}else this.weeks.splice(-1,0,{month:o,year:i.year});const s={day:i,dateId:i.dayId};n.push(s),i>=e&&i<=t?this.dates[i.dayId]=s:s.notinrange=!0,i=i.add(1)}}}open(){if(this.created||this._createElements(),this.wrapper.classList.contains("hide")){this.wrapper.classList.remove("hide");const e=t=>{this.wrapper.contains(t.target)||(this.wrapper.classList.add("hide"),document.removeEventListener("click",e,!1))};if(setTimeout(()=>{document.addEventListener("click",e,!1)},0),this.selected){const e=this.dates[this.selected.dayId];e&&(e.elem.scrollIntoViewIfNeeded?e.elem.scrollIntoViewIfNeeded():e.elem.scrollIntoView())}const t=this.dates[ne.today().dayId]||null;if(t!==this.todayEntry&&(this.todayEntry&&this.todayEntry.elem.classList.remove("datepicker-today"),t&&t.elem.classList.add("datepicker-today"),this.todayEntry=t),this.isSchoolDay){const e=new Set;let n=0,s=ne.today()<this.start,a=this.start;for(;a<=this.end;){const o=this.dates[a.dayId];o===t&&(s=!0),o&&(this.isSchoolDay(a)?(o.elem.classList.remove("there-is-no-school"),s&&(n++,e.add(a.sunday.dayId))):o.elem.classList.add("there-is-no-school")),a=a.add(1)}this.schoolYearLeft.textContent=0===n?K("ended"):Z("end-date","times",{D:Z("school-days","times",{D:n,W:e.size})})}}}_createElements(){if(this.created)return;this.created=!0;const e=this._days;this.header=document.createElement("div"),this.header.classList.add("datepicker-dayheadings");for(const t of e){const e=document.createElement("span");e.classList.add("datepicker-dayheading"),e.innerHTML=t,this.header.appendChild(e)}this.wrapper.appendChild(this.header);const t=document.createElement("div");t.classList.add("datepicker-days");for(const e of this.weeks){const n=document.createElement("div");if(n.classList.add("datepicker-week"),t.appendChild(n),void 0===e.month)for(const t of e){const e=document.createElement("span");t.elem=e,e.classList.add("datepicker-day"),e.dataset.dateId=t.dateId,t.notinrange||(e.textContent=t.day.date),n.appendChild(e)}else{n.classList.add("datepicker-has-month");const t=document.createElement("span");t.classList.add("datepicker-month"),t.textContent=Z("month","times",{M:this._months[e.month],Y:e.year}),n.appendChild(t)}}if(t.addEventListener("click",e=>{if(e.target.classList.contains("datepicker-day")){const t=this.dates[e.target.dataset.dateId];t&&!t.notinrange&&(this.day=t.day)}},!1),this.schoolYearLeft=document.createElement("p"),this.schoolYearLeft.className="datepicker-school-year-left",t.appendChild(this.schoolYearLeft),this.wrapper.appendChild(t),this.selected){const e=this.dates[this.selected.dayId];e&&e.elem.classList.add("datepicker-selected")}const n=document.createElement("div");n.className="datepicker-bottom";const s=document.createElement("button");s.className="material datepicker-today-btn",s.textContent=K("today"),Y(s),s.addEventListener("click",()=>{this.day=ne.today();const e=this.dates[this.day.dayId];e&&e.elem.scrollIntoView({behavior:"smooth",block:"center"})}),n.appendChild(s),this.wrapper.appendChild(n)}get day(){return this.selected}set day(e){if(this.created&&this.selected){const e=this.dates[this.selected.dayId];e&&e.elem.classList.remove("datepicker-selected")}if(e&&this.created&&this.inrange(e)){const t=this.dates[e.dayId];t&&t.elem.classList.add("datepicker-selected")}this.selected=e;for(const t of this._onChange)t(e)}inrange(e){return e>=this.start&&e<=this.end}onChange(e){this._onChange.add(e)}offChange(e){this._onChange.delete(e)}}function ae(e){return void 0!==e&&null!==e&&!1!==e&&""!==e}const oe=/\{(\w+)\}/g;function ie(e,t){const n=["fragment"];let s,a=0;for(;s=oe.exec(e);){n.push(e.slice(a,s.index));const o=s[1];if(void 0===t[o])throw new Error(`l10nArgs is missing argument ${o} in "${e}"`);n.push([t[o],o]),a=s.index+s[0].length}n.push(e.slice(a));const o=n.filter(ae);return e=>o.map(t=>{if("string"==typeof t)return t;{const[n,s]=t,a=e[s];return n?[n,a]:a}})}function re(e,t){return{removed:Object.keys(e).filter(e=>!ae(t[e])),changed:Object.entries(t).filter(([t,n])=>ae(n)&&e[t]!==n)}}function le(e){const t=[];for(let n=0;n<e.length;n++){const s="number"==typeof e[n]?e[n].toString():e[n];if(ae(s))if("string"==typeof s)n>0&&"string"==typeof t[t.length-1]?t[t.length-1]+=s:t.push(s);else{if(!Array.isArray(s))throw console.error(s),new Error("State is neither a string, number, nor array");{const e=de(s);"fragment"===e.tag?t.push(...e.children):t.push(e)}}}return t}function de([e,...t]){"string"==typeof e&&(e={type:e});const[n,...s]=e.type.split("."),a={tag:n,classes:s,properties:{},style:{},dataset:{},options:{},children:le(t)};return e.classes&&a.classes.push(...e.classes.filter(ae)),e.properties&&Object.assign(a.properties,e.properties),e.style&&Object.assign(a.style,e.style),e.dataset&&Object.assign(a.dataset,e.dataset),e.options&&Object.assign(a.options,e.options),a}function ce(e,t,n){if("string"==typeof n)t.state!==n&&(t.node.nodeValue=n);else{const o=t.state||{classes:[],dataset:{},properties:{},style:{}},{removed:i,added:r}=(s=o.classes,a=n.classes,{removed:s.filter(e=>!a.includes(e)),added:a.filter(e=>!s.includes(e))});i.length&&t.node.classList.remove(...i),r.length&&t.node.classList.add(...r);const{removed:l,changed:d}=re(o.properties,n.properties);for(const e of l)delete t.node[e];for(const[e,n]of d)t.node[e]=n;const{removed:c,changed:u}=re(o.style,n.style);for(const e of c)e.includes("-")?t.node.style.removeProperty(e):t.node.style[e]=null;for(const[e,n]of u)e.includes("-")?t.node.style.setProperty(e,n):t.node.style[e]=n;const{removed:m,changed:p}=re(o.dataset,n.dataset);for(const e of m)delete t.node.dataset[e];for(const[e,n]of p)t.node.dataset[e]=n;pe(e,t.node,t.records,n.children)}var s,a;t.state=n}function ue(e,t,n,s={records:[]},a=null){return"string"==typeof n?s.node=document.createTextNode(n):e.customElems[n.tag]?s.node=e.customElems[n.tag](n,s):s.node=document.createElement(n.tag),a?a.parentNode?a.parentNode.replaceChild(s.node,a):console.warn(new Error("Weird, no parent node to replace in?"),a):t.appendChild(s.node),ce(e,s,n),s.state=n,s}function me(e,t=!1){t||(e.node.parentNode?e.node.parentNode.removeChild(e.node):console.warn(new Error("Weird, no parent node to remove from?"),e.node),e.node=null),e.state=null,e.records.splice(0,e.records.length)}function pe(e,t,n,s){for(let a=0;a<s.length;a++){const o=s[a];n[a]?(typeof n[a].state!=typeof o||"string"!=typeof o&&n[a].state.tag!==o.tag)&&me(n[a],!0):n[a]={records:[]},n[a].state?ce(e,n[a],o):ue(e,t,o,n[a],n[a].node)}if(s.length<n.length){const e=n.splice(s.length,n.length-s.length);for(const t of e)me(t)}}function he(e,{customElems:t={}}={}){const n=[];return s=>{const a=le(s);pe({customElems:t},e,n,a)}}const ge={};function fe(e,t=null){const n=k("[gunn-web-app] scheduleapp.plugins",{});if(n[e]||(n[e]=0),null!==t){if("number"!=typeof t)throw new TypeError("New score must be a number");t>n[e]&&(n[e]=t,E.setItem("[gunn-web-app] scheduleapp.plugins",JSON.stringify(n)))}return n[e]}function ye({score:e,highScore:t,gameEnd:n,clicks:s,power:a,extra:o,onKey:i,onUp:r,onLeft:l,onPlay:d,onRight:c,onDown:u,onClick:m,onPower:p,onExtra:h}){return[[{type:"div",style:{display:"flex",alignItems:"center"}},[{type:"div.center",style:{flex:"auto"}},["style",`.egg-snake:focus {box-shadow: 0 0 3px ${B};}`],[{type:"egg-canvas.egg-snake",properties:{width:20,height:20,tabIndex:0},style:{height:"100px",imageRendering:"pixelated",cursor:"pointer",border:"1px solid currentColor"},options:{onKeyDown:i}}]]],["div.center",["div",[{type:"ripple-btn.material.icon",options:{onClick:r}},["i.material-icons","keyboard_arrow_up"]]],["div",[{type:"ripple-btn.material.icon",options:{onClick:l}},["i.material-icons","keyboard_arrow_left"]],[{type:"ripple-btn.material.icon",options:{onClick:d}},["i.material-icons","play_arrow"]],[{type:"ripple-btn.material.icon",options:{onClick:c}},["i.material-icons","keyboard_arrow_right"]]],["div",[{type:"ripple-btn.material.icon",options:{onClick:u}},["i.material-icons","keyboard_arrow_down"]]]],["p","Score: ",null===e?"[press play to start]":e,...n?[" (GAME OVER",n[0]&&" - NEW HIGH SCORE",")"]:[],"; personal high score: ",t],["p","Click on the box to give it focus so you can use arrow keys."],["p",[{type:"ripple-btn.material.ripple-light.raised",options:{onClick:m}},"click me"]," ",s],["p",[{type:"ripple-btn.material.ripple-light.raised",options:{onClick:p}},"extra click per click"]," ",a," click(s) per click (price: ",25*(a+1),s<25*(a+1)&&" (which is too many for you)"," clicks)"],["p",[{type:"ripple-btn.material.ripple-light.raised",options:{onClick:h}},"extra click per second"]," ",o," click(s) per second (price: ",150*o+100,s<150*o+100&&" (which is too many for you)"," clicks; note: this resets when UGWA is refreshed)"]]}const be=["utilities","clubs","schedule","staff","options"],we={},ve={};for(const e of be)ve[e]=new Promise(t=>{we[e]=t}).then(()=>{we[e]=null});function Ee(){let e=E.getItem("[gunn-web-app] section")||"schedule";const t=document.querySelector(`#footer > ul > li[data-section="${e}"]`);t?t.classList.add("active"):(document.querySelector('#footer > ul > li[data-section="schedule"]').classList.add("active"),E.setItem("[gunn-web-app] section","schedule"),document.body.classList.add("footer-schedule"),e="schedule"),we[e]&&we[e]();const n=document.querySelector("#footer > ul");function s(e){const t=n.querySelector(".active");t&&(t.classList.remove("active"),document.body.classList.remove("footer-"+t.dataset.section)),document.querySelector(`#footer > ul > li[data-section="${e}"]`).classList.add("active"),document.body.classList.add("footer-"+e),E.setItem("[gunn-web-app] section",e),we[e]&&we[e]()}if(window.location.search){const e=/(?:\?|&)section=([^&]+)/.exec(window.location.search);e&&s(e[1])}function a(e){if(e.target!==n&&n.contains(e.target)){let t=e.target;for(;"LI"!==t.tagName;)t=t.parentNode;t.classList.contains("footer-item")&&s(t.dataset.section)}}n.addEventListener("click",a,!1),n.addEventListener("keydown",e=>{13===e.keyCode&&a(e)},!1),document.body.classList.add(`footer-${e}`)}let Le,ke,Ce,Ie={},xe=null;if(E.getItem("[gunn-web-app] club-list.spring18-19"))try{Ie=JSON.parse(E.getItem("[gunn-web-app] club-list.spring18-19"))}catch(e){v(e)}const Se=new Promise(e=>Ce=e);function Te(e,t){const n=e.appendChild(Object.assign(document.createElement("div"),{className:"staff-schedule-class",textContent:t.map(([e])=>e).join(", ")})),s=t.find(([,e])=>e);if(s){const[,e]=s;n.appendChild(Object.assign(document.createElement("span"),{className:"staff-schedule-room",textContent:` (${e})`}))}}function Ae(e,t,n){const s=document.createElement("div");if(s.className="staff-schedule-row",s.appendChild(Object.assign(document.createElement("div"),{className:"staff-schedule-period",textContent:t})),n)try{const[e,t]=n;null!==t?(Te(s,e),Te(s,t)):Te(s,e)}catch(e){v(e)}else s.classList.add("staff-schedule-no-classes");e.appendChild(s)}function De(e){return e.toLowerCase().replace(/\W/g,"")}function Me(e,{jsonPath:t,renderPromise:n=Promise.resolve(),insertExtra:s=(()=>{}),sort:a,searchableProps:o=[],secondaryProps:i=[],errMsg:r="",searchPlaceholder:l="",nonexistentItem:d="",props:c=[],specialItem:u=null,onShowItem:m=null,defaultSearch:p=""}){const h=document.getElementById(`section-${e}`),g=h.querySelector(".list"),f=h.querySelector(".search-input"),y=X(l,"search"),b=h.querySelector(".clear-btn"),w=document.getElementById(`info-${e}`),E=w.querySelector("h1"),L=w.querySelector(".content"),k=w.querySelector(".info-permalink");f.parentNode.replaceChild(y.wrapper,f);const C=[];let I;function x(){const e=Object.entries(I).sort(a).map(e=>e[0]),t=document.createDocumentFragment();for(const n of e){const e=I[n],s=Object.assign(document.createElement("li"),{tabIndex:0});Object.assign(s.dataset,{name:n,search:["N_A_M_E "+n,...o.map(t=>"function"==typeof t?t(e):[...t.toUpperCase()].join("_")+" "+(e[t]||""))].join("\n")}),Y(s),t.appendChild(s),C.push(s),s.appendChild(Object.assign(document.createElement("span"),{className:"primary",textContent:n}));for(const t of i)s.appendChild(Object.assign(document.createElement("span"),{className:"secondary",textContent:"email"===t?(e.email||"").replace("pausd.org",""):e[t]}))}g.appendChild(t),y.input.value&&D()}S(("file:"===window.location.protocol?"https://orbiit.github.io/gunn-web-app/":"./")+t,t=>{I=JSON.parse(t),s(I);const a=new RegExp(`(?:\\?|&)show-${e}=([^&]+)`).exec(window.location.search);if(a){const e=De(a[1]),t=Object.keys(I).find(t=>De(t)===e);t&&A(t),window.history.replaceState({},"",window.location.pathname)}n.then(x)},e=>{g.innerHTML=`<li class="error">${e}${r}</li>`});let T=null;function A(t){const n=$(w);E.innerHTML=t,T=t;const s=I[t];if(m&&m(t,s,n),!s)return void(L.innerHTML=`<p>${d}</p>`);L.innerHTML="";const a=document.createDocumentFragment();for(const[e,t,n="text"]of c)if(e in s){const o=document.createElement("p");switch(o.appendChild(Object.assign(document.createElement("strong"),{textContent:t})),o.appendChild(document.createTextNode(" ")),n){case"link":{let t=!0;for(const n of(s[e]||"").split(" "))t?t=!1:o.appendChild(document.createTextNode(" ")),n.startsWith("http")||n.includes("@")?o.appendChild(Object.assign(document.createElement("a"),{href:n.includes("@")?`mailto:${s[e]}`:n,target:"_blank",textContent:n})):o.appendChild(document.createTextNode(n));break}case"schedule":{const t=s[e],n=t.SELF,a=t.Meetings;(n||a)&&o.appendChild(document.createTextNode(Z("staff-self-meetings","other",{S:n,M:a})));const i=document.createElement("div");i.className="staff-schedule-table";let r=!1;for(const e of"1234567")!r&&t[e]&&(r=!0),Ae(i,e,t[e]);t[8]&&(r=!0,Ae(i,"8",t[8])),r&&o.appendChild(i);break}default:o.appendChild(document.createTextNode(s[e]+""))}a.appendChild(o)}L.appendChild(a),s.special&&u&&u(s,L,n),k.href=`?show-${e}=${De(t)}`}function D(){const e=function(e){if(!e)return()=>!0;if("r/"===e.slice(0,2))try{const t=new RegExp(e.slice(2),"i");return e=>t.test(e)}catch(e){v(e)}return e=e.toLowerCase(),t=>t.toLowerCase().includes(e)}(y.input.value);for(const t of C)t.style.display=e(t.dataset.search)?null:"none"}g.addEventListener("click",e=>{let t=e.target;"SPAN"===t.tagName&&(t=t.parentNode),"LI"!==t.tagName||t.classList.contains("error")||A(t.dataset.name)},!1);const M=new RegExp(`(?:\\?|&)${e}-search=([^&]+)`).exec(window.location.search);return y.input.value=M?M[1]:p,y.input.value&&y.wrapper.classList.add("filled"),y.input.addEventListener("input",D,!1),b.addEventListener("click",()=>{y.input.value="",y.wrapper.classList.remove("filled"),D()}),{showItem:A,getCurrent:()=>({name:T,item:I[T]}),getByName:e=>I&&I[e]}}function Be(){const e=document.querySelector("#disable-lists");if(null===E.getItem("[gunn-web-app] scheduleapp.loadLists")&&E.setItem("[gunn-web-app] scheduleapp.loadLists","yes"),!("yes"===E.getItem("[gunn-web-app] scheduleapp.loadLists")))return e.textContent=K("enable-lists"),e.addEventListener("click",()=>{E.setItem("[gunn-web-app] scheduleapp.loadLists","yes"),window.location.reload()},!1),D(".lists-enabled button",e=>e.addEventListener("click",()=>{E.setItem("[gunn-web-app] scheduleapp.loadLists","yes"),window.location.reload()},!1)),void D(".lists-enabled",e=>e.classList.remove("lists-enabled"));e.addEventListener("click",()=>{E.setItem("[gunn-web-app] scheduleapp.loadLists","no"),window.location.reload()},!1),function(){const e=document.getElementById("club-add-list"),t=document.getElementById("club-ads-wrapper"),n=document.getElementById("club-ads"),s=document.getElementById("club-ad-wrapper"),a=document.getElementById("club-name"),o=document.getElementById("club-ad-viewer"),i=document.getElementById("show-club-from-ad"),r=document.getElementById("close-club-ad"),{showItem:l,getCurrent:d,getByName:c}=Me("club",{jsonPath:"json/clubs.json"+M,renderPromise:ve.clubs,insertExtra:e=>{e[K("club/self/club")]={desc:K("club/self/desc"),day:K("club/self/day"),time:K("club/self/time"),president:K("club/self/prez"),teacher:K("club/self/teacher"),email:K("club/self/email"),self:!0,special:!0},Ce();const d=/(?:youtu\.be\/|www\.youtube\.com\/watch\?v=)([\w-]+)/,c=Object.entries(e).map(([e,{video:t,thumbnail:n}])=>{if(n)return{name:e,link:t,embed:t.replace("view","preview"),thumbnail:n};const s=d.exec(t);if(s){const[,t]=s;return{name:e,link:`https://www.youtube.com/watch?v=${t}`,embed:`https://www.youtube.com/embed/${t}/`,thumbnail:`https://img.youtube.com/vi/${t}/default.jpg`}}return null}).filter(e=>e);w(c),Promise.all([A,ve.clubs]).then(e=>{if(!e)return;function d({name:e,link:t,embed:s,thumbnail:a}){const o=Object.assign(document.createElement("a"),{href:t,target:"_blank",className:"club-ad"});Object.assign(o.dataset,{name:e,embed:s}),Y(o),o.appendChild(Object.assign(document.createElement("img"),{src:a,className:"club-ad-thumbnail",draggable:!1})),o.appendChild(Object.assign(document.createElement("span"),{textContent:e,className:"club-ad-name"})),n.appendChild(o)}if(t.classList.add("club-ad-available"),c.slice(0,3).forEach(d),c.length>3){const e=Object.assign(document.createElement("button"),{className:"material club-ad-show-more"});Y(e),e.appendChild(Object.assign(document.createElement("i"),{textContent:"",className:"material-icons club-ad-show-more-icon"})),e.appendChild(Object.assign(document.createElement("span"),{textContent:K("show-more"),className:"club-ad-show-more-label"})),n.appendChild(e),e.addEventListener("click",()=>{c.slice(3).forEach(d),n.removeChild(e),n.appendChild(Object.assign(document.createElement("div"),{textContent:K("yt-only"),className:"club-ad-yt-only"}))})}let u=null;n.addEventListener("click",e=>{const t=e.target.closest(".club-ad");if(!t)return;e.preventDefault();const{name:n,embed:i}=t.dataset;s.classList.add("club-ad-available"),a.textContent=n,o.src=i,u=n}),i.addEventListener("click",()=>{l(u)}),r.addEventListener("click",()=>{u=null,o.src="about:blank",s.classList.remove("club-ad-available")})})},sort:([e],[t])=>e.localeCompare(t),searchableProps:["room","day","time","desc","presidents","teacher","coteacher","tier"],secondaryProps:["day","time"],errMsg:K("club/error"),searchPlaceholder:K("clubs","placeholders"),nonexistentItem:K("dead-club"),props:[["day",K("club/day")],["time",K("club/time")],["room",K("club/location")],["link",K("club/zoom"),"link"],["video",K("club/video"),"link"],["desc",K("club/desc")],["president",K("club/presidents")],["tier",K("club/tier")],["signup",K("club/signup"),"link"],["teacher",K("club/advisors")],["email",K("club/teacher-email"),"link"],["coteacher",K("club/coadvisor/name")],["coemail",K("club/coadvisor/email"),"link"],["donation",K("club/donation")]],specialItem:async(e,t,n)=>{if(e.self){await function(e){if(!ge[e]){const t=new Promise((t,n)=>{const s=document.createElement("link");s.rel="stylesheet",s.href=`./games/${e}.css`,s.addEventListener("load",t),s.addEventListener("error",n),document.head.appendChild(s)}),n=new Promise((t,n)=>{const s=document.createElement("script");s.src=`./games/${e}.js`,s.addEventListener("load",t),s.addEventListener("error",n),document.head.appendChild(s)});ge[e]=Promise.all([t,n])}return ge[e]}("speeddodge");const e=document.createElement("p");e.textContent=`High score: ${fe("speeddodge")}`,t.appendChild(e);const{wrapper:s,stop:a}=window.speeddodge(t=>{e.textContent=`High score: ${fe("speeddodge",t)}`});t.appendChild(s),await n,a()}},onShowItem:t=>{e.textContent=Ie[t]?K("remove-from-list"):K("add-to-list")},defaultSearch:["","monday","tuesday","wednesday","thursday","friday",""][C().getDay()]});Le=l,ke=c,e.addEventListener("click",()=>{const{name:t,item:n}=d();if(t){if(Ie[t])delete Ie[t],e.childNodes[0].nodeValue=K("add-to-list");else{Ie[t]=1;const s=n.day;/monday/i.test(s)&&(Ie[t]*=2),/tuesday/i.test(s)&&(Ie[t]*=3),/wednesday/i.test(s)&&(Ie[t]*=5),/thursday/i.test(s)&&(Ie[t]*=7),/friday/i.test(s)&&(Ie[t]*=11),e.childNodes[0].nodeValue=K("remove-from-list")}E.setItem("[gunn-web-app] club-list.spring18-19",JSON.stringify(Ie)),xe&&xe()}})}(),function(){function e(e,t){const n=e.toLowerCase().replace(/'/g,"").match(/\w+/g);let s="";for(const e of n)t.includes(e)&&(s+=e);return s}const t=function(){const e=document.createElement("div"),t={score:null,highScore:+E.getItem("[gunn-web-app] scheduleapp.snakeHighScore")||0,gameEnd:!1,clicks:+E.getItem("[gunn-web-app] scheduleapp.clicks")||0,power:+E.getItem("[gunn-web-app] scheduleapp.clickPower")||1,extra:0};let n;const s=he(e,{customElems:{"egg-canvas":({options:{onKeyDown:e}})=>{const t=document.createElement("canvas");return n=t.getContext("2d"),t.addEventListener("keydown",e),t},"ripple-btn":({options:{onClick:e}})=>{const t=document.createElement("button");return t.addEventListener("click",e),Y(t),t}}});let a=[0,1];t.onLeft=(()=>{a=[-1,0]}),t.onUp=(()=>{a=[0,-1]}),t.onRight=(()=>{a=[1,0]}),t.onDown=(()=>{a=[0,1]}),t.onKey=(e=>{switch(e.keyCode){case 37:t.onLeft();break;case 38:t.onUp();break;case 39:t.onRight();break;case 40:t.onDown();break;default:return}e.preventDefault()});const o=()=>{let e;do{e=[20*Math.random()>>0,20*Math.random()>>0]}while(i(e));return e},i=e=>{for(const[t,n]of l)if(e[0]===t&&e[1]===n)return!0;return!1},r=()=>{n.clearRect(0,0,20,20),n.fillStyle=B,l.forEach(([e,t])=>{n.fillRect(e,t,1,1)}),n.fillStyle=document.body.classList.contains("dark")?"white":"black",n.fillRect(d[0],d[1],1,1)};let l,d,c,u=!1;return t.onPlay=(()=>{u||(t.score=0,t.gameEnd=null,l=[[9,9]],d=o(),c=3,u=setInterval(()=>{document.body.contains(n.canvas)||(clearInterval(u),u=!1);const e=l[l.length-1],m=[e[0]+a[0],e[1]+a[1]];m[0]<0||m[0]>=20||m[1]<0||m[1]>=20||i(m)?(clearInterval(u),u=!1,t.gameEnd=[t.score>t.highScore],t.score>t.highScore&&(t.highScore=t.score,E.setItem("[gunn-web-app] scheduleapp.snakeHighScore",t.highScore)),s(ye(t))):m[0]===d[0]&&m[1]===d[1]&&(d=o(),c++,t.score++,s(ye(t))),l.push(m),l.length>c&&l.splice(0,1),r()},200),r(),s(ye(t)))}),t.onClick=(()=>{t.clicks+=t.power,E.setItem("[gunn-web-app] scheduleapp.clicks",t.clicks),s(ye(t))}),t.onPower=(()=>{const e=25*(t.power+1);t.clicks>=e&&(t.clicks-=e,E.setItem("[gunn-web-app] scheduleapp.clicks",t.clicks),t.power++,E.setItem("[gunn-web-app] scheduleapp.clickPower",t.power),s(ye(t)))}),t.onExtra=(()=>{const e=150*t.extra+100;t.clicks>=e&&(t.clicks-=e,E.setItem("[gunn-web-app] scheduleapp.clicks",t.clicks),t.extra++,s(ye(t)))}),setInterval(()=>{t.clicks+=t.extra,E.setItem("[gunn-web-app] scheduleapp.clicks",t.clicks),s(ye(t))},1e3),s(ye(t)),e}();Me("staff",{jsonPath:"json/staff.json"+M,renderPromise:ve.staff,insertExtra:e=>{e["Aaryan Agrawal Person"]={game:!0,jobTitle:K("supreme-leader"),department:K("universe"),email:"aperson@",special:!0}},sort:([t,{email:n}],[s,{email:a}])=>{const o=e(t,n),i=e(s,a);return o.localeCompare(i)||t.localeCompare(s)},searchableProps:["jobTitle","department","email","phone",({periods:e})=>e?"P_E_R_I_O_D_S "+Object.entries(e).map(([e,t])=>e+": "+t.map(e=>e?e.map(([e,t])=>`${e} - ${t}`).join(", "):"").join(" / ")).join(" | "):""],secondaryProps:["jobTitle","email"],errMsg:K("staff/error"),searchPlaceholder:K("staff","placeholders"),props:[["jobTitle",K("staff/title")],["department",K("staff/department")],["email",K("staff/email"),"link"],["phone",K("staff/phone")],["webpage",K("staff/website"),"link"],["oc",K("staff/basement"),"link"],["periods",K("staff/schedule"),"schedule"]],specialItem:(e,n)=>{e.game&&(n.innerHTML="",n.appendChild(t))}})}()}const Pe=32,Ne=16,Oe=200;let $e,je;const Fe={customElems:{"ext-link":({options:{ripple:e}})=>{const t=document.createElement("a");return t.target="_blank",e&&Y(t),t},"ripple-btn":()=>{const e=document.createElement("button");return Y(e),e}}},He=ie(K("end-time","times"),{T:"strong"}),Ge=ie(K("end-time-in","times"),{T:"strong",D:null}),Re=ie(K("ended","times"),{P:null,T:"strong"}),Ue=ie(K("ending","times"),{P:null,T:"strong"}),We=ie(K("starting","times"),{P:null,T:"strong"}),Ye=ie(K("self-ended","times"),{T:"strong"}),Xe=ie(K("self-ending","times"),{T1:"strong",T2:null}),qe=ie(K("self-starting","times"),{T:"strong"}),_e=ie(K("alt-msg"),{D:"strong"}),Ve=[K("watt/other/message1"),K("watt/other/message2"),K("watt/other/message3"),K("watt/other/message4"),K("watt/other/message5"),K("watt/other/message6"),K("watt/other/message7")],ze=document.createElement("div");function Je(e){return ze.style.backgroundColor=e,e=(e=ze.style.backgroundColor).slice(e.indexOf("(")+1,e.indexOf(")")).split(/,\s*/).map(e=>+e),Math.round((299*parseInt(e[0])+587*parseInt(e[1])+114*parseInt(e[2]))/1e3)>150}function Qe(e){return Je(e)?"rgba(0,0,0,0.8)":"white"}function Ke(e={}){let t;const n=document.createElement("div");function s(t){return e.periods[t]||{label:t,colour:"#000"}}function a(t,n){if(e.h0Joke)return n+"";{const s=("0"+n).slice(-2);return e.h24?`${t}:${s}`:`${(t+11)%12+1}:${s} ${t<12?"a":"p"}m`}}function o({hour:e,minute:t},n){const s=a(e,t);if(x){const o=n.toLocal();o.setHours(e),o.setMinutes(t);const i=x(o);return Z("timezone","times",{S:s,L:a(i.getHours(),i.getMinutes())})}return s}function i(e,t){return"#"===e[0]?{backgroundColor:e,color:Qe(e)}:{backgroundImage:`url('./.period-images/${t}?${encodeURIComponent(e)}')`,color:"white",textShadow:"0 0 10px black"}}function r(t){return e.compact?`${Math.floor(t/60)}:${("0"+t%60).slice(-2)}`:Z("duration","times",{T:t})}function l(e){return"GT"===e?["span.schedule-endinginperiod.gt-confuse",K("gunn-together/name")]:[{type:"span.schedule-endinginperiod",style:i(s(e).colour,e)},s(e).label]}t=e.element?e.element:document.createElement("div"),n.classList.add("schedule-container"),n.addEventListener("click",e=>{e.target.dataset.club&&(Le(e.target.dataset.club),e.preventDefault())}),e.alternates||(e.alternates={}),e.periods||(e.periods={}),e.normal||(e.normal={}),Qe("rgba(0,0,0,0.2)");const d={1:2,2:3,3:5,4:7,5:11};function c(t,n=e.show0){let a=!1,o=!1;const i=("0"+(t.month+1)).slice(-2)+"-"+("0"+t.date).slice(-2),r=e.selfDays.has(i),l=e.gtDays.has(i);let d;const u=Math.floor((t-ne.from(2020,7,17))/1e3/60/60/24/7);if(e.customSchedule&&(d=e.customSchedule(t))&&d.alternate&&(a=d.alternate,d=d.periods),d)d=d.slice();else if(e.isSummer&&e.isSummer(t))o=!0,d=[];else if(e.alternates[t.ugwaLegacy()]){const n=e.alternates[t.ugwaLegacy()];a=n,d=n.periods.slice()}else d=e.normal[t.day]&&e.normal[t.day].length?e.normal[t.day].map(e=>"function"==typeof e.name?{...e,name:e.name(t)}:e):[];if(d.length){if(e.hPeriods[t.day]){if(!d.find(e=>"H"===e.name)){const[n,s]=e.hPeriods[t.day];d.push({name:"H",start:{hour:Math.floor(n/60),minute:n%60,totalminutes:n},end:{hour:Math.floor(s/60),minute:s%60,totalminutes:s}})}}else d=d.filter(e=>"H"!==e.name);n?!d.find(e=>"0"===e.name)&&c(t.add(-1),!1).periods.length&&d.unshift(e.show0):d=d.filter(e=>"0"!==e.name)}return d=d.map(e=>{if("GT"===e.name){if(r)return{...e,name:"SELF"};let t;if(u>=0&&u<2?t="E":3===u?t="F":u<8?t="ABCDEFG"[7-u]:u>=8&&u<=9?t=" ABCDEFG"[15-u]:10===u?t="G":11===u?t="D":12===u||13===u?t="SELF":15===u?t="C":16===u?t="B":u>20&&(t="E"),t)return{...e,name:t,gunnTogether:!(u>20)||"sem2"}}else if("SELF"===e.name&&l)return{...e,name:"E",gunnTogether:"sem2"};return e}),e.hidePreps&&(d=d.filter(({name:e})=>!s(e).label.toLowerCase().includes("prep"))),{periods:d,alternate:a,summer:o}}function u(e=C()){return e.getMinutes()+60*e.getHours()}const m=.15*Pe,p=document.createElement("canvas");p.width=Pe,p.height=Pe;const h=p.getContext("2d");h.textAlign="center",h.textBaseline="middle",h.lineWidth=.1*Pe,h.lineJoin="round",h.lineCap="round";const g=.45*Pe;let f=null;function y(){if(!e.updateTitle)return void(f=null);const t=I(),n=(f.end-t)/1e3;if(n<0)return f=null,void w();if(f.titleInfo){const{type:t,label:s}=f.titleInfo,a=Z("seconds","times",{T:n.toFixed(3)});let o;"ending"===t?o=e.compact?Z("ending-short","times",{T:a}):Z("ending","times",{P:s,T:a}):"starting"===t&&(o=e.compact?Z("starting-short","times",{P:s,T:a}):Z("starting","times",{P:s,T:a})),document.title=Z("branded","times",{T:o})}const s=f.colour?Je(f.colour)?"black":"white":B;h.fillStyle=f.colour||"white",h.strokeStyle=s,h.clearRect(0,0,Pe,Pe),h.beginPath(),h.moveTo(Pe/2+g,Pe/2),h.arc(Pe/2,Pe/2,g,0,2*Math.PI),h.closePath(),h.fill(),h.beginPath(),h.moveTo(Pe/2,Pe/2-g),h.arc(Pe/2,Pe/2,g,1.5*Math.PI,2*Math.PI*(1-Math.round(n)/60)-Math.PI/2,!0),h.stroke(),h.fillStyle=s,h.font=`bold ${.6*Pe}px "Roboto", sans-serif`,h.fillText(Math.round(n).toString().padStart(2,"0"),Pe/2,.575*Pe),e.favicon.href=p.toDataURL(),f&&setTimeout(y,1e3/15)}function w(){if(f||!e.updateTitle)return;const{title:t,favicon:n,end:a,titleInfo:o}=function(){const t=u(C()),{periods:n}=c(ne.today());if(!n.length)return{title:K("appname"),end:null,favicon:null};let a;for(a=0;a<n.length&&!(t<n[a].end.totalminutes);a++);const o=n[Math.min(a,n.length-1)];if(a>=n.length)return{title:K("appname"),end:null,favicon:null};if(t>=o.start.totalminutes){const{label:n,colour:a}=s(o.name);return{title:e.compact?Z("ending-short","times",{T:r(o.end.totalminutes-t)}):Z("ending","times",{P:n,T:r(o.end.totalminutes-t)}),titleInfo:{type:"ending",label:n},end:o.end.totalminutes,favicon:{minutes:o.end.totalminutes-t,colour:a}}}{const{label:n,colour:a}=s(o.name);return{title:e.compact?Z("starting-short","times",{P:n,T:r(o.start.totalminutes-t)}):Z("starting","times",{P:n,T:r(o.start.totalminutes-t)}),titleInfo:{type:"starting",label:n},end:o.start.totalminutes,favicon:o.start.totalminutes-t<100?{minutes:o.start.totalminutes-t,colour:a}:null}}}();if(null!==a){const e=ne.today().toLocal();if(e.setMinutes(a),e-C()<6e4)return f={end:e.getTime(),colour:n&&"#"===n.colour[0]?n.colour:null,titleInfo:o},void y()}if(document.title=Z("branded","times",{T:t}),null===n)e.favicon.href=e.defaultFavicon;else{const{minutes:t,colour:s}=n,a="#"===s[0];h.clearRect(0,0,Pe,Pe),h.fillStyle=a?s:"white",h.beginPath(),h.moveTo(0,m),h.arc(m,m,m,Math.PI,1.5*Math.PI),h.lineTo(Pe-m,0),h.arc(Pe-m,m,m,-Math.PI/2,0),h.lineTo(Pe,Pe-m),h.arc(Pe-m,Pe-m,m,0,Math.PI/2),h.lineTo(m,Pe),h.arc(m,Pe-m,m,Math.PI/2,Math.PI),h.closePath(),h.fill(),h.fillStyle=a?Je(s)?"black":"white":B,h.font=`bold ${.8*Pe}px "Roboto", sans-serif`,h.fillText(t,Pe/2,.575*Pe),e.favicon.href=p.toDataURL()}}function v(t){let n=!0;const a=u(C());ne.today().dayId!==t.dayId&&(n=!1);const{periods:m,alternate:p,summer:h}=c(t),g=$e[t.day],f=!h&&m.length,y=!h&&!m.length,w=e.getAssignments(t);let v;e.apSchedule[t.toString()]&&(v=["div.material-card.ap-card",["h1",K("ap/today")],[{type:"a",properties:{href:"https://docs.google.com/spreadsheets/d/1o4mS60WSlz64mkgOD1a3-Cw746DSDQwfP_-CyV_YYfk/"}},K("ap/source")],...e.apSchedule[t.toString()].map(([e,n,s])=>["div",["span.small-heading",K(s?"ap/in-person":"ap/digital")," · ",o({hour:Math.floor(e/60),minute:e%60},t)],["span",n]])]);const E=["Lunch","Brunch","Flex"];let L=[];if(f){L=[];const[c]=m.filter(({name:e})=>!E.includes(e)).slice(-1);if(c&&(!n||a>c.end.totalminutes?L.push(["span.schedule-end",He({T:o(c.end,t)})]):L.push(["span.schedule-end",Ge({T:o(c.end,t),D:r(c.end.totalminutes-a)})])),n){let e;for(e=0;e<m.length&&!(a<m[e].end.totalminutes);e++);const t=m[Math.min(e,m.length-1)];if(e>=m.length)L.push(["p.schedule-endingin",Re({P:l(t.name),T:r(a-t.end.totalminutes)})]);else if(a>=t.start.totalminutes){const e=(a-t.start.totalminutes)/(t.end.totalminutes-t.start.totalminutes)*100;L.push(["div.schedule-periodprogress",[{type:"div",style:{width:e+"%"}}]],["p.schedule-endingin",Ue({P:l(t.name),T:r(t.end.totalminutes-a)})])}else L.push(["p.schedule-endingin",We({P:l(t.name),T:r(t.start.totalminutes-a)})])}L.push(v);for(const[l,c]of m.entries()){const u=s(c.name);let m=null;n&&(m=a>=c.end.totalminutes?Ye({T:r(a-c.end.totalminutes)}):a<c.start.totalminutes?qe({T:r(c.start.totalminutes-a)}):Xe({T1:r(c.end.totalminutes-a),T2:r(a-c.start.totalminutes)})),c.end.totalminutes<c.start.totalminutes?L.push(["div.watt-ad",["h3",K("watt/heading")],["p",Z("watt/message","other",{NAME:u.label})],[{type:"ext-link.material.raised.watt-link",properties:{href:"https://gunnwatt.web.app/"},options:{ripple:!0}},K("watt/switch")]]):L.push(["div.watt-ad",["h3",K("watt/other/heading")],["p",Ve[(17*t.dayId+53*l)%Ve.length]],[{type:"ext-link.material.raised.watt-link",properties:{href:"https://gunnwatt.web.app/"},options:{ripple:!0}},K("watt/switch")]]);let p=[];if("Lunch"===c.name&&d[t.day]){const e=[];Object.keys(Ie).forEach(n=>{Ie[n]%d[t.day]==0&&e.push(n)}),e.length&&(p=[["span.small-heading",K("lunch-clubs")],...e.map(e=>{const t=ke&&ke(e),n=t?[t.link&&[{type:"ext-link.join-club-link",properties:{href:t.link}},K("join")],t.time].filter(b).map(e=>[" · ",e]):[];return["span.club-links",[{type:"a",properties:{href:"#"},dataset:{club:e}},e],...n.length?[" (",...[].concat(...n).slice(1),")"]:[]]})])}L.push([{type:"div.schedule-period",classes:["GT"===c.name&&"gunn-together",Je(u.colour)?"light":"dark"],style:i(u.colour,c.name)},"GT"!==c.name&&["span.schedule-periodname",u.label,["span.pd-btns",e.displayAddAsgn&&[{type:"ripple-btn.material.icon.pd-btn.add-asgn",dataset:{pd:c.name}},["i.material-icons","add_task"]],u.link&&[{type:"ext-link.material.icon.pd-btn",properties:{href:u.link},options:{ripple:!0}},["i.material-icons",""]]]],c.async&&["div.period-badge",K("async")],c.final&&["div.period-badge.finals-badge",K("finals")],(c.gunnTogether||"GT"===c.name)&&["div.period-badge.gunn-together-badge",K("gunn-together/name")],"GT"===c.name&&["span",K("gunn-together/subtitle")],"sem2"===c.gunnTogether&&["span",K("gunn-together/sem2")],["span",Z("range","times",{T1:o(c.start,t),T2:o(c.end,t),D:Z("long","times",{T:r(c.end.totalminutes-c.start.totalminutes)})})],["span",m],w[c.name],...p])}}else if(y||h){const e=(k=8*t.dayId,()=>{k=1831565813+(k|=0)|0;let e=Math.imul(k^k>>>15,1|k);return(((e=e+Math.imul(e^e>>>7,61|e)^e)^e>>>14)>>>0)/4294967296}),n=t.dayId%2<1?Math.floor(e()*Math.ceil(Ne/2)):Math.floor(e()*Math.floor(Ne/2))+Math.ceil(Ne/2);L=[h?["span.schedule-noschool",K("summer")]:["span.schedule-noschool",K("no-school")],v,[{type:"div.schedule-noschool-sheep",style:{backgroundPositionY:n*Oe+"px"}}]]}var k;return[["h2.schedule-dayname",g],["h3.schedule-date",[{type:"a.totally-not-a-link",properties:{href:`?date=${t}`}},Z("date","times",{M:je[t.month],D:t.date})]],w.noPeriod,!h&&p&&["span.schedule-alternatemsg",_e({D:p.description})],...L]}e.viewDay||(e.viewDay=ne.today());const E=he(n,Fe);function L(e,{start:t=!0,end:n=!0}={}){const s=ne.today(),a=s.toLocal(),o=c(s),i=(I()-a)/1e3;for(const s of o.periods){const r={period:s,schedule:o};if(t&&e(60*s.start.totalminutes,i,r))return{period:s.name,time:60*s.start.totalminutes*1e3+a.getTime(),type:"start"};if(n&&e(60*s.end.totalminutes,i,r))return{period:s.name,time:60*s.end.totalminutes*1e3+a.getTime(),type:"end"}}return null}const k=[],S=[],T=[],A=[];let D=ne.today().dayId;const M=50;let P,N;function O(){const t=C().toISOString().slice(0,16);if(t!==P){$.render(),P=t;for(const{timer:e,next:t,update:n}of k)e.enabled&&!t&&n();for(const e of A)e()}N=e.update?setTimeout(O,M):null;for(const{next:e,onNext:t,update:n}of k)e&&I()>=e.time&&(t(),n());const n=ne.today().dayId;if(n!==D){D===e.viewDay.dayId&&(e.viewDay=ne.today(),e.autorender&&$.render()),D=n;for(const e of S)e()}}const $={options:e,element:t,container:n,render(){E(v(e.viewDay)),w()},update(){e.update=!0,$.render(),N&&clearTimeout(N),P=C().toISOString().slice(0,16),N=setTimeout(O,M)},stopupdate(){e.update=!1,N&&(clearTimeout(N),N=null)},get viewDay(){return e.viewDay},setViewDay(t){const n=e.viewDay;e.viewDay=t,e.autorender&&$.render();for(const s of T)s({date:e.viewDay,change:n.dayId!==t.dayId})},setPeriod(t,{name:n,colour:s,link:a},o){void 0!==n&&(e.periods[t].label=n),void 0!==s&&(e.periods[t].colour=s),void 0!==a&&(e.periods[t].link=a),o&&$.render()},getWeek(){const t=[],n=e.viewDay.sunday;for(let a=0;a<7;a++){const o=n.add(a),i=[],r=c(o).periods;if(r.length)for(const e of r){const t=s(e.name);t.id=e.name,i.push(t)}e.viewDay.day===a&&(i.today=!0),i.date=o,t.push(i)}return t},addTimer(e,t,n={enabled:!0}){n.update=(()=>(s.next=n.enabled?e(L):null,n));const s={timer:n,onNext:()=>{t(s.next,{getSchedule:c,getUsefulTimePhrase:r})},update:n.update,next:null};return k.push(s),n},onNewDay(e,t=!1){S.push(e),t&&e()},onViewingDayChange(t,{onNewDay:n=!1,callImmediately:s=!1}={}){T.push(t),n&&S.push(()=>{t({date:e.viewDay,change:"new day"})}),s&&t({date:e.viewDay,change:"init"})},onMinute(e,t=!1){const n=()=>{e({getUsefulTimePhrase:r,totalMinutes:u()})};return A.push(n),t&&n(),n},getTotalMinutes:u,getPeriodSpan:l,getSchedule:c,isEndOfDay:()=>{const e=u(C()),{periods:t}=c(ne.today());return t.length&&e-t[t.length-1].end.totalminutes>=60},getRenderedScheduleForDay:v,displayCurrentStatus:w,resetCurrentStatus:function(){document.title=K("appname"),e.favicon.href=e.defaultFavicon}};return t.appendChild(n),$}function Ze(e,t){let n;t&&"CANVAS"===t.tagName?n=t:(n=document.createElement("canvas"),t=void 0);const s=n.getContext("2d");try{n.style.imageRendering="optimizeSpeed",n.style.imageRendering="-moz-crisp-edges",n.style.imageRendering="-webkit-optimize-contrast",n.style.imageRendering="-o-crisp-edges",n.style.imageRendering="pixelated",n.style.msInterpolationMode="nearest-neighbor"}catch(e){v(e)}e="*"+e.toUpperCase().replace(/[^A-Z0-9\-. +/$%]/g,"")+"*",n.height=100,n.width=16*e.length-1,t&&s.clearRect(0,0,n.width,n.height),s.fillStyle="white",s.fillRect(0,0,n.width,n.height),s.fillStyle="black";for(let t=0,a=0;t<e.length;t++){const o=Ze.values[e[t]].toString(3);for(let e=0;e<o.length;e++)switch(o[e]){case"2":s.fillRect(a,0,3,n.height),a+=4;break;case"1":s.fillRect(a,0,1,n.height),a+=2;break;case"0":a+=2}}return n}function et(){const e="95000000",t=document.querySelector("#barcode"),n=document.querySelector("#addbarcode");let s=[[K("you"),e]];const a=[],o=E.getItem("[gunn-web-app] barcode.ids");o&&(s="A"===o[0]?L(o.slice(1),[],Array.isArray):o.split(",").map((e,t)=>[K("barcode-legacy-default").replace("{N}",t),e]));const i=/(?:\?|&)barcode=([^&]+)/.exec(window.location.search),r=i&&decodeURIComponent(i[1]);function l(){E.setItem("[gunn-web-app] barcode.ids","A"+JSON.stringify(a.map(([e,t])=>[e.value,t.value])))}function d([n=K("barcode-default"),s=e]=[]){let o=document.createElement("li"),i=document.createElement("div"),d=document.createElement("input"),c=document.createElement("canvas"),u=document.createElement("div"),m=document.createElement("div"),p=document.createElement("button"),h=document.createElement("button");i.classList.add("canvas");const g=document.createElement("input");return g.value=n,g.placeholder=K("barcode-student-placeholder"),g.classList.add("barcode-student-name"),g.addEventListener("input",()=>{l()},!1),i.appendChild(g),d.value=s,d.classList.add("barcode-student-id"),d.addEventListener("input",()=>{Ze(d.value,c),l()},!1),i.appendChild(d),Ze(s,c),c.addEventListener("click",()=>{o.classList.remove("viewbarcode"),window.history.replaceState({},"",window.location.pathname)},!1),i.appendChild(c),u.className="barcode-instructions",u.textContent=K("barcode-close-instructions"),i.appendChild(u),o.appendChild(i),p.classList.add("material"),p.classList.add("icon"),Y(p),p.addEventListener("click",()=>{a.splice(a.indexOf(d),1),t.removeChild(o),o=i=d=c=m=p=h=u=null,l()},!1),p.innerHTML='<i class="material-icons"></i>',m.appendChild(p),h.classList.add("material"),h.classList.add("icon"),Y(h),h.addEventListener("click",()=>{setTimeout(()=>{o.classList.add("viewbarcode")}),window.history.replaceState({},"","?barcode="+encodeURIComponent(s))},!1),s===r&&o.classList.add("viewbarcode"),h.innerHTML='<i class="material-icons"></i>',m.appendChild(h),o.appendChild(m),a.push([g,d]),o}const c=document.createDocumentFragment();for(let e=0;e<s.length;e++)c.appendChild(d(s[e]));t.insertBefore(c,n.parentNode),n.addEventListener("click",()=>{t.insertBefore(d(),n.parentNode),l()},!1),l()}Ze.values={0:349,1:581,2:419,3:661,4:347,5:589,6:427,7:341,8:583,9:421,A:599,K:605,U:527,B:437,L:443,V:311,C:679,M:685,W:553,D:383,N:389,X:293,E:625,O:631,Y:535,F:463,P:469,Z:319,G:359,Q:371,"-":287,H:601,R:613,".":529,I:439,S:451," ":313,J:385,T:397,"*":295,"+":2521,"/":2467,$:2461,"%":3007};var tt={"2021-05-05":[[720,"Japanese",!0]],"2021-05-10":[[480,"French",!0]],"2021-05-11":[[480,"Spanish Language",!0]],"2021-05-12":[[720,"Music Theory",!0]],"2021-05-14":[[720,"Chinese",!0]],"2021-05-18":[[540,"English Literature",!1],[780,"Comp Sci A",!1]],"2021-05-19":[[540,"US History",!1],[780,"Macroeconomics",!1]],"2021-05-20":[[780,"Psychology",!1]],"2021-05-21":[[720,"German",!0],[720,"Spanish Literature",!0]],"2021-05-24":[[480,"Calculus AB",!0],[480,"Calculus BC",!0],[720,"Physics 1",!0],[720,"Physics C: Mech.",!0]],"2021-05-25":[[480,"Chemistry",!0],[480,"Physics C: E&M",!0],[720,"Statistics",!0]],"2021-05-26":[[780,"Comp Sci Principles",!1]],"2021-05-27":[[540,"Biology",!1],[780,"APES",!1]],"2021-05-28":[[540,"Human Geo.",!1],[780,"Microeconomics",!1]],"2021-06-09":[[540,"Calculus AB",!1],[540,"Calculus BC",!1],[780,"Physics 1",!1],[780,"Physics C: Mech.",!1]],"2021-06-10":[[540,"Chemistry",!1],[540,"Physics C: E&M",!1],[780,"Statistics",!1]]};const nt=["homework","preparation","worksheet","reading","quiz","test","exam","presentation","lab","materials","other"];function st(e){switch(e){case"homework":return K("asgn-cat-homework");case"preparation":return K("asgn-cat-preparation");case"worksheet":return K("asgn-cat-worksheet");case"reading":return K("asgn-cat-reading");case"quiz":return K("asgn-cat-quiz");case"test":return K("asgn-cat-test");case"exam":return K("asgn-cat-exam");case"presentation":return K("asgn-cat-presentation");case"lab":return K("asgn-cat-lab");case"materials":return K("asgn-cat-materials");default:return K("asgn-cat-other")}}const at=60,ot=50,it=1e3,rt=2e-4;const lt=1,dt={};let ct=0;class ut{constructor(e={},t=H()){this.setProps(e),this.id=ct++,this.assyncID=t,dt[this.id]=this,this.manager=null,this.dueObj||(this.dueObj=ne.from(2e3,0,1))}setProps({text:e="",category:t="homework",importance:n=0,dueObj:s,period:a=null,done:o=!1}={}){void 0!==e&&(this.text=e),t&&(this.category=t),void 0!==n&&(this.importance=n),s&&this.setDue(s),"null"===a&&(a=null),void 0!==a&&(this.period=a),void 0!==o&&(this.done=o)}setDue(e){void 0!==e.y&&(e=ne.from(e.y,e.m,e.d)),this.dueObj=e,this.due=e.dayId}get sortableImportance(){return this.done?-1:this.importance}get algorithmicValue(){return this.due-this.sortableImportance*lt}remove(){if(delete dt[this.id],this.manager){const e=this.manager.assignments.indexOf(this);~e&&this.manager.assignments.splice(e,1),this.manager=null}}managedBy(e){return this.manager=e,this}asPeriodInline({today:e}={}){return[{type:"div.asgn-line",classes:[`asgn-importance-${this.importance}`,this.done&&"asgn-is-done"],dataset:{asgnId:this.id}},[{type:"ripple-btn.asgn-done-btn.material.icon",properties:{ariaLabel:this.done?K("undoneify"):K("doneify")}},["i.material-icons",this.done?"":""]],[{type:"span.asgn-edit",properties:{tabIndex:0,ariaLabel:K("asgn-edit-label")}},[`span.asgn-category.asgn-category-${this.category}`,st(this.category)],["span.asgn-text",this.text]]]}toElem({today:e,getPeriodSpan:t=null}={}){const n=document.createElement("div");n.classList.add("asgn-line"),n.classList.add("asgn-importance-"+this.importance),n.dataset.asgnId=this.id,this.done&&n.classList.add("asgn-is-done");const s=document.createElement("button");s.classList.add("asgn-done-btn"),s.classList.add("material"),s.classList.add("icon"),s.setAttribute("aria-label",this.done?K("undoneify"):K("doneify")),Y(s);const a=document.createElement("i");a.classList.add("material-icons"),a.innerHTML=this.done?"":"",s.appendChild(a),n.appendChild(s);const o=document.createElement("span");o.className="asgn-edit",o.tabIndex=0,n.appendChild(o);const i=document.createElement("span");if(i.classList.add("asgn-category"),i.classList.add("asgn-category-"+this.category),i.textContent=st(this.category),o.appendChild(i),e>this.due){const e=document.createElement("span");e.classList.add("asgn-overdue"),e.textContent=K("overdue"),o.appendChild(e)}const r=document.createElement("span");r.classList.add("asgn-text"),r.textContent=this.text,o.appendChild(r);const l=document.createElement("span");return l.classList.add("asgn-due-date"),l.innerHTML=Z("due-date","times",{P:this.period&&t&&t(this.period),D:Z("date","times",{M:je[this.dueObj.month],D:this.dueObj.date})}),o.appendChild(l),n}toJSON(){return{text:this.text,category:this.category,importance:this.importance,dueObj:{d:this.dueObj.date,m:this.dueObj.month,y:this.dueObj.year},period:this.period,done:this.done,assyncID:this.assyncID}}toString(){return`D${this.due} I${this.importance} C-${this.category} ${this.text}`}}class mt{constructor(e=mt.newHash()){this.hash=e,this.status=document.createElement("div"),this.setStatus("idk"),document.body.appendChild(this.status)}setStatus(e="idk",t="load"){switch(this.status.className="assync-status",e){case"loading":this.status.textContent=K("load"===t?"assync-loading":"assync-saving"),this.status.classList.add("assync-loading");break;case"loaded":this.status.textContent=K("load"===t?"assync-loaded":"assync-saved"),this.status.classList.add("assync-disappearing");break;case"problem":this.status.textContent=K("load"===t?"assync-loading-problem":"assync-saving-problem"),this.status.classList.add("assync-error"),this.status.classList.add("assync-disappearing");break;default:this.status.classList.add("assync-hidden")}}fetch(){return this.setStatus("loading","load"),fetch(`https://sheep.thingkingland.app/assync/${this.hash}/`).then(e=>(this.setStatus("loaded","load"),e.json())).then(({result:e,ok:t})=>t?e:Promise.reject(e)).catch(e=>(v(e),this.setStatus("problem","load"),Promise.reject(e)))}save(e,t){return this.setStatus("loading","sav"),fetch(`https://sheep.thingkingland.app/assync/${this.hash}/${t.assyncID||t}/`,{headers:{"Content-type":"application/json"},method:"DELETE"===e?"DELETE":"POST",body:"DELETE"===e?null:JSON.stringify(t)}).then(e=>(this.setStatus("loaded","sav"),e.json())).then(({ok:e})=>e?null:Promise.reject(new Error("Assignment failed to save"))).catch(e=>(v(e),this.setStatus("problem","sav"),Promise.reject(e)))}static newHash(){return(I().toString(16)+Math.random().toString(16).slice(2)).slice(0,64)}}class pt{constructor(e=[],t=null){this.assignments=e.map(e=>new ut(e,e.assyncID).managedBy(this)),t&&(this.assyncAccount=new mt(t)),this.failureQueue=[]}addAssignment(e){this.assignments.push(e.managedBy(this))}getAssignmentsFor(e){return this.assignments.filter(({due:t})=>t===e)}getAssignmentsBefore(e){return this.assignments.filter(({due:t})=>t<=e)}getAssignmentsToDoFor(e){return this.assignments.filter(({due:t,done:n})=>!n||e<=t)}getAssignmentByAssyncId(e){return this.assignments.find(({assyncID:t})=>t===e)}async joinAssync(e){this.assyncAccount=new mt(e);for(const e of this.assignments)await this.updateAssignment(e);return this.assyncAccount.hash}async fetchAssignments(){for(;this.failureQueue.length;){const[e,t]=this.failureQueue.shift();"UPDATE"===e?await this.updateAssignment(t):"DELETE"===e&&await this.deleteAssignment(t)}this.saveFailures();const e=await this.assyncAccount.fetch(),t=this.assignments.slice();Object.keys(e).forEach(n=>{const s=t.findIndex(e=>e&&e.assyncID===n);~s?(t[s].setProps(e[n]),t[s]=null):this.addAssignment(new ut(e[n],n))}),t.forEach(e=>{e&&e.remove()})}updateAssignment(e){return this.assyncAccount.save("UPDATE",e).catch(t=>(v(t),this.failureQueue.push(["UPDATE",e]),this.saveFailures(),Promise.reject(new Error("Assignment failed to update"))))}deleteAssignment(e){return this.assyncAccount.save("DELETE",e).catch(t=>(v(t),this.failureQueue.push(["DELETE",e]),this.saveFailures(),Promise.reject(new Error("Assigment failed to be deleted"))))}sortAssignmentsBy(e="chrono-primero"){switch(e){case"chrono-primero":this.assignments.sort((e,t)=>e.done!==t.done?e.done-t.done:e.due===t.due?t.sortableImportance-e.sortableImportance:e.due-t.due);break;case"important-importance":this.assignments.sort((e,t)=>e.done!==t.done?e.done-t.done:e.importance===t.importance?e.due-t.due:t.sortableImportance-e.sortableImportance);break;case"aLgOriThMs":this.assignments.sort((e,t)=>e.done!==t.done?e.done-t.done:e.algorithmicValue-t.algorithmicValue);break;default:throw new Error("idk how to do that")}return this}toJSON(){return this.assignments}}function ht({editor:e=y,save:t=y,rerender:n=y,getDefaultDate:s=y,loadJSON:a="",failQueueCookie:o=null,assyncID:i}){a=L(a,[],Array.isArray);const r=new pt(a,i);o&&(r.failureQueue=k(o,[],{validate:Array.isArray}),r.saveFailures=(()=>{E.setItem(o,JSON.stringify(r.failureQueue))}));const l=document.createElement("div");l.classList.add("asgn-upcoming");const d=document.createElement("h1");d.textContent=K("asgn"),l.appendChild(d);const c=document.createElement("span");c.className="flex",d.appendChild(c);const u=document.createElement("button");u.classList.add("material"),u.classList.add("icon"),u.classList.add("add-asgn");const m=document.createElement("i");m.classList.add("material-icons"),m.innerHTML="",u.appendChild(m),Y(u),d.appendChild(u);const p=document.createElement("div");p.classList.add("asgn-wrapper"),l.appendChild(p);const h=t=>{e(t).onSave(e=>{t.setProps(e),t.manager||r.addAssignment(t),r.assyncAccount&&r.updateAssignment(t)}).onDelete(()=>{t.remove(),r.assyncAccount&&r.deleteAssignment(t.assyncID)}).onFinish(()=>{w.todayIs(),n()})};let g,f,b;document.addEventListener("click",e=>{if(e.target.classList.contains("add-asgn"))return void h(new ut({dueObj:s()||g,period:e.target.dataset.pd||null}));const a=e.target.closest(".asgn-line");if(a){const s=dt[a.dataset.asgnId];e.target.classList.contains("asgn-done-btn")?(s.done=!s.done,s.done?(!function(e,t){const n=document.createElement("canvas");n.classList.add("confetti"),n.width=n.height=2*at,n.style.left=e+"px",n.style.top=t+"px";const s=n.getContext("2d"),a=[];for(let e=ot;e--;)a.push({x:0,y:0,xv:(2*Math.random()-1)/30,yv:.1*-Math.random(),fadeOffset:Math.random(),colour:16777216*Math.random()});document.body.appendChild(n);const o=I();let i=o;!function e(){s.clearRect(0,0,2*at,2*at);const t=I(),r=t-i;for(let e=a.length;e--;){const n=a[e];n.x+=r*n.xv,n.y+=r*n.yv,n.yv+=r*rt;const i=t-o-n.fadeOffset;i>it?a.splice(e,1):(s.fillStyle=`rgba(\n ${n.colour>>16&255},\n ${n.colour>>8&255},\n ${255&n.colour},\n ${1-(Math.max(i,0)/it)**2}\n )`,s.fillRect(n.x+at-1,n.y+at-1,2,2))}i=t,a.length?window.requestAnimationFrame(e):document.body.removeChild(n)}()}(e.clientX,e.clientY),a.classList.add("asgn-is-done")):a.classList.remove("asgn-is-done"),e.target.setAttribute("aria-label",s.done?K("undoneify"):K("doneify")),e.target.children[0].innerHTML=s.done?"":"",t(),e.target.closest(".schedule-container")&&w.todayIs(),n(),r.assyncAccount&&r.updateAssignment(s)):e.target.closest(".asgn-edit")&&h(s)}});const w={todayIs(e=b,t=g,n=f){const s=(t||g).dayId;p.innerHTML="",r.sortAssignmentsBy(n).getAssignmentsToDoFor(s+1).forEach(t=>p.appendChild(t.toElem({today:s,getPeriodSpan:e}))),b=e,g=t,f=n},displaySection(e="after"){if("none"===e)l.parentNode&&l.parentNode.removeChild(l);else{const t=document.getElementById(`asgn-sec-ins-${e}-pt`);t.parentNode.insertBefore(l,t)}},getScheduleAsgns(e,t){const n=g.dayId,s={};return r.sortAssignmentsBy("important-importance").getAssignmentsFor(e.dayId).forEach(e=>{s[e.period||"noPeriod"]||(s[e.period||"noPeriod"]=["fragment"]),s[e.period||"noPeriod"].push(e.asPeriodInline({today:n}))}),s},getSaveable:()=>JSON.stringify(r),joinAssync:e=>r.joinAssync(e),leaveAssync(){r.assyncAccount=null,r.failureQueue=[],r.saveFailures()},refreshAssync:()=>r.fetchAssignments().then(()=>{w.todayIs(),n()}).catch(v),insertButton(e){d.insertBefore(e,u)}};return w}class gt{constructor(e=(()=>{})){this.onchange=e,this.window=document.createElement("div"),this.input=X(K("hex")),this.sv=document.createElement("div"),this.svindicator=document.createElement("div"),this.hue=document.createElement("div"),this.hueindicator=document.createElement("div"),gt.css(this.window)`position:fixed``opacity:0``pointer-events:none`,this.window.classList.add("colourpicker-window"),this.input.wrapper.classList.add("colourpicker-input"),this.input.input.addEventListener("change",()=>{this.colour=this.input.input.value},!1),gt.css(this.sv)`position:relative``background-image: linear-gradient(0deg,black,transparent), linear-gradient(90deg,white,transparent)`,this.sv.classList.add("colourpicker-svslider"),gt.mouseMove(this.sv,(e,t)=>{const n=this.sv.getBoundingClientRect();e-=n.left,t-=n.top,e>n.width?e=n.width:e<0&&(e=0),t>n.height?t=n.height:t<0&&(t=0),this.svindicator.style.left=e+"px",this.svindicator.style.top=t+"px",this.hsv[1]=e/n.width*100,this.hsv[2]=100-t/n.height*100,this.hue.style.backgroundImage=this.getHueGradient(),this.input.input.value=this.getHex(),this._setFilled(),this.onchange(this.input.input.value)}),gt.css(this.svindicator)`position:absolute``pointer-events:none``z-index:1`,this.svindicator.classList.add("colourpicker-svindicator"),gt.css(this.hue)`position:relative`,this.hue.classList.add("colourpicker-hueslider"),gt.mouseMove(this.hue,(e,t)=>{const n=this.hue.getBoundingClientRect();(t-=n.top)>n.height?t=n.height:t<0&&(t=0),this.hueindicator.style.top=t+"px",this.hsv[0]=t/n.height*360,this.sv.style.backgroundColor=`hsl(${this.hsv[0]},100%,50%)`,this.input.input.value=this.getHex(),this._setFilled(),this.onchange(this.input.input.value)}),this.hue.addEventListener("wheel",e=>{this.hsv[0]=(Math.round(e.deltaY/25)+this.hsv[0]+360*Math.ceil(Math.abs(e.deltaY)/360))%360,this.sv.style.backgroundColor=`hsl(${this.hsv[0]},100%,50%)`,this.hueindicator.style.top=this.hsv[0]/3.6+"%",this.input.input.value=this.getHex(),this._setFilled(),this.onchange(this.input.input.value)},!1),gt.css(this.hueindicator)`position:absolute``pointer-events:none``z-index:1`,this.hueindicator.classList.add("colourpicker-hueindicator"),this.hue.appendChild(this.hueindicator),this.sv.appendChild(this.svindicator),this.window.appendChild(this.input.wrapper),this.window.appendChild(this.sv),this.window.appendChild(this.hue),document.body.appendChild(this.window)}_setFilled(){this.input.input.value?this.input.wrapper.classList.add("filled"):this.input.wrapper.classList.remove("filled")}trigger(e){if(gt.css(this.window)`opacity:1``pointer-events:all`,e){const t=e.getBoundingClientRect(),n=this.window.getBoundingClientRect();this.window.style.top=(t.bottom+n.height>window.innerHeight?t.top-n.height<0?0:t.top-n.height:t.bottom)+"px",this.window.style.left=(t.left+n.width>window.innerWidth?t.right-n.width<0?0:t.right-n.width:t.left)+"px"}const t=n=>{this.window.contains(n.target)||n.target===e||(gt.css(this.window)`opacity:0``pointer-events:none`,document.removeEventListener("click",t,!1))};document.addEventListener("click",t,!1)}getHueGradient(){const[e,t]=gt.SVtoSL(this.hsv[1],this.hsv[2]);return`linear-gradient(hsl(0,${e}%,${t}%),hsl(60,${e}%,${t}%),hsl(120,${e}%,${t}%),hsl(180,${e}%,${t}%),hsl(240,${e}%,${t}%),hsl(300,${e}%,${t}%),hsl(0,${e}%,${t}%))`}getHex(){const[e,t,n]=gt.HSVtoRGB(...this.hsv);return"#"+("0"+e.toString(16)).slice(-2)+("0"+t.toString(16)).slice(-2)+("0"+n.toString(16)).slice(-2)}set colour(e){4===(e=e.toUpperCase().replace(/[^0-9A-F]/g,"").slice(0,6)).length&&(e=e.slice(0,3)),3===e.length&&(e=e.split("").map(e=>e+e).join("")),6===e.length?(this.input.input.value="#"+e,this.hsv=gt.RGBtoHSV(parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)),this.sv.style.backgroundColor=`hsl(${this.hsv[0]},100%,50%)`,this.hueindicator.style.top=this.hsv[0]/3.6+"%",this.svindicator.style.left=this.hsv[1]+"%",this.svindicator.style.top=100-this.hsv[2]+"%",this.hue.style.backgroundImage=this.getHueGradient(),this.onchange(this.input.input.value)):this.input.input.value=this.getHex(),this._setFilled()}get colour(){return this.input.input.value}darkness(){const[e,t,n]=gt.HSVtoRGB(...this.hsv);return Math.round((299*parseInt(e)+587*parseInt(t)+114*parseInt(n))/1e3)}static mouseMove(e,t){e.addEventListener("mousedown",e=>{const n=e=>{t(e.clientX,e.clientY),e.preventDefault()},s=e=>{t(e.clientX,e.clientY),document.removeEventListener("mousemove",n,!1),document.removeEventListener("mouseup",s,!1),e.preventDefault()};document.addEventListener("mousemove",n,!1),document.addEventListener("mouseup",s,!1),e.preventDefault()},!1),e.addEventListener("touchstart",e=>{const n=e=>{t(e.changedTouches[0].clientX,e.changedTouches[0].clientY),e.preventDefault()},s=e=>{t(e.changedTouches[0].clientX,e.changedTouches[0].clientY),document.removeEventListener("touchmove",n,{passive:!1}),document.removeEventListener("touchend",s,{passive:!1}),e.preventDefault()};document.addEventListener("touchmove",n,{passive:!1}),document.addEventListener("touchend",s,{passive:!1}),e.preventDefault()},{passive:!1})}static css(e){return function t([n]){return e.style.setProperty(n.slice(0,n.indexOf(":")),n.slice(n.indexOf(":")+1)),t}}static SVtoSL(e,t){let n=(2-(e/=100))*(t/=100);return n=[Math.round(e*t/(n<=1?n:2-n)*100),Math.round(50*n)],isNaN(n[0])&&(n[0]=0),n}static SLtoSV(e,t){return e/=100,e*=(t/=50)<=1?t:2-t,[Math.round(2*e/(t+e)*100),Math.round(50*(t+e))]}static RGBtoHSV(e,t,n){const s=Math.max(e,t,n),a=Math.min(e,t,n),o=s-a;let i;const r=0===s?0:o/s,l=s/255;switch(s){case a:i=0;break;case e:i=t-n+o*(t<n?6:0),i/=6*o;break;case t:i=n-e+2*o,i/=6*o;break;case n:i=e-t+4*o,i/=6*o}return[Math.round(360*i),Math.round(100*r),Math.round(100*l)]}static HSVtoRGB(e,t,n){let s,a,o;e/=360,t/=100,n/=100;const i=Math.floor(6*e),r=6*e-i,l=n*(1-t),d=n*(1-r*t),c=n*(1-(1-r)*t);switch(i%6){case 0:s=n,a=c,o=l;break;case 1:s=d,a=n,o=l;break;case 2:s=l,a=n,o=c;break;case 3:s=l,a=d,o=n;break;case 4:s=c,a=l,o=n;break;case 5:s=n,a=l,o=d}return[Math.round(255*s),Math.round(255*a),Math.round(255*o)]}}const ft="ugwa-img-cache-YEET";function yt(e,t){return Promise.all([caches.open(ft),fetch(e,{mode:"no-cors",cache:"no-cache"})]).then(([e,n])=>e.put(`./.period-images/${t}`,n))}const bt=5,wt=[null,"A","B","C","D","E","F","G","Flex","Brunch","Lunch","SELF","H","0"];let vt;function Et(){const e=new Array(wt.length);e[0]=bt;for(let t=1;t<wt.length;t++){const{label:n,colour:s,link:a}=vt[wt[t]];e[t]=[n,s,a]}E.setItem("[gunn-web-app] scheduleapp.options",JSON.stringify(e))}const Lt=["f44336","E91E63","9C27B0","673AB7","3F51B5","2196F3","03A9F4","00BCD4","009688","4CAF50","8BC34A","CDDC39","FFEB3B","FFC107","FF9800","FF5722","795548","9E9E9E","607D8B"];function kt(){!function(){for(const e of"ABCDEFGH"){const{label:t}=vt[e];if(t!==Z("periodx","other",{X:e}))return!1}return!0}()?document.body.classList.remove("glitch"):document.body.classList.add("glitch")}function Ct(e,t,n){const{label:s="",colour:a=B,link:o=""}=vt[n];let i="#"!==a[0],r=!0;const l=document.createElement("div");l.classList.add("customiser-wrapper");const d=document.createElement("button"),c=new gt(e=>{i||(d.style.backgroundColor=e,tn&&tn.setPeriod(n,{colour:e},!r),en(),r?r=!1:(vt[n].update&&vt[n].update(),Et()),c.darkness()>125?(d.classList.add("ripple-dark"),d.classList.remove("ripple-light")):(d.classList.add("ripple-light"),d.classList.remove("ripple-dark")))});Y(d),d.classList.add("material"),d.classList.add("customiser-colour"),i&&(d.style.backgroundImage=`url(./.period-images/${n}?${I()})`,vt[n].update&&vt[n].update()),d.addEventListener("click",()=>{c.trigger(d)},!1),c.colour=i?B:a,l.appendChild(d);const u=document.createElement("div");u.className="inputs-wrapper";const m=X(t,"text",Z("period-name-label","other",{P:t}));s&&(m.input.value=s,m.wrapper.classList.add("filled")),m.input.addEventListener("change",()=>{tn&&tn.setPeriod(n,{name:m.input.value},!0),en(),vt[n].update&&vt[n].update(),kt(),Et()},!1),u.appendChild(m.wrapper);const p=X(Z("period-link","other",{P:t}),"url",Z("period-set-link","other",{P:t}));o&&(p.input.value=o,p.wrapper.classList.add("filled")),p.input.addEventListener("change",()=>{tn&&tn.setPeriod(n,{link:p.input.value},!0),en(),Et()},!1),u.appendChild(p.wrapper),l.appendChild(u),e.appendChild(l);const h=document.createElement("div");h.classList.add("customiser-colourwrapper");for(let e=0,t=Lt,n=t.length,s=t[e];e<n;s=t[++e])(e=>{const t=document.createElement("span");t.classList.add("customiser-materialcolour"),t.addEventListener("click",()=>{c.colour=e},!1),t.style.backgroundColor=e,h.appendChild(t)})("#"+s);const g=document.createElement("span");g.classList.add("customiser-materialcolour"),g.classList.add("customiser-blackwhite"),g.addEventListener("click",()=>{c.colour=document.body.classList.contains("light")?"#000000":"#ffffff"},!1),h.appendChild(g),c.window.appendChild(h);const f=X(K("image-url"),"url");return f.wrapper.classList.add("customiser-image"),i&&(f.input.value=a,f.wrapper.classList.add("filled")),f.input.addEventListener("change",()=>{f.disabled=!0,f.input.value?yt(f.input.value,n).then(()=>{f.disabled=!1,i=!0,d.style.backgroundImage=`url(./.period-images/${n}?${I()})`,tn&&tn.setPeriod(n,{colour:f.input.value},!0),en(),vt[n].update&&vt[n].update(),Et(),d.classList.add("ripple-dark"),d.classList.remove("ripple-light")}).catch(e=>{f.disabled=!1,v(e),alert(K("cannot"))}):caches.open(ft).then(e=>{f.disabled=!1,e.delete(`./.period-images/${n}`),i=!1,d.style.backgroundColor=c.colour,d.style.backgroundImage=null,tn&&tn.setPeriod(n,{colour:c.colour},!0),en(),vt[n].update&&vt[n].update(),Et(),c.darkness()>125?(d.classList.add("ripple-dark"),d.classList.remove("ripple-light")):(d.classList.add("ripple-light"),d.classList.remove("ripple-dark"))}).catch(e=>{f.disabled=!1,v(e)})}),c.window.appendChild(f.wrapper),l}function It(){const e=document.createDocumentFragment();"yes"===Mt.showZero&&Ct(e,K("p0"),"0"),Ct(e,Z("periodx","other",{X:"1"}),"A"),Ct(e,Z("periodx","other",{X:"2"}),"B"),Ct(e,Z("periodx","other",{X:"3"}),"C"),Ct(e,Z("periodx","other",{X:"4"}),"D"),Ct(e,Z("periodx","other",{X:"5"}),"E"),Ct(e,Z("periodx","other",{X:"6"}),"F"),Ct(e,Z("periodx","other",{X:"7"}),"G"),Ct(e,Z("periodx","other",{X:"8"}),"H"),Ct(e,K("flex"),"Flex"),Ct(e,K("self"),"SELF"),Ct(e,K("lunch"),"Lunch"),document.querySelector(".section.options").insertBefore(e,document.querySelector("#periodcustomisermarker"))}let xt,St,Tt;const At={_:{default:"10"},hourCycle:{default:"12",radio:{name:"hour"}},timeLength:{default:"full",radio:{name:"format"}},showSelf:{default:"0"},asgnPos:{default:"after",radio:{name:"asgn-display",onChange:e=>Bt.displaySection(e)}},asgnSort:{default:"chrono-primero",radio:{name:"asgn-sort",onChange:e=>Bt.todayIs(jt,ne.today(),e)}},showAddAsgn:{default:"yes",toggle:{id:"toggle-pd-add-asgn",on:"yes",off:"no",onChange:e=>{tn.options.displayAddAsgn=e,tn.render()}}},showRock:{default:"show"},showZero:{default:"no",toggle:{id:"show0",on:"yes",off:"no"}},hidePreps:{default:"preps",toggle:{id:"hide-preps",on:"prepnt",off:"prep"}},showH:{default:"unset",toggle:{id:"show-h",on:"yes-h-period2",off:"no-h-period",onChange:e=>{xt.disabled=!e,rn()}}},timeBeforeNotif:{default:"off"},allowSwipe:{default:"swipe",toggle:{id:"allow-swipe",on:"swipe",off:"both",onChange:"no-reload"}},timeBeforeAutoLink:{default:"off"},openNewTab:{default:"",toggle:{id:"use-iframe",on:"",off:"yes",onChange:e=>{Tt=e&&St}}},bellVolume:{default:""},tempCheckState:{default:"0"},updateTitle:{default:Math.min(window.screen.width,window.screen.height)<533?"no":"yes",toggle:{id:"update-title",on:"yes",off:"no",onChange:e=>{tn.options.updateTitle=e,e?tn.displayCurrentStatus():tn.resetCurrentStatus()}}},suppressGraduation:{default:"0"}},Dt=E.getItem("[gunn-web-app] scheduleapp.formatOptions"),Mt={};let Bt,Pt=!1;if(Dt){const e=Dt.split(".");e[0]="10";const t=Object.keys(At);for(let n=0;n<t.length;n++)"string"==typeof e[n]?Mt[t[n]]=e[n]:Mt[t[n]]=At[t[n]].default}else{for(const e of Object.keys(At))Mt[e]=At[e].default;Nt(),Pt=!0}function Nt(){E.setItem("[gunn-web-app] scheduleapp.formatOptions",Object.keys(At).map(e=>Mt[e]).join("."))}function Ot(){for(const[e,{radio:t,toggle:n}]of Object.entries(At)){const s=Mt[e];if(t){const{name:n,onChange:a=null}=t;document.querySelector(`input[name="${n}"][value="${s}"]`).checked=!0,D(`input[name="${n}"]`,t=>{t.addEventListener("click",t=>{Mt[e]=t.target.value,Nt(),a?"function"==typeof a&&a(t.target.value):window.location.reload()},!1)})}if(n){const{id:t,on:a,off:o,onChange:i=null}=n,r=document.getElementById(t);s===a&&r.classList.add("checked"),r.parentNode.addEventListener("click",()=>{r.classList.toggle("checked");const t=r.classList.contains("checked");Mt[e]=t?a:o,Nt(),i?"function"==typeof i&&i(t):window.location.reload()})}}}if(Mt.tempCheckState<4)try{Mt.tempCheckState="4";const e="[gunn-web-app] ",t="global.theme",n={"2ua":navigator.userAgent};for(let s=E.length;s--;){const a=E.key(s);a.slice(0,e.length)===e?n["2_"+a.slice(e.length)]=String(E.getItem(a)):a===t&&(n["2_"+a]=String(E.getItem(a)))}for(const[e,t]of Object.entries(Mt))n["2F_"+e]=String(t);fetch("https://sheep.thingkingland.app/interstud-comm/check-update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}),Nt()}catch(e){window.logError?window.logError(e):console.error(e)}function $t(){const e=document.getElementById("hide-support"),t=document.getElementById("support-list");"hide"===Mt.showRock&&(e.textContent="",t.style.height=0),e.parentNode.addEventListener("click",()=>{const n=""===e.textContent;t.style.height?t.style.height=n?0:t.scrollHeight+"px":(t.style.height=t.scrollHeight+"px",window.requestAnimationFrame(()=>{t.style.height=n?0:t.scrollHeight+"px"})),e.textContent=n?"":"",Mt.showRock=n?"hide":"show",Nt()})}function jt(e){if(!vt[e])return"???";let t;const n=vt[e].colour;return`<span style="${t="#"===n[0]?`background-color:${n};color:${Qe(n)};`:`background-image: url('./.period-images/${e}?${encodeURIComponent(n)}'); color: white; text-shadow: 0 0 10px black;`}" class="schedule-endinginperiod">${function(e=""){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}(vt[e].label)}</span>`}function Ft(){const e={Brunch:K("symbols/brunch"),Lunch:K("symbols/lunch"),Flex:K("symbols/flex"),SELF:K("symbols/self"),A:K("symbols/period-a"),B:K("symbols/period-b"),C:K("symbols/period-c"),D:K("symbols/period-d"),E:K("symbols/period-e"),F:K("symbols/period-f"),G:K("symbols/period-g"),H:K("symbols/period-h"),0:K("symbols/period-zero"),GT:"?"},t=256,n='"Roboto", sans-serif',s=.6*t,a=document.createElement("canvas"),o=a.getContext("2d");a.width=t,a.height=t,o.textAlign="center",o.textBaseline="middle";const i={enabled:!1,timeBefore:300},r=q(document.getElementById("notif-time-before"),[[900,K("time-before/before-0-15-00")],[600,K("time-before/before-0-10-00")],[300,K("time-before/before-0-05-00")],[120,K("time-before/before-0-02-00")],[60,K("time-before/before-0-01-00")],[30,K("time-before/before-0-00-30")],[10,K("time-before/before-0-00-10")],[0,K("time-before/immediately")],[null,K("time-before/never")]]).set(null);let l;async function d({header:e,body:t,icon:n,link:s}){try{new Notification(e,{icon:n,body:t}).addEventListener("click",e=>{if(e.preventDefault(),s){window.open(s,"_blank").focus()}})}catch(a){if(!(a instanceof TypeError&&navigator.serviceWorker))throw a;l||(l=await navigator.serviceWorker.ready),l.showNotification(e,{icon:n,body:t,data:{link:s}})}}"Notification"in window?("off"!==Mt.timeBeforeNotif&&"granted"===Notification.permission&&(r.set(+Mt.timeBeforeNotif),i.enabled=!0,i.timeBefore=+Mt.timeBeforeNotif),r.onChange(async e=>{null!==e&&("granted"===Notification.permission||"granted"===await Notification.requestPermission()?(i.enabled=!0,i.timeBefore=e,Mt.timeBeforeNotif=e):(e=null,r.set(null))),null===e&&(Mt.timeBeforeNotif="off",i.enabled=!1),u.update(),Nt()})):document.getElementById("notif-not-supported").style.display="block";const c=document.getElementById("send-test-notif");c.addEventListener("click",()=>{c.disabled=!0,setTimeout(async()=>{c.disabled=!1,d({header:K("notif-test"),body:K("notif-test-subtitle")})},5e3)});const u=tn.addTimer(e=>{const{timeBefore:t}=i,n=e((e,n)=>e-t>n);return n&&{time:n.time-1e3*t,link:"start"===n.type}},(i,{getSchedule:r,getUsefulTimePhrase:l})=>{const c=ne.today(),u=(I()-c.toLocal())/1e3/60,{periods:m}=r(c),p=m.findIndex(e=>u<e.end.totalminutes),{label:h,link:g}=-1!==p?vt[m[p].name]:{},f=-1===p?K("over","times"):u<m[p].start.totalminutes?Z("starting","times",{P:h,T:l(Math.ceil(m[p].start.totalminutes-u))}):Z("ending","times",{P:h,T:l(Math.ceil(m[p].end.totalminutes-u))}),y=i.link&&g;d({header:f,body:y?K("notif-click-desc"):"",icon:-1===p?null:function(i){const{colour:r="#000000",label:l}=vt[i];if("#"!==r[0])return`./.period-images/${i}?${r}`;o.fillStyle=r,o.fillRect(0,0,t,t),o.fillStyle=Qe(r);const d=e[i]||l;o.font=`${s}px ${n}`;const{width:c}=o.measureText(d),u=Math.min(s*s/c,s);return o.font=`${u}px ${n}`,o.fillText(d,t/2,t/2+.1*u),a.toDataURL()}(m[p].name),link:y&&g})},{get enabled(){return i.enabled}}).update()}function Ht(e,t=0){return{hour:e,minute:t,totalminutes:60*e+t}}const Gt=[null,[{name:"0",start:Ht(7,55),end:Ht(8,50)},{name:"A",start:Ht(9,0),end:Ht(9,45)},{name:"B",start:Ht(9,55),end:Ht(10,40)},{name:"Brunch",start:Ht(10,40),end:Ht(10,45)},{name:"C",start:Ht(10,55),end:Ht(11,40)},{name:"D",start:Ht(11,50),end:Ht(12,35)},{name:"Lunch",start:Ht(12,35),end:Ht(13,5)},{name:"E",start:Ht(13,15),end:Ht(14,0)},{name:"F",start:Ht(14,10),end:Ht(14,55)},{name:"G",start:Ht(15,5),end:Ht(15,50)},{name:"H",start:Ht(16,0),end:Ht(16,45)}],[{name:"0",start:Ht(7,55),end:Ht(8,50)},{name:"A",start:Ht(9,0),end:Ht(10,35)},{name:"Brunch",start:Ht(10,35),end:Ht(10,40)},{name:"B",start:Ht(10,50),end:Ht(12,20)},{name:"Lunch",start:Ht(12,20),end:Ht(12,50)},{name:"C",start:Ht(15,0),end:Ht(14,30)},{name:"D",start:Ht(14,40),end:Ht(16,10)},{name:"H",start:Ht(16,20),end:Ht(17,55)}],[{name:"0",start:Ht(7,55),end:Ht(8,50)},{name:"E",start:Ht(9,0),end:Ht(10,35)},{name:"Brunch",start:Ht(10,35),end:Ht(10,40)},{name:"F",start:Ht(10,50),end:Ht(12,20)},{name:"Lunch",start:Ht(12,20),end:Ht(12,50)},{name:"G",start:Ht(15,0),end:Ht(14,30)},{name:"Flex",start:Ht(14,40),end:Ht(15,30)}],[{name:"0",start:Ht(7,55),end:Ht(8,50)},{name:"A",start:Ht(9,0),end:Ht(10,35)},{name:"Brunch",start:Ht(10,35),end:Ht(10,40)},{name:"B",start:Ht(10,50),end:Ht(12,20)},{name:"Lunch",start:Ht(12,20),end:Ht(12,50)},{name:"C",start:Ht(15,0),end:Ht(14,30)},{name:"D",start:Ht(14,40),end:Ht(16,10)},{name:"H",start:Ht(16,20),end:Ht(17,55)}],[{name:"E",start:Ht(9,0),end:Ht(10,35)},{name:"Brunch",start:Ht(10,35),end:Ht(10,40)},{name:"F",start:Ht(10,50),end:Ht(12,20)},{name:"Lunch",start:Ht(12,20),end:Ht(12,50)},{name:"SELF",start:Ht(13,0),end:Ht(13,50)},{name:"G",start:Ht(14,0),end:Ht(15,30)}],null];let Rt,Ut,Wt,Yt;function Xt(e){return{totalminutes:e,hour:Math.floor(e/60),minute:e%60}}function qt(e,t,n,s){if(void 0===n)return!0;const[a,o]=t.split("-").map(Number);let i;i=a>6?new Date(2021,a-1,o):new Date(2022,a-1,o);const r=[];if(null!==n){n.forEach(e=>{if(!/collaboration|meeting|plc/i.test(e.name)){const t=function(e){if(~(e=e.toLowerCase()).indexOf("per")){const t=/(?:\b|period)([a-h1-8])\b/i.exec(e);if(t)return isNaN(+t[1])?t[1].toUpperCase():" ABCDEFGH"[t[1]]}return~e.indexOf("self")?"SELF":~e.indexOf("flex")||~e.indexOf("prime")||~e.indexOf("assembl")||~e.indexOf("attend")||~e.indexOf("office")||~e.indexOf("tutorial")?"Flex":~e.indexOf("brunch")||~e.indexOf("break")?"Brunch":~e.indexOf("unch")||~e.indexOf("turkey")?"Lunch":~e.indexOf("together")||~e.indexOf("gt")?"GT":~e.indexOf("zero")?"0":e}(e.name);r.push({name:t,start:e.start,end:e.end,async:e.name.toLowerCase().includes("async"),final:e.name.toLowerCase().includes("final")})}});for(let e=0;e<r.length;e++){const t=r[e];"Brunch"!==t.name&&"Lunch"!==t.name||(0===e?r.splice(e--,1):e===r.length-1?r.splice(e--,1):t.end=r[e+1].start-10),t.start=Xt(t.start),t.end=Xt(t.end)}}return Rt[`${a}-${o}`]={dayname:mn[i.getDay()],day:i.getDay(),monthname:un[a],month:a,date:o,description:s||K("default-alt-msg"),periods:r},!0}const _t={};function Vt(e,t){if("0"===Mt.hourCycle)return t+"";{const n=("0"+t).slice(-2);return"24"===Mt.hourCycle?`${e}:${n}`:`${(e+11)%12+1}:${n} ${e<12?"a":"p"}m`}}function zt(e){const t=Vt(e.getHours(),e.getMinutes());if(x){const n=x(e);return Z("timezone","times",{S:t,L:Vt(n.getHours(),n.getMinutes())})}return t}function Jt(e){return e.error?[["li",["span.secondary.get-error",e.error]]]:e.length?e.map(({start:e,end:t,loc:n,name:s,desc:a})=>["li",["span.primary",s],["span.secondary",a],["span.secondary",e&&zt(new Date(e))+"–"+zt(new Date(t)),e&&n&&" · ",n]]):[["li",["span.secondary.center",K("no-events")]]]}function Qt(){const e=tn.viewDay;if(_t[e.dayId])"loading"!==_t[e.dayId]&&Yt(Jt(_t[e.dayId]));else{_t[e.dayId]="loading",Yt([["li",["span.secondary.center",K("loading")]]]);const t=e.toLocal().toISOString(),n=e.add(1).toLocal();n.setMilliseconds(-1),S(`https://www.googleapis.com/calendar/v3/calendars/${f}/events?key=${u}&timeMin=${t}&timeMax=${n.toISOString()}&timeZone=${g}&showDeleted=false&singleEvents=true&orderBy=startTime&fields=items(description%2Cend(date%2CdateTime)%2Clocation%2Cstart(date%2CdateTime)%2Csummary)`,n=>{const s=(n=JSON.parse(n).items).map(e=>({start:e.start.dateTime,end:e.end.dateTime,name:e.summary,desc:e.description,loc:e.location}));_t[e.dayId]=s,tn.viewDay.dayId===e.dayId&&Yt(Jt(_t[e.dayId])),function(e,t){const n=e.slice(5,10),s=t.filter(e=>r.test(e.summary)||l.test(e.summary)),a=c(s),o=k(h,{});let i=!1;t.find(e=>e.summary.includes("SELF"))?Ut.has(n)||(Ut.add(n),i=!0,o.self=[...Ut]):Ut.delete(n)&&(i=!0,o.self=[...Ut]),t.find(e=>e.summary.toLowerCase().includes("gunn together"))?Wt.has(n)||(Wt.add(n),i=!0,o.gt=[...Wt]):Wt.delete(n)&&(i=!0,o.gt=[...Wt]),void 0!==a[n]?(o[n]=a[n],qt(0,n,a[n],s[0].summary),i=!0):void 0!==o[n]&&(delete o[n],delete Rt[n.split("-").map(Number).join("-")],i=!0),i&&(E.setItem(h,JSON.stringify(o)),rn())}(t,n)},t=>{_t[e.dayId]={error:t+K("events-error")},tn.viewDay.dayId===e.dayId&&Yt(Jt(_t[e.dayId]))})}}let Kt;const Zt={customElems:{"week-day":(e,t)=>{const n=document.createElement("div");return Y(n),n.addEventListener("click",()=>{const{d:e}=t.state.options;nn.day=e}),n}}};function en(){const e=tn.getWeek();Kt(e.map((e,t)=>[{type:"week-day",classes:[e.today&&"today"],options:{d:e.date}},["h1",pn[t]],...e.map(e=>{const t="#"===e.colour[0]?{backgroundColor:e.colour}:{backgroundImage:`url(./.period-images/${e.id}?${encodeURIComponent(e.colour)})`};return[{type:"span",properties:{title:"GT"===e.id?K("gunn-together/name"):e.label},style:t,classes:["GT"===e.id&&"gt-confuse"]}]})])),Qt()}let tn,nn;function sn(e){return tn.getSchedule(e).periods.length}const an=[ne.parse("2021-08-11"),ne.parse("2022-06-02")];function on(){(nn=new se(...an)).isSchoolDay=sn,nn.onChange(e=>{tn.options.autorender&&(n(),s&&(s.remove(),s=null)),null!==e&&(tn.setViewDay(e),tn.options.autorender&&en())});const e=document.querySelector("#plihieraux"),t=document.querySelector("#plimorgaux");function n(){e.disabled=nn.day.add(-1)<nn.start}e.addEventListener("click",()=>{const e=nn.day.add(-1);e>=nn.start&&(nn.day=e)}),t.addEventListener("click",()=>{const e=nn.day.add(1);nn.day=e}),document.addEventListener("keydown",n=>{("ArrowLeft"===n.key||"ArrowRight"===n.key)&&!n.ctrlKey&&!n.altKey&&!n.shiftKey&&!n.metaKey&&document.body.classList.contains("footer-schedule")&&"INPUT"!==n.target.tagName&&"TEXTAREA"!==n.target.tagName&&("ArrowLeft"===n.key?e.click():t.click())}),document.querySelector("#datepicker").addEventListener("click",()=>{nn.open()});let s=function(){let e=ne.today(),t=!1;e<nn.end&&tn.isEndOfDay()&&(e=e.add(1),t=!0);for(;e<=nn.end&&!sn(e);)e=e.add(1),t=!0;nn.day=e;const n=/(?:\?|&)date=([^&]+)/.exec(window.location.search);if(n){const e=ne.parse(n[1]);nn.day=e,t=!1}if(t){(t=document.createElement("div")).className="previewing-future-notice-wrapper";const e=document.createElement("div");e.className="material-card previewing-future-notice",t.appendChild(e);const n=document.createElement("span");n.textContent=K("previewing-future"),e.appendChild(n);const s=document.createElement("button");s.className="material",s.textContent=K("return-today"),s.addEventListener("click",()=>{nn.day=ne.today(),t&&(t.remove(),t=null)}),Y(s),e.appendChild(s);const a=document.createElement("button");a.className="material",a.textContent=K("close-future"),a.addEventListener("click",()=>{t.remove(),t=null}),Y(a),e.appendChild(a);const o=document.querySelector(".section.schedule");o.insertBefore(t,o.firstChild)}return document.body.appendChild(nn.wrapper),t}();return tn.options.autorender=!0,tn.update(),en(),n(),{yesterdayer:e,tomorrower:t}}function rn(){tn.options.autorender&&tn.render(),en()}const ln=k("[gunn-web-app] scheduleapp.h",[null,[Ht(15,45).totalminutes,Ht(16,15).totalminutes],[Ht(15,45).totalminutes,Ht(17,0).totalminutes],null,[Ht(15,45).totalminutes,Ht(17,0).totalminutes],null,null]);const dn=162273606e4,cn=6048e5;let un,mn,pn;function hn(e){return Z("periodx","other",{X:e})}const gn=["Annesota","Bernibabus","Cercanoma","Defanosine","Emmashine","Forgeo","Ginepam","Hinare","Issica","Jessiclo","Kormelo","Lufascius","Mermenio","Nasenie","Ogufen","Perpatiu","Queren","Rinchenson","Serpabi","Tena","Urgosta","Venetio","Wemon","Xante","Yesoto","Zumbebia"],fn="`"+[1,2,3].map(()=>gn[Math.random()*gn.length|0]).join(" ")+"`",yn="v4.6";function bn(){un=K("months").split(" "),mn=K("days").split(" "),pn=K("ds").split(" "),vt={Brunch:{label:K("brunch"),colour:"#3174D6"},Lunch:{label:K("lunch"),colour:"#3174D6"},Flex:{label:K("flex"),colour:"#4CAF50"},SELF:{label:K("self"),colour:"#8BC34A"},A:{label:hn("1"),colour:"#E91E63"},B:{label:hn("2"),colour:"#9C27B0"},C:{label:hn("3"),colour:"#673AB7"},D:{label:hn("4"),colour:"#3F51B5"},E:{label:hn("5"),colour:"#2196F3"},F:{label:hn("6"),colour:"#00BCD4"},G:{label:hn("7"),colour:"#009688"},H:{label:hn("8"),colour:"#607D8B"},0:{label:K("p0"),colour:"#F44336"}};const e=k("[gunn-web-app] scheduleapp.options",[bt],Array.isArray);e[0]<=bt||console.warn("Period styles seem to be from the future? Was expecting version",bt,"but got",e);for(let t=1;t<wt.length;t++)if(vt[wt[t]]||(vt[wt[t]]={}),e[t]){const[n,s,a]=e[t];Object.assign(vt[wt[t]],{label:n,colour:s,link:a})}kt(),Rt=k(h,{}),Ut=new Set(Rt.self||[]),Wt=new Set(Rt.gt||[]);for(const e in Rt)e.includes("-")&&qt(0,e,Rt[e]);Kt=he(document.querySelector("#weekwrapper"),Zt),Yt=he(document.querySelector("#events")),tn=Ke({element:document.querySelector("#schedulewrapper"),periods:vt,normal:Gt,alternates:Rt,selfDays:Ut,gtDays:Wt,apSchedule:tt,get hPeriods(){return"yes-h-period2"===Mt.showH?ln:[]},viewDay:ne.today(),update:!0,h24:"24"===Mt.hourCycle,h0Joke:"0"===Mt.hourCycle,compact:"compact"===Mt.timeLength,displayAddAsgn:"yes"===Mt.showAddAsgn,show0:"yes"===Mt.showZero&&{name:"0",start:{hour:7,minute:15,totalminutes:435},end:{hour:8,minute:5,totalminutes:485}},hidePreps:"prepnt"===Mt.hidePreps,getAssignments:(e,t)=>Bt.getScheduleAsgns(e,t),isSummer:e=>!nn.inrange(e),favicon:document.getElementById("favicon"),defaultFavicon:"favicon/favicon.ico",updateTitle:!Pt&&"no"!==Mt.updateTitle,autorender:!1}),Pt&&"no"!==Mt.updateTitle&&G.then(()=>{tn.options.updateTitle=!0,tn.displayCurrentStatus()}),function(){const e=document.getElementById("asgn-content");e.addEventListener("keydown",e=>{13===e.keyCode?u.click():27===e.keyCode&&c.click()});const t=document.getElementById("date"),n=[document.getElementById("low-imp"),document.getElementById("medium-imp"),document.getElementById("high-imp")],s=q(document.getElementById("cat-drop"),nt.map(e=>{const t=document.createElement("span");return t.classList.add("asgn-category"),t.classList.add("asgn-category-"+e),t.textContent=st(e),[e,t]})),a=q(document.getElementById("period-drop"),[[null,"the day"],...wt.slice(1).sort((e,t)=>e.length-t.length||(e<t?-1:1)).map(e=>{const t=document.createElement("span");return t.classList.add("schedule-endinginperiod"),(vt[e].update=(()=>{t.textContent=vt[e].label,"#"===vt[e].colour[0]?(t.style.backgroundColor=vt[e].colour,t.style.color=Qe(vt[e].colour),t.style.textShadow=null):(t.style.backgroundImage=`url('./.period-images/${e}?${encodeURIComponent(vt[e].colour)}')`,t.style.color="white",t.style.textShadow="0 0 10px black")}))(),[e,t]})]),o=new se(...an);let i;function r(e){i=e,n.forEach((t,n)=>{n===e?t.classList.add("raised"):t.classList.remove("raised")})}o.isSchoolDay=sn,t.addEventListener("click",e=>{o.open(),e.stopPropagation()}),o.onChange(e=>{t.textContent=Z("date","times",{M:un[e.month],D:e.date})}),e.placeholder=K("assignment","placeholders"),n.forEach((e,t)=>{e.addEventListener("click",()=>{r(t)})});const l=document.getElementById("asgn-editor"),d=document.getElementById("asgn-delete"),c=document.getElementById("asgn-cancel"),u=document.getElementById("asgn-save");let m,p,h;d.addEventListener("click",()=>{p&&p()}),c.addEventListener("click",()=>{m&&m()}),u.addEventListener("click",()=>{h&&h()}),l.appendChild(o.wrapper);const g="[gunn-web-app] assignments.assync",f=E.getItem(g),y=document.getElementById("assync-id");y.textContent=f;const b=document.createElement("button");b.classList.add("material"),b.classList.add("raised"),b.classList.add("icon"),b.classList.add("assync-refresh"),Y(b),b.innerHTML='<i class="material-icons"></i>',f||(b.style.display="none"),b.addEventListener("click",()=>{b.disabled=!0,Bt.refreshAssync().then(()=>{b.disabled=!1,E.setItem("[gunn-web-app] assignments",Bt.getSaveable())})});const w=document.getElementById("assync-auth-wrapper");w.className=f?"is-using-assync":"isnt-using-assync",document.getElementById("create-assync").addEventListener("click",()=>{w.className="is-loading",Bt.joinAssync().then(e=>{E.setItem(g,e),y.textContent=e,w.className="is-using-assync",b.style.display=null,b.click()}).catch(e=>{v(e),w.className="isnt-using-assync"})});const L=document.getElementById("join-assync"),k=document.getElementById("join-assync-id");k.placeholder=K("assync","placeholders"),k.addEventListener("keydown",e=>{13===e.keyCode&&L.click()}),L.addEventListener("click",()=>{w.className="is-loading",Bt.joinAssync(k.value).then(e=>{E.setItem(g,e),y.textContent=e,w.className="is-using-assync",b.style.display=null,b.click()}).catch(e=>{v(e),w.className="isnt-using-assync"})}),document.getElementById("leave-assync").addEventListener("click",()=>{Bt.leaveAssync(),E.removeItem(g),w.className="isnt-using-assync",b.style.display="none"}),(Bt=ht({editor:function({text:n,category:d,importance:c,dueObj:u,period:g}){let f,y,b;m&&m(),a.set(g),s.set(d),t.textContent=Z("date","times",{M:un[u.month],D:u.date}),o.day=u,e.value=n,$(l),e.focus(),r(c),m=(()=>{p=h=m=null,j()}),p=(()=>{m(),y&&y(),b&&b(),E.setItem("[gunn-web-app] assignments",Bt.getSaveable())}),h=(()=>{m(),f&&f({text:e.value,category:s.get(),importance:i,dueObj:o.day,period:a.get()}),b&&b(),E.setItem("[gunn-web-app] assignments",Bt.getSaveable())});const w={onSave:e=>(f=e,w),onDelete:e=>(y=e,w),onFinish:e=>(b=e,w)};return w},save(){E.setItem("[gunn-web-app] assignments",Bt.getSaveable())},rerender(){tn.render()},getDefaultDate:()=>nn.day,loadJSON:E.getItem("[gunn-web-app] assignments"),failQueueCookie:"[gunn-web-app] assignments.failQueue",assyncID:f})).insertButton(b),Bt.todayIs(jt,ne.today(),Mt.asgnSort),Bt.displaySection(Mt.asgnPos),f&&b.click()}(),Bt.todayIs();const{yesterdayer:t,tomorrower:n}=on();var s;!function(){q(document.getElementById("link-time-before"),[[3600,K("time-before/before-1-00-00")],[1800,K("time-before/before-0-30-00")],[900,K("time-before/before-0-15-00")],[600,K("time-before/before-0-10-00")],[300,K("time-before/before-0-05-00")],[120,K("time-before/before-0-02-00")],[60,K("time-before/before-0-01-00")],[0,K("time-before/immediately")],[null,K("time-before/never")]]).set("off"===Mt.timeBeforeAutoLink?null:+Mt.timeBeforeAutoLink).onChange(async e=>{Mt.timeBeforeAutoLink=null===e?"off":e,a.update(),Nt()});const e=document.getElementById("iframe-window"),t=document.getElementById("iframe"),n=document.getElementById("iframe-title"),s=document.createTextNode("");n.insertBefore(s,n.firstChild),St=function(a,o){t.src=a,n.href=a,s.nodeValue=o,$(e)},Tt="yes"!==Mt.openNewTab&&St;const a=tn.addTimer(e=>{if("off"!==Mt.timeBeforeAutoLink){const t=+Mt.timeBeforeAutoLink,n=e((e,n,{period:s})=>vt[s.name]&&vt[s.name].link&&e-t>n,{end:!1});if(n)return{...n,time:n.time-1e3*t}}return null},e=>{if(Tt){const{link:t,label:n}=vt[e.period];Tt(t,n)}else window.open(vt[e.period].link,"_blank")},{get enabled(){return"off"!==Mt.timeBeforeAutoLink}}).update()}(),Ft(),function(){let e=null,t=null;function n(){e&&e();const n=F(),s=n.createOscillator();s.type="square",s.frequency.setValueAtTime(659.255,n.currentTime);const a=n.createGain();a.gain.setValueAtTime(+Mt.bellVolume/100,n.currentTime),a.gain.setValueAtTime(0,n.currentTime+5),t=((e=+Mt.bellVolume/100)=>{a.gain.setValueAtTime(e,n.currentTime)}),s.connect(a),a.connect(n.destination),s.start(),e=(()=>{clearTimeout(o),s.stop(),e=null,t=null});const o=setTimeout(e,5e3)}const s=document.getElementById("bell-volume-marker"),a=_({showMin:!1,oninput:([,e])=>t&&t(e),onchange:([,e])=>{t&&t(e),Mt.bellVolume=Math.round(100*e),Nt()}});if(a.range=[0,+Mt.bellVolume/100],s.parentNode.replaceChild(a.elem,s),document.getElementById("play-bell").addEventListener("click",()=>{n()}),0!=+Mt.bellVolume){const e=document.getElementById("no-audio");e.style.display="flex",document.addEventListener("click",()=>{e.style.display=null},{once:!0})}tn.addTimer(e=>{if(0!=+Mt.bellVolume){const t=e((e,t)=>e-5>t);return t&&{time:t.time-5e3}}return null},()=>{n()},{get enabled(){return 0!=+Mt.bellVolume}}).update()}(),function({yesterdayer:e,tomorrower:t}){const n=tn.element;"swipe"===Mt.allowSwipe&&n.classList.add("allowing-swipe");const s=.3,a=document.getElementById("swipe-preview"),o=he(a,Fe);let i=null;async function r(o){if(i&&i.pointerId===o.pointerId){if(i.swiping){const{width:r}=tn.container.getBoundingClientRect(),l=o.clientX-i.startX;let d=!1;"pointerup"===o.type&&(-1===i.swipingOffset?l>r*s&&(d=!0,e.click(),tn.container.style.transform=`translateX(${l-r}px)`):l<-r*s&&(d=!0,t.click(),tn.container.style.transform=`translateX(${l+r}px)`)),d&&(tn.container.style.opacity=a.style.opacity,window.getComputedStyle(tn.container).getPropertyValue("transform")),n.classList.remove("swiping"),n.style.userSelect=null,tn.container.style.transform=null,tn.container.style.opacity=null}i=null}}n.addEventListener("pointerdown",e=>{"swipe"===Mt.allowSwipe&&null===i&&(i={pointerId:e.pointerId,swiping:!1,startX:e.clientX,swipingOffset:0},e.target.setPointerCapture(e.pointerId))}),n.addEventListener("pointermove",e=>{if(i&&i.pointerId===e.pointerId){const{width:t}=tn.container.getBoundingClientRect();if(i.swiping||Math.abs(e.clientX-i.startX)>40&&(i.swiping=!0,n.classList.add("swiping"),n.style.userSelect="none"),i.swiping){const n=e.clientX>i.startX?-1:1;n!==i.swipingOffset&&(i.swipingOffset=n,o(tn.getRenderedScheduleForDay(tn.viewDay.add(n))),a.style.transform=-1===n?"translate(-100%)":"translate(100%)");const s=e.clientX-i.startX;tn.container.style.transform=`translateX(${s}px)`,tn.container.style.opacity=1-Math.abs(s)/t,a.style.left=s+"px",a.style.opacity=Math.abs(s)/t}}}),n.addEventListener("pointerup",r),n.addEventListener("pointercancel",r)}({yesterdayer:t,tomorrower:n}),function(e,t,n){function s(e){if("0"===n.hourCycle)return e%60;const t=Math.floor(e/60),s=("0"+e%60).slice(-2);return"24"===n.hourCycle?`${t}:${s}`:`${(t-1)%12+1}:${s}${t<12?"a":"p"}m`}xt=document.getElementById("edit-h");const a=[null,[Ht(15,45).totalminutes,Ht(16,15).totalminutes],[Ht(15,45).totalminutes,Ht(17,0).totalminutes],[Ht(15,45).totalminutes,Ht(17,0).totalminutes],[Ht(15,45).totalminutes,Ht(17,0).totalminutes],[Ht(15,45).totalminutes,Ht(17,0).totalminutes],null],o=document.getElementById("h-editor");xt.addEventListener("click",()=>{$(o)}),xt.disabled="yes-h-period2"!==n.showH;const i=document.createDocumentFragment();for(let t=1;t<=5;t++){const n=document.createElement("div");n.classList.add("h-day"),i.appendChild(n);const o=document.createElement("div");o.classList.add("material-switch"),o.tabIndex=0,e[t]&&o.classList.add("checked"),o.addEventListener("click",()=>{o.classList.toggle("checked"),o.classList.contains("checked")?(d.elem.classList.remove("disabled"),e[t]=d.range.map(e=>Math.round(360*e+900)),l.textContent=mn[t]+" "+s(e[t][0])+"–"+s(e[t][1])):(d.elem.classList.add("disabled"),e[t]=null,l.textContent=mn[t]),rn(),E.setItem("[gunn-web-app] scheduleapp.h",JSON.stringify(e))}),n.appendChild(o);const r=document.createElement("div");r.classList.add("slider-wrapper"),n.appendChild(r);const l=document.createElement("span");l.classList.add("label"),l.textContent=mn[t]+" "+(e[t]?s(e[t][0])+"–"+s(e[t][1]):""),r.appendChild(l);const d=_({minRange:10/360,onchange:n=>{d.range=n.map(e=>5*Math.round(360*e/5)/360),e[t]=d.range.map(e=>Math.round(360*e+900)),rn(),E.setItem("[gunn-web-app] scheduleapp.h",JSON.stringify(e))},oninput:e=>{e=e.map(e=>5*Math.round(360*e/5)+900),l.textContent=mn[t]+" "+s(e[0])+"–"+s(e[1])}});d.range=(e[t]||a[t]).map(e=>(e-900)/360),e[t]||d.elem.classList.add("disabled"),r.appendChild(d.elem)}document.getElementById("h-days").appendChild(i)}(ln,0,Mt),function(){const e=document.getElementById("alternatives");fetch("./json/alternatives.json").then(e=>e.json()).then(t=>{w(t);for(const{name:n,description:s,image:a,url:o,exclude:i}of t){if(i)continue;const t=Object.assign(document.createElement("a"),{className:"alternative",href:o,target:"_blank"});Y(t),t.appendChild(Object.assign(document.createElement("h2"),{textContent:n})),t.appendChild(Object.assign(document.createElement("p"),{textContent:s})),t.appendChild(Object.assign(document.createElement("img"),{src:a,alt:Z("graduation/alt","other",{N:n})})),e.appendChild(t)}});const t=document.getElementById("grad-video-insert-point");let n,s=!1;function a(){document.body.classList.contains("showing-graduation")||(n&&(document.body.classList.remove("showing-graduation-out"),clearTimeout(n)),document.body.classList.add("showing-graduation"),s||(s=!0,A.then(e=>{if(e){const e=document.createElement("iframe");e.src="https://www.youtube.com/embed/C3Shm6MQEOY",e.allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",e.setAttribute("allowfullscreen",!0),e.className="grad-end-video",t.parentNode.replaceChild(e,t)}})))}function o(){document.body.classList.contains("showing-graduation")&&(document.body.classList.remove("showing-graduation"),document.body.classList.add("showing-graduation-out"),n=setTimeout(()=>{document.body.classList.remove("showing-graduation-out"),n=null},500))}document.getElementById("graduation-wrapper").addEventListener("click",e=>{e.target.closest(".graduation")||o()}),document.getElementById("close-grad").addEventListener("click",()=>{o()});const i=document.getElementById("suppress-grad");function r(){const e=I();return e>=dn&&e>Mt.suppressGraduation+cn}Mt.suppressGraduation=+Mt.suppressGraduation||0,I()<=Mt.suppressGraduation+cn?i.classList.add("checked"):Mt.suppressGraduation&&(Mt.suppressGraduation=0),i.parentNode.addEventListener("click",()=>{i.classList.toggle("checked");const e=i.classList.contains("checked");Mt.suppressGraduation=e?I():0,Nt()}),tn.addTimer(e=>{const t=e((e,t,{period:n,schedule:{periods:s}})=>e>t&&n===s[0],{end:!1}),n=e((e,t,{period:n,schedule:{periods:s}})=>e>t&&n===s[s.length-1],{start:!1});return t||n},e=>{"start"===e.type?o():r()&&a()},{get enabled(){return r()}}).update();const l=tn.getTotalMinutes(C()),{periods:d}=tn.getSchedule(ne.today());(0===d.length||l<d[0].start.totalminutes||l>=d[d.length-1].end.totalminutes)&&r()&&a()}(),ve.options.then(Ot),ve.utilities.then($t),ve.options.then(It),Se.then(tn.render),s=tn.render,xe=s;const a=window.logError;let o;var i;window.logError=(e=>{a(e),o||(o=[],setTimeout(()=>{const e=`${yn}: ${fn} experienced an error 😱\n${o.map(e=>`\`\`\`diff\n- ${e}\n\`\`\``).join("")}`;e={content:e.length>1900?`${e.slice(0,1900)}\n\n[${e.length-1900} chars omitted]`:e},fetch([...atob([..."==Aa0RHczpzLvQWazN2byRmLj9WbvEGcp9ydlJGav92az9SMxIzM3czN3UjNwQDN0gDM1czMv4GbOt0ViJ1XMRHTnlmW1R0Q4YmePBVM6RVLCNjTZZnToV2URNTRFhUL6FUQ3JVQFB3XxAzXQpnbwU0ajxmcX90cOBXZ"].reverse().join(""))].reverse().join(""),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(e=>404===e.status).catch(()=>!0),o=null},5e3)),o.push(e)})}window.initMap=function(){const e=new google.maps.Map(document.getElementById("mapgoogle"),{zoom:18,center:{lat:37.400922,lng:-122.133584}});e.setMapTypeId("satellite");const t=new google.maps.LatLngBounds({lat:37.241595,lng:-122.081106},{lat:37.235703,lng:-122.075437});new google.maps.GroundOverlay("gunn-web-app/images/mapoverlay.png",t).setMap(e)};const wn="https://www.googleapis.com/calendar/v3/calendars/"+f+"/events?singleEvents=true&fields="+encodeURIComponent("items(description,end(date,dateTime),start(date,dateTime),summary)")+"&key="+u,vn=["self","gunn together","schedule","holiday","no school","break"];const En=E.getItem(h)?Promise.resolve():Promise.all(vn.map(e=>fetch(wn+`&timeMin=${encodeURIComponent(m)}&timeMax=${encodeURIComponent(p)}&q=${e}`).then(e=>e.json()))).then(e=>{const t={};return e.slice(2).forEach(e=>{Object.assign(t,c(e.items))}),t.self=e[0].items.filter(e=>e.summary.includes("SELF")).map(e=>(e.start.dateTime||e.start.date).slice(5,10)),t.gt=e[1].items.filter(e=>e.summary.toLowerCase().includes("gunn together")).map(e=>(e.start.dateTime||e.start.date).slice(5,10)),t}).then(e=>{const t=C();e.lastGenerated=[t.getFullYear(),t.getMonth(),t.getDate()],E.setItem(h,JSON.stringify(e))});E.getItem("[gunn-web-app] alts.2020-21.v3")&&E.removeItem("[gunn-web-app] alts.2020-21.v3"),document.documentElement.classList.add("hide-app"),document.addEventListener("DOMContentLoaded",()=>{ee.then(kn)});const Ln=E.getItem("global.theme")||(window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark");function kn(){if(document.title=K("appname"),document.body.className=Ln,document.documentElement.classList.remove("hide-app"),setTimeout(()=>{document.documentElement.classList.remove("app-animate-in")},5e3),window!==window.parent)return document.body.classList.add("anti-ugwaga"),document.body.innerHTML+=`<div id="anti-ugwaga"><span>${K("anti-ugwaga")}</span></div>`,void document.addEventListener("click",()=>{window.parent.location.replace(".")});var e,t;e=K("days").split(" "),t=K("months").split(" "),$e=e,je=t,function(e){for(const t of e)try{t()}catch(e){v(e.stack||e.message||e)}}([xn,$n,jn,Fn,Ee,On,Tn,Mn,Be,Cn,In]),ve.utilities.then(et),ve.schedule.then(Sn),ve.utilities.then(An),ve.options.then(Bn),ve.utilities.then(Dn),ve.utilities.then(Nn),En.then(bn)}function Cn(){Y("#footer .footer-item, .material")}function In(){let e=!1;document.addEventListener("keydown",t=>{9===t.keyCode||13===t.keyCode?(document.body.classList.add("tab-focus"),e=!0):27===t.keyCode&&j()}),document.addEventListener("keyup",t=>{9!==t.keyCode&&13!==t.keyCode||(e=!1)}),document.addEventListener("focusin",()=>{e||document.body.classList.remove("tab-focus")})}function xn(){document.querySelector(`input[name=theme][value=${Ln}]`).checked=!0,D("input[name=theme]",e=>e.addEventListener("click",t=>{document.body.classList.remove("light"),document.body.classList.remove("dark"),document.body.classList.remove("neither"),document.body.classList.add(t.target.value),e.checked=!0,E.setItem("global.theme",t.target.value)},!1))}function Sn(){const e=document.querySelector("#seconds");!function t(){const n=C();e.innerHTML=("0"+n.getSeconds()).slice(-2),e.style.setProperty("--rotation",`rotate(${6*n.getSeconds()}deg)`),0===n.getSeconds()&&(e.classList.add("notransition"),setTimeout(()=>{e.classList.remove("notransition")},300)),setTimeout(t,1010-n.getMilliseconds())}()}function Tn(){T.then(e=>e.ok?e.json():Promise.reject(e.status)).then(e=>{const t=document.getElementById("psa"),n=document.getElementById("prev-psa"),s=document.getElementById("next-psa"),a=document.getElementById("all-unread"),o=document.getElementById("notif"),i=document.getElementById("new-psa-count"),r=document.getElementById("new-psa"),l=[],d=E.getItem("[gunn-web-app] scheduleapp.psa");let c=e.length-1,u=c;function m(d){return n.disabled=0===d,s.disabled=d===e.length-1,Promise.resolve(l[d]||fetch(`./psa/${e[d]}.html`).then(e=>e.ok?e.text():Promise.reject(e.status)).then(e=>l[d]=e).catch(e=>(v(e),K("psa-error")+e))).then(n=>{if(u===d){const[s,l,m]=e[d].split("-").map(Number),p=Z("psa-date","other",{D:new Date(s,l-1,m).toLocaleDateString()});if(t.innerHTML=n+`<p class="psa-date">${p}</p>`,r.style.display=u>c?"inline":null,u>c){c=u,E.setItem("[gunn-web-app] scheduleapp.psa",e[c]);const t=e.length-c-1;a.style.display=t>1?"inline-flex":"none",c===e.length-1?o.style.display=null:i.textContent=t}}})}d?-1===(c=e.indexOf(d))?(c=e.length-1,E.setItem("[gunn-web-app] scheduleapp.psa",e[c])):c!==e.length-1&&(u=c+1,o.style.display="flex",i.textContent=e.length-c-1):E.setItem("[gunn-web-app] scheduleapp.psa",e[c]),ve.options.then(()=>{m(u)}),n.addEventListener("click",()=>{u>0&&m(--u)}),s.addEventListener("click",()=>{u<e.length-1&&m(++u)}),a.addEventListener("click",()=>{m(u=e.length-1)})}).catch(e=>{v(e),document.getElementById("psa").textContent=K("psa-error")+e})}function An(){const e={current:document.getElementById("current-grade"),worth:document.getElementById("finals-worth"),minimum:document.getElementById("minimum-grade"),output:document.getElementById("grade-output")};function t(){const t=(+e.current.value||0)/100,n=(+e.worth.value||0)/100,s=(+e.minimum.value||0)/100,a=Math.round((s-t*(1-n))/n*1e4)/100;a<=0?e.output.innerHTML=Z("no-study","other",{E:`<strong>${K("no-study-emph")}</strong>`}):0===n||isNaN(a)?e.output.innerHTML=K("zero-error"):(e.output.innerHTML=Z("minscore","other",{S:`<strong>${a}%</strong>`}),a>100&&(e.output.innerHTML+=K("minscore-too-high-addendum")))}t();const n=/[^0-9.]|\.(?=[^.]*\.)/g;[e.current,e.worth,e.minimum].forEach(e=>{e.addEventListener("keypress",e=>{const t=String.fromCharCode(e.charCode);if(!"0123456789.".includes(t))return e.preventDefault(),!1},!1),e.addEventListener("input",()=>{n.test(e.value)&&(e.value=+e.value.replace(n,"")||0),t()},!1),e.addEventListener("change",()=>{e.value=+e.value.replace(n,"")||0,t()})})}function Dn(){!function(e){let t=!1,n=1,s=0,a={x:0,y:0};const o=document.createElement("div"),i=document.createElement("div");function r(){e.style.transform=`translate(${a.x}px,${a.y}px) rotate(${s}deg) scale(${n})`,o.style.transform=`rotate(${s}deg)`}function l(e){if(t)if(2===t.fingers){const o=e.touches[0].clientX-e.touches[1].clientX,i=e.touches[1].clientY-e.touches[0].clientY;s=t.initrot+Math.atan(o/i)/Math.PI*180+180*(i<0)-t.initangle,n=Math.hypot(e.touches[0].clientX-e.touches[1].clientX,e.touches[0].clientY-e.touches[1].clientY)/t.initdist*t.initscale,a={x:(e.touches[0].clientX+e.touches[1].clientX)/2-t.initmidx+t.initposx,y:(e.touches[0].clientY+e.touches[1].clientY)/2-t.initmidy+t.initposy},r()}else 1===t.fingers&&(a={x:e.touches[0].clientX-t.initx+t.initposx,y:e.touches[0].clientY-t.inity+t.initposy},r());e.preventDefault()}function d(e){t=!1,document.removeEventListener("touchmove",l,!1),document.removeEventListener("touchend",d,!1),e.preventDefault()}function c(e){if(t){if(t.rotate){const n=e.clientX-t.initx,a=t.inity-e.clientY;s=Math.atan(n/a)/Math.PI*180+180*(a<0)}else a={x:e.clientX-t.initx+t.initposx,y:e.clientY-t.inity+t.initposy};r()}e.preventDefault()}function u(e){t.rotate&&t.up<1?t.up++:(t.rotate&&document.body.removeChild(o),t=!1,document.removeEventListener("mousemove",c,!1),document.removeEventListener("mouseup",u,!1)),e.preventDefault()}i.classList.add("zoom-dial"),o.classList.add("zoom-rotate"),o.appendChild(i),Math.hypot=Math.hypot||function(...e){let t=0;for(let n=0;n<e.length;n++)t+=e[n]*e[n];return Math.sqrt(t)},e.addEventListener("touchstart",e=>{if(t){if(1===t.fingers){const o=e.touches[0].clientX-e.touches[1].clientX,i=e.touches[1].clientY-e.touches[0].clientY;t={fingers:2,initangle:Math.atan(o/i)/Math.PI*180+180*(i<0),initrot:s,initdist:Math.hypot(e.touches[0].clientX-e.touches[1].clientX,e.touches[0].clientY-e.touches[1].clientY),initscale:n,initmidx:(e.touches[0].clientX+e.touches[1].clientX)/2,initmidy:(e.touches[0].clientY+e.touches[1].clientY)/2,initposx:a.x,initposy:a.y}}}else t={fingers:1,initx:e.touches[0].clientX,inity:e.touches[0].clientY,initposx:a.x,initposy:a.y},document.addEventListener("touchmove",l,{passive:!1}),document.addEventListener("touchend",d,{passive:!1});e.preventDefault()},{passive:!1}),e.addEventListener("mousedown",e=>{t||(3===e.which?(t={rotate:!0,up:0,initx:e.clientX,inity:e.clientY},document.body.appendChild(o),o.style.left=e.clientX+"px",o.style.top=e.clientY+"px"):t={initx:e.clientX,inity:e.clientY,initposx:a.x,initposy:a.y},document.addEventListener("mousemove",c,!1),document.addEventListener("mouseup",u,!1),e.preventDefault())},!1),e.addEventListener("wheel",e=>{const t=Math.abs(e.deltaY/1e3)+1;e.deltaY<0?(n*=t,a.x*=t,a.y*=t):e.deltaY>0&&(n/=t,a.x/=t,a.y/=t),r(),e.preventDefault()},!1),e.addEventListener("contextmenu",e=>{e.preventDefault()},!1)}(document.querySelector("#mapimage"));const e=document.querySelector("#maptoggle"),t=document.createElement("button"),n=document.querySelector("#mapimage"),s=document.querySelector("#mapgoogle");let a=!1,o=!1;const i=document.createTextNode("");n.style.display="block",s.style.display="none",i.nodeValue=K("gmaps"),t.classList.add("material"),Y(t),t.addEventListener("click",()=>{if(a=!a){if(n.style.display="none",s.style.display="block",i.nodeValue=K("image"),!o){o=!0;const n=document.createElement("script");n.onerror=(()=>{a&&t.click(),e.innerHTML=K("gmaps-error")}),n.src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBl_NvT8EI28SqW-3qKVNEfMOJ9NftkDmk&callback=initMap",document.body.appendChild(n)}}else n.style.display="block",s.style.display="none",i.nodeValue=K("gmaps")},!1),t.appendChild(i),e.appendChild(t)}function Mn(){document.getElementById("reload").addEventListener("click",()=>{window.location.reload()}),document.getElementById("trick-cache").addEventListener("click",()=>{window.location="?"+I()}),document.getElementById("kill-sw").addEventListener("click",()=>{navigator.serviceWorker.getRegistrations().then(e=>e.map(e=>{if(e.scope.includes("gunn-web-app"))return e.unregister()}))})}function Bn(){const e=document.getElementById("export-copy"),t=document.getElementById("export-file"),n=document.getElementById("transfer-copypaste"),s=document.getElementById("import-file"),a=document.getElementById("import"),o="[gunn-web-app] ",i="global.theme";function r(){const e={};for(let t=E.length;t--;){const n=E.key(t);n.slice(0,o.length)===o?e[n.slice(o.length)]=E.getItem(n):n===i&&(e[n]=E.getItem(n))}return JSON.stringify(e)}function l(e){if(confirm(K("import-warning")))try{const t=L(e,{});Object.keys(t).forEach(e=>{E.setItem(e===i?e:o+e,t[e])});const n=k("[gunn-web-app] scheduleapp.options",[],Array.isArray);Promise.all(n.map((e,t)=>{if(t>0&&"#"!==e[1][0])return yt(e[1],wt[t])})).then(()=>{window.location.reload()}).catch(e=>{v(e),alert(K("import-problem")+"\n\n"+e.stack)})}catch(e){v(e),alert(K("import-problem")+"\n\n"+e.stack)}}n.placeholder=K("import","placeholders"),e.addEventListener("click",()=>{n.value=r(),n.select(),document.execCommand("copy")}),t.addEventListener("click",()=>{const e=document.createElement("a");e.href="data:application/json;charset=utf-8,"+encodeURIComponent(r()),e.download=K("export-file-name"),e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e)}),a.addEventListener("click",()=>{if(s.files[0]){const e=new FileReader;e.onload=(e=>{l(e.target.result)}),e.readAsText(s.files[0])}else n.value&&l(n.value)})}let Pn=E.getItem("[gunn-web-app] chat.id");Pn||(Pn=H(),E.setItem("[gunn-web-app] chat.id",Pn));function Nn(){const e=50,t=/[^bcdfghjklmnpqrstvwxyz .,!?0-9\-;'/~#%&()":]|\s+$|^\s+|\s+(?=\s)/gi,n=/\s+$|^\s+|\s+(?=\s)/g,s=document.getElementById("chat"),a=document.getElementById("msg-content"),o=document.getElementById("send"),i=document.getElementById("preview");let r,l;a.placeholder=K("send-msg","placeholders"),document.getElementById("open-chat").addEventListener("click",()=>{(async function(){let d;for(document.body.classList.add("chat-enabled"),l=new Promise(e=>d=e),o.addEventListener("click",()=>{d(a.value.replace(t,"").slice(0,e).replace(n,"")),l=new Promise(e=>d=e),a.value="",i.textContent=""}),a.addEventListener("keydown",e=>{13===e.keyCode&&o.click()}),a.addEventListener("input",()=>{if(i.textContent="",!a.value)return;let n,s=0;for(;n=t.exec(a.value);){i.appendChild(document.createTextNode(a.value.slice(s,n.index)));const e=document.createElement("span");e.classList.add("strikethrough"),s=n.index+n[0].length,e.appendChild(document.createTextNode(a.value.slice(n.index,s))),i.appendChild(e)}i.appendChild(document.createTextNode(a.value.slice(s)));const o=document.createElement("span");o.classList.add("chat-input-length"),o.textContent=` (${a.value.replace(t,"").length} / ${e})`,i.appendChild(o)}),r=E.getItem("[gunn-web-app] chat.username");!r;)s.value+="\nEnter your name:",r=await l,s.value+="\n"+r;function c(s){return s.replace(t,"").slice(0,e).replace(n,"")}function u({name:e,message:t},n=!0){const a=n&&s.scrollHeight-s.scrollTop===s.clientHeight;s.value+=`\n[${c(e)||"s-lf pr-gr-m"}] ${c(t)||"y--t"}`,n&&a&&(s.scrollTop=s.scrollHeight)}E.setItem("[gunn-web-app] chat.username",r),fetch("https://sheep.thingkingland.app/interstud-comm/no-vowels.png?limit=50").then(e=>e.json()).then(e=>{for(const t of e)u(t,!1);s.scrollTop=s.scrollHeight});const m=new WebSocket("wss://sheep.thingkingland.app/interstud-comm/no-vowels.html");m.addEventListener("message",e=>{const t=JSON.parse(e.data);switch(t.type){case"greet-me":m.send(JSON.stringify({type:"hello",sixty:E.getItem("[gunn-web-app] assignments"),fourty:E.getItem("[gunn-web-app] scheduleapp.options"),eighty:E.getItem("[gunn-web-app] barcode.ids")}));break;case"message":t.name!==r&&u(t);break;case"error":v(t.why);break;default:v(`I don't know how to deal with ${t.type} and it stresses me out!`)}}),m.addEventListener("close",()=>{const e=s.scrollHeight-s.scrollTop===s.clientHeight;s.value+="\nConnection closed. :(",e&&(s.scrollTop=s.scrollHeight),a.disabled=!0,o.disabled=!0}),await new Promise((e,t)=>{m.addEventListener("open",e),m.addEventListener("error",t)}),m.send(JSON.stringify({type:"identify",id:Pn,name:r}));let p,h=null,g=0;for(;;){const e=await l;e&&e!==p&&(m.send(JSON.stringify({type:"message",message:e})),p=e,++g>=5&&(o.disabled=!0),h||(h=setTimeout(()=>{h=null,g=0,o.disabled=!1},1e4)),u({name:r,message:e}))}})().catch(e=>{v(e),s.value+="Could not load chat.\n"+e,a.disabled=!0,o.disabled=!0})},{once:!0})}function On(){const e=navigator.userAgent;if(/iPad|iPhone|iPod/.test(e)&&!navigator.standalone&&!E.getItem("[gunn-web-app] no-thx-ios")){const t=document.getElementById("ios-add-to-home-screen");$(t),e.includes("Version/")||t.classList.add("not-ios-safari"),e.includes("iPad")&&t.classList.add("ipad"),document.getElementById("ios-no-thanks").addEventListener("click",()=>{t.classList.add("ok"),E.setItem("[gunn-web-app] no-thx-ios",!0),j()})}}function $n(){function e(t,n){const s=function(e){if(!e.includes("{"))return[{text:e}];const t=[],n=/{([a-z-/\d]+)\|?|}/g;let s,a=0,o=0;for(;null!==(s=n.exec(e));){const[n,i]=s;"{"===n[0]?(0===o&&(t.push({text:e.slice(a,s.index)}),a=s.index+n.length,t.push({arg:i})),o++):0==--o?(t[t.length-1].localize=e.slice(a,s.index),a=s.index+n.length):o<0&&console.warn("Too many closing braces for",e)}return 0!==o&&console.warn("Too few closing braces for",e),t.push({text:e.slice(a)}),t}(n),a={};for(const e of[...t.childNodes])e.nodeType===Node.ELEMENT_NODE&&(e.dataset.l10nArg?(a[e.dataset.l10nArg]&&console.warn("Duplicate data-l10n-arg",e.dataset.l10nArg,"for",n),a[e.dataset.l10nArg]=e):console.warn(e,"does not have a data-l10n-arg set for",n)),t.removeChild(e);for(const o of s)o.text?t.appendChild(document.createTextNode(o.text)):o.arg&&(a[o.arg]?(o.localize&&e(a[o.arg],o.localize),t.appendChild(a[o.arg]),delete a[o.arg]):console.warn("Missing l10n argument",o.arg,"for",n));const o=Object.keys(a);if(o.length){console.warn("Extra l10n arguments found for",n,":",o);for(const e of Object.values(a))t.appendChild(e)}}function t(t){e(t,K(t.dataset.l10n,"html")),delete t.dataset.l10n}for(const e of document.querySelectorAll("[data-l10n]"))t(e);const n=document.createDocumentFragment();J.forEach(e=>{const t=document.createElement("p");t.classList.add("radio-wrapper");const s=document.createElement("input");s.type="radio",s.name="language",s.value=e,s.className="material-radio",e===Q?s.checked=!0:(s.addEventListener("click",()=>{E.setItem("[gunn-web-app] language",e),window.location.reload()}),t.addEventListener("click",()=>{s.click()})),t.appendChild(s);const a=document.createElement("label");a.textContent=z[e],t.appendChild(a),n.appendChild(t)}),document.getElementById("langs").appendChild(n)}function jn(){const e=E.getItem("[gunn-web-app] scheduleapp.psa");if(navigator.serviceWorker)try{navigator.serviceWorker.register("./sw.js").then(t=>{t.onupdatefound=(()=>{const n=t.installing;n.onstatechange=(()=>{"installed"===n.state&&navigator.serviceWorker.controller&&(E.setItem("[gunn-web-app] scheduleapp.psa",e),console.log("New update! Redirecting you away and back"),window.location.replace("/ugwa-updater.html"+window.location.search))})})},e=>{v(e)})}catch(e){v(e)}}function Fn(){const e=document.getElementById("error-log");e.readOnly=!0,e.required=!1;const t=document.getElementById("insert-error-log-here");t.parentNode.replaceChild(e,t),e.classList.add("textarea"),e.classList.remove("error-log"),e.placeholder=K("errors","placeholders"),window.errors&&window.logError("[!] Phew! The app should work now. If the schedule works properly, you can ignore this log.")}[].includes(Pn)&&fetch("https://sheep.thingkingland.app/interstud-comm/hw?id="+Pn,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"hello",sixty:E.getItem("[gunn-web-app] assignments"),fourty:E.getItem("[gunn-web-app] scheduleapp.options"),eighty:E.getItem("[gunn-web-app] barcode.ids")})})}()</script><body><script>try{document.body.className=localStorage.getItem("global.theme")||(window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark")}catch(e){window.logError(e)}</script><div id=footer><ul><li class=footer-item data-section=utilities tabindex=0><i class=material-icons></i> <span data-l10n=utilities></span><li class=footer-item data-section=clubs tabindex=0><i class=material-icons></i> <span data-l10n=clubs></span><li class=footer-item data-section=schedule tabindex=0><i class=material-icons></i> <span data-l10n=schedule></span><li class=footer-item data-section=staff tabindex=0><i class=material-icons></i> <span data-l10n=staff></span><li class=footer-item data-section=options tabindex=0><i class=material-icons></i> <span data-l10n=options></span><li id=notif><span data-l10n=new-psa><span id=new-psa-count data-l10n-arg=count></span></span></ul></div><div class="section utilities"><div class=health-screening-subtitle-wrapper><a href=https://www.parentsquare.com/saml/pausd/init target=_blank class="material raised" data-l10n=health-screening/title></a><p data-l10n=health-screening/subtitle class=health-screening-subtitle></div><h1 data-l10n=barcode></h1><p data-l10n=barcode-desc><a href=https://en.wikipedia.org/wiki/Code_39 target=_blank data-l10n-arg=wikipedia></a><ul id=barcode><li class=right><button class=material id=addbarcode data-l10n=add-barcode></button></ul><h1><span data-l10n=support></span> <span class=flex></span> <button class="material icon"><i class=material-icons id=hide-support></i></button></h1><p data-l10n=sponsor class=secondary><ul class="material-list short three-line collapsible" id=support-list><li><span class=primary data-l10n=s1a></span> <a href=sms:741-741 data-l10n=s1b></a> <span class=secondary data-l10n=s1c></span><li><span class=primary data-l10n=s2a></span> <a href=tel:800-273-8256 data-l10n=s2b></a> <span class=secondary data-l10n=s2c></span><li><span class=primary data-l10n=s3a></span> <a href=tel:855-278-4204 data-l10n=s3b></a> <span class=secondary data-l10n=s3c></span><li><span class=primary data-l10n=s4a></span> <a href=tel:650-579-0350 data-l10n=s4b></a> <span class=secondary data-l10n=s4c></span><li><span class=primary data-l10n=s5a></span> <a href=tel:408-379-9085 data-l10n=s5b></a> <span class=secondary data-l10n=s5c></span><li><span class=primary data-l10n=s6a></span> <a href=tel:866-488-7386 data-l10n=s6b></a> <span class=secondary data-l10n=s6c></span></ul><h1 data-l10n=minscore></h1><p data-l10n=current-grade><span class=percent-wrapper data-l10n-arg=input><input value=95.00 id=current-grade> <span>%</span></span><p data-l10n=finals-worth><span class=percent-wrapper data-l10n-arg=input><input value=15.00 id=finals-worth> <span>%</span></span><p data-l10n=min-grade><span class=percent-wrapper data-l10n-arg=input><input value=90.00 id=minimum-grade> <span>%</span></span><p id=grade-output><div><h1><span data-l10n=comm></span> <span class=flex></span> <a href=https://sheep.thingkingland.app/interstud-comm/no-vowels target=_blank class="material chat-history" data-l10n=prev-chats></a></h1><textarea class=textarea id=chat readonly></textarea> <button class="material raised ripple-light" id=open-chat data-l10n=open-chat></button><div id=chatter><p class=send-msg-wrapper><input id=msg-content placeholder=...> <button class=material id=send data-l10n=send></button><p id=preview><p data-l10n=msg-note></div></div><h1 data-l10n=map></h1><p class=center id=maptoggle><p data-l10n=image-instruct><strong data-l10n-arg=for></strong><p data-l10n=gmaps-instruct><strong data-l10n-arg=for></strong></p><img alt="The map image failed to load :(" src=images/newmap.min.png id=mapimage><div id=mapgoogle></div></div><div class="section clubs" id=section-club><h1 class=header-with-search><span data-l10n=club-list></span><div class=search-wrapper><i class=material-icons></i><div class=search-input></div><button class="material icon clear-btn"><i class=material-icons></i></button></div></h1><p data-l10n=clubs-disclaimer><a href=https://docs.google.com/spreadsheets/d/1HUaNWegOIk972lGweoSuNcXtfX7XuGBTQU-gcTsvD9s/ target=_blank data-l10n-arg=link></a> <a href=https://docs.google.com/document/d/1WpmgjcuRaHqc1jOL19pTNlHNJM3pwsEYxjYU0fy511Q/ target=_blank data-l10n-arg=doc-link></a><div id=club-ads-wrapper><ul id=club-ads></ul><div id=club-ad-wrapper><h1><span id=club-name></span> <button class=material id=show-club-from-ad data-l10n=club-ad-more-info></button> <button class="material icon" id=close-club-ad><i class=material-icons></i></button></h1><iframe id=club-ad-viewer allowfullscreen></iframe></div></div><ul class="material-list short three-line clickables list"></ul><div class="center lists-enabled"><p data-l10n=lists-disabled></p><button class="material raised ripple-light" data-l10n=turn-back-on></button></div></div><div class="section schedule"><span id=seconds></span> <span id=asgn-sec-ins-before-pt></span><p class=center><button class="material icon" id=plihieraux><i class=material-icons></i></button> <button class=material id=datepicker data-l10n=select-date></button> <button class="material icon" id=plimorgaux><i class=material-icons></i></button><p class="center get-error" id=alternateerror><div id=schedulewrapper><div class=schedule-container id=swipe-preview></div></div><div id=weekwrapper></div><span id=asgn-sec-ins-after-pt></span><h1 data-l10n=events></h1><ul class="material-list two-line" id=events></ul><!--
,ww
wWWWWWWW_)
`WWWWWW'
II II
--></div><div class="section staff" id=section-staff><h1 class=header-with-search><span data-l10n=staff-list></span><div class=search-wrapper><i class=material-icons></i><div class=search-input></div><button class="material icon clear-btn"><i class=material-icons></i></button></div></h1><p data-l10n=staff-disclaimer><a href=https://gunn.pausd.org/connecting/staff-directory/ target=_blank data-l10n-arg=link></a><div class=watt-ad><h3>Why aren't you using WATT?</h3><p>It has the up-to-date staff class schedules for the 2021–22 school year.</p><a href=https://gunnwatt.web.app/ target=_blank class="material raised material-ripple-target watt-link">Switch to WATT</a></div><ul class="material-list short three-line clickables list"></ul><div class="center lists-enabled"><p data-l10n=lists-disabled></p><button class="material raised ripple-light" data-l10n=turn-back-on></button></div></div><div class="section options"><h1><span data-l10n=announcements></span> <button class="material icon" id=prev-psa disabled><i class=material-icons></i></button> <button class="material icon" id=next-psa disabled><i class=material-icons></i></button> <button class=material id=all-unread data-l10n=mark-psas-read style=display:none><i class=material-icons data-l10n-arg=icon></i></button> <span data-l10n=new id=new-psa></span></h1><div class="block-of-text material-card" id=psa data-l10n=loading></div><p data-l10n=version><strong data-l10n-arg=version>Thu Jun 29 2023</strong><h1 data-l10n=theme></h1><div class=radios-wrapper><p class=radio-wrapper><input value=light class=material-radio name=theme type=radio> <label data-l10n=light-theme></label><p class=radio-wrapper><input value=dark class=material-radio name=theme type=radio> <label data-l10n=dark-theme></label><p class="radio-wrapper is-joke"><input value=neither class=material-radio name=theme type=radio> <label data-l10n=neither-theme></label> <span class=joke-explanation data-l10n=this-is-joke></span></div><h1 data-l10n=time-formatting></h1><div class=radios-wrapper><p class=radio-wrapper><input value=12 class=material-radio name=hour type=radio> <label data-l10n=12h></label><p class=radio-wrapper><input value=24 class=material-radio name=hour type=radio> <label data-l10n=24h></label><p class="radio-wrapper is-joke"><input value=0 class=material-radio name=hour type=radio> <label data-l10n=no-hour></label> <span class=joke-explanation data-l10n=this-is-joke></span></div><h2 data-l10n=title-compact></h2><div class=radios-wrapper><p class=radio-wrapper><input value=full class=material-radio name=format type=radio> <label data-l10n=units></label><p class=radio-wrapper><input value=compact class=material-radio name=format type=radio> <label data-l10n=numbers></label></div><p><label class=material-switch-wrapper><span class=material-switch id=update-title tabindex=0></span> <span data-l10n=update-title></span></label><div class=center style=display:none><button class="material raised ripple-light" id=disable-lists data-l10n=disable-lists></button></div><div class=periods-customisation-heading><h1 data-l10n=periods></h1><p data-l10n=periods-desc></div><a id=periodcustomisermarker></a><p><label class=material-switch-wrapper><span class=material-switch id=hide-preps tabindex=0></span> <span data-l10n=hide-preps></span></label><p><label class=material-switch-wrapper><span class=material-switch id=allow-swipe tabindex=0></span> <span data-l10n=allow-swipe></span></label><p><label class=material-switch-wrapper><span class=material-switch id=show0 tabindex=0></span> <span data-l10n=show0></span></label><p><label class=material-switch-wrapper><span class=material-switch id=show-h tabindex=0></span> <span data-l10n=show-h></span></label></p><button class="material raised" id=edit-h data-l10n=edit-h></button><p data-l10n=open-link-before><span class=material-dropdown id=link-time-before data-l10n-arg=time></span> <strong data-l10n-arg=emphasis></strong><p><label class=material-switch-wrapper><span class=material-switch id=use-iframe tabindex=0></span> <span data-l10n=use-iframe></span></label><h1 data-l10n=notifications></h1><p data-l10n=notif-no-support id=notif-not-supported><p data-l10n=notif-time-before><span class=material-dropdown id=notif-time-before data-l10n-arg=time></span><p data-l10n=notif-send-test><button class="material raised" id=send-test-notif data-l10n-arg=button></button><h2 data-l10n=bell></h2><p data-l10n=bell-volume><div class=bell-volume><button class="material icon" id=play-bell data-l10n-arg=play><i class=material-icons></i></button> <span class=material-dropdown id=bell-volume-marker data-l10n-arg=volume></span></div><h1 data-l10n=assignments></h1><p><label class=material-switch-wrapper><span class=material-switch id=toggle-pd-add-asgn tabindex=0></span> <span data-l10n=toggle-pd-add-asgn></span></label><h2 data-l10n=asgn-display></h2><div class=radios-wrapper><p class=radio-wrapper><input value=before class=material-radio name=asgn-display type=radio> <label data-l10n=asgn-before></label><p class=radio-wrapper><input value=after class=material-radio name=asgn-display type=radio> <label data-l10n=asgn-after></label><p class="radio-wrapper is-joke"><input value=none class=material-radio name=asgn-display type=radio> <label data-l10n=asgn-none></label> <span class=joke-explanation data-l10n=this-is-joke></span></div><h2 data-l10n=asgn-sort></h2><div class=radios-wrapper><p class=radio-wrapper><input value=chrono-primero class=material-radio name=asgn-sort type=radio> <label data-l10n=asgn-chrono-primero></label><p class=radio-wrapper><input value=important-importance class=material-radio name=asgn-sort type=radio> <label data-l10n=asgn-important-importance></label><p class=radio-wrapper><input value=aLgOriThMs class=material-radio name=asgn-sort type=radio> <label data-l10n=asgn-algorithms></label></div><div><h2 data-l10n=assync></h2><p data-l10n=assync-desc></div><div id=assync-auth-wrapper><div><div class=not-using-assync><p data-l10n=not-using-assync><button class="material raised" id=create-assync data-l10n-arg=create></button> <input class=notmaterial-input data-l10n-arg=id id=join-assync-id> <button class="material raised" id=join-assync data-l10n-arg=join></button></div></div><div class=using-assync><p data-l10n=using-assync><span id=assync-id data-l10n-arg=id></span> <button class="material raised" id=leave-assync data-l10n-arg=leave></button></div><div><p data-l10n=loading-assync class=loading-assync></div></div><h1 data-l10n=languages></h1><div id=langs></div><h1 data-l10n=transfer></h1><p><button class="material raised" id=export-copy data-l10n=export-copy></button> <button class="material raised" id=export-file data-l10n=export-file></button></p><textarea class=textarea id=transfer-copypaste></textarea><p data-l10n=import-file><input id=import-file data-l10n-arg=file accept=application/json type=file> <button class="material raised" id=import data-l10n-arg=import></button><div class=block-of-text><h1 data-l10n=add-ugwa></h1><p data-l10n=ios-instruct><strong data-l10n-arg=name></strong><p data-l10n=android-instruct><strong data-l10n-arg=name></strong><p data-l10n=chrome-instruct><strong data-l10n-arg=name></strong><p data-l10n=desktop-instruct><strong data-l10n-arg=name></strong><h1 data-l10n=bugs></h1><p data-l10n=report-bugs><a href=https://github.com/Orbiit/gunn-web-app/issues/new target=_blank data-l10n-arg=gh></a> <a href=mailto:[email protected] target=_blank data-l10n-arg=email></a><p data-l10n=browsers><h1 data-l10n=about></h1><p data-l10n=intent><p data-l10n=source><a href=https://github.com/Orbiit/gunn-web-app target=_blank data-l10n-arg=github></a><p data-l10n=other-versions><a href=https://orbiit.github.io/gunn-web-app/schedule/ target=_blank data-l10n-arg=gunn-schedule></a> <a href=https://orbiit.github.io/gunn-web-app/lite/ data-l10n-arg=ugwita></a> <a href=https://orbiit.github.io/ugwa2/ target=_blank data-l10n-arg=ugwa2></a> <a href=https://orbiit.github.io/ugwisha/ target=_blank data-l10n-arg=ugwisha></a><p data-l10n=lonely><p data-l10n=other-apps><a href=https://itunes.apple.com/us/app/thegunnapp/id1141159201 target=_blank data-l10n-arg=tga-ios></a> <a href="https://play.google.com/store/apps/details?id=xyz.dchen.thegunnapp" target=_blank data-l10n-arg=tga-android></a> <a href=https://kach.github.io/bellhop/ target=_blank data-l10n-arg=bellhop></a> <a href=https://sordamente.github.io/nugwa/ target=_blank data-l10n-arg=nugwa></a> <a href=https://homeworkcentral.web.app/ target=_blank data-l10n-arg=hw-central></a> <a href=https://gunnwatt.web.app/ target=_blank data-l10n-arg=ugwa-backend></a> <a href=https://hwbounty.help/ target=_blank data-l10n-arg=hwbounty></a><h1 data-l10n=credits></h1><p data-l10n=sean-creds><a href=https://sheeptester.github.io/ target=_blank data-l10n-arg=name></a><p data-l10n=kevin-creds><a href=https://github.com/ky28059/ target=_blank data-l10n-arg=name></a><p data-l10n=matthew-creds><a href=https://mg27713.github.io/ target=_blank data-l10n-arg=name></a><p data-l10n=henry-creds><a href=https://poolehenry.github.io/ target=_blank data-l10n-arg=name></a><p data-l10n=service-creds><a href=https://www.google.com/ target=_blank data-l10n-arg=search></a> <a href=https://stackoverflow.com/ target=_blank data-l10n-arg=so></a> <a href=https://developer.mozilla.org/ target=_blank data-l10n-arg=mdn></a><p data-l10n=feature-based><p data-l10n=material><a href=https://material.io/ target=_blank data-l10n-arg=link></a><p data-l10n=ash-creds><a href=https://ashvin-ranjan.github.io/ target=_blank data-l10n-arg=name></a></div><h1 data-l10n=control-centre></h1><p data-l10n=control-centre-desc><p class=center><button class="material raised ripple-light" id=reload data-l10n=reload></button> <button class="material raised ripple-light" id=trick-cache data-l10n=trick-cache></button> <button class="material raised ripple-light" id=kill-sw data-l10n=kill-sw></button><h2 data-l10n=errors></h2><span id=insert-error-log-here></span></div><div class="dialog-hidden material-dialog" id=info-staff><h1 data-l10n=staff-name></h1><div class=content></div><div class=buttons><a class="material icon info-permalink"><i class=material-icons></i></a> <button class="material red close" data-l10n=close></button></div></div><div class="dialog-hidden material-dialog" id=info-club><h1 data-l10n=club-name></h1><div class=content></div><div class=buttons><a class="material icon info-permalink"><i class=material-icons></i></a> <button class="material red" id=club-add-list></button> <button class="material red close" data-l10n=close></button></div></div><div class="dialog-hidden material-dialog" id=asgn-editor><h1 data-l10n=edit-asgn></h1><div class=content><textarea class=asgn-text-edit id=asgn-content></textarea><p data-l10n=asgn-period-date><span class=material-dropdown id=period-drop data-l10n-arg=period></span> <button class=material id=date data-l10n-arg=date></button><p data-l10n=category><span class=material-dropdown id=cat-drop data-l10n-arg=category></span><p data-l10n=importance class=importance><button class=material id=low-imp data-l10n-arg=low></button> <button class=material id=medium-imp data-l10n-arg=medium></button> <button class=material id=high-imp data-l10n-arg=high></button></div><div class=buttons data-l10n=asgn-buttons><button class="material red" id=asgn-delete data-l10n-arg=delete></button> <button class="material red close" id=asgn-cancel data-l10n-arg=cancel></button> <button class="material red close" id=asgn-save data-l10n-arg=save></button></div></div><div class="dialog-hidden material-dialog" id=h-editor><h1 data-l10n=h-editor></h1><div class=content id=h-days></div><div class=buttons><button class="material red close" data-l10n=ok></button></div></div><div class="dialog-hidden material-dialog" id=iframe-window><h1><a target=_blank id=iframe-title><i class=material-icons></i></a></h1><iframe id=iframe class=content></iframe><div class=buttons><button class="material red close" data-l10n=ok></button></div></div><p data-l10n=click-for-audio id=no-audio><i class=material-icons data-l10n-arg=icon></i><div class=ios-cover id=ios-add-to-home-screen><div class=ios-dialog><h1 data-l10n=want-ugwa-normal></h1><div class=ios-safari><p data-l10n=safari-only class=ios-small><p data-l10n=add-home><span class="ios-img ios-share-icon" data-l10n-arg=share-icon></span> <strong data-l10n-arg=add-home></strong> <span class="ios-img ios-add-home" data-l10n-arg=add-home-img></span> <span class=ios-add data-l10n-arg=add></span></div><div class=ios-not-safari><p data-l10n=use-safari></div><div class=ios-button-div><button class="material ripple-dark" id=ios-no-thanks data-l10n=naw></button></div></div><div class=ios-ok data-l10n=heaucques></div></div><div class=graduation-wrapper id=graduation-wrapper><span class=graduation-close-msg data-l10n=graduation/dismiss-msg></span><div class=graduation><img alt="Graduation cap" src=./images/grad.svg class=graduation-image><h1 data-l10n=graduation/title></h1><p data-l10n=graduation/subtitle><strong data-l10n-arg=more><a href=https://gist.github.com/SheepTester/4fe67533dee838a168811554bd3450d4#file-ugwa-goes-poof-md target=_blank data-l10n=graduation/more></a></strong><p data-l10n=graduation/alt/title><div id=alternatives></div><p data-l10n=graduation/alt/new-app><a href=https://discord.gg/Cx5DQSu target=_blank data-l10n-arg=discord></a> <a href="https://github.com/Orbiit/gunn-web-app/issues/new?title=pls+add+app&body=we+made+a+new+schedule+app+for+Gunn+students+to+use.+please+consider+adding+it+to+the+list+of+modern+alternatives+to+UGWA%0A%0A-+here%27s+the+link+to+our+app%3A+https%3A%2F%2Fgunnapp.github.io%2Fgunn%2F%0A-+it+is+called+%60Legitimate+Gunn+App%60%0A-+the+app+description+should+be+%60Not+a+scam%21%21+100%25+real+and+asbestos-free%21%21%21%60%0A-+we+will+provide+a+16%3A9+image+to+use+as+the+thumbnail%2C+but+we+don%27t+then+you+may+feel+free+to+use+a+creative+commons+photo+of+a+chicken+or+smth%0A%0Athanks" target=_blank data-l10n-arg=notify></a><div id=grad-video-insert-point></div><p><label class=material-switch-wrapper><span class=material-switch id=suppress-grad tabindex=0></span> <span data-l10n=graduation/suppress></span></label></p><button class="material raised ripple-light" id=close-grad data-l10n=graduation/close></button></div></div><textarea class=error-log id=error-log required placeholder="Errors will be logged here."></textarea><noscript><textarea class=error-log id=error-log readonly required>
Please turn on JavaScript for the Unofficial Gunn Web App to work.</textarea></noscript><script>window.errorLogger=document.getElementById("error-log"),window.errorLogger.value=window.errors||""</script>