ext_sprockets 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +114 -0
- data/.ruby-version +1 -0
- data/Gemfile +21 -0
- data/Gemfile.lock +77 -0
- data/MIT-LICENSE +20 -0
- data/README.md +3 -0
- data/bin/yarn +12 -0
- data/ext_sprockets.gemspec +22 -0
- data/lib/ext_sprockets.rb +5 -0
- data/lib/ext_sprockets/engine.rb +11 -0
- data/lib/ext_sprockets/version.rb +3 -0
- data/node_modules/.yarn-integrity +60 -0
- data/node_modules/bootswatch/cerulean/_bootswatch.scss +131 -0
- data/node_modules/bootswatch/cerulean/_variables.scss +870 -0
- data/node_modules/bootswatch/cosmo/_bootswatch.scss +262 -0
- data/node_modules/bootswatch/cosmo/_variables.scss +870 -0
- data/node_modules/bootswatch/cyborg/_bootswatch.scss +243 -0
- data/node_modules/bootswatch/cyborg/_variables.scss +870 -0
- data/node_modules/bootswatch/darkly/_bootswatch.scss +351 -0
- data/node_modules/bootswatch/darkly/_variables.scss +870 -0
- data/node_modules/bootswatch/flatly/_bootswatch.scss +330 -0
- data/node_modules/bootswatch/flatly/_variables.scss +870 -0
- data/node_modules/bootswatch/journal/_bootswatch.scss +145 -0
- data/node_modules/bootswatch/journal/_variables.scss +870 -0
- data/node_modules/bootswatch/lumen/_bootswatch.scss +523 -0
- data/node_modules/bootswatch/lumen/_variables.scss +870 -0
- data/node_modules/bootswatch/package.json +26 -0
- data/node_modules/bootswatch/paper/_bootswatch.scss +620 -0
- data/node_modules/bootswatch/paper/_variables.scss +870 -0
- data/node_modules/bootswatch/readable/_bootswatch.scss +183 -0
- data/node_modules/bootswatch/readable/_variables.scss +870 -0
- data/node_modules/bootswatch/sandstone/_bootswatch.scss +196 -0
- data/node_modules/bootswatch/sandstone/_variables.scss +870 -0
- data/node_modules/bootswatch/simplex/_bootswatch.scss +170 -0
- data/node_modules/bootswatch/simplex/_variables.scss +870 -0
- data/node_modules/bootswatch/slate/_bootswatch.scss +448 -0
- data/node_modules/bootswatch/slate/_variables.scss +870 -0
- data/node_modules/bootswatch/spacelab/_bootswatch.scss +142 -0
- data/node_modules/bootswatch/spacelab/_variables.scss +870 -0
- data/node_modules/bootswatch/superhero/_bootswatch.scss +360 -0
- data/node_modules/bootswatch/superhero/_variables.scss +870 -0
- data/node_modules/bootswatch/united/_bootswatch.scss +56 -0
- data/node_modules/bootswatch/united/_variables.scss +870 -0
- data/node_modules/bootswatch/yeti/_bootswatch.scss +445 -0
- data/node_modules/bootswatch/yeti/_variables.scss +870 -0
- data/node_modules/chart.js/dist/Chart.bundle.js +18608 -0
- data/node_modules/chart.js/dist/Chart.js +14145 -0
- data/node_modules/chart.js/package.json +54 -0
- data/node_modules/chartkick/chartkick.js +1866 -0
- data/node_modules/chartkick/package.json +25 -0
- data/node_modules/eonasdan-bootstrap-datetimepicker/package.json +51 -0
- data/node_modules/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js +2636 -0
- data/node_modules/eonasdan-bootstrap-datetimepicker/src/sass/_bootstrap-datetimepicker.scss +344 -0
- data/node_modules/eonasdan-bootstrap-datetimepicker/src/sass/bootstrap-datetimepicker-build.scss +16 -0
- data/node_modules/file-saver/FileSaver.js +188 -0
- data/node_modules/file-saver/package.json +28 -0
- data/node_modules/jquery-pjax/jquery.pjax.js +903 -0
- data/node_modules/jquery-pjax/package.json +18 -0
- data/node_modules/jquery-ui/package.json +74 -0
- data/node_modules/jquery-ui/themes/base/accordion.css +23 -0
- data/node_modules/jquery-ui/themes/base/all.css +12 -0
- data/node_modules/jquery-ui/themes/base/autocomplete.css +16 -0
- data/node_modules/jquery-ui/themes/base/base.css +30 -0
- data/node_modules/jquery-ui/themes/base/button.css +82 -0
- data/node_modules/jquery-ui/themes/base/checkboxradio.css +34 -0
- data/node_modules/jquery-ui/themes/base/controlgroup.css +65 -0
- data/node_modules/jquery-ui/themes/base/core.css +97 -0
- data/node_modules/jquery-ui/themes/base/datepicker.css +185 -0
- data/node_modules/jquery-ui/themes/base/dialog.css +101 -0
- data/node_modules/jquery-ui/themes/base/draggable.css +12 -0
- data/node_modules/jquery-ui/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/node_modules/jquery-ui/themes/base/images/ui-icons_444444_256x240.png +0 -0
- data/node_modules/jquery-ui/themes/base/images/ui-icons_555555_256x240.png +0 -0
- data/node_modules/jquery-ui/themes/base/images/ui-icons_777620_256x240.png +0 -0
- data/node_modules/jquery-ui/themes/base/images/ui-icons_777777_256x240.png +0 -0
- data/node_modules/jquery-ui/themes/base/images/ui-icons_cc0000_256x240.png +0 -0
- data/node_modules/jquery-ui/themes/base/images/ui-icons_ffffff_256x240.png +0 -0
- data/node_modules/jquery-ui/themes/base/menu.css +64 -0
- data/node_modules/jquery-ui/themes/base/progressbar.css +28 -0
- data/node_modules/jquery-ui/themes/base/resizable.css +78 -0
- data/node_modules/jquery-ui/themes/base/selectable.css +17 -0
- data/node_modules/jquery-ui/themes/base/selectmenu.css +50 -0
- data/node_modules/jquery-ui/themes/base/slider.css +75 -0
- data/node_modules/jquery-ui/themes/base/sortable.css +12 -0
- data/node_modules/jquery-ui/themes/base/spinner.css +52 -0
- data/node_modules/jquery-ui/themes/base/tabs.css +51 -0
- data/node_modules/jquery-ui/themes/base/theme.css +443 -0
- data/node_modules/jquery-ui/themes/base/tooltip.css +19 -0
- data/node_modules/jquery-ui/ui/core.js +21 -0
- data/node_modules/jquery-ui/ui/data.js +39 -0
- data/node_modules/jquery-ui/ui/disable-selection.js +46 -0
- data/node_modules/jquery-ui/ui/effect.js +1635 -0
- data/node_modules/jquery-ui/ui/effects/effect-blind.js +70 -0
- data/node_modules/jquery-ui/ui/effects/effect-bounce.js +110 -0
- data/node_modules/jquery-ui/ui/effects/effect-clip.js +65 -0
- data/node_modules/jquery-ui/ui/effects/effect-drop.js +69 -0
- data/node_modules/jquery-ui/ui/effects/effect-explode.js +111 -0
- data/node_modules/jquery-ui/ui/effects/effect-fade.js +47 -0
- data/node_modules/jquery-ui/ui/effects/effect-fold.js +89 -0
- data/node_modules/jquery-ui/ui/effects/effect-highlight.js +57 -0
- data/node_modules/jquery-ui/ui/effects/effect-puff.js +42 -0
- data/node_modules/jquery-ui/ui/effects/effect-pulsate.js +64 -0
- data/node_modules/jquery-ui/ui/effects/effect-scale.js +56 -0
- data/node_modules/jquery-ui/ui/effects/effect-shake.js +74 -0
- data/node_modules/jquery-ui/ui/effects/effect-size.js +191 -0
- data/node_modules/jquery-ui/ui/effects/effect-slide.js +76 -0
- data/node_modules/jquery-ui/ui/effects/effect-transfer.js +40 -0
- data/node_modules/jquery-ui/ui/escape-selector.js +21 -0
- data/node_modules/jquery-ui/ui/focusable.js +84 -0
- data/node_modules/jquery-ui/ui/form-reset-mixin.js +77 -0
- data/node_modules/jquery-ui/ui/form.js +20 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-af.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ar-DZ.js +39 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ar.js +39 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-az.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-be.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-bg.js +38 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-bs.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ca.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-cs.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-cy-GB.js +45 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-da.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-de.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-el.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-en-AU.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-en-GB.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-en-NZ.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-eo.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-es.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-et.js +45 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-eu.js +36 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-fa.js +73 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-fi.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-fo.js +45 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-fr-CA.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-fr-CH.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-fr.js +39 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-gl.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-he.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-hi.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-hr.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-hu.js +36 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-hy.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-id.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-is.js +45 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-it-CH.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-it.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ja.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ka.js +48 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-kk.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-km.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ko.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ky.js +38 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-lb.js +45 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-lt.js +45 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-lv.js +45 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-mk.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ml.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ms.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-nb.js +49 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-nl-BE.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-nl.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-nn.js +49 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-no.js +50 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-pl.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-pt-BR.js +45 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-pt.js +44 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-rm.js +61 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ro.js +40 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ru.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-sk.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-sl.js +38 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-sq.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-sr-SR.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-sr.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-sv.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-ta.js +53 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-th.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-tj.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-tr.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-uk.js +38 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-vi.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-zh-CN.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-zh-HK.js +37 -0
- data/node_modules/jquery-ui/ui/i18n/datepicker-zh-TW.js +37 -0
- data/node_modules/jquery-ui/ui/ie.js +15 -0
- data/node_modules/jquery-ui/ui/jquery-1-7.js +89 -0
- data/node_modules/jquery-ui/ui/keycode.js +45 -0
- data/node_modules/jquery-ui/ui/labels.js +62 -0
- data/node_modules/jquery-ui/ui/plugin.js +44 -0
- data/node_modules/jquery-ui/ui/position.js +498 -0
- data/node_modules/jquery-ui/ui/safe-active-element.js +40 -0
- data/node_modules/jquery-ui/ui/safe-blur.js +21 -0
- data/node_modules/jquery-ui/ui/scroll-parent.js +45 -0
- data/node_modules/jquery-ui/ui/tabbable.js +35 -0
- data/node_modules/jquery-ui/ui/unique-id.js +49 -0
- data/node_modules/jquery-ui/ui/version.js +17 -0
- data/node_modules/jquery-ui/ui/widget.js +733 -0
- data/node_modules/jquery-ui/ui/widgets/accordion.js +613 -0
- data/node_modules/jquery-ui/ui/widgets/autocomplete.js +682 -0
- data/node_modules/jquery-ui/ui/widgets/button.js +386 -0
- data/node_modules/jquery-ui/ui/widgets/checkboxradio.js +286 -0
- data/node_modules/jquery-ui/ui/widgets/controlgroup.js +298 -0
- data/node_modules/jquery-ui/ui/widgets/datepicker.js +2120 -0
- data/node_modules/jquery-ui/ui/widgets/dialog.js +940 -0
- data/node_modules/jquery-ui/ui/widgets/draggable.js +1250 -0
- data/node_modules/jquery-ui/ui/widgets/droppable.js +497 -0
- data/node_modules/jquery-ui/ui/widgets/menu.js +673 -0
- data/node_modules/jquery-ui/ui/widgets/mouse.js +226 -0
- data/node_modules/jquery-ui/ui/widgets/progressbar.js +178 -0
- data/node_modules/jquery-ui/ui/widgets/resizable.js +1201 -0
- data/node_modules/jquery-ui/ui/widgets/selectable.js +310 -0
- data/node_modules/jquery-ui/ui/widgets/selectmenu.js +687 -0
- data/node_modules/jquery-ui/ui/widgets/slider.js +752 -0
- data/node_modules/jquery-ui/ui/widgets/sortable.js +1554 -0
- data/node_modules/jquery-ui/ui/widgets/spinner.js +575 -0
- data/node_modules/jquery-ui/ui/widgets/tabs.js +924 -0
- data/node_modules/jquery-ui/ui/widgets/tooltip.js +520 -0
- data/node_modules/jquery-ujs/package.json +26 -0
- data/node_modules/jquery-ujs/src/rails.js +555 -0
- data/node_modules/jquery/dist/jquery.js +10253 -0
- data/node_modules/jquery/dist/jquery.slim.js +8160 -0
- data/node_modules/jquery/package.json +97 -0
- data/node_modules/js-cookie/package.json +49 -0
- data/node_modules/js-cookie/src/js.cookie.js +165 -0
- data/node_modules/jstz/dist/jstz.js +1428 -0
- data/node_modules/jstz/package.json +57 -0
- data/node_modules/lodash/core.js +3836 -0
- data/node_modules/lodash/lodash.js +17084 -0
- data/node_modules/lodash/package.json +17 -0
- data/node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.js +1204 -0
- data/node_modules/moment-timezone/builds/moment-timezone-with-data.js +1204 -0
- data/node_modules/moment-timezone/moment-timezone-utils.js +316 -0
- data/node_modules/moment-timezone/moment-timezone.js +605 -0
- data/node_modules/moment-timezone/package.json +50 -0
- data/node_modules/moment/locale/af.js +74 -0
- data/node_modules/moment/locale/ar-dz.js +60 -0
- data/node_modules/moment/locale/ar-kw.js +60 -0
- data/node_modules/moment/locale/ar-ly.js +127 -0
- data/node_modules/moment/locale/ar-ma.js +61 -0
- data/node_modules/moment/locale/ar-sa.js +106 -0
- data/node_modules/moment/locale/ar-tn.js +60 -0
- data/node_modules/moment/locale/ar.js +143 -0
- data/node_modules/moment/locale/az.js +106 -0
- data/node_modules/moment/locale/be.js +135 -0
- data/node_modules/moment/locale/bg.js +91 -0
- data/node_modules/moment/locale/bm.js +60 -0
- data/node_modules/moment/locale/bn.js +120 -0
- data/node_modules/moment/locale/bo.js +120 -0
- data/node_modules/moment/locale/br.js +109 -0
- data/node_modules/moment/locale/bs.js +153 -0
- data/node_modules/moment/locale/ca.js +89 -0
- data/node_modules/moment/locale/cs.js +180 -0
- data/node_modules/moment/locale/cv.js +64 -0
- data/node_modules/moment/locale/cy.js +82 -0
- data/node_modules/moment/locale/da.js +61 -0
- data/node_modules/moment/locale/de-at.js +80 -0
- data/node_modules/moment/locale/de-ch.js +79 -0
- data/node_modules/moment/locale/de.js +79 -0
- data/node_modules/moment/locale/dv.js +101 -0
- data/node_modules/moment/locale/el.js +101 -0
- data/node_modules/moment/locale/en-au.js +68 -0
- data/node_modules/moment/locale/en-ca.js +64 -0
- data/node_modules/moment/locale/en-gb.js +68 -0
- data/node_modules/moment/locale/en-ie.js +68 -0
- data/node_modules/moment/locale/en-nz.js +68 -0
- data/node_modules/moment/locale/eo.js +74 -0
- data/node_modules/moment/locale/es-do.js +92 -0
- data/node_modules/moment/locale/es-us.js +84 -0
- data/node_modules/moment/locale/es.js +93 -0
- data/node_modules/moment/locale/et.js +82 -0
- data/node_modules/moment/locale/eu.js +67 -0
- data/node_modules/moment/locale/fa.js +108 -0
- data/node_modules/moment/locale/fi.js +110 -0
- data/node_modules/moment/locale/fo.js +61 -0
- data/node_modules/moment/locale/fr-ca.js +75 -0
- data/node_modules/moment/locale/fr-ch.js +79 -0
- data/node_modules/moment/locale/fr.js +84 -0
- data/node_modules/moment/locale/fy.js +76 -0
- data/node_modules/moment/locale/gd.js +77 -0
- data/node_modules/moment/locale/gl.js +78 -0
- data/node_modules/moment/locale/gom-latn.js +124 -0
- data/node_modules/moment/locale/gu.js +125 -0
- data/node_modules/moment/locale/he.js +100 -0
- data/node_modules/moment/locale/hi.js +125 -0
- data/node_modules/moment/locale/hr.js +155 -0
- data/node_modules/moment/locale/hu.js +111 -0
- data/node_modules/moment/locale/hy-am.js +96 -0
- data/node_modules/moment/locale/id.js +84 -0
- data/node_modules/moment/locale/is.js +133 -0
- data/node_modules/moment/locale/it.js +71 -0
- data/node_modules/moment/locale/ja.js +81 -0
- data/node_modules/moment/locale/jv.js +84 -0
- data/node_modules/moment/locale/ka.js +90 -0
- data/node_modules/moment/locale/kk.js +88 -0
- data/node_modules/moment/locale/km.js +59 -0
- data/node_modules/moment/locale/kn.js +127 -0
- data/node_modules/moment/locale/ko.js +83 -0
- data/node_modules/moment/locale/ky.js +89 -0
- data/node_modules/moment/locale/lb.js +138 -0
- data/node_modules/moment/locale/lo.js +71 -0
- data/node_modules/moment/locale/lt.js +119 -0
- data/node_modules/moment/locale/lv.js +99 -0
- data/node_modules/moment/locale/me.js +113 -0
- data/node_modules/moment/locale/mi.js +65 -0
- data/node_modules/moment/locale/mk.js +91 -0
- data/node_modules/moment/locale/ml.js +82 -0
- data/node_modules/moment/locale/mr.js +162 -0
- data/node_modules/moment/locale/ms-my.js +84 -0
- data/node_modules/moment/locale/ms.js +83 -0
- data/node_modules/moment/locale/mt.js +61 -0
- data/node_modules/moment/locale/my.js +97 -0
- data/node_modules/moment/locale/nb.js +64 -0
- data/node_modules/moment/locale/ne.js +124 -0
- data/node_modules/moment/locale/nl-be.js +89 -0
- data/node_modules/moment/locale/nl.js +89 -0
- data/node_modules/moment/locale/nn.js +61 -0
- data/node_modules/moment/locale/pa-in.js +125 -0
- data/node_modules/moment/locale/pl.js +127 -0
- data/node_modules/moment/locale/pt-br.js +62 -0
- data/node_modules/moment/locale/pt.js +66 -0
- data/node_modules/moment/locale/ro.js +77 -0
- data/node_modules/moment/locale/ru.js +185 -0
- data/node_modules/moment/locale/sd.js +99 -0
- data/node_modules/moment/locale/se.js +62 -0
- data/node_modules/moment/locale/si.js +72 -0
- data/node_modules/moment/locale/sk.js +158 -0
- data/node_modules/moment/locale/sl.js +174 -0
- data/node_modules/moment/locale/sq.js +71 -0
- data/node_modules/moment/locale/sr-cyrl.js +112 -0
- data/node_modules/moment/locale/sr.js +112 -0
- data/node_modules/moment/locale/ss.js +90 -0
- data/node_modules/moment/locale/sv.js +70 -0
- data/node_modules/moment/locale/sw.js +60 -0
- data/node_modules/moment/locale/ta.js +131 -0
- data/node_modules/moment/locale/te.js +90 -0
- data/node_modules/moment/locale/tet.js +69 -0
- data/node_modules/moment/locale/th.js +68 -0
- data/node_modules/moment/locale/tl-ph.js +63 -0
- data/node_modules/moment/locale/tlh.js +123 -0
- data/node_modules/moment/locale/tr.js +91 -0
- data/node_modules/moment/locale/tzl.js +93 -0
- data/node_modules/moment/locale/tzm-latn.js +59 -0
- data/node_modules/moment/locale/tzm.js +59 -0
- data/node_modules/moment/locale/uk.js +153 -0
- data/node_modules/moment/locale/ur.js +100 -0
- data/node_modules/moment/locale/uz-latn.js +59 -0
- data/node_modules/moment/locale/uz.js +59 -0
- data/node_modules/moment/locale/vi.js +80 -0
- data/node_modules/moment/locale/x-pseudo.js +69 -0
- data/node_modules/moment/locale/yo.js +61 -0
- data/node_modules/moment/locale/zh-cn.js +112 -0
- data/node_modules/moment/locale/zh-hk.js +106 -0
- data/node_modules/moment/locale/zh-tw.js +105 -0
- data/node_modules/moment/min/locales.js +9769 -0
- data/node_modules/moment/min/moment-with-locales.js +14289 -0
- data/node_modules/moment/moment.js +4535 -0
- data/node_modules/moment/package.json +99 -0
- data/node_modules/nprogress/nprogress.css +74 -0
- data/node_modules/nprogress/nprogress.js +480 -0
- data/node_modules/nprogress/package.json +47 -0
- data/node_modules/nprogress/support/extras.css +4 -0
- data/node_modules/roboto-fontface/css/mixins.scss +36 -0
- data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-bold-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-bold.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-light-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-light.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-regular-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface-regular.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-condensed/sass/roboto-condensed-fontface.scss +6 -0
- data/node_modules/roboto-fontface/css/roboto-slab/sass/roboto-slab-fontface-bold.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-slab/sass/roboto-slab-fontface-light.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-slab/sass/roboto-slab-fontface-regular.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-slab/sass/roboto-slab-fontface-thin.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto-slab/sass/roboto-slab-fontface.scss +4 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-black-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-black.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-bold-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-bold.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-light-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-light.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-medium-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-medium.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-regular-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-regular.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-thin-italic.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface-thin.scss +3 -0
- data/node_modules/roboto-fontface/css/roboto/sass/roboto-fontface.scss +12 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.svg +643 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Bold.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-BoldItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-BoldItalic.svg +643 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-BoldItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-BoldItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-BoldItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.svg +643 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Light.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-LightItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-LightItalic.svg +643 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-LightItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-LightItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-LightItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.svg +644 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-Regular.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-RegularItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-RegularItalic.svg +644 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-RegularItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-RegularItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-condensed/Roboto-Condensed-RegularItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Bold.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Bold.svg +679 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Bold.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Bold.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Bold.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Light.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Light.svg +678 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Light.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Light.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Light.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Regular.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Regular.svg +678 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Regular.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Regular.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Regular.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Thin.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Thin.svg +678 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Thin.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Thin.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto-slab/Roboto-Slab-Thin.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Black.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Black.svg +10968 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Black.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Black.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Black.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BlackItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BlackItalic.svg +11086 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BlackItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BlackItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BlackItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.svg +11010 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Bold.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BoldItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BoldItalic.svg +11096 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BoldItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BoldItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-BoldItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Light.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Light.svg +10564 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Light.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Light.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Light.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-LightItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-LightItalic.svg +10646 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-LightItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-LightItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-LightItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.svg +10999 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Medium.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-MediumItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-MediumItalic.svg +11100 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-MediumItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-MediumItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-MediumItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.svg +10520 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Regular.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-RegularItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-RegularItalic.svg +10629 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-RegularItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-RegularItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-RegularItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.svg +10617 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-Thin.woff2 +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-ThinItalic.eot +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-ThinItalic.svg +10726 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-ThinItalic.ttf +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-ThinItalic.woff +0 -0
- data/node_modules/roboto-fontface/fonts/roboto/Roboto-ThinItalic.woff2 +0 -0
- data/node_modules/roboto-fontface/package.json +28 -0
- data/node_modules/signature_pad/dist/signature_pad.js +610 -0
- data/node_modules/signature_pad/package.json +41 -0
- data/package.json +23 -0
- data/yarn.lock +118 -0
- metadata +575 -0
@@ -0,0 +1,316 @@
|
|
1
|
+
//! moment-timezone-utils.js
|
2
|
+
//! version : 0.5.14
|
3
|
+
//! Copyright (c) JS Foundation and other contributors
|
4
|
+
//! license : MIT
|
5
|
+
//! github.com/moment/moment-timezone
|
6
|
+
|
7
|
+
(function (root, factory) {
|
8
|
+
"use strict";
|
9
|
+
|
10
|
+
/*global define*/
|
11
|
+
if (typeof define === 'function' && define.amd) {
|
12
|
+
define(['moment'], factory); // AMD
|
13
|
+
} else if (typeof module === 'object' && module.exports) {
|
14
|
+
module.exports = factory(require('./')); // Node
|
15
|
+
} else {
|
16
|
+
factory(root.moment); // Browser
|
17
|
+
}
|
18
|
+
}(this, function (moment) {
|
19
|
+
"use strict";
|
20
|
+
|
21
|
+
if (!moment.tz) {
|
22
|
+
throw new Error("moment-timezone-utils.js must be loaded after moment-timezone.js");
|
23
|
+
}
|
24
|
+
|
25
|
+
/************************************
|
26
|
+
Pack Base 60
|
27
|
+
************************************/
|
28
|
+
|
29
|
+
var BASE60 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX',
|
30
|
+
EPSILON = 0.000001; // Used to fix floating point rounding errors
|
31
|
+
|
32
|
+
function packBase60Fraction(fraction, precision) {
|
33
|
+
var buffer = '.',
|
34
|
+
output = '',
|
35
|
+
current;
|
36
|
+
|
37
|
+
while (precision > 0) {
|
38
|
+
precision -= 1;
|
39
|
+
fraction *= 60;
|
40
|
+
current = Math.floor(fraction + EPSILON);
|
41
|
+
buffer += BASE60[current];
|
42
|
+
fraction -= current;
|
43
|
+
|
44
|
+
// Only add buffer to output once we have a non-zero value.
|
45
|
+
// This makes '.000' output '', and '.100' output '.1'
|
46
|
+
if (current) {
|
47
|
+
output += buffer;
|
48
|
+
buffer = '';
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
return output;
|
53
|
+
}
|
54
|
+
|
55
|
+
function packBase60(number, precision) {
|
56
|
+
var output = '',
|
57
|
+
absolute = Math.abs(number),
|
58
|
+
whole = Math.floor(absolute),
|
59
|
+
fraction = packBase60Fraction(absolute - whole, Math.min(~~precision, 10));
|
60
|
+
|
61
|
+
while (whole > 0) {
|
62
|
+
output = BASE60[whole % 60] + output;
|
63
|
+
whole = Math.floor(whole / 60);
|
64
|
+
}
|
65
|
+
|
66
|
+
if (number < 0) {
|
67
|
+
output = '-' + output;
|
68
|
+
}
|
69
|
+
|
70
|
+
if (output && fraction) {
|
71
|
+
return output + fraction;
|
72
|
+
}
|
73
|
+
|
74
|
+
if (!fraction && output === '-') {
|
75
|
+
return '0';
|
76
|
+
}
|
77
|
+
|
78
|
+
return output || fraction || '0';
|
79
|
+
}
|
80
|
+
|
81
|
+
/************************************
|
82
|
+
Pack
|
83
|
+
************************************/
|
84
|
+
|
85
|
+
function packUntils(untils) {
|
86
|
+
var out = [],
|
87
|
+
last = 0,
|
88
|
+
i;
|
89
|
+
|
90
|
+
for (i = 0; i < untils.length - 1; i++) {
|
91
|
+
out[i] = packBase60(Math.round((untils[i] - last) / 1000) / 60, 1);
|
92
|
+
last = untils[i];
|
93
|
+
}
|
94
|
+
|
95
|
+
return out.join(' ');
|
96
|
+
}
|
97
|
+
|
98
|
+
function packAbbrsAndOffsets(source) {
|
99
|
+
var index = 0,
|
100
|
+
abbrs = [],
|
101
|
+
offsets = [],
|
102
|
+
indices = [],
|
103
|
+
map = {},
|
104
|
+
i, key;
|
105
|
+
|
106
|
+
for (i = 0; i < source.abbrs.length; i++) {
|
107
|
+
key = source.abbrs[i] + '|' + source.offsets[i];
|
108
|
+
if (map[key] === undefined) {
|
109
|
+
map[key] = index;
|
110
|
+
abbrs[index] = source.abbrs[i];
|
111
|
+
offsets[index] = packBase60(Math.round(source.offsets[i] * 60) / 60, 1);
|
112
|
+
index++;
|
113
|
+
}
|
114
|
+
indices[i] = packBase60(map[key], 0);
|
115
|
+
}
|
116
|
+
|
117
|
+
return abbrs.join(' ') + '|' + offsets.join(' ') + '|' + indices.join('');
|
118
|
+
}
|
119
|
+
|
120
|
+
function packPopulation (number) {
|
121
|
+
if (!number) {
|
122
|
+
return '';
|
123
|
+
}
|
124
|
+
if (number < 1000) {
|
125
|
+
return '|' + number;
|
126
|
+
}
|
127
|
+
var exponent = String(number | 0).length - 2;
|
128
|
+
var precision = Math.round(number / Math.pow(10, exponent));
|
129
|
+
return '|' + precision + 'e' + exponent;
|
130
|
+
}
|
131
|
+
|
132
|
+
function validatePackData (source) {
|
133
|
+
if (!source.name) { throw new Error("Missing name"); }
|
134
|
+
if (!source.abbrs) { throw new Error("Missing abbrs"); }
|
135
|
+
if (!source.untils) { throw new Error("Missing untils"); }
|
136
|
+
if (!source.offsets) { throw new Error("Missing offsets"); }
|
137
|
+
if (
|
138
|
+
source.offsets.length !== source.untils.length ||
|
139
|
+
source.offsets.length !== source.abbrs.length
|
140
|
+
) {
|
141
|
+
throw new Error("Mismatched array lengths");
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
function pack (source) {
|
146
|
+
validatePackData(source);
|
147
|
+
return [
|
148
|
+
source.name,
|
149
|
+
packAbbrsAndOffsets(source),
|
150
|
+
packUntils(source.untils) + packPopulation(source.population)
|
151
|
+
].join('|');
|
152
|
+
}
|
153
|
+
|
154
|
+
/************************************
|
155
|
+
Create Links
|
156
|
+
************************************/
|
157
|
+
|
158
|
+
function arraysAreEqual(a, b) {
|
159
|
+
var i;
|
160
|
+
|
161
|
+
if (a.length !== b.length) { return false; }
|
162
|
+
|
163
|
+
for (i = 0; i < a.length; i++) {
|
164
|
+
if (a[i] !== b[i]) {
|
165
|
+
return false;
|
166
|
+
}
|
167
|
+
}
|
168
|
+
return true;
|
169
|
+
}
|
170
|
+
|
171
|
+
function zonesAreEqual(a, b) {
|
172
|
+
return arraysAreEqual(a.offsets, b.offsets) && arraysAreEqual(a.abbrs, b.abbrs) && arraysAreEqual(a.untils, b.untils);
|
173
|
+
}
|
174
|
+
|
175
|
+
function findAndCreateLinks (input, output, links) {
|
176
|
+
var i, j, a, b, group, foundGroup, groups = [];
|
177
|
+
|
178
|
+
for (i = 0; i < input.length; i++) {
|
179
|
+
foundGroup = false;
|
180
|
+
a = input[i];
|
181
|
+
|
182
|
+
for (j = 0; j < groups.length; j++) {
|
183
|
+
group = groups[j];
|
184
|
+
b = group[0];
|
185
|
+
if (zonesAreEqual(a, b)) {
|
186
|
+
if (a.population > b.population) {
|
187
|
+
group.unshift(a);
|
188
|
+
} else {
|
189
|
+
group.push(a);
|
190
|
+
}
|
191
|
+
foundGroup = true;
|
192
|
+
}
|
193
|
+
}
|
194
|
+
|
195
|
+
if (!foundGroup) {
|
196
|
+
groups.push([a]);
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
200
|
+
for (i = 0; i < groups.length; i++) {
|
201
|
+
group = groups[i];
|
202
|
+
output.push(group[0]);
|
203
|
+
for (j = 1; j < group.length; j++) {
|
204
|
+
links.push(group[0].name + '|' + group[j].name);
|
205
|
+
}
|
206
|
+
}
|
207
|
+
}
|
208
|
+
|
209
|
+
function createLinks (source) {
|
210
|
+
var zones = [],
|
211
|
+
links = [];
|
212
|
+
|
213
|
+
if (source.links) {
|
214
|
+
links = source.links.slice();
|
215
|
+
}
|
216
|
+
|
217
|
+
findAndCreateLinks(source.zones, zones, links);
|
218
|
+
|
219
|
+
return {
|
220
|
+
version : source.version,
|
221
|
+
zones : zones,
|
222
|
+
links : links.sort()
|
223
|
+
};
|
224
|
+
}
|
225
|
+
|
226
|
+
/************************************
|
227
|
+
Filter Years
|
228
|
+
************************************/
|
229
|
+
|
230
|
+
function findStartAndEndIndex (untils, start, end) {
|
231
|
+
var startI = 0,
|
232
|
+
endI = untils.length + 1,
|
233
|
+
untilYear,
|
234
|
+
i;
|
235
|
+
|
236
|
+
if (!end) {
|
237
|
+
end = start;
|
238
|
+
}
|
239
|
+
|
240
|
+
if (start > end) {
|
241
|
+
i = start;
|
242
|
+
start = end;
|
243
|
+
end = i;
|
244
|
+
}
|
245
|
+
|
246
|
+
for (i = 0; i < untils.length; i++) {
|
247
|
+
if (untils[i] == null) {
|
248
|
+
continue;
|
249
|
+
}
|
250
|
+
untilYear = new Date(untils[i]).getUTCFullYear();
|
251
|
+
if (untilYear < start) {
|
252
|
+
startI = i + 1;
|
253
|
+
}
|
254
|
+
if (untilYear > end) {
|
255
|
+
endI = Math.min(endI, i + 1);
|
256
|
+
}
|
257
|
+
}
|
258
|
+
|
259
|
+
return [startI, endI];
|
260
|
+
}
|
261
|
+
|
262
|
+
function filterYears (source, start, end) {
|
263
|
+
var slice = Array.prototype.slice,
|
264
|
+
indices = findStartAndEndIndex(source.untils, start, end),
|
265
|
+
untils = slice.apply(source.untils, indices);
|
266
|
+
|
267
|
+
untils[untils.length - 1] = null;
|
268
|
+
|
269
|
+
return {
|
270
|
+
name : source.name,
|
271
|
+
abbrs : slice.apply(source.abbrs, indices),
|
272
|
+
untils : untils,
|
273
|
+
offsets : slice.apply(source.offsets, indices),
|
274
|
+
population : source.population
|
275
|
+
};
|
276
|
+
}
|
277
|
+
|
278
|
+
/************************************
|
279
|
+
Filter, Link, and Pack
|
280
|
+
************************************/
|
281
|
+
|
282
|
+
function filterLinkPack (input, start, end) {
|
283
|
+
var i,
|
284
|
+
inputZones = input.zones,
|
285
|
+
outputZones = [],
|
286
|
+
output;
|
287
|
+
|
288
|
+
for (i = 0; i < inputZones.length; i++) {
|
289
|
+
outputZones[i] = filterYears(inputZones[i], start, end);
|
290
|
+
}
|
291
|
+
|
292
|
+
output = createLinks({
|
293
|
+
zones : outputZones,
|
294
|
+
links : input.links.slice(),
|
295
|
+
version : input.version
|
296
|
+
});
|
297
|
+
|
298
|
+
for (i = 0; i < output.zones.length; i++) {
|
299
|
+
output.zones[i] = pack(output.zones[i]);
|
300
|
+
}
|
301
|
+
|
302
|
+
return output;
|
303
|
+
}
|
304
|
+
|
305
|
+
/************************************
|
306
|
+
Exports
|
307
|
+
************************************/
|
308
|
+
|
309
|
+
moment.tz.pack = pack;
|
310
|
+
moment.tz.packBase60 = packBase60;
|
311
|
+
moment.tz.createLinks = createLinks;
|
312
|
+
moment.tz.filterYears = filterYears;
|
313
|
+
moment.tz.filterLinkPack = filterLinkPack;
|
314
|
+
|
315
|
+
return moment;
|
316
|
+
}));
|
@@ -0,0 +1,605 @@
|
|
1
|
+
//! moment-timezone.js
|
2
|
+
//! version : 0.5.14
|
3
|
+
//! Copyright (c) JS Foundation and other contributors
|
4
|
+
//! license : MIT
|
5
|
+
//! github.com/moment/moment-timezone
|
6
|
+
|
7
|
+
(function (root, factory) {
|
8
|
+
"use strict";
|
9
|
+
|
10
|
+
/*global define*/
|
11
|
+
if (typeof define === 'function' && define.amd) {
|
12
|
+
define(['moment'], factory); // AMD
|
13
|
+
} else if (typeof module === 'object' && module.exports) {
|
14
|
+
module.exports = factory(require('moment')); // Node
|
15
|
+
} else {
|
16
|
+
factory(root.moment); // Browser
|
17
|
+
}
|
18
|
+
}(this, function (moment) {
|
19
|
+
"use strict";
|
20
|
+
|
21
|
+
// Do not load moment-timezone a second time.
|
22
|
+
// if (moment.tz !== undefined) {
|
23
|
+
// logError('Moment Timezone ' + moment.tz.version + ' was already loaded ' + (moment.tz.dataVersion ? 'with data from ' : 'without any data') + moment.tz.dataVersion);
|
24
|
+
// return moment;
|
25
|
+
// }
|
26
|
+
|
27
|
+
var VERSION = "0.5.14",
|
28
|
+
zones = {},
|
29
|
+
links = {},
|
30
|
+
names = {},
|
31
|
+
guesses = {},
|
32
|
+
cachedGuess,
|
33
|
+
|
34
|
+
momentVersion = moment.version.split('.'),
|
35
|
+
major = +momentVersion[0],
|
36
|
+
minor = +momentVersion[1];
|
37
|
+
|
38
|
+
// Moment.js version check
|
39
|
+
if (major < 2 || (major === 2 && minor < 6)) {
|
40
|
+
logError('Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com');
|
41
|
+
}
|
42
|
+
|
43
|
+
/************************************
|
44
|
+
Unpacking
|
45
|
+
************************************/
|
46
|
+
|
47
|
+
function charCodeToInt(charCode) {
|
48
|
+
if (charCode > 96) {
|
49
|
+
return charCode - 87;
|
50
|
+
} else if (charCode > 64) {
|
51
|
+
return charCode - 29;
|
52
|
+
}
|
53
|
+
return charCode - 48;
|
54
|
+
}
|
55
|
+
|
56
|
+
function unpackBase60(string) {
|
57
|
+
var i = 0,
|
58
|
+
parts = string.split('.'),
|
59
|
+
whole = parts[0],
|
60
|
+
fractional = parts[1] || '',
|
61
|
+
multiplier = 1,
|
62
|
+
num,
|
63
|
+
out = 0,
|
64
|
+
sign = 1;
|
65
|
+
|
66
|
+
// handle negative numbers
|
67
|
+
if (string.charCodeAt(0) === 45) {
|
68
|
+
i = 1;
|
69
|
+
sign = -1;
|
70
|
+
}
|
71
|
+
|
72
|
+
// handle digits before the decimal
|
73
|
+
for (i; i < whole.length; i++) {
|
74
|
+
num = charCodeToInt(whole.charCodeAt(i));
|
75
|
+
out = 60 * out + num;
|
76
|
+
}
|
77
|
+
|
78
|
+
// handle digits after the decimal
|
79
|
+
for (i = 0; i < fractional.length; i++) {
|
80
|
+
multiplier = multiplier / 60;
|
81
|
+
num = charCodeToInt(fractional.charCodeAt(i));
|
82
|
+
out += num * multiplier;
|
83
|
+
}
|
84
|
+
|
85
|
+
return out * sign;
|
86
|
+
}
|
87
|
+
|
88
|
+
function arrayToInt (array) {
|
89
|
+
for (var i = 0; i < array.length; i++) {
|
90
|
+
array[i] = unpackBase60(array[i]);
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
function intToUntil (array, length) {
|
95
|
+
for (var i = 0; i < length; i++) {
|
96
|
+
array[i] = Math.round((array[i - 1] || 0) + (array[i] * 60000)); // minutes to milliseconds
|
97
|
+
}
|
98
|
+
|
99
|
+
array[length - 1] = Infinity;
|
100
|
+
}
|
101
|
+
|
102
|
+
function mapIndices (source, indices) {
|
103
|
+
var out = [], i;
|
104
|
+
|
105
|
+
for (i = 0; i < indices.length; i++) {
|
106
|
+
out[i] = source[indices[i]];
|
107
|
+
}
|
108
|
+
|
109
|
+
return out;
|
110
|
+
}
|
111
|
+
|
112
|
+
function unpack (string) {
|
113
|
+
var data = string.split('|'),
|
114
|
+
offsets = data[2].split(' '),
|
115
|
+
indices = data[3].split(''),
|
116
|
+
untils = data[4].split(' ');
|
117
|
+
|
118
|
+
arrayToInt(offsets);
|
119
|
+
arrayToInt(indices);
|
120
|
+
arrayToInt(untils);
|
121
|
+
|
122
|
+
intToUntil(untils, indices.length);
|
123
|
+
|
124
|
+
return {
|
125
|
+
name : data[0],
|
126
|
+
abbrs : mapIndices(data[1].split(' '), indices),
|
127
|
+
offsets : mapIndices(offsets, indices),
|
128
|
+
untils : untils,
|
129
|
+
population : data[5] | 0
|
130
|
+
};
|
131
|
+
}
|
132
|
+
|
133
|
+
/************************************
|
134
|
+
Zone object
|
135
|
+
************************************/
|
136
|
+
|
137
|
+
function Zone (packedString) {
|
138
|
+
if (packedString) {
|
139
|
+
this._set(unpack(packedString));
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
Zone.prototype = {
|
144
|
+
_set : function (unpacked) {
|
145
|
+
this.name = unpacked.name;
|
146
|
+
this.abbrs = unpacked.abbrs;
|
147
|
+
this.untils = unpacked.untils;
|
148
|
+
this.offsets = unpacked.offsets;
|
149
|
+
this.population = unpacked.population;
|
150
|
+
},
|
151
|
+
|
152
|
+
_index : function (timestamp) {
|
153
|
+
var target = +timestamp,
|
154
|
+
untils = this.untils,
|
155
|
+
i;
|
156
|
+
|
157
|
+
for (i = 0; i < untils.length; i++) {
|
158
|
+
if (target < untils[i]) {
|
159
|
+
return i;
|
160
|
+
}
|
161
|
+
}
|
162
|
+
},
|
163
|
+
|
164
|
+
parse : function (timestamp) {
|
165
|
+
var target = +timestamp,
|
166
|
+
offsets = this.offsets,
|
167
|
+
untils = this.untils,
|
168
|
+
max = untils.length - 1,
|
169
|
+
offset, offsetNext, offsetPrev, i;
|
170
|
+
|
171
|
+
for (i = 0; i < max; i++) {
|
172
|
+
offset = offsets[i];
|
173
|
+
offsetNext = offsets[i + 1];
|
174
|
+
offsetPrev = offsets[i ? i - 1 : i];
|
175
|
+
|
176
|
+
if (offset < offsetNext && tz.moveAmbiguousForward) {
|
177
|
+
offset = offsetNext;
|
178
|
+
} else if (offset > offsetPrev && tz.moveInvalidForward) {
|
179
|
+
offset = offsetPrev;
|
180
|
+
}
|
181
|
+
|
182
|
+
if (target < untils[i] - (offset * 60000)) {
|
183
|
+
return offsets[i];
|
184
|
+
}
|
185
|
+
}
|
186
|
+
|
187
|
+
return offsets[max];
|
188
|
+
},
|
189
|
+
|
190
|
+
abbr : function (mom) {
|
191
|
+
return this.abbrs[this._index(mom)];
|
192
|
+
},
|
193
|
+
|
194
|
+
offset : function (mom) {
|
195
|
+
logError("zone.offset has been deprecated in favor of zone.utcOffset");
|
196
|
+
return this.offsets[this._index(mom)];
|
197
|
+
},
|
198
|
+
|
199
|
+
utcOffset : function (mom) {
|
200
|
+
return this.offsets[this._index(mom)];
|
201
|
+
}
|
202
|
+
};
|
203
|
+
|
204
|
+
/************************************
|
205
|
+
Current Timezone
|
206
|
+
************************************/
|
207
|
+
|
208
|
+
function OffsetAt(at) {
|
209
|
+
var timeString = at.toTimeString();
|
210
|
+
var abbr = timeString.match(/\([a-z ]+\)/i);
|
211
|
+
if (abbr && abbr[0]) {
|
212
|
+
// 17:56:31 GMT-0600 (CST)
|
213
|
+
// 17:56:31 GMT-0600 (Central Standard Time)
|
214
|
+
abbr = abbr[0].match(/[A-Z]/g);
|
215
|
+
abbr = abbr ? abbr.join('') : undefined;
|
216
|
+
} else {
|
217
|
+
// 17:56:31 CST
|
218
|
+
// 17:56:31 GMT+0800 (台北標準時間)
|
219
|
+
abbr = timeString.match(/[A-Z]{3,5}/g);
|
220
|
+
abbr = abbr ? abbr[0] : undefined;
|
221
|
+
}
|
222
|
+
|
223
|
+
if (abbr === 'GMT') {
|
224
|
+
abbr = undefined;
|
225
|
+
}
|
226
|
+
|
227
|
+
this.at = +at;
|
228
|
+
this.abbr = abbr;
|
229
|
+
this.offset = at.getTimezoneOffset();
|
230
|
+
}
|
231
|
+
|
232
|
+
function ZoneScore(zone) {
|
233
|
+
this.zone = zone;
|
234
|
+
this.offsetScore = 0;
|
235
|
+
this.abbrScore = 0;
|
236
|
+
}
|
237
|
+
|
238
|
+
ZoneScore.prototype.scoreOffsetAt = function (offsetAt) {
|
239
|
+
this.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset);
|
240
|
+
if (this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr) {
|
241
|
+
this.abbrScore++;
|
242
|
+
}
|
243
|
+
};
|
244
|
+
|
245
|
+
function findChange(low, high) {
|
246
|
+
var mid, diff;
|
247
|
+
|
248
|
+
while ((diff = ((high.at - low.at) / 12e4 | 0) * 6e4)) {
|
249
|
+
mid = new OffsetAt(new Date(low.at + diff));
|
250
|
+
if (mid.offset === low.offset) {
|
251
|
+
low = mid;
|
252
|
+
} else {
|
253
|
+
high = mid;
|
254
|
+
}
|
255
|
+
}
|
256
|
+
|
257
|
+
return low;
|
258
|
+
}
|
259
|
+
|
260
|
+
function userOffsets() {
|
261
|
+
var startYear = new Date().getFullYear() - 2,
|
262
|
+
last = new OffsetAt(new Date(startYear, 0, 1)),
|
263
|
+
offsets = [last],
|
264
|
+
change, next, i;
|
265
|
+
|
266
|
+
for (i = 1; i < 48; i++) {
|
267
|
+
next = new OffsetAt(new Date(startYear, i, 1));
|
268
|
+
if (next.offset !== last.offset) {
|
269
|
+
change = findChange(last, next);
|
270
|
+
offsets.push(change);
|
271
|
+
offsets.push(new OffsetAt(new Date(change.at + 6e4)));
|
272
|
+
}
|
273
|
+
last = next;
|
274
|
+
}
|
275
|
+
|
276
|
+
for (i = 0; i < 4; i++) {
|
277
|
+
offsets.push(new OffsetAt(new Date(startYear + i, 0, 1)));
|
278
|
+
offsets.push(new OffsetAt(new Date(startYear + i, 6, 1)));
|
279
|
+
}
|
280
|
+
|
281
|
+
return offsets;
|
282
|
+
}
|
283
|
+
|
284
|
+
function sortZoneScores (a, b) {
|
285
|
+
if (a.offsetScore !== b.offsetScore) {
|
286
|
+
return a.offsetScore - b.offsetScore;
|
287
|
+
}
|
288
|
+
if (a.abbrScore !== b.abbrScore) {
|
289
|
+
return a.abbrScore - b.abbrScore;
|
290
|
+
}
|
291
|
+
return b.zone.population - a.zone.population;
|
292
|
+
}
|
293
|
+
|
294
|
+
function addToGuesses (name, offsets) {
|
295
|
+
var i, offset;
|
296
|
+
arrayToInt(offsets);
|
297
|
+
for (i = 0; i < offsets.length; i++) {
|
298
|
+
offset = offsets[i];
|
299
|
+
guesses[offset] = guesses[offset] || {};
|
300
|
+
guesses[offset][name] = true;
|
301
|
+
}
|
302
|
+
}
|
303
|
+
|
304
|
+
function guessesForUserOffsets (offsets) {
|
305
|
+
var offsetsLength = offsets.length,
|
306
|
+
filteredGuesses = {},
|
307
|
+
out = [],
|
308
|
+
i, j, guessesOffset;
|
309
|
+
|
310
|
+
for (i = 0; i < offsetsLength; i++) {
|
311
|
+
guessesOffset = guesses[offsets[i].offset] || {};
|
312
|
+
for (j in guessesOffset) {
|
313
|
+
if (guessesOffset.hasOwnProperty(j)) {
|
314
|
+
filteredGuesses[j] = true;
|
315
|
+
}
|
316
|
+
}
|
317
|
+
}
|
318
|
+
|
319
|
+
for (i in filteredGuesses) {
|
320
|
+
if (filteredGuesses.hasOwnProperty(i)) {
|
321
|
+
out.push(names[i]);
|
322
|
+
}
|
323
|
+
}
|
324
|
+
|
325
|
+
return out;
|
326
|
+
}
|
327
|
+
|
328
|
+
function rebuildGuess () {
|
329
|
+
|
330
|
+
// use Intl API when available and returning valid time zone
|
331
|
+
try {
|
332
|
+
var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
333
|
+
if (intlName && intlName.length > 3) {
|
334
|
+
var name = names[normalizeName(intlName)];
|
335
|
+
if (name) {
|
336
|
+
return name;
|
337
|
+
}
|
338
|
+
logError("Moment Timezone found " + intlName + " from the Intl api, but did not have that data loaded.");
|
339
|
+
}
|
340
|
+
} catch (e) {
|
341
|
+
// Intl unavailable, fall back to manual guessing.
|
342
|
+
}
|
343
|
+
|
344
|
+
var offsets = userOffsets(),
|
345
|
+
offsetsLength = offsets.length,
|
346
|
+
guesses = guessesForUserOffsets(offsets),
|
347
|
+
zoneScores = [],
|
348
|
+
zoneScore, i, j;
|
349
|
+
|
350
|
+
for (i = 0; i < guesses.length; i++) {
|
351
|
+
zoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength);
|
352
|
+
for (j = 0; j < offsetsLength; j++) {
|
353
|
+
zoneScore.scoreOffsetAt(offsets[j]);
|
354
|
+
}
|
355
|
+
zoneScores.push(zoneScore);
|
356
|
+
}
|
357
|
+
|
358
|
+
zoneScores.sort(sortZoneScores);
|
359
|
+
|
360
|
+
return zoneScores.length > 0 ? zoneScores[0].zone.name : undefined;
|
361
|
+
}
|
362
|
+
|
363
|
+
function guess (ignoreCache) {
|
364
|
+
if (!cachedGuess || ignoreCache) {
|
365
|
+
cachedGuess = rebuildGuess();
|
366
|
+
}
|
367
|
+
return cachedGuess;
|
368
|
+
}
|
369
|
+
|
370
|
+
/************************************
|
371
|
+
Global Methods
|
372
|
+
************************************/
|
373
|
+
|
374
|
+
function normalizeName (name) {
|
375
|
+
return (name || '').toLowerCase().replace(/\//g, '_');
|
376
|
+
}
|
377
|
+
|
378
|
+
function addZone (packed) {
|
379
|
+
var i, name, split, normalized;
|
380
|
+
|
381
|
+
if (typeof packed === "string") {
|
382
|
+
packed = [packed];
|
383
|
+
}
|
384
|
+
|
385
|
+
for (i = 0; i < packed.length; i++) {
|
386
|
+
split = packed[i].split('|');
|
387
|
+
name = split[0];
|
388
|
+
normalized = normalizeName(name);
|
389
|
+
zones[normalized] = packed[i];
|
390
|
+
names[normalized] = name;
|
391
|
+
addToGuesses(normalized, split[2].split(' '));
|
392
|
+
}
|
393
|
+
}
|
394
|
+
|
395
|
+
function getZone (name, caller) {
|
396
|
+
name = normalizeName(name);
|
397
|
+
|
398
|
+
var zone = zones[name];
|
399
|
+
var link;
|
400
|
+
|
401
|
+
if (zone instanceof Zone) {
|
402
|
+
return zone;
|
403
|
+
}
|
404
|
+
|
405
|
+
if (typeof zone === 'string') {
|
406
|
+
zone = new Zone(zone);
|
407
|
+
zones[name] = zone;
|
408
|
+
return zone;
|
409
|
+
}
|
410
|
+
|
411
|
+
// Pass getZone to prevent recursion more than 1 level deep
|
412
|
+
if (links[name] && caller !== getZone && (link = getZone(links[name], getZone))) {
|
413
|
+
zone = zones[name] = new Zone();
|
414
|
+
zone._set(link);
|
415
|
+
zone.name = names[name];
|
416
|
+
return zone;
|
417
|
+
}
|
418
|
+
|
419
|
+
return null;
|
420
|
+
}
|
421
|
+
|
422
|
+
function getNames () {
|
423
|
+
var i, out = [];
|
424
|
+
|
425
|
+
for (i in names) {
|
426
|
+
if (names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i]) {
|
427
|
+
out.push(names[i]);
|
428
|
+
}
|
429
|
+
}
|
430
|
+
|
431
|
+
return out.sort();
|
432
|
+
}
|
433
|
+
|
434
|
+
function addLink (aliases) {
|
435
|
+
var i, alias, normal0, normal1;
|
436
|
+
|
437
|
+
if (typeof aliases === "string") {
|
438
|
+
aliases = [aliases];
|
439
|
+
}
|
440
|
+
|
441
|
+
for (i = 0; i < aliases.length; i++) {
|
442
|
+
alias = aliases[i].split('|');
|
443
|
+
|
444
|
+
normal0 = normalizeName(alias[0]);
|
445
|
+
normal1 = normalizeName(alias[1]);
|
446
|
+
|
447
|
+
links[normal0] = normal1;
|
448
|
+
names[normal0] = alias[0];
|
449
|
+
|
450
|
+
links[normal1] = normal0;
|
451
|
+
names[normal1] = alias[1];
|
452
|
+
}
|
453
|
+
}
|
454
|
+
|
455
|
+
function loadData (data) {
|
456
|
+
addZone(data.zones);
|
457
|
+
addLink(data.links);
|
458
|
+
tz.dataVersion = data.version;
|
459
|
+
}
|
460
|
+
|
461
|
+
function zoneExists (name) {
|
462
|
+
if (!zoneExists.didShowError) {
|
463
|
+
zoneExists.didShowError = true;
|
464
|
+
logError("moment.tz.zoneExists('" + name + "') has been deprecated in favor of !moment.tz.zone('" + name + "')");
|
465
|
+
}
|
466
|
+
return !!getZone(name);
|
467
|
+
}
|
468
|
+
|
469
|
+
function needsOffset (m) {
|
470
|
+
var isUnixTimestamp = (m._f === 'X' || m._f === 'x');
|
471
|
+
return !!(m._a && (m._tzm === undefined) && !isUnixTimestamp);
|
472
|
+
}
|
473
|
+
|
474
|
+
function logError (message) {
|
475
|
+
if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
476
|
+
console.error(message);
|
477
|
+
}
|
478
|
+
}
|
479
|
+
|
480
|
+
/************************************
|
481
|
+
moment.tz namespace
|
482
|
+
************************************/
|
483
|
+
|
484
|
+
function tz (input) {
|
485
|
+
var args = Array.prototype.slice.call(arguments, 0, -1),
|
486
|
+
name = arguments[arguments.length - 1],
|
487
|
+
zone = getZone(name),
|
488
|
+
out = moment.utc.apply(null, args);
|
489
|
+
|
490
|
+
if (zone && !moment.isMoment(input) && needsOffset(out)) {
|
491
|
+
out.add(zone.parse(out), 'minutes');
|
492
|
+
}
|
493
|
+
|
494
|
+
out.tz(name);
|
495
|
+
|
496
|
+
return out;
|
497
|
+
}
|
498
|
+
|
499
|
+
tz.version = VERSION;
|
500
|
+
tz.dataVersion = '';
|
501
|
+
tz._zones = zones;
|
502
|
+
tz._links = links;
|
503
|
+
tz._names = names;
|
504
|
+
tz.add = addZone;
|
505
|
+
tz.link = addLink;
|
506
|
+
tz.load = loadData;
|
507
|
+
tz.zone = getZone;
|
508
|
+
tz.zoneExists = zoneExists; // deprecated in 0.1.0
|
509
|
+
tz.guess = guess;
|
510
|
+
tz.names = getNames;
|
511
|
+
tz.Zone = Zone;
|
512
|
+
tz.unpack = unpack;
|
513
|
+
tz.unpackBase60 = unpackBase60;
|
514
|
+
tz.needsOffset = needsOffset;
|
515
|
+
tz.moveInvalidForward = true;
|
516
|
+
tz.moveAmbiguousForward = false;
|
517
|
+
|
518
|
+
/************************************
|
519
|
+
Interface with Moment.js
|
520
|
+
************************************/
|
521
|
+
|
522
|
+
var fn = moment.fn;
|
523
|
+
|
524
|
+
moment.tz = tz;
|
525
|
+
|
526
|
+
moment.defaultZone = null;
|
527
|
+
|
528
|
+
moment.updateOffset = function (mom, keepTime) {
|
529
|
+
var zone = moment.defaultZone,
|
530
|
+
offset;
|
531
|
+
|
532
|
+
if (mom._z === undefined) {
|
533
|
+
if (zone && needsOffset(mom) && !mom._isUTC) {
|
534
|
+
mom._d = moment.utc(mom._a)._d;
|
535
|
+
mom.utc().add(zone.parse(mom), 'minutes');
|
536
|
+
}
|
537
|
+
mom._z = zone;
|
538
|
+
}
|
539
|
+
if (mom._z) {
|
540
|
+
offset = mom._z.utcOffset(mom);
|
541
|
+
if (Math.abs(offset) < 16) {
|
542
|
+
offset = offset / 60;
|
543
|
+
}
|
544
|
+
if (mom.utcOffset !== undefined) {
|
545
|
+
mom.utcOffset(-offset, keepTime);
|
546
|
+
} else {
|
547
|
+
mom.zone(offset, keepTime);
|
548
|
+
}
|
549
|
+
}
|
550
|
+
};
|
551
|
+
|
552
|
+
fn.tz = function (name, keepTime) {
|
553
|
+
if (name) {
|
554
|
+
this._z = getZone(name);
|
555
|
+
if (this._z) {
|
556
|
+
moment.updateOffset(this, keepTime);
|
557
|
+
} else {
|
558
|
+
logError("Moment Timezone has no data for " + name + ". See http://momentjs.com/timezone/docs/#/data-loading/.");
|
559
|
+
}
|
560
|
+
return this;
|
561
|
+
}
|
562
|
+
if (this._z) { return this._z.name; }
|
563
|
+
};
|
564
|
+
|
565
|
+
function abbrWrap (old) {
|
566
|
+
return function () {
|
567
|
+
if (this._z) { return this._z.abbr(this); }
|
568
|
+
return old.call(this);
|
569
|
+
};
|
570
|
+
}
|
571
|
+
|
572
|
+
function resetZoneWrap (old) {
|
573
|
+
return function () {
|
574
|
+
this._z = null;
|
575
|
+
return old.apply(this, arguments);
|
576
|
+
};
|
577
|
+
}
|
578
|
+
|
579
|
+
fn.zoneName = abbrWrap(fn.zoneName);
|
580
|
+
fn.zoneAbbr = abbrWrap(fn.zoneAbbr);
|
581
|
+
fn.utc = resetZoneWrap(fn.utc);
|
582
|
+
|
583
|
+
moment.tz.setDefault = function(name) {
|
584
|
+
if (major < 2 || (major === 2 && minor < 9)) {
|
585
|
+
logError('Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' + moment.version + '.');
|
586
|
+
}
|
587
|
+
moment.defaultZone = name ? getZone(name) : null;
|
588
|
+
return moment;
|
589
|
+
};
|
590
|
+
|
591
|
+
// Cloning a moment should include the _z property.
|
592
|
+
var momentProperties = moment.momentProperties;
|
593
|
+
if (Object.prototype.toString.call(momentProperties) === '[object Array]') {
|
594
|
+
// moment 2.8.1+
|
595
|
+
momentProperties.push('_z');
|
596
|
+
momentProperties.push('_a');
|
597
|
+
} else if (momentProperties) {
|
598
|
+
// moment 2.7.0
|
599
|
+
momentProperties._z = null;
|
600
|
+
}
|
601
|
+
|
602
|
+
// INJECT DATA
|
603
|
+
|
604
|
+
return moment;
|
605
|
+
}));
|