diff options
author | Thedro Neely <thedroneely@gmail.com> | 2018-11-18 19:42:55 -0500 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2018-11-18 19:42:55 -0500 |
commit | 40ab84f38f21258c47f013eb025207a0ad254a1b (patch) | |
tree | 1fd79bec6720d5b4796a0d255663207228ab37a1 /assets | |
parent | 93b3e47601b957806a210d4cd2a65e1a79c93fd1 (diff) | |
download | edwinmattiacci.com-40ab84f38f21258c47f013eb025207a0ad254a1b.tar.gz edwinmattiacci.com-40ab84f38f21258c47f013eb025207a0ad254a1b.tar.bz2 edwinmattiacci.com-40ab84f38f21258c47f013eb025207a0ad254a1b.zip |
assets: Add webpack assets and view snippets
Diffstat (limited to 'assets')
-rw-r--r-- | assets/app.js | 14 | ||||
-rw-r--r-- | assets/css/edwin.css | 713 | ||||
-rw-r--r-- | assets/css/font-awesome.css | 2337 | ||||
-rw-r--r-- | assets/css/ionicons.css | 3513 | ||||
-rw-r--r-- | assets/css/posts.css | 278 | ||||
-rw-r--r-- | assets/js/BackgroundFade.js | 5 | ||||
-rw-r--r-- | assets/js/InlinePlayer.js | 237 | ||||
-rw-r--r-- | assets/js/Navigator.js | 11 | ||||
-rw-r--r-- | assets/js/Popup.js | 19 | ||||
-rw-r--r-- | assets/js/SoundManager2.js | 6294 | ||||
-rw-r--r-- | assets/posts.js | 5 |
11 files changed, 13426 insertions, 0 deletions
diff --git a/assets/app.js b/assets/app.js new file mode 100644 index 0000000..5c559c9 --- /dev/null +++ b/assets/app.js @@ -0,0 +1,14 @@ + +// Javascript + +require('./js/SoundManager2'); +require('./js/InlinePlayer'); +require('./js/Navigator'); +require('./js/Popup'); +require('./js/BackgroundFade'); + +// CSS + +require('./css/edwin.css'); +require('./css/ionicons.css'); +require('./css/font-awesome.css'); diff --git a/assets/css/edwin.css b/assets/css/edwin.css new file mode 100644 index 0000000..23cd8f9 --- /dev/null +++ b/assets/css/edwin.css @@ -0,0 +1,713 @@ +html, body { + font-family: system-ui, sans-serif; +} + +html { + height: 100%; + margin: 0; + width: 100%; + overflow-y: scroll; + background-color: #2C2C2C; +} + +body { + color: #fff; + margin: 0; + min-height: 100%; + text-align: center; + width: 100%; +} + +main { + -webkit-align-items: center; + align-items: center; + display: flex; + display: -ms-flexbox; + display: -webkit-flex; + -webkit-justify-content: center; + justify-content: center; + margin: 0 auto; + min-height: 100vh; + min-height: calc(100vh - 166px); + height: 360px; +} + +#bg { + left: 0; + position: fixed; + top: 0; + min-width: 100%; + min-height: 100%; + opacity: 0; + transition: opacity .5s ease-in-out; + -moz-transition: opacity .5s ease-in-out; + -webkit-transition: opacity .5s ease-in-out; + -o-transition: opacity .5s ease-in-out; + z-index: -1; +} + +@media screen and (max-width: 960px) { + #bg { min-width: 1080px; } +} + +.body-opaque { + background-image: url("/images/overlay.png"), linear-gradient(0deg, rgb(44, 44, 44), rgb(44, 44, 44)); +} + +/* footer */ + +.footer { + background-color: #222; + background-color: rgba(34, 34, 34, 0.85); + font-size: 12px; + line-height: 1.5; + text-align: left; +} + +.footer-container { + color: #aaa; + margin: 0 auto; + max-width: 1344px; + padding: 2em 2em; +} + +.footer-transparent { + background-color: #222; + background-color: rgba(0, 0, 0, 0); +} + +.footer a { + color: #aaa; +} + +.footer a:hover { + color: #f00; +} + +/*home page*/ + +.intro { + width: 100%; +} + +.ion { + font-size: 3.5em; +} + +.intro > h1 { + color: #fff; + font-size: 50px; + font-size: calc(35px + (50 - 38) * ((100vw - 300px) / (1200 - 300))); + font-weight: 300; + margin: 0; +} + +.intro > h2 { + color: #fff; + font-size: 16px; + font-size: calc(14px + (18 - 14) * ((100vw - 300px) / (1200 - 300))); + font-weight: 300; +} + +@media screen and (max-width:350px) { + .intro > h2 { font-size: 12px; } +} + +@media screen and (max-width:420px) { + .icon-container { font-size: 14px } +} + +.intro > .profile { + border-radius: 50%; + height: 10vh; + width: 10vh; +} + +/*link colors*/ + +a { + color: #fff; + text-decoration: none; +} + +a.active { + color: #f00 !important; +} + +a.icon:hover { + text-decoration: none; +} + +a:hover { + color: red !important; +} + +a.posts { + color: #ff0000 !important; +} + +/* hashover comment section */ + +#hashover .hashover-comment { + background-color: #333; + border-radius: 3px; + height: auto; + margin: 0.75em 0 0 0; + overflow: hidden; + padding: 0.75em; + text-align: left; + width: auto; +} + +#hashover .hashover-more-link { + display: inline-block; + margin-top: 1em; + padding: 0.5em; +} + +#hashover .hashover-comment-name { + font-weight: bold; +} + +#hashover .hashover-textarea { + margin-bottom: 1.5em; +} + +#hashover .hashover-comment.hashover-reply.odd { + background-color: #3f3f3f; +} + +#hashover .hashover-submit.hashover-post-button { + margin-bottom: 1.5em; +} + +#hashover .hashover-submit.hashover-reply-post { + margin: 0; +} + +#hashover .hashover-select-wrapper { + margin-bottom: 1em; + display: inline-block; +} + +#hashover-sort-select { + margin: 0; +} + +#hashover .hashover-header { + margin-bottom: 0.5em; +} + +#hashover .hashover-footer { + margin-bottom: 0.75em; +} + +#hashover .hashover-input-cell { + display: table-cell; + width: 640px; +} + +#hashover .hashover-name-input { + padding-right: 1em; +} + +#hashover .hashover-email-input { + padding-left: 1em; +} + +#hashover .hashover-balloon { + width: 95%; +} + +#hashover .hashover-buttons { + float: right; +} + +#hashover-count-wrapper { + text-align: right; + margin-top: 1.1em; +} + +#hashover-count { + font-weight: bold; +} + +.hashover-content > p { + font-size: 0.9em; +} + +#hashover-name-c3r1 { + color: #cc4949; +} + +/* contact form */ + +.contact { + height: 400px; + max-width: 540px; + min-height: 100vh; + min-height: calc(100vh - 166px); + padding-bottom: 0; + padding-right: 16px; + padding-top: 0; + text-align: justify; + width: 100%; +} + +.contact-buttonPadding { padding-left: 0; } + +.contact-maxWidth { width: 100% } + +.contact-name { padding-right: 1em; } + +.contact-email { padding-left: 1em; } + +.form-alert { color: #f00; } + +.form { display: none; } + +/* feedback form */ + +.feedback { + height: auto; + max-width: 540px; + min-height: 100vh; + min-height: calc(100vh - 206px); + padding-bottom: 40px; + padding-top: 0; + text-align: justify; + width: 100%; +} + +@media screen and (max-width: 640px) { +.feedback { max-width: calc(100vw - 12vw); } +.contact { max-width: calc(100vw - 12vw); } +} + +.feedback-holder { min-height: 864px; } + +ul.actions li { + display: inline-block; + padding: 0 1rem 0 0; + vertical-align: middle; +} + +label { + color: #fff; + display: block; + font-size: 0.8rem; + font-weight: 300; + letter-spacing: 0.2rem; + line-height: 1.5; + margin: 0 0 1rem 0; + text-transform: uppercase; +} + +input, textarea, select, button { + font-family: system-ui, sans-serif; +} + +textarea { + font-size: 14px; + height: 10rem; + resize: none; +} + +select[multiple], select[size] { + height: 2.75em; +} + +input[type="text"], input[type="password"], input[type="email"], select { + height: 1.5rem; + margin-bottom: 1.3em; +} + +input[type="submit"]:hover, input[type="reset"]:hover, input[type="button"]:hover, button:hover, .button:hover { + background-color: rgba(25, 25, 25, 0.35); + +} + +input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, input[type="tel"]:focus, select:focus, textarea:focus { + background: rgba(25, 25, 25, 0.35) none repeat scroll 0 0; + border-color: #fff; + box-shadow: 0 0 0 1px #fff; +} + +input[type="text"], input[type="password"], input[type="email"], input[type="tel"], select, textarea { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + background: rgb(25, 25, 25) none repeat scroll 0 0; + background: rgba(25, 25, 25, 0.7) none repeat scroll 0 0; + border-radius: 4px; + border: 1px solid #fff; + color: #fff; + display: block; + outline: 0 none; + padding: 0.5em; + text-decoration: none; + width: 100%; + font-size: 14px; + font-weight: 400; +} + +input[type="submit"], input[type="reset"], input[type="button"] { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + background: rgb(25, 25, 25) none repeat scroll 0 0; + background: rgba(25, 25, 25, 0.7) none repeat scroll 0 0; + border-radius: 4px; + border: 0 none; + box-shadow: 0 0 0 1px #fff inset; + color: #fff !important; + display: inline-block; + font-size: 14px; + font-weight: 300; + height: 2.5rem; + letter-spacing: 0.05rem; + outline: 0 none; + padding: 0 1.25rem 0 1.35rem; + text-align: center; + text-decoration: none; + text-transform: uppercase; + white-space: nowrap; +} + +/* inlineplayer.css */ + +ul.graphic p { + display: inline; +} + +ul.graphic { + list-style-type: none; + margin: 0; + padding: 0; +} + +ul.graphic li { + margin-bottom: 2px; +} + +ul.graphic li a, ul.graphic li a.sm2_link { + background-color: rgb(255, 50, 50); + background-color: rgba(255, 50, 50, 0.65); + border: 1px solid transparent; + border-radius: 6px; + color: #fff; + display: inline-block; + font-size: 14px; + font-weight: normal; + letter-spacing: 0.05rem; + margin: 0.5rem; + min-width: 6.6em; + min-height: 16px; + padding: 15px 0 15px 30px; + text-align: left; + text-decoration: none; + vertical-align: middle; +} + +@media screen and (min-width:496px) { + ul.graphic li a.sm2_link { font-size: 16.5px; } +} + +ul.graphic li a.sm2_link { + -webkit-transition-property: hover; + -webkit-transition: background-color 0.15s linear; + -moz-transition: background-color 0.15s linear 0s; + -o-transition-property: background-color; + -o-transition-duration: 0.15s; +} + +ul.graphic li a, ul.graphic li a.sm2_paused:hover, ul.graphic li a.sm2_link:hover { + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04OTYgMTI4cTIwOSAwIDM4NS41IDEwM3QyNzkuNSAyNzkuNSAxMDMgMzg1LjUtMTAzIDM4NS41LTI3OS41IDI3OS41LTM4NS41IDEwMy0zODUuNS0xMDMtMjc5LjUtMjc5LjUtMTAzLTM4NS41IDEwMy0zODUuNSAyNzkuNS0yNzkuNSAzODUuNS0xMDN6bTM4NCA4MjNxMzItMTggMzItNTV0LTMyLTU1bC01NDQtMzIwcS0zMS0xOS02NC0xLTMyIDE5LTMyIDU2djY0MHEwIDM3IDMyIDU2IDE2IDggMzIgOCAxNyAwIDMyLTl6IiBmaWxsPSIjZmZmIi8+PC9zdmc+); + background-position: 8px 50%; + background-size: 18px 18px; + background-repeat: no-repeat; + _background-image: url(/images/icon_play.gif); +} + +ul.graphic li a.sm2_link:hover { + background-color: rgba(40, 40, 40, 0.65); + color: #fff; +} + +ul.graphic li a.sm2_paused { + background-color: #202020; + border: 1px solid #f00; + color: #f00 !important; +} + +ul.graphic li a.sm2_paused:hover { + background: #202020 url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04OTYgMTI4cTIwOSAwIDM4NS41IDEwM3QyNzkuNSAyNzkuNSAxMDMgMzg1LjUtMTAzIDM4NS41LTI3OS41IDI3OS41LTM4NS41IDEwMy0zODUuNS0xMDMtMjc5LjUtMjc5LjUtMTAzLTM4NS41IDEwMy0zODUuNSAyNzkuNS0yNzkuNSAzODUuNS0xMDN6bTM4NCA4MjNxMzItMTggMzItNTV0LTMyLTU1bC01NDQtMzIwcS0zMS0xOS02NC0xLTMyIDE5LTMyIDU2djY0MHEwIDM3IDMyIDU2IDE2IDggMzIgOCAxNyAwIDMyLTl6IiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat 3px 50%; + background-size: 18px 18px; + background-position: 8px 50%; + _background-image: url(/images/icon_play.gif); +} + +ul.graphic li a.sm2_playing, ul.graphic li a.sm2_playing:hover { + background: #222 url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04MzIgMTE4NHYtNTc2cTAtMTQtOS0yM3QtMjMtOWgtMjU2cS0xNCAwLTIzIDl0LTkgMjN2NTc2cTAgMTQgOSAyM3QyMyA5aDI1NnExNCAwIDIzLTl0OS0yM3ptNDQ4IDB2LTU3NnEwLTE0LTktMjN0LTIzLTloLTI1NnEtMTQgMC0yMyA5dC05IDIzdjU3NnEwIDE0IDkgMjN0MjMgOWgyNTZxMTQgMCAyMy05dDktMjN6bTM4NC0yODhxMCAyMDktMTAzIDM4NS41dC0yNzkuNSAyNzkuNS0zODUuNSAxMDMtMzg1LjUtMTAzLTI3OS41LTI3OS41LTEwMy0zODUuNSAxMDMtMzg1LjUgMjc5LjUtMjc5LjUgMzg1LjUtMTAzIDM4NS41IDEwMyAyNzkuNSAyNzkuNSAxMDMgMzg1LjV6IiBmaWxsPSIjZmZmIi8+PC9zdmc+) no-repeat 3px 50%; + background-size: 18px 18px; + background-position: 8px 50%; + border: 1px solid #f00; + color: #f00 !important; + text-decoration: none; + _background-image: url(/images/icon_pause.gif); +} + +div.playerbox { + width: auto; + display: inline-block; +} + +div.left { + width: 50%; + float: left; +} + +div.right { + width: 50%; + float: right; +} + +body #sm2-container object, body #sm2-container embed { + left: -9999em; + top: -9999em; +} + +/* overlay windows */ + +.frame { + display: inline-block; + font-weight: 300; + margin: 1em 0.5em 0 0.5em; + padding: 1em 1em 0 1em; + min-width: 3em; +} + +.frame-info { + color: #fff; +} + +#overlay-faq, #overlay-demo, #overlay-projects { + position: fixed; + text-align: center; + margin: auto; + display: none; + width: 100%; + height: 100%; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgb(40, 40, 40); + background-color: rgba(40, 40, 40, 0.98); +} + +.closeButton { + position: absolute; + right: 0.4em; + font-size: 60px; + cursor: pointer; +} + +.overlay-container { + position: relative; + padding: 0 3em 0 3em; + top: 40%; + left: 10%; + font-size: 12px; + color: white; + -ms-transform: translate(-10%, -10%); + -webkit-transform: translate(-10%, -10%); + transform: translate(-10%, -10%); +} + +.overlay-container > ul { + list-style-type: none; + padding: 0 3em 0 3em; + text-align: center; +} + +.overlay-container > p { + font-size: 1.2em; +} + +/* sidebar navigation */ + +#main { + transition: margin-left .25s; +} + +.sidenav { + height: 100%; + width: 0; + position: fixed; + z-index: 1; + top: 0; + right: 0; + background-color: #222; + overflow-x: hidden; + transition: 0.25s; +} + +.sidenav a { + padding: 12px 8px 12px 32px; + text-decoration: none; + text-align: left; + font-size: 16px; + font-weight: 400; + line-height: 1; + display: block; + color: #fff; +} + +.sidenav__container { margin-top: 4.2em; } + +.sidenav a.active { background-color: #333; } + +@media screen and (max-height: 450px) { + .sidenav {padding-top: 15px;} + .sidenav a {font-size: 18px;} +} + +/* navigation bar */ + +nav { + background-color: #232323; + margin-bottom: 2em; +} + +.nav-transparent { + background-color: #232323; + background-color: rgba(0, 0, 0, 0); +} + +.navicon { + border-radius: 0; + border: none; + background-color: transparent; + position: absolute; + cursor: pointer; + top: 10px; + right: 10px; + font-size: 19px !important; + padding: 14px 20px !important; + line-height: 1; + -webkit-backface-visibility: hidden; + -moz-transform: translateZ(0) scale(1.0, 1.0); + -ms-transform: translateZ(0) scale(1.0, 1.0); + -webkit-transform: translateZ(0) scale(1.0, 1.0); + transform: translateZ(0) scale(1.0, 1.0); +} + +.topnav { + margin: 0 auto; + max-width: 1344px; + overflow: hidden; +} + +.topnav-left a { + color: #ffffff; + display: block; + float: left; + font-size: 18px; + font-weight: 400; + line-height: 1.4; + padding: 22px 16px; + text-align: center; + text-decoration: none; +} + +.topnav-left a:nth-child(1) { + display: none; +} + +.topnav-right a { + float: right; +} + +@media screen and (max-width: 768px) { + .fa { font-size: 1em; padding: 0.6em 0 0.6em 1em; background-color: #333; border-radius: 3px; width: 2em; height: 1em; } + .topnav a.active { background-color: transparent; color: #fff !important; } + .topnav a { font-size: 20px; padding: 24px 16px; } + .topnav a:not(:first-child) { display: none; } + .topnav-left a:nth-child(1) { display: block; line-height: 1; } + .topnav-right a { display: none; } + .topnav .navicon { display: block; } +} + +@media screen and (max-width:768px) { + .footer { background-color: #222; background-color: rgba(0, 0, 0, 0); padding-left: unset; text-align: center; } + nav { background-color: rgba(0, 0, 0, 0); } +} + +/* error page */ + +.error__header { + font-size: 8rem !important; +} + +.error__lineHeight { + line-height: 0; +} + +/* system-font.css v2.0.2 | CC0-1.0 License | github.com/jonathantneal/system-font-css */ + +@font-face { + font-family: system-ui; + font-style: normal; + font-weight: 300; + src: local(".SFNSText-Light"), local(".HelveticaNeueDeskInterface-Light"), local(".LucidaGrandeUI"), local("Segoe UI Light"), local("Ubuntu Light"), local("Roboto-Light"), local("DroidSans"), local("Tahoma"); +} + +@font-face { + font-family: system-ui; + font-style: italic; + font-weight: 300; + src: local(".SFNSText-LightItalic"), local(".HelveticaNeueDeskInterface-Italic"), local(".LucidaGrandeUI"), local("Segoe UI Light Italic"), local("Ubuntu Light Italic"), local("Roboto-LightItalic"), local("DroidSans"), local("Tahoma"); +} + +@font-face { + font-family: system-ui; + font-style: normal; + font-weight: 400; + src: local(".SFNSText-Regular"), local(".HelveticaNeueDeskInterface-Regular"), local(".LucidaGrandeUI"), local("Segoe UI"), local("Ubuntu"), local("Roboto-Regular"), local("DroidSans"), local("Tahoma"); +} + +@font-face { + font-family: system-ui; + font-style: italic; + font-weight: 400; + src: local(".SFNSText-Italic"), local(".HelveticaNeueDeskInterface-Italic"), local(".LucidaGrandeUI"), local("Segoe UI Italic"), local("Ubuntu Italic"), local("Roboto-Italic"), local("DroidSans"), local("Tahoma"); +} + +@font-face { + font-family: system-ui; + font-style: normal; + font-weight: 500; + src: local(".SFNSText-Medium"), local(".HelveticaNeueDeskInterface-MediumP4"), local(".LucidaGrandeUI"), local("Segoe UI Semibold"), local("Ubuntu Medium"), local("Roboto-Medium"), local("DroidSans-Bold"), local("Tahoma Bold"); +} + +@font-face { + font-family: system-ui; + font-style: italic; + font-weight: 500; + src: local(".SFNSText-MediumItalic"), local(".HelveticaNeueDeskInterface-MediumItalicP4"), local(".LucidaGrandeUI"), local("Segoe UI Semibold Italic"), local("Ubuntu Medium Italic"), local("Roboto-MediumItalic"), local("DroidSans-Bold"), local("Tahoma Bold"); +} + +@font-face { + font-family: system-ui; + font-style: normal; + font-weight: 700; + src: local(".SFNSText-Bold"), local(".HelveticaNeueDeskInterface-Bold"), local(".LucidaGrandeUI"), local("Segoe UI Bold"), local("Ubuntu Bold"), local("Roboto-Bold"), local("DroidSans-Bold"), local("Tahoma Bold"); +} + +@font-face { + font-family: system-ui; + font-style: italic; + font-weight: 700; + src: local(".SFNSText-BoldItalic"), local(".HelveticaNeueDeskInterface-BoldItalic"), local(".LucidaGrandeUI"), local("Segoe UI Bold Italic"), local("Ubuntu Bold Italic"), local("Roboto-BoldItalic"), local("DroidSans-Bold"), local("Tahoma Bold"); +} diff --git a/assets/css/font-awesome.css b/assets/css/font-awesome.css new file mode 100644 index 0000000..b2e84e7 --- /dev/null +++ b/assets/css/font-awesome.css @@ -0,0 +1,2337 @@ +/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */ +/* FONT PATH + * -------------------------- */ +@font-face { + font-family: 'FontAwesome'; + src: url('/fonts/font-awesome-4.7.0/fontawesome-webfont.eot'); + src: url('/fonts/font-awesome-4.7.0/fontawesome-webfont.eot?#iefix') format('embedded-opentype'), url('/fonts/font-awesome-4.7.0/fontawesome-webfont.woff2') format('woff2'), url('/fonts/font-awesome-4.7.0/fontawesome-webfont.woff') format('woff'), url('/fonts/font-awesome-4.7.0/fontawesome-webfont.ttf') format('truetype'), url('/fonts/font-awesome-4.7.0/fontawesome-webfont.svg#fontawesomeregular') format('svg'); + font-weight: normal; + font-style: normal; +} +.fa { + display: inline-block; + font: normal normal normal 14px/1 FontAwesome; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +/* makes the font 33% larger relative to the icon container */ +.fa-lg { + font-size: 1.33333333em; + line-height: 0.75em; + vertical-align: -15%; +} +.fa-2x { + font-size: 2em; +} +.fa-3x { + font-size: 3em; +} +.fa-4x { + font-size: 4em; +} +.fa-5x { + font-size: 5em; +} +.fa-fw { + width: 1.28571429em; + text-align: center; +} +.fa-ul { + padding-left: 0; + margin-left: 2.14285714em; + list-style-type: none; +} +.fa-ul > li { + position: relative; +} +.fa-li { + position: absolute; + left: -2.14285714em; + width: 2.14285714em; + top: 0.14285714em; + text-align: center; +} +.fa-li.fa-lg { + left: -1.85714286em; +} +.fa-border { + padding: .2em .25em .15em; + border: solid 0.08em #eeeeee; + border-radius: .1em; +} +.fa-pull-left { + float: left; +} +.fa-pull-right { + float: right; +} +.fa.fa-pull-left { + margin-right: .3em; +} +.fa.fa-pull-right { + margin-left: .3em; +} +/* Deprecated as of 4.4.0 */ +.pull-right { + float: right; +} +.pull-left { + float: left; +} +.fa.pull-left { + margin-right: .3em; +} +.fa.pull-right { + margin-left: .3em; +} +.fa-spin { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; +} +.fa-pulse { + -webkit-animation: fa-spin 1s infinite steps(8); + animation: fa-spin 1s infinite steps(8); +} +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +.fa-rotate-90 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); +} +.fa-rotate-180 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} +.fa-rotate-270 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; + -webkit-transform: rotate(270deg); + -ms-transform: rotate(270deg); + transform: rotate(270deg); +} +.fa-flip-horizontal { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; + -webkit-transform: scale(-1, 1); + -ms-transform: scale(-1, 1); + transform: scale(-1, 1); +} +.fa-flip-vertical { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; + -webkit-transform: scale(1, -1); + -ms-transform: scale(1, -1); + transform: scale(1, -1); +} +:root .fa-rotate-90, +:root .fa-rotate-180, +:root .fa-rotate-270, +:root .fa-flip-horizontal, +:root .fa-flip-vertical { + filter: none; +} +.fa-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; +} +.fa-stack-1x, +.fa-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} +.fa-stack-1x { + line-height: inherit; +} +.fa-stack-2x { + font-size: 2em; +} +.fa-inverse { + color: #ffffff; +} +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.fa-glass:before { + content: "\f000"; +} +.fa-music:before { + content: "\f001"; +} +.fa-search:before { + content: "\f002"; +} +.fa-envelope-o:before { + content: "\f003"; +} +.fa-heart:before { + content: "\f004"; +} +.fa-star:before { + content: "\f005"; +} +.fa-star-o:before { + content: "\f006"; +} +.fa-user:before { + content: "\f007"; +} +.fa-film:before { + content: "\f008"; +} +.fa-th-large:before { + content: "\f009"; +} +.fa-th:before { + content: "\f00a"; +} +.fa-th-list:before { + content: "\f00b"; +} +.fa-check:before { + content: "\f00c"; +} +.fa-remove:before, +.fa-close:before, +.fa-times:before { + content: "\f00d"; +} +.fa-search-plus:before { + content: "\f00e"; +} +.fa-search-minus:before { + content: "\f010"; +} +.fa-power-off:before { + content: "\f011"; +} +.fa-signal:before { + content: "\f012"; +} +.fa-gear:before, +.fa-cog:before { + content: "\f013"; +} +.fa-trash-o:before { + content: "\f014"; +} +.fa-home:before { + content: "\f015"; +} +.fa-file-o:before { + content: "\f016"; +} +.fa-clock-o:before { + content: "\f017"; +} +.fa-road:before { + content: "\f018"; +} +.fa-download:before { + content: "\f019"; +} +.fa-arrow-circle-o-down:before { + content: "\f01a"; +} +.fa-arrow-circle-o-up:before { + content: "\f01b"; +} +.fa-inbox:before { + content: "\f01c"; +} +.fa-play-circle-o:before { + content: "\f01d"; +} +.fa-rotate-right:before, +.fa-repeat:before { + content: "\f01e"; +} +.fa-refresh:before { + content: "\f021"; +} +.fa-list-alt:before { + content: "\f022"; +} +.fa-lock:before { + content: "\f023"; +} +.fa-flag:before { + content: "\f024"; +} +.fa-headphones:before { + content: "\f025"; +} +.fa-volume-off:before { + content: "\f026"; +} +.fa-volume-down:before { + content: "\f027"; +} +.fa-volume-up:before { + content: "\f028"; +} +.fa-qrcode:before { + content: "\f029"; +} +.fa-barcode:before { + content: "\f02a"; +} +.fa-tag:before { + content: "\f02b"; +} +.fa-tags:before { + content: "\f02c"; +} +.fa-book:before { + content: "\f02d"; +} +.fa-bookmark:before { + content: "\f02e"; +} +.fa-print:before { + content: "\f02f"; +} +.fa-camera:before { + content: "\f030"; +} +.fa-font:before { + content: "\f031"; +} +.fa-bold:before { + content: "\f032"; +} +.fa-italic:before { + content: "\f033"; +} +.fa-text-height:before { + content: "\f034"; +} +.fa-text-width:before { + content: "\f035"; +} +.fa-align-left:before { + content: "\f036"; +} +.fa-align-center:before { + content: "\f037"; +} +.fa-align-right:before { + content: "\f038"; +} +.fa-align-justify:before { + content: "\f039"; +} +.fa-list:before { + content: "\f03a"; +} +.fa-dedent:before, +.fa-outdent:before { + content: "\f03b"; +} +.fa-indent:before { + content: "\f03c"; +} +.fa-video-camera:before { + content: "\f03d"; +} +.fa-photo:before, +.fa-image:before, +.fa-picture-o:before { + content: "\f03e"; +} +.fa-pencil:before { + content: "\f040"; +} +.fa-map-marker:before { + content: "\f041"; +} +.fa-adjust:before { + content: "\f042"; +} +.fa-tint:before { + content: "\f043"; +} +.fa-edit:before, +.fa-pencil-square-o:before { + content: "\f044"; +} +.fa-share-square-o:before { + content: "\f045"; +} +.fa-check-square-o:before { + content: "\f046"; +} +.fa-arrows:before { + content: "\f047"; +} +.fa-step-backward:before { + content: "\f048"; +} +.fa-fast-backward:before { + content: "\f049"; +} +.fa-backward:before { + content: "\f04a"; +} +.fa-play:before { + content: "\f04b"; +} +.fa-pause:before { + content: "\f04c"; +} +.fa-stop:before { + content: "\f04d"; +} +.fa-forward:before { + content: "\f04e"; +} +.fa-fast-forward:before { + content: "\f050"; +} +.fa-step-forward:before { + content: "\f051"; +} +.fa-eject:before { + content: "\f052"; +} +.fa-chevron-left:before { + content: "\f053"; +} +.fa-chevron-right:before { + content: "\f054"; +} +.fa-plus-circle:before { + content: "\f055"; +} +.fa-minus-circle:before { + content: "\f056"; +} +.fa-times-circle:before { + content: "\f057"; +} +.fa-check-circle:before { + content: "\f058"; +} +.fa-question-circle:before { + content: "\f059"; +} +.fa-info-circle:before { + content: "\f05a"; +} +.fa-crosshairs:before { + content: "\f05b"; +} +.fa-times-circle-o:before { + content: "\f05c"; +} +.fa-check-circle-o:before { + content: "\f05d"; +} +.fa-ban:before { + content: "\f05e"; +} +.fa-arrow-left:before { + content: "\f060"; +} +.fa-arrow-right:before { + content: "\f061"; +} +.fa-arrow-up:before { + content: "\f062"; +} +.fa-arrow-down:before { + content: "\f063"; +} +.fa-mail-forward:before, +.fa-share:before { + content: "\f064"; +} +.fa-expand:before { + content: "\f065"; +} +.fa-compress:before { + content: "\f066"; +} +.fa-plus:before { + content: "\f067"; +} +.fa-minus:before { + content: "\f068"; +} +.fa-asterisk:before { + content: "\f069"; +} +.fa-exclamation-circle:before { + content: "\f06a"; +} +.fa-gift:before { + content: "\f06b"; +} +.fa-leaf:before { + content: "\f06c"; +} +.fa-fire:before { + content: "\f06d"; +} +.fa-eye:before { + content: "\f06e"; +} +.fa-eye-slash:before { + content: "\f070"; +} +.fa-warning:before, +.fa-exclamation-triangle:before { + content: "\f071"; +} +.fa-plane:before { + content: "\f072"; +} +.fa-calendar:before { + content: "\f073"; +} +.fa-random:before { + content: "\f074"; +} +.fa-comment:before { + content: "\f075"; +} +.fa-magnet:before { + content: "\f076"; +} +.fa-chevron-up:before { + content: "\f077"; +} +.fa-chevron-down:before { + content: "\f078"; +} +.fa-retweet:before { + content: "\f079"; +} +.fa-shopping-cart:before { + content: "\f07a"; +} +.fa-folder:before { + content: "\f07b"; +} +.fa-folder-open:before { + content: "\f07c"; +} +.fa-arrows-v:before { + content: "\f07d"; +} +.fa-arrows-h:before { + content: "\f07e"; +} +.fa-bar-chart-o:before, +.fa-bar-chart:before { + content: "\f080"; +} +.fa-twitter-square:before { + content: "\f081"; +} +.fa-facebook-square:before { + content: "\f082"; +} +.fa-camera-retro:before { + content: "\f083"; +} +.fa-key:before { + content: "\f084"; +} +.fa-gears:before, +.fa-cogs:before { + content: "\f085"; +} +.fa-comments:before { + content: "\f086"; +} +.fa-thumbs-o-up:before { + content: "\f087"; +} +.fa-thumbs-o-down:before { + content: "\f088"; +} +.fa-star-half:before { + content: "\f089"; +} +.fa-heart-o:before { + content: "\f08a"; +} +.fa-sign-out:before { + content: "\f08b"; +} +.fa-linkedin-square:before { + content: "\f08c"; +} +.fa-thumb-tack:before { + content: "\f08d"; +} +.fa-external-link:before { + content: "\f08e"; +} +.fa-sign-in:before { + content: "\f090"; +} +.fa-trophy:before { + content: "\f091"; +} +.fa-github-square:before { + content: "\f092"; +} +.fa-upload:before { + content: "\f093"; +} +.fa-lemon-o:before { + content: "\f094"; +} +.fa-phone:before { + content: "\f095"; +} +.fa-square-o:before { + content: "\f096"; +} +.fa-bookmark-o:before { + content: "\f097"; +} +.fa-phone-square:before { + content: "\f098"; +} +.fa-twitter:before { + content: "\f099"; +} +.fa-facebook-f:before, +.fa-facebook:before { + content: "\f09a"; +} +.fa-github:before { + content: "\f09b"; +} +.fa-unlock:before { + content: "\f09c"; +} +.fa-credit-card:before { + content: "\f09d"; +} +.fa-feed:before, +.fa-rss:before { + content: "\f09e"; +} +.fa-hdd-o:before { + content: "\f0a0"; +} +.fa-bullhorn:before { + content: "\f0a1"; +} +.fa-bell:before { + content: "\f0f3"; +} +.fa-certificate:before { + content: "\f0a3"; +} +.fa-hand-o-right:before { + content: "\f0a4"; +} +.fa-hand-o-left:before { + content: "\f0a5"; +} +.fa-hand-o-up:before { + content: "\f0a6"; +} +.fa-hand-o-down:before { + content: "\f0a7"; +} +.fa-arrow-circle-left:before { + content: "\f0a8"; +} +.fa-arrow-circle-right:before { + content: "\f0a9"; +} +.fa-arrow-circle-up:before { + content: "\f0aa"; +} +.fa-arrow-circle-down:before { + content: "\f0ab"; +} +.fa-globe:before { + content: "\f0ac"; +} +.fa-wrench:before { + content: "\f0ad"; +} +.fa-tasks:before { + content: "\f0ae"; +} +.fa-filter:before { + content: "\f0b0"; +} +.fa-briefcase:before { + content: "\f0b1"; +} +.fa-arrows-alt:before { + content: "\f0b2"; +} +.fa-group:before, +.fa-users:before { + content: "\f0c0"; +} +.fa-chain:before, +.fa-link:before { + content: "\f0c1"; +} +.fa-cloud:before { + content: "\f0c2"; +} +.fa-flask:before { + content: "\f0c3"; +} +.fa-cut:before, +.fa-scissors:before { + content: "\f0c4"; +} +.fa-copy:before, +.fa-files-o:before { + content: "\f0c5"; +} +.fa-paperclip:before { + content: "\f0c6"; +} +.fa-save:before, +.fa-floppy-o:before { + content: "\f0c7"; +} +.fa-square:before { + content: "\f0c8"; +} +.fa-navicon:before, +.fa-reorder:before, +.fa-bars:before { + content: "\f0c9"; +} +.fa-list-ul:before { + content: "\f0ca"; +} +.fa-list-ol:before { + content: "\f0cb"; +} +.fa-strikethrough:before { + content: "\f0cc"; +} +.fa-underline:before { + content: "\f0cd"; +} +.fa-table:before { + content: "\f0ce"; +} +.fa-magic:before { + content: "\f0d0"; +} +.fa-truck:before { + content: "\f0d1"; +} +.fa-pinterest:before { + content: "\f0d2"; +} +.fa-pinterest-square:before { + content: "\f0d3"; +} +.fa-google-plus-square:before { + content: "\f0d4"; +} +.fa-google-plus:before { + content: "\f0d5"; +} +.fa-money:before { + content: "\f0d6"; +} +.fa-caret-down:before { + content: "\f0d7"; +} +.fa-caret-up:before { + content: "\f0d8"; +} +.fa-caret-left:before { + content: "\f0d9"; +} +.fa-caret-right:before { + content: "\f0da"; +} +.fa-columns:before { + content: "\f0db"; +} +.fa-unsorted:before, +.fa-sort:before { + content: "\f0dc"; +} +.fa-sort-down:before, +.fa-sort-desc:before { + content: "\f0dd"; +} +.fa-sort-up:before, +.fa-sort-asc:before { + content: "\f0de"; +} +.fa-envelope:before { + content: "\f0e0"; +} +.fa-linkedin:before { + content: "\f0e1"; +} +.fa-rotate-left:before, +.fa-undo:before { + content: "\f0e2"; +} +.fa-legal:before, +.fa-gavel:before { + content: "\f0e3"; +} +.fa-dashboard:before, +.fa-tachometer:before { + content: "\f0e4"; +} +.fa-comment-o:before { + content: "\f0e5"; +} +.fa-comments-o:before { + content: "\f0e6"; +} +.fa-flash:before, +.fa-bolt:before { + content: "\f0e7"; +} +.fa-sitemap:before { + content: "\f0e8"; +} +.fa-umbrella:before { + content: "\f0e9"; +} +.fa-paste:before, +.fa-clipboard:before { + content: "\f0ea"; +} +.fa-lightbulb-o:before { + content: "\f0eb"; +} +.fa-exchange:before { + content: "\f0ec"; +} +.fa-cloud-download:before { + content: "\f0ed"; +} +.fa-cloud-upload:before { + content: "\f0ee"; +} +.fa-user-md:before { + content: "\f0f0"; +} +.fa-stethoscope:before { + content: "\f0f1"; +} +.fa-suitcase:before { + content: "\f0f2"; +} +.fa-bell-o:before { + content: "\f0a2"; +} +.fa-coffee:before { + content: "\f0f4"; +} +.fa-cutlery:before { + content: "\f0f5"; +} +.fa-file-text-o:before { + content: "\f0f6"; +} +.fa-building-o:before { + content: "\f0f7"; +} +.fa-hospital-o:before { + content: "\f0f8"; +} +.fa-ambulance:before { + content: "\f0f9"; +} +.fa-medkit:before { + content: "\f0fa"; +} +.fa-fighter-jet:before { + content: "\f0fb"; +} +.fa-beer:before { + content: "\f0fc"; +} +.fa-h-square:before { + content: "\f0fd"; +} +.fa-plus-square:before { + content: "\f0fe"; +} +.fa-angle-double-left:before { + content: "\f100"; +} +.fa-angle-double-right:before { + content: "\f101"; +} +.fa-angle-double-up:before { + content: "\f102"; +} +.fa-angle-double-down:before { + content: "\f103"; +} +.fa-angle-left:before { + content: "\f104"; +} +.fa-angle-right:before { + content: "\f105"; +} +.fa-angle-up:before { + content: "\f106"; +} +.fa-angle-down:before { + content: "\f107"; +} +.fa-desktop:before { + content: "\f108"; +} +.fa-laptop:before { + content: "\f109"; +} +.fa-tablet:before { + content: "\f10a"; +} +.fa-mobile-phone:before, +.fa-mobile:before { + content: "\f10b"; +} +.fa-circle-o:before { + content: "\f10c"; +} +.fa-quote-left:before { + content: "\f10d"; +} +.fa-quote-right:before { + content: "\f10e"; +} +.fa-spinner:before { + content: "\f110"; +} +.fa-circle:before { + content: "\f111"; +} +.fa-mail-reply:before, +.fa-reply:before { + content: "\f112"; +} +.fa-github-alt:before { + content: "\f113"; +} +.fa-folder-o:before { + content: "\f114"; +} +.fa-folder-open-o:before { + content: "\f115"; +} +.fa-smile-o:before { + content: "\f118"; +} +.fa-frown-o:before { + content: "\f119"; +} +.fa-meh-o:before { + content: "\f11a"; +} +.fa-gamepad:before { + content: "\f11b"; +} +.fa-keyboard-o:before { + content: "\f11c"; +} +.fa-flag-o:before { + content: "\f11d"; +} +.fa-flag-checkered:before { + content: "\f11e"; +} +.fa-terminal:before { + content: "\f120"; +} +.fa-code:before { + content: "\f121"; +} +.fa-mail-reply-all:before, +.fa-reply-all:before { + content: "\f122"; +} +.fa-star-half-empty:before, +.fa-star-half-full:before, +.fa-star-half-o:before { + content: "\f123"; +} +.fa-location-arrow:before { + content: "\f124"; +} +.fa-crop:before { + content: "\f125"; +} +.fa-code-fork:before { + content: "\f126"; +} +.fa-unlink:before, +.fa-chain-broken:before { + content: "\f127"; +} +.fa-question:before { + content: "\f128"; +} +.fa-info:before { + content: "\f129"; +} +.fa-exclamation:before { + content: "\f12a"; +} +.fa-superscript:before { + content: "\f12b"; +} +.fa-subscript:before { + content: "\f12c"; +} +.fa-eraser:before { + content: "\f12d"; +} +.fa-puzzle-piece:before { + content: "\f12e"; +} +.fa-microphone:before { + content: "\f130"; +} +.fa-microphone-slash:before { + content: "\f131"; +} +.fa-shield:before { + content: "\f132"; +} +.fa-calendar-o:before { + content: "\f133"; +} +.fa-fire-extinguisher:before { + content: "\f134"; +} +.fa-rocket:before { + content: "\f135"; +} +.fa-maxcdn:before { + content: "\f136"; +} +.fa-chevron-circle-left:before { + content: "\f137"; +} +.fa-chevron-circle-right:before { + content: "\f138"; +} +.fa-chevron-circle-up:before { + content: "\f139"; +} +.fa-chevron-circle-down:before { + content: "\f13a"; +} +.fa-html5:before { + content: "\f13b"; +} +.fa-css3:before { + content: "\f13c"; +} +.fa-anchor:before { + content: "\f13d"; +} +.fa-unlock-alt:before { + content: "\f13e"; +} +.fa-bullseye:before { + content: "\f140"; +} +.fa-ellipsis-h:before { + content: "\f141"; +} +.fa-ellipsis-v:before { + content: "\f142"; +} +.fa-rss-square:before { + content: "\f143"; +} +.fa-play-circle:before { + content: "\f144"; +} +.fa-ticket:before { + content: "\f145"; +} +.fa-minus-square:before { + content: "\f146"; +} +.fa-minus-square-o:before { + content: "\f147"; +} +.fa-level-up:before { + content: "\f148"; +} +.fa-level-down:before { + content: "\f149"; +} +.fa-check-square:before { + content: "\f14a"; +} +.fa-pencil-square:before { + content: "\f14b"; +} +.fa-external-link-square:before { + content: "\f14c"; +} +.fa-share-square:before { + content: "\f14d"; +} +.fa-compass:before { + content: "\f14e"; +} +.fa-toggle-down:before, +.fa-caret-square-o-down:before { + content: "\f150"; +} +.fa-toggle-up:before, +.fa-caret-square-o-up:before { + content: "\f151"; +} +.fa-toggle-right:before, +.fa-caret-square-o-right:before { + content: "\f152"; +} +.fa-euro:before, +.fa-eur:before { + content: "\f153"; +} +.fa-gbp:before { + content: "\f154"; +} +.fa-dollar:before, +.fa-usd:before { + content: "\f155"; +} +.fa-rupee:before, +.fa-inr:before { + content: "\f156"; +} +.fa-cny:before, +.fa-rmb:before, +.fa-yen:before, +.fa-jpy:before { + content: "\f157"; +} +.fa-ruble:before, +.fa-rouble:before, +.fa-rub:before { + content: "\f158"; +} +.fa-won:before, +.fa-krw:before { + content: "\f159"; +} +.fa-bitcoin:before, +.fa-btc:before { + content: "\f15a"; +} +.fa-file:before { + content: "\f15b"; +} +.fa-file-text:before { + content: "\f15c"; +} +.fa-sort-alpha-asc:before { + content: "\f15d"; +} +.fa-sort-alpha-desc:before { + content: "\f15e"; +} +.fa-sort-amount-asc:before { + content: "\f160"; +} +.fa-sort-amount-desc:before { + content: "\f161"; +} +.fa-sort-numeric-asc:before { + content: "\f162"; +} +.fa-sort-numeric-desc:before { + content: "\f163"; +} +.fa-thumbs-up:before { + content: "\f164"; +} +.fa-thumbs-down:before { + content: "\f165"; +} +.fa-youtube-square:before { + content: "\f166"; +} +.fa-youtube:before { + content: "\f167"; +} +.fa-xing:before { + content: "\f168"; +} +.fa-xing-square:before { + content: "\f169"; +} +.fa-youtube-play:before { + content: "\f16a"; +} +.fa-dropbox:before { + content: "\f16b"; +} +.fa-stack-overflow:before { + content: "\f16c"; +} +.fa-instagram:before { + content: "\f16d"; +} +.fa-flickr:before { + content: "\f16e"; +} +.fa-adn:before { + content: "\f170"; +} +.fa-bitbucket:before { + content: "\f171"; +} +.fa-bitbucket-square:before { + content: "\f172"; +} +.fa-tumblr:before { + content: "\f173"; +} +.fa-tumblr-square:before { + content: "\f174"; +} +.fa-long-arrow-down:before { + content: "\f175"; +} +.fa-long-arrow-up:before { + content: "\f176"; +} +.fa-long-arrow-left:before { + content: "\f177"; +} +.fa-long-arrow-right:before { + content: "\f178"; +} +.fa-apple:before { + content: "\f179"; +} +.fa-windows:before { + content: "\f17a"; +} +.fa-android:before { + content: "\f17b"; +} +.fa-linux:before { + content: "\f17c"; +} +.fa-dribbble:before { + content: "\f17d"; +} +.fa-skype:before { + content: "\f17e"; +} +.fa-foursquare:before { + content: "\f180"; +} +.fa-trello:before { + content: "\f181"; +} +.fa-female:before { + content: "\f182"; +} +.fa-male:before { + content: "\f183"; +} +.fa-gittip:before, +.fa-gratipay:before { + content: "\f184"; +} +.fa-sun-o:before { + content: "\f185"; +} +.fa-moon-o:before { + content: "\f186"; +} +.fa-archive:before { + content: "\f187"; +} +.fa-bug:before { + content: "\f188"; +} +.fa-vk:before { + content: "\f189"; +} +.fa-weibo:before { + content: "\f18a"; +} +.fa-renren:before { + content: "\f18b"; +} +.fa-pagelines:before { + content: "\f18c"; +} +.fa-stack-exchange:before { + content: "\f18d"; +} +.fa-arrow-circle-o-right:before { + content: "\f18e"; +} +.fa-arrow-circle-o-left:before { + content: "\f190"; +} +.fa-toggle-left:before, +.fa-caret-square-o-left:before { + content: "\f191"; +} +.fa-dot-circle-o:before { + content: "\f192"; +} +.fa-wheelchair:before { + content: "\f193"; +} +.fa-vimeo-square:before { + content: "\f194"; +} +.fa-turkish-lira:before, +.fa-try:before { + content: "\f195"; +} +.fa-plus-square-o:before { + content: "\f196"; +} +.fa-space-shuttle:before { + content: "\f197"; +} +.fa-slack:before { + content: "\f198"; +} +.fa-envelope-square:before { + content: "\f199"; +} +.fa-wordpress:before { + content: "\f19a"; +} +.fa-openid:before { + content: "\f19b"; +} +.fa-institution:before, +.fa-bank:before, +.fa-university:before { + content: "\f19c"; +} +.fa-mortar-board:before, +.fa-graduation-cap:before { + content: "\f19d"; +} +.fa-yahoo:before { + content: "\f19e"; +} +.fa-google:before { + content: "\f1a0"; +} +.fa-reddit:before { + content: "\f1a1"; +} +.fa-reddit-square:before { + content: "\f1a2"; +} +.fa-stumbleupon-circle:before { + content: "\f1a3"; +} +.fa-stumbleupon:before { + content: "\f1a4"; +} +.fa-delicious:before { + content: "\f1a5"; +} +.fa-digg:before { + content: "\f1a6"; +} +.fa-pied-piper-pp:before { + content: "\f1a7"; +} +.fa-pied-piper-alt:before { + content: "\f1a8"; +} +.fa-drupal:before { + content: "\f1a9"; +} +.fa-joomla:before { + content: "\f1aa"; +} +.fa-language:before { + content: "\f1ab"; +} +.fa-fax:before { + content: "\f1ac"; +} +.fa-building:before { + content: "\f1ad"; +} +.fa-child:before { + content: "\f1ae"; +} +.fa-paw:before { + content: "\f1b0"; +} +.fa-spoon:before { + content: "\f1b1"; +} +.fa-cube:before { + content: "\f1b2"; +} +.fa-cubes:before { + content: "\f1b3"; +} +.fa-behance:before { + content: "\f1b4"; +} +.fa-behance-square:before { + content: "\f1b5"; +} +.fa-steam:before { + content: "\f1b6"; +} +.fa-steam-square:before { + content: "\f1b7"; +} +.fa-recycle:before { + content: "\f1b8"; +} +.fa-automobile:before, +.fa-car:before { + content: "\f1b9"; +} +.fa-cab:before, +.fa-taxi:before { + content: "\f1ba"; +} +.fa-tree:before { + content: "\f1bb"; +} +.fa-spotify:before { + content: "\f1bc"; +} +.fa-deviantart:before { + content: "\f1bd"; +} +.fa-soundcloud:before { + content: "\f1be"; +} +.fa-database:before { + content: "\f1c0"; +} +.fa-file-pdf-o:before { + content: "\f1c1"; +} +.fa-file-word-o:before { + content: "\f1c2"; +} +.fa-file-excel-o:before { + content: "\f1c3"; +} +.fa-file-powerpoint-o:before { + content: "\f1c4"; +} +.fa-file-photo-o:before, +.fa-file-picture-o:before, +.fa-file-image-o:before { + content: "\f1c5"; +} +.fa-file-zip-o:before, +.fa-file-archive-o:before { + content: "\f1c6"; +} +.fa-file-sound-o:before, +.fa-file-audio-o:before { + content: "\f1c7"; +} +.fa-file-movie-o:before, +.fa-file-video-o:before { + content: "\f1c8"; +} +.fa-file-code-o:before { + content: "\f1c9"; +} +.fa-vine:before { + content: "\f1ca"; +} +.fa-codepen:before { + content: "\f1cb"; +} +.fa-jsfiddle:before { + content: "\f1cc"; +} +.fa-life-bouy:before, +.fa-life-buoy:before, +.fa-life-saver:before, +.fa-support:before, +.fa-life-ring:before { + content: "\f1cd"; +} +.fa-circle-o-notch:before { + content: "\f1ce"; +} +.fa-ra:before, +.fa-resistance:before, +.fa-rebel:before { + content: "\f1d0"; +} +.fa-ge:before, +.fa-empire:before { + content: "\f1d1"; +} +.fa-git-square:before { + content: "\f1d2"; +} +.fa-git:before { + content: "\f1d3"; +} +.fa-y-combinator-square:before, +.fa-yc-square:before, +.fa-hacker-news:before { + content: "\f1d4"; +} +.fa-tencent-weibo:before { + content: "\f1d5"; +} +.fa-qq:before { + content: "\f1d6"; +} +.fa-wechat:before, +.fa-weixin:before { + content: "\f1d7"; +} +.fa-send:before, +.fa-paper-plane:before { + content: "\f1d8"; +} +.fa-send-o:before, +.fa-paper-plane-o:before { + content: "\f1d9"; +} +.fa-history:before { + content: "\f1da"; +} +.fa-circle-thin:before { + content: "\f1db"; +} +.fa-header:before { + content: "\f1dc"; +} +.fa-paragraph:before { + content: "\f1dd"; +} +.fa-sliders:before { + content: "\f1de"; +} +.fa-share-alt:before { + content: "\f1e0"; +} +.fa-share-alt-square:before { + content: "\f1e1"; +} +.fa-bomb:before { + content: "\f1e2"; +} +.fa-soccer-ball-o:before, +.fa-futbol-o:before { + content: "\f1e3"; +} +.fa-tty:before { + content: "\f1e4"; +} +.fa-binoculars:before { + content: "\f1e5"; +} +.fa-plug:before { + content: "\f1e6"; +} +.fa-slideshare:before { + content: "\f1e7"; +} +.fa-twitch:before { + content: "\f1e8"; +} +.fa-yelp:before { + content: "\f1e9"; +} +.fa-newspaper-o:before { + content: "\f1ea"; +} +.fa-wifi:before { + content: "\f1eb"; +} +.fa-calculator:before { + content: "\f1ec"; +} +.fa-paypal:before { + content: "\f1ed"; +} +.fa-google-wallet:before { + content: "\f1ee"; +} +.fa-cc-visa:before { + content: "\f1f0"; +} +.fa-cc-mastercard:before { + content: "\f1f1"; +} +.fa-cc-discover:before { + content: "\f1f2"; +} +.fa-cc-amex:before { + content: "\f1f3"; +} +.fa-cc-paypal:before { + content: "\f1f4"; +} +.fa-cc-stripe:before { + content: "\f1f5"; +} +.fa-bell-slash:before { + content: "\f1f6"; +} +.fa-bell-slash-o:before { + content: "\f1f7"; +} +.fa-trash:before { + content: "\f1f8"; +} +.fa-copyright:before { + content: "\f1f9"; +} +.fa-at:before { + content: "\f1fa"; +} +.fa-eyedropper:before { + content: "\f1fb"; +} +.fa-paint-brush:before { + content: "\f1fc"; +} +.fa-birthday-cake:before { + content: "\f1fd"; +} +.fa-area-chart:before { + content: "\f1fe"; +} +.fa-pie-chart:before { + content: "\f200"; +} +.fa-line-chart:before { + content: "\f201"; +} +.fa-lastfm:before { + content: "\f202"; +} +.fa-lastfm-square:before { + content: "\f203"; +} +.fa-toggle-off:before { + content: "\f204"; +} +.fa-toggle-on:before { + content: "\f205"; +} +.fa-bicycle:before { + content: "\f206"; +} +.fa-bus:before { + content: "\f207"; +} +.fa-ioxhost:before { + content: "\f208"; +} +.fa-angellist:before { + content: "\f209"; +} +.fa-cc:before { + content: "\f20a"; +} +.fa-shekel:before, +.fa-sheqel:before, +.fa-ils:before { + content: "\f20b"; +} +.fa-meanpath:before { + content: "\f20c"; +} +.fa-buysellads:before { + content: "\f20d"; +} +.fa-connectdevelop:before { + content: "\f20e"; +} +.fa-dashcube:before { + content: "\f210"; +} +.fa-forumbee:before { + content: "\f211"; +} +.fa-leanpub:before { + content: "\f212"; +} +.fa-sellsy:before { + content: "\f213"; +} +.fa-shirtsinbulk:before { + content: "\f214"; +} +.fa-simplybuilt:before { + content: "\f215"; +} +.fa-skyatlas:before { + content: "\f216"; +} +.fa-cart-plus:before { + content: "\f217"; +} +.fa-cart-arrow-down:before { + content: "\f218"; +} +.fa-diamond:before { + content: "\f219"; +} +.fa-ship:before { + content: "\f21a"; +} +.fa-user-secret:before { + content: "\f21b"; +} +.fa-motorcycle:before { + content: "\f21c"; +} +.fa-street-view:before { + content: "\f21d"; +} +.fa-heartbeat:before { + content: "\f21e"; +} +.fa-venus:before { + content: "\f221"; +} +.fa-mars:before { + content: "\f222"; +} +.fa-mercury:before { + content: "\f223"; +} +.fa-intersex:before, +.fa-transgender:before { + content: "\f224"; +} +.fa-transgender-alt:before { + content: "\f225"; +} +.fa-venus-double:before { + content: "\f226"; +} +.fa-mars-double:before { + content: "\f227"; +} +.fa-venus-mars:before { + content: "\f228"; +} +.fa-mars-stroke:before { + content: "\f229"; +} +.fa-mars-stroke-v:before { + content: "\f22a"; +} +.fa-mars-stroke-h:before { + content: "\f22b"; +} +.fa-neuter:before { + content: "\f22c"; +} +.fa-genderless:before { + content: "\f22d"; +} +.fa-facebook-official:before { + content: "\f230"; +} +.fa-pinterest-p:before { + content: "\f231"; +} +.fa-whatsapp:before { + content: "\f232"; +} +.fa-server:before { + content: "\f233"; +} +.fa-user-plus:before { + content: "\f234"; +} +.fa-user-times:before { + content: "\f235"; +} +.fa-hotel:before, +.fa-bed:before { + content: "\f236"; +} +.fa-viacoin:before { + content: "\f237"; +} +.fa-train:before { + content: "\f238"; +} +.fa-subway:before { + content: "\f239"; +} +.fa-medium:before { + content: "\f23a"; +} +.fa-yc:before, +.fa-y-combinator:before { + content: "\f23b"; +} +.fa-optin-monster:before { + content: "\f23c"; +} +.fa-opencart:before { + content: "\f23d"; +} +.fa-expeditedssl:before { + content: "\f23e"; +} +.fa-battery-4:before, +.fa-battery:before, +.fa-battery-full:before { + content: "\f240"; +} +.fa-battery-3:before, +.fa-battery-three-quarters:before { + content: "\f241"; +} +.fa-battery-2:before, +.fa-battery-half:before { + content: "\f242"; +} +.fa-battery-1:before, +.fa-battery-quarter:before { + content: "\f243"; +} +.fa-battery-0:before, +.fa-battery-empty:before { + content: "\f244"; +} +.fa-mouse-pointer:before { + content: "\f245"; +} +.fa-i-cursor:before { + content: "\f246"; +} +.fa-object-group:before { + content: "\f247"; +} +.fa-object-ungroup:before { + content: "\f248"; +} +.fa-sticky-note:before { + content: "\f249"; +} +.fa-sticky-note-o:before { + content: "\f24a"; +} +.fa-cc-jcb:before { + content: "\f24b"; +} +.fa-cc-diners-club:before { + content: "\f24c"; +} +.fa-clone:before { + content: "\f24d"; +} +.fa-balance-scale:before { + content: "\f24e"; +} +.fa-hourglass-o:before { + content: "\f250"; +} +.fa-hourglass-1:before, +.fa-hourglass-start:before { + content: "\f251"; +} +.fa-hourglass-2:before, +.fa-hourglass-half:before { + content: "\f252"; +} +.fa-hourglass-3:before, +.fa-hourglass-end:before { + content: "\f253"; +} +.fa-hourglass:before { + content: "\f254"; +} +.fa-hand-grab-o:before, +.fa-hand-rock-o:before { + content: "\f255"; +} +.fa-hand-stop-o:before, +.fa-hand-paper-o:before { + content: "\f256"; +} +.fa-hand-scissors-o:before { + content: "\f257"; +} +.fa-hand-lizard-o:before { + content: "\f258"; +} +.fa-hand-spock-o:before { + content: "\f259"; +} +.fa-hand-pointer-o:before { + content: "\f25a"; +} +.fa-hand-peace-o:before { + content: "\f25b"; +} +.fa-trademark:before { + content: "\f25c"; +} +.fa-registered:before { + content: "\f25d"; +} +.fa-creative-commons:before { + content: "\f25e"; +} +.fa-gg:before { + content: "\f260"; +} +.fa-gg-circle:before { + content: "\f261"; +} +.fa-tripadvisor:before { + content: "\f262"; +} +.fa-odnoklassniki:before { + content: "\f263"; +} +.fa-odnoklassniki-square:before { + content: "\f264"; +} +.fa-get-pocket:before { + content: "\f265"; +} +.fa-wikipedia-w:before { + content: "\f266"; +} +.fa-safari:before { + content: "\f267"; +} +.fa-chrome:before { + content: "\f268"; +} +.fa-firefox:before { + content: "\f269"; +} +.fa-opera:before { + content: "\f26a"; +} +.fa-internet-explorer:before { + content: "\f26b"; +} +.fa-tv:before, +.fa-television:before { + content: "\f26c"; +} +.fa-contao:before { + content: "\f26d"; +} +.fa-500px:before { + content: "\f26e"; +} +.fa-amazon:before { + content: "\f270"; +} +.fa-calendar-plus-o:before { + content: "\f271"; +} +.fa-calendar-minus-o:before { + content: "\f272"; +} +.fa-calendar-times-o:before { + content: "\f273"; +} +.fa-calendar-check-o:before { + content: "\f274"; +} +.fa-industry:before { + content: "\f275"; +} +.fa-map-pin:before { + content: "\f276"; +} +.fa-map-signs:before { + content: "\f277"; +} +.fa-map-o:before { + content: "\f278"; +} +.fa-map:before { + content: "\f279"; +} +.fa-commenting:before { + content: "\f27a"; +} +.fa-commenting-o:before { + content: "\f27b"; +} +.fa-houzz:before { + content: "\f27c"; +} +.fa-vimeo:before { + content: "\f27d"; +} +.fa-black-tie:before { + content: "\f27e"; +} +.fa-fonticons:before { + content: "\f280"; +} +.fa-reddit-alien:before { + content: "\f281"; +} +.fa-edge:before { + content: "\f282"; +} +.fa-credit-card-alt:before { + content: "\f283"; +} +.fa-codiepie:before { + content: "\f284"; +} +.fa-modx:before { + content: "\f285"; +} +.fa-fort-awesome:before { + content: "\f286"; +} +.fa-usb:before { + content: "\f287"; +} +.fa-product-hunt:before { + content: "\f288"; +} +.fa-mixcloud:before { + content: "\f289"; +} +.fa-scribd:before { + content: "\f28a"; +} +.fa-pause-circle:before { + content: "\f28b"; +} +.fa-pause-circle-o:before { + content: "\f28c"; +} +.fa-stop-circle:before { + content: "\f28d"; +} +.fa-stop-circle-o:before { + content: "\f28e"; +} +.fa-shopping-bag:before { + content: "\f290"; +} +.fa-shopping-basket:before { + content: "\f291"; +} +.fa-hashtag:before { + content: "\f292"; +} +.fa-bluetooth:before { + content: "\f293"; +} +.fa-bluetooth-b:before { + content: "\f294"; +} +.fa-percent:before { + content: "\f295"; +} +.fa-gitlab:before { + content: "\f296"; +} +.fa-wpbeginner:before { + content: "\f297"; +} +.fa-wpforms:before { + content: "\f298"; +} +.fa-envira:before { + content: "\f299"; +} +.fa-universal-access:before { + content: "\f29a"; +} +.fa-wheelchair-alt:before { + content: "\f29b"; +} +.fa-question-circle-o:before { + content: "\f29c"; +} +.fa-blind:before { + content: "\f29d"; +} +.fa-audio-description:before { + content: "\f29e"; +} +.fa-volume-control-phone:before { + content: "\f2a0"; +} +.fa-braille:before { + content: "\f2a1"; +} +.fa-assistive-listening-systems:before { + content: "\f2a2"; +} +.fa-asl-interpreting:before, +.fa-american-sign-language-interpreting:before { + content: "\f2a3"; +} +.fa-deafness:before, +.fa-hard-of-hearing:before, +.fa-deaf:before { + content: "\f2a4"; +} +.fa-glide:before { + content: "\f2a5"; +} +.fa-glide-g:before { + content: "\f2a6"; +} +.fa-signing:before, +.fa-sign-language:before { + content: "\f2a7"; +} +.fa-low-vision:before { + content: "\f2a8"; +} +.fa-viadeo:before { + content: "\f2a9"; +} +.fa-viadeo-square:before { + content: "\f2aa"; +} +.fa-snapchat:before { + content: "\f2ab"; +} +.fa-snapchat-ghost:before { + content: "\f2ac"; +} +.fa-snapchat-square:before { + content: "\f2ad"; +} +.fa-pied-piper:before { + content: "\f2ae"; +} +.fa-first-order:before { + content: "\f2b0"; +} +.fa-yoast:before { + content: "\f2b1"; +} +.fa-themeisle:before { + content: "\f2b2"; +} +.fa-google-plus-circle:before, +.fa-google-plus-official:before { + content: "\f2b3"; +} +.fa-fa:before, +.fa-font-awesome:before { + content: "\f2b4"; +} +.fa-handshake-o:before { + content: "\f2b5"; +} +.fa-envelope-open:before { + content: "\f2b6"; +} +.fa-envelope-open-o:before { + content: "\f2b7"; +} +.fa-linode:before { + content: "\f2b8"; +} +.fa-address-book:before { + content: "\f2b9"; +} +.fa-address-book-o:before { + content: "\f2ba"; +} +.fa-vcard:before, +.fa-address-card:before { + content: "\f2bb"; +} +.fa-vcard-o:before, +.fa-address-card-o:before { + content: "\f2bc"; +} +.fa-user-circle:before { + content: "\f2bd"; +} +.fa-user-circle-o:before { + content: "\f2be"; +} +.fa-user-o:before { + content: "\f2c0"; +} +.fa-id-badge:before { + content: "\f2c1"; +} +.fa-drivers-license:before, +.fa-id-card:before { + content: "\f2c2"; +} +.fa-drivers-license-o:before, +.fa-id-card-o:before { + content: "\f2c3"; +} +.fa-quora:before { + content: "\f2c4"; +} +.fa-free-code-camp:before { + content: "\f2c5"; +} +.fa-telegram:before { + content: "\f2c6"; +} +.fa-thermometer-4:before, +.fa-thermometer:before, +.fa-thermometer-full:before { + content: "\f2c7"; +} +.fa-thermometer-3:before, +.fa-thermometer-three-quarters:before { + content: "\f2c8"; +} +.fa-thermometer-2:before, +.fa-thermometer-half:before { + content: "\f2c9"; +} +.fa-thermometer-1:before, +.fa-thermometer-quarter:before { + content: "\f2ca"; +} +.fa-thermometer-0:before, +.fa-thermometer-empty:before { + content: "\f2cb"; +} +.fa-shower:before { + content: "\f2cc"; +} +.fa-bathtub:before, +.fa-s15:before, +.fa-bath:before { + content: "\f2cd"; +} +.fa-podcast:before { + content: "\f2ce"; +} +.fa-window-maximize:before { + content: "\f2d0"; +} +.fa-window-minimize:before { + content: "\f2d1"; +} +.fa-window-restore:before { + content: "\f2d2"; +} +.fa-times-rectangle:before, +.fa-window-close:before { + content: "\f2d3"; +} +.fa-times-rectangle-o:before, +.fa-window-close-o:before { + content: "\f2d4"; +} +.fa-bandcamp:before { + content: "\f2d5"; +} +.fa-grav:before { + content: "\f2d6"; +} +.fa-etsy:before { + content: "\f2d7"; +} +.fa-imdb:before { + content: "\f2d8"; +} +.fa-ravelry:before { + content: "\f2d9"; +} +.fa-eercast:before { + content: "\f2da"; +} +.fa-microchip:before { + content: "\f2db"; +} +.fa-snowflake-o:before { + content: "\f2dc"; +} +.fa-superpowers:before { + content: "\f2dd"; +} +.fa-wpexplorer:before { + content: "\f2de"; +} +.fa-meetup:before { + content: "\f2e0"; +} +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} +.sr-only-focusable:active, +.sr-only-focusable:focus { + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto; +} diff --git a/assets/css/ionicons.css b/assets/css/ionicons.css new file mode 100644 index 0000000..39d8cb8 --- /dev/null +++ b/assets/css/ionicons.css @@ -0,0 +1,3513 @@ +@charset "UTF-8"; +/*! + Ionicons, v4.4.2 + Created by Ben Sperry for the Ionic Framework, http://ionicons.com/ + https://twitter.com/benjsperry https://twitter.com/ionicframework + MIT License: https://github.com/driftyco/ionicons + + Android-style icons originally built by Google’s + Material Design Icons: https://github.com/google/material-design-icons + used under CC BY http://creativecommons.org/licenses/by/4.0/ + Modified icons to fit ionicon’s grid from original. +*/ +@font-face { + font-family: "Ionicons"; + src: url("/fonts/ionicons-4.4.3/ionicons.eot"); + src: url("/fonts/ionicons-4.4.3/ionicons.eot#iefix") format("embedded-opentype"), url("/fonts/ionicons-4.4.3/ionicons.woff2") format("woff2"), url("/fonts/ionicons-4.4.3/ionicons.woff") format("woff"), url("/fonts/ionicons-4.4.3/ionicons.ttf") format("truetype"), url("/fonts/ionicons-4.4.3/ionicons.svg#Ionicons") format("svg"); + font-weight: normal; + font-style: normal; +} + +.ion, .ionicons, +.ion-ios-add:before, +.ion-ios-add-circle:before, +.ion-ios-add-circle-outline:before, +.ion-ios-airplane:before, +.ion-ios-alarm:before, +.ion-ios-albums:before, +.ion-ios-alert:before, +.ion-ios-american-football:before, +.ion-ios-analytics:before, +.ion-ios-aperture:before, +.ion-ios-apps:before, +.ion-ios-appstore:before, +.ion-ios-archive:before, +.ion-ios-arrow-back:before, +.ion-ios-arrow-down:before, +.ion-ios-arrow-dropdown:before, +.ion-ios-arrow-dropdown-circle:before, +.ion-ios-arrow-dropleft:before, +.ion-ios-arrow-dropleft-circle:before, +.ion-ios-arrow-dropright:before, +.ion-ios-arrow-dropright-circle:before, +.ion-ios-arrow-dropup:before, +.ion-ios-arrow-dropup-circle:before, +.ion-ios-arrow-forward:before, +.ion-ios-arrow-round-back:before, +.ion-ios-arrow-round-down:before, +.ion-ios-arrow-round-forward:before, +.ion-ios-arrow-round-up:before, +.ion-ios-arrow-up:before, +.ion-ios-at:before, +.ion-ios-attach:before, +.ion-ios-backspace:before, +.ion-ios-barcode:before, +.ion-ios-baseball:before, +.ion-ios-basket:before, +.ion-ios-basketball:before, +.ion-ios-battery-charging:before, +.ion-ios-battery-dead:before, +.ion-ios-battery-full:before, +.ion-ios-beaker:before, +.ion-ios-bed:before, +.ion-ios-beer:before, +.ion-ios-bicycle:before, +.ion-ios-bluetooth:before, +.ion-ios-boat:before, +.ion-ios-body:before, +.ion-ios-bonfire:before, +.ion-ios-book:before, +.ion-ios-bookmark:before, +.ion-ios-bookmarks:before, +.ion-ios-bowtie:before, +.ion-ios-briefcase:before, +.ion-ios-browsers:before, +.ion-ios-brush:before, +.ion-ios-bug:before, +.ion-ios-build:before, +.ion-ios-bulb:before, +.ion-ios-bus:before, +.ion-ios-business:before, +.ion-ios-cafe:before, +.ion-ios-calculator:before, +.ion-ios-calendar:before, +.ion-ios-call:before, +.ion-ios-camera:before, +.ion-ios-car:before, +.ion-ios-card:before, +.ion-ios-cart:before, +.ion-ios-cash:before, +.ion-ios-cellular:before, +.ion-ios-chatboxes:before, +.ion-ios-chatbubbles:before, +.ion-ios-checkbox:before, +.ion-ios-checkbox-outline:before, +.ion-ios-checkmark:before, +.ion-ios-checkmark-circle:before, +.ion-ios-checkmark-circle-outline:before, +.ion-ios-clipboard:before, +.ion-ios-clock:before, +.ion-ios-close:before, +.ion-ios-close-circle:before, +.ion-ios-close-circle-outline:before, +.ion-ios-cloud:before, +.ion-ios-cloud-circle:before, +.ion-ios-cloud-done:before, +.ion-ios-cloud-download:before, +.ion-ios-cloud-outline:before, +.ion-ios-cloud-upload:before, +.ion-ios-cloudy:before, +.ion-ios-cloudy-night:before, +.ion-ios-code:before, +.ion-ios-code-download:before, +.ion-ios-code-working:before, +.ion-ios-cog:before, +.ion-ios-color-fill:before, +.ion-ios-color-filter:before, +.ion-ios-color-palette:before, +.ion-ios-color-wand:before, +.ion-ios-compass:before, +.ion-ios-construct:before, +.ion-ios-contact:before, +.ion-ios-contacts:before, +.ion-ios-contract:before, +.ion-ios-contrast:before, +.ion-ios-copy:before, +.ion-ios-create:before, +.ion-ios-crop:before, +.ion-ios-cube:before, +.ion-ios-cut:before, +.ion-ios-desktop:before, +.ion-ios-disc:before, +.ion-ios-document:before, +.ion-ios-done-all:before, +.ion-ios-download:before, +.ion-ios-easel:before, +.ion-ios-egg:before, +.ion-ios-exit:before, +.ion-ios-expand:before, +.ion-ios-eye:before, +.ion-ios-eye-off:before, +.ion-ios-fastforward:before, +.ion-ios-female:before, +.ion-ios-filing:before, +.ion-ios-film:before, +.ion-ios-finger-print:before, +.ion-ios-fitness:before, +.ion-ios-flag:before, +.ion-ios-flame:before, +.ion-ios-flash:before, +.ion-ios-flash-off:before, +.ion-ios-flashlight:before, +.ion-ios-flask:before, +.ion-ios-flower:before, +.ion-ios-folder:before, +.ion-ios-folder-open:before, +.ion-ios-football:before, +.ion-ios-funnel:before, +.ion-ios-gift:before, +.ion-ios-git-branch:before, +.ion-ios-git-commit:before, +.ion-ios-git-compare:before, +.ion-ios-git-merge:before, +.ion-ios-git-network:before, +.ion-ios-git-pull-request:before, +.ion-ios-glasses:before, +.ion-ios-globe:before, +.ion-ios-grid:before, +.ion-ios-hammer:before, +.ion-ios-hand:before, +.ion-ios-happy:before, +.ion-ios-headset:before, +.ion-ios-heart:before, +.ion-ios-heart-dislike:before, +.ion-ios-heart-empty:before, +.ion-ios-heart-half:before, +.ion-ios-help:before, +.ion-ios-help-buoy:before, +.ion-ios-help-circle:before, +.ion-ios-help-circle-outline:before, +.ion-ios-home:before, +.ion-ios-hourglass:before, +.ion-ios-ice-cream:before, +.ion-ios-image:before, +.ion-ios-images:before, +.ion-ios-infinite:before, +.ion-ios-information:before, +.ion-ios-information-circle:before, +.ion-ios-information-circle-outline:before, +.ion-ios-jet:before, +.ion-ios-journal:before, +.ion-ios-key:before, +.ion-ios-keypad:before, +.ion-ios-laptop:before, +.ion-ios-leaf:before, +.ion-ios-link:before, +.ion-ios-list:before, +.ion-ios-list-box:before, +.ion-ios-locate:before, +.ion-ios-lock:before, +.ion-ios-log-in:before, +.ion-ios-log-out:before, +.ion-ios-magnet:before, +.ion-ios-mail:before, +.ion-ios-mail-open:before, +.ion-ios-mail-unread:before, +.ion-ios-male:before, +.ion-ios-man:before, +.ion-ios-map:before, +.ion-ios-medal:before, +.ion-ios-medical:before, +.ion-ios-medkit:before, +.ion-ios-megaphone:before, +.ion-ios-menu:before, +.ion-ios-mic:before, +.ion-ios-mic-off:before, +.ion-ios-microphone:before, +.ion-ios-moon:before, +.ion-ios-more:before, +.ion-ios-move:before, +.ion-ios-musical-note:before, +.ion-ios-musical-notes:before, +.ion-ios-navigate:before, +.ion-ios-notifications:before, +.ion-ios-notifications-off:before, +.ion-ios-notifications-outline:before, +.ion-ios-nuclear:before, +.ion-ios-nutrition:before, +.ion-ios-open:before, +.ion-ios-options:before, +.ion-ios-outlet:before, +.ion-ios-paper:before, +.ion-ios-paper-plane:before, +.ion-ios-partly-sunny:before, +.ion-ios-pause:before, +.ion-ios-paw:before, +.ion-ios-people:before, +.ion-ios-person:before, +.ion-ios-person-add:before, +.ion-ios-phone-landscape:before, +.ion-ios-phone-portrait:before, +.ion-ios-photos:before, +.ion-ios-pie:before, +.ion-ios-pin:before, +.ion-ios-pint:before, +.ion-ios-pizza:before, +.ion-ios-planet:before, +.ion-ios-play:before, +.ion-ios-play-circle:before, +.ion-ios-podium:before, +.ion-ios-power:before, +.ion-ios-pricetag:before, +.ion-ios-pricetags:before, +.ion-ios-print:before, +.ion-ios-pulse:before, +.ion-ios-qr-scanner:before, +.ion-ios-quote:before, +.ion-ios-radio:before, +.ion-ios-radio-button-off:before, +.ion-ios-radio-button-on:before, +.ion-ios-rainy:before, +.ion-ios-recording:before, +.ion-ios-redo:before, +.ion-ios-refresh:before, +.ion-ios-refresh-circle:before, +.ion-ios-remove:before, +.ion-ios-remove-circle:before, +.ion-ios-remove-circle-outline:before, +.ion-ios-reorder:before, +.ion-ios-repeat:before, +.ion-ios-resize:before, +.ion-ios-restaurant:before, +.ion-ios-return-left:before, +.ion-ios-return-right:before, +.ion-ios-reverse-camera:before, +.ion-ios-rewind:before, +.ion-ios-ribbon:before, +.ion-ios-rocket:before, +.ion-ios-rose:before, +.ion-ios-sad:before, +.ion-ios-save:before, +.ion-ios-school:before, +.ion-ios-search:before, +.ion-ios-send:before, +.ion-ios-settings:before, +.ion-ios-share:before, +.ion-ios-share-alt:before, +.ion-ios-shirt:before, +.ion-ios-shuffle:before, +.ion-ios-skip-backward:before, +.ion-ios-skip-forward:before, +.ion-ios-snow:before, +.ion-ios-speedometer:before, +.ion-ios-square:before, +.ion-ios-square-outline:before, +.ion-ios-star:before, +.ion-ios-star-half:before, +.ion-ios-star-outline:before, +.ion-ios-stats:before, +.ion-ios-stopwatch:before, +.ion-ios-subway:before, +.ion-ios-sunny:before, +.ion-ios-swap:before, +.ion-ios-switch:before, +.ion-ios-sync:before, +.ion-ios-tablet-landscape:before, +.ion-ios-tablet-portrait:before, +.ion-ios-tennisball:before, +.ion-ios-text:before, +.ion-ios-thermometer:before, +.ion-ios-thumbs-down:before, +.ion-ios-thumbs-up:before, +.ion-ios-thunderstorm:before, +.ion-ios-time:before, +.ion-ios-timer:before, +.ion-ios-today:before, +.ion-ios-train:before, +.ion-ios-transgender:before, +.ion-ios-trash:before, +.ion-ios-trending-down:before, +.ion-ios-trending-up:before, +.ion-ios-trophy:before, +.ion-ios-tv:before, +.ion-ios-umbrella:before, +.ion-ios-undo:before, +.ion-ios-unlock:before, +.ion-ios-videocam:before, +.ion-ios-volume-high:before, +.ion-ios-volume-low:before, +.ion-ios-volume-mute:before, +.ion-ios-volume-off:before, +.ion-ios-walk:before, +.ion-ios-wallet:before, +.ion-ios-warning:before, +.ion-ios-watch:before, +.ion-ios-water:before, +.ion-ios-wifi:before, +.ion-ios-wine:before, +.ion-ios-woman:before, +.ion-logo-android:before, +.ion-logo-angular:before, +.ion-logo-apple:before, +.ion-logo-bitbucket:before, +.ion-logo-bitcoin:before, +.ion-logo-buffer:before, +.ion-logo-chrome:before, +.ion-logo-closed-captioning:before, +.ion-logo-codepen:before, +.ion-logo-css3:before, +.ion-logo-designernews:before, +.ion-logo-dribbble:before, +.ion-logo-dropbox:before, +.ion-logo-euro:before, +.ion-logo-facebook:before, +.ion-logo-flickr:before, +.ion-logo-foursquare:before, +.ion-logo-freebsd-devil:before, +.ion-logo-game-controller-a:before, +.ion-logo-game-controller-b:before, +.ion-logo-github:before, +.ion-logo-google:before, +.ion-logo-googleplus:before, +.ion-logo-hackernews:before, +.ion-logo-html5:before, +.ion-logo-instagram:before, +.ion-logo-ionic:before, +.ion-logo-ionitron:before, +.ion-logo-javascript:before, +.ion-logo-linkedin:before, +.ion-logo-markdown:before, +.ion-logo-model-s:before, +.ion-logo-no-smoking:before, +.ion-logo-nodejs:before, +.ion-logo-npm:before, +.ion-logo-octocat:before, +.ion-logo-pinterest:before, +.ion-logo-playstation:before, +.ion-logo-polymer:before, +.ion-logo-python:before, +.ion-logo-reddit:before, +.ion-logo-rss:before, +.ion-logo-sass:before, +.ion-logo-skype:before, +.ion-logo-slack:before, +.ion-logo-snapchat:before, +.ion-logo-steam:before, +.ion-logo-tumblr:before, +.ion-logo-tux:before, +.ion-logo-twitch:before, +.ion-logo-twitter:before, +.ion-logo-usd:before, +.ion-logo-vimeo:before, +.ion-logo-vk:before, +.ion-logo-whatsapp:before, +.ion-logo-windows:before, +.ion-logo-wordpress:before, +.ion-logo-xbox:before, +.ion-logo-xing:before, +.ion-logo-yahoo:before, +.ion-logo-yen:before, +.ion-logo-youtube:before, +.ion-md-add:before, +.ion-md-add-circle:before, +.ion-md-add-circle-outline:before, +.ion-md-airplane:before, +.ion-md-alarm:before, +.ion-md-albums:before, +.ion-md-alert:before, +.ion-md-american-football:before, +.ion-md-analytics:before, +.ion-md-aperture:before, +.ion-md-apps:before, +.ion-md-appstore:before, +.ion-md-archive:before, +.ion-md-arrow-back:before, +.ion-md-arrow-down:before, +.ion-md-arrow-dropdown:before, +.ion-md-arrow-dropdown-circle:before, +.ion-md-arrow-dropleft:before, +.ion-md-arrow-dropleft-circle:before, +.ion-md-arrow-dropright:before, +.ion-md-arrow-dropright-circle:before, +.ion-md-arrow-dropup:before, +.ion-md-arrow-dropup-circle:before, +.ion-md-arrow-forward:before, +.ion-md-arrow-round-back:before, +.ion-md-arrow-round-down:before, +.ion-md-arrow-round-forward:before, +.ion-md-arrow-round-up:before, +.ion-md-arrow-up:before, +.ion-md-at:before, +.ion-md-attach:before, +.ion-md-backspace:before, +.ion-md-barcode:before, +.ion-md-baseball:before, +.ion-md-basket:before, +.ion-md-basketball:before, +.ion-md-battery-charging:before, +.ion-md-battery-dead:before, +.ion-md-battery-full:before, +.ion-md-beaker:before, +.ion-md-bed:before, +.ion-md-beer:before, +.ion-md-bicycle:before, +.ion-md-bluetooth:before, +.ion-md-boat:before, +.ion-md-body:before, +.ion-md-bonfire:before, +.ion-md-book:before, +.ion-md-bookmark:before, +.ion-md-bookmarks:before, +.ion-md-bowtie:before, +.ion-md-briefcase:before, +.ion-md-browsers:before, +.ion-md-brush:before, +.ion-md-bug:before, +.ion-md-build:before, +.ion-md-bulb:before, +.ion-md-bus:before, +.ion-md-business:before, +.ion-md-cafe:before, +.ion-md-calculator:before, +.ion-md-calendar:before, +.ion-md-call:before, +.ion-md-camera:before, +.ion-md-car:before, +.ion-md-card:before, +.ion-md-cart:before, +.ion-md-cash:before, +.ion-md-cellular:before, +.ion-md-chatboxes:before, +.ion-md-chatbubbles:before, +.ion-md-checkbox:before, +.ion-md-checkbox-outline:before, +.ion-md-checkmark:before, +.ion-md-checkmark-circle:before, +.ion-md-checkmark-circle-outline:before, +.ion-md-clipboard:before, +.ion-md-clock:before, +.ion-md-close:before, +.ion-md-close-circle:before, +.ion-md-close-circle-outline:before, +.ion-md-cloud:before, +.ion-md-cloud-circle:before, +.ion-md-cloud-done:before, +.ion-md-cloud-download:before, +.ion-md-cloud-outline:before, +.ion-md-cloud-upload:before, +.ion-md-cloudy:before, +.ion-md-cloudy-night:before, +.ion-md-code:before, +.ion-md-code-download:before, +.ion-md-code-working:before, +.ion-md-cog:before, +.ion-md-color-fill:before, +.ion-md-color-filter:before, +.ion-md-color-palette:before, +.ion-md-color-wand:before, +.ion-md-compass:before, +.ion-md-construct:before, +.ion-md-contact:before, +.ion-md-contacts:before, +.ion-md-contract:before, +.ion-md-contrast:before, +.ion-md-copy:before, +.ion-md-create:before, +.ion-md-crop:before, +.ion-md-cube:before, +.ion-md-cut:before, +.ion-md-desktop:before, +.ion-md-disc:before, +.ion-md-document:before, +.ion-md-done-all:before, +.ion-md-download:before, +.ion-md-easel:before, +.ion-md-egg:before, +.ion-md-exit:before, +.ion-md-expand:before, +.ion-md-eye:before, +.ion-md-eye-off:before, +.ion-md-fastforward:before, +.ion-md-female:before, +.ion-md-filing:before, +.ion-md-film:before, +.ion-md-finger-print:before, +.ion-md-fitness:before, +.ion-md-flag:before, +.ion-md-flame:before, +.ion-md-flash:before, +.ion-md-flash-off:before, +.ion-md-flashlight:before, +.ion-md-flask:before, +.ion-md-flower:before, +.ion-md-folder:before, +.ion-md-folder-open:before, +.ion-md-football:before, +.ion-md-funnel:before, +.ion-md-gift:before, +.ion-md-git-branch:before, +.ion-md-git-commit:before, +.ion-md-git-compare:before, +.ion-md-git-merge:before, +.ion-md-git-network:before, +.ion-md-git-pull-request:before, +.ion-md-glasses:before, +.ion-md-globe:before, +.ion-md-grid:before, +.ion-md-hammer:before, +.ion-md-hand:before, +.ion-md-happy:before, +.ion-md-headset:before, +.ion-md-heart:before, +.ion-md-heart-dislike:before, +.ion-md-heart-empty:before, +.ion-md-heart-half:before, +.ion-md-help:before, +.ion-md-help-buoy:before, +.ion-md-help-circle:before, +.ion-md-help-circle-outline:before, +.ion-md-home:before, +.ion-md-hourglass:before, +.ion-md-ice-cream:before, +.ion-md-image:before, +.ion-md-images:before, +.ion-md-infinite:before, +.ion-md-information:before, +.ion-md-information-circle:before, +.ion-md-information-circle-outline:before, +.ion-md-jet:before, +.ion-md-journal:before, +.ion-md-key:before, +.ion-md-keypad:before, +.ion-md-laptop:before, +.ion-md-leaf:before, +.ion-md-link:before, +.ion-md-list:before, +.ion-md-list-box:before, +.ion-md-locate:before, +.ion-md-lock:before, +.ion-md-log-in:before, +.ion-md-log-out:before, +.ion-md-magnet:before, +.ion-md-mail:before, +.ion-md-mail-open:before, +.ion-md-mail-unread:before, +.ion-md-male:before, +.ion-md-man:before, +.ion-md-map:before, +.ion-md-medal:before, +.ion-md-medical:before, +.ion-md-medkit:before, +.ion-md-megaphone:before, +.ion-md-menu:before, +.ion-md-mic:before, +.ion-md-mic-off:before, +.ion-md-microphone:before, +.ion-md-moon:before, +.ion-md-more:before, +.ion-md-move:before, +.ion-md-musical-note:before, +.ion-md-musical-notes:before, +.ion-md-navigate:before, +.ion-md-notifications:before, +.ion-md-notifications-off:before, +.ion-md-notifications-outline:before, +.ion-md-nuclear:before, +.ion-md-nutrition:before, +.ion-md-open:before, +.ion-md-options:before, +.ion-md-outlet:before, +.ion-md-paper:before, +.ion-md-paper-plane:before, +.ion-md-partly-sunny:before, +.ion-md-pause:before, +.ion-md-paw:before, +.ion-md-people:before, +.ion-md-person:before, +.ion-md-person-add:before, +.ion-md-phone-landscape:before, +.ion-md-phone-portrait:before, +.ion-md-photos:before, +.ion-md-pie:before, +.ion-md-pin:before, +.ion-md-pint:before, +.ion-md-pizza:before, +.ion-md-planet:before, +.ion-md-play:before, +.ion-md-play-circle:before, +.ion-md-podium:before, +.ion-md-power:before, +.ion-md-pricetag:before, +.ion-md-pricetags:before, +.ion-md-print:before, +.ion-md-pulse:before, +.ion-md-qr-scanner:before, +.ion-md-quote:before, +.ion-md-radio:before, +.ion-md-radio-button-off:before, +.ion-md-radio-button-on:before, +.ion-md-rainy:before, +.ion-md-recording:before, +.ion-md-redo:before, +.ion-md-refresh:before, +.ion-md-refresh-circle:before, +.ion-md-remove:before, +.ion-md-remove-circle:before, +.ion-md-remove-circle-outline:before, +.ion-md-reorder:before, +.ion-md-repeat:before, +.ion-md-resize:before, +.ion-md-restaurant:before, +.ion-md-return-left:before, +.ion-md-return-right:before, +.ion-md-reverse-camera:before, +.ion-md-rewind:before, +.ion-md-ribbon:before, +.ion-md-rocket:before, +.ion-md-rose:before, +.ion-md-sad:before, +.ion-md-save:before, +.ion-md-school:before, +.ion-md-search:before, +.ion-md-send:before, +.ion-md-settings:before, +.ion-md-share:before, +.ion-md-share-alt:before, +.ion-md-shirt:before, +.ion-md-shuffle:before, +.ion-md-skip-backward:before, +.ion-md-skip-forward:before, +.ion-md-snow:before, +.ion-md-speedometer:before, +.ion-md-square:before, +.ion-md-square-outline:before, +.ion-md-star:before, +.ion-md-star-half:before, +.ion-md-star-outline:before, +.ion-md-stats:before, +.ion-md-stopwatch:before, +.ion-md-subway:before, +.ion-md-sunny:before, +.ion-md-swap:before, +.ion-md-switch:before, +.ion-md-sync:before, +.ion-md-tablet-landscape:before, +.ion-md-tablet-portrait:before, +.ion-md-tennisball:before, +.ion-md-text:before, +.ion-md-thermometer:before, +.ion-md-thumbs-down:before, +.ion-md-thumbs-up:before, +.ion-md-thunderstorm:before, +.ion-md-time:before, +.ion-md-timer:before, +.ion-md-today:before, +.ion-md-train:before, +.ion-md-transgender:before, +.ion-md-trash:before, +.ion-md-trending-down:before, +.ion-md-trending-up:before, +.ion-md-trophy:before, +.ion-md-tv:before, +.ion-md-umbrella:before, +.ion-md-undo:before, +.ion-md-unlock:before, +.ion-md-videocam:before, +.ion-md-volume-high:before, +.ion-md-volume-low:before, +.ion-md-volume-mute:before, +.ion-md-volume-off:before, +.ion-md-walk:before, +.ion-md-wallet:before, +.ion-md-warning:before, +.ion-md-watch:before, +.ion-md-water:before, +.ion-md-wifi:before, +.ion-md-wine:before, +.ion-md-woman:before { + display: inline-block; + font-family: "Ionicons"; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + text-rendering: auto; + line-height: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.ion-ios-add:before { + content: "\f102"; +} + +.ion-ios-add-circle:before { + content: "\f101"; +} + +.ion-ios-add-circle-outline:before { + content: "\f100"; +} + +.ion-ios-airplane:before { + content: "\f137"; +} + +.ion-ios-alarm:before { + content: "\f3c8"; +} + +.ion-ios-albums:before { + content: "\f3ca"; +} + +.ion-ios-alert:before { + content: "\f104"; +} + +.ion-ios-american-football:before { + content: "\f106"; +} + +.ion-ios-analytics:before { + content: "\f3ce"; +} + +.ion-ios-aperture:before { + content: "\f108"; +} + +.ion-ios-apps:before { + content: "\f10a"; +} + +.ion-ios-appstore:before { + content: "\f10c"; +} + +.ion-ios-archive:before { + content: "\f10e"; +} + +.ion-ios-arrow-back:before { + content: "\f3cf"; +} + +.ion-ios-arrow-down:before { + content: "\f3d0"; +} + +.ion-ios-arrow-dropdown:before { + content: "\f110"; +} + +.ion-ios-arrow-dropdown-circle:before { + content: "\f125"; +} + +.ion-ios-arrow-dropleft:before { + content: "\f112"; +} + +.ion-ios-arrow-dropleft-circle:before { + content: "\f129"; +} + +.ion-ios-arrow-dropright:before { + content: "\f114"; +} + +.ion-ios-arrow-dropright-circle:before { + content: "\f12b"; +} + +.ion-ios-arrow-dropup:before { + content: "\f116"; +} + +.ion-ios-arrow-dropup-circle:before { + content: "\f12d"; +} + +.ion-ios-arrow-forward:before { + content: "\f3d1"; +} + +.ion-ios-arrow-round-back:before { + content: "\f117"; +} + +.ion-ios-arrow-round-down:before { + content: "\f118"; +} + +.ion-ios-arrow-round-forward:before { + content: "\f119"; +} + +.ion-ios-arrow-round-up:before { + content: "\f11a"; +} + +.ion-ios-arrow-up:before { + content: "\f3d8"; +} + +.ion-ios-at:before { + content: "\f3da"; +} + +.ion-ios-attach:before { + content: "\f11b"; +} + +.ion-ios-backspace:before { + content: "\f11d"; +} + +.ion-ios-barcode:before { + content: "\f3dc"; +} + +.ion-ios-baseball:before { + content: "\f3de"; +} + +.ion-ios-basket:before { + content: "\f11f"; +} + +.ion-ios-basketball:before { + content: "\f3e0"; +} + +.ion-ios-battery-charging:before { + content: "\f120"; +} + +.ion-ios-battery-dead:before { + content: "\f121"; +} + +.ion-ios-battery-full:before { + content: "\f122"; +} + +.ion-ios-beaker:before { + content: "\f124"; +} + +.ion-ios-bed:before { + content: "\f139"; +} + +.ion-ios-beer:before { + content: "\f126"; +} + +.ion-ios-bicycle:before { + content: "\f127"; +} + +.ion-ios-bluetooth:before { + content: "\f128"; +} + +.ion-ios-boat:before { + content: "\f12a"; +} + +.ion-ios-body:before { + content: "\f3e4"; +} + +.ion-ios-bonfire:before { + content: "\f12c"; +} + +.ion-ios-book:before { + content: "\f3e8"; +} + +.ion-ios-bookmark:before { + content: "\f12e"; +} + +.ion-ios-bookmarks:before { + content: "\f3ea"; +} + +.ion-ios-bowtie:before { + content: "\f130"; +} + +.ion-ios-briefcase:before { + content: "\f3ee"; +} + +.ion-ios-browsers:before { + content: "\f3f0"; +} + +.ion-ios-brush:before { + content: "\f132"; +} + +.ion-ios-bug:before { + content: "\f134"; +} + +.ion-ios-build:before { + content: "\f136"; +} + +.ion-ios-bulb:before { + content: "\f138"; +} + +.ion-ios-bus:before { + content: "\f13a"; +} + +.ion-ios-business:before { + content: "\f1a3"; +} + +.ion-ios-cafe:before { + content: "\f13c"; +} + +.ion-ios-calculator:before { + content: "\f3f2"; +} + +.ion-ios-calendar:before { + content: "\f3f4"; +} + +.ion-ios-call:before { + content: "\f13e"; +} + +.ion-ios-camera:before { + content: "\f3f6"; +} + +.ion-ios-car:before { + content: "\f140"; +} + +.ion-ios-card:before { + content: "\f142"; +} + +.ion-ios-cart:before { + content: "\f3f8"; +} + +.ion-ios-cash:before { + content: "\f144"; +} + +.ion-ios-cellular:before { + content: "\f13d"; +} + +.ion-ios-chatboxes:before { + content: "\f3fa"; +} + +.ion-ios-chatbubbles:before { + content: "\f146"; +} + +.ion-ios-checkbox:before { + content: "\f148"; +} + +.ion-ios-checkbox-outline:before { + content: "\f147"; +} + +.ion-ios-checkmark:before { + content: "\f3ff"; +} + +.ion-ios-checkmark-circle:before { + content: "\f14a"; +} + +.ion-ios-checkmark-circle-outline:before { + content: "\f149"; +} + +.ion-ios-clipboard:before { + content: "\f14c"; +} + +.ion-ios-clock:before { + content: "\f403"; +} + +.ion-ios-close:before { + content: "\f406"; +} + +.ion-ios-close-circle:before { + content: "\f14e"; +} + +.ion-ios-close-circle-outline:before { + content: "\f14d"; +} + +.ion-ios-cloud:before { + content: "\f40c"; +} + +.ion-ios-cloud-circle:before { + content: "\f152"; +} + +.ion-ios-cloud-done:before { + content: "\f154"; +} + +.ion-ios-cloud-download:before { + content: "\f408"; +} + +.ion-ios-cloud-outline:before { + content: "\f409"; +} + +.ion-ios-cloud-upload:before { + content: "\f40b"; +} + +.ion-ios-cloudy:before { + content: "\f410"; +} + +.ion-ios-cloudy-night:before { + content: "\f40e"; +} + +.ion-ios-code:before { + content: "\f157"; +} + +.ion-ios-code-download:before { + content: "\f155"; +} + +.ion-ios-code-working:before { + content: "\f156"; +} + +.ion-ios-cog:before { + content: "\f412"; +} + +.ion-ios-color-fill:before { + content: "\f159"; +} + +.ion-ios-color-filter:before { + content: "\f414"; +} + +.ion-ios-color-palette:before { + content: "\f15b"; +} + +.ion-ios-color-wand:before { + content: "\f416"; +} + +.ion-ios-compass:before { + content: "\f15d"; +} + +.ion-ios-construct:before { + content: "\f15f"; +} + +.ion-ios-contact:before { + content: "\f41a"; +} + +.ion-ios-contacts:before { + content: "\f161"; +} + +.ion-ios-contract:before { + content: "\f162"; +} + +.ion-ios-contrast:before { + content: "\f163"; +} + +.ion-ios-copy:before { + content: "\f41c"; +} + +.ion-ios-create:before { + content: "\f165"; +} + +.ion-ios-crop:before { + content: "\f41e"; +} + +.ion-ios-cube:before { + content: "\f168"; +} + +.ion-ios-cut:before { + content: "\f16a"; +} + +.ion-ios-desktop:before { + content: "\f16c"; +} + +.ion-ios-disc:before { + content: "\f16e"; +} + +.ion-ios-document:before { + content: "\f170"; +} + +.ion-ios-done-all:before { + content: "\f171"; +} + +.ion-ios-download:before { + content: "\f420"; +} + +.ion-ios-easel:before { + content: "\f173"; +} + +.ion-ios-egg:before { + content: "\f175"; +} + +.ion-ios-exit:before { + content: "\f177"; +} + +.ion-ios-expand:before { + content: "\f178"; +} + +.ion-ios-eye:before { + content: "\f425"; +} + +.ion-ios-eye-off:before { + content: "\f17a"; +} + +.ion-ios-fastforward:before { + content: "\f427"; +} + +.ion-ios-female:before { + content: "\f17b"; +} + +.ion-ios-filing:before { + content: "\f429"; +} + +.ion-ios-film:before { + content: "\f42b"; +} + +.ion-ios-finger-print:before { + content: "\f17c"; +} + +.ion-ios-fitness:before { + content: "\f1ab"; +} + +.ion-ios-flag:before { + content: "\f42d"; +} + +.ion-ios-flame:before { + content: "\f42f"; +} + +.ion-ios-flash:before { + content: "\f17e"; +} + +.ion-ios-flash-off:before { + content: "\f12f"; +} + +.ion-ios-flashlight:before { + content: "\f141"; +} + +.ion-ios-flask:before { + content: "\f431"; +} + +.ion-ios-flower:before { + content: "\f433"; +} + +.ion-ios-folder:before { + content: "\f435"; +} + +.ion-ios-folder-open:before { + content: "\f180"; +} + +.ion-ios-football:before { + content: "\f437"; +} + +.ion-ios-funnel:before { + content: "\f182"; +} + +.ion-ios-gift:before { + content: "\f191"; +} + +.ion-ios-git-branch:before { + content: "\f183"; +} + +.ion-ios-git-commit:before { + content: "\f184"; +} + +.ion-ios-git-compare:before { + content: "\f185"; +} + +.ion-ios-git-merge:before { + content: "\f186"; +} + +.ion-ios-git-network:before { + content: "\f187"; +} + +.ion-ios-git-pull-request:before { + content: "\f188"; +} + +.ion-ios-glasses:before { + content: "\f43f"; +} + +.ion-ios-globe:before { + content: "\f18a"; +} + +.ion-ios-grid:before { + content: "\f18c"; +} + +.ion-ios-hammer:before { + content: "\f18e"; +} + +.ion-ios-hand:before { + content: "\f190"; +} + +.ion-ios-happy:before { + content: "\f192"; +} + +.ion-ios-headset:before { + content: "\f194"; +} + +.ion-ios-heart:before { + content: "\f443"; +} + +.ion-ios-heart-dislike:before { + content: "\f13f"; +} + +.ion-ios-heart-empty:before { + content: "\f19b"; +} + +.ion-ios-heart-half:before { + content: "\f19d"; +} + +.ion-ios-help:before { + content: "\f446"; +} + +.ion-ios-help-buoy:before { + content: "\f196"; +} + +.ion-ios-help-circle:before { + content: "\f198"; +} + +.ion-ios-help-circle-outline:before { + content: "\f197"; +} + +.ion-ios-home:before { + content: "\f448"; +} + +.ion-ios-hourglass:before { + content: "\f103"; +} + +.ion-ios-ice-cream:before { + content: "\f19a"; +} + +.ion-ios-image:before { + content: "\f19c"; +} + +.ion-ios-images:before { + content: "\f19e"; +} + +.ion-ios-infinite:before { + content: "\f44a"; +} + +.ion-ios-information:before { + content: "\f44d"; +} + +.ion-ios-information-circle:before { + content: "\f1a0"; +} + +.ion-ios-information-circle-outline:before { + content: "\f19f"; +} + +.ion-ios-jet:before { + content: "\f1a5"; +} + +.ion-ios-journal:before { + content: "\f189"; +} + +.ion-ios-key:before { + content: "\f1a7"; +} + +.ion-ios-keypad:before { + content: "\f450"; +} + +.ion-ios-laptop:before { + content: "\f1a8"; +} + +.ion-ios-leaf:before { + content: "\f1aa"; +} + +.ion-ios-link:before { + content: "\f22a"; +} + +.ion-ios-list:before { + content: "\f454"; +} + +.ion-ios-list-box:before { + content: "\f143"; +} + +.ion-ios-locate:before { + content: "\f1ae"; +} + +.ion-ios-lock:before { + content: "\f1b0"; +} + +.ion-ios-log-in:before { + content: "\f1b1"; +} + +.ion-ios-log-out:before { + content: "\f1b2"; +} + +.ion-ios-magnet:before { + content: "\f1b4"; +} + +.ion-ios-mail:before { + content: "\f1b8"; +} + +.ion-ios-mail-open:before { + content: "\f1b6"; +} + +.ion-ios-mail-unread:before { + content: "\f145"; +} + +.ion-ios-male:before { + content: "\f1b9"; +} + +.ion-ios-man:before { + content: "\f1bb"; +} + +.ion-ios-map:before { + content: "\f1bd"; +} + +.ion-ios-medal:before { + content: "\f1bf"; +} + +.ion-ios-medical:before { + content: "\f45c"; +} + +.ion-ios-medkit:before { + content: "\f45e"; +} + +.ion-ios-megaphone:before { + content: "\f1c1"; +} + +.ion-ios-menu:before { + content: "\f1c3"; +} + +.ion-ios-mic:before { + content: "\f461"; +} + +.ion-ios-mic-off:before { + content: "\f45f"; +} + +.ion-ios-microphone:before { + content: "\f1c6"; +} + +.ion-ios-moon:before { + content: "\f468"; +} + +.ion-ios-more:before { + content: "\f1c8"; +} + +.ion-ios-move:before { + content: "\f1cb"; +} + +.ion-ios-musical-note:before { + content: "\f46b"; +} + +.ion-ios-musical-notes:before { + content: "\f46c"; +} + +.ion-ios-navigate:before { + content: "\f46e"; +} + +.ion-ios-notifications:before { + content: "\f1d3"; +} + +.ion-ios-notifications-off:before { + content: "\f1d1"; +} + +.ion-ios-notifications-outline:before { + content: "\f133"; +} + +.ion-ios-nuclear:before { + content: "\f1d5"; +} + +.ion-ios-nutrition:before { + content: "\f470"; +} + +.ion-ios-open:before { + content: "\f1d7"; +} + +.ion-ios-options:before { + content: "\f1d9"; +} + +.ion-ios-outlet:before { + content: "\f1db"; +} + +.ion-ios-paper:before { + content: "\f472"; +} + +.ion-ios-paper-plane:before { + content: "\f1dd"; +} + +.ion-ios-partly-sunny:before { + content: "\f1df"; +} + +.ion-ios-pause:before { + content: "\f478"; +} + +.ion-ios-paw:before { + content: "\f47a"; +} + +.ion-ios-people:before { + content: "\f47c"; +} + +.ion-ios-person:before { + content: "\f47e"; +} + +.ion-ios-person-add:before { + content: "\f1e1"; +} + +.ion-ios-phone-landscape:before { + content: "\f1e2"; +} + +.ion-ios-phone-portrait:before { + content: "\f1e3"; +} + +.ion-ios-photos:before { + content: "\f482"; +} + +.ion-ios-pie:before { + content: "\f484"; +} + +.ion-ios-pin:before { + content: "\f1e5"; +} + +.ion-ios-pint:before { + content: "\f486"; +} + +.ion-ios-pizza:before { + content: "\f1e7"; +} + +.ion-ios-planet:before { + content: "\f1eb"; +} + +.ion-ios-play:before { + content: "\f488"; +} + +.ion-ios-play-circle:before { + content: "\f113"; +} + +.ion-ios-podium:before { + content: "\f1ed"; +} + +.ion-ios-power:before { + content: "\f1ef"; +} + +.ion-ios-pricetag:before { + content: "\f48d"; +} + +.ion-ios-pricetags:before { + content: "\f48f"; +} + +.ion-ios-print:before { + content: "\f1f1"; +} + +.ion-ios-pulse:before { + content: "\f493"; +} + +.ion-ios-qr-scanner:before { + content: "\f1f3"; +} + +.ion-ios-quote:before { + content: "\f1f5"; +} + +.ion-ios-radio:before { + content: "\f1f9"; +} + +.ion-ios-radio-button-off:before { + content: "\f1f6"; +} + +.ion-ios-radio-button-on:before { + content: "\f1f7"; +} + +.ion-ios-rainy:before { + content: "\f495"; +} + +.ion-ios-recording:before { + content: "\f497"; +} + +.ion-ios-redo:before { + content: "\f499"; +} + +.ion-ios-refresh:before { + content: "\f49c"; +} + +.ion-ios-refresh-circle:before { + content: "\f135"; +} + +.ion-ios-remove:before { + content: "\f1fc"; +} + +.ion-ios-remove-circle:before { + content: "\f1fb"; +} + +.ion-ios-remove-circle-outline:before { + content: "\f1fa"; +} + +.ion-ios-reorder:before { + content: "\f1fd"; +} + +.ion-ios-repeat:before { + content: "\f1fe"; +} + +.ion-ios-resize:before { + content: "\f1ff"; +} + +.ion-ios-restaurant:before { + content: "\f201"; +} + +.ion-ios-return-left:before { + content: "\f202"; +} + +.ion-ios-return-right:before { + content: "\f203"; +} + +.ion-ios-reverse-camera:before { + content: "\f49f"; +} + +.ion-ios-rewind:before { + content: "\f4a1"; +} + +.ion-ios-ribbon:before { + content: "\f205"; +} + +.ion-ios-rocket:before { + content: "\f14b"; +} + +.ion-ios-rose:before { + content: "\f4a3"; +} + +.ion-ios-sad:before { + content: "\f207"; +} + +.ion-ios-save:before { + content: "\f1a6"; +} + +.ion-ios-school:before { + content: "\f209"; +} + +.ion-ios-search:before { + content: "\f4a5"; +} + +.ion-ios-send:before { + content: "\f20c"; +} + +.ion-ios-settings:before { + content: "\f4a7"; +} + +.ion-ios-share:before { + content: "\f211"; +} + +.ion-ios-share-alt:before { + content: "\f20f"; +} + +.ion-ios-shirt:before { + content: "\f213"; +} + +.ion-ios-shuffle:before { + content: "\f4a9"; +} + +.ion-ios-skip-backward:before { + content: "\f215"; +} + +.ion-ios-skip-forward:before { + content: "\f217"; +} + +.ion-ios-snow:before { + content: "\f218"; +} + +.ion-ios-speedometer:before { + content: "\f4b0"; +} + +.ion-ios-square:before { + content: "\f21a"; +} + +.ion-ios-square-outline:before { + content: "\f15c"; +} + +.ion-ios-star:before { + content: "\f4b3"; +} + +.ion-ios-star-half:before { + content: "\f4b1"; +} + +.ion-ios-star-outline:before { + content: "\f4b2"; +} + +.ion-ios-stats:before { + content: "\f21c"; +} + +.ion-ios-stopwatch:before { + content: "\f4b5"; +} + +.ion-ios-subway:before { + content: "\f21e"; +} + +.ion-ios-sunny:before { + content: "\f4b7"; +} + +.ion-ios-swap:before { + content: "\f21f"; +} + +.ion-ios-switch:before { + content: "\f221"; +} + +.ion-ios-sync:before { + content: "\f222"; +} + +.ion-ios-tablet-landscape:before { + content: "\f223"; +} + +.ion-ios-tablet-portrait:before { + content: "\f24e"; +} + +.ion-ios-tennisball:before { + content: "\f4bb"; +} + +.ion-ios-text:before { + content: "\f250"; +} + +.ion-ios-thermometer:before { + content: "\f252"; +} + +.ion-ios-thumbs-down:before { + content: "\f254"; +} + +.ion-ios-thumbs-up:before { + content: "\f256"; +} + +.ion-ios-thunderstorm:before { + content: "\f4bd"; +} + +.ion-ios-time:before { + content: "\f4bf"; +} + +.ion-ios-timer:before { + content: "\f4c1"; +} + +.ion-ios-today:before { + content: "\f14f"; +} + +.ion-ios-train:before { + content: "\f258"; +} + +.ion-ios-transgender:before { + content: "\f259"; +} + +.ion-ios-trash:before { + content: "\f4c5"; +} + +.ion-ios-trending-down:before { + content: "\f25a"; +} + +.ion-ios-trending-up:before { + content: "\f25b"; +} + +.ion-ios-trophy:before { + content: "\f25d"; +} + +.ion-ios-tv:before { + content: "\f115"; +} + +.ion-ios-umbrella:before { + content: "\f25f"; +} + +.ion-ios-undo:before { + content: "\f4c7"; +} + +.ion-ios-unlock:before { + content: "\f261"; +} + +.ion-ios-videocam:before { + content: "\f4cd"; +} + +.ion-ios-volume-high:before { + content: "\f11c"; +} + +.ion-ios-volume-low:before { + content: "\f11e"; +} + +.ion-ios-volume-mute:before { + content: "\f263"; +} + +.ion-ios-volume-off:before { + content: "\f264"; +} + +.ion-ios-walk:before { + content: "\f266"; +} + +.ion-ios-wallet:before { + content: "\f18b"; +} + +.ion-ios-warning:before { + content: "\f268"; +} + +.ion-ios-watch:before { + content: "\f269"; +} + +.ion-ios-water:before { + content: "\f26b"; +} + +.ion-ios-wifi:before { + content: "\f26d"; +} + +.ion-ios-wine:before { + content: "\f26f"; +} + +.ion-ios-woman:before { + content: "\f271"; +} + +.ion-logo-android:before { + content: "\f225"; +} + +.ion-logo-angular:before { + content: "\f227"; +} + +.ion-logo-apple:before { + content: "\f229"; +} + +.ion-logo-bitbucket:before { + content: "\f193"; +} + +.ion-logo-bitcoin:before { + content: "\f22b"; +} + +.ion-logo-buffer:before { + content: "\f22d"; +} + +.ion-logo-chrome:before { + content: "\f22f"; +} + +.ion-logo-closed-captioning:before { + content: "\f105"; +} + +.ion-logo-codepen:before { + content: "\f230"; +} + +.ion-logo-css3:before { + content: "\f231"; +} + +.ion-logo-designernews:before { + content: "\f232"; +} + +.ion-logo-dribbble:before { + content: "\f233"; +} + +.ion-logo-dropbox:before { + content: "\f234"; +} + +.ion-logo-euro:before { + content: "\f235"; +} + +.ion-logo-facebook:before { + content: "\f236"; +} + +.ion-logo-flickr:before { + content: "\f107"; +} + +.ion-logo-foursquare:before { + content: "\f237"; +} + +.ion-logo-freebsd-devil:before { + content: "\f238"; +} + +.ion-logo-game-controller-a:before { + content: "\f13b"; +} + +.ion-logo-game-controller-b:before { + content: "\f181"; +} + +.ion-logo-github:before { + content: "\f239"; +} + +.ion-logo-google:before { + content: "\f23a"; +} + +.ion-logo-googleplus:before { + content: "\f23b"; +} + +.ion-logo-hackernews:before { + content: "\f23c"; +} + +.ion-logo-html5:before { + content: "\f23d"; +} + +.ion-logo-instagram:before { + content: "\f23e"; +} + +.ion-logo-ionic:before { + content: "\f150"; +} + +.ion-logo-ionitron:before { + content: "\f151"; +} + +.ion-logo-javascript:before { + content: "\f23f"; +} + +.ion-logo-linkedin:before { + content: "\f240"; +} + +.ion-logo-markdown:before { + content: "\f241"; +} + +.ion-logo-model-s:before { + content: "\f153"; +} + +.ion-logo-no-smoking:before { + content: "\f109"; +} + +.ion-logo-nodejs:before { + content: "\f242"; +} + +.ion-logo-npm:before { + content: "\f195"; +} + +.ion-logo-octocat:before { + content: "\f243"; +} + +.ion-logo-pinterest:before { + content: "\f244"; +} + +.ion-logo-playstation:before { + content: "\f245"; +} + +.ion-logo-polymer:before { + content: "\f15e"; +} + +.ion-logo-python:before { + content: "\f246"; +} + +.ion-logo-reddit:before { + content: "\f247"; +} + +.ion-logo-rss:before { + content: "\f248"; +} + +.ion-logo-sass:before { + content: "\f249"; +} + +.ion-logo-skype:before { + content: "\f24a"; +} + +.ion-logo-slack:before { + content: "\f10b"; +} + +.ion-logo-snapchat:before { + content: "\f24b"; +} + +.ion-logo-steam:before { + content: "\f24c"; +} + +.ion-logo-tumblr:before { + content: "\f24d"; +} + +.ion-logo-tux:before { + content: "\f2ae"; +} + +.ion-logo-twitch:before { + content: "\f2af"; +} + +.ion-logo-twitter:before { + content: "\f2b0"; +} + +.ion-logo-usd:before { + content: "\f2b1"; +} + +.ion-logo-vimeo:before { + content: "\f2c4"; +} + +.ion-logo-vk:before { + content: "\f10d"; +} + +.ion-logo-whatsapp:before { + content: "\f2c5"; +} + +.ion-logo-windows:before { + content: "\f32f"; +} + +.ion-logo-wordpress:before { + content: "\f330"; +} + +.ion-logo-xbox:before { + content: "\f34c"; +} + +.ion-logo-xing:before { + content: "\f10f"; +} + +.ion-logo-yahoo:before { + content: "\f34d"; +} + +.ion-logo-yen:before { + content: "\f34e"; +} + +.ion-logo-youtube:before { + content: "\f34f"; +} + +.ion-md-add:before { + content: "\f273"; +} + +.ion-md-add-circle:before { + content: "\f272"; +} + +.ion-md-add-circle-outline:before { + content: "\f158"; +} + +.ion-md-airplane:before { + content: "\f15a"; +} + +.ion-md-alarm:before { + content: "\f274"; +} + +.ion-md-albums:before { + content: "\f275"; +} + +.ion-md-alert:before { + content: "\f276"; +} + +.ion-md-american-football:before { + content: "\f277"; +} + +.ion-md-analytics:before { + content: "\f278"; +} + +.ion-md-aperture:before { + content: "\f279"; +} + +.ion-md-apps:before { + content: "\f27a"; +} + +.ion-md-appstore:before { + content: "\f27b"; +} + +.ion-md-archive:before { + content: "\f27c"; +} + +.ion-md-arrow-back:before { + content: "\f27d"; +} + +.ion-md-arrow-down:before { + content: "\f27e"; +} + +.ion-md-arrow-dropdown:before { + content: "\f280"; +} + +.ion-md-arrow-dropdown-circle:before { + content: "\f27f"; +} + +.ion-md-arrow-dropleft:before { + content: "\f282"; +} + +.ion-md-arrow-dropleft-circle:before { + content: "\f281"; +} + +.ion-md-arrow-dropright:before { + content: "\f284"; +} + +.ion-md-arrow-dropright-circle:before { + content: "\f283"; +} + +.ion-md-arrow-dropup:before { + content: "\f286"; +} + +.ion-md-arrow-dropup-circle:before { + content: "\f285"; +} + +.ion-md-arrow-forward:before { + content: "\f287"; +} + +.ion-md-arrow-round-back:before { + content: "\f288"; +} + +.ion-md-arrow-round-down:before { + content: "\f289"; +} + +.ion-md-arrow-round-forward:before { + content: "\f28a"; +} + +.ion-md-arrow-round-up:before { + content: "\f28b"; +} + +.ion-md-arrow-up:before { + content: "\f28c"; +} + +.ion-md-at:before { + content: "\f28d"; +} + +.ion-md-attach:before { + content: "\f28e"; +} + +.ion-md-backspace:before { + content: "\f28f"; +} + +.ion-md-barcode:before { + content: "\f290"; +} + +.ion-md-baseball:before { + content: "\f291"; +} + +.ion-md-basket:before { + content: "\f292"; +} + +.ion-md-basketball:before { + content: "\f293"; +} + +.ion-md-battery-charging:before { + content: "\f294"; +} + +.ion-md-battery-dead:before { + content: "\f295"; +} + +.ion-md-battery-full:before { + content: "\f296"; +} + +.ion-md-beaker:before { + content: "\f297"; +} + +.ion-md-bed:before { + content: "\f160"; +} + +.ion-md-beer:before { + content: "\f298"; +} + +.ion-md-bicycle:before { + content: "\f299"; +} + +.ion-md-bluetooth:before { + content: "\f29a"; +} + +.ion-md-boat:before { + content: "\f29b"; +} + +.ion-md-body:before { + content: "\f29c"; +} + +.ion-md-bonfire:before { + content: "\f29d"; +} + +.ion-md-book:before { + content: "\f29e"; +} + +.ion-md-bookmark:before { + content: "\f29f"; +} + +.ion-md-bookmarks:before { + content: "\f2a0"; +} + +.ion-md-bowtie:before { + content: "\f2a1"; +} + +.ion-md-briefcase:before { + content: "\f2a2"; +} + +.ion-md-browsers:before { + content: "\f2a3"; +} + +.ion-md-brush:before { + content: "\f2a4"; +} + +.ion-md-bug:before { + content: "\f2a5"; +} + +.ion-md-build:before { + content: "\f2a6"; +} + +.ion-md-bulb:before { + content: "\f2a7"; +} + +.ion-md-bus:before { + content: "\f2a8"; +} + +.ion-md-business:before { + content: "\f1a4"; +} + +.ion-md-cafe:before { + content: "\f2a9"; +} + +.ion-md-calculator:before { + content: "\f2aa"; +} + +.ion-md-calendar:before { + content: "\f2ab"; +} + +.ion-md-call:before { + content: "\f2ac"; +} + +.ion-md-camera:before { + content: "\f2ad"; +} + +.ion-md-car:before { + content: "\f2b2"; +} + +.ion-md-card:before { + content: "\f2b3"; +} + +.ion-md-cart:before { + content: "\f2b4"; +} + +.ion-md-cash:before { + content: "\f2b5"; +} + +.ion-md-cellular:before { + content: "\f164"; +} + +.ion-md-chatboxes:before { + content: "\f2b6"; +} + +.ion-md-chatbubbles:before { + content: "\f2b7"; +} + +.ion-md-checkbox:before { + content: "\f2b9"; +} + +.ion-md-checkbox-outline:before { + content: "\f2b8"; +} + +.ion-md-checkmark:before { + content: "\f2bc"; +} + +.ion-md-checkmark-circle:before { + content: "\f2bb"; +} + +.ion-md-checkmark-circle-outline:before { + content: "\f2ba"; +} + +.ion-md-clipboard:before { + content: "\f2bd"; +} + +.ion-md-clock:before { + content: "\f2be"; +} + +.ion-md-close:before { + content: "\f2c0"; +} + +.ion-md-close-circle:before { + content: "\f2bf"; +} + +.ion-md-close-circle-outline:before { + content: "\f166"; +} + +.ion-md-cloud:before { + content: "\f2c9"; +} + +.ion-md-cloud-circle:before { + content: "\f2c2"; +} + +.ion-md-cloud-done:before { + content: "\f2c3"; +} + +.ion-md-cloud-download:before { + content: "\f2c6"; +} + +.ion-md-cloud-outline:before { + content: "\f2c7"; +} + +.ion-md-cloud-upload:before { + content: "\f2c8"; +} + +.ion-md-cloudy:before { + content: "\f2cb"; +} + +.ion-md-cloudy-night:before { + content: "\f2ca"; +} + +.ion-md-code:before { + content: "\f2ce"; +} + +.ion-md-code-download:before { + content: "\f2cc"; +} + +.ion-md-code-working:before { + content: "\f2cd"; +} + +.ion-md-cog:before { + content: "\f2cf"; +} + +.ion-md-color-fill:before { + content: "\f2d0"; +} + +.ion-md-color-filter:before { + content: "\f2d1"; +} + +.ion-md-color-palette:before { + content: "\f2d2"; +} + +.ion-md-color-wand:before { + content: "\f2d3"; +} + +.ion-md-compass:before { + content: "\f2d4"; +} + +.ion-md-construct:before { + content: "\f2d5"; +} + +.ion-md-contact:before { + content: "\f2d6"; +} + +.ion-md-contacts:before { + content: "\f2d7"; +} + +.ion-md-contract:before { + content: "\f2d8"; +} + +.ion-md-contrast:before { + content: "\f2d9"; +} + +.ion-md-copy:before { + content: "\f2da"; +} + +.ion-md-create:before { + content: "\f2db"; +} + +.ion-md-crop:before { + content: "\f2dc"; +} + +.ion-md-cube:before { + content: "\f2dd"; +} + +.ion-md-cut:before { + content: "\f2de"; +} + +.ion-md-desktop:before { + content: "\f2df"; +} + +.ion-md-disc:before { + content: "\f2e0"; +} + +.ion-md-document:before { + content: "\f2e1"; +} + +.ion-md-done-all:before { + content: "\f2e2"; +} + +.ion-md-download:before { + content: "\f2e3"; +} + +.ion-md-easel:before { + content: "\f2e4"; +} + +.ion-md-egg:before { + content: "\f2e5"; +} + +.ion-md-exit:before { + content: "\f2e6"; +} + +.ion-md-expand:before { + content: "\f2e7"; +} + +.ion-md-eye:before { + content: "\f2e9"; +} + +.ion-md-eye-off:before { + content: "\f2e8"; +} + +.ion-md-fastforward:before { + content: "\f2ea"; +} + +.ion-md-female:before { + content: "\f2eb"; +} + +.ion-md-filing:before { + content: "\f2ec"; +} + +.ion-md-film:before { + content: "\f2ed"; +} + +.ion-md-finger-print:before { + content: "\f2ee"; +} + +.ion-md-fitness:before { + content: "\f1ac"; +} + +.ion-md-flag:before { + content: "\f2ef"; +} + +.ion-md-flame:before { + content: "\f2f0"; +} + +.ion-md-flash:before { + content: "\f2f1"; +} + +.ion-md-flash-off:before { + content: "\f169"; +} + +.ion-md-flashlight:before { + content: "\f16b"; +} + +.ion-md-flask:before { + content: "\f2f2"; +} + +.ion-md-flower:before { + content: "\f2f3"; +} + +.ion-md-folder:before { + content: "\f2f5"; +} + +.ion-md-folder-open:before { + content: "\f2f4"; +} + +.ion-md-football:before { + content: "\f2f6"; +} + +.ion-md-funnel:before { + content: "\f2f7"; +} + +.ion-md-gift:before { + content: "\f199"; +} + +.ion-md-git-branch:before { + content: "\f2fa"; +} + +.ion-md-git-commit:before { + content: "\f2fb"; +} + +.ion-md-git-compare:before { + content: "\f2fc"; +} + +.ion-md-git-merge:before { + content: "\f2fd"; +} + +.ion-md-git-network:before { + content: "\f2fe"; +} + +.ion-md-git-pull-request:before { + content: "\f2ff"; +} + +.ion-md-glasses:before { + content: "\f300"; +} + +.ion-md-globe:before { + content: "\f301"; +} + +.ion-md-grid:before { + content: "\f302"; +} + +.ion-md-hammer:before { + content: "\f303"; +} + +.ion-md-hand:before { + content: "\f304"; +} + +.ion-md-happy:before { + content: "\f305"; +} + +.ion-md-headset:before { + content: "\f306"; +} + +.ion-md-heart:before { + content: "\f308"; +} + +.ion-md-heart-dislike:before { + content: "\f167"; +} + +.ion-md-heart-empty:before { + content: "\f1a1"; +} + +.ion-md-heart-half:before { + content: "\f1a2"; +} + +.ion-md-help:before { + content: "\f30b"; +} + +.ion-md-help-buoy:before { + content: "\f309"; +} + +.ion-md-help-circle:before { + content: "\f30a"; +} + +.ion-md-help-circle-outline:before { + content: "\f16d"; +} + +.ion-md-home:before { + content: "\f30c"; +} + +.ion-md-hourglass:before { + content: "\f111"; +} + +.ion-md-ice-cream:before { + content: "\f30d"; +} + +.ion-md-image:before { + content: "\f30e"; +} + +.ion-md-images:before { + content: "\f30f"; +} + +.ion-md-infinite:before { + content: "\f310"; +} + +.ion-md-information:before { + content: "\f312"; +} + +.ion-md-information-circle:before { + content: "\f311"; +} + +.ion-md-information-circle-outline:before { + content: "\f16f"; +} + +.ion-md-jet:before { + content: "\f315"; +} + +.ion-md-journal:before { + content: "\f18d"; +} + +.ion-md-key:before { + content: "\f316"; +} + +.ion-md-keypad:before { + content: "\f317"; +} + +.ion-md-laptop:before { + content: "\f318"; +} + +.ion-md-leaf:before { + content: "\f319"; +} + +.ion-md-link:before { + content: "\f22e"; +} + +.ion-md-list:before { + content: "\f31b"; +} + +.ion-md-list-box:before { + content: "\f31a"; +} + +.ion-md-locate:before { + content: "\f31c"; +} + +.ion-md-lock:before { + content: "\f31d"; +} + +.ion-md-log-in:before { + content: "\f31e"; +} + +.ion-md-log-out:before { + content: "\f31f"; +} + +.ion-md-magnet:before { + content: "\f320"; +} + +.ion-md-mail:before { + content: "\f322"; +} + +.ion-md-mail-open:before { + content: "\f321"; +} + +.ion-md-mail-unread:before { + content: "\f172"; +} + +.ion-md-male:before { + content: "\f323"; +} + +.ion-md-man:before { + content: "\f324"; +} + +.ion-md-map:before { + content: "\f325"; +} + +.ion-md-medal:before { + content: "\f326"; +} + +.ion-md-medical:before { + content: "\f327"; +} + +.ion-md-medkit:before { + content: "\f328"; +} + +.ion-md-megaphone:before { + content: "\f329"; +} + +.ion-md-menu:before { + content: "\f32a"; +} + +.ion-md-mic:before { + content: "\f32c"; +} + +.ion-md-mic-off:before { + content: "\f32b"; +} + +.ion-md-microphone:before { + content: "\f32d"; +} + +.ion-md-moon:before { + content: "\f32e"; +} + +.ion-md-more:before { + content: "\f1c9"; +} + +.ion-md-move:before { + content: "\f331"; +} + +.ion-md-musical-note:before { + content: "\f332"; +} + +.ion-md-musical-notes:before { + content: "\f333"; +} + +.ion-md-navigate:before { + content: "\f334"; +} + +.ion-md-notifications:before { + content: "\f338"; +} + +.ion-md-notifications-off:before { + content: "\f336"; +} + +.ion-md-notifications-outline:before { + content: "\f337"; +} + +.ion-md-nuclear:before { + content: "\f339"; +} + +.ion-md-nutrition:before { + content: "\f33a"; +} + +.ion-md-open:before { + content: "\f33b"; +} + +.ion-md-options:before { + content: "\f33c"; +} + +.ion-md-outlet:before { + content: "\f33d"; +} + +.ion-md-paper:before { + content: "\f33f"; +} + +.ion-md-paper-plane:before { + content: "\f33e"; +} + +.ion-md-partly-sunny:before { + content: "\f340"; +} + +.ion-md-pause:before { + content: "\f341"; +} + +.ion-md-paw:before { + content: "\f342"; +} + +.ion-md-people:before { + content: "\f343"; +} + +.ion-md-person:before { + content: "\f345"; +} + +.ion-md-person-add:before { + content: "\f344"; +} + +.ion-md-phone-landscape:before { + content: "\f346"; +} + +.ion-md-phone-portrait:before { + content: "\f347"; +} + +.ion-md-photos:before { + content: "\f348"; +} + +.ion-md-pie:before { + content: "\f349"; +} + +.ion-md-pin:before { + content: "\f34a"; +} + +.ion-md-pint:before { + content: "\f34b"; +} + +.ion-md-pizza:before { + content: "\f354"; +} + +.ion-md-planet:before { + content: "\f356"; +} + +.ion-md-play:before { + content: "\f357"; +} + +.ion-md-play-circle:before { + content: "\f174"; +} + +.ion-md-podium:before { + content: "\f358"; +} + +.ion-md-power:before { + content: "\f359"; +} + +.ion-md-pricetag:before { + content: "\f35a"; +} + +.ion-md-pricetags:before { + content: "\f35b"; +} + +.ion-md-print:before { + content: "\f35c"; +} + +.ion-md-pulse:before { + content: "\f35d"; +} + +.ion-md-qr-scanner:before { + content: "\f35e"; +} + +.ion-md-quote:before { + content: "\f35f"; +} + +.ion-md-radio:before { + content: "\f362"; +} + +.ion-md-radio-button-off:before { + content: "\f360"; +} + +.ion-md-radio-button-on:before { + content: "\f361"; +} + +.ion-md-rainy:before { + content: "\f363"; +} + +.ion-md-recording:before { + content: "\f364"; +} + +.ion-md-redo:before { + content: "\f365"; +} + +.ion-md-refresh:before { + content: "\f366"; +} + +.ion-md-refresh-circle:before { + content: "\f228"; +} + +.ion-md-remove:before { + content: "\f368"; +} + +.ion-md-remove-circle:before { + content: "\f367"; +} + +.ion-md-remove-circle-outline:before { + content: "\f176"; +} + +.ion-md-reorder:before { + content: "\f369"; +} + +.ion-md-repeat:before { + content: "\f36a"; +} + +.ion-md-resize:before { + content: "\f36b"; +} + +.ion-md-restaurant:before { + content: "\f36c"; +} + +.ion-md-return-left:before { + content: "\f36d"; +} + +.ion-md-return-right:before { + content: "\f36e"; +} + +.ion-md-reverse-camera:before { + content: "\f36f"; +} + +.ion-md-rewind:before { + content: "\f370"; +} + +.ion-md-ribbon:before { + content: "\f371"; +} + +.ion-md-rocket:before { + content: "\f179"; +} + +.ion-md-rose:before { + content: "\f372"; +} + +.ion-md-sad:before { + content: "\f373"; +} + +.ion-md-save:before { + content: "\f1a9"; +} + +.ion-md-school:before { + content: "\f374"; +} + +.ion-md-search:before { + content: "\f375"; +} + +.ion-md-send:before { + content: "\f376"; +} + +.ion-md-settings:before { + content: "\f377"; +} + +.ion-md-share:before { + content: "\f379"; +} + +.ion-md-share-alt:before { + content: "\f378"; +} + +.ion-md-shirt:before { + content: "\f37a"; +} + +.ion-md-shuffle:before { + content: "\f37b"; +} + +.ion-md-skip-backward:before { + content: "\f37c"; +} + +.ion-md-skip-forward:before { + content: "\f37d"; +} + +.ion-md-snow:before { + content: "\f37e"; +} + +.ion-md-speedometer:before { + content: "\f37f"; +} + +.ion-md-square:before { + content: "\f381"; +} + +.ion-md-square-outline:before { + content: "\f380"; +} + +.ion-md-star:before { + content: "\f384"; +} + +.ion-md-star-half:before { + content: "\f382"; +} + +.ion-md-star-outline:before { + content: "\f383"; +} + +.ion-md-stats:before { + content: "\f385"; +} + +.ion-md-stopwatch:before { + content: "\f386"; +} + +.ion-md-subway:before { + content: "\f387"; +} + +.ion-md-sunny:before { + content: "\f388"; +} + +.ion-md-swap:before { + content: "\f389"; +} + +.ion-md-switch:before { + content: "\f38a"; +} + +.ion-md-sync:before { + content: "\f38b"; +} + +.ion-md-tablet-landscape:before { + content: "\f38c"; +} + +.ion-md-tablet-portrait:before { + content: "\f38d"; +} + +.ion-md-tennisball:before { + content: "\f38e"; +} + +.ion-md-text:before { + content: "\f38f"; +} + +.ion-md-thermometer:before { + content: "\f390"; +} + +.ion-md-thumbs-down:before { + content: "\f391"; +} + +.ion-md-thumbs-up:before { + content: "\f392"; +} + +.ion-md-thunderstorm:before { + content: "\f393"; +} + +.ion-md-time:before { + content: "\f394"; +} + +.ion-md-timer:before { + content: "\f395"; +} + +.ion-md-today:before { + content: "\f17d"; +} + +.ion-md-train:before { + content: "\f396"; +} + +.ion-md-transgender:before { + content: "\f397"; +} + +.ion-md-trash:before { + content: "\f398"; +} + +.ion-md-trending-down:before { + content: "\f399"; +} + +.ion-md-trending-up:before { + content: "\f39a"; +} + +.ion-md-trophy:before { + content: "\f39b"; +} + +.ion-md-tv:before { + content: "\f17f"; +} + +.ion-md-umbrella:before { + content: "\f39c"; +} + +.ion-md-undo:before { + content: "\f39d"; +} + +.ion-md-unlock:before { + content: "\f39e"; +} + +.ion-md-videocam:before { + content: "\f39f"; +} + +.ion-md-volume-high:before { + content: "\f123"; +} + +.ion-md-volume-low:before { + content: "\f131"; +} + +.ion-md-volume-mute:before { + content: "\f3a1"; +} + +.ion-md-volume-off:before { + content: "\f3a2"; +} + +.ion-md-walk:before { + content: "\f3a4"; +} + +.ion-md-wallet:before { + content: "\f18f"; +} + +.ion-md-warning:before { + content: "\f3a5"; +} + +.ion-md-watch:before { + content: "\f3a6"; +} + +.ion-md-water:before { + content: "\f3a7"; +} + +.ion-md-wifi:before { + content: "\f3a8"; +} + +.ion-md-wine:before { + content: "\f3a9"; +} + +.ion-md-woman:before { + content: "\f3aa"; +} diff --git a/assets/css/posts.css b/assets/css/posts.css new file mode 100644 index 0000000..e15baaf --- /dev/null +++ b/assets/css/posts.css @@ -0,0 +1,278 @@ +/* bootstrap overrides */ + +html { + min-height: 100%; + position: relative; + overflow-y: scroll; +} + +body { + background-color: #2c2c2c !important; + background-image: url("/images/overlay.png"), linear-gradient(0deg, rgb(44, 44, 44), rgba(44, 44, 44)); + color: #fff !important; + font-family: system-ui, sans-serif !important; +} + +a, a:hover { color: #46afff; } + +a.active { color: #f00 !important; } + +.paragraph__serif { + font-family: Georgia, Times, "Times New Roman", serif; + font-size: 20px; + line-height: 1.8; +} + +.paragraph__quote { + color: #aaa; + font-style: oblique; + padding: 1em; +} + +hr { + border-top: 1px solid rgb(40, 40, 40) !important; + border-top: 1px solid rgba(0, 0, 0, 0) !important; + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +h2 { font-size: 1.6rem; } + +.container { min-height: calc(100vh - 166px); } + +.blog-post { font-size: 0.95rem; } + +.blog-post-tags { display: none; } + +.blog-post-categories { display: none; } + +.text-secondary { + color: #ccc !important; + margin-bottom: 1em; +} + +/* buttons */ + +.badge-primary { + background-color: #d63d3d; +} + +.badge-primary[href]:focus, .badge-primary[href]:hover { + background-color: #D50000; +} + +/* paginator */ + +.page-item.active .page-link { + color: #000 !important; + border-color: #aaa !important; + background-color: #aaa !important; +} + +.page-link { + color: #000 !important; + background-color: #fff; +} + +/* image sizes */ + +.blog-post img { + max-width: 100%; +} + +.blog-header, .blog-post, .blog-pagination { + margin-bottom: 2rem; +} + +@media screen and (max-width: 768px) { + .blog-header, .blog-post, .blog-pagination { + max-width: 90vw; + } +} + +/* sidebar navigation */ + +#main { + transition: margin-left .25s; +} + +.sidenav { + height: 100%; + width: 0; + position: fixed; + z-index: 1; + top: 0; + right: 0; + background-color: #222; + overflow-x: hidden; + transition: 0.25s; +} + +.sidenav a { + padding: 12px 8px 12px 32px; + text-decoration: none; + text-align: left; + font-size: 16px; + font-weight: 400; + line-height: 1; + display: block; + color: #fff; +} + +.sidenav__container { margin-top: 4.2em; } + +.sidenav a.active { background-color: #333; } + +@media screen and (max-height: 450px) { + .sidenav {padding-top: 15px;} + .sidenav a {font-size: 18px;} +} + +/* navigation bar */ + +nav { + background-color: #232323; + margin-bottom: 2em; +} + +.navicon { + border-radius: 0; + border: none; + background-color: transparent; + position: absolute; + cursor: pointer; + top: 10px; + right: 10px; + font-size: 19px !important; + padding: 14px 20px !important; + line-height: 1; + -webkit-backface-visibility: hidden; + -moz-transform: translateZ(0) scale(1.0, 1.0); + -ms-transform: translateZ(0) scale(1.0, 1.0); + -webkit-transform: translateZ(0) scale(1.0, 1.0); + transform: translateZ(0) scale(1.0, 1.0); +} + +.topnav { + margin: 0 auto; + max-width: 1344px; + overflow: hidden; +} + +.topnav-left a { + color: #ffffff; + display: block; + float: left; + font-size: 18px; + font-weight: 400; + line-height: 1.4; + padding: 22px 16px; + text-align: center; + text-decoration: none; +} + +.topnav-left a:nth-child(1) { + display: none; +} + +.topnav-right a { + float: right; +} + +@media screen and (max-width: 768px) { + .fa { font-size: 1em; padding: 0.6em 0 1.6em 1em; background-color: #333; border-radius: 3px; width: 3em; height: 0.9em; } + .topnav a.active { background-color: transparent; color: #fff !important; } + .topnav a { font-size: 20px; padding: 24px 16px; } + .topnav a:not(:first-child) { display: none; } + .topnav-left a:nth-child(1) { display: block; line-height: 1; } + .topnav-right a { display: none; } + .topnav .navicon { display: block; } +} + +/* footer */ + +.footer-container { + color: #aaa; + margin: 0 auto; + max-width: 1392px; + padding: 2em 2em; +} + +.footer { + background-color: #232323; + background-color: rgba(34, 34, 34, 0.85); + font-size: 12px; + line-height: 1.5; + text-align: left; +} + +.footer a { + color: #aaa; +} + +.footer a:hover { + color: #f00; +} + +@media screen and (max-width: 768px) { + .footer { background-color: #2c2c2c; background-color: rgba(0, 0, 0, 0); padding-left: unset; text-align: center; } + nav { background-color: #2c2c2c; background-color: rgba(0, 0, 0, 0); } +} + +/* system-font.css v2.0.2 | CC0-1.0 License | github.com/jonathantneal/system-font-css */ + +@font-face { + font-family: system-ui; + font-style: normal; + font-weight: 300; + src: local(".SFNSText-Light"), local(".HelveticaNeueDeskInterface-Light"), local(".LucidaGrandeUI"), local("Segoe UI Light"), local("Ubuntu Light"), local("Roboto-Light"), local("DroidSans"), local("Tahoma"); +} + +@font-face { + font-family: system-ui; + font-style: italic; + font-weight: 300; + src: local(".SFNSText-LightItalic"), local(".HelveticaNeueDeskInterface-Italic"), local(".LucidaGrandeUI"), local("Segoe UI Light Italic"), local("Ubuntu Light Italic"), local("Roboto-LightItalic"), local("DroidSans"), local("Tahoma"); +} + +@font-face { + font-family: system-ui; + font-style: normal; + font-weight: 400; + src: local(".SFNSText-Regular"), local(".HelveticaNeueDeskInterface-Regular"), local(".LucidaGrandeUI"), local("Segoe UI"), local("Ubuntu"), local("Roboto-Regular"), local("DroidSans"), local("Tahoma"); +} + +@font-face { + font-family: system-ui; + font-style: italic; + font-weight: 400; + src: local(".SFNSText-Italic"), local(".HelveticaNeueDeskInterface-Italic"), local(".LucidaGrandeUI"), local("Segoe UI Italic"), local("Ubuntu Italic"), local("Roboto-Italic"), local("DroidSans"), local("Tahoma"); +} + +@font-face { + font-family: system-ui; + font-style: normal; + font-weight: 500; + src: local(".SFNSText-Medium"), local(".HelveticaNeueDeskInterface-MediumP4"), local(".LucidaGrandeUI"), local("Segoe UI Semibold"), local("Ubuntu Medium"), local("Roboto-Medium"), local("DroidSans-Bold"), local("Tahoma Bold"); +} + +@font-face { + font-family: system-ui; + font-style: italic; + font-weight: 500; + src: local(".SFNSText-MediumItalic"), local(".HelveticaNeueDeskInterface-MediumItalicP4"), local(".LucidaGrandeUI"), local("Segoe UI Semibold Italic"), local("Ubuntu Medium Italic"), local("Roboto-MediumItalic"), local("DroidSans-Bold"), local("Tahoma Bold"); +} + +@font-face { + font-family: system-ui; + font-style: normal; + font-weight: 700; + src: local(".SFNSText-Bold"), local(".HelveticaNeueDeskInterface-Bold"), local(".LucidaGrandeUI"), local("Segoe UI Bold"), local("Ubuntu Bold"), local("Roboto-Bold"), local("DroidSans-Bold"), local("Tahoma Bold"); +} + +@font-face { + font-family: system-ui; + font-style: italic; + font-weight: 700; + src: local(".SFNSText-BoldItalic"), local(".HelveticaNeueDeskInterface-BoldItalic"), local(".LucidaGrandeUI"), local("Segoe UI Bold Italic"), local("Ubuntu Bold Italic"), local("Roboto-BoldItalic"), local("DroidSans-Bold"), local("Tahoma Bold"); +} diff --git a/assets/js/BackgroundFade.js b/assets/js/BackgroundFade.js new file mode 100644 index 0000000..f47c51f --- /dev/null +++ b/assets/js/BackgroundFade.js @@ -0,0 +1,5 @@ +/* onload fade image function */ + +window.fadeImage = function fadeImage() { + document.getElementById("bg").style.opacity = "1"; +} diff --git a/assets/js/InlinePlayer.js b/assets/js/InlinePlayer.js new file mode 100644 index 0000000..7c1e138 --- /dev/null +++ b/assets/js/InlinePlayer.js @@ -0,0 +1,237 @@ +/* inlineplayer.js */ + +function InlinePlayer() { + var self = this; + var pl = this; + var sm = soundManager; // soundManager instance + var isIE = (navigator.userAgent.match(/msie/i)); + this.playableClass = 'inline-playable'; // CSS class for forcing a link to be playable (eg. doesn't have .MP3 in it) + this.excludeClass = 'inline-exclude'; // CSS class for ignoring MP3 links + this.links = []; + this.sounds = []; + this.soundsByURL = []; + this.indexByURL = []; + this.lastSound = null; + this.soundCount = 0; + + this.config = { + playNext: false, // stop after one sound, or play through list until end + autoPlay: false // start playing the first sound right away + } + + this.css = { + // CSS class names appended to link during various states + sDefault: 'sm2_link', // default state + sLoading: 'sm2_loading', + sPlaying: 'sm2_playing', + sPaused: 'sm2_paused' + } + + this.addEventHandler = (typeof window.addEventListener !== 'undefined' ? function(o, evtName, evtHandler) { + return o.addEventListener(evtName,evtHandler,false); + } : function(o, evtName, evtHandler) { + o.attachEvent('on'+evtName,evtHandler); + }); + + this.removeEventHandler = (typeof window.removeEventListener !== 'undefined' ? function(o, evtName, evtHandler) { + return o.removeEventListener(evtName,evtHandler,false); + } : function(o, evtName, evtHandler) { + return o.detachEvent('on'+evtName,evtHandler); + }); + + this.classContains = function(o,cStr) { + return (typeof(o.className)!='undefined'?o.className.match(new RegExp('(\\s|^)'+cStr+'(\\s|$)')):false); + } + + this.addClass = function(o,cStr) { + if (!o || !cStr || self.classContains(o,cStr)) return false; + o.className = (o.className?o.className+' ':'')+cStr; + } + + this.removeClass = function(o,cStr) { + if (!o || !cStr || !self.classContains(o,cStr)) return false; + o.className = o.className.replace(new RegExp('( '+cStr+')|('+cStr+')','g'),''); + } + + this.getSoundByURL = function(sURL) { + return (typeof self.soundsByURL[sURL] != 'undefined'?self.soundsByURL[sURL]:null); + } + + this.isChildOfNode = function(o,sNodeName) { + if (!o || !o.parentNode) { + return false; + } + sNodeName = sNodeName.toLowerCase(); + do { + o = o.parentNode; + } while (o && o.parentNode && o.nodeName.toLowerCase() != sNodeName); + return (o.nodeName.toLowerCase() == sNodeName?o:null); + } + + this.events = { + + // handlers for sound events as they're started/stopped/played + + play: function() { + pl.removeClass(this._data.oLink,this._data.className); + this._data.className = pl.css.sPlaying; + pl.addClass(this._data.oLink,this._data.className); + }, + + stop: function() { + pl.removeClass(this._data.oLink,this._data.className); + this._data.className = ''; + }, + + pause: function() { + pl.removeClass(this._data.oLink,this._data.className); + this._data.className = pl.css.sPaused; + pl.addClass(this._data.oLink,this._data.className); + }, + + resume: function() { + pl.removeClass(this._data.oLink,this._data.className); + this._data.className = pl.css.sPlaying; + pl.addClass(this._data.oLink,this._data.className); + }, + + finish: function() { + pl.removeClass(this._data.oLink,this._data.className); + this._data.className = ''; + if (pl.config.playNext) { + var nextLink = (pl.indexByURL[this._data.oLink.href]+1); + if (nextLink<pl.links.length) { + pl.handleClick({'target':pl.links[nextLink]}); + } + } + } + + } + + this.stopEvent = function(e) { + if (typeof e != 'undefined' && typeof e.preventDefault != 'undefined') { + e.preventDefault(); + } else if (typeof event != 'undefined' && typeof event.returnValue != 'undefined') { + event.returnValue = false; + } + return false; + } + + this.getTheDamnLink = (isIE)?function(e) { + // I really didn't want to have to do this. + return (e && e.target?e.target:window.event.srcElement); + }:function(e) { + return e.target; + } + + this.handleClick = function(e) { + // a sound link was clicked + if (typeof e.button != 'undefined' && e.button>1) { + // ignore right-click + return true; + } + var o = self.getTheDamnLink(e); + if (o.nodeName.toLowerCase() != 'a') { + o = self.isChildOfNode(o,'a'); + if (!o) return true; + } + var sURL = o.getAttribute('href'); + if (!o.href || (!sm.canPlayLink(o) && !self.classContains(o,self.playableClass)) || self.classContains(o,self.excludeClass)) { + return true; // pass-thru for non-MP3/non-links + } + var soundURL = (o.href); + var thisSound = self.getSoundByURL(soundURL); + if (thisSound) { + // already exists + if (thisSound == self.lastSound) { + // and was playing (or paused) + thisSound.togglePause(); + } else { + // different sound + sm._writeDebug('sound different than last sound: '+self.lastSound.id); + if (self.lastSound) { + self.stopSound(self.lastSound); + } + thisSound.togglePause(); // start playing current + } + } else { + // stop last sound + if (self.lastSound) { + self.stopSound(self.lastSound); + } + // create sound + thisSound = sm.createSound({ + id:'inlineMP3Sound'+(self.soundCount++), + url:soundURL, + onplay:self.events.play, + onstop:self.events.stop, + onpause:self.events.pause, + onresume:self.events.resume, + onfinish:self.events.finish, + type:(o.type||null) + }); + // tack on some custom data + thisSound._data = { + oLink: o, // DOM node for reference within SM2 object event handlers + className: self.css.sPlaying + }; + self.soundsByURL[soundURL] = thisSound; + self.sounds.push(thisSound); + thisSound.play(); + } + + self.lastSound = thisSound; // reference for next call + + if (typeof e != 'undefined' && typeof e.preventDefault != 'undefined') { + e.preventDefault(); + } else { + event.returnValue = false; + } + return false; + } + + this.stopSound = function(oSound) { + soundManager.stop(oSound.id); + soundManager.unload(oSound.id); + } + + this.init = function() { + sm._writeDebug('inlinePlayer.init()'); + var oLinks = document.getElementsByTagName('a'); + // grab all links, look for .mp3 + var foundItems = 0; + for (var i=0, j=oLinks.length; i<j; i++) { + if ((sm.canPlayLink(oLinks[i]) || self.classContains(oLinks[i],self.playableClass)) && !self.classContains(oLinks[i],self.excludeClass)) { + self.addClass(oLinks[i],self.css.sDefault); // add default CSS decoration + self.links[foundItems] = (oLinks[i]); + self.indexByURL[oLinks[i].href] = foundItems; // hack for indexing + foundItems++; + } + } + if (foundItems>0) { + self.addEventHandler(document,'click',self.handleClick); + if (self.config.autoPlay) { + self.handleClick({target:self.links[0],preventDefault:function(){}}); + } + } + sm._writeDebug('inlinePlayer.init(): Found '+foundItems+' relevant items.'); + } + + this.init(); + +} + +var inlinePlayer = null; + +soundManager.setup({ + debugMode: false, // disable or enable debug output + useHTML5Audio: true, // use HTML5 audio for MP3/MP4, if available + preferFlash: false, + useFlashBlock: false, +}); + +// ---- + +soundManager.onready(function() { + inlinePlayer = new InlinePlayer(); // soundManager.createSound() etc. may now be called +}); diff --git a/assets/js/Navigator.js b/assets/js/Navigator.js new file mode 100644 index 0000000..653b0ff --- /dev/null +++ b/assets/js/Navigator.js @@ -0,0 +1,11 @@ +/* main navigator functions */ + +window.openNav = function openNav() { + document.getElementById("side-navbar").style.width = "150px"; + document.getElementById("main").style.marginLeft = "-150px"; +} + +window.closeNav = function closeNav() { + document.getElementById("side-navbar").style.width = "0"; + document.getElementById("main").style.marginLeft = "0"; +} diff --git a/assets/js/Popup.js b/assets/js/Popup.js new file mode 100644 index 0000000..37c0c46 --- /dev/null +++ b/assets/js/Popup.js @@ -0,0 +1,19 @@ +/* popup window overlay functions */ + +window.showFaq = function showFaq() { + document.getElementById("overlay-faq").style.display = "block"; +} + +window.showDemo = function showDemo() { + document.getElementById("overlay-demo").style.display = "block"; +} + +window.showProjects = function showProjects() { + document.getElementById("overlay-projects").style.display = "block"; +} + +window.hide = function hide() { + document.getElementById("overlay-faq").style.display = "none"; + document.getElementById("overlay-demo").style.display = "none"; + document.getElementById("overlay-projects").style.display = "none"; +} diff --git a/assets/js/SoundManager2.js b/assets/js/SoundManager2.js new file mode 100644 index 0000000..d38b38d --- /dev/null +++ b/assets/js/SoundManager2.js @@ -0,0 +1,6294 @@ +/** @license
+ *
+ * SoundManager 2: JavaScript Sound for the Web
+ * ----------------------------------------------
+ * http://schillmania.com/projects/soundmanager2/
+ *
+ * Copyright (c) 2007, Scott Schiller. All rights reserved.
+ * Code provided under the BSD License:
+ * http://schillmania.com/projects/soundmanager2/license.txt
+ *
+ * V2.97a.20170601
+ */
+
+/**
+ * About this file
+ * -------------------------------------------------------------------------------------
+ * This is the fully-commented source version of the SoundManager 2 API,
+ * recommended for use during development and testing.
+ *
+ * See soundmanager2-nodebug-jsmin.js for an optimized build (~11KB with gzip.)
+ * http://schillmania.com/projects/soundmanager2/doc/getstarted/#basic-inclusion
+ * Alternately, serve this file with gzip for 75% compression savings (~30KB over HTTP.)
+ *
+ * You may notice <d> and </d> comments in this source; these are delimiters for
+ * debug blocks which are removed in the -nodebug builds, further optimizing code size.
+ *
+ * Also, as you may note: Whoa, reliable cross-platform/device audio support is hard! ;)
+ */
+
+(function SM2(window, _undefined) {
+
+/* global Audio, document, window, navigator, define, module, SM2_DEFER, opera, setTimeout, setInterval, clearTimeout, sm2Debugger */
+
+'use strict';
+
+if (!window || !window.document) {
+
+ // Don't cross the [environment] streams. SM2 expects to be running in a browser, not under node.js etc.
+ // Additionally, if a browser somehow manages to fail this test, as Egon said: "It would be bad."
+
+ throw new Error('SoundManager requires a browser with window and document objects.');
+
+}
+
+var soundManager = null;
+
+/**
+ * The SoundManager constructor.
+ *
+ * @constructor
+ * @param {string} smURL Optional: Path to SWF files
+ * @param {string} smID Optional: The ID to use for the SWF container element
+ * @this {SoundManager}
+ * @return {SoundManager} The new SoundManager instance
+ */
+
+function SoundManager(smURL, smID) {
+
+ /**
+ * soundManager configuration options list
+ * defines top-level configuration properties to be applied to the soundManager instance (eg. soundManager.flashVersion)
+ * to set these properties, use the setup() method - eg., soundManager.setup({url: '/swf/', flashVersion: 9})
+ */
+
+ this.setupOptions = {
+
+ url: (smURL || null), // path (directory) where SoundManager 2 SWFs exist, eg., /path/to/swfs/
+ flashVersion: 8, // flash build to use (8 or 9.) Some API features require 9.
+ debugMode: true, // enable debugging output (console.log() with HTML fallback)
+ debugFlash: false, // enable debugging output inside SWF, troubleshoot Flash/browser issues
+ useConsole: true, // use console.log() if available (otherwise, writes to #soundmanager-debug element)
+ consoleOnly: true, // if console is being used, do not create/write to #soundmanager-debug
+ waitForWindowLoad: false, // force SM2 to wait for window.onload() before trying to call soundManager.onload()
+ bgColor: '#ffffff', // SWF background color. N/A when wmode = 'transparent'
+ useHighPerformance: false, // position:fixed flash movie can help increase js/flash speed, minimize lag
+ flashPollingInterval: null, // msec affecting whileplaying/loading callback frequency. If null, default of 50 msec is used.
+ html5PollingInterval: null, // msec affecting whileplaying() for HTML5 audio, excluding mobile devices. If null, native HTML5 update events are used.
+ flashLoadTimeout: 1000, // msec to wait for flash movie to load before failing (0 = infinity)
+ wmode: null, // flash rendering mode - null, 'transparent', or 'opaque' (last two allow z-index to work)
+ allowScriptAccess: 'always', // for scripting the SWF (object/embed property), 'always' or 'sameDomain'
+ useFlashBlock: false, // *requires flashblock.css, see demos* - allow recovery from flash blockers. Wait indefinitely and apply timeout CSS to SWF, if applicable.
+ useHTML5Audio: true, // use HTML5 Audio() where API is supported (most Safari, Chrome versions), Firefox (MP3/MP4 support varies.) Ideally, transparent vs. Flash API where possible.
+ forceUseGlobalHTML5Audio: false, // if true, a single Audio() object is used for all sounds - and only one can play at a time.
+ ignoreMobileRestrictions: false, // if true, SM2 will not apply global HTML5 audio rules to mobile UAs. iOS > 7 and WebViews may allow multiple Audio() instances.
+ html5Test: /^(probably|maybe)$/i, // HTML5 Audio() format support test. Use /^probably$/i; if you want to be more conservative.
+ preferFlash: false, // overrides useHTML5audio, will use Flash for MP3/MP4/AAC if present. Potential option if HTML5 playback with these formats is quirky.
+ noSWFCache: false, // if true, appends ?ts={date} to break aggressive SWF caching.
+ idPrefix: 'sound' // if an id is not provided to createSound(), this prefix is used for generated IDs - 'sound0', 'sound1' etc.
+
+ };
+
+ this.defaultOptions = {
+
+ /**
+ * the default configuration for sound objects made with createSound() and related methods
+ * eg., volume, auto-load behaviour and so forth
+ */
+
+ autoLoad: false, // enable automatic loading (otherwise .load() will be called on demand with .play(), the latter being nicer on bandwidth - if you want to .load yourself, you also can)
+ autoPlay: false, // enable playing of file as soon as possible (much faster if "stream" is true)
+ from: null, // position to start playback within a sound (msec), default = beginning
+ loops: 1, // how many times to repeat the sound (position will wrap around to 0, setPosition() will break out of loop when >0)
+ onid3: null, // callback function for "ID3 data is added/available"
+ onerror: null, // callback function for "load failed" (or, playback/network/decode error under HTML5.)
+ onload: null, // callback function for "load finished"
+ whileloading: null, // callback function for "download progress update" (X of Y bytes received)
+ onplay: null, // callback for "play" start
+ onpause: null, // callback for "pause"
+ onresume: null, // callback for "resume" (pause toggle)
+ whileplaying: null, // callback during play (position update)
+ onposition: null, // object containing times and function callbacks for positions of interest
+ onstop: null, // callback for "user stop"
+ onfinish: null, // callback function for "sound finished playing"
+ multiShot: true, // let sounds "restart" or layer on top of each other when played multiple times, rather than one-shot/one at a time
+ multiShotEvents: false, // fire multiple sound events (currently onfinish() only) when multiShot is enabled
+ position: null, // offset (milliseconds) to seek to within loaded sound data.
+ pan: 0, // "pan" settings, left-to-right, -100 to 100
+ playbackRate: 1, // rate at which to play the sound (HTML5-only)
+ stream: true, // allows playing before entire file has loaded (recommended)
+ to: null, // position to end playback within a sound (msec), default = end
+ type: null, // MIME-like hint for file pattern / canPlay() tests, eg. audio/mp3
+ usePolicyFile: false, // enable crossdomain.xml request for audio on remote domains (for ID3/waveform access)
+ volume: 100 // self-explanatory. 0-100, the latter being the max.
+
+ };
+
+ this.flash9Options = {
+
+ /**
+ * flash 9-only options,
+ * merged into defaultOptions if flash 9 is being used
+ */
+
+ onfailure: null, // callback function for when playing fails (Flash 9, MovieStar + RTMP-only)
+ isMovieStar: null, // "MovieStar" MPEG4 audio mode. Null (default) = auto detect MP4, AAC etc. based on URL. true = force on, ignore URL
+ usePeakData: false, // enable left/right channel peak (level) data
+ useWaveformData: false, // enable sound spectrum (raw waveform data) - NOTE: May increase CPU load.
+ useEQData: false, // enable sound EQ (frequency spectrum data) - NOTE: May increase CPU load.
+ onbufferchange: null, // callback for "isBuffering" property change
+ ondataerror: null // callback for waveform/eq data access error (flash playing audio in other tabs/domains)
+
+ };
+
+ this.movieStarOptions = {
+
+ /**
+ * flash 9.0r115+ MPEG4 audio options,
+ * merged into defaultOptions if flash 9+movieStar mode is enabled
+ */
+
+ bufferTime: 3, // seconds of data to buffer before playback begins (null = flash default of 0.1 seconds - if AAC playback is gappy, try increasing.)
+ serverURL: null, // rtmp: FMS or FMIS server to connect to, required when requesting media via RTMP or one of its variants
+ onconnect: null, // rtmp: callback for connection to flash media server
+ duration: null // rtmp: song duration (msec)
+
+ };
+
+ this.audioFormats = {
+
+ /**
+ * determines HTML5 support + flash requirements.
+ * if no support (via flash and/or HTML5) for a "required" format, SM2 will fail to start.
+ * flash fallback is used for MP3 or MP4 if HTML5 can't play it (or if preferFlash = true)
+ */
+
+ mp3: {
+ type: ['audio/mpeg; codecs="mp3"', 'audio/mpeg', 'audio/mp3', 'audio/MPA', 'audio/mpa-robust'],
+ required: true
+ },
+
+ mp4: {
+ related: ['aac', 'm4a', 'm4b'], // additional formats under the MP4 container
+ type: ['audio/mp4; codecs="mp4a.40.2"', 'audio/aac', 'audio/x-m4a', 'audio/MP4A-LATM', 'audio/mpeg4-generic'],
+ required: false
+ },
+
+ ogg: {
+ type: ['audio/ogg; codecs=vorbis'],
+ required: false
+ },
+
+ opus: {
+ type: ['audio/ogg; codecs=opus', 'audio/opus'],
+ required: false
+ },
+
+ wav: {
+ type: ['audio/wav; codecs="1"', 'audio/wav', 'audio/wave', 'audio/x-wav'],
+ required: false
+ },
+
+ flac: {
+ type: ['audio/flac'],
+ required: false
+ }
+
+ };
+
+ // HTML attributes (id + class names) for the SWF container
+
+ this.movieID = 'sm2-container';
+ this.id = (smID || 'sm2movie');
+
+ this.debugID = 'soundmanager-debug';
+ this.debugURLParam = /([#?&])debug=1/i;
+
+ // dynamic attributes
+
+ this.versionNumber = 'V2.97a.20170601';
+ this.version = null;
+ this.movieURL = null;
+ this.altURL = null;
+ this.swfLoaded = false;
+ this.enabled = false;
+ this.oMC = null;
+ this.sounds = {};
+ this.soundIDs = [];
+ this.muted = false;
+ this.didFlashBlock = false;
+ this.filePattern = null;
+
+ this.filePatterns = {
+ flash8: /\.mp3(\?.*)?$/i,
+ flash9: /\.mp3(\?.*)?$/i
+ };
+
+ // support indicators, set at init
+
+ this.features = {
+ buffering: false,
+ peakData: false,
+ waveformData: false,
+ eqData: false,
+ movieStar: false
+ };
+
+ // flash sandbox info, used primarily in troubleshooting
+
+ this.sandbox = {
+ // <d>
+ type: null,
+ types: {
+ remote: 'remote (domain-based) rules',
+ localWithFile: 'local with file access (no internet access)',
+ localWithNetwork: 'local with network (internet access only, no local access)',
+ localTrusted: 'local, trusted (local+internet access)'
+ },
+ description: null,
+ noRemote: null,
+ noLocal: null
+ // </d>
+ };
+
+ /**
+ * format support (html5/flash)
+ * stores canPlayType() results based on audioFormats.
+ * eg. { mp3: boolean, mp4: boolean }
+ * treat as read-only.
+ */
+
+ this.html5 = {
+ usingFlash: null // set if/when flash fallback is needed
+ };
+
+ // file type support hash
+ this.flash = {};
+
+ // determined at init time
+ this.html5Only = false;
+
+ // used for special cases (eg. iPad/iPhone/palm OS?)
+ this.ignoreFlash = false;
+
+ /**
+ * a few private internals (OK, a lot. :D)
+ */
+
+ var SMSound,
+ sm2 = this, globalHTML5Audio = null, flash = null, sm = 'soundManager', smc = sm + ': ', h5 = 'HTML5::', id, ua = navigator.userAgent, wl = window.location.href.toString(), doc = document, doNothing, setProperties, init, fV, on_queue = [], debugOpen = true, debugTS, didAppend = false, appendSuccess = false, didInit = false, disabled = false, windowLoaded = false, _wDS, wdCount = 0, initComplete, mixin, assign, extraOptions, addOnEvent, processOnEvents, initUserOnload, delayWaitForEI, waitForEI, rebootIntoHTML5, setVersionInfo, handleFocus, strings, initMovie, domContentLoaded, winOnLoad, didDCLoaded, getDocument, createMovie, catchError, setPolling, initDebug, debugLevels = ['log', 'info', 'warn', 'error'], defaultFlashVersion = 8, disableObject, failSafely, normalizeMovieURL, oRemoved = null, oRemovedHTML = null, str, flashBlockHandler, getSWFCSS, swfCSS, toggleDebug, loopFix, policyFix, complain, idCheck, waitingForEI = false, initPending = false, startTimer, stopTimer, timerExecute, h5TimerCount = 0, h5IntervalTimer = null, parseURL, messages = [],
+ canIgnoreFlash, needsFlash = null, featureCheck, html5OK, html5CanPlay, html5ErrorCodes, html5Ext, html5Unload, domContentLoadedIE, testHTML5, event, slice = Array.prototype.slice, useGlobalHTML5Audio = false, lastGlobalHTML5URL, hasFlash, detectFlash, badSafariFix, html5_events, showSupport, flushMessages, wrapCallback, idCounter = 0, didSetup, msecScale = 1000,
+ is_iDevice = ua.match(/(ipad|iphone|ipod)/i), isAndroid = ua.match(/android/i), isIE = ua.match(/msie|trident/i),
+ isWebkit = ua.match(/webkit/i),
+ isSafari = (ua.match(/safari/i) && !ua.match(/chrome/i)),
+ isOpera = (ua.match(/opera/i)),
+ mobileHTML5 = (ua.match(/(mobile|pre\/|xoom)/i) || is_iDevice || isAndroid),
+ isBadSafari = (!wl.match(/usehtml5audio/i) && !wl.match(/sm2-ignorebadua/i) && isSafari && !ua.match(/silk/i) && ua.match(/OS\sX\s10_6_([3-7])/i)), // Safari 4 and 5 (excluding Kindle Fire, "Silk") occasionally fail to load/play HTML5 audio on Snow Leopard 10.6.3 through 10.6.7 due to bug(s) in QuickTime X and/or other underlying frameworks. :/ Confirmed bug. https://bugs.webkit.org/show_bug.cgi?id=32159
+ hasConsole = (window.console !== _undefined && console.log !== _undefined),
+ isFocused = (doc.hasFocus !== _undefined ? doc.hasFocus() : null),
+ tryInitOnFocus = (isSafari && (doc.hasFocus === _undefined || !doc.hasFocus())),
+ okToDisable = !tryInitOnFocus,
+ flashMIME = /(mp3|mp4|mpa|m4a|m4b)/i,
+ emptyURL = 'about:blank', // safe URL to unload, or load nothing from (flash 8 + most HTML5 UAs)
+ emptyWAV = 'data:audio/wave;base64,/UklGRiYAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQIAAAD//w==', // tiny WAV for HTML5 unloading
+ overHTTP = (doc.location ? doc.location.protocol.match(/http/i) : null),
+ http = (!overHTTP ? '//' : ''),
+ // mp3, mp4, aac etc.
+ netStreamMimeTypes = /^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4|m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i,
+ // Flash v9.0r115+ "moviestar" formats
+ netStreamTypes = ['mpeg4', 'aac', 'flv', 'mov', 'mp4', 'm4v', 'f4v', 'm4a', 'm4b', 'mp4v', '3gp', '3g2'],
+ netStreamPattern = new RegExp('\\.(' + netStreamTypes.join('|') + ')(\\?.*)?$', 'i');
+
+ this.mimePattern = /^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i; // default mp3 set
+
+ // use altURL if not "online"
+ this.useAltURL = !overHTTP;
+
+ swfCSS = {
+ swfBox: 'sm2-object-box',
+ swfDefault: 'movieContainer',
+ swfError: 'swf_error', // SWF loaded, but SM2 couldn't start (other error)
+ swfTimedout: 'swf_timedout',
+ swfLoaded: 'swf_loaded',
+ swfUnblocked: 'swf_unblocked', // or loaded OK
+ sm2Debug: 'sm2_debug',
+ highPerf: 'high_performance',
+ flashDebug: 'flash_debug'
+ };
+
+ /**
+ * HTML5 error codes, per W3C
+ * Error code 1, MEDIA_ERR_ABORTED: Client aborted download at user's request.
+ * Error code 2, MEDIA_ERR_NETWORK: A network error of some description caused the user agent to stop fetching the media resource, after the resource was established to be usable.
+ * Error code 3, MEDIA_ERR_DECODE: An error of some description occurred while decoding the media resource, after the resource was established to be usable.
+ * Error code 4, MEDIA_ERR_SRC_NOT_SUPPORTED: Media (audio file) not supported ("not usable.")
+ * Reference: https://html.spec.whatwg.org/multipage/embedded-content.html#error-codes
+ */
+ html5ErrorCodes = [
+ null,
+ 'MEDIA_ERR_ABORTED',
+ 'MEDIA_ERR_NETWORK',
+ 'MEDIA_ERR_DECODE',
+ 'MEDIA_ERR_SRC_NOT_SUPPORTED'
+ ];
+
+ /**
+ * basic HTML5 Audio() support test
+ * try...catch because of IE 9 "not implemented" nonsense
+ * https://github.com/Modernizr/Modernizr/issues/224
+ */
+
+ this.hasHTML5 = (function() {
+ try {
+ // new Audio(null) for stupid Opera 9.64 case, which throws not_enough_arguments exception otherwise.
+ return (Audio !== _undefined && (isOpera && opera !== _undefined && opera.version() < 10 ? new Audio(null) : new Audio()).canPlayType !== _undefined);
+ } catch(e) {
+ return false;
+ }
+ }());
+
+ /**
+ * Public SoundManager API
+ * -----------------------
+ */
+
+ /**
+ * Configures top-level soundManager properties.
+ *
+ * @param {object} options Option parameters, eg. { flashVersion: 9, url: '/path/to/swfs/' }
+ * onready and ontimeout are also accepted parameters. call soundManager.setup() to see the full list.
+ */
+
+ this.setup = function(options) {
+
+ var noURL = (!sm2.url);
+
+ // warn if flash options have already been applied
+
+ if (options !== _undefined && didInit && needsFlash && sm2.ok() && (options.flashVersion !== _undefined || options.url !== _undefined || options.html5Test !== _undefined)) {
+ complain(str('setupLate'));
+ }
+
+ // TODO: defer: true?
+
+ assign(options);
+
+ if (!useGlobalHTML5Audio) {
+
+ if (mobileHTML5) {
+
+ // force the singleton HTML5 pattern on mobile, by default.
+ if (!sm2.setupOptions.ignoreMobileRestrictions || sm2.setupOptions.forceUseGlobalHTML5Audio) {
+ messages.push(strings.globalHTML5);
+ useGlobalHTML5Audio = true;
+ }
+
+ } else if (sm2.setupOptions.forceUseGlobalHTML5Audio) {
+
+ // only apply singleton HTML5 on desktop if forced.
+ messages.push(strings.globalHTML5);
+ useGlobalHTML5Audio = true;
+
+ }
+
+ }
+
+ if (!didSetup && mobileHTML5) {
+
+ if (sm2.setupOptions.ignoreMobileRestrictions) {
+
+ messages.push(strings.ignoreMobile);
+
+ } else {
+
+ // prefer HTML5 for mobile + tablet-like devices, probably more reliable vs. flash at this point.
+
+ // <d>
+ if (!sm2.setupOptions.useHTML5Audio || sm2.setupOptions.preferFlash) {
+ // notify that defaults are being changed.
+ sm2._wD(strings.mobileUA);
+ }
+ // </d>
+
+ sm2.setupOptions.useHTML5Audio = true;
+ sm2.setupOptions.preferFlash = false;
+
+ if (is_iDevice) {
+
+ // no flash here.
+ sm2.ignoreFlash = true;
+
+ } else if ((isAndroid && !ua.match(/android\s2\.3/i)) || !isAndroid) {
+
+ /**
+ * Android devices tend to work better with a single audio instance, specifically for chained playback of sounds in sequence.
+ * Common use case: exiting sound onfinish() -> createSound() -> play()
+ * Presuming similar restrictions for other mobile, non-Android, non-iOS devices.
+ */
+
+ // <d>
+ sm2._wD(strings.globalHTML5);
+ // </d>
+
+ useGlobalHTML5Audio = true;
+
+ }
+
+ }
+
+ }
+
+ // special case 1: "Late setup". SM2 loaded normally, but user didn't assign flash URL eg., setup({url:...}) before SM2 init. Treat as delayed init.
+
+ if (options) {
+
+ if (noURL && didDCLoaded && options.url !== _undefined) {
+ sm2.beginDelayedInit();
+ }
+
+ // special case 2: If lazy-loading SM2 (DOMContentLoaded has already happened) and user calls setup() with url: parameter, try to init ASAP.
+
+ if (!didDCLoaded && options.url !== _undefined && doc.readyState === 'complete') {
+ setTimeout(domContentLoaded, 1);
+ }
+
+ }
+
+ didSetup = true;
+
+ return sm2;
+
+ };
+
+ this.ok = function() {
+
+ return (needsFlash ? (didInit && !disabled) : (sm2.useHTML5Audio && sm2.hasHTML5));
+
+ };
+
+ this.supported = this.ok; // legacy
+
+ this.getMovie = function(movie_id) {
+
+ // safety net: some old browsers differ on SWF references, possibly related to ExternalInterface / flash version
+ return id(movie_id) || doc[movie_id] || window[movie_id];
+
+ };
+
+ /**
+ * Creates a SMSound sound object instance. Can also be overloaded, e.g., createSound('mySound', '/some.mp3');
+ *
+ * @param {object} oOptions Sound options (at minimum, url parameter is required.)
+ * @return {object} SMSound The new SMSound object.
+ */
+
+ this.createSound = function(oOptions, _url) {
+
+ var cs, cs_string, options, oSound = null;
+
+ // <d>
+ cs = sm + '.createSound(): ';
+ cs_string = cs + str(!didInit ? 'notReady' : 'notOK');
+ // </d>
+
+ if (!didInit || !sm2.ok()) {
+ complain(cs_string);
+ return false;
+ }
+
+ if (_url !== _undefined) {
+ // function overloading in JS! :) ... assume simple createSound(id, url) use case.
+ oOptions = {
+ id: oOptions,
+ url: _url
+ };
+ }
+
+ // inherit from defaultOptions
+ options = mixin(oOptions);
+
+ options.url = parseURL(options.url);
+
+ // generate an id, if needed.
+ if (options.id === _undefined) {
+ options.id = sm2.setupOptions.idPrefix + (idCounter++);
+ }
+
+ // <d>
+ if (options.id.toString().charAt(0).match(/^[0-9]$/)) {
+ sm2._wD(cs + str('badID', options.id), 2);
+ }
+
+ sm2._wD(cs + options.id + (options.url ? ' (' + options.url + ')' : ''), 1);
+ // </d>
+
+ if (idCheck(options.id, true)) {
+ sm2._wD(cs + options.id + ' exists', 1);
+ return sm2.sounds[options.id];
+ }
+
+ function make() {
+
+ options = loopFix(options);
+ sm2.sounds[options.id] = new SMSound(options);
+ sm2.soundIDs.push(options.id);
+ return sm2.sounds[options.id];
+
+ }
+
+ if (html5OK(options)) {
+
+ oSound = make();
+ // <d>
+ if (!sm2.html5Only) {
+ sm2._wD(options.id + ': Using HTML5');
+ }
+ // </d>
+ oSound._setup_html5(options);
+
+ } else {
+
+ if (sm2.html5Only) {
+ sm2._wD(options.id + ': No HTML5 support for this sound, and no Flash. Exiting.');
+ return make();
+ }
+
+ // TODO: Move HTML5/flash checks into generic URL parsing/handling function.
+
+ if (sm2.html5.usingFlash && options.url && options.url.match(/data:/i)) {
+ // data: URIs not supported by Flash, either.
+ sm2._wD(options.id + ': data: URIs not supported via Flash. Exiting.');
+ return make();
+ }
+
+ if (fV > 8) {
+ if (options.isMovieStar === null) {
+ // attempt to detect MPEG-4 formats
+ options.isMovieStar = !!(options.serverURL || (options.type ? options.type.match(netStreamMimeTypes) : false) || (options.url && options.url.match(netStreamPattern)));
+ }
+ // <d>
+ if (options.isMovieStar) {
+ sm2._wD(cs + 'using MovieStar handling');
+ if (options.loops > 1) {
+ _wDS('noNSLoop');
+ }
+ }
+ // </d>
+ }
+
+ options = policyFix(options, cs);
+ oSound = make();
+
+ if (fV === 8) {
+ flash._createSound(options.id, options.loops || 1, options.usePolicyFile);
+ } else {
+ flash._createSound(options.id, options.url, options.usePeakData, options.useWaveformData, options.useEQData, options.isMovieStar, (options.isMovieStar ? options.bufferTime : false), options.loops || 1, options.serverURL, options.duration || null, options.autoPlay, true, options.autoLoad, options.usePolicyFile);
+ if (!options.serverURL) {
+ // We are connected immediately
+ oSound.connected = true;
+ if (options.onconnect) {
+ options.onconnect.apply(oSound);
+ }
+ }
+ }
+
+ if (!options.serverURL && (options.autoLoad || options.autoPlay)) {
+ // call load for non-rtmp streams
+ oSound.load(options);
+ }
+
+ }
+
+ // rtmp will play in onconnect
+ if (!options.serverURL && options.autoPlay) {
+ oSound.play();
+ }
+
+ return oSound;
+
+ };
+
+ /**
+ * Destroys a SMSound sound object instance.
+ *
+ * @param {string} sID The ID of the sound to destroy
+ */
+
+ this.destroySound = function(sID, _bFromSound) {
+
+ // explicitly destroy a sound before normal page unload, etc.
+
+ if (!idCheck(sID)) return false;
+
+ var oS = sm2.sounds[sID], i;
+
+ oS.stop();
+
+ // Disable all callbacks after stop(), when the sound is being destroyed
+ oS._iO = {};
+
+ oS.unload();
+
+ for (i = 0; i < sm2.soundIDs.length; i++) {
+ if (sm2.soundIDs[i] === sID) {
+ sm2.soundIDs.splice(i, 1);
+ break;
+ }
+ }
+
+ if (!_bFromSound) {
+ // ignore if being called from SMSound instance
+ oS.destruct(true);
+ }
+
+ oS = null;
+ delete sm2.sounds[sID];
+
+ return true;
+
+ };
+
+ /**
+ * Calls the load() method of a SMSound object by ID.
+ *
+ * @param {string} sID The ID of the sound
+ * @param {object} oOptions Optional: Sound options
+ */
+
+ this.load = function(sID, oOptions) {
+
+ if (!idCheck(sID)) return false;
+
+ return sm2.sounds[sID].load(oOptions);
+
+ };
+
+ /**
+ * Calls the unload() method of a SMSound object by ID.
+ *
+ * @param {string} sID The ID of the sound
+ */
+
+ this.unload = function(sID) {
+
+ if (!idCheck(sID)) return false;
+
+ return sm2.sounds[sID].unload();
+
+ };
+
+ /**
+ * Calls the onPosition() method of a SMSound object by ID.
+ *
+ * @param {string} sID The ID of the sound
+ * @param {number} nPosition The position to watch for
+ * @param {function} oMethod The relevant callback to fire
+ * @param {object} oScope Optional: The scope to apply the callback to
+ * @return {SMSound} The SMSound object
+ */
+
+ this.onPosition = function(sID, nPosition, oMethod, oScope) {
+
+ if (!idCheck(sID)) return false;
+
+ return sm2.sounds[sID].onposition(nPosition, oMethod, oScope);
+
+ };
+
+ // legacy/backwards-compability: lower-case method name
+ this.onposition = this.onPosition;
+
+ /**
+ * Calls the clearOnPosition() method of a SMSound object by ID.
+ *
+ * @param {string} sID The ID of the sound
+ * @param {number} nPosition The position to watch for
+ * @param {function} oMethod Optional: The relevant callback to fire
+ * @return {SMSound} The SMSound object
+ */
+
+ this.clearOnPosition = function(sID, nPosition, oMethod) {
+
+ if (!idCheck(sID)) return false;
+
+ return sm2.sounds[sID].clearOnPosition(nPosition, oMethod);
+
+ };
+
+ /**
+ * Calls the play() method of a SMSound object by ID.
+ *
+ * @param {string} sID The ID of the sound
+ * @param {object} oOptions Optional: Sound options
+ * @return {SMSound} The SMSound object
+ */
+
+ this.play = function(sID, oOptions) {
+
+ var result = null,
+ // legacy function-overloading use case: play('mySound', '/path/to/some.mp3');
+ overloaded = (oOptions && !(oOptions instanceof Object));
+
+ if (!didInit || !sm2.ok()) {
+ complain(sm + '.play(): ' + str(!didInit ? 'notReady' : 'notOK'));
+ return false;
+ }
+
+ if (!idCheck(sID, overloaded)) {
+
+ // no sound found for the given ID. Bail.
+ if (!overloaded) return false;
+
+ if (overloaded) {
+ oOptions = {
+ url: oOptions
+ };
+ }
+
+ if (oOptions && oOptions.url) {
+ // overloading use case, create+play: .play('someID', {url:'/path/to.mp3'});
+ sm2._wD(sm + '.play(): Attempting to create "' + sID + '"', 1);
+ oOptions.id = sID;
+ result = sm2.createSound(oOptions).play();
+ }
+
+ } else if (overloaded) {
+
+ // existing sound object case
+ oOptions = {
+ url: oOptions
+ };
+
+ }
+
+ if (result === null) {
+ // default case
+ result = sm2.sounds[sID].play(oOptions);
+ }
+
+ return result;
+
+ };
+
+ // just for convenience
+ this.start = this.play;
+
+ /**
+ * Calls the setPlaybackRate() method of a SMSound object by ID.
+ *
+ * @param {string} sID The ID of the sound
+ * @return {SMSound} The SMSound object
+ */
+
+ this.setPlaybackRate = function(sID, rate, allowOverride) {
+
+ if (!idCheck(sID)) return false;
+
+ return sm2.sounds[sID].setPlaybackRate(rate, allowOverride);
+
+ };
+
+ /**
+ * Calls the setPosition() method of a SMSound object by ID.
+ *
+ * @param {string} sID The ID of the sound
+ * @param {number} nMsecOffset Position (milliseconds)
+ * @return {SMSound} The SMSound object
+ */
+
+ this.setPosition = function(sID, nMsecOffset) {
+
+ if (!idCheck(sID)) return false;
+
+ return sm2.sounds[sID].setPosition(nMsecOffset);
+
+ };
+
+ /**
+ * Calls the stop() method of a SMSound object by ID.
+ *
+ * @param {string} sID The ID of the sound
+ * @return {SMSound} The SMSound object
+ */
+
+ this.stop = function(sID) {
+
+ if (!idCheck(sID)) return false;
+
+ sm2._wD(sm + '.stop(' + sID + ')', 1);
+
+ return sm2.sounds[sID].stop();
+
+ };
+
+ /**
+ * Stops all currently-playing sounds.
+ */
+
+ this.stopAll = function() {
+
+ var oSound;
+ sm2._wD(sm + '.stopAll()', 1);
+
+ for (oSound in sm2.sounds) {
+ if (sm2.sounds.hasOwnProperty(oSound)) {
+ // apply only to sound objects
+ sm2.sounds[oSound].stop();
+ }
+ }
+
+ };
+
+ /**
+ * Calls the pause() method of a SMSound object by ID.
+ *
+ * @param {string} sID The ID of the sound
+ * @return {SMSound} The SMSound object
+ */
+
+ this.pause = function(sID) {
+
+ if (!idCheck(sID)) return false;
+
+ return sm2.sounds[sID].pause();
+
+ };
+
+ /**
+ * Pauses all currently-playing sounds.
+ */
+
+ this.pauseAll = function() {
+
+ var i;
+ for (i = sm2.soundIDs.length - 1; i >= 0; i--) {
+ sm2.sounds[sm2.soundIDs[i]].pause();
+ }
+
+ };
+
+ /**
+ * Calls the resume() method of a SMSound object by ID.
+ *
+ * @param {string} sID The ID of the sound
+ * @return {SMSound} The SMSound object
+ */
+
+ this.resume = function(sID) {
+
+ if (!idCheck(sID)) return false;
+
+ return sm2.sounds[sID].resume();
+
+ };
+
+ /**
+ * Resumes all currently-paused sounds.
+ */
+
+ this.resumeAll = function() {
+
+ var i;
+ for (i = sm2.soundIDs.length - 1; i >= 0; i--) {
+ sm2.sounds[sm2.soundIDs[i]].resume();
+ }
+
+ };
+
+ /**
+ * Calls the togglePause() method of a SMSound object by ID.
+ *
+ * @param {string} sID The ID of the sound
+ * @return {SMSound} The SMSound object
+ */
+
+ this.togglePause = function(sID) {
+
+ if (!idCheck(sID)) return false;
+
+ return sm2.sounds[sID].togglePause();
+
+ };
+
+ /**
+ * Calls the setPan() method of a SMSound object by ID.
+ *
+ * @param {string} sID The ID of the sound
+ * @param {number} nPan The pan value (-100 to 100)
+ * @return {SMSound} The SMSound object
+ */
+
+ this.setPan = function(sID, nPan) {
+
+ if (!idCheck(sID)) return false;
+
+ return sm2.sounds[sID].setPan(nPan);
+
+ };
+
+ /**
+ * Calls the setVolume() method of a SMSound object by ID
+ * Overloaded case: pass only volume argument eg., setVolume(50) to apply to all sounds.
+ *
+ * @param {string} sID The ID of the sound
+ * @param {number} nVol The volume value (0 to 100)
+ * @return {SMSound} The SMSound object
+ */
+
+ this.setVolume = function(sID, nVol) {
+
+ // setVolume(50) function overloading case - apply to all sounds
+
+ var i, j;
+
+ if (sID !== _undefined && !isNaN(sID) && nVol === _undefined) {
+ for (i = 0, j = sm2.soundIDs.length; i < j; i++) {
+ sm2.sounds[sm2.soundIDs[i]].setVolume(sID);
+ }
+ return false;
+ }
+
+ // setVolume('mySound', 50) case
+
+ if (!idCheck(sID)) return false;
+
+ return sm2.sounds[sID].setVolume(nVol);
+
+ };
+
+ /**
+ * Calls the mute() method of either a single SMSound object by ID, or all sound objects.
+ *
+ * @param {string} sID Optional: The ID of the sound (if omitted, all sounds will be used.)
+ */
+
+ this.mute = function(sID) {
+
+ var i = 0;
+
+ if (sID instanceof String) {
+ sID = null;
+ }
+
+ if (!sID) {
+
+ sm2._wD(sm + '.mute(): Muting all sounds');
+ for (i = sm2.soundIDs.length - 1; i >= 0; i--) {
+ sm2.sounds[sm2.soundIDs[i]].mute();
+ }
+ sm2.muted = true;
+
+ } else {
+
+ if (!idCheck(sID)) return false;
+
+ sm2._wD(sm + '.mute(): Muting "' + sID + '"');
+ return sm2.sounds[sID].mute();
+
+ }
+
+ return true;
+
+ };
+
+ /**
+ * Mutes all sounds.
+ */
+
+ this.muteAll = function() {
+
+ sm2.mute();
+
+ };
+
+ /**
+ * Calls the unmute() method of either a single SMSound object by ID, or all sound objects.
+ *
+ * @param {string} sID Optional: The ID of the sound (if omitted, all sounds will be used.)
+ */
+
+ this.unmute = function(sID) {
+
+ var i;
+
+ if (sID instanceof String) {
+ sID = null;
+ }
+
+ if (!sID) {
+
+ sm2._wD(sm + '.unmute(): Unmuting all sounds');
+ for (i = sm2.soundIDs.length - 1; i >= 0; i--) {
+ sm2.sounds[sm2.soundIDs[i]].unmute();
+ }
+ sm2.muted = false;
+
+ } else {
+
+ if (!idCheck(sID)) return false;
+
+ sm2._wD(sm + '.unmute(): Unmuting "' + sID + '"');
+
+ return sm2.sounds[sID].unmute();
+
+ }
+
+ return true;
+
+ };
+
+ /**
+ * Unmutes all sounds.
+ */
+
+ this.unmuteAll = function() {
+
+ sm2.unmute();
+
+ };
+
+ /**
+ * Calls the toggleMute() method of a SMSound object by ID.
+ *
+ * @param {string} sID The ID of the sound
+ * @return {SMSound} The SMSound object
+ */
+
+ this.toggleMute = function(sID) {
+
+ if (!idCheck(sID)) return false;
+
+ return sm2.sounds[sID].toggleMute();
+
+ };
+
+ /**
+ * Retrieves the memory used by the flash plugin.
+ *
+ * @return {number} The amount of memory in use
+ */
+
+ this.getMemoryUse = function() {
+
+ // flash-only
+ var ram = 0;
+
+ if (flash && fV !== 8) {
+ ram = parseInt(flash._getMemoryUse(), 10);
+ }
+
+ return ram;
+
+ };
+
+ /**
+ * Undocumented: NOPs soundManager and all SMSound objects.
+ */
+
+ this.disable = function(bNoDisable) {
+
+ // destroy all functions
+ var i;
+
+ if (bNoDisable === _undefined) {
+ bNoDisable = false;
+ }
+
+ // already disabled?
+ if (disabled) return false;
+
+ disabled = true;
+
+ _wDS('shutdown', 1);
+
+ for (i = sm2.soundIDs.length - 1; i >= 0; i--) {
+ disableObject(sm2.sounds[sm2.soundIDs[i]]);
+ }
+
+ disableObject(sm2);
+
+ // fire "complete", despite fail
+ initComplete(bNoDisable);
+
+ event.remove(window, 'load', initUserOnload);
+
+ return true;
+
+ };
+
+ /**
+ * Determines playability of a MIME type, eg. 'audio/mp3'.
+ */
+
+ this.canPlayMIME = function(sMIME) {
+
+ var result;
+
+ if (sm2.hasHTML5) {
+ result = html5CanPlay({
+ type: sMIME
+ });
+ }
+
+ if (!result && needsFlash) {
+ // if flash 9, test netStream (movieStar) types as well.
+ result = (sMIME && sm2.ok() ? !!((fV > 8 ? sMIME.match(netStreamMimeTypes) : null) || sMIME.match(sm2.mimePattern)) : null); // TODO: make less "weird" (per JSLint)
+ }
+
+ return result;
+
+ };
+
+ /**
+ * Determines playability of a URL based on audio support.
+ *
+ * @param {string} sURL The URL to test
+ * @return {boolean} URL playability
+ */
+
+ this.canPlayURL = function(sURL) {
+
+ var result;
+
+ if (sm2.hasHTML5) {
+ result = html5CanPlay({
+ url: sURL
+ });
+ }
+
+ if (!result && needsFlash) {
+ result = (sURL && sm2.ok() ? !!(sURL.match(sm2.filePattern)) : null);
+ }
+
+ return result;
+
+ };
+
+ /**
+ * Determines playability of an HTML DOM <a> object (or similar object literal) based on audio support.
+ *
+ * @param {object} oLink an HTML DOM <a> object or object literal including href and/or type attributes
+ * @return {boolean} URL playability
+ */
+
+ this.canPlayLink = function(oLink) {
+
+ if (oLink.type !== _undefined && oLink.type && sm2.canPlayMIME(oLink.type)) return true;
+
+ return sm2.canPlayURL(oLink.href);
+
+ };
+
+ /**
+ * Retrieves a SMSound object by ID.
+ *
+ * @param {string} sID The ID of the sound
+ * @return {SMSound} The SMSound object
+ */
+
+ this.getSoundById = function(sID, _suppressDebug) {
+
+ if (!sID) return null;
+
+ var result = sm2.sounds[sID];
+
+ // <d>
+ if (!result && !_suppressDebug) {
+ sm2._wD(sm + '.getSoundById(): Sound "' + sID + '" not found.', 2);
+ }
+ // </d>
+
+ return result;
+
+ };
+
+ /**
+ * Queues a callback for execution when SoundManager has successfully initialized.
+ *
+ * @param {function} oMethod The callback method to fire
+ * @param {object} oScope Optional: The scope to apply to the callback
+ */
+
+ this.onready = function(oMethod, oScope) {
+
+ var sType = 'onready',
+ result = false;
+
+ if (typeof oMethod === 'function') {
+
+ // <d>
+ if (didInit) {
+ sm2._wD(str('queue', sType));
+ }
+ // </d>
+
+ if (!oScope) {
+ oScope = window;
+ }
+
+ addOnEvent(sType, oMethod, oScope);
+ processOnEvents();
+
+ result = true;
+
+ } else {
+
+ throw str('needFunction', sType);
+
+ }
+
+ return result;
+
+ };
+
+ /**
+ * Queues a callback for execution when SoundManager has failed to initialize.
+ *
+ * @param {function} oMethod The callback method to fire
+ * @param {object} oScope Optional: The scope to apply to the callback
+ */
+
+ this.ontimeout = function(oMethod, oScope) {
+
+ var sType = 'ontimeout',
+ result = false;
+
+ if (typeof oMethod === 'function') {
+
+ // <d>
+ if (didInit) {
+ sm2._wD(str('queue', sType));
+ }
+ // </d>
+
+ if (!oScope) {
+ oScope = window;
+ }
+
+ addOnEvent(sType, oMethod, oScope);
+ processOnEvents({ type: sType });
+
+ result = true;
+
+ } else {
+
+ throw str('needFunction', sType);
+
+ }
+
+ return result;
+
+ };
+
+ /**
+ * Writes console.log()-style debug output to a console or in-browser element.
+ * Applies when debugMode = true
+ *
+ * @param {string} sText The console message
+ * @param {object} nType Optional log level (number), or object. Number case: Log type/style where 0 = 'info', 1 = 'warn', 2 = 'error'. Object case: Object to be dumped.
+ */
+
+ this._writeDebug = function(sText, sTypeOrObject) {
+
+ // pseudo-private console.log()-style output
+ // <d>
+
+ var sDID = 'soundmanager-debug', o, oItem;
+
+ if (!sm2.setupOptions.debugMode) return false;
+
+ if (hasConsole && sm2.useConsole) {
+ if (sTypeOrObject && typeof sTypeOrObject === 'object') {
+ // object passed; dump to console.
+ console.log(sText, sTypeOrObject);
+ } else if (debugLevels[sTypeOrObject] !== _undefined) {
+ console[debugLevels[sTypeOrObject]](sText);
+ } else {
+ console.log(sText);
+ }
+ if (sm2.consoleOnly) return true;
+ }
+
+ o = id(sDID);
+
+ if (!o) return false;
+
+ oItem = doc.createElement('div');
+
+ if (++wdCount % 2 === 0) {
+ oItem.className = 'sm2-alt';
+ }
+
+ if (sTypeOrObject === _undefined) {
+ sTypeOrObject = 0;
+ } else {
+ sTypeOrObject = parseInt(sTypeOrObject, 10);
+ }
+
+ oItem.appendChild(doc.createTextNode(sText));
+
+ if (sTypeOrObject) {
+ if (sTypeOrObject >= 2) {
+ oItem.style.fontWeight = 'bold';
+ }
+ if (sTypeOrObject === 3) {
+ oItem.style.color = '#ff3333';
+ }
+ }
+
+ // top-to-bottom
+ // o.appendChild(oItem);
+
+ // bottom-to-top
+ o.insertBefore(oItem, o.firstChild);
+
+ o = null;
+ // </d>
+
+ return true;
+
+ };
+
+ // <d>
+ // last-resort debugging option
+ if (wl.indexOf('sm2-debug=alert') !== -1) {
+ this._writeDebug = function(sText) {
+ window.alert(sText);
+ };
+ }
+ // </d>
+
+ // alias
+ this._wD = this._writeDebug;
+
+ /**
+ * Provides debug / state information on all SMSound objects.
+ */
+
+ this._debug = function() {
+
+ // <d>
+ var i, j;
+ _wDS('currentObj', 1);
+
+ for (i = 0, j = sm2.soundIDs.length; i < j; i++) {
+ sm2.sounds[sm2.soundIDs[i]]._debug();
+ }
+ // </d>
+
+ };
+
+ /**
+ * Restarts and re-initializes the SoundManager instance.
+ *
+ * @param {boolean} resetEvents Optional: When true, removes all registered onready and ontimeout event callbacks.
+ * @param {boolean} excludeInit Options: When true, does not call beginDelayedInit() (which would restart SM2).
+ * @return {object} soundManager The soundManager instance.
+ */
+
+ this.reboot = function(resetEvents, excludeInit) {
+
+ // reset some (or all) state, and re-init unless otherwise specified.
+
+ // <d>
+ if (sm2.soundIDs.length) {
+ sm2._wD('Destroying ' + sm2.soundIDs.length + ' SMSound object' + (sm2.soundIDs.length !== 1 ? 's' : '') + '...');
+ }
+ // </d>
+
+ var i, j, k;
+
+ for (i = sm2.soundIDs.length - 1; i >= 0; i--) {
+ sm2.sounds[sm2.soundIDs[i]].destruct();
+ }
+
+ // trash ze flash (remove from the DOM)
+
+ if (flash) {
+
+ try {
+
+ if (isIE) {
+ oRemovedHTML = flash.innerHTML;
+ }
+
+ oRemoved = flash.parentNode.removeChild(flash);
+
+ } catch(e) {
+
+ // Remove failed? May be due to flash blockers silently removing the SWF object/embed node from the DOM. Warn and continue.
+
+ _wDS('badRemove', 2);
+
+ }
+
+ }
+
+ // actually, force recreate of movie.
+
+ oRemovedHTML = oRemoved = needsFlash = flash = null;
+
+ sm2.enabled = didDCLoaded = didInit = waitingForEI = initPending = didAppend = appendSuccess = disabled = useGlobalHTML5Audio = sm2.swfLoaded = false;
+
+ sm2.soundIDs = [];
+ sm2.sounds = {};
+
+ idCounter = 0;
+ didSetup = false;
+
+ if (!resetEvents) {
+ // reset callbacks for onready, ontimeout etc. so that they will fire again on re-init
+ for (i in on_queue) {
+ if (on_queue.hasOwnProperty(i)) {
+ for (j = 0, k = on_queue[i].length; j < k; j++) {
+ on_queue[i][j].fired = false;
+ }
+ }
+ }
+ } else {
+ // remove all callbacks entirely
+ on_queue = [];
+ }
+
+ // <d>
+ if (!excludeInit) {
+ sm2._wD(sm + ': Rebooting...');
+ }
+ // </d>
+
+ // reset HTML5 and flash canPlay test results
+
+ sm2.html5 = {
+ usingFlash: null
+ };
+
+ sm2.flash = {};
+
+ // reset device-specific HTML/flash mode switches
+
+ sm2.html5Only = false;
+ sm2.ignoreFlash = false;
+
+ window.setTimeout(function() {
+
+ // by default, re-init
+
+ if (!excludeInit) {
+ sm2.beginDelayedInit();
+ }
+
+ }, 20);
+
+ return sm2;
+
+ };
+
+ this.reset = function() {
+
+ /**
+ * Shuts down and restores the SoundManager instance to its original loaded state, without an explicit reboot. All onready/ontimeout handlers are removed.
+ * After this call, SM2 may be re-initialized via soundManager.beginDelayedInit().
+ * @return {object} soundManager The soundManager instance.
+ */
+
+ _wDS('reset');
+
+ return sm2.reboot(true, true);
+
+ };
+
+ /**
+ * Undocumented: Determines the SM2 flash movie's load progress.
+ *
+ * @return {number or null} Percent loaded, or if invalid/unsupported, null.
+ */
+
+ this.getMoviePercent = function() {
+
+ /**
+ * Interesting syntax notes...
+ * Flash/ExternalInterface (ActiveX/NPAPI) bridge methods are not typeof "function" nor instanceof Function, but are still valid.
+ * Furthermore, using (flash && flash.PercentLoaded) causes IE to throw "object doesn't support this property or method".
+ * Thus, 'in' syntax must be used.
+ */
+
+ return (flash && 'PercentLoaded' in flash ? flash.PercentLoaded() : null);
+
+ };
+
+ /**
+ * Additional helper for manually invoking SM2's init process after DOM Ready / window.onload().
+ */
+
+ this.beginDelayedInit = function() {
+
+ windowLoaded = true;
+ domContentLoaded();
+
+ setTimeout(function() {
+
+ if (initPending) return false;
+
+ createMovie();
+ initMovie();
+ initPending = true;
+
+ return true;
+
+ }, 20);
+
+ delayWaitForEI();
+
+ };
+
+ /**
+ * Destroys the SoundManager instance and all SMSound instances.
+ */
+
+ this.destruct = function() {
+
+ sm2._wD(sm + '.destruct()');
+ sm2.disable(true);
+
+ };
+
+ /**
+ * SMSound() (sound object) constructor
+ * ------------------------------------
+ *
+ * @param {object} oOptions Sound options (id and url are required attributes)
+ * @return {SMSound} The new SMSound object
+ */
+
+ SMSound = function(oOptions) {
+
+ var s = this, resetProperties, add_html5_events, remove_html5_events, stop_html5_timer, start_html5_timer, attachOnPosition, onplay_called = false, onPositionItems = [], onPositionFired = 0, detachOnPosition, applyFromTo, lastURL = null, lastHTML5State, urlOmitted;
+
+ lastHTML5State = {
+ // tracks duration + position (time)
+ duration: null,
+ time: null
+ };
+
+ this.id = oOptions.id;
+
+ // legacy
+ this.sID = this.id;
+
+ this.url = oOptions.url;
+ this.options = mixin(oOptions);
+
+ // per-play-instance-specific options
+ this.instanceOptions = this.options;
+
+ // short alias
+ this._iO = this.instanceOptions;
+
+ // assign property defaults
+ this.pan = this.options.pan;
+ this.volume = this.options.volume;
+
+ // whether or not this object is using HTML5
+ this.isHTML5 = false;
+
+ // internal HTML5 Audio() object reference
+ this._a = null;
+
+ // for flash 8 special-case createSound() without url, followed by load/play with url case
+ urlOmitted = (!this.url);
+
+ /**
+ * SMSound() public methods
+ * ------------------------
+ */
+
+ this.id3 = {};
+
+ /**
+ * Writes SMSound object parameters to debug console
+ */
+
+ this._debug = function() {
+
+ // <d>
+ sm2._wD(s.id + ': Merged options:', s.options);
+ // </d>
+
+ };
+
+ /**
+ * Begins loading a sound per its *url*.
+ *
+ * @param {object} options Optional: Sound options
+ * @return {SMSound} The SMSound object
+ */
+
+ this.load = function(options) {
+
+ var oSound = null, instanceOptions;
+
+ if (options !== _undefined) {
+ s._iO = mixin(options, s.options);
+ } else {
+ options = s.options;
+ s._iO = options;
+ if (lastURL && lastURL !== s.url) {
+ _wDS('manURL');
+ s._iO.url = s.url;
+ s.url = null;
+ }
+ }
+
+ if (!s._iO.url) {
+ s._iO.url = s.url;
+ }
+
+ s._iO.url = parseURL(s._iO.url);
+
+ // ensure we're in sync
+ s.instanceOptions = s._iO;
+
+ // local shortcut
+ instanceOptions = s._iO;
+
+ sm2._wD(s.id + ': load (' + instanceOptions.url + ')');
+
+ if (!instanceOptions.url && !s.url) {
+ sm2._wD(s.id + ': load(): url is unassigned. Exiting.', 2);
+ return s;
+ }
+
+ // <d>
+ if (!s.isHTML5 && fV === 8 && !s.url && !instanceOptions.autoPlay) {
+ // flash 8 load() -> play() won't work before onload has fired.
+ sm2._wD(s.id + ': Flash 8 load() limitation: Wait for onload() before calling play().', 1);
+ }
+ // </d>
+
+ if (instanceOptions.url === s.url && s.readyState !== 0 && s.readyState !== 2) {
+ _wDS('onURL', 1);
+ // if loaded and an onload() exists, fire immediately.
+ if (s.readyState === 3 && instanceOptions.onload) {
+ // assume success based on truthy duration.
+ wrapCallback(s, function() {
+ instanceOptions.onload.apply(s, [(!!s.duration)]);
+ });
+ }
+ return s;
+ }
+
+ // reset a few state properties
+
+ s.loaded = false;
+ s.readyState = 1;
+ s.playState = 0;
+ s.id3 = {};
+
+ // TODO: If switching from HTML5 -> flash (or vice versa), stop currently-playing audio.
+
+ if (html5OK(instanceOptions)) {
+
+ oSound = s._setup_html5(instanceOptions);
+
+ if (!oSound._called_load) {
+
+ s._html5_canplay = false;
+
+ // TODO: review called_load / html5_canplay logic
+
+ // if url provided directly to load(), assign it here.
+
+ if (s.url !== instanceOptions.url) {
+
+ sm2._wD(_wDS('manURL') + ': ' + instanceOptions.url);
+
+ s._a.src = instanceOptions.url;
+
+ // TODO: review / re-apply all relevant options (volume, loop, onposition etc.)
+
+ // reset position for new URL
+ s.setPosition(0);
+
+ }
+
+ // given explicit load call, try to preload.
+
+ // early HTML5 implementation (non-standard)
+ s._a.autobuffer = 'auto';
+
+ // standard property, values: none / metadata / auto
+ // reference: http://msdn.microsoft.com/en-us/library/ie/ff974759%28v=vs.85%29.aspx
+ s._a.preload = 'auto';
+
+ s._a._called_load = true;
+
+ } else {
+
+ sm2._wD(s.id + ': Ignoring request to load again');
+
+ }
+
+ } else {
+
+ if (sm2.html5Only) {
+ sm2._wD(s.id + ': No flash support. Exiting.');
+ return s;
+ }
+
+ if (s._iO.url && s._iO.url.match(/data:/i)) {
+ // data: URIs not supported by Flash, either.
+ sm2._wD(s.id + ': data: URIs not supported via Flash. Exiting.');
+ return s;
+ }
+
+ try {
+ s.isHTML5 = false;
+ s._iO = policyFix(loopFix(instanceOptions));
+ // if we have "position", disable auto-play as we'll be seeking to that position at onload().
+ if (s._iO.autoPlay && (s._iO.position || s._iO.from)) {
+ sm2._wD(s.id + ': Disabling autoPlay because of non-zero offset case');
+ s._iO.autoPlay = false;
+ }
+ // re-assign local shortcut
+ instanceOptions = s._iO;
+ if (fV === 8) {
+ flash._load(s.id, instanceOptions.url, instanceOptions.stream, instanceOptions.autoPlay, instanceOptions.usePolicyFile);
+ } else {
+ flash._load(s.id, instanceOptions.url, !!(instanceOptions.stream), !!(instanceOptions.autoPlay), instanceOptions.loops || 1, !!(instanceOptions.autoLoad), instanceOptions.usePolicyFile);
+ }
+ } catch(e) {
+ _wDS('smError', 2);
+ debugTS('onload', false);
+ catchError({
+ type: 'SMSOUND_LOAD_JS_EXCEPTION',
+ fatal: true
+ });
+ }
+
+ }
+
+ // after all of this, ensure sound url is up to date.
+ s.url = instanceOptions.url;
+
+ return s;
+
+ };
+
+ /**
+ * Unloads a sound, canceling any open HTTP requests.
+ *
+ * @return {SMSound} The SMSound object
+ */
+
+ this.unload = function() {
+
+ // Flash 8/AS2 can't "close" a stream - fake it by loading an empty URL
+ // Flash 9/AS3: Close stream, preventing further load
+ // HTML5: Most UAs will use empty URL
+
+ if (s.readyState !== 0) {
+
+ sm2._wD(s.id + ': unload()');
+
+ if (!s.isHTML5) {
+
+ if (fV === 8) {
+ flash._unload(s.id, emptyURL);
+ } else {
+ flash._unload(s.id);
+ }
+
+ } else {
+
+ stop_html5_timer();
+
+ if (s._a) {
+
+ s._a.pause();
+
+ // update empty URL, too
+ lastURL = html5Unload(s._a);
+
+ }
+
+ }
+
+ // reset load/status flags
+ resetProperties();
+
+ }
+
+ return s;
+
+ };
+
+ /**
+ * Unloads and destroys a sound.
+ */
+
+ this.destruct = function(_bFromSM) {
+
+ sm2._wD(s.id + ': Destruct');
+
+ if (!s.isHTML5) {
+
+ // kill sound within Flash
+ // Disable the onfailure handler
+ s._iO.onfailure = null;
+ flash._destroySound(s.id);
+
+ } else {
+
+ stop_html5_timer();
+
+ if (s._a) {
+ s._a.pause();
+ html5Unload(s._a);
+ if (!useGlobalHTML5Audio) {
+ remove_html5_events();
+ }
+ // break obvious circular reference
+ s._a._s = null;
+ s._a = null;
+ }
+
+ }
+
+ if (!_bFromSM) {
+ // ensure deletion from controller
+ sm2.destroySound(s.id, true);
+ }
+
+ };
+
+ /**
+ * Begins playing a sound.
+ *
+ * @param {object} options Optional: Sound options
+ * @return {SMSound} The SMSound object
+ */
+
+ this.play = function(options, _updatePlayState) {
+
+ var fN, allowMulti, a, onready,
+ audioClone, onended, oncanplay,
+ startOK = true;
+
+ // <d>
+ fN = s.id + ': play(): ';
+ // </d>
+
+ // default to true
+ _updatePlayState = (_updatePlayState === _undefined ? true : _updatePlayState);
+
+ if (!options) {
+ options = {};
+ }
+
+ // first, use local URL (if specified)
+ if (s.url) {
+ s._iO.url = s.url;
+ }
+
+ // mix in any options defined at createSound()
+ s._iO = mixin(s._iO, s.options);
+
+ // mix in any options specific to this method
+ s._iO = mixin(options, s._iO);
+
+ s._iO.url = parseURL(s._iO.url);
+
+ s.instanceOptions = s._iO;
+
+ // RTMP-only
+ if (!s.isHTML5 && s._iO.serverURL && !s.connected) {
+ if (!s.getAutoPlay()) {
+ sm2._wD(fN + ' Netstream not connected yet - setting autoPlay');
+ s.setAutoPlay(true);
+ }
+ // play will be called in onconnect()
+ return s;
+ }
+
+ if (html5OK(s._iO)) {
+ s._setup_html5(s._iO);
+ start_html5_timer();
+ }
+
+ if (s.playState === 1 && !s.paused) {
+
+ allowMulti = s._iO.multiShot;
+
+ if (!allowMulti) {
+
+ sm2._wD(fN + 'Already playing (one-shot)', 1);
+
+ if (s.isHTML5) {
+ // go back to original position.
+ s.setPosition(s._iO.position);
+ }
+
+ return s;
+
+ }
+
+ sm2._wD(fN + 'Already playing (multi-shot)', 1);
+
+ }
+
+ // edge case: play() with explicit URL parameter
+ if (options.url && options.url !== s.url) {
+
+ // special case for createSound() followed by load() / play() with url; avoid double-load case.
+ if (!s.readyState && !s.isHTML5 && fV === 8 && urlOmitted) {
+
+ urlOmitted = false;
+
+ } else {
+
+ // load using merged options
+ s.load(s._iO);
+
+ }
+
+ }
+
+ if (!s.loaded) {
+
+ if (s.readyState === 0) {
+
+ sm2._wD(fN + 'Attempting to load');
+
+ // try to get this sound playing ASAP
+ if (!s.isHTML5 && !sm2.html5Only) {
+
+ // flash: assign directly because setAutoPlay() increments the instanceCount
+ s._iO.autoPlay = true;
+ s.load(s._iO);
+
+ } else if (s.isHTML5) {
+
+ // iOS needs this when recycling sounds, loading a new URL on an existing object.
+ s.load(s._iO);
+
+ } else {
+
+ sm2._wD(fN + 'Unsupported type. Exiting.');
+
+ return s;
+
+ }
+
+ // HTML5 hack - re-set instanceOptions?
+ s.instanceOptions = s._iO;
+
+ } else if (s.readyState === 2) {
+
+ sm2._wD(fN + 'Could not load - exiting', 2);
+
+ return s;
+
+ } else {
+
+ sm2._wD(fN + 'Loading - attempting to play...');
+
+ }
+
+ } else {
+
+ // "play()"
+ sm2._wD(fN.substr(0, fN.lastIndexOf(':')));
+
+ }
+
+ if (!s.isHTML5 && fV === 9 && s.position > 0 && s.position === s.duration) {
+ // flash 9 needs a position reset if play() is called while at the end of a sound.
+ sm2._wD(fN + 'Sound at end, resetting to position: 0');
+ options.position = 0;
+ }
+
+ /**
+ * Streams will pause when their buffer is full if they are being loaded.
+ * In this case paused is true, but the song hasn't started playing yet.
+ * If we just call resume() the onplay() callback will never be called.
+ * So only call resume() if the position is > 0.
+ * Another reason is because options like volume won't have been applied yet.
+ * For normal sounds, just resume.
+ */
+
+ if (s.paused && s.position >= 0 && (!s._iO.serverURL || s.position > 0)) {
+
+ // https://gist.github.com/37b17df75cc4d7a90bf6
+ sm2._wD(fN + 'Resuming from paused state', 1);
+ s.resume();
+
+ } else {
+
+ s._iO = mixin(options, s._iO);
+
+ /**
+ * Preload in the event of play() with position under Flash,
+ * or from/to parameters and non-RTMP case
+ */
+ if (((!s.isHTML5 && s._iO.position !== null && s._iO.position > 0) || (s._iO.from !== null && s._iO.from > 0) || s._iO.to !== null) && s.instanceCount === 0 && s.playState === 0 && !s._iO.serverURL) {
+
+ onready = function() {
+ // sound "canplay" or onload()
+ // re-apply position/from/to to instance options, and start playback
+ s._iO = mixin(options, s._iO);
+ s.play(s._iO);
+ };
+
+ // HTML5 needs to at least have "canplay" fired before seeking.
+ if (s.isHTML5 && !s._html5_canplay) {
+
+ // this hasn't been loaded yet. load it first, and then do this again.
+ sm2._wD(fN + 'Beginning load for non-zero offset case');
+
+ s.load({
+ // note: custom HTML5-only event added for from/to implementation.
+ _oncanplay: onready
+ });
+
+ } else if (!s.isHTML5 && !s.loaded && (!s.readyState || s.readyState !== 2)) {
+
+ // to be safe, preload the whole thing in Flash.
+
+ sm2._wD(fN + 'Preloading for non-zero offset case');
+
+ s.load({
+ onload: onready
+ });
+
+ }
+
+ // otherwise, we're ready to go. re-apply local options, and continue
+
+ s._iO = applyFromTo();
+
+ }
+
+ // sm2._wD(fN + 'Starting to play');
+
+ // increment instance counter, where enabled + supported
+ if (!s.instanceCount || s._iO.multiShotEvents || (s.isHTML5 && s._iO.multiShot && !useGlobalHTML5Audio) || (!s.isHTML5 && fV > 8 && !s.getAutoPlay())) {
+ s.instanceCount++;
+ }
+
+ // if first play and onposition parameters exist, apply them now
+ if (s._iO.onposition && s.playState === 0) {
+ attachOnPosition(s);
+ }
+
+ s.playState = 1;
+ s.paused = false;
+
+ s.position = (s._iO.position !== _undefined && !isNaN(s._iO.position) ? s._iO.position : 0);
+
+ if (!s.isHTML5) {
+ s._iO = policyFix(loopFix(s._iO));
+ }
+
+ if (s._iO.onplay && _updatePlayState) {
+ s._iO.onplay.apply(s);
+ onplay_called = true;
+ }
+
+ s.setVolume(s._iO.volume, true);
+ s.setPan(s._iO.pan, true);
+
+ if (s._iO.playbackRate !== 1) {
+ s.setPlaybackRate(s._iO.playbackRate);
+ }
+
+ if (!s.isHTML5) {
+
+ startOK = flash._start(s.id, s._iO.loops || 1, (fV === 9 ? s.position : s.position / msecScale), s._iO.multiShot || false);
+
+ if (fV === 9 && !startOK) {
+ // edge case: no sound hardware, or 32-channel flash ceiling hit.
+ // applies only to Flash 9, non-NetStream/MovieStar sounds.
+ // http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Sound.html#play%28%29
+ sm2._wD(fN + 'No sound hardware, or 32-sound ceiling hit', 2);
+ if (s._iO.onplayerror) {
+ s._iO.onplayerror.apply(s);
+ }
+
+ }
+
+ } else if (s.instanceCount < 2) {
+
+ // HTML5 single-instance case
+
+ start_html5_timer();
+
+ a = s._setup_html5();
+
+ s.setPosition(s._iO.position);
+
+ a.play();
+
+ } else {
+
+ // HTML5 multi-shot case
+
+ sm2._wD(s.id + ': Cloning Audio() for instance #' + s.instanceCount + '...');
+
+ audioClone = new Audio(s._iO.url);
+
+ onended = function() {
+ event.remove(audioClone, 'ended', onended);
+ s._onfinish(s);
+ // cleanup
+ html5Unload(audioClone);
+ audioClone = null;
+ };
+
+ oncanplay = function() {
+ event.remove(audioClone, 'canplay', oncanplay);
+ try {
+ audioClone.currentTime = s._iO.position / msecScale;
+ } catch(err) {
+ complain(s.id + ': multiShot play() failed to apply position of ' + (s._iO.position / msecScale));
+ }
+ audioClone.play();
+ };
+
+ event.add(audioClone, 'ended', onended);
+
+ // apply volume to clones, too
+ if (s._iO.volume !== _undefined) {
+ audioClone.volume = Math.max(0, Math.min(1, s._iO.volume / 100));
+ }
+
+ // playing multiple muted sounds? if you do this, you're weird ;) - but let's cover it.
+ if (s.muted) {
+ audioClone.muted = true;
+ }
+
+ if (s._iO.position) {
+ // HTML5 audio can't seek before onplay() event has fired.
+ // wait for canplay, then seek to position and start playback.
+ event.add(audioClone, 'canplay', oncanplay);
+ } else {
+ // begin playback at currentTime: 0
+ audioClone.play();
+ }
+
+ }
+
+ }
+
+ return s;
+
+ };
+
+ // just for convenience
+ this.start = this.play;
+
+ /**
+ * Stops playing a sound (and optionally, all sounds)
+ *
+ * @param {boolean} bAll Optional: Whether to stop all sounds
+ * @return {SMSound} The SMSound object
+ */
+
+ this.stop = function(bAll) {
+
+ var instanceOptions = s._iO,
+ originalPosition;
+
+ if (s.playState === 1) {
+
+ sm2._wD(s.id + ': stop()');
+
+ s._onbufferchange(0);
+ s._resetOnPosition(0);
+ s.paused = false;
+
+ if (!s.isHTML5) {
+ s.playState = 0;
+ }
+
+ // remove onPosition listeners, if any
+ detachOnPosition();
+
+ // and "to" position, if set
+ if (instanceOptions.to) {
+ s.clearOnPosition(instanceOptions.to);
+ }
+
+ if (!s.isHTML5) {
+
+ flash._stop(s.id, bAll);
+
+ // hack for netStream: just unload
+ if (instanceOptions.serverURL) {
+ s.unload();
+ }
+
+ } else if (s._a) {
+
+ originalPosition = s.position;
+
+ // act like Flash, though
+ s.setPosition(0);
+
+ // hack: reflect old position for onstop() (also like Flash)
+ s.position = originalPosition;
+
+ // html5 has no stop()
+ // NOTE: pausing means iOS requires interaction to resume.
+ s._a.pause();
+
+ s.playState = 0;
+
+ // and update UI
+ s._onTimer();
+
+ stop_html5_timer();
+
+ }
+
+ s.instanceCount = 0;
+ s._iO = {};
+
+ if (instanceOptions.onstop) {
+ instanceOptions.onstop.apply(s);
+ }
+
+ }
+
+ return s;
+
+ };
+
+ /**
+ * Undocumented/internal: Sets autoPlay for RTMP.
+ *
+ * @param {boolean} autoPlay state
+ */
+
+ this.setAutoPlay = function(autoPlay) {
+
+ sm2._wD(s.id + ': Autoplay turned ' + (autoPlay ? 'on' : 'off'));
+ s._iO.autoPlay = autoPlay;
+
+ if (!s.isHTML5) {
+ flash._setAutoPlay(s.id, autoPlay);
+ if (autoPlay) {
+ // only increment the instanceCount if the sound isn't loaded (TODO: verify RTMP)
+ if (!s.instanceCount && s.readyState === 1) {
+ s.instanceCount++;
+ sm2._wD(s.id + ': Incremented instance count to ' + s.instanceCount);
+ }
+ }
+ }
+
+ };
+
+ /**
+ * Undocumented/internal: Returns the autoPlay boolean.
+ *
+ * @return {boolean} The current autoPlay value
+ */
+
+ this.getAutoPlay = function() {
+
+ return s._iO.autoPlay;
+
+ };
+
+ /**
+ * Sets the playback rate of a sound (HTML5-only.)
+ *
+ * @param {number} playbackRate (+/-)
+ * @return {SMSound} The SMSound object
+ */
+
+ this.setPlaybackRate = function(playbackRate) {
+
+ // Per Mozilla, limit acceptable values to prevent playback from stopping (unless allowOverride is truthy.)
+ // https://developer.mozilla.org/en-US/Apps/Build/Audio_and_video_delivery/WebAudio_playbackRate_explained
+ var normalizedRate = Math.max(0.5, Math.min(4, playbackRate));
+
+ // <d>
+ if (normalizedRate !== playbackRate) {
+ sm2._wD(s.id + ': setPlaybackRate(' + playbackRate + '): limiting rate to ' + normalizedRate, 2);
+ }
+ // </d>
+
+ if (s.isHTML5) {
+ try {
+ s._iO.playbackRate = normalizedRate;
+ s._a.playbackRate = normalizedRate;
+ } catch(e) {
+ sm2._wD(s.id + ': setPlaybackRate(' + normalizedRate + ') failed: ' + e.message, 2);
+ }
+ }
+
+ return s;
+
+ };
+
+ /**
+ * Sets the position of a sound.
+ *
+ * @param {number} nMsecOffset Position (milliseconds)
+ * @return {SMSound} The SMSound object
+ */
+
+ this.setPosition = function(nMsecOffset) {
+
+ if (nMsecOffset === _undefined) {
+ nMsecOffset = 0;
+ }
+
+ var position, position1K,
+ // Use the duration from the instance options, if we don't have a track duration yet.
+ // position >= 0 and <= current available (loaded) duration
+ offset = (s.isHTML5 ? Math.max(nMsecOffset, 0) : Math.min(s.duration || s._iO.duration, Math.max(nMsecOffset, 0)));
+
+ s.position = offset;
+ position1K = s.position / msecScale;
+ s._resetOnPosition(s.position);
+ s._iO.position = offset;
+
+ if (!s.isHTML5) {
+
+ position = (fV === 9 ? s.position : position1K);
+
+ if (s.readyState && s.readyState !== 2) {
+ // if paused or not playing, will not resume (by playing)
+ flash._setPosition(s.id, position, (s.paused || !s.playState), s._iO.multiShot);
+ }
+
+ } else if (s._a) {
+
+ // Set the position in the canplay handler if the sound is not ready yet
+ if (s._html5_canplay) {
+
+ if (s._a.currentTime.toFixed(3) !== position1K.toFixed(3)) {
+
+ /**
+ * DOM/JS errors/exceptions to watch out for:
+ * if seek is beyond (loaded?) position, "DOM exception 11"
+ * "INDEX_SIZE_ERR": DOM exception 1
+ */
+ sm2._wD(s.id + ': setPosition(' + position1K + ')');
+
+ try {
+ s._a.currentTime = position1K;
+ if (s.playState === 0 || s.paused) {
+ // allow seek without auto-play/resume
+ s._a.pause();
+ }
+ } catch(e) {
+ sm2._wD(s.id + ': setPosition(' + position1K + ') failed: ' + e.message, 2);
+ }
+
+ }
+
+ } else if (position1K) {
+
+ // warn on non-zero seek attempts
+ sm2._wD(s.id + ': setPosition(' + position1K + '): Cannot seek yet, sound not ready', 2);
+ return s;
+
+ }
+
+ if (s.paused) {
+
+ // if paused, refresh UI right away by forcing update
+ s._onTimer(true);
+
+ }
+
+ }
+
+ return s;
+
+ };
+
+ /**
+ * Pauses sound playback.
+ *
+ * @return {SMSound} The SMSound object
+ */
+
+ this.pause = function(_bCallFlash) {
+
+ if (s.paused || (s.playState === 0 && s.readyState !== 1)) return s;
+
+ sm2._wD(s.id + ': pause()');
+ s.paused = true;
+
+ if (!s.isHTML5) {
+ if (_bCallFlash || _bCallFlash === _undefined) {
+ flash._pause(s.id, s._iO.multiShot);
+ }
+ } else {
+ s._setup_html5().pause();
+ stop_html5_timer();
+ }
+
+ if (s._iO.onpause) {
+ s._iO.onpause.apply(s);
+ }
+
+ return s;
+
+ };
+
+ /**
+ * Resumes sound playback.
+ *
+ * @return {SMSound} The SMSound object
+ */
+
+ /**
+ * When auto-loaded streams pause on buffer full they have a playState of 0.
+ * We need to make sure that the playState is set to 1 when these streams "resume".
+ * When a paused stream is resumed, we need to trigger the onplay() callback if it
+ * hasn't been called already. In this case since the sound is being played for the
+ * first time, I think it's more appropriate to call onplay() rather than onresume().
+ */
+
+ this.resume = function() {
+
+ var instanceOptions = s._iO;
+
+ if (!s.paused) return s;
+
+ sm2._wD(s.id + ': resume()');
+ s.paused = false;
+ s.playState = 1;
+
+ if (!s.isHTML5) {
+
+ if (instanceOptions.isMovieStar && !instanceOptions.serverURL) {
+ // Bizarre Webkit bug (Chrome reported via 8tracks.com dudes): AAC content paused for 30+ seconds(?) will not resume without a reposition.
+ s.setPosition(s.position);
+ }
+
+ // flash method is toggle-based (pause/resume)
+ flash._pause(s.id, instanceOptions.multiShot);
+
+ } else {
+
+ s._setup_html5().play();
+ start_html5_timer();
+
+ }
+
+ if (!onplay_called && instanceOptions.onplay) {
+
+ instanceOptions.onplay.apply(s);
+ onplay_called = true;
+
+ } else if (instanceOptions.onresume) {
+
+ instanceOptions.onresume.apply(s);
+
+ }
+
+ return s;
+
+ };
+
+ /**
+ * Toggles sound playback.
+ *
+ * @return {SMSound} The SMSound object
+ */
+
+ this.togglePause = function() {
+
+ sm2._wD(s.id + ': togglePause()');
+
+ if (s.playState === 0) {
+ s.play({
+ position: (fV === 9 && !s.isHTML5 ? s.position : s.position / msecScale)
+ });
+ return s;
+ }
+
+ if (s.paused) {
+ s.resume();
+ } else {
+ s.pause();
+ }
+
+ return s;
+
+ };
+
+ /**
+ * Sets the panning (L-R) effect.
+ *
+ * @param {number} nPan The pan value (-100 to 100)
+ * @return {SMSound} The SMSound object
+ */
+
+ this.setPan = function(nPan, bInstanceOnly) {
+
+ if (nPan === _undefined) {
+ nPan = 0;
+ }
+
+ if (bInstanceOnly === _undefined) {
+ bInstanceOnly = false;
+ }
+
+ if (!s.isHTML5) {
+ flash._setPan(s.id, nPan);
+ } // else { no HTML5 pan? }
+
+ s._iO.pan = nPan;
+
+ if (!bInstanceOnly) {
+ s.pan = nPan;
+ s.options.pan = nPan;
+ }
+
+ return s;
+
+ };
+
+ /**
+ * Sets the volume.
+ *
+ * @param {number} nVol The volume value (0 to 100)
+ * @return {SMSound} The SMSound object
+ */
+
+ this.setVolume = function(nVol, _bInstanceOnly) {
+
+ /**
+ * Note: Setting volume has no effect on iOS "special snowflake" devices.
+ * Hardware volume control overrides software, and volume
+ * will always return 1 per Apple docs. (iOS 4 + 5.)
+ * http://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/HTML-canvas-guide/AddingSoundtoCanvasAnimations/AddingSoundtoCanvasAnimations.html
+ */
+
+ if (nVol === _undefined) {
+ nVol = 100;
+ }
+
+ if (_bInstanceOnly === _undefined) {
+ _bInstanceOnly = false;
+ }
+
+ if (!s.isHTML5) {
+
+ flash._setVolume(s.id, (sm2.muted && !s.muted) || s.muted ? 0 : nVol);
+
+ } else if (s._a) {
+
+ if (sm2.muted && !s.muted) {
+ s.muted = true;
+ s._a.muted = true;
+ }
+
+ // valid range for native HTML5 Audio(): 0-1
+ s._a.volume = Math.max(0, Math.min(1, nVol / 100));
+
+ }
+
+ s._iO.volume = nVol;
+
+ if (!_bInstanceOnly) {
+ s.volume = nVol;
+ s.options.volume = nVol;
+ }
+
+ return s;
+
+ };
+
+ /**
+ * Mutes the sound.
+ *
+ * @return {SMSound} The SMSound object
+ */
+
+ this.mute = function() {
+
+ s.muted = true;
+
+ if (!s.isHTML5) {
+ flash._setVolume(s.id, 0);
+ } else if (s._a) {
+ s._a.muted = true;
+ }
+
+ return s;
+
+ };
+
+ /**
+ * Unmutes the sound.
+ *
+ * @return {SMSound} The SMSound object
+ */
+
+ this.unmute = function() {
+
+ s.muted = false;
+ var hasIO = (s._iO.volume !== _undefined);
+
+ if (!s.isHTML5) {
+ flash._setVolume(s.id, hasIO ? s._iO.volume : s.options.volume);
+ } else if (s._a) {
+ s._a.muted = false;
+ }
+
+ return s;
+
+ };
+
+ /**
+ * Toggles the muted state of a sound.
+ *
+ * @return {SMSound} The SMSound object
+ */
+
+ this.toggleMute = function() {
+
+ return (s.muted ? s.unmute() : s.mute());
+
+ };
+
+ /**
+ * Registers a callback to be fired when a sound reaches a given position during playback.
+ *
+ * @param {number} nPosition The position to watch for
+ * @param {function} oMethod The relevant callback to fire
+ * @param {object} oScope Optional: The scope to apply the callback to
+ * @return {SMSound} The SMSound object
+ */
+
+ this.onPosition = function(nPosition, oMethod, oScope) {
+
+ // TODO: basic dupe checking?
+
+ onPositionItems.push({
+ position: parseInt(nPosition, 10),
+ method: oMethod,
+ scope: (oScope !== _undefined ? oScope : s),
+ fired: false
+ });
+
+ return s;
+
+ };
+
+ // legacy/backwards-compability: lower-case method name
+ this.onposition = this.onPosition;
+
+ /**
+ * Removes registered callback(s) from a sound, by position and/or callback.
+ *
+ * @param {number} nPosition The position to clear callback(s) for
+ * @param {function} oMethod Optional: Identify one callback to be removed when multiple listeners exist for one position
+ * @return {SMSound} The SMSound object
+ */
+
+ this.clearOnPosition = function(nPosition, oMethod) {
+
+ var i;
+
+ nPosition = parseInt(nPosition, 10);
+
+ if (isNaN(nPosition)) {
+ // safety check
+ return;
+ }
+
+ for (i = 0; i < onPositionItems.length; i++) {
+
+ if (nPosition === onPositionItems[i].position) {
+ // remove this item if no method was specified, or, if the method matches
+
+ if (!oMethod || (oMethod === onPositionItems[i].method)) {
+
+ if (onPositionItems[i].fired) {
+ // decrement "fired" counter, too
+ onPositionFired--;
+ }
+
+ onPositionItems.splice(i, 1);
+
+ }
+
+ }
+
+ }
+
+ };
+
+ this._processOnPosition = function() {
+
+ var i, item, j = onPositionItems.length;
+
+ if (!j || !s.playState || onPositionFired >= j) return false;
+
+ for (i = j - 1; i >= 0; i--) {
+
+ item = onPositionItems[i];
+
+ if (!item.fired && s.position >= item.position) {
+
+ item.fired = true;
+ onPositionFired++;
+ item.method.apply(item.scope, [item.position]);
+
+ // reset j -- onPositionItems.length can be changed in the item callback above... occasionally breaking the loop.
+ j = onPositionItems.length;
+
+ }
+
+ }
+
+ return true;
+
+ };
+
+ this._resetOnPosition = function(nPosition) {
+
+ // reset "fired" for items interested in this position
+ var i, item, j = onPositionItems.length;
+
+ if (!j) return false;
+
+ for (i = j - 1; i >= 0; i--) {
+
+ item = onPositionItems[i];
+
+ if (item.fired && nPosition <= item.position) {
+ item.fired = false;
+ onPositionFired--;
+ }
+
+ }
+
+ return true;
+
+ };
+
+ /**
+ * SMSound() private internals
+ * --------------------------------
+ */
+
+ applyFromTo = function() {
+
+ var instanceOptions = s._iO,
+ f = instanceOptions.from,
+ t = instanceOptions.to,
+ start, end;
+
+ end = function() {
+
+ // end has been reached.
+ sm2._wD(s.id + ': "To" time of ' + t + ' reached.');
+
+ // detach listener
+ s.clearOnPosition(t, end);
+
+ // stop should clear this, too
+ s.stop();
+
+ };
+
+ start = function() {
+
+ sm2._wD(s.id + ': Playing "from" ' + f);
+
+ // add listener for end
+ if (t !== null && !isNaN(t)) {
+ s.onPosition(t, end);
+ }
+
+ };
+
+ if (f !== null && !isNaN(f)) {
+
+ // apply to instance options, guaranteeing correct start position.
+ instanceOptions.position = f;
+
+ // multiShot timing can't be tracked, so prevent that.
+ instanceOptions.multiShot = false;
+
+ start();
+
+ }
+
+ // return updated instanceOptions including starting position
+ return instanceOptions;
+
+ };
+
+ attachOnPosition = function() {
+
+ var item,
+ op = s._iO.onposition;
+
+ // attach onposition things, if any, now.
+
+ if (op) {
+
+ for (item in op) {
+ if (op.hasOwnProperty(item)) {
+ s.onPosition(parseInt(item, 10), op[item]);
+ }
+ }
+
+ }
+
+ };
+
+ detachOnPosition = function() {
+
+ var item,
+ op = s._iO.onposition;
+
+ // detach any onposition()-style listeners.
+
+ if (op) {
+
+ for (item in op) {
+ if (op.hasOwnProperty(item)) {
+ s.clearOnPosition(parseInt(item, 10));
+ }
+ }
+
+ }
+
+ };
+
+ start_html5_timer = function() {
+
+ if (s.isHTML5) {
+ startTimer(s);
+ }
+
+ };
+
+ stop_html5_timer = function() {
+
+ if (s.isHTML5) {
+ stopTimer(s);
+ }
+
+ };
+
+ resetProperties = function(retainPosition) {
+
+ if (!retainPosition) {
+ onPositionItems = [];
+ onPositionFired = 0;
+ }
+
+ onplay_called = false;
+
+ s._hasTimer = null;
+ s._a = null;
+ s._html5_canplay = false;
+ s.bytesLoaded = null;
+ s.bytesTotal = null;
+ s.duration = (s._iO && s._iO.duration ? s._iO.duration : null);
+ s.durationEstimate = null;
+ s.buffered = [];
+
+ // legacy: 1D array
+ s.eqData = [];
+
+ s.eqData.left = [];
+ s.eqData.right = [];
+
+ s.failures = 0;
+ s.isBuffering = false;
+ s.instanceOptions = {};
+ s.instanceCount = 0;
+ s.loaded = false;
+ s.metadata = {};
+
+ // 0 = uninitialised, 1 = loading, 2 = failed/error, 3 = loaded/success
+ s.readyState = 0;
+
+ s.muted = false;
+ s.paused = false;
+
+ s.peakData = {
+ left: 0,
+ right: 0
+ };
+
+ s.waveformData = {
+ left: [],
+ right: []
+ };
+
+ s.playState = 0;
+ s.position = null;
+
+ s.id3 = {};
+
+ };
+
+ resetProperties();
+
+ /**
+ * Pseudo-private SMSound internals
+ * --------------------------------
+ */
+
+ this._onTimer = function(bForce) {
+
+ /**
+ * HTML5-only _whileplaying() etc.
+ * called from both HTML5 native events, and polling/interval-based timers
+ * mimics flash and fires only when time/duration change, so as to be polling-friendly
+ */
+
+ var duration, isNew = false, time, x = {};
+
+ if (s._hasTimer || bForce) {
+
+ // TODO: May not need to track readyState (1 = loading)
+
+ if (s._a && (bForce || ((s.playState > 0 || s.readyState === 1) && !s.paused))) {
+
+ duration = s._get_html5_duration();
+
+ if (duration !== lastHTML5State.duration) {
+
+ lastHTML5State.duration = duration;
+ s.duration = duration;
+ isNew = true;
+
+ }
+
+ // TODO: investigate why this goes wack if not set/re-set each time.
+ s.durationEstimate = s.duration;
+
+ time = (s._a.currentTime * msecScale || 0);
+
+ if (time !== lastHTML5State.time) {
+
+ lastHTML5State.time = time;
+ isNew = true;
+
+ }
+
+ if (isNew || bForce) {
+
+ s._whileplaying(time, x, x, x, x);
+
+ }
+
+ }/* else {
+
+ // sm2._wD('_onTimer: Warn for "'+s.id+'": '+(!s._a?'Could not find element. ':'')+(s.playState === 0?'playState bad, 0?':'playState = '+s.playState+', OK'));
+
+ return false;
+
+ }*/
+
+ }
+
+ return isNew;
+
+ };
+
+ this._get_html5_duration = function() {
+
+ var instanceOptions = s._iO,
+ // if audio object exists, use its duration - else, instance option duration (if provided - it's a hack, really, and should be retired) OR null
+ d = (s._a && s._a.duration ? s._a.duration * msecScale : (instanceOptions && instanceOptions.duration ? instanceOptions.duration : null)),
+ result = (d && !isNaN(d) && d !== Infinity ? d : null);
+
+ return result;
+
+ };
+
+ this._apply_loop = function(a, nLoops) {
+
+ /**
+ * boolean instead of "loop", for webkit? - spec says string. http://www.w3.org/TR/html-markup/audio.html#audio.attrs.loop
+ * note that loop is either off or infinite under HTML5, unlike Flash which allows arbitrary loop counts to be specified.
+ */
+
+ // <d>
+ if (!a.loop && nLoops > 1) {
+ sm2._wD('Note: Native HTML5 looping is infinite.', 1);
+ }
+ // </d>
+
+ a.loop = (nLoops > 1 ? 'loop' : '');
+
+ };
+
+ this._setup_html5 = function(options) {
+
+ var instanceOptions = mixin(s._iO, options),
+ a = useGlobalHTML5Audio ? globalHTML5Audio : s._a,
+ dURL = decodeURI(instanceOptions.url),
+ sameURL;
+
+ /**
+ * "First things first, I, Poppa..." (reset the previous state of the old sound, if playing)
+ * Fixes case with devices that can only play one sound at a time
+ * Otherwise, other sounds in mid-play will be terminated without warning and in a stuck state
+ */
+
+ if (useGlobalHTML5Audio) {
+
+ if (dURL === decodeURI(lastGlobalHTML5URL)) {
+ // global HTML5 audio: re-use of URL
+ sameURL = true;
+ }
+
+ } else if (dURL === decodeURI(lastURL)) {
+
+ // options URL is the same as the "last" URL, and we used (loaded) it
+ sameURL = true;
+
+ }
+
+ if (a) {
+
+ if (a._s) {
+
+ if (useGlobalHTML5Audio) {
+
+ if (a._s && a._s.playState && !sameURL) {
+
+ // global HTML5 audio case, and loading a new URL. stop the currently-playing one.
+ a._s.stop();
+
+ }
+
+ } else if (!useGlobalHTML5Audio && dURL === decodeURI(lastURL)) {
+
+ // non-global HTML5 reuse case: same url, ignore request
+ s._apply_loop(a, instanceOptions.loops);
+
+ return a;
+
+ }
+
+ }
+
+ if (!sameURL) {
+
+ // don't retain onPosition() stuff with new URLs.
+
+ if (lastURL) {
+ resetProperties(false);
+ }
+
+ // assign new HTML5 URL
+
+ a.src = instanceOptions.url;
+
+ s.url = instanceOptions.url;
+
+ lastURL = instanceOptions.url;
+
+ lastGlobalHTML5URL = instanceOptions.url;
+
+ a._called_load = false;
+
+ }
+
+ } else {
+
+ if (instanceOptions.autoLoad || instanceOptions.autoPlay) {
+
+ s._a = new Audio(instanceOptions.url);
+ s._a.load();
+
+ } else {
+
+ // null for stupid Opera 9.64 case
+ s._a = (isOpera && opera.version() < 10 ? new Audio(null) : new Audio());
+
+ }
+
+ // assign local reference
+ a = s._a;
+
+ a._called_load = false;
+
+ if (useGlobalHTML5Audio) {
+
+ globalHTML5Audio = a;
+
+ }
+
+ }
+
+ s.isHTML5 = true;
+
+ // store a ref on the track
+ s._a = a;
+
+ // store a ref on the audio
+ a._s = s;
+
+ add_html5_events();
+
+ s._apply_loop(a, instanceOptions.loops);
+
+ if (instanceOptions.autoLoad || instanceOptions.autoPlay) {
+
+ s.load();
+
+ } else {
+
+ // early HTML5 implementation (non-standard)
+ a.autobuffer = false;
+
+ // standard ('none' is also an option.)
+ a.preload = 'auto';
+
+ }
+
+ return a;
+
+ };
+
+ add_html5_events = function() {
+
+ if (s._a._added_events) return false;
+
+ var f;
+
+ function add(oEvt, oFn, bCapture) {
+ return s._a ? s._a.addEventListener(oEvt, oFn, bCapture || false) : null;
+ }
+
+ s._a._added_events = true;
+
+ for (f in html5_events) {
+ if (html5_events.hasOwnProperty(f)) {
+ add(f, html5_events[f]);
+ }
+ }
+
+ return true;
+
+ };
+
+ remove_html5_events = function() {
+
+ // Remove event listeners
+
+ var f;
+
+ function remove(oEvt, oFn, bCapture) {
+ return (s._a ? s._a.removeEventListener(oEvt, oFn, bCapture || false) : null);
+ }
+
+ sm2._wD(s.id + ': Removing event listeners');
+ s._a._added_events = false;
+
+ for (f in html5_events) {
+ if (html5_events.hasOwnProperty(f)) {
+ remove(f, html5_events[f]);
+ }
+ }
+
+ };
+
+ /**
+ * Pseudo-private event internals
+ * ------------------------------
+ */
+
+ this._onload = function(nSuccess) {
+
+ var fN,
+ // check for duration to prevent false positives from flash 8 when loading from cache.
+ loadOK = !!nSuccess || (!s.isHTML5 && fV === 8 && s.duration);
+
+ // <d>
+ fN = s.id + ': ';
+ sm2._wD(fN + (loadOK ? 'onload()' : 'Failed to load / invalid sound?' + (!s.duration ? ' Zero-length duration reported.' : ' -') + ' (' + s.url + ')'), (loadOK ? 1 : 2));
+
+ if (!loadOK && !s.isHTML5) {
+ if (sm2.sandbox.noRemote === true) {
+ sm2._wD(fN + str('noNet'), 1);
+ }
+ if (sm2.sandbox.noLocal === true) {
+ sm2._wD(fN + str('noLocal'), 1);
+ }
+ }
+ // </d>
+
+ s.loaded = loadOK;
+ s.readyState = (loadOK ? 3 : 2);
+ s._onbufferchange(0);
+
+ if (!loadOK && !s.isHTML5) {
+ // note: no error code from Flash.
+ s._onerror();
+ }
+
+ if (s._iO.onload) {
+ wrapCallback(s, function() {
+ s._iO.onload.apply(s, [loadOK]);
+ });
+ }
+
+ return true;
+
+ };
+
+ this._onerror = function(errorCode, description) {
+
+ // https://html.spec.whatwg.org/multipage/embedded-content.html#error-codes
+ if (s._iO.onerror) {
+ wrapCallback(s, function() {
+ s._iO.onerror.apply(s, [errorCode, description]);
+ });
+ }
+
+ };
+
+ this._onbufferchange = function(nIsBuffering) {
+
+ // ignore if not playing
+ if (s.playState === 0) return false;
+
+ if ((nIsBuffering && s.isBuffering) || (!nIsBuffering && !s.isBuffering)) return false;
+
+ s.isBuffering = (nIsBuffering === 1);
+
+ if (s._iO.onbufferchange) {
+ sm2._wD(s.id + ': Buffer state change: ' + nIsBuffering);
+ s._iO.onbufferchange.apply(s, [nIsBuffering]);
+ }
+
+ return true;
+
+ };
+
+ /**
+ * Playback may have stopped due to buffering, or related reason.
+ * This state can be encountered on iOS < 6 when auto-play is blocked.
+ */
+
+ this._onsuspend = function() {
+
+ if (s._iO.onsuspend) {
+ sm2._wD(s.id + ': Playback suspended');
+ s._iO.onsuspend.apply(s);
+ }
+
+ return true;
+
+ };
+
+ /**
+ * flash 9/movieStar + RTMP-only method, should fire only once at most
+ * at this point we just recreate failed sounds rather than trying to reconnect
+ */
+
+ this._onfailure = function(msg, level, code) {
+
+ s.failures++;
+ sm2._wD(s.id + ': Failure (' + s.failures + '): ' + msg);
+
+ if (s._iO.onfailure && s.failures === 1) {
+ s._iO.onfailure(msg, level, code);
+ } else {
+ sm2._wD(s.id + ': Ignoring failure');
+ }
+
+ };
+
+ /**
+ * flash 9/movieStar + RTMP-only method for unhandled warnings/exceptions from Flash
+ * e.g., RTMP "method missing" warning (non-fatal) for getStreamLength on server
+ */
+
+ this._onwarning = function(msg, level, code) {
+
+ if (s._iO.onwarning) {
+ s._iO.onwarning(msg, level, code);
+ }
+
+ };
+
+ this._onfinish = function() {
+
+ // store local copy before it gets trashed...
+ var io_onfinish = s._iO.onfinish;
+
+ s._onbufferchange(0);
+ s._resetOnPosition(0);
+
+ // reset some state items
+ if (s.instanceCount) {
+
+ s.instanceCount--;
+
+ if (!s.instanceCount) {
+
+ // remove onPosition listeners, if any
+ detachOnPosition();
+
+ // reset instance options
+ s.playState = 0;
+ s.paused = false;
+ s.instanceCount = 0;
+ s.instanceOptions = {};
+ s._iO = {};
+ stop_html5_timer();
+
+ // reset position, too
+ if (s.isHTML5) {
+ s.position = 0;
+ }
+
+ }
+
+ if (!s.instanceCount || s._iO.multiShotEvents) {
+ // fire onfinish for last, or every instance
+ if (io_onfinish) {
+ sm2._wD(s.id + ': onfinish()');
+ wrapCallback(s, function() {
+ io_onfinish.apply(s);
+ });
+ }
+ }
+
+ }
+
+ };
+
+ this._whileloading = function(nBytesLoaded, nBytesTotal, nDuration, nBufferLength) {
+
+ var instanceOptions = s._iO;
+
+ s.bytesLoaded = nBytesLoaded;
+ s.bytesTotal = nBytesTotal;
+ s.duration = Math.floor(nDuration);
+ s.bufferLength = nBufferLength;
+
+ if (!s.isHTML5 && !instanceOptions.isMovieStar) {
+
+ if (instanceOptions.duration) {
+ // use duration from options, if specified and larger. nobody should be specifying duration in options, actually, and it should be retired.
+ s.durationEstimate = (s.duration > instanceOptions.duration) ? s.duration : instanceOptions.duration;
+ } else {
+ s.durationEstimate = parseInt((s.bytesTotal / s.bytesLoaded) * s.duration, 10);
+ }
+
+ } else {
+
+ s.durationEstimate = s.duration;
+
+ }
+
+ // for flash, reflect sequential-load-style buffering
+ if (!s.isHTML5) {
+ s.buffered = [{
+ start: 0,
+ end: s.duration
+ }];
+ }
+
+ // allow whileloading to fire even if "load" fired under HTML5, due to HTTP range/partials
+ if ((s.readyState !== 3 || s.isHTML5) && instanceOptions.whileloading) {
+ instanceOptions.whileloading.apply(s);
+ }
+
+ };
+
+ this._whileplaying = function(nPosition, oPeakData, oWaveformDataLeft, oWaveformDataRight, oEQData) {
+
+ var instanceOptions = s._iO,
+ eqLeft;
+
+ // flash safety net
+ if (isNaN(nPosition) || nPosition === null) return false;
+
+ // Safari HTML5 play() may return small -ve values when starting from position: 0, eg. -50.120396875. Unexpected/invalid per W3, I think. Normalize to 0.
+ s.position = Math.max(0, nPosition);
+
+ s._processOnPosition();
+
+ if (!s.isHTML5 && fV > 8) {
+
+ if (instanceOptions.usePeakData && oPeakData !== _undefined && oPeakData) {
+ s.peakData = {
+ left: oPeakData.leftPeak,
+ right: oPeakData.rightPeak
+ };
+ }
+
+ if (instanceOptions.useWaveformData && oWaveformDataLeft !== _undefined && oWaveformDataLeft) {
+ s.waveformData = {
+ left: oWaveformDataLeft.split(','),
+ right: oWaveformDataRight.split(',')
+ };
+ }
+
+ if (instanceOptions.useEQData) {
+ if (oEQData !== _undefined && oEQData && oEQData.leftEQ) {
+ eqLeft = oEQData.leftEQ.split(',');
+ s.eqData = eqLeft;
+ s.eqData.left = eqLeft;
+ if (oEQData.rightEQ !== _undefined && oEQData.rightEQ) {
+ s.eqData.right = oEQData.rightEQ.split(',');
+ }
+ }
+ }
+
+ }
+
+ if (s.playState === 1) {
+
+ // special case/hack: ensure buffering is false if loading from cache (and not yet started)
+ if (!s.isHTML5 && fV === 8 && !s.position && s.isBuffering) {
+ s._onbufferchange(0);
+ }
+
+ if (instanceOptions.whileplaying) {
+ // flash may call after actual finish
+ instanceOptions.whileplaying.apply(s);
+ }
+
+ }
+
+ return true;
+
+ };
+
+ this._oncaptiondata = function(oData) {
+
+ /**
+ * internal: flash 9 + NetStream (MovieStar/RTMP-only) feature
+ *
+ * @param {object} oData
+ */
+
+ sm2._wD(s.id + ': Caption data received.');
+
+ s.captiondata = oData;
+
+ if (s._iO.oncaptiondata) {
+ s._iO.oncaptiondata.apply(s, [oData]);
+ }
+
+ };
+
+ this._onmetadata = function(oMDProps, oMDData) {
+
+ /**
+ * internal: flash 9 + NetStream (MovieStar/RTMP-only) feature
+ * RTMP may include song title, MovieStar content may include encoding info
+ *
+ * @param {array} oMDProps (names)
+ * @param {array} oMDData (values)
+ */
+
+ sm2._wD(s.id + ': Metadata received.');
+
+ var oData = {}, i, j;
+
+ for (i = 0, j = oMDProps.length; i < j; i++) {
+ oData[oMDProps[i]] = oMDData[i];
+ }
+
+ s.metadata = oData;
+
+ if (s._iO.onmetadata) {
+ s._iO.onmetadata.call(s, s.metadata);
+ }
+
+ };
+
+ this._onid3 = function(oID3Props, oID3Data) {
+
+ /**
+ * internal: flash 8 + flash 9 ID3 feature
+ * may include artist, song title etc.
+ *
+ * @param {array} oID3Props (names)
+ * @param {array} oID3Data (values)
+ */
+
+ sm2._wD(s.id + ': ID3 data received.');
+
+ var oData = [], i, j;
+
+ for (i = 0, j = oID3Props.length; i < j; i++) {
+ oData[oID3Props[i]] = oID3Data[i];
+ }
+
+ s.id3 = mixin(s.id3, oData);
+
+ if (s._iO.onid3) {
+ s._iO.onid3.apply(s);
+ }
+
+ };
+
+ // flash/RTMP-only
+
+ this._onconnect = function(bSuccess) {
+
+ bSuccess = (bSuccess === 1);
+ sm2._wD(s.id + ': ' + (bSuccess ? 'Connected.' : 'Failed to connect? - ' + s.url), (bSuccess ? 1 : 2));
+ s.connected = bSuccess;
+
+ if (bSuccess) {
+
+ s.failures = 0;
+
+ if (idCheck(s.id)) {
+ if (s.getAutoPlay()) {
+ // only update the play state if auto playing
+ s.play(_undefined, s.getAutoPlay());
+ } else if (s._iO.autoLoad) {
+ s.load();
+ }
+ }
+
+ if (s._iO.onconnect) {
+ s._iO.onconnect.apply(s, [bSuccess]);
+ }
+
+ }
+
+ };
+
+ this._ondataerror = function(sError) {
+
+ // flash 9 wave/eq data handler
+ // hack: called at start, and end from flash at/after onfinish()
+ if (s.playState > 0) {
+ sm2._wD(s.id + ': Data error: ' + sError);
+ if (s._iO.ondataerror) {
+ s._iO.ondataerror.apply(s);
+ }
+ }
+
+ };
+
+ // <d>
+ this._debug();
+ // </d>
+
+ }; // SMSound()
+
+ /**
+ * Private SoundManager internals
+ * ------------------------------
+ */
+
+ getDocument = function() {
+
+ return (doc.body || doc.getElementsByTagName('div')[0]);
+
+ };
+
+ id = function(sID) {
+
+ return doc.getElementById(sID);
+
+ };
+
+ mixin = function(oMain, oAdd) {
+
+ // non-destructive merge
+ var o1 = (oMain || {}), o2, o;
+
+ // if unspecified, o2 is the default options object
+ o2 = (oAdd === _undefined ? sm2.defaultOptions : oAdd);
+
+ for (o in o2) {
+
+ if (o2.hasOwnProperty(o) && o1[o] === _undefined) {
+
+ if (typeof o2[o] !== 'object' || o2[o] === null) {
+
+ // assign directly
+ o1[o] = o2[o];
+
+ } else {
+
+ // recurse through o2
+ o1[o] = mixin(o1[o], o2[o]);
+
+ }
+
+ }
+
+ }
+
+ return o1;
+
+ };
+
+ wrapCallback = function(oSound, callback) {
+
+ /**
+ * 03/03/2013: Fix for Flash Player 11.6.602.171 + Flash 8 (flashVersion = 8) SWF issue
+ * setTimeout() fix for certain SMSound callbacks like onload() and onfinish(), where subsequent calls like play() and load() fail when Flash Player 11.6.602.171 is installed, and using soundManager with flashVersion = 8 (which is the default).
+ * Not sure of exact cause. Suspect race condition and/or invalid (NaN-style) position argument trickling down to the next JS -> Flash _start() call, in the play() case.
+ * Fix: setTimeout() to yield, plus safer null / NaN checking on position argument provided to Flash.
+ * https://getsatisfaction.com/schillmania/topics/recent_chrome_update_seems_to_have_broken_my_sm2_audio_player
+ */
+ if (!oSound.isHTML5 && fV === 8) {
+ window.setTimeout(callback, 0);
+ } else {
+ callback();
+ }
+
+ };
+
+ // additional soundManager properties that soundManager.setup() will accept
+
+ extraOptions = {
+ onready: 1,
+ ontimeout: 1,
+ defaultOptions: 1,
+ flash9Options: 1,
+ movieStarOptions: 1
+ };
+
+ assign = function(o, oParent) {
+
+ /**
+ * recursive assignment of properties, soundManager.setup() helper
+ * allows property assignment based on whitelist
+ */
+
+ var i,
+ result = true,
+ hasParent = (oParent !== _undefined),
+ setupOptions = sm2.setupOptions,
+ bonusOptions = extraOptions;
+
+ // <d>
+
+ // if soundManager.setup() called, show accepted parameters.
+
+ if (o === _undefined) {
+
+ result = [];
+
+ for (i in setupOptions) {
+
+ if (setupOptions.hasOwnProperty(i)) {
+ result.push(i);
+ }
+
+ }
+
+ for (i in bonusOptions) {
+
+ if (bonusOptions.hasOwnProperty(i)) {
+
+ if (typeof sm2[i] === 'object') {
+ result.push(i + ': {...}');
+ } else if (sm2[i] instanceof Function) {
+ result.push(i + ': function() {...}');
+ } else {
+ result.push(i);
+ }
+
+ }
+
+ }
+
+ sm2._wD(str('setup', result.join(', ')));
+
+ return false;
+
+ }
+
+ // </d>
+
+ for (i in o) {
+
+ if (o.hasOwnProperty(i)) {
+
+ // if not an {object} we want to recurse through...
+
+ if (typeof o[i] !== 'object' || o[i] === null || o[i] instanceof Array || o[i] instanceof RegExp) {
+
+ // check "allowed" options
+
+ if (hasParent && bonusOptions[oParent] !== _undefined) {
+
+ // valid recursive / nested object option, eg., { defaultOptions: { volume: 50 } }
+ sm2[oParent][i] = o[i];
+
+ } else if (setupOptions[i] !== _undefined) {
+
+ // special case: assign to setupOptions object, which soundManager property references
+ sm2.setupOptions[i] = o[i];
+
+ // assign directly to soundManager, too
+ sm2[i] = o[i];
+
+ } else if (bonusOptions[i] === _undefined) {
+
+ // invalid or disallowed parameter. complain.
+ complain(str((sm2[i] === _undefined ? 'setupUndef' : 'setupError'), i), 2);
+
+ result = false;
+
+ } else if (sm2[i] instanceof Function) {
+
+ /**
+ * valid extraOptions (bonusOptions) parameter.
+ * is it a method, like onready/ontimeout? call it.
+ * multiple parameters should be in an array, eg. soundManager.setup({onready: [myHandler, myScope]});
+ */
+ sm2[i].apply(sm2, (o[i] instanceof Array ? o[i] : [o[i]]));
+
+ } else {
+
+ // good old-fashioned direct assignment
+ sm2[i] = o[i];
+
+ }
+
+ } else if (bonusOptions[i] === _undefined) {
+
+ // recursion case, eg., { defaultOptions: { ... } }
+
+ // invalid or disallowed parameter. complain.
+ complain(str((sm2[i] === _undefined ? 'setupUndef' : 'setupError'), i), 2);
+
+ result = false;
+
+ } else {
+
+ // recurse through object
+ return assign(o[i], i);
+
+ }
+
+ }
+
+ }
+
+ return result;
+
+ };
+
+ function preferFlashCheck(kind) {
+
+ // whether flash should play a given type
+ return (sm2.preferFlash && hasFlash && !sm2.ignoreFlash && (sm2.flash[kind] !== _undefined && sm2.flash[kind]));
+
+ }
+
+ /**
+ * Internal DOM2-level event helpers
+ * ---------------------------------
+ */
+
+ event = (function() {
+
+ // normalize event methods
+ var old = (window.attachEvent),
+ evt = {
+ add: (old ? 'attachEvent' : 'addEventListener'),
+ remove: (old ? 'detachEvent' : 'removeEventListener')
+ };
+
+ // normalize "on" event prefix, optional capture argument
+ function getArgs(oArgs) {
+
+ var args = slice.call(oArgs),
+ len = args.length;
+
+ if (old) {
+ // prefix
+ args[1] = 'on' + args[1];
+ if (len > 3) {
+ // no capture
+ args.pop();
+ }
+ } else if (len === 3) {
+ args.push(false);
+ }
+
+ return args;
+
+ }
+
+ function apply(args, sType) {
+
+ // normalize and call the event method, with the proper arguments
+ var element = args.shift(),
+ method = [evt[sType]];
+
+ if (old) {
+ // old IE can't do apply().
+ element[method](args[0], args[1]);
+ } else {
+ element[method].apply(element, args);
+ }
+
+ }
+
+ function add() {
+ apply(getArgs(arguments), 'add');
+ }
+
+ function remove() {
+ apply(getArgs(arguments), 'remove');
+ }
+
+ return {
+ add: add,
+ remove: remove
+ };
+
+ }());
+
+ /**
+ * Internal HTML5 event handling
+ * -----------------------------
+ */
+
+ function html5_event(oFn) {
+
+ // wrap html5 event handlers so we don't call them on destroyed and/or unloaded sounds
+
+ return function(e) {
+
+ var s = this._s,
+ result;
+
+ if (!s || !s._a) {
+ // <d>
+ if (s && s.id) {
+ sm2._wD(s.id + ': Ignoring ' + e.type);
+ } else {
+ sm2._wD(h5 + 'Ignoring ' + e.type);
+ }
+ // </d>
+ result = null;
+ } else {
+ result = oFn.call(this, e);
+ }
+
+ return result;
+
+ };
+
+ }
+
+ html5_events = {
+
+ // HTML5 event-name-to-handler map
+
+ abort: html5_event(function() {
+
+ sm2._wD(this._s.id + ': abort');
+
+ }),
+
+ // enough has loaded to play
+
+ canplay: html5_event(function() {
+
+ var s = this._s,
+ position1K;
+
+ if (s._html5_canplay) {
+ // this event has already fired. ignore.
+ return;
+ }
+
+ s._html5_canplay = true;
+ sm2._wD(s.id + ': canplay');
+ s._onbufferchange(0);
+
+ // position according to instance options
+ position1K = (s._iO.position !== _undefined && !isNaN(s._iO.position) ? s._iO.position / msecScale : null);
+
+ // set the position if position was provided before the sound loaded
+ if (this.currentTime !== position1K) {
+ sm2._wD(s.id + ': canplay: Setting position to ' + position1K);
+ try {
+ this.currentTime = position1K;
+ } catch(ee) {
+ sm2._wD(s.id + ': canplay: Setting position of ' + position1K + ' failed: ' + ee.message, 2);
+ }
+ }
+
+ // hack for HTML5 from/to case
+ if (s._iO._oncanplay) {
+ s._iO._oncanplay();
+ }
+
+ }),
+
+ canplaythrough: html5_event(function() {
+
+ var s = this._s;
+
+ if (!s.loaded) {
+ s._onbufferchange(0);
+ s._whileloading(s.bytesLoaded, s.bytesTotal, s._get_html5_duration());
+ s._onload(true);
+ }
+
+ }),
+
+ durationchange: html5_event(function() {
+
+ // durationchange may fire at various times, probably the safest way to capture accurate/final duration.
+
+ var s = this._s,
+ duration;
+
+ duration = s._get_html5_duration();
+
+ if (!isNaN(duration) && duration !== s.duration) {
+
+ sm2._wD(this._s.id + ': durationchange (' + duration + ')' + (s.duration ? ', previously ' + s.duration : ''));
+
+ s.durationEstimate = s.duration = duration;
+
+ }
+
+ }),
+
+ // TODO: Reserved for potential use
+ /*
+ emptied: html5_event(function() {
+
+ sm2._wD(this._s.id + ': emptied');
+
+ }),
+ */
+
+ ended: html5_event(function() {
+
+ var s = this._s;
+
+ sm2._wD(s.id + ': ended');
+
+ s._onfinish();
+
+ }),
+
+ error: html5_event(function() {
+
+ var description = (html5ErrorCodes[this.error.code] || null);
+ sm2._wD(this._s.id + ': HTML5 error, code ' + this.error.code + (description ? ' (' + description + ')' : ''));
+ this._s._onload(false);
+ this._s._onerror(this.error.code, description);
+
+ }),
+
+ loadeddata: html5_event(function() {
+
+ var s = this._s;
+
+ sm2._wD(s.id + ': loadeddata');
+
+ // safari seems to nicely report progress events, eventually totalling 100%
+ if (!s._loaded && !isSafari) {
+ s.duration = s._get_html5_duration();
+ }
+
+ }),
+
+ loadedmetadata: html5_event(function() {
+
+ sm2._wD(this._s.id + ': loadedmetadata');
+
+ }),
+
+ loadstart: html5_event(function() {
+
+ sm2._wD(this._s.id + ': loadstart');
+ // assume buffering at first
+ this._s._onbufferchange(1);
+
+ }),
+
+ play: html5_event(function() {
+
+ // sm2._wD(this._s.id + ': play()');
+ // once play starts, no buffering
+ this._s._onbufferchange(0);
+
+ }),
+
+ playing: html5_event(function() {
+
+ sm2._wD(this._s.id + ': playing ' + String.fromCharCode(9835));
+ // once play starts, no buffering
+ this._s._onbufferchange(0);
+
+ }),
+
+ progress: html5_event(function(e) {
+
+ // note: can fire repeatedly after "loaded" event, due to use of HTTP range/partials
+
+ var s = this._s,
+ i, j, progStr, buffered = 0,
+ isProgress = (e.type === 'progress'),
+ ranges = e.target.buffered,
+ // firefox 3.6 implements e.loaded/total (bytes)
+ loaded = (e.loaded || 0),
+ total = (e.total || 1);
+
+ // reset the "buffered" (loaded byte ranges) array
+ s.buffered = [];
+
+ if (ranges && ranges.length) {
+
+ // if loaded is 0, try TimeRanges implementation as % of load
+ // https://developer.mozilla.org/en/DOM/TimeRanges
+
+ // re-build "buffered" array
+ // HTML5 returns seconds. SM2 API uses msec for setPosition() etc., whether Flash or HTML5.
+ for (i = 0, j = ranges.length; i < j; i++) {
+ s.buffered.push({
+ start: ranges.start(i) * msecScale,
+ end: ranges.end(i) * msecScale
+ });
+ }
+
+ // use the last value locally
+ buffered = (ranges.end(0) - ranges.start(0)) * msecScale;
+
+ // linear case, buffer sum; does not account for seeking and HTTP partials / byte ranges
+ loaded = Math.min(1, buffered / (e.target.duration * msecScale));
+
+ // <d>
+ if (isProgress && ranges.length > 1) {
+ progStr = [];
+ j = ranges.length;
+ for (i = 0; i < j; i++) {
+ progStr.push((e.target.buffered.start(i) * msecScale) + '-' + (e.target.buffered.end(i) * msecScale));
+ }
+ sm2._wD(this._s.id + ': progress, timeRanges: ' + progStr.join(', '));
+ }
+
+ if (isProgress && !isNaN(loaded)) {
+ sm2._wD(this._s.id + ': progress, ' + Math.floor(loaded * 100) + '% loaded');
+ }
+ // </d>
+
+ }
+
+ if (!isNaN(loaded)) {
+
+ // TODO: prevent calls with duplicate values.
+ s._whileloading(loaded, total, s._get_html5_duration());
+ if (loaded && total && loaded === total) {
+ // in case "onload" doesn't fire (eg. gecko 1.9.2)
+ html5_events.canplaythrough.call(this, e);
+ }
+
+ }
+
+ }),
+
+ ratechange: html5_event(function() {
+
+ sm2._wD(this._s.id + ': ratechange');
+
+ }),
+
+ suspend: html5_event(function(e) {
+
+ // download paused/stopped, may have finished (eg. onload)
+ var s = this._s;
+
+ sm2._wD(this._s.id + ': suspend');
+ html5_events.progress.call(this, e);
+ s._onsuspend();
+
+ }),
+
+ stalled: html5_event(function() {
+
+ sm2._wD(this._s.id + ': stalled');
+
+ }),
+
+ timeupdate: html5_event(function() {
+
+ this._s._onTimer();
+
+ }),
+
+ waiting: html5_event(function() {
+
+ var s = this._s;
+
+ // see also: seeking
+ sm2._wD(this._s.id + ': waiting');
+
+ // playback faster than download rate, etc.
+ s._onbufferchange(1);
+
+ })
+
+ };
+
+ html5OK = function(iO) {
+
+ // playability test based on URL or MIME type
+
+ var result;
+
+ if (!iO || (!iO.type && !iO.url && !iO.serverURL)) {
+
+ // nothing to check
+ result = false;
+
+ } else if (iO.serverURL || (iO.type && preferFlashCheck(iO.type))) {
+
+ // RTMP, or preferring flash
+ result = false;
+
+ } else {
+
+ // Use type, if specified. Pass data: URIs to HTML5. If HTML5-only mode, no other options, so just give 'er
+ result = ((iO.type ? html5CanPlay({ type: iO.type }) : html5CanPlay({ url: iO.url }) || sm2.html5Only || iO.url.match(/data:/i)));
+
+ }
+
+ return result;
+
+ };
+
+ html5Unload = function(oAudio) {
+
+ /**
+ * Internal method: Unload media, and cancel any current/pending network requests.
+ * Firefox can load an empty URL, which allegedly destroys the decoder and stops the download.
+ * https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox#Stopping_the_download_of_media
+ * However, Firefox has been seen loading a relative URL from '' and thus requesting the hosting page on unload.
+ * Other UA behaviour is unclear, so everyone else gets an about:blank-style URL.
+ */
+
+ var url;
+
+ if (oAudio) {
+
+ // Firefox and Chrome accept short WAVe data: URIs. Chome dislikes audio/wav, but accepts audio/wav for data: MIME.
+ // Desktop Safari complains / fails on data: URI, so it gets about:blank.
+ url = (isSafari ? emptyURL : (sm2.html5.canPlayType('audio/wav') ? emptyWAV : emptyURL));
+
+ oAudio.src = url;
+
+ // reset some state, too
+ if (oAudio._called_unload !== _undefined) {
+ oAudio._called_load = false;
+ }
+
+ }
+
+ if (useGlobalHTML5Audio) {
+
+ // ensure URL state is trashed, also
+ lastGlobalHTML5URL = null;
+
+ }
+
+ return url;
+
+ };
+
+ html5CanPlay = function(o) {
+
+ /**
+ * Try to find MIME, test and return truthiness
+ * o = {
+ * url: '/path/to/an.mp3',
+ * type: 'audio/mp3'
+ * }
+ */
+
+ if (!sm2.useHTML5Audio || !sm2.hasHTML5) return false;
+
+ var url = (o.url || null),
+ mime = (o.type || null),
+ aF = sm2.audioFormats,
+ result,
+ offset,
+ fileExt,
+ item;
+
+ // account for known cases like audio/mp3
+
+ if (mime && sm2.html5[mime] !== _undefined) return (sm2.html5[mime] && !preferFlashCheck(mime));
+
+ if (!html5Ext) {
+
+ html5Ext = [];
+
+ for (item in aF) {
+
+ if (aF.hasOwnProperty(item)) {
+
+ html5Ext.push(item);
+
+ if (aF[item].related) {
+ html5Ext = html5Ext.concat(aF[item].related);
+ }
+
+ }
+
+ }
+
+ html5Ext = new RegExp('\\.(' + html5Ext.join('|') + ')(\\?.*)?$', 'i');
+
+ }
+
+ // TODO: Strip URL queries, etc.
+ fileExt = (url ? url.toLowerCase().match(html5Ext) : null);
+
+ if (!fileExt || !fileExt.length) {
+
+ if (!mime) {
+
+ result = false;
+
+ } else {
+
+ // audio/mp3 -> mp3, result should be known
+ offset = mime.indexOf(';');
+
+ // strip "audio/X; codecs..."
+ fileExt = (offset !== -1 ? mime.substr(0, offset) : mime).substr(6);
+
+ }
+
+ } else {
+
+ // match the raw extension name - "mp3", for example
+ fileExt = fileExt[1];
+
+ }
+
+ if (fileExt && sm2.html5[fileExt] !== _undefined) {
+
+ // result known
+ result = (sm2.html5[fileExt] && !preferFlashCheck(fileExt));
+
+ } else {
+
+ mime = 'audio/' + fileExt;
+ result = sm2.html5.canPlayType({ type: mime });
+
+ sm2.html5[fileExt] = result;
+
+ // sm2._wD('canPlayType, found result: ' + result);
+ result = (result && sm2.html5[mime] && !preferFlashCheck(mime));
+ }
+
+ return result;
+
+ };
+
+ testHTML5 = function() {
+
+ /**
+ * Internal: Iterates over audioFormats, determining support eg. audio/mp3, audio/mpeg and so on
+ * assigns results to html5[] and flash[].
+ */
+
+ if (!sm2.useHTML5Audio || !sm2.hasHTML5) {
+
+ // without HTML5, we need Flash.
+ sm2.html5.usingFlash = true;
+ needsFlash = true;
+
+ return false;
+
+ }
+
+ // double-whammy: Opera 9.64 throws WRONG_ARGUMENTS_ERR if no parameter passed to Audio(), and Webkit + iOS happily tries to load "null" as a URL. :/
+ var a = (Audio !== _undefined ? (isOpera && opera.version() < 10 ? new Audio(null) : new Audio()) : null),
+ item, lookup, support = {}, aF, i;
+
+ function cp(m) {
+
+ var canPlay, j,
+ result = false,
+ isOK = false;
+
+ if (!a || typeof a.canPlayType !== 'function') return result;
+
+ if (m instanceof Array) {
+
+ // iterate through all mime types, return any successes
+
+ for (i = 0, j = m.length; i < j; i++) {
+
+ if (sm2.html5[m[i]] || a.canPlayType(m[i]).match(sm2.html5Test)) {
+
+ isOK = true;
+ sm2.html5[m[i]] = true;
+
+ // note flash support, too
+ sm2.flash[m[i]] = !!(m[i].match(flashMIME));
+
+ }
+
+ }
+
+ result = isOK;
+
+ } else {
+
+ canPlay = (a && typeof a.canPlayType === 'function' ? a.canPlayType(m) : false);
+ result = !!(canPlay && (canPlay.match(sm2.html5Test)));
+
+ }
+
+ return result;
+
+ }
+
+ // test all registered formats + codecs
+
+ aF = sm2.audioFormats;
+
+ for (item in aF) {
+
+ if (aF.hasOwnProperty(item)) {
+
+ lookup = 'audio/' + item;
+
+ support[item] = cp(aF[item].type);
+
+ // write back generic type too, eg. audio/mp3
+ support[lookup] = support[item];
+
+ // assign flash
+ if (item.match(flashMIME)) {
+
+ sm2.flash[item] = true;
+ sm2.flash[lookup] = true;
+
+ } else {
+
+ sm2.flash[item] = false;
+ sm2.flash[lookup] = false;
+
+ }
+
+ // assign result to related formats, too
+
+ if (aF[item] && aF[item].related) {
+
+ for (i = aF[item].related.length - 1; i >= 0; i--) {
+
+ // eg. audio/m4a
+ support['audio/' + aF[item].related[i]] = support[item];
+ sm2.html5[aF[item].related[i]] = support[item];
+ sm2.flash[aF[item].related[i]] = support[item];
+
+ }
+
+ }
+
+ }
+
+ }
+
+ support.canPlayType = (a ? cp : null);
+ sm2.html5 = mixin(sm2.html5, support);
+
+ sm2.html5.usingFlash = featureCheck();
+ needsFlash = sm2.html5.usingFlash;
+
+ return true;
+
+ };
+
+ strings = {
+
+ // <d>
+ notReady: 'Unavailable - wait until onready() has fired.',
+ notOK: 'Audio support is not available.',
+ domError: sm + 'exception caught while appending SWF to DOM.',
+ spcWmode: 'Removing wmode, preventing known SWF loading issue(s)',
+ swf404: smc + 'Verify that %s is a valid path.',
+ tryDebug: 'Try ' + sm + '.debugFlash = true for more security details (output goes to SWF.)',
+ checkSWF: 'See SWF output for more debug info.',
+ localFail: smc + 'Non-HTTP page (' + doc.location.protocol + ' URL?) Review Flash player security settings for this special case:\nhttp://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html\nMay need to add/allow path, eg. c:/sm2/ or /users/me/sm2/',
+ waitFocus: smc + 'Special case: Waiting for SWF to load with window focus...',
+ waitForever: smc + 'Waiting indefinitely for Flash (will recover if unblocked)...',
+ waitSWF: smc + 'Waiting for 100% SWF load...',
+ needFunction: smc + 'Function object expected for %s',
+ badID: 'Sound ID "%s" should be a string, starting with a non-numeric character',
+ currentObj: smc + '_debug(): Current sound objects',
+ waitOnload: smc + 'Waiting for window.onload()',
+ docLoaded: smc + 'Document already loaded',
+ onload: smc + 'initComplete(): calling soundManager.onload()',
+ onloadOK: sm + '.onload() complete',
+ didInit: smc + 'init(): Already called?',
+ secNote: 'Flash security note: Network/internet URLs will not load due to security restrictions. Access can be configured via Flash Player Global Security Settings Page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html',
+ badRemove: smc + 'Failed to remove Flash node.',
+ shutdown: sm + '.disable(): Shutting down',
+ queue: smc + 'Queueing %s handler',
+ smError: 'SMSound.load(): Exception: JS-Flash communication failed, or JS error.',
+ fbTimeout: 'No flash response, applying .' + swfCSS.swfTimedout + ' CSS...',
+ fbLoaded: 'Flash loaded',
+ fbHandler: smc + 'flashBlockHandler()',
+ manURL: 'SMSound.load(): Using manually-assigned URL',
+ onURL: sm + '.load(): current URL already assigned.',
+ badFV: sm + '.flashVersion must be 8 or 9. "%s" is invalid. Reverting to %s.',
+ as2loop: 'Note: Setting stream:false so looping can work (flash 8 limitation)',
+ noNSLoop: 'Note: Looping not implemented for MovieStar formats',
+ needfl9: 'Note: Switching to flash 9, required for MP4 formats.',
+ mfTimeout: 'Setting flashLoadTimeout = 0 (infinite) for off-screen, mobile flash case',
+ needFlash: smc + 'Fatal error: Flash is needed to play some required formats, but is not available.',
+ gotFocus: smc + 'Got window focus.',
+ policy: 'Enabling usePolicyFile for data access',
+ setup: sm + '.setup(): allowed parameters: %s',
+ setupError: sm + '.setup(): "%s" cannot be assigned with this method.',
+ setupUndef: sm + '.setup(): Could not find option "%s"',
+ setupLate: sm + '.setup(): url, flashVersion and html5Test property changes will not take effect until reboot().',
+ noURL: smc + 'Flash URL required. Call soundManager.setup({url:...}) to get started.',
+ sm2Loaded: 'SoundManager 2: Ready. ' + String.fromCharCode(10003),
+ reset: sm + '.reset(): Removing event callbacks',
+ mobileUA: 'Mobile UA detected, preferring HTML5 by default.',
+ globalHTML5: 'Using singleton HTML5 Audio() pattern for this device.',
+ ignoreMobile: 'Ignoring mobile restrictions for this device.'
+ // </d>
+
+ };
+
+ str = function() {
+
+ // internal string replace helper.
+ // arguments: o [,items to replace]
+ // <d>
+
+ var args,
+ i, j, o,
+ sstr;
+
+ // real array, please
+ args = slice.call(arguments);
+
+ // first argument
+ o = args.shift();
+
+ sstr = (strings && strings[o] ? strings[o] : '');
+
+ if (sstr && args && args.length) {
+ for (i = 0, j = args.length; i < j; i++) {
+ sstr = sstr.replace('%s', args[i]);
+ }
+ }
+
+ return sstr;
+ // </d>
+
+ };
+
+ loopFix = function(sOpt) {
+
+ // flash 8 requires stream = false for looping to work
+ if (fV === 8 && sOpt.loops > 1 && sOpt.stream) {
+ _wDS('as2loop');
+ sOpt.stream = false;
+ }
+
+ return sOpt;
+
+ };
+
+ policyFix = function(sOpt, sPre) {
+
+ if (sOpt && !sOpt.usePolicyFile && (sOpt.onid3 || sOpt.usePeakData || sOpt.useWaveformData || sOpt.useEQData)) {
+ sm2._wD((sPre || '') + str('policy'));
+ sOpt.usePolicyFile = true;
+ }
+
+ return sOpt;
+
+ };
+
+ complain = function(sMsg) {
+
+ // <d>
+ if (hasConsole && console.warn !== _undefined) {
+ console.warn(sMsg);
+ } else {
+ sm2._wD(sMsg);
+ }
+ // </d>
+
+ };
+
+ doNothing = function() {
+
+ return false;
+
+ };
+
+ disableObject = function(o) {
+
+ var oProp;
+
+ for (oProp in o) {
+ if (o.hasOwnProperty(oProp) && typeof o[oProp] === 'function') {
+ o[oProp] = doNothing;
+ }
+ }
+
+ oProp = null;
+
+ };
+
+ failSafely = function(bNoDisable) {
+
+ // general failure exception handler
+
+ if (bNoDisable === _undefined) {
+ bNoDisable = false;
+ }
+
+ if (disabled || bNoDisable) {
+ sm2.disable(bNoDisable);
+ }
+
+ };
+
+ normalizeMovieURL = function(movieURL) {
+
+ var urlParams = null, url;
+
+ if (movieURL) {
+
+ if (movieURL.match(/\.swf(\?.*)?$/i)) {
+
+ urlParams = movieURL.substr(movieURL.toLowerCase().lastIndexOf('.swf?') + 4);
+
+ // assume user knows what they're doing
+ if (urlParams) return movieURL;
+
+ } else if (movieURL.lastIndexOf('/') !== movieURL.length - 1) {
+
+ // append trailing slash, if needed
+ movieURL += '/';
+
+ }
+
+ }
+
+ url = (movieURL && movieURL.lastIndexOf('/') !== -1 ? movieURL.substr(0, movieURL.lastIndexOf('/') + 1) : './') + sm2.movieURL;
+
+ if (sm2.noSWFCache) {
+ url += ('?ts=' + new Date().getTime());
+ }
+
+ return url;
+
+ };
+
+ setVersionInfo = function() {
+
+ // short-hand for internal use
+
+ fV = parseInt(sm2.flashVersion, 10);
+
+ if (fV !== 8 && fV !== 9) {
+ sm2._wD(str('badFV', fV, defaultFlashVersion));
+ sm2.flashVersion = fV = defaultFlashVersion;
+ }
+
+ // debug flash movie, if applicable
+
+ var isDebug = (sm2.debugMode || sm2.debugFlash ? '_debug.swf' : '.swf');
+
+ if (sm2.useHTML5Audio && !sm2.html5Only && sm2.audioFormats.mp4.required && fV < 9) {
+ sm2._wD(str('needfl9'));
+ sm2.flashVersion = fV = 9;
+ }
+
+ sm2.version = sm2.versionNumber + (sm2.html5Only ? ' (HTML5-only mode)' : (fV === 9 ? ' (AS3/Flash 9)' : ' (AS2/Flash 8)'));
+
+ // set up default options
+ if (fV > 8) {
+
+ // +flash 9 base options
+ sm2.defaultOptions = mixin(sm2.defaultOptions, sm2.flash9Options);
+ sm2.features.buffering = true;
+
+ // +moviestar support
+ sm2.defaultOptions = mixin(sm2.defaultOptions, sm2.movieStarOptions);
+ sm2.filePatterns.flash9 = new RegExp('\\.(mp3|' + netStreamTypes.join('|') + ')(\\?.*)?$', 'i');
+ sm2.features.movieStar = true;
+
+ } else {
+
+ sm2.features.movieStar = false;
+
+ }
+
+ // regExp for flash canPlay(), etc.
+ sm2.filePattern = sm2.filePatterns[(fV !== 8 ? 'flash9' : 'flash8')];
+
+ // if applicable, use _debug versions of SWFs
+ sm2.movieURL = (fV === 8 ? 'soundmanager2.swf' : 'soundmanager2_flash9.swf').replace('.swf', isDebug);
+
+ sm2.features.peakData = sm2.features.waveformData = sm2.features.eqData = (fV > 8);
+
+ };
+
+ setPolling = function(bPolling, bHighPerformance) {
+
+ if (!flash) {
+ return;
+ }
+
+ flash._setPolling(bPolling, bHighPerformance);
+
+ };
+
+ initDebug = function() {
+
+ // starts debug mode, creating output <div> for UAs without console object
+
+ // allow force of debug mode via URL
+ // <d>
+ if (sm2.debugURLParam.test(wl)) {
+ sm2.setupOptions.debugMode = sm2.debugMode = true;
+ }
+
+ if (id(sm2.debugID)) {
+ return;
+ }
+
+ var oD, oDebug, oTarget, oToggle, tmp;
+
+ if (sm2.debugMode && !id(sm2.debugID) && (!hasConsole || !sm2.useConsole || !sm2.consoleOnly)) {
+
+ oD = doc.createElement('div');
+ oD.id = sm2.debugID + '-toggle';
+
+ oToggle = {
+ position: 'fixed',
+ bottom: '0px',
+ right: '0px',
+ width: '1.2em',
+ height: '1.2em',
+ lineHeight: '1.2em',
+ margin: '2px',
+ textAlign: 'center',
+ border: '1px solid #999',
+ cursor: 'pointer',
+ background: '#fff',
+ color: '#333',
+ zIndex: 10001
+ };
+
+ oD.appendChild(doc.createTextNode('-'));
+ oD.onclick = toggleDebug;
+ oD.title = 'Toggle SM2 debug console';
+
+ if (ua.match(/msie 6/i)) {
+ oD.style.position = 'absolute';
+ oD.style.cursor = 'hand';
+ }
+
+ for (tmp in oToggle) {
+ if (oToggle.hasOwnProperty(tmp)) {
+ oD.style[tmp] = oToggle[tmp];
+ }
+ }
+
+ oDebug = doc.createElement('div');
+ oDebug.id = sm2.debugID;
+ oDebug.style.display = (sm2.debugMode ? 'block' : 'none');
+
+ if (sm2.debugMode && !id(oD.id)) {
+ try {
+ oTarget = getDocument();
+ oTarget.appendChild(oD);
+ } catch(e2) {
+ throw new Error(str('domError') + ' \n' + e2.toString());
+ }
+ oTarget.appendChild(oDebug);
+ }
+
+ }
+
+ oTarget = null;
+ // </d>
+
+ };
+
+ idCheck = this.getSoundById;
+
+ // <d>
+ _wDS = function(o, errorLevel) {
+
+ return (!o ? '' : sm2._wD(str(o), errorLevel));
+
+ };
+
+ toggleDebug = function() {
+
+ var o = id(sm2.debugID),
+ oT = id(sm2.debugID + '-toggle');
+
+ if (!o) {
+ return;
+ }
+
+ if (debugOpen) {
+ // minimize
+ oT.innerHTML = '+';
+ o.style.display = 'none';
+ } else {
+ oT.innerHTML = '-';
+ o.style.display = 'block';
+ }
+
+ debugOpen = !debugOpen;
+
+ };
+
+ debugTS = function(sEventType, bSuccess, sMessage) {
+
+ // troubleshooter debug hooks
+
+ if (window.sm2Debugger !== _undefined) {
+ try {
+ sm2Debugger.handleEvent(sEventType, bSuccess, sMessage);
+ } catch(e) {
+ // oh well
+ return false;
+ }
+ }
+
+ return true;
+
+ };
+ // </d>
+
+ getSWFCSS = function() {
+
+ var css = [];
+
+ if (sm2.debugMode) {
+ css.push(swfCSS.sm2Debug);
+ }
+
+ if (sm2.debugFlash) {
+ css.push(swfCSS.flashDebug);
+ }
+
+ if (sm2.useHighPerformance) {
+ css.push(swfCSS.highPerf);
+ }
+
+ return css.join(' ');
+
+ };
+
+ flashBlockHandler = function() {
+
+ // *possible* flash block situation.
+
+ var name = str('fbHandler'),
+ p = sm2.getMoviePercent(),
+ css = swfCSS,
+ error = {
+ type: 'FLASHBLOCK'
+ };
+
+ if (sm2.html5Only) {
+ // no flash, or unused
+ return;
+ }
+
+ if (!sm2.ok()) {
+
+ if (needsFlash) {
+ // make the movie more visible, so user can fix
+ sm2.oMC.className = getSWFCSS() + ' ' + css.swfDefault + ' ' + (p === null ? css.swfTimedout : css.swfError);
+ sm2._wD(name + ': ' + str('fbTimeout') + (p ? ' (' + str('fbLoaded') + ')' : ''));
+ }
+
+ sm2.didFlashBlock = true;
+
+ // fire onready(), complain lightly
+ processOnEvents({
+ type: 'ontimeout',
+ ignoreInit: true,
+ error: error
+ });
+
+ catchError(error);
+
+ } else {
+
+ // SM2 loaded OK (or recovered)
+
+ // <d>
+ if (sm2.didFlashBlock) {
+ sm2._wD(name + ': Unblocked');
+ }
+ // </d>
+
+ if (sm2.oMC) {
+ sm2.oMC.className = [getSWFCSS(), css.swfDefault, css.swfLoaded + (sm2.didFlashBlock ? ' ' + css.swfUnblocked : '')].join(' ');
+ }
+
+ }
+
+ };
+
+ addOnEvent = function(sType, oMethod, oScope) {
+
+ if (on_queue[sType] === _undefined) {
+ on_queue[sType] = [];
+ }
+
+ on_queue[sType].push({
+ method: oMethod,
+ scope: (oScope || null),
+ fired: false
+ });
+
+ };
+
+ processOnEvents = function(oOptions) {
+
+ // if unspecified, assume OK/error
+
+ if (!oOptions) {
+ oOptions = {
+ type: (sm2.ok() ? 'onready' : 'ontimeout')
+ };
+ }
+
+ // not ready yet.
+ if (!didInit && oOptions && !oOptions.ignoreInit) return false;
+
+ // invalid case
+ if (oOptions.type === 'ontimeout' && (sm2.ok() || (disabled && !oOptions.ignoreInit))) return false;
+
+ var status = {
+ success: (oOptions && oOptions.ignoreInit ? sm2.ok() : !disabled)
+ },
+
+ // queue specified by type, or none
+ srcQueue = (oOptions && oOptions.type ? on_queue[oOptions.type] || [] : []),
+
+ queue = [], i, j,
+ args = [status],
+ canRetry = (needsFlash && !sm2.ok());
+
+ if (oOptions.error) {
+ args[0].error = oOptions.error;
+ }
+
+ for (i = 0, j = srcQueue.length; i < j; i++) {
+ if (srcQueue[i].fired !== true) {
+ queue.push(srcQueue[i]);
+ }
+ }
+
+ if (queue.length) {
+
+ // sm2._wD(sm + ': Firing ' + queue.length + ' ' + oOptions.type + '() item' + (queue.length === 1 ? '' : 's'));
+ for (i = 0, j = queue.length; i < j; i++) {
+
+ if (queue[i].scope) {
+ queue[i].method.apply(queue[i].scope, args);
+ } else {
+ queue[i].method.apply(this, args);
+ }
+
+ if (!canRetry) {
+ // useFlashBlock and SWF timeout case doesn't count here.
+ queue[i].fired = true;
+
+ }
+
+ }
+
+ }
+
+ return true;
+
+ };
+
+ initUserOnload = function() {
+
+ window.setTimeout(function() {
+
+ if (sm2.useFlashBlock) {
+ flashBlockHandler();
+ }
+
+ processOnEvents();
+
+ // call user-defined "onload", scoped to window
+
+ if (typeof sm2.onload === 'function') {
+ _wDS('onload', 1);
+ sm2.onload.apply(window);
+ _wDS('onloadOK', 1);
+ }
+
+ if (sm2.waitForWindowLoad) {
+ event.add(window, 'load', initUserOnload);
+ }
+
+ }, 1);
+
+ };
+
+ detectFlash = function() {
+
+ /**
+ * Hat tip: Flash Detect library (BSD, (C) 2007) by Carl "DocYes" S. Yestrau
+ * http://featureblend.com/javascript-flash-detection-library.html / http://featureblend.com/license.txt
+ */
+
+ // this work has already been done.
+ if (hasFlash !== _undefined) return hasFlash;
+
+ var hasPlugin = false, n = navigator, obj, type, types, AX = window.ActiveXObject;
+
+ // MS Edge 14 throws an "Unspecified Error" because n.plugins is inaccessible due to permissions
+ var nP;
+
+ try {
+ nP = n.plugins;
+ } catch(e) {
+ nP = undefined;
+ }
+
+ if (nP && nP.length) {
+
+ type = 'application/x-shockwave-flash';
+ types = n.mimeTypes;
+
+ if (types && types[type] && types[type].enabledPlugin && types[type].enabledPlugin.description) {
+ hasPlugin = true;
+ }
+
+ } else if (AX !== _undefined && !ua.match(/MSAppHost/i)) {
+
+ // Windows 8 Store Apps (MSAppHost) are weird (compatibility?) and won't complain here, but will barf if Flash/ActiveX object is appended to the DOM.
+ try {
+ obj = new AX('ShockwaveFlash.ShockwaveFlash');
+ } catch(e) {
+ // oh well
+ obj = null;
+ }
+
+ hasPlugin = (!!obj);
+
+ // cleanup, because it is ActiveX after all
+ obj = null;
+
+ }
+
+ hasFlash = hasPlugin;
+
+ return hasPlugin;
+
+ };
+
+ featureCheck = function() {
+
+ var flashNeeded,
+ item,
+ formats = sm2.audioFormats,
+ // iPhone <= 3.1 has broken HTML5 audio(), but firmware 3.2 (original iPad) + iOS4 works.
+ isSpecial = (is_iDevice && !!(ua.match(/os (1|2|3_0|3_1)\s/i)));
+
+ if (isSpecial) {
+
+ // has Audio(), but is broken; let it load links directly.
+ sm2.hasHTML5 = false;
+
+ // ignore flash case, however
+ sm2.html5Only = true;
+
+ // hide the SWF, if present
+ if (sm2.oMC) {
+ sm2.oMC.style.display = 'none';
+ }
+
+ } else if (sm2.useHTML5Audio) {
+
+ if (!sm2.html5 || !sm2.html5.canPlayType) {
+ sm2._wD('SoundManager: No HTML5 Audio() support detected.');
+ sm2.hasHTML5 = false;
+ }
+
+ // <d>
+ if (isBadSafari) {
+ sm2._wD(smc + 'Note: Buggy HTML5 Audio in Safari on this OS X release, see https://bugs.webkit.org/show_bug.cgi?id=32159 - ' + (!hasFlash ? ' would use flash fallback for MP3/MP4, but none detected.' : 'will use flash fallback for MP3/MP4, if available'), 1);
+ }
+ // </d>
+
+ }
+
+ if (sm2.useHTML5Audio && sm2.hasHTML5) {
+
+ // sort out whether flash is optional, required or can be ignored.
+
+ // innocent until proven guilty.
+ canIgnoreFlash = true;
+
+ for (item in formats) {
+
+ if (formats.hasOwnProperty(item)) {
+
+ if (formats[item].required) {
+
+ if (!sm2.html5.canPlayType(formats[item].type)) {
+
+ // 100% HTML5 mode is not possible.
+ canIgnoreFlash = false;
+ flashNeeded = true;
+
+ } else if (sm2.preferFlash && (sm2.flash[item] || sm2.flash[formats[item].type])) {
+
+ // flash may be required, or preferred for this format.
+ flashNeeded = true;
+
+ }
+
+ }
+
+ }
+
+ }
+
+ }
+
+ // sanity check...
+ if (sm2.ignoreFlash) {
+ flashNeeded = false;
+ canIgnoreFlash = true;
+ }
+
+ sm2.html5Only = (sm2.hasHTML5 && sm2.useHTML5Audio && !flashNeeded);
+
+ return (!sm2.html5Only);
+
+ };
+
+ parseURL = function(url) {
+
+ /**
+ * Internal: Finds and returns the first playable URL (or failing that, the first URL.)
+ * @param {string or array} url A single URL string, OR, an array of URL strings or {url:'/path/to/resource', type:'audio/mp3'} objects.
+ */
+
+ var i, j, urlResult = 0, result;
+
+ if (url instanceof Array) {
+
+ // find the first good one
+ for (i = 0, j = url.length; i < j; i++) {
+
+ if (url[i] instanceof Object) {
+
+ // MIME check
+ if (sm2.canPlayMIME(url[i].type)) {
+ urlResult = i;
+ break;
+ }
+
+ } else if (sm2.canPlayURL(url[i])) {
+
+ // URL string check
+ urlResult = i;
+ break;
+
+ }
+
+ }
+
+ // normalize to string
+ if (url[urlResult].url) {
+ url[urlResult] = url[urlResult].url;
+ }
+
+ result = url[urlResult];
+
+ } else {
+
+ // single URL case
+ result = url;
+
+ }
+
+ return result;
+
+ };
+
+
+ startTimer = function(oSound) {
+
+ /**
+ * attach a timer to this sound, and start an interval if needed
+ */
+
+ if (!oSound._hasTimer) {
+
+ oSound._hasTimer = true;
+
+ if (!mobileHTML5 && sm2.html5PollingInterval) {
+
+ if (h5IntervalTimer === null && h5TimerCount === 0) {
+
+ h5IntervalTimer = setInterval(timerExecute, sm2.html5PollingInterval);
+
+ }
+
+ h5TimerCount++;
+
+ }
+
+ }
+
+ };
+
+ stopTimer = function(oSound) {
+
+ /**
+ * detach a timer
+ */
+
+ if (oSound._hasTimer) {
+
+ oSound._hasTimer = false;
+
+ if (!mobileHTML5 && sm2.html5PollingInterval) {
+
+ // interval will stop itself at next execution.
+
+ h5TimerCount--;
+
+ }
+
+ }
+
+ };
+
+ timerExecute = function() {
+
+ /**
+ * manual polling for HTML5 progress events, ie., whileplaying()
+ * (can achieve greater precision than conservative default HTML5 interval)
+ */
+
+ var i;
+
+ if (h5IntervalTimer !== null && !h5TimerCount) {
+
+ // no active timers, stop polling interval.
+
+ clearInterval(h5IntervalTimer);
+
+ h5IntervalTimer = null;
+
+ return;
+
+ }
+
+ // check all HTML5 sounds with timers
+
+ for (i = sm2.soundIDs.length - 1; i >= 0; i--) {
+
+ if (sm2.sounds[sm2.soundIDs[i]].isHTML5 && sm2.sounds[sm2.soundIDs[i]]._hasTimer) {
+ sm2.sounds[sm2.soundIDs[i]]._onTimer();
+ }
+
+ }
+
+ };
+
+ catchError = function(options) {
+
+ options = (options !== _undefined ? options : {});
+
+ if (typeof sm2.onerror === 'function') {
+ sm2.onerror.apply(window, [{
+ type: (options.type !== _undefined ? options.type : null)
+ }]);
+ }
+
+ if (options.fatal !== _undefined && options.fatal) {
+ sm2.disable();
+ }
+
+ };
+
+ badSafariFix = function() {
+
+ // special case: "bad" Safari (OS X 10.3 - 10.7) must fall back to flash for MP3/MP4
+ if (!isBadSafari || !detectFlash()) {
+ // doesn't apply
+ return;
+ }
+
+ var aF = sm2.audioFormats, i, item;
+
+ for (item in aF) {
+
+ if (aF.hasOwnProperty(item)) {
+
+ if (item === 'mp3' || item === 'mp4') {
+
+ sm2._wD(sm + ': Using flash fallback for ' + item + ' format');
+ sm2.html5[item] = false;
+
+ // assign result to related formats, too
+ if (aF[item] && aF[item].related) {
+ for (i = aF[item].related.length - 1; i >= 0; i--) {
+ sm2.html5[aF[item].related[i]] = false;
+ }
+ }
+
+ }
+
+ }
+
+ }
+
+ };
+
+ /**
+ * Pseudo-private flash/ExternalInterface methods
+ * ----------------------------------------------
+ */
+
+ this._setSandboxType = function(sandboxType) {
+
+ // <d>
+ // Security sandbox according to Flash plugin
+ var sb = sm2.sandbox;
+
+ sb.type = sandboxType;
+ sb.description = sb.types[(sb.types[sandboxType] !== _undefined ? sandboxType : 'unknown')];
+
+ if (sb.type === 'localWithFile') {
+
+ sb.noRemote = true;
+ sb.noLocal = false;
+ _wDS('secNote', 2);
+
+ } else if (sb.type === 'localWithNetwork') {
+
+ sb.noRemote = false;
+ sb.noLocal = true;
+
+ } else if (sb.type === 'localTrusted') {
+
+ sb.noRemote = false;
+ sb.noLocal = false;
+
+ }
+ // </d>
+
+ };
+
+ this._externalInterfaceOK = function(swfVersion) {
+
+ // flash callback confirming flash loaded, EI working etc.
+ // swfVersion: SWF build string
+
+ if (sm2.swfLoaded) {
+ return;
+ }
+
+ var e;
+
+ debugTS('swf', true);
+ debugTS('flashtojs', true);
+ sm2.swfLoaded = true;
+ tryInitOnFocus = false;
+
+ if (isBadSafari) {
+ badSafariFix();
+ }
+
+ // complain if JS + SWF build/version strings don't match, excluding +DEV builds
+ // <d>
+ if (!swfVersion || swfVersion.replace(/\+dev/i, '') !== sm2.versionNumber.replace(/\+dev/i, '')) {
+
+ e = sm + ': Fatal: JavaScript file build "' + sm2.versionNumber + '" does not match Flash SWF build "' + swfVersion + '" at ' + sm2.url + '. Ensure both are up-to-date.';
+
+ // escape flash -> JS stack so this error fires in window.
+ setTimeout(function() {
+ throw new Error(e);
+ }, 0);
+
+ // exit, init will fail with timeout
+ return;
+
+ }
+ // </d>
+
+ // IE needs a larger timeout
+ setTimeout(init, isIE ? 100 : 1);
+
+ };
+
+ /**
+ * Private initialization helpers
+ * ------------------------------
+ */
+
+ createMovie = function(movieID, movieURL) {
+
+ // ignore if already connected
+ if (didAppend && appendSuccess) return false;
+
+ function initMsg() {
+
+ // <d>
+
+ var options = [],
+ title,
+ msg = [],
+ delimiter = ' + ';
+
+ title = 'SoundManager ' + sm2.version + (!sm2.html5Only && sm2.useHTML5Audio ? (sm2.hasHTML5 ? ' + HTML5 audio' : ', no HTML5 audio support') : '');
+
+ if (!sm2.html5Only) {
+
+ if (sm2.preferFlash) {
+ options.push('preferFlash');
+ }
+
+ if (sm2.useHighPerformance) {
+ options.push('useHighPerformance');
+ }
+
+ if (sm2.flashPollingInterval) {
+ options.push('flashPollingInterval (' + sm2.flashPollingInterval + 'ms)');
+ }
+
+ if (sm2.html5PollingInterval) {
+ options.push('html5PollingInterval (' + sm2.html5PollingInterval + 'ms)');
+ }
+
+ if (sm2.wmode) {
+ options.push('wmode (' + sm2.wmode + ')');
+ }
+
+ if (sm2.debugFlash) {
+ options.push('debugFlash');
+ }
+
+ if (sm2.useFlashBlock) {
+ options.push('flashBlock');
+ }
+
+ } else if (sm2.html5PollingInterval) {
+ options.push('html5PollingInterval (' + sm2.html5PollingInterval + 'ms)');
+ }
+
+ if (options.length) {
+ msg = msg.concat([options.join(delimiter)]);
+ }
+
+ sm2._wD(title + (msg.length ? delimiter + msg.join(', ') : ''), 1);
+
+ showSupport();
+
+ // </d>
+
+ }
+
+ if (sm2.html5Only) {
+
+ // 100% HTML5 mode
+ setVersionInfo();
+
+ initMsg();
+ sm2.oMC = id(sm2.movieID);
+ init();
+
+ // prevent multiple init attempts
+ didAppend = true;
+
+ appendSuccess = true;
+
+ return false;
+
+ }
+
+ // flash path
+ var remoteURL = (movieURL || sm2.url),
+ localURL = (sm2.altURL || remoteURL),
+ swfTitle = 'JS/Flash audio component (SoundManager 2)',
+ oTarget = getDocument(),
+ extraClass = getSWFCSS(),
+ isRTL = null,
+ html = doc.getElementsByTagName('html')[0],
+ oEmbed, oMovie, tmp, movieHTML, oEl, s, x, sClass;
+
+ isRTL = (html && html.dir && html.dir.match(/rtl/i));
+ movieID = (movieID === _undefined ? sm2.id : movieID);
+
+ function param(name, value) {
+ return '<param name="' + name + '" value="' + value + '" />';
+ }
+
+ // safety check for legacy (change to Flash 9 URL)
+ setVersionInfo();
+ sm2.url = normalizeMovieURL(overHTTP ? remoteURL : localURL);
+ movieURL = sm2.url;
+
+ sm2.wmode = (!sm2.wmode && sm2.useHighPerformance ? 'transparent' : sm2.wmode);
+
+ if (sm2.wmode !== null && (ua.match(/msie 8/i) || (!isIE && !sm2.useHighPerformance)) && navigator.platform.match(/win32|win64/i)) {
+ /**
+ * extra-special case: movie doesn't load until scrolled into view when using wmode = anything but 'window' here
+ * does not apply when using high performance (position:fixed means on-screen), OR infinite flash load timeout
+ * wmode breaks IE 8 on Vista + Win7 too in some cases, as of January 2011 (?)
+ */
+ messages.push(strings.spcWmode);
+ sm2.wmode = null;
+ }
+
+ oEmbed = {
+ name: movieID,
+ id: movieID,
+ src: movieURL,
+ quality: 'high',
+ allowScriptAccess: sm2.allowScriptAccess,
+ bgcolor: sm2.bgColor,
+ pluginspage: http + 'www.macromedia.com/go/getflashplayer',
+ title: swfTitle,
+ type: 'application/x-shockwave-flash',
+ wmode: sm2.wmode,
+ // http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c36cfb8137124318eebc6-7ffd.html
+ hasPriority: 'true'
+ };
+
+ if (sm2.debugFlash) {
+ oEmbed.FlashVars = 'debug=1';
+ }
+
+ if (!sm2.wmode) {
+ // don't write empty attribute
+ delete oEmbed.wmode;
+ }
+
+ if (isIE) {
+
+ // IE is "special".
+ oMovie = doc.createElement('div');
+ movieHTML = [
+ '<object id="' + movieID + '" data="' + movieURL + '" type="' + oEmbed.type + '" title="' + oEmbed.title + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">',
+ param('movie', movieURL),
+ param('AllowScriptAccess', sm2.allowScriptAccess),
+ param('quality', oEmbed.quality),
+ (sm2.wmode ? param('wmode', sm2.wmode) : ''),
+ param('bgcolor', sm2.bgColor),
+ param('hasPriority', 'true'),
+ (sm2.debugFlash ? param('FlashVars', oEmbed.FlashVars) : ''),
+ '</object>'
+ ].join('');
+
+ } else {
+
+ oMovie = doc.createElement('embed');
+ for (tmp in oEmbed) {
+ if (oEmbed.hasOwnProperty(tmp)) {
+ oMovie.setAttribute(tmp, oEmbed[tmp]);
+ }
+ }
+
+ }
+
+ initDebug();
+ extraClass = getSWFCSS();
+ oTarget = getDocument();
+
+ if (oTarget) {
+
+ sm2.oMC = (id(sm2.movieID) || doc.createElement('div'));
+
+ if (!sm2.oMC.id) {
+
+ sm2.oMC.id = sm2.movieID;
+ sm2.oMC.className = swfCSS.swfDefault + ' ' + extraClass;
+ s = null;
+ oEl = null;
+
+ if (!sm2.useFlashBlock) {
+ if (sm2.useHighPerformance) {
+ // on-screen at all times
+ s = {
+ position: 'fixed',
+ width: '8px',
+ height: '8px',
+ // >= 6px for flash to run fast, >= 8px to start up under Firefox/win32 in some cases. odd? yes.
+ bottom: '0px',
+ left: '0px',
+ overflow: 'hidden'
+ };
+ } else {
+ // hide off-screen, lower priority
+ s = {
+ position: 'absolute',
+ width: '6px',
+ height: '6px',
+ top: '-9999px',
+ left: '-9999px'
+ };
+ if (isRTL) {
+ s.left = Math.abs(parseInt(s.left, 10)) + 'px';
+ }
+ }
+ }
+
+ if (isWebkit) {
+ // soundcloud-reported render/crash fix, safari 5
+ sm2.oMC.style.zIndex = 10000;
+ }
+
+ if (!sm2.debugFlash) {
+ for (x in s) {
+ if (s.hasOwnProperty(x)) {
+ sm2.oMC.style[x] = s[x];
+ }
+ }
+ }
+
+ try {
+
+ if (!isIE) {
+ sm2.oMC.appendChild(oMovie);
+ }
+
+ oTarget.appendChild(sm2.oMC);
+
+ if (isIE) {
+ oEl = sm2.oMC.appendChild(doc.createElement('div'));
+ oEl.className = swfCSS.swfBox;
+ oEl.innerHTML = movieHTML;
+ }
+
+ appendSuccess = true;
+
+ } catch(e) {
+
+ throw new Error(str('domError') + ' \n' + e.toString());
+
+ }
+
+ } else {
+
+ // SM2 container is already in the document (eg. flashblock use case)
+ sClass = sm2.oMC.className;
+ sm2.oMC.className = (sClass ? sClass + ' ' : swfCSS.swfDefault) + (extraClass ? ' ' + extraClass : '');
+ sm2.oMC.appendChild(oMovie);
+
+ if (isIE) {
+ oEl = sm2.oMC.appendChild(doc.createElement('div'));
+ oEl.className = swfCSS.swfBox;
+ oEl.innerHTML = movieHTML;
+ }
+
+ appendSuccess = true;
+
+ }
+
+ }
+
+ didAppend = true;
+
+ initMsg();
+
+ // sm2._wD(sm + ': Trying to load ' + movieURL + (!overHTTP && sm2.altURL ? ' (alternate URL)' : ''), 1);
+
+ return true;
+
+ };
+
+ initMovie = function() {
+
+ if (sm2.html5Only) {
+ createMovie();
+ return false;
+ }
+
+ // attempt to get, or create, movie (may already exist)
+ if (flash) return false;
+
+ if (!sm2.url) {
+
+ /**
+ * Something isn't right - we've reached init, but the soundManager url property has not been set.
+ * User has not called setup({url: ...}), or has not set soundManager.url (legacy use case) directly before init time.
+ * Notify and exit. If user calls setup() with a url: property, init will be restarted as in the deferred loading case.
+ */
+
+ _wDS('noURL');
+ return false;
+
+ }
+
+ // inline markup case
+ flash = sm2.getMovie(sm2.id);
+
+ if (!flash) {
+
+ if (!oRemoved) {
+
+ // try to create
+ createMovie(sm2.id, sm2.url);
+
+ } else {
+
+ // try to re-append removed movie after reboot()
+ if (!isIE) {
+ sm2.oMC.appendChild(oRemoved);
+ } else {
+ sm2.oMC.innerHTML = oRemovedHTML;
+ }
+
+ oRemoved = null;
+ didAppend = true;
+
+ }
+
+ flash = sm2.getMovie(sm2.id);
+
+ }
+
+ if (typeof sm2.oninitmovie === 'function') {
+ setTimeout(sm2.oninitmovie, 1);
+ }
+
+ // <d>
+ flushMessages();
+ // </d>
+
+ return true;
+
+ };
+
+ delayWaitForEI = function() {
+
+ setTimeout(waitForEI, 1000);
+
+ };
+
+ rebootIntoHTML5 = function() {
+
+ // special case: try for a reboot with preferFlash: false, if 100% HTML5 mode is possible and useFlashBlock is not enabled.
+
+ window.setTimeout(function() {
+
+ complain(smc + 'useFlashBlock is false, 100% HTML5 mode is possible. Rebooting with preferFlash: false...');
+
+ sm2.setup({
+ preferFlash: false
+ }).reboot();
+
+ // if for some reason you want to detect this case, use an ontimeout() callback and look for html5Only and didFlashBlock == true.
+ sm2.didFlashBlock = true;
+
+ sm2.beginDelayedInit();
+
+ }, 1);
+
+ };
+
+ waitForEI = function() {
+
+ var p,
+ loadIncomplete = false;
+
+ if (!sm2.url) {
+ // No SWF url to load (noURL case) - exit for now. Will be retried when url is set.
+ return;
+ }
+
+ if (waitingForEI) {
+ return;
+ }
+
+ waitingForEI = true;
+ event.remove(window, 'load', delayWaitForEI);
+
+ if (hasFlash && tryInitOnFocus && !isFocused) {
+ // Safari won't load flash in background tabs, only when focused.
+ _wDS('waitFocus');
+ return;
+ }
+
+ if (!didInit) {
+ p = sm2.getMoviePercent();
+ if (p > 0 && p < 100) {
+ loadIncomplete = true;
+ }
+ }
+
+ setTimeout(function() {
+
+ p = sm2.getMoviePercent();
+
+ if (loadIncomplete) {
+ // special case: if movie *partially* loaded, retry until it's 100% before assuming failure.
+ waitingForEI = false;
+ sm2._wD(str('waitSWF'));
+ window.setTimeout(delayWaitForEI, 1);
+ return;
+ }
+
+ // <d>
+ if (!didInit) {
+
+ sm2._wD(sm + ': No Flash response within expected time. Likely causes: ' + (p === 0 ? 'SWF load failed, ' : '') + 'Flash blocked or JS-Flash security error.' + (sm2.debugFlash ? ' ' + str('checkSWF') : ''), 2);
+
+ if (!overHTTP && p) {
+
+ _wDS('localFail', 2);
+
+ if (!sm2.debugFlash) {
+ _wDS('tryDebug', 2);
+ }
+
+ }
+
+ if (p === 0) {
+
+ // if 0 (not null), probably a 404.
+ sm2._wD(str('swf404', sm2.url), 1);
+
+ }
+
+ debugTS('flashtojs', false, ': Timed out' + (overHTTP ? ' (Check flash security or flash blockers)' : ' (No plugin/missing SWF?)'));
+
+ }
+ // </d>
+
+ // give up / time-out, depending
+
+ if (!didInit && okToDisable) {
+
+ if (p === null) {
+
+ // SWF failed to report load progress. Possibly blocked.
+
+ if (sm2.useFlashBlock || sm2.flashLoadTimeout === 0) {
+
+ if (sm2.useFlashBlock) {
+
+ flashBlockHandler();
+
+ }
+
+ _wDS('waitForever');
+
+ } else if (!sm2.useFlashBlock && canIgnoreFlash) {
+
+ // no custom flash block handling, but SWF has timed out. Will recover if user unblocks / allows SWF load.
+ rebootIntoHTML5();
+
+ } else {
+
+ _wDS('waitForever');
+
+ // fire any regular registered ontimeout() listeners.
+ processOnEvents({
+ type: 'ontimeout',
+ ignoreInit: true,
+ error: {
+ type: 'INIT_FLASHBLOCK'
+ }
+ });
+
+ }
+
+ } else if (sm2.flashLoadTimeout === 0) {
+
+ // SWF loaded? Shouldn't be a blocking issue, then.
+
+ _wDS('waitForever');
+
+ } else if (!sm2.useFlashBlock && canIgnoreFlash) {
+
+ rebootIntoHTML5();
+
+ } else {
+
+ failSafely(true);
+
+ }
+
+ }
+
+ }, sm2.flashLoadTimeout);
+
+ };
+
+ handleFocus = function() {
+
+ function cleanup() {
+ event.remove(window, 'focus', handleFocus);
+ }
+
+ if (isFocused || !tryInitOnFocus) {
+ // already focused, or not special Safari background tab case
+ cleanup();
+ return true;
+ }
+
+ okToDisable = true;
+ isFocused = true;
+ _wDS('gotFocus');
+
+ // allow init to restart
+ waitingForEI = false;
+
+ // kick off ExternalInterface timeout, now that the SWF has started
+ delayWaitForEI();
+
+ cleanup();
+ return true;
+
+ };
+
+ flushMessages = function() {
+
+ // <d>
+
+ // SM2 pre-init debug messages
+ if (messages.length) {
+ sm2._wD('SoundManager 2: ' + messages.join(' '), 1);
+ messages = [];
+ }
+
+ // </d>
+
+ };
+
+ showSupport = function() {
+
+ // <d>
+
+ flushMessages();
+
+ var item, tests = [];
+
+ if (sm2.useHTML5Audio && sm2.hasHTML5) {
+ for (item in sm2.audioFormats) {
+ if (sm2.audioFormats.hasOwnProperty(item)) {
+ tests.push(item + ' = ' + sm2.html5[item] + (!sm2.html5[item] && needsFlash && sm2.flash[item] ? ' (using flash)' : (sm2.preferFlash && sm2.flash[item] && needsFlash ? ' (preferring flash)' : (!sm2.html5[item] ? ' (' + (sm2.audioFormats[item].required ? 'required, ' : '') + 'and no flash support)' : ''))));
+ }
+ }
+ sm2._wD('SoundManager 2 HTML5 support: ' + tests.join(', '), 1);
+ }
+
+ // </d>
+
+ };
+
+ initComplete = function(bNoDisable) {
+
+ if (didInit) return false;
+
+ if (sm2.html5Only) {
+ // all good.
+ _wDS('sm2Loaded', 1);
+ didInit = true;
+ initUserOnload();
+ debugTS('onload', true);
+ return true;
+ }
+
+ var wasTimeout = (sm2.useFlashBlock && sm2.flashLoadTimeout && !sm2.getMoviePercent()),
+ result = true,
+ error;
+
+ if (!wasTimeout) {
+ didInit = true;
+ }
+
+ error = {
+ type: (!hasFlash && needsFlash ? 'NO_FLASH' : 'INIT_TIMEOUT')
+ };
+
+ sm2._wD('SoundManager 2 ' + (disabled ? 'failed to load' : 'loaded') + ' (' + (disabled ? 'Flash security/load error' : 'OK') + ') ' + String.fromCharCode(disabled ? 10006 : 10003), disabled ? 2 : 1);
+
+ if (disabled || bNoDisable) {
+
+ if (sm2.useFlashBlock && sm2.oMC) {
+ sm2.oMC.className = getSWFCSS() + ' ' + (sm2.getMoviePercent() === null ? swfCSS.swfTimedout : swfCSS.swfError);
+ }
+
+ processOnEvents({
+ type: 'ontimeout',
+ error: error,
+ ignoreInit: true
+ });
+
+ debugTS('onload', false);
+ catchError(error);
+
+ result = false;
+
+ } else {
+
+ debugTS('onload', true);
+
+ }
+
+ if (!disabled) {
+
+ if (sm2.waitForWindowLoad && !windowLoaded) {
+
+ _wDS('waitOnload');
+ event.add(window, 'load', initUserOnload);
+
+ } else {
+
+ // <d>
+ if (sm2.waitForWindowLoad && windowLoaded) {
+ _wDS('docLoaded');
+ }
+ // </d>
+
+ initUserOnload();
+
+ }
+
+ }
+
+ return result;
+
+ };
+
+ /**
+ * apply top-level setupOptions object as local properties, eg., this.setupOptions.flashVersion -> this.flashVersion (soundManager.flashVersion)
+ * this maintains backward compatibility, and allows properties to be defined separately for use by soundManager.setup().
+ */
+
+ setProperties = function() {
+
+ var i,
+ o = sm2.setupOptions;
+
+ for (i in o) {
+
+ if (o.hasOwnProperty(i)) {
+
+ // assign local property if not already defined
+
+ if (sm2[i] === _undefined) {
+
+ sm2[i] = o[i];
+
+ } else if (sm2[i] !== o[i]) {
+
+ // legacy support: write manually-assigned property (eg., soundManager.url) back to setupOptions to keep things in sync
+ sm2.setupOptions[i] = sm2[i];
+
+ }
+
+ }
+
+ }
+
+ };
+
+
+ init = function() {
+
+ // called after onload()
+
+ if (didInit) {
+ _wDS('didInit');
+ return false;
+ }
+
+ function cleanup() {
+ event.remove(window, 'load', sm2.beginDelayedInit);
+ }
+
+ if (sm2.html5Only) {
+
+ if (!didInit) {
+ // we don't need no steenking flash!
+ cleanup();
+ sm2.enabled = true;
+ initComplete();
+ }
+
+ return true;
+
+ }
+
+ // flash path
+ initMovie();
+
+ try {
+
+ // attempt to talk to Flash
+ flash._externalInterfaceTest(false);
+
+ /**
+ * Apply user-specified polling interval, OR, if "high performance" set, faster vs. default polling
+ * (determines frequency of whileloading/whileplaying callbacks, effectively driving UI framerates)
+ */
+ setPolling(true, (sm2.flashPollingInterval || (sm2.useHighPerformance ? 10 : 50)));
+
+ if (!sm2.debugMode) {
+ // stop the SWF from making debug output calls to JS
+ flash._disableDebug();
+ }
+
+ sm2.enabled = true;
+ debugTS('jstoflash', true);
+
+ if (!sm2.html5Only) {
+ // prevent browser from showing cached page state (or rather, restoring "suspended" page state) via back button, because flash may be dead
+ // http://www.webkit.org/blog/516/webkit-page-cache-ii-the-unload-event/
+ event.add(window, 'unload', doNothing);
+ }
+
+ } catch(e) {
+
+ sm2._wD('js/flash exception: ' + e.toString());
+
+ debugTS('jstoflash', false);
+
+ catchError({
+ type: 'JS_TO_FLASH_EXCEPTION',
+ fatal: true
+ });
+
+ // don't disable, for reboot()
+ failSafely(true);
+
+ initComplete();
+
+ return false;
+
+ }
+
+ initComplete();
+
+ // disconnect events
+ cleanup();
+
+ return true;
+
+ };
+
+ domContentLoaded = function() {
+
+ if (didDCLoaded) return false;
+
+ didDCLoaded = true;
+
+ // assign top-level soundManager properties eg. soundManager.url
+ setProperties();
+
+ initDebug();
+
+ if (!hasFlash && sm2.hasHTML5) {
+
+ sm2._wD('SoundManager 2: No Flash detected' + (!sm2.useHTML5Audio ? ', enabling HTML5.' : '. Trying HTML5-only mode.'), 1);
+
+ sm2.setup({
+ useHTML5Audio: true,
+ // make sure we aren't preferring flash, either
+ // TODO: preferFlash should not matter if flash is not installed. Currently, stuff breaks without the below tweak.
+ preferFlash: false
+ });
+
+ }
+
+ testHTML5();
+
+ if (!hasFlash && needsFlash) {
+
+ messages.push(strings.needFlash);
+
+ // TODO: Fatal here vs. timeout approach, etc.
+ // hack: fail sooner.
+ sm2.setup({
+ flashLoadTimeout: 1
+ });
+
+ }
+
+ if (doc.removeEventListener) {
+ doc.removeEventListener('DOMContentLoaded', domContentLoaded, false);
+ }
+
+ initMovie();
+
+ return true;
+
+ };
+
+ domContentLoadedIE = function() {
+
+ if (doc.readyState === 'complete') {
+ domContentLoaded();
+ doc.detachEvent('onreadystatechange', domContentLoadedIE);
+ }
+
+ return true;
+
+ };
+
+ winOnLoad = function() {
+
+ // catch edge case of initComplete() firing after window.load()
+ windowLoaded = true;
+
+ // catch case where DOMContentLoaded has been sent, but we're still in doc.readyState = 'interactive'
+ domContentLoaded();
+
+ event.remove(window, 'load', winOnLoad);
+
+ };
+
+ // sniff up-front
+ detectFlash();
+
+ // focus and window load, init (primarily flash-driven)
+ event.add(window, 'focus', handleFocus);
+ event.add(window, 'load', delayWaitForEI);
+ event.add(window, 'load', winOnLoad);
+
+ if (doc.addEventListener) {
+
+ doc.addEventListener('DOMContentLoaded', domContentLoaded, false);
+
+ } else if (doc.attachEvent) {
+
+ doc.attachEvent('onreadystatechange', domContentLoadedIE);
+
+ } else {
+
+ // no add/attachevent support - safe to assume no JS -> Flash either
+ debugTS('onload', false);
+ catchError({
+ type: 'NO_DOM2_EVENTS',
+ fatal: true
+ });
+
+ }
+
+} // SoundManager()
+
+// SM2_DEFER details: http://www.schillmania.com/projects/soundmanager2/doc/getstarted/#lazy-loading
+
+if (window.SM2_DEFER === _undefined || !SM2_DEFER) {
+ soundManager = new SoundManager();
+}
+
+/**
+ * SoundManager public interfaces
+ * ------------------------------
+ */
+
+if (typeof module === 'object' && module && typeof module.exports === 'object') {
+
+ /**
+ * commonJS module
+ */
+
+ module.exports.SoundManager = SoundManager;
+ module.exports.soundManager = soundManager;
+
+} else if (typeof define === 'function' && define.amd) {
+
+ /**
+ * AMD - requireJS
+ * basic usage:
+ * require(["/path/to/soundmanager2.js"], function(SoundManager) {
+ * SoundManager.getInstance().setup({
+ * url: '/swf/',
+ * onready: function() { ... }
+ * })
+ * });
+ *
+ * SM2_DEFER usage:
+ * window.SM2_DEFER = true;
+ * require(["/path/to/soundmanager2.js"], function(SoundManager) {
+ * SoundManager.getInstance(function() {
+ * var soundManager = new SoundManager.constructor();
+ * soundManager.setup({
+ * url: '/swf/',
+ * ...
+ * });
+ * ...
+ * soundManager.beginDelayedInit();
+ * return soundManager;
+ * })
+ * });
+ */
+
+ define(function() {
+ /**
+ * Retrieve the global instance of SoundManager.
+ * If a global instance does not exist it can be created using a callback.
+ *
+ * @param {Function} smBuilder Optional: Callback used to create a new SoundManager instance
+ * @return {SoundManager} The global SoundManager instance
+ */
+ function getInstance(smBuilder) {
+ if (!window.soundManager && smBuilder instanceof Function) {
+ var instance = smBuilder(SoundManager);
+ if (instance instanceof SoundManager) {
+ window.soundManager = instance;
+ }
+ }
+ return window.soundManager;
+ }
+ return {
+ constructor: SoundManager,
+ getInstance: getInstance
+ };
+ });
+
+}
+
+// standard browser case
+
+// constructor
+window.SoundManager = SoundManager;
+
+/**
+ * note: SM2 requires a window global due to Flash, which makes calls to window.soundManager.
+ * Flash may not always be needed, but this is not known until async init and SM2 may even "reboot" into Flash mode.
+ */
+
+// public API, flash callbacks etc.
+window.soundManager = soundManager;
+
+}(window));
diff --git a/assets/posts.js b/assets/posts.js new file mode 100644 index 0000000..1b51e6f --- /dev/null +++ b/assets/posts.js @@ -0,0 +1,5 @@ + +// CSS + +require('./css/posts.css'); +require('./css/font-awesome.css'); |