2018-01-15 01:13:42 +00:00
|
|
|
import { init } from 'sapper/runtime.js'
|
2018-01-19 07:37:43 +00:00
|
|
|
import { offlineNotifiction } from '../routes/_utils/offlineNotification'
|
|
|
|
import { serviceWorkerClient } from '../routes/_utils/serviceWorkerClient'
|
2018-01-19 05:25:12 +00:00
|
|
|
|
2018-01-17 08:06:24 +00:00
|
|
|
import {
|
|
|
|
importURLSearchParams,
|
|
|
|
importIntersectionObserver,
|
2018-01-19 04:57:15 +00:00
|
|
|
importRequestIdleCallback,
|
2018-01-21 03:19:24 +00:00
|
|
|
importIndexedDBGetAllShim,
|
|
|
|
importDialogPolyfill
|
2018-01-17 08:06:24 +00:00
|
|
|
} from '../routes/_utils/asyncModules'
|
2018-01-06 23:51:25 +00:00
|
|
|
|
2018-01-08 07:00:15 +00:00
|
|
|
// polyfills
|
|
|
|
Promise.all([
|
2018-01-17 04:34:09 +00:00
|
|
|
typeof URLSearchParams === 'undefined' && importURLSearchParams(),
|
2018-01-17 08:06:24 +00:00
|
|
|
typeof IntersectionObserver === 'undefined' && importIntersectionObserver(),
|
2018-01-19 04:57:15 +00:00
|
|
|
typeof requestIdleCallback === 'undefined' && importRequestIdleCallback(),
|
2018-01-21 03:19:24 +00:00
|
|
|
!IDBObjectStore.prototype.getAll && importIndexedDBGetAllShim(),
|
|
|
|
typeof HTMLDialogElement === 'undefined' && importDialogPolyfill()
|
2018-01-08 07:00:15 +00:00
|
|
|
]).then(() => {
|
|
|
|
// `routes` is an array of route objects injected by Sapper
|
|
|
|
init(document.querySelector('#sapper'), __routes__)
|
2018-01-19 07:37:43 +00:00
|
|
|
})
|