text: !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){e.declareType("flashcard",{type:"object",properties:{"@id":{type:"string"},"@type":{enum:["flashcard"]},frontText:{type:"string"},backText:{type:"string"},hint:{type:"string"},familiarity:{type:"number"},reviewedCount:{type:"number"},group:{type:"string"},reviewedAt:{type:"string",format:"date-time"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"}},required:["@id","@type","frontText","group","createdAt"]});var t={name:"flashcards",on:e.on,store:function(t){var r=this,n=this._formattedDate(new Date);return t["@id"]=t["@id"]||n,t.group=t.group||"default",t["@type"]="flashcard",t.familiarity=t.familiarity||0,t.reviewedCount=t.reviewedCount||0,t.reviewedAt=t.reviewedAt||n,t.updatedAt=n,t.createdAt||(t.createdAt=n),e.storeObject("flashcard",t.group+"/"+t["@id"],t).then(function(){return r.get(t.group,t["@id"])})},remove:function(t,r){return e.remove(t+"/"+r)},get:function(t,r){return e.getObject(t+"/"+r)},listGroups:function(){return e.getListing()},getAllByGroup:function(t){return t=t||"default",e.getAll(t+"/")},_formattedDate:function(e){var t=function(e){return e=String(e),1===e.length&&(e="0"+e),e},r=t(e.getUTCFullYear().toString()),n=t(e.getUTCMonth()+1),i=t(e.getUTCDate()),o=t(e.getUTCHours()),a=t(e.getUTCMinutes()),u=t(e.getUTCSeconds());return r+n+i+"-"+o+a+u}};return{exports:t}};t.default={name:"flashcards",builder:r}}])});