Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const $pack = parseHTML(
this.packTemplate({
classes: this.classes,
pack
})
)
pack.__dom = $pack
pack.__items = {}
if (pack.classifiable === false) {
each(pack.icons, (name, label) => {
$pack.appendChild(this.buildItem(pack, name, label))
})
} else {
each(pack.categories, (category, icons) => {
$pack.appendChild(this.buildGroup(pack, category, icons))
})
}
this.$main.appendChild($pack)
return $pack
}
this.options.templates.pack.call(this)
)
}
const $pack = parseHTML(
this.packTemplate({
classes: this.classes,
pack
})
)
pack.__dom = $pack
pack.__items = {}
if (pack.classifiable === false) {
each(pack.icons, (name, label) => {
$pack.appendChild(this.buildItem(pack, name, label))
})
} else {
each(pack.categories, (category, icons) => {
$pack.appendChild(this.buildGroup(pack, category, icons))
})
}
this.$main.appendChild($pack)
return $pack
}
const $pack = parseHTML(
this.packTemplate({
classes: this.classes,
pack
})
)
pack.__dom = $pack
pack.__items = {}
if (pack.classifiable === false) {
each(pack.icons, (name, label) => {
$pack.appendChild(this.buildItem(pack, name, label))
})
} else {
each(pack.categories, (category, icons) => {
$pack.appendChild(this.buildGroup(pack, category, icons))
})
}
this.$main.appendChild($pack)
return $pack
}
destroy() {
each(sizes, (name, size) => {
size.destroy()
})
sizes = {}
viewports = {}
ChangeEvent.current = null
},
initialize() {
if (this.options.theme) {
addClass(this.getThemeClass(), this.element)
}
this.steps = []
const that = this
each(this.$steps, (element, index) => {
that.steps.push(new Step(element, that, index))
})
this.present = 0
this.transitioning = null
each(this.steps, step => {
step.setup()
})
this.setup()
this.bind()
if (this.options.keyboard) {
this.KEYBOARD = new Keyboard(this)
}
this.enter('initialized')
this.trigger(EVENTS.READY)
}
unbind() {
each(this.listeners, (event, listener) => {
this.$player.removeEventListener(event, listener)
})
}
if (isArray(source.fonts)) {
source.fonts.forEach(font => {
$source.appendChild(this.buildItem(source, font))
})
} else if (isObject(source.fonts)) {
each(source.fonts, (category, fonts) => {
$source.appendChild(this.buildGroup(source, category, fonts))
})
}
this.$main.appendChild($source)
if (isArray(source.fonts)) {
this.FONTLOADER.observe(source.__items)
} else if (isObject(source.fonts)) {
each(source.__items, (k, group) => {
this.FONTLOADER.observe(group.items)
})
}
return $source
}
const $source = parseHTML(
this.sourceTemplate({
classes: this.classes,
source
})
)
source.__dom = $source
source.__items = {}
if (isArray(source.fonts)) {
source.fonts.forEach(font => {
$source.appendChild(this.buildItem(source, font))
})
} else if (isObject(source.fonts)) {
each(source.fonts, (category, fonts) => {
$source.appendChild(this.buildGroup(source, category, fonts))
})
}
this.$main.appendChild($source)
if (isArray(source.fonts)) {
this.FONTLOADER.observe(source.__items)
} else if (isObject(source.fonts)) {
each(source.__items, (k, group) => {
this.FONTLOADER.observe(group.items)
})
}
return $source
}