diff --git a/.gitignore b/.gitignore index 8c0adf2a..e2fc76ff 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ Thumbs.db *.log .cache /temp -dist \ No newline at end of file +dist +Frappe Accounting* \ No newline at end of file diff --git a/client/index.js b/client/index.js index 5379465e..c28218fd 100644 --- a/client/index.js +++ b/client/index.js @@ -19,7 +19,7 @@ module.exports = { }) frappe.desk.menu.addItem('ToDo', '#list/ToDo'); - frappe.desk.menu.addItem('Accounts', '#list/Account'); + frappe.desk.menu.addItem('Chart of Accounts', '#tree/Account'); frappe.desk.menu.addItem('Items', '#list/Item'); frappe.desk.menu.addItem('Customers', '#list/Customer'); frappe.desk.menu.addItem('Invoice', '#list/Invoice'); @@ -27,7 +27,7 @@ module.exports = { frappe.desk.menu.addItem('Contact', "#list/Contact"); frappe.desk.menu.addItem('Settings', () => frappe.desk.showFormModal('SystemSettings')); - frappe.router.default = '#list/ToDo'; + frappe.router.default = '#tree/Account'; frappe.router.show(window.location.hash); diff --git a/electron/client.js b/electron/client.js index 7de196bf..4179eccf 100644 --- a/electron/client.js +++ b/electron/client.js @@ -4,6 +4,12 @@ const { writeFile } = require('frappejs/server/utils'); const appClient = require('../client'); const SetupWizard = require('../setup'); +const fs = require('fs'); + +require.extensions['.html'] = function (module, filename) { + module.exports = fs.readFileSync(filename, 'utf8'); +}; + (async () => { const configFilePath = path.join(require('os').homedir(), '.config', 'frappe-accounting', 'settings.json'); @@ -20,6 +26,8 @@ const SetupWizard = require('../setup'); dbPath, models: require('../models') }).then(() => { + + frappe.syncDoc(require('../fixtures/invoicePrint')); appClient.start(); }); } else { @@ -50,15 +58,20 @@ const SetupWizard = require('../setup'); const doc = await frappe.getDoc('AccountingSettings'); await doc.set('companyName', companyName); - await doc.set('file', dbPath); await doc.set('country', country); await doc.set('fullname', name); await doc.set('email', email); - await doc.set('abbreviation', abbreviation); await doc.set('bankName', bankName); await doc.update(); + // bootstrap Chart of Accounts + const importCOA = require('../models/doctype/account/importCOA'); + const chart = require('../fixtures/standardCOA'); + await importCOA(chart); + + + frappe.syncDoc(require('../fixtures/invoicePrint')); appClient.start(); }) } diff --git a/fixtures/standardCOA.js b/fixtures/standardCOA.js new file mode 100644 index 00000000..a7ab0a29 --- /dev/null +++ b/fixtures/standardCOA.js @@ -0,0 +1,173 @@ +const frappe = require('frappejs'); +const _ = frappe._.bind(frappe); + +module.exports = { + [_("Application of Funds (Assets)")]: { + [_("Current Assets")]: { + [_("Accounts Receivable")]: { + [_("Debtors")]: { + "accountType": "Receivable" + } + }, + [_("Bank Accounts")]: { + "accountType": "Bank", + "isGroup": 1 + }, + [_("Cash In Hand")]: { + [_("Cash")]: { + "accountType": "Cash" + }, + "accountType": "Cash" + }, + [_("Loans and Advances (Assets)")]: { + "isGroup": 1 + }, + [_("Securities and Deposits")]: { + [_("Earnest Money")]: {} + }, + [_("Stock Assets")]: { + [_("Stock In Hand")]: { + "accountType": "Stock" + }, + "accountType": "Stock", + }, + [_("Tax Assets")]: { + "isGroup": 1 + } + }, + [_("Fixed Assets")]: { + [_("Capital Equipments")]: { + "accountType": "Fixed Asset" + }, + [_("Electronic Equipments")]: { + "accountType": "Fixed Asset" + }, + [_("Furnitures and Fixtures")]: { + "accountType": "Fixed Asset" + }, + [_("Office Equipments")]: { + "accountType": "Fixed Asset" + }, + [_("Plants and Machineries")]: { + "accountType": "Fixed Asset" + }, + [_("Buildings")]: { + "accountType": "Fixed Asset" + }, + [_("Softwares")]: { + "accountType": "Fixed Asset" + }, + [_("Accumulated Depreciation")]: { + "accountType": "Accumulated Depreciation" + } + }, + [_("Investments")]: { + "isGroup": 1 + }, + [_("Temporary Accounts")]: { + [_("Temporary Opening")]: { + "accountType": "Temporary" + } + }, + "rootType": "Asset" + }, + [_("Expenses")]: { + [_("Direct Expenses")]: { + [_("Stock Expenses")]: { + [_("Cost of Goods Sold")]: { + "accountType": "Cost of Goods Sold" + }, + [_("Expenses Included In Valuation")]: { + "accountType": "Expenses Included In Valuation" + }, + [_("Stock Adjustment")]: { + "accountType": "Stock Adjustment" + } + }, + }, + [_("Indirect Expenses")]: { + [_("Administrative Expenses")]: {}, + [_("Commission on Sales")]: {}, + [_("Depreciation")]: { + "accountType": "Depreciation" + }, + [_("Entertainment Expenses")]: {}, + [_("Freight and Forwarding Charges")]: { + "accountType": "Chargeable" + }, + [_("Legal Expenses")]: {}, + [_("Marketing Expenses")]: { + "accountType": "Chargeable" + }, + [_("Miscellaneous Expenses")]: { + "accountType": "Chargeable" + }, + [_("Office Maintenance Expenses")]: {}, + [_("Office Rent")]: {}, + [_("Postal Expenses")]: {}, + [_("Print and Stationery")]: {}, + [_("Round Off")]: { + "accountType": "Round Off" + }, + [_("Salary")]: {}, + [_("Sales Expenses")]: {}, + [_("Telephone Expenses")]: {}, + [_("Travel Expenses")]: {}, + [_("Utility Expenses")]: {}, + [_("Write Off")]: {}, + [_("Exchange Gain/Loss")]: {}, + [_("Gain/Loss on Asset Disposal")]: {} + }, + "rootType": "Expense" + }, + [_("Income")]: { + [_("Direct Income")]: { + [_("Sales")]: {}, + [_("Service")]: {} + }, + [_("Indirect Income")]: { + "isGroup": 1 + }, + "rootType": "Income" + }, + [_("Source of Funds (Liabilities)")]: { + [_("Current Liabilities")]: { + [_("Accounts Payable")]: { + [_("Creditors")]: { + "accountType": "Payable" + }, + [_("Payroll Payable")]: {}, + }, + [_("Stock Liabilities")]: { + [_("Stock Received But Not Billed")]: { + "accountType": "Stock Received But Not Billed" + }, + }, + [_("Duties and Taxes")]: { + "accountType": "Tax", + "isGroup": 1 + }, + [_("Loans (Liabilities)")]: { + [_("Secured Loans")]: {}, + [_("Unsecured Loans")]: {}, + [_("Bank Overdraft Account")]: {}, + }, + }, + "rootType": "Liability" + }, + [_("Equity")]: { + [_("Capital Stock")]: { + "accountType": "Equity" + }, + [_("Dividends Paid")]: { + "accountType": "Equity" + }, + [_("Opening Balance Equity")]: { + "accountType": "Equity" + }, + [_("Retained Earnings")]: { + "accountType": "Equity" + }, + "rootType": "Equity" + } +} \ No newline at end of file diff --git a/main.js b/main.js index 949a5e53..34531b43 100644 --- a/main.js +++ b/main.js @@ -13,7 +13,7 @@ let mainWindow function createWindow () { // Create the browser window. - mainWindow = new BrowserWindow({width: 800, height: 600}) + mainWindow = new BrowserWindow({width: 1024, height: 768}) // and load the index.html of the app. mainWindow.loadURL(url.format({ diff --git a/models/doctype/Account/Account.js b/models/doctype/Account/Account.js index 4aeb3242..75048655 100644 --- a/models/doctype/Account/Account.js +++ b/models/doctype/Account/Account.js @@ -5,7 +5,8 @@ module.exports = { "isSingle": 0, "keywordFields": [ "name", - "account_type" + "rootType", + "accountType" ], "fields": [ { @@ -15,7 +16,7 @@ module.exports = { "required": 1 }, { - "fieldname": "parent_account", + "fieldname": "parentAccount", "label": "Parent Account", "fieldtype": "Link", "target": "Account", @@ -27,8 +28,8 @@ module.exports = { } }, { - "fieldname": "account_type", - "label": "Account Type", + "fieldname": "rootType", + "label": "Root Type", "fieldtype": "Select", "options": [ "Asset", @@ -37,6 +38,37 @@ module.exports = { "Income", "Expense" ] + }, + { + "fieldname": "accountType", + "label": "Account Type", + "fieldtype": "Select", + "options": [ + "Accumulated Depreciation", + "Bank", + "Cash", + "Chargeable", + "Cost of Goods Sold", + "Depreciation", + "Equity", + "Expense Account", + "Expenses Included In Valuation", + "Fixed Asset", + "Income Account", + "Payable", + "Receivable", + "Round Off", + "Stock", + "Stock Adjustment", + "Stock Received But Not Billed", + "Tax", + "Temporary" + ] + }, + { + "fieldname": "isGroup", + "label": "Is Group", + "fieldtype": "Check" } ], @@ -48,10 +80,14 @@ module.exports = { listSettings: { getFields(list) { - return ['name', 'account_type']; + return ['name', 'accountType', 'rootType']; }, getRowHTML(list, data) { - return `
${list.getNameHTML(data)} (${data.account_type})
`; + return `
${list.getNameHTML(data)} (${data.rootType})
`; } + }, + + treeSettings: { + parentField: 'parentAccount' } } \ No newline at end of file diff --git a/models/doctype/Account/AccountDocument.js b/models/doctype/Account/AccountDocument.js index 1a05abbe..527113dd 100644 --- a/models/doctype/Account/AccountDocument.js +++ b/models/doctype/Account/AccountDocument.js @@ -3,11 +3,11 @@ const BaseDocument = require('frappejs/model/document'); module.exports = class Account extends BaseDocument { async validate() { - if (!this.account_type) { - if (this.parent_account) { - this.account_type = await frappe.db.getValue('Account', this.parent_account, 'account_type'); + if (!this.accountType) { + if (this.parentAccount) { + this.accountType = await frappe.db.getValue('Account', this.parentAccount, 'accountType'); } else { - this.account_type = 'Asset'; + this.accountType = 'Asset'; } } } diff --git a/models/doctype/AccountingSettings/AccountingSettings.js b/models/doctype/AccountingSettings/AccountingSettings.js index ab317ac1..a5a3b1a7 100644 --- a/models/doctype/AccountingSettings/AccountingSettings.js +++ b/models/doctype/AccountingSettings/AccountingSettings.js @@ -23,14 +23,6 @@ module.exports = { fieldtype: "Account" }, - { - "fieldname": "file", - "label": "File", - "fieldtype": "Data", - "required": 1, - "directory": 1 - }, - { "fieldname": "country", "label": "Country", @@ -53,13 +45,6 @@ module.exports = { "required": 1 }, - { - "fieldname": "abbreviation", - "label": "Abbreviation", - "fieldtype": "Data", - "required": 1 - }, - { "fieldname": "bankName", "label": "Bank Name", diff --git a/models/doctype/account/importCOA.js b/models/doctype/account/importCOA.js new file mode 100644 index 00000000..2c479ec2 --- /dev/null +++ b/models/doctype/account/importCOA.js @@ -0,0 +1,50 @@ +const frappe = require('frappejs'); +const accountFields = ['accountType', 'rootType', 'isGroup']; + +async function importAccounts(children, parent, rootType, rootAccount) { + for (let accountName in children) { + const child = children[accountName]; + + if (rootAccount) { + rootType = child.rootType; + } + + if (!accountFields.includes(accountName)) { + let isGroup = identifyIsGroup(child); + const doc = frappe.newDoc({ + doctype: 'Account', + name: accountName, + parentAccount: parent, + isGroup, + rootType, + accountType: child.accountType + }) + + await doc.insert() + + await importAccounts(child, accountName, rootType) + } + } +} + +function identifyIsGroup(child) { + if (child.isGroup) { + return child.isGroup; + } + + const keys = Object.keys(child); + const children = keys.filter(key => !accountFields.includes(key)) + + if (children.length) { + return 1; + } + + return 0; +} + +module.exports = async function importCharts(chart) { + if (chart) { + await importAccounts(chart, '', '', true) + } +} + diff --git a/setup/config.js b/setup/config.js index 8f843201..6edb5448 100644 --- a/setup/config.js +++ b/setup/config.js @@ -30,7 +30,8 @@ module.exports = { "fieldname": "email", "label": "Email", "fieldtype": "Data", - "required": 1 + "required": 1, + "inputType": "email" }, { @@ -40,13 +41,6 @@ module.exports = { "required": 1 }, - { - "fieldname": "abbreviation", - "label": "Abbreviation", - "fieldtype": "Data", - "required": 1 - }, - { "fieldname": "bankName", "label": "Bank Name", @@ -73,14 +67,7 @@ module.exports = { { title: 'Add your Company', - columns: [ - { - fields: ['companyName', 'bankName'] - }, - { - fields: ['abbreviation'] - }, - ] + fields: ['companyName', 'bankName'] } ] } diff --git a/setup/index.js b/setup/index.js index 4525c6a2..bba39665 100644 --- a/setup/index.js +++ b/setup/index.js @@ -89,7 +89,29 @@ module.exports = class SetupWizard { } nextSlide() { - this.showSlide(this.currentIndex + 1); + const isValid = this.validateCurrentSlide(); + frappe.ui.toggleClass(this.formLayout.sections[this.currentIndex], 'was-validated', !isValid); + + if (isValid) { + this.showSlide(this.currentIndex + 1); + } + } + + validateCurrentSlide() { + const fields = this.getFieldsInSlide(this.currentIndex); + const inputValidityMap = fields.map(field => this.formLayout.controls[field].input.checkValidity()); + const isValid = !inputValidityMap.includes(false); + return isValid; + } + + getFieldsInSlide(index) { + const visibleSection = slideConfigs.layout[index]; + const fieldsInSlide = visibleSection.fields || + visibleSection.columns.reduce( + (col, fields) => fields.concat(col.fields), [] + ); + + return fieldsInSlide; } activateIndicator(index) { diff --git a/tests/testInvoice.js b/tests/testInvoice.js index a322b1a4..1fca9709 100644 --- a/tests/testInvoice.js +++ b/tests/testInvoice.js @@ -8,7 +8,7 @@ async function makeFixtures() { await frappe.insert({doctype:'Party', name:'Test Customer'}) await frappe.insert({doctype:'Item', name:'Test Item 1', description:'Test Item Description 1', unit:'No', rate: 100}) await frappe.insert({doctype:'Item', name:'Test Item 2', description:'Test Item Description 2', unit:'No', rate: 200}) - await frappe.insert({doctype:'Account', name:'GST', parent_account: 'Liabilities'}); + await frappe.insert({doctype:'Account', name:'GST', parentAccount: 'Liabilities'}); await frappe.insert({doctype:'Tax', name:'GST', details: [{account: 'GST', rate:10}] }) diff --git a/www/dist/css/style.css b/www/dist/css/style.css index fed1eb84..ee316316 100644 --- a/www/dist/css/style.css +++ b/www/dist/css/style.css @@ -7499,29 +7499,31 @@ mark { .vertical-margin { margin: 1rem 0px; } .tree { - padding: 15px; } + padding: 1rem 2rem; } .tree li { - list-style: none; - margin: 2px 0px; } + list-style: none; } ul.tree-children { - padding-left: 20px; } + padding-left: 2rem; } .tree-link { cursor: pointer; - display: inline-block; - padding: 1px; } + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + width: 100%; } +.tree-link:hover { + background-color: #f8f9fa; } .tree-link .node-parent { color: #6c757d; - font-size: 14px; - width: 10px; + width: 24px; + height: 24px; text-align: center; } .tree-link .node-leaf { color: #ced4da; } .tree-link .node-parent, .tree-link .node-leaf { - margin-right: 5px; - margin-left: 2px; - margin-top: 3px; } -.tree-link.active svg { - color: #007bff; } + padding: 0.5rem; } .tree-link.active a { color: #6c757d; } .tree-hover { @@ -7587,3 +7589,5 @@ input[type=file] { overflow: hidden; position: absolute; z-index: -1; } +.was-validated input[type=file]:invalid + button { + border-color: #dc3545; } diff --git a/www/dist/js/bundle.js b/www/dist/js/bundle.js index e7871c1f..0fbc299f 100644 --- a/www/dist/js/bundle.js +++ b/www/dist/js/bundle.js @@ -10235,7 +10235,8 @@ var http = class HTTPClient extends observable { initTypeMap() { this.typeMap = { - 'Currency': true + 'Autocomplete': true + , 'Currency': true , 'Int': true , 'Float': true , 'Percent': true @@ -27107,6 +27108,18 @@ var ui = { } }, + toggleClass(element, className, flag) { + if (flag === undefined) { + flag = !element.classList.contains(className); + } + + if (!flag) { + this.removeClass(element, className); + } else { + this.addClass(element, className); + } + }, + toggle(element, default_display = '') { element.style.display = element.style.display === 'none' ? default_display : 'none'; }, @@ -27402,9 +27415,11 @@ var keyboard = { var list = class BaseList extends observable { constructor({doctype, parent, fields=[], page}) { super(); - Object.assign(this, arguments[0]); + this.init(); + } + init() { this.meta = frappejs.getMeta(this.doctype); this.start = 0; @@ -27414,14 +27429,14 @@ var list = class BaseList extends observable { this.rows = []; this.data = []; - this.setupListSettings(); + this.setupTreeSettings(); frappejs.db.on(`change:${this.doctype}`, (params) => { this.refresh(); }); } - setupListSettings() { + setupTreeSettings() { // list settings that can be overridden by meta this.listSettings = { getFields: list => list.fields, @@ -27713,6 +27728,1040 @@ var list = class BaseList extends observable { } }; +var alert$1 = {"name":"alert","figma":{"id":"0:5","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["warning","triangle","exclamation","point"],"width":16,"height":16,"path":""}; +var beaker = {"name":"beaker","figma":{"id":"0:26","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["experiment","labs","experimental","feature","test","science","education","study","development","testing"],"width":16,"height":16,"path":""}; +var bell = {"name":"bell","figma":{"id":"0:34","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["notification"],"width":14,"height":16,"path":""}; +var bold = {"name":"bold","figma":{"id":"0:38","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["markdown","bold","text"],"width":10,"height":16,"path":""}; +var book = {"name":"book","figma":{"id":"0:43","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["book","journal","wiki","readme"],"width":16,"height":16,"path":""}; +var bookmark = {"name":"bookmark","figma":{"id":"0:54","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["tab","star"],"width":10,"height":16,"path":""}; +var briefcase = {"name":"briefcase","figma":{"id":"0:58","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["suitcase","business"],"width":14,"height":16,"path":""}; +var broadcast = {"name":"broadcast","figma":{"id":"0:63","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["rss","radio","signal"],"width":16,"height":16,"path":""}; +var browser = {"name":"browser","figma":{"id":"0:70","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["window","web"],"width":14,"height":16,"path":""}; +var bug = {"name":"bug","figma":{"id":"0:78","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["insect","issue"],"width":16,"height":16,"path":""}; +var calendar = {"name":"calendar","figma":{"id":"0:82","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["time","day","month","year","date","appointment"],"width":14,"height":16,"path":""}; +var check = {"name":"check","figma":{"id":"0:104","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["mark","yes","confirm","accept","ok","success"],"width":12,"height":16,"path":""}; +var checklist = {"name":"checklist","figma":{"id":"0:108","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["todo","tasks"],"width":16,"height":16,"path":""}; +var clippy = {"name":"clippy","figma":{"id":"0:138","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["copy","paste","save","capture","clipboard"],"width":14,"height":16,"path":""}; +var clock = {"name":"clock","figma":{"id":"0:147","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["time","hour","minute","second","watch"],"width":14,"height":16,"path":""}; +var code = {"name":"code","figma":{"id":"0:160","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["brackets"],"width":14,"height":16,"path":""}; +var comment = {"name":"comment","figma":{"id":"0:169","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["speak","bubble"],"width":16,"height":16,"path":""}; +var dash = {"name":"dash","figma":{"id":"0:178","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["hyphen","range"],"width":8,"height":16,"path":""}; +var dashboard = {"name":"dashboard","figma":{"id":"0:182","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["speed","dial"],"width":16,"height":16,"path":""}; +var database = {"name":"database","figma":{"id":"0:190","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["disks","data"],"width":12,"height":16,"path":""}; +var diff = {"name":"diff","figma":{"id":"0:242","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["difference","changes","compare"],"width":13,"height":16,"path":""}; +var ellipsis = {"name":"ellipsis","figma":{"id":"0:249","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["dot","read","more","hidden","expand"],"width":12,"height":16,"path":""}; +var eye = {"name":"eye","figma":{"id":"0:255","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["look","watch","see"],"width":16,"height":16,"path":""}; +var file = {"name":"file","figma":{"id":"0:308","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["file","text","words"],"width":12,"height":16,"path":""}; +var flame = {"name":"flame","figma":{"id":"0:325","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["fire","hot","burn","trending"],"width":12,"height":16,"path":""}; +var fold = {"name":"fold","figma":{"id":"0:329","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["unfold","hide","collapse"],"width":14,"height":16,"path":""}; +var gear = {"name":"gear","figma":{"id":"0:334","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["settings"],"width":14,"height":16,"path":""}; +var gift = {"name":"gift","figma":{"id":"0:338","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["package","present","skill","craft","freebie"],"width":14,"height":16,"path":""}; +var gist = {"name":"gist","figma":{"id":"0:354","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["gist","github"],"width":12,"height":16,"path":""}; +var globe = {"name":"globe","figma":{"id":"0:389","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["world","earth","planet"],"width":14,"height":16,"path":""}; +var graph = {"name":"graph","figma":{"id":"0:396","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["trend","stats","statistics"],"width":16,"height":16,"path":""}; +var heart = {"name":"heart","figma":{"id":"0:400","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["love","beat"],"width":12,"height":16,"path":""}; +var history = {"name":"history","figma":{"id":"0:404","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["time","past","revert","back"],"width":14,"height":16,"path":""}; +var home = {"name":"home","figma":{"id":"0:408","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["welcome","index","house","building"],"width":16,"height":16,"path":""}; +var hubot = {"name":"hubot","figma":{"id":"0:419","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["robot","bot"],"width":14,"height":16,"path":""}; +var inbox = {"name":"inbox","figma":{"id":"0:426","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["mail","todo","new","messages"],"width":14,"height":16,"path":""}; +var info = {"name":"info","figma":{"id":"0:430","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["help"],"width":14,"height":16,"path":""}; +var italic = {"name":"italic","figma":{"id":"0:454","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["font","italic","style"],"width":6,"height":16,"path":""}; +var jersey = {"name":"jersey","figma":{"id":"0:458","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["team","game","basketball"],"width":14,"height":16,"path":""}; +var keyboard$3 = {"name":"keyboard","figma":{"id":"0:466","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["type","keys","write","shortcuts"],"width":16,"height":16,"path":""}; +var law = {"name":"law","figma":{"id":"0:490","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["legal","bill"],"width":14,"height":16,"path":""}; +var link = {"name":"link","figma":{"id":"0:496","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["connect","hyperlink"],"width":16,"height":16,"path":""}; +var location = {"name":"location","figma":{"id":"0:516","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["here","marker"],"width":12,"height":16,"path":""}; +var lock = {"name":"lock","figma":{"id":"0:521","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["secure","safe","protected"],"width":12,"height":16,"path":""}; +var reply = {"name":"reply","figma":{"id":"0:554","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["reply all","back"],"width":14,"height":16,"path":""}; +var mail = {"name":"mail","figma":{"id":"0:558","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["email","unread"],"width":14,"height":16,"path":""}; +var markdown$1 = {"name":"markdown","figma":{"id":"0:567","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["markup","style"],"width":16,"height":16,"path":""}; +var megaphone = {"name":"megaphone","figma":{"id":"0:572","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["bullhorn","loud","shout","broadcast"],"width":16,"height":16,"path":""}; +var mention = {"name":"mention","figma":{"id":"0:579","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["at","ping"],"width":14,"height":16,"path":""}; +var milestone = {"name":"milestone","figma":{"id":"0:583","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["marker"],"width":14,"height":16,"path":""}; +var mirror = {"name":"mirror","figma":{"id":"0:589","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["reflect"],"width":16,"height":16,"path":""}; +var mute = {"name":"mute","figma":{"id":"0:599","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["quiet","sound","audio","turn","off"],"width":16,"height":16,"path":""}; +var octoface = {"name":"octoface","figma":{"id":"0:609","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["octocat","brand"],"width":16,"height":16,"path":""}; +var organization = {"name":"organization","figma":{"id":"0:613","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["people","group","team"],"width":16,"height":16,"path":""}; +var paintcan = {"name":"paintcan","figma":{"id":"0:624","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["style","theme","art","color"],"width":12,"height":16,"path":""}; +var pencil = {"name":"pencil","figma":{"id":"0:630","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["edit","change","update","write"],"width":14,"height":16,"path":""}; +var person = {"name":"person","figma":{"id":"0:633","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["people","man","woman","human"],"width":12,"height":16,"path":""}; +var pin = {"name":"pin","figma":{"id":"0:635","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["save","star","bookmark"],"width":16,"height":16,"path":""}; +var plug = {"name":"plug","figma":{"id":"0:637","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["hook","webhook"],"width":14,"height":16,"path":""}; +var plus = {"name":"plus","figma":{"id":"0:639","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["add","new","more"],"width":12,"height":16,"path":""}; +var pulse = {"name":"pulse","figma":{"id":"0:645","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["graph","trend","line","activity"],"width":14,"height":16,"path":""}; +var question = {"name":"question","figma":{"id":"0:649","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["help","explain"],"width":14,"height":16,"path":""}; +var quote = {"name":"quote","figma":{"id":"0:655","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["quotation"],"width":14,"height":16,"path":""}; +var repo = {"name":"repo","figma":{"id":"0:706","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["book","journal","repository"],"width":12,"height":16,"path":""}; +var rocket = {"name":"rocket","figma":{"id":"0:715","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["staff","stafftools","blast","off","space","launch","ship"],"width":16,"height":16,"path":""}; +var rss = {"name":"rss","figma":{"id":"0:719","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["broadcast","feed","atom"],"width":10,"height":16,"path":""}; +var ruby = {"name":"ruby","figma":{"id":"0:724","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["code","language"],"width":16,"height":16,"path":""}; +var search = {"name":"search","figma":{"id":"0:729","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["magnifying","glass"],"width":16,"height":16,"path":""}; +var server = {"name":"server","figma":{"id":"0:733","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["computers","racks","ops"],"width":12,"height":16,"path":""}; +var settings = {"name":"settings","figma":{"id":"0:751","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["sliders","filters","controls","levels"],"width":16,"height":16,"path":""}; +var shield = {"name":"shield","figma":{"id":"0:762","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["protect","shield","lock"],"width":14,"height":16,"path":""}; +var smiley = {"name":"smiley","figma":{"id":"0:772","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["emoji","smile","mood","emotion"],"width":16,"height":16,"path":""}; +var squirrel = {"name":"squirrel","figma":{"id":"0:779","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["ship","shipit","launch"],"width":16,"height":16,"path":""}; +var star = {"name":"star","figma":{"id":"0:781","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["save","remember","like"],"width":14,"height":16,"path":""}; +var stop = {"name":"stop","figma":{"id":"0:785","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["block","spam","report"],"width":14,"height":16,"path":""}; +var sync = {"name":"sync","figma":{"id":"0:791","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["cycle","refresh","loop"],"width":12,"height":16,"path":""}; +var tag = {"name":"tag","figma":{"id":"0:795","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["release"],"width":14,"height":16,"path":""}; +var tasklist = {"name":"tasklist","figma":{"id":"0:800","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["todo"],"width":16,"height":16,"path":""}; +var telescope = {"name":"telescope","figma":{"id":"0:806","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["science","space","look","view","explore"],"width":14,"height":16,"path":""}; +var terminal = {"name":"terminal","figma":{"id":"0:815","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["code","ops","shell"],"width":14,"height":16,"path":""}; +var thumbsdown = {"name":"thumbsdown","figma":{"id":"0:831","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["thumb","thumbsdown","rejected","dislike"],"width":16,"height":16,"path":""}; +var thumbsup = {"name":"thumbsup","figma":{"id":"0:835","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["thumb","thumbsup","prop","ship","like"],"width":16,"height":16,"path":""}; +var tools = {"name":"tools","figma":{"id":"0:839","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["screwdriver","wrench","settings"],"width":16,"height":16,"path":""}; +var trashcan = {"name":"trashcan","figma":{"id":"0:844","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["garbage","rubbish","recycle","delete"],"width":12,"height":16,"path":""}; +var unfold = {"name":"unfold","figma":{"id":"0:857","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["expand","open","reveal"],"width":14,"height":16,"path":""}; +var unmute = {"name":"unmute","figma":{"id":"0:862","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["loud","volume","audio","sound","play"],"width":16,"height":16,"path":""}; +var project = {"name":"project","figma":{"id":"0:868","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["board","kanban","columns","scrum"],"width":15,"height":16,"path":""}; +var report = {"name":"report","figma":{"id":"0:885","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["report","abuse","flag"],"width":16,"height":16,"path":""}; +var note = {"name":"note","figma":{"id":"0:891","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["card","paper","ticket"],"width":14,"height":16,"path":""}; +var unverified = {"name":"unverified","figma":{"id":"0:914","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["insecure","untrusted","signed"],"width":16,"height":16,"path":""}; +var verified = {"name":"verified","figma":{"id":"0:919","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["trusted","secure","trustworthy","signed"],"width":16,"height":16,"path":""}; +var versions = {"name":"versions","figma":{"id":"0:923","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["history","commits"],"width":14,"height":16,"path":""}; +var watch = {"name":"watch","figma":{"id":"0:929","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["wait","hourglass","time","date"],"width":12,"height":16,"path":""}; +var x = {"name":"x","figma":{"id":"0:932","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["remove","close","delete"],"width":12,"height":16,"path":""}; +var zap = {"name":"zap","figma":{"id":"0:934","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["electricity","lightning","props","like","star","save"],"width":10,"height":16,"path":""}; +var key = {"name":"key","figma":{"id":"0:938","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["key","lock","secure","safe"],"width":14,"height":16,"path":""}; +var grabber = {"name":"grabber","figma":{"id":"0:942","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["mover","drap","drop","sort"],"width":8,"height":16,"path":""}; +var data = { + alert: alert$1, + beaker: beaker, + bell: bell, + bold: bold, + book: book, + bookmark: bookmark, + briefcase: briefcase, + broadcast: broadcast, + browser: browser, + bug: bug, + calendar: calendar, + check: check, + checklist: checklist, + clippy: clippy, + clock: clock, + code: code, + comment: comment, + dash: dash, + dashboard: dashboard, + database: database, + diff: diff, + ellipsis: ellipsis, + eye: eye, + file: file, + flame: flame, + fold: fold, + gear: gear, + gift: gift, + gist: gist, + globe: globe, + graph: graph, + heart: heart, + history: history, + home: home, + hubot: hubot, + inbox: inbox, + info: info, + italic: italic, + jersey: jersey, + keyboard: keyboard$3, + law: law, + link: link, + location: location, + lock: lock, + reply: reply, + mail: mail, + markdown: markdown$1, + megaphone: megaphone, + mention: mention, + milestone: milestone, + mirror: mirror, + mute: mute, + octoface: octoface, + organization: organization, + paintcan: paintcan, + pencil: pencil, + person: person, + pin: pin, + plug: plug, + plus: plus, + pulse: pulse, + question: question, + quote: quote, + repo: repo, + rocket: rocket, + rss: rss, + ruby: ruby, + search: search, + server: server, + settings: settings, + shield: shield, + smiley: smiley, + squirrel: squirrel, + star: star, + stop: stop, + sync: sync, + tag: tag, + tasklist: tasklist, + telescope: telescope, + terminal: terminal, + thumbsdown: thumbsdown, + thumbsup: thumbsup, + tools: tools, + trashcan: trashcan, + unfold: unfold, + unmute: unmute, + project: project, + report: report, + note: note, + unverified: unverified, + verified: verified, + versions: versions, + watch: watch, + x: x, + zap: zap, + key: key, + grabber: grabber, + "arrow-down": {"name":"arrow-down","figma":{"id":"0:8","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["point","direction"],"width":10,"height":16,"path":""}, + "arrow-left": {"name":"arrow-left","figma":{"id":"0:10","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["point","direction"],"width":10,"height":16,"path":""}, + "arrow-right": {"name":"arrow-right","figma":{"id":"0:12","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["point","direction"],"width":10,"height":16,"path":""}, + "arrow-up": {"name":"arrow-up","figma":{"id":"0:14","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["point","direction"],"width":10,"height":16,"path":""}, + "arrow-small-down": {"name":"arrow-small-down","figma":{"id":"0:16","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["point","direction","little","tiny"],"width":6,"height":16,"path":""}, + "arrow-small-left": {"name":"arrow-small-left","figma":{"id":"0:18","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["point","direction","little","tiny"],"width":6,"height":16,"path":""}, + "arrow-small-right": {"name":"arrow-small-right","figma":{"id":"0:20","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["point","direction","little","tiny"],"width":6,"height":16,"path":""}, + "arrow-small-up": {"name":"arrow-small-up","figma":{"id":"0:22","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["point","direction","little","tiny"],"width":6,"height":16,"path":""}, + "chevron-down": {"name":"chevron-down","figma":{"id":"0:117","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["triangle","arrow"],"width":10,"height":16,"path":""}, + "chevron-left": {"name":"chevron-left","figma":{"id":"0:119","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["triangle","arrow"],"width":8,"height":16,"path":""}, + "chevron-right": {"name":"chevron-right","figma":{"id":"0:121","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["triangle","arrow"],"width":8,"height":16,"path":""}, + "chevron-up": {"name":"chevron-up","figma":{"id":"0:123","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["triangle","arrow"],"width":10,"height":16,"path":""}, + "circle-slash": {"name":"circle-slash","figma":{"id":"0:127","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["no","deny","fail","failure","error","bad"],"width":14,"height":16,"path":""}, + "circuit-board": {"name":"circuit-board","figma":{"id":"0:132","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["developer","hardware","electricity"],"width":14,"height":16,"path":""}, + "cloud-download": {"name":"cloud-download","figma":{"id":"0:152","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["save","install","get"],"width":16,"height":16,"path":""}, + "cloud-upload": {"name":"cloud-upload","figma":{"id":"0:156","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["put","export"],"width":16,"height":16,"path":""}, + "comment-discussion": {"name":"comment-discussion","figma":{"id":"0:164","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["converse","talk"],"width":16,"height":16,"path":""}, + "credit-card": {"name":"credit-card","figma":{"id":"0:173","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["money","billing","payments","transactions"],"width":16,"height":16,"path":""}, + "desktop-download": {"name":"desktop-download","figma":{"id":"0:196","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["clone","download"],"width":16,"height":16,"path":""}, + "device-camera-video": {"name":"device-camera-video","figma":{"id":"0:198","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["watch","view","media","stream"],"width":16,"height":16,"path":""}, + "device-camera": {"name":"device-camera","figma":{"id":"0:202","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["photo","picture","image","snapshot"],"width":16,"height":16,"path":""}, + "device-desktop": {"name":"device-desktop","figma":{"id":"0:208","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["computer","monitor"],"width":16,"height":16,"path":""}, + "device-mobile": {"name":"device-mobile","figma":{"id":"0:212","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["phone","iphone","cellphone"],"width":10,"height":16,"path":""}, + "diff-added": {"name":"diff-added","figma":{"id":"0:217","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["new","addition","plus"],"width":14,"height":16,"path":""}, + "diff-ignored": {"name":"diff-ignored","figma":{"id":"0:222","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["slash"],"width":14,"height":16,"path":""}, + "diff-modified": {"name":"diff-modified","figma":{"id":"0:227","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["dot","changed","updated"],"width":14,"height":16,"path":""}, + "diff-removed": {"name":"diff-removed","figma":{"id":"0:232","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["deleted","subtracted","dash"],"width":14,"height":16,"path":""}, + "diff-renamed": {"name":"diff-renamed","figma":{"id":"0:237","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["moved","arrow"],"width":14,"height":16,"path":""}, + "file-binary": {"name":"file-binary","figma":{"id":"0:260","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["image","video","word","powerpoint","excel"],"width":12,"height":16,"path":""}, + "file-code": {"name":"file-code","figma":{"id":"0:270","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["text","javascript","html","css","php","ruby","coffeescript","sass","scss"],"width":12,"height":16,"path":""}, + "file-directory": {"name":"file-directory","figma":{"id":"0:276","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["folder"],"width":14,"height":16,"path":""}, + "file-media": {"name":"file-media","figma":{"id":"0:280","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["image","video","audio"],"width":12,"height":16,"path":""}, + "file-pdf": {"name":"file-pdf","figma":{"id":"0:285","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["adobe"],"width":12,"height":16,"path":""}, + "file-submodule": {"name":"file-submodule","figma":{"id":"0:292","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["folder"],"width":14,"height":16,"path":""}, + "file-symlink-directory": {"name":"file-symlink-directory","figma":{"id":"0:298","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["folder","subfolder","link","alias"],"width":14,"height":16,"path":""}, + "file-symlink-file": {"name":"file-symlink-file","figma":{"id":"0:303","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["link","alias"],"width":12,"height":16,"path":""}, + "file-zip": {"name":"file-zip","figma":{"id":"0:316","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["compress","archive"],"width":12,"height":16,"path":""}, + "gist-secret": {"name":"gist-secret","figma":{"id":"0:347","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["gist","secret","private"],"width":14,"height":16,"path":""}, + "git-branch": {"name":"git-branch","figma":{"id":"0:360","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["fork","branch","git","duplicate"],"width":10,"height":16,"path":""}, + "git-commit": {"name":"git-commit","figma":{"id":"0:366","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["save"],"width":14,"height":16,"path":""}, + "git-compare": {"name":"git-compare","figma":{"id":"0:370","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["difference","changes"],"width":14,"height":16,"path":""}, + "git-merge": {"name":"git-merge","figma":{"id":"0:376","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["join"],"width":12,"height":16,"path":""}, + "git-pull-request": {"name":"git-pull-request","figma":{"id":"0:382","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["review"],"width":12,"height":16,"path":""}, + "horizontal-rule": {"name":"horizontal-rule","figma":{"id":"0:412","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["hr"],"width":10,"height":16,"path":""}, + "issue-closed": {"name":"issue-closed","figma":{"id":"0:436","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["done","complete"],"width":16,"height":16,"path":""}, + "issue-opened": {"name":"issue-opened","figma":{"id":"0:442","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["new"],"width":14,"height":16,"path":""}, + "issue-reopened": {"name":"issue-reopened","figma":{"id":"0:448","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["regression"],"width":14,"height":16,"path":""}, + "list-ordered": {"name":"list-ordered","figma":{"id":"0:500","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["numbers","tasks","todo","items"],"width":12,"height":16,"path":""}, + "list-unordered": {"name":"list-unordered","figma":{"id":"0:508","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["bullet","point","tasks","todo","items"],"width":12,"height":16,"path":""}, + "logo-gist": {"name":"logo-gist","figma":{"id":"0:529","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["brand","github","logo"],"width":25,"height":16,"path":""}, + "logo-github": {"name":"logo-github","figma":{"id":"0:536","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["brand","github","logo"],"width":45,"height":16,"path":""}, + "mail-read": {"name":"mail-read","figma":{"id":"0:547","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["email","open"],"width":14,"height":16,"path":""}, + "mark-github": {"name":"mark-github","figma":{"id":"0:563","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["octocat","brand","github","logo"],"width":16,"height":16,"path":""}, + "mortar-board": {"name":"mortar-board","figma":{"id":"0:594","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["education","learn","teach"],"width":16,"height":16,"path":""}, + "no-newline": {"name":"no-newline","figma":{"id":"0:603","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["return"],"width":16,"height":16,"path":""}, + "package": {"name":"package","figma":{"id":"0:617","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["box","ship"],"width":16,"height":16,"path":""}, + "primitive-dot": {"name":"primitive-dot","figma":{"id":"0:641","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["circle"],"width":8,"height":16,"path":""}, + "primitive-square": {"name":"primitive-square","figma":{"id":"0:643","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["box"],"width":8,"height":16,"path":""}, + "radio-tower": {"name":"radio-tower","figma":{"id":"0:659","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["broadcast"],"width":16,"height":16,"path":""}, + "repo-clone": {"name":"repo-clone","figma":{"id":"0:669","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["book","journal","repository"],"width":16,"height":16,"path":""}, + "repo-force-push": {"name":"repo-force-push","figma":{"id":"0:681","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["book","journal","put"],"width":12,"height":16,"path":""}, + "repo-forked": {"name":"repo-forked","figma":{"id":"0:685","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["book","journal","copy"],"width":10,"height":16,"path":""}, + "repo-pull": {"name":"repo-pull","figma":{"id":"0:691","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["book","journal","get"],"width":16,"height":16,"path":""}, + "repo-push": {"name":"repo-push","figma":{"id":"0:700","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["book","journal","repository","put"],"width":12,"height":16,"path":""}, + "sign-in": {"name":"sign-in","figma":{"id":"0:764","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["door","arrow","direction","enter","log in"],"width":14,"height":16,"path":""}, + "sign-out": {"name":"sign-out","figma":{"id":"0:768","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["door","arrow","direction","leave","log out"],"width":16,"height":16,"path":""}, + "text-size": {"name":"text-size","figma":{"id":"0:821","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["font","size","text"],"width":18,"height":16,"path":""}, + "three-bars": {"name":"three-bars","figma":{"id":"0:826","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["hamburger","menu","dropdown"],"width":12,"height":16,"path":""}, + "triangle-down": {"name":"triangle-down","figma":{"id":"0:847","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["arrow","point","direction"],"width":12,"height":16,"path":""}, + "triangle-left": {"name":"triangle-left","figma":{"id":"0:849","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["arrow","point","direction"],"width":6,"height":16,"path":""}, + "triangle-right": {"name":"triangle-right","figma":{"id":"0:851","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["arrow","point","direction"],"width":6,"height":16,"path":""}, + "triangle-up": {"name":"triangle-up","figma":{"id":"0:853","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["arrow","point","direction"],"width":12,"height":16,"path":""}, + "kebab-horizontal": {"name":"kebab-horizontal","figma":{"id":"0:875","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["kebab","dot","menu","more"],"width":13,"height":16,"path":""}, + "kebab-vertical": {"name":"kebab-vertical","figma":{"id":"0:880","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["kebab","dot","menu","more"],"width":3,"height":16,"path":""}, + "screen-full": {"name":"screen-full","figma":{"id":"0:898","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["fullscreen","expand"],"width":14,"height":16,"path":""}, + "screen-normal": {"name":"screen-normal","figma":{"id":"0:906","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["fullscreen","expand","exit"],"width":14,"height":16,"path":""}, + "plus-small": {"name":"plus-small","figma":{"id":"0:947","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["add","new","more","small"],"width":7,"height":16,"path":""}, + "light-bulb": {"name":"light-bulb","figma":{"id":"0:951","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["idea"],"width":12,"height":16,"path":""}, + "link-external": {"name":"link-external","figma":{"id":"0:956","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["out","see","more","go","to"],"width":12,"height":16,"path":""} +}; + +var data$1 = Object.freeze({ + alert: alert$1, + beaker: beaker, + bell: bell, + bold: bold, + book: book, + bookmark: bookmark, + briefcase: briefcase, + broadcast: broadcast, + browser: browser, + bug: bug, + calendar: calendar, + check: check, + checklist: checklist, + clippy: clippy, + clock: clock, + code: code, + comment: comment, + dash: dash, + dashboard: dashboard, + database: database, + diff: diff, + ellipsis: ellipsis, + eye: eye, + file: file, + flame: flame, + fold: fold, + gear: gear, + gift: gift, + gist: gist, + globe: globe, + graph: graph, + heart: heart, + history: history, + home: home, + hubot: hubot, + inbox: inbox, + info: info, + italic: italic, + jersey: jersey, + keyboard: keyboard$3, + law: law, + link: link, + location: location, + lock: lock, + reply: reply, + mail: mail, + markdown: markdown$1, + megaphone: megaphone, + mention: mention, + milestone: milestone, + mirror: mirror, + mute: mute, + octoface: octoface, + organization: organization, + paintcan: paintcan, + pencil: pencil, + person: person, + pin: pin, + plug: plug, + plus: plus, + pulse: pulse, + question: question, + quote: quote, + repo: repo, + rocket: rocket, + rss: rss, + ruby: ruby, + search: search, + server: server, + settings: settings, + shield: shield, + smiley: smiley, + squirrel: squirrel, + star: star, + stop: stop, + sync: sync, + tag: tag, + tasklist: tasklist, + telescope: telescope, + terminal: terminal, + thumbsdown: thumbsdown, + thumbsup: thumbsup, + tools: tools, + trashcan: trashcan, + unfold: unfold, + unmute: unmute, + project: project, + report: report, + note: note, + unverified: unverified, + verified: verified, + versions: versions, + watch: watch, + x: x, + zap: zap, + key: key, + grabber: grabber, + default: data +}); + +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + +/* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +var objectAssign = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; + +var data$2 = ( data$1 && data ) || data$1; + +Object.keys(data$2).forEach(function(key) { + + // Returns a string representation of html attributes + var htmlAttributes = function(icon, options) { + var attributes = []; + var attrObj = objectAssign({}, data$2[key].options, options); + + // If the user passed in options + if (options) { + + // If any of the width or height is passed in + if(options["width"] || options["height"]) { + attrObj["width"] = options["width"] ? options["width"] : (parseInt(options["height"]) * data$2[key].options["width"] / data$2[key].options["height"]); + attrObj["height"] = options["height"] ? options["height"] : (parseInt(options["width"]) * data$2[key].options["height"] / data$2[key].options["width"]); + } + + // If the user passed in class + if (options["class"]) { + attrObj["class"] = "octicon octicon-" + key + " " + options["class"]; + attrObj["class"].trim(); + } + + // If the user passed in aria-label + if (options["aria-label"]) { + attrObj["aria-label"] = options["aria-label"]; + attrObj["role"] = "img"; + + // Un-hide the icon + delete attrObj["aria-hidden"]; + } + } + + Object.keys(attrObj).forEach(function(option) { + attributes.push(option + "=\"" + attrObj[option] + "\""); + }); + + return attributes.join(" ").trim() + }; + + // Set the symbol for easy access + data$2[key].symbol = key; + + // Set all the default options + data$2[key].options = { + "version": "1.1", + "width": data$2[key].width, + "height": data$2[key].height, + "viewBox": "0 0 " + data$2[key].width + " " + data$2[key].height, + "class": "octicon octicon-" + key, + "aria-hidden": "true" + }; + + // Function to return an SVG object + data$2[key].toSVG = function(options) { + return "" + data$2[key].path + "" + }; +}); + +// Import data into exports +var octicons = data$2; + +var utils$3 = { + convertFieldsToDatatableColumns(fields, layout = 'fixed') { + return fields.map(field => { + if (!field.width) { + if (layout==='ratio') { + field.width = 1; + } else if (layout==='fixed') { + field.width = 120; + } + } + return { + id: field.fieldname || frappejs.slug(field.label), + field: field, + content: field.label, + editable: true, + sortable: false, + resizable: true, + dropdown: false, + width: field.width, + align: ['Int', 'Float', 'Currency'].includes(field.fieldtype) ? 'right' : 'left', + format: (value) => frappejs.format(value, field) + } + }); + + }, + + addButton(label, parent, action, unhide = true) { + const link = frappejs.ui.add('button', 'btn btn-sm btn-outline-secondary', parent, label); + link.type = 'button'; + link.addEventListener('click', action); + if (unhide) { + parent.classList.remove('hide'); + } + return link; + }, + + // https://css-tricks.com/snippets/javascript/loop-queryselectorall-matches/ + forEachNode(nodeList, callback, scope) { + if(!nodeList) return; + for (var i = 0; i < nodeList.length; i++) { + callback.call(scope, nodeList[i], i); + } + }, + + activate($parent, $child, commonSelector, activeClass='active', index = -1) { + let $children = $parent.querySelectorAll(`${commonSelector}.${activeClass}`); + + if (typeof $child === 'string') { + $child = $parent.querySelector($child); + } + + this.forEachNode($children, (node, i) => { + if(index >= 0 && i <= index) return; + node.classList.remove(activeClass); + }); + + $child.classList.add(activeClass); + } +}; + +class Tree { + constructor({parent, label, iconSet, withSkeleton, method}) { + Object.assign(this, arguments[0]); + this.nodes = {}; + if(!iconSet) { + this.iconSet = { + open: octicons["triangle-down"].toSVG({ "width": 10, "class": "node-parent"}), + closed: octicons["triangle-right"].toSVG({ "width": 5, "class": "node-parent"}), + leaf: octicons["primitive-dot"].toSVG({ "width": 7, "class": "node-leaf"}) + }; + } + this.make(); + } + + make() { + this.tree = frappejs.ui.create('div', { + inside: this.parent, + className: 'tree ' + (this.withSkeleton ? 'with-skeleton' : '') + }); + + this.rootNode = this.makeNode(this.label, this.label, true, null, this.tree); + this.expandNode(this.rootNode); + } + + refresh() { + // this.selectedNode.parentNode && + // this.loadChildren(this.selectedNode.parentNode, true); + } + + async loadChildren(node, deep=false) { + let children = !deep ? await this.method(node) : await this.getAllNodes(node); + this.renderNodeChildren(node, children); + } + + renderChildrenDeep(dataList) { + dataList.map(d => { this.renderNodeChildren(this.nodes[d.parent], d.data); }); + } + + renderNodeChildren(node, dataSet=[]) { + frappejs.ui.empty(node.childrenList); + + dataSet.forEach(data => { + let parentNode = this.nodes[node.value]; + let childNode = this.makeNode(data.label || data.value, data.value, + data.expandable, parentNode); + childNode.treeLink.dataset.nodeData = data; + }); + node.expanded = false; + + // As children loaded + node.loaded = true; + this.onNodeClick(node, true); + } + + getAllNodes() { } + + makeNode(label, value, expandable, parentNode, parentEl) { + let node = { + label: label, + value: value, + loaded: 0, + expanded: 0, + expandable: expandable, + }; + + if(parentNode){ + node.parentNode = parentNode; + node.parent = parentNode.childrenList; + node.isRoot = 0; + } else { + node.isRoot = 1; + node.parent = parentEl; + } + + this.nodes[value] = node; + this.buildNodeElement(node); + this.onRender && this.onRender(node); + + return node; + } + + buildNodeElement(node) { + node.parentLi = frappejs.ui.create('li', { + inside: node.parent, + className: 'tree-node' + }); + + let iconHtml = ''; + if(this.iconSet) { + iconHtml = node.expandable ? this.iconSet.closed : this.iconSet.leaf; + } + let labelEl = ` ${node.label}`; + + node.treeLink = frappejs.ui.create('span', { + inside: node.parentLi, + className: 'tree-link', + 'data-label': node.label, + innerHTML: iconHtml + labelEl + }); + node.treeLink.dataset.node = node; + node.treeLink.addEventListener('click', () => { + this.onNodeClick(node); + }); + + node.childrenList = frappejs.ui.create('ul', { + inside: node.parentLi, + className: 'tree-children hide' + }); + + // if(this.toolbar) { + // node.toolbar = this.getToolbar(node).insertAfter(node.treeLink); + // } + } + + async onNodeClick(node, click = true) { + this.setSelectedNode(node); + if(click) { + this.onClick && this.onClick(node); + } + await this.expandNode(node); + // select link + utils$3.activate(this.tree, node.treeLink, 'tree-link', 'active'); + if(node.toolbar) this.showToolbar(node); + } + + async expandNode(node) { + if(node.expandable) { + await this.toggleNode(node); + } + + node.expanded = !node.expanded; + // node.parent.classList.toggle('opened', node.expanded); + node.parent.classList.add('opened'); + node.parentLi.classList.add('opened'); + } + + async toggleNode(node) { + if(!node.loaded) await this.loadChildren(node); + + // expand children + if(node.childrenList) { + if(node.childrenList.innerHTML.length) { + if (node.expanded) { + node.childrenList.classList.add('hide'); + } else { + node.childrenList.classList.remove('hide'); + } + } + + // open close icon + if(this.iconSet) { + const oldIcon = node.treeLink.querySelector('svg'); + const newIconKey = node.expanded ? 'closed' : 'open'; + const newIcon = frappejs.ui.create(this.iconSet[newIconKey]); + node.treeLink.replaceChild(newIcon, oldIcon); + } + } + } + + getSelectedNode() { return this.selectedNode; } + + setSelectedNode(node) { this.selectedNode = node; } + + showToolbar() { } +} + +var tree = Tree; + +// const keyboard = require('frappejs/client/ui/keyboard'); + +var tree$2 = class BaseTree extends list { + + init() { + this.meta = frappejs.getMeta(this.doctype); + + this.body = null; + this.data = []; + + this.setupTreeSettings(); + + frappejs.db.on(`change:${this.doctype}`, (params) => { + this.refresh(); + }); + } + + setupTreeSettings() { + // tree settings that can be overridden by meta + this.treeSettings = { + parentField: `parent${this.doctype}` + }; + + if (this.meta.treeSettings) { + Object.assign(this.treeSettings, this.meta.treeSettings); + } + } + + async refresh() { + return await this.run(); + } + + async run() { + this.makeBody(); + this.body.innerHTML = ''; + this.dirty = false; + + let accountingSettings = await frappejs.db.getSingle('AccountingSettings'); + let rootLabel = accountingSettings.companyName; + + this.renderTree(rootLabel); + + // this.clearEmptyRows(); + // this.updateMore(data.length > this.pageLength); + // this.selectDefaultRow(); + // this.setActiveListRow(); + this.trigger('state-change'); + } + + makeBody() { + if (!this.body) { + this.makeToolbar(); + this.parent.classList.add('tree-page'); + this.body = frappejs.ui.add('div', 'tree-body', this.parent); + this.body.setAttribute('data-doctype', this.doctype); + this.bindKeys(); + } + } + + renderTree(rootLabel) { + this.tree = new tree({ + label: rootLabel, + parent: this.body, + method: async node => { + const children = await this.getData(node) || []; + return children.map(d => ({ + label: d.name, + value: d.name, + expandable: d.isGroup + })); + } + }); + } + + async getData(node) { + let fields = this.getFields(); + let filters = {}; + + if (node.isRoot) { + filters[this.treeSettings.parentField] = ''; + } else { + filters[this.treeSettings.parentField] = node.value; + } + + return await frappejs.db.getAll({ + doctype: this.doctype, + fields, + filters, + order_by: 'name', + order: 'asc' + }); + } + + getFields() { + let fields = [this.treeSettings.parentField, 'isGroup']; + this.updateStandardFields(fields); + return fields; + } + + getNameHTML(data) { + return `${data[this.meta.titleField]}`; + } + + getRow(i) { + if (!this.rows[i]) { + let row = frappejs.ui.add('div', 'list-row row no-gutters', this.body); + + // open on click + let me = this; + row.addEventListener('click', async function(e) { + if (!e.target.tagName !== 'input') { + await me.showItem(this.docName); + } + }); + row.style.display = 'flex'; + + // make element focusable + row.setAttribute('tabindex', -1); + this.rows[i] = row; + } + return this.rows[i]; + } + + refreshRow(doc) { + let row = this.getRowByName(doc.name); + if (row) { + this.renderRow(row, doc); + } + } + + async showItem(name) { + if (this.meta.print) { + await frappejs.router.setRoute('print', this.doctype, name); + } else { + await frappejs.router.setRoute('edit', this.doctype, name); + } + } + + getCheckedRowNames() { + return [...this.body.querySelectorAll('.checkbox:checked')].map(check => check.getAttribute('data-name')); + } + + clearEmptyRows() { + if (this.rows.length > this.data.length) { + for (let i=this.data.length; i < this.rows.length; i++) { + let row = this.getRow(i); + row.innerHTML = ''; + row.style.display = 'none'; + } + } + } + + selectDefaultRow() { + if (!frappejs.desk.body.activePage && this.rows.length) { + this.showItem(this.rows[0].docName); + } + } + + makeToolbar() { + this.makeSearch(); + + this.btnNew = this.page.addButton(frappejs._('New'), 'btn-primary', async () => { + await frappejs.router.setRoute('new', this.doctype); + }); + + this.btnDelete = this.page.addButton(frappejs._('Delete'), 'btn-secondary hide', async () => { + await frappejs.db.deleteMany(this.doctype, this.getCheckedRowNames()); + await this.refresh(); + }); + + this.btnReport = this.page.addButton(frappejs._('Report'), 'btn-outline-secondary hide', async () => { + await frappejs.router.setRoute('table', this.doctype); + }); + + this.on('state-change', () => { + const checkedCount = this.getCheckedRowNames().length; + this.btnDelete.classList.toggle('hide', checkedCount ? false : true); + this.btnNew.classList.toggle('hide', checkedCount ? true : false); + this.btnReport.classList.toggle('hide', checkedCount ? true : false); + }); + + this.page.body.addEventListener('click', (event) => { + if(event.target.classList.contains('checkbox')) { + this.trigger('state-change'); + } + }); + } + + makeSearch() { + this.toolbar = frappejs.ui.add('div', 'list-toolbar', this.parent); + this.toolbar.innerHTML = ` + + `; + + this.searchInput = this.toolbar.querySelector('input'); + this.searchInput.addEventListener('keypress', (event) => { + if (event.keyCode===13) { + this.refresh(); + } + }); + + this.btnSearch = this.toolbar.querySelector('.btn-search'); + this.btnSearch.addEventListener('click', (event) => { + this.refresh(); + }); + } + + bindKeys() { + // keyboard.bindKey(this.body, 'up', () => this.move('up')); + // keyboard.bindKey(this.body, 'down', () => this.move('down')) + + // keyboard.bindKey(this.body, 'right', () => { + // if (frappe.desk.body.activePage) { + // frappe.desk.body.activePage.body.querySelector('input').focus(); + // } + // }); + + // keyboard.bindKey(this.body, 'n', (e) => { + // frappe.router.setRoute('new', this.doctype); + // e.preventDefault(); + // }); + + // keyboard.bindKey(this.body, 'x', async (e) => { + // let activeListRow = this.getActiveListRow(); + // if (activeListRow && activeListRow.docName) { + // e.preventDefault(); + // await frappe.db.delete(this.doctype, activeListRow.docName); + // frappe.desk.body.activePage.hide(); + // } + // }); + } + + async move(direction) { + let elementRef = direction === 'up' ? 'previousSibling' : 'nextSibling'; + if (document.activeElement && document.activeElement.classList.contains('list-row')) { + let next = document.activeElement[elementRef]; + if (next && next.docName) { + await this.showItem(next.docName); + } + } + } + + setActiveListRow(name) { + let activeListRow = this.getActiveListRow(); + if (activeListRow) { + activeListRow.classList.remove('active'); + } + + if (!name) { + // get name from active page + name = frappejs.desk.activeDoc && frappejs.desk.activeDoc.name; + } + + if (name) { + let row = this.getRowByName(name); + if (row) { + row.classList.add('active'); + row.focus(); + } + } + } + + getRowByName(name) { + return this.body.querySelector(`.list-row[data-name="${name}"]`); + } + + getActiveListRow() { + return this.body.querySelector('.list-row.active'); + } +}; + class BaseControl { constructor({field, parent, form}) { BaseControl.count++; @@ -27882,6 +28931,7 @@ class BaseControl { async handleChange(event) { let value = await this.parse(this.getInputValue()); value = await this.validate(value); + this.input.setCustomValidity(value === false ? 'error' : ''); await this.updateDocValue(value); } @@ -27917,6 +28967,537 @@ BaseControl.count = 0; var base = BaseControl; +var awesomplete = createCommonjsModule(function (module) { +/** + * Simple, lightweight, usable local autocomplete library for modern browsers + * Because there weren’t enough autocomplete scripts in the world? Because I’m completely insane and have NIH syndrome? Probably both. :P + * @author Lea Verou http://leaverou.github.io/awesomplete + * MIT license + */ + +(function () { + +var _ = function (input, o) { + var me = this; + + // Setup + + this.isOpened = false; + + this.input = $(input); + this.input.setAttribute("autocomplete", "off"); + this.input.setAttribute("aria-autocomplete", "list"); + + o = o || {}; + + configure(this, { + minChars: 2, + maxItems: 10, + autoFirst: false, + data: _.DATA, + filter: _.FILTER_CONTAINS, + sort: o.sort === false ? false : _.SORT_BYLENGTH, + item: _.ITEM, + replace: _.REPLACE + }, o); + + this.index = -1; + + // Create necessary elements + + this.container = $.create("div", { + className: "awesomplete", + around: input + }); + + this.ul = $.create("ul", { + hidden: "hidden", + inside: this.container + }); + + this.status = $.create("span", { + className: "visually-hidden", + role: "status", + "aria-live": "assertive", + "aria-relevant": "additions", + inside: this.container + }); + + // Bind events + + this._events = { + input: { + "input": this.evaluate.bind(this), + "blur": this.close.bind(this, { reason: "blur" }), + "keydown": function(evt) { + var c = evt.keyCode; + + // If the dropdown `ul` is in view, then act on keydown for the following keys: + // Enter / Esc / Up / Down + if(me.opened) { + if (c === 13 && me.selected) { // Enter + evt.preventDefault(); + me.select(); + } + else if (c === 27) { // Esc + me.close({ reason: "esc" }); + } + else if (c === 38 || c === 40) { // Down/Up arrow + evt.preventDefault(); + me[c === 38? "previous" : "next"](); + } + } + } + }, + form: { + "submit": this.close.bind(this, { reason: "submit" }) + }, + ul: { + "mousedown": function(evt) { + var li = evt.target; + + if (li !== this) { + + while (li && !/li/i.test(li.nodeName)) { + li = li.parentNode; + } + + if (li && evt.button === 0) { // Only select on left click + evt.preventDefault(); + me.select(li, evt.target); + } + } + } + } + }; + + $.bind(this.input, this._events.input); + $.bind(this.input.form, this._events.form); + $.bind(this.ul, this._events.ul); + + if (this.input.hasAttribute("list")) { + this.list = "#" + this.input.getAttribute("list"); + this.input.removeAttribute("list"); + } + else { + this.list = this.input.getAttribute("data-list") || o.list || []; + } + + _.all.push(this); +}; + +_.prototype = { + set list(list) { + if (Array.isArray(list)) { + this._list = list; + } + else if (typeof list === "string" && list.indexOf(",") > -1) { + this._list = list.split(/\s*,\s*/); + } + else { // Element or CSS selector + list = $(list); + + if (list && list.children) { + var items = []; + slice.apply(list.children).forEach(function (el) { + if (!el.disabled) { + var text = el.textContent.trim(); + var value = el.value || text; + var label = el.label || text; + if (value !== "") { + items.push({ label: label, value: value }); + } + } + }); + this._list = items; + } + } + + if (document.activeElement === this.input) { + this.evaluate(); + } + }, + + get selected() { + return this.index > -1; + }, + + get opened() { + return this.isOpened; + }, + + close: function (o) { + if (!this.opened) { + return; + } + + this.ul.setAttribute("hidden", ""); + this.isOpened = false; + this.index = -1; + + $.fire(this.input, "awesomplete-close", o || {}); + }, + + open: function () { + this.ul.removeAttribute("hidden"); + this.isOpened = true; + + if (this.autoFirst && this.index === -1) { + this.goto(0); + } + + $.fire(this.input, "awesomplete-open"); + }, + + destroy: function() { + //remove events from the input and its form + $.unbind(this.input, this._events.input); + $.unbind(this.input.form, this._events.form); + + //move the input out of the awesomplete container and remove the container and its children + var parentNode = this.container.parentNode; + + parentNode.insertBefore(this.input, this.container); + parentNode.removeChild(this.container); + + //remove autocomplete and aria-autocomplete attributes + this.input.removeAttribute("autocomplete"); + this.input.removeAttribute("aria-autocomplete"); + + //remove this awesomeplete instance from the global array of instances + var indexOfAwesomplete = _.all.indexOf(this); + + if (indexOfAwesomplete !== -1) { + _.all.splice(indexOfAwesomplete, 1); + } + }, + + next: function () { + var count = this.ul.children.length; + this.goto(this.index < count - 1 ? this.index + 1 : (count ? 0 : -1) ); + }, + + previous: function () { + var count = this.ul.children.length; + var pos = this.index - 1; + + this.goto(this.selected && pos !== -1 ? pos : count - 1); + }, + + // Should not be used, highlights specific item without any checks! + goto: function (i) { + var lis = this.ul.children; + + if (this.selected) { + lis[this.index].setAttribute("aria-selected", "false"); + } + + this.index = i; + + if (i > -1 && lis.length > 0) { + lis[i].setAttribute("aria-selected", "true"); + this.status.textContent = lis[i].textContent; + + // scroll to highlighted element in case parent's height is fixed + this.ul.scrollTop = lis[i].offsetTop - this.ul.clientHeight + lis[i].clientHeight; + + $.fire(this.input, "awesomplete-highlight", { + text: this.suggestions[this.index] + }); + } + }, + + select: function (selected, origin) { + if (selected) { + this.index = $.siblingIndex(selected); + } else { + selected = this.ul.children[this.index]; + } + + if (selected) { + var suggestion = this.suggestions[this.index]; + + var allowed = $.fire(this.input, "awesomplete-select", { + text: suggestion, + origin: origin || selected + }); + + if (allowed) { + this.replace(suggestion); + this.close({ reason: "select" }); + $.fire(this.input, "awesomplete-selectcomplete", { + text: suggestion + }); + } + } + }, + + evaluate: function() { + var me = this; + var value = this.input.value; + + if (value.length >= this.minChars && this._list.length > 0) { + this.index = -1; + // Populate list with options that match + this.ul.innerHTML = ""; + + this.suggestions = this._list + .map(function(item) { + return new Suggestion(me.data(item, value)); + }) + .filter(function(item) { + return me.filter(item, value); + }); + + if (this.sort !== false) { + this.suggestions = this.suggestions.sort(this.sort); + } + + this.suggestions = this.suggestions.slice(0, this.maxItems); + + this.suggestions.forEach(function(text) { + me.ul.appendChild(me.item(text, value)); + }); + + if (this.ul.children.length === 0) { + this.close({ reason: "nomatches" }); + } else { + this.open(); + } + } + else { + this.close({ reason: "nomatches" }); + } + } +}; + +// Static methods/properties + +_.all = []; + +_.FILTER_CONTAINS = function (text, input) { + return RegExp($.regExpEscape(input.trim()), "i").test(text); +}; + +_.FILTER_STARTSWITH = function (text, input) { + return RegExp("^" + $.regExpEscape(input.trim()), "i").test(text); +}; + +_.SORT_BYLENGTH = function (a, b) { + if (a.length !== b.length) { + return a.length - b.length; + } + + return a < b? -1 : 1; +}; + +_.ITEM = function (text, input) { + var html = input.trim() === "" ? text : text.replace(RegExp($.regExpEscape(input.trim()), "gi"), "$&"); + return $.create("li", { + innerHTML: html, + "aria-selected": "false" + }); +}; + +_.REPLACE = function (text) { + this.input.value = text.value; +}; + +_.DATA = function (item/*, input*/) { return item; }; + +// Private functions + +function Suggestion(data) { + var o = Array.isArray(data) + ? { label: data[0], value: data[1] } + : typeof data === "object" && "label" in data && "value" in data ? data : { label: data, value: data }; + + this.label = o.label || o.value; + this.value = o.value; +} +Object.defineProperty(Suggestion.prototype = Object.create(String.prototype), "length", { + get: function() { return this.label.length; } +}); +Suggestion.prototype.toString = Suggestion.prototype.valueOf = function () { + return "" + this.label; +}; + +function configure(instance, properties, o) { + for (var i in properties) { + var initial = properties[i], + attrValue = instance.input.getAttribute("data-" + i.toLowerCase()); + + if (typeof initial === "number") { + instance[i] = parseInt(attrValue); + } + else if (initial === false) { // Boolean options must be false by default anyway + instance[i] = attrValue !== null; + } + else if (initial instanceof Function) { + instance[i] = null; + } + else { + instance[i] = attrValue; + } + + if (!instance[i] && instance[i] !== 0) { + instance[i] = (i in o)? o[i] : initial; + } + } +} + +// Helpers + +var slice = Array.prototype.slice; + +function $(expr, con) { + return typeof expr === "string"? (con || document).querySelector(expr) : expr || null; +} + +function $$(expr, con) { + return slice.call((con || document).querySelectorAll(expr)); +} + +$.create = function(tag, o) { + var element = document.createElement(tag); + + for (var i in o) { + var val = o[i]; + + if (i === "inside") { + $(val).appendChild(element); + } + else if (i === "around") { + var ref = $(val); + ref.parentNode.insertBefore(element, ref); + element.appendChild(ref); + } + else if (i in element) { + element[i] = val; + } + else { + element.setAttribute(i, val); + } + } + + return element; +}; + +$.bind = function(element, o) { + if (element) { + for (var event in o) { + var callback = o[event]; + + event.split(/\s+/).forEach(function (event) { + element.addEventListener(event, callback); + }); + } + } +}; + +$.unbind = function(element, o) { + if (element) { + for (var event in o) { + var callback = o[event]; + + event.split(/\s+/).forEach(function(event) { + element.removeEventListener(event, callback); + }); + } + } +}; + +$.fire = function(target, type, properties) { + var evt = document.createEvent("HTMLEvents"); + + evt.initEvent(type, true, true ); + + for (var j in properties) { + evt[j] = properties[j]; + } + + return target.dispatchEvent(evt); +}; + +$.regExpEscape = function (s) { + return s.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&"); +}; + +$.siblingIndex = function (el) { + /* eslint-disable no-cond-assign */ + for (var i = 0; el = el.previousElementSibling; i++); + return i; +}; + +// Initialization + +function init() { + $$("input.awesomplete").forEach(function (input) { + new _(input); + }); +} + +// Are we in a browser? Check for Document constructor +if (typeof Document !== "undefined") { + // DOM already loaded? + if (document.readyState !== "loading") { + init(); + } + else { + // Wait for it + document.addEventListener("DOMContentLoaded", init); + } +} + +_.$ = $; +_.$$ = $$; + +// Make sure to export Awesomplete on self when in a browser +if (typeof self !== "undefined") { + self.Awesomplete = _; +} + +// Expose Awesomplete as a CJS module +if ('object' === "object" && module.exports) { + module.exports = _; +} + +return _; + +}()); +}); + +class AutocompleteControl extends base { + make() { + super.make(); + this.input.setAttribute('type', 'text'); + this.setupAwesomplete(); + } + + async setupAwesomplete() { + this.awesomplete = new awesomplete(this.input, { + minChars: 0, + maxItems: 99 + }); + + this.list = await this.getList(); + + // rebuild the list on input + this.input.addEventListener('input', (event) => { + this.awesomplete.list = this.list; + }); + } + + validate(value) { + if (this.list.includes(value)) { + return value; + } + return false; + } +} + +var autocomplete = AutocompleteControl; + class CheckControl extends base { make() { if (!this.onlyInput) { @@ -27952,7 +29533,7 @@ class CheckControl extends base { } } -var check = CheckControl; +var check$1 = CheckControl; var codemirror = createCommonjsModule(function (module, exports) { // CodeMirror, copyright (c) by Marijn Haverbeke and others @@ -39893,16 +41474,20 @@ class CodeControl extends base { } -var code = CodeControl; +var code$1 = CodeControl; class DataControl extends base { make() { super.make(); - this.input.setAttribute('type', 'text'); + + if (!this.inputType) { + this.inputType = 'text'; + } + this.input.setAttribute('type', this.inputType); } } -var data = DataControl; +var data$3 = DataControl; var flatpickr = createCommonjsModule(function (module, exports) { /* flatpickr v4.3.2, @license MIT */ @@ -42030,506 +43615,6 @@ class DateControl extends base { var date = DateControl; -var awesomplete = createCommonjsModule(function (module) { -/** - * Simple, lightweight, usable local autocomplete library for modern browsers - * Because there weren’t enough autocomplete scripts in the world? Because I’m completely insane and have NIH syndrome? Probably both. :P - * @author Lea Verou http://leaverou.github.io/awesomplete - * MIT license - */ - -(function () { - -var _ = function (input, o) { - var me = this; - - // Setup - - this.isOpened = false; - - this.input = $(input); - this.input.setAttribute("autocomplete", "off"); - this.input.setAttribute("aria-autocomplete", "list"); - - o = o || {}; - - configure(this, { - minChars: 2, - maxItems: 10, - autoFirst: false, - data: _.DATA, - filter: _.FILTER_CONTAINS, - sort: o.sort === false ? false : _.SORT_BYLENGTH, - item: _.ITEM, - replace: _.REPLACE - }, o); - - this.index = -1; - - // Create necessary elements - - this.container = $.create("div", { - className: "awesomplete", - around: input - }); - - this.ul = $.create("ul", { - hidden: "hidden", - inside: this.container - }); - - this.status = $.create("span", { - className: "visually-hidden", - role: "status", - "aria-live": "assertive", - "aria-relevant": "additions", - inside: this.container - }); - - // Bind events - - this._events = { - input: { - "input": this.evaluate.bind(this), - "blur": this.close.bind(this, { reason: "blur" }), - "keydown": function(evt) { - var c = evt.keyCode; - - // If the dropdown `ul` is in view, then act on keydown for the following keys: - // Enter / Esc / Up / Down - if(me.opened) { - if (c === 13 && me.selected) { // Enter - evt.preventDefault(); - me.select(); - } - else if (c === 27) { // Esc - me.close({ reason: "esc" }); - } - else if (c === 38 || c === 40) { // Down/Up arrow - evt.preventDefault(); - me[c === 38? "previous" : "next"](); - } - } - } - }, - form: { - "submit": this.close.bind(this, { reason: "submit" }) - }, - ul: { - "mousedown": function(evt) { - var li = evt.target; - - if (li !== this) { - - while (li && !/li/i.test(li.nodeName)) { - li = li.parentNode; - } - - if (li && evt.button === 0) { // Only select on left click - evt.preventDefault(); - me.select(li, evt.target); - } - } - } - } - }; - - $.bind(this.input, this._events.input); - $.bind(this.input.form, this._events.form); - $.bind(this.ul, this._events.ul); - - if (this.input.hasAttribute("list")) { - this.list = "#" + this.input.getAttribute("list"); - this.input.removeAttribute("list"); - } - else { - this.list = this.input.getAttribute("data-list") || o.list || []; - } - - _.all.push(this); -}; - -_.prototype = { - set list(list) { - if (Array.isArray(list)) { - this._list = list; - } - else if (typeof list === "string" && list.indexOf(",") > -1) { - this._list = list.split(/\s*,\s*/); - } - else { // Element or CSS selector - list = $(list); - - if (list && list.children) { - var items = []; - slice.apply(list.children).forEach(function (el) { - if (!el.disabled) { - var text = el.textContent.trim(); - var value = el.value || text; - var label = el.label || text; - if (value !== "") { - items.push({ label: label, value: value }); - } - } - }); - this._list = items; - } - } - - if (document.activeElement === this.input) { - this.evaluate(); - } - }, - - get selected() { - return this.index > -1; - }, - - get opened() { - return this.isOpened; - }, - - close: function (o) { - if (!this.opened) { - return; - } - - this.ul.setAttribute("hidden", ""); - this.isOpened = false; - this.index = -1; - - $.fire(this.input, "awesomplete-close", o || {}); - }, - - open: function () { - this.ul.removeAttribute("hidden"); - this.isOpened = true; - - if (this.autoFirst && this.index === -1) { - this.goto(0); - } - - $.fire(this.input, "awesomplete-open"); - }, - - destroy: function() { - //remove events from the input and its form - $.unbind(this.input, this._events.input); - $.unbind(this.input.form, this._events.form); - - //move the input out of the awesomplete container and remove the container and its children - var parentNode = this.container.parentNode; - - parentNode.insertBefore(this.input, this.container); - parentNode.removeChild(this.container); - - //remove autocomplete and aria-autocomplete attributes - this.input.removeAttribute("autocomplete"); - this.input.removeAttribute("aria-autocomplete"); - - //remove this awesomeplete instance from the global array of instances - var indexOfAwesomplete = _.all.indexOf(this); - - if (indexOfAwesomplete !== -1) { - _.all.splice(indexOfAwesomplete, 1); - } - }, - - next: function () { - var count = this.ul.children.length; - this.goto(this.index < count - 1 ? this.index + 1 : (count ? 0 : -1) ); - }, - - previous: function () { - var count = this.ul.children.length; - var pos = this.index - 1; - - this.goto(this.selected && pos !== -1 ? pos : count - 1); - }, - - // Should not be used, highlights specific item without any checks! - goto: function (i) { - var lis = this.ul.children; - - if (this.selected) { - lis[this.index].setAttribute("aria-selected", "false"); - } - - this.index = i; - - if (i > -1 && lis.length > 0) { - lis[i].setAttribute("aria-selected", "true"); - this.status.textContent = lis[i].textContent; - - // scroll to highlighted element in case parent's height is fixed - this.ul.scrollTop = lis[i].offsetTop - this.ul.clientHeight + lis[i].clientHeight; - - $.fire(this.input, "awesomplete-highlight", { - text: this.suggestions[this.index] - }); - } - }, - - select: function (selected, origin) { - if (selected) { - this.index = $.siblingIndex(selected); - } else { - selected = this.ul.children[this.index]; - } - - if (selected) { - var suggestion = this.suggestions[this.index]; - - var allowed = $.fire(this.input, "awesomplete-select", { - text: suggestion, - origin: origin || selected - }); - - if (allowed) { - this.replace(suggestion); - this.close({ reason: "select" }); - $.fire(this.input, "awesomplete-selectcomplete", { - text: suggestion - }); - } - } - }, - - evaluate: function() { - var me = this; - var value = this.input.value; - - if (value.length >= this.minChars && this._list.length > 0) { - this.index = -1; - // Populate list with options that match - this.ul.innerHTML = ""; - - this.suggestions = this._list - .map(function(item) { - return new Suggestion(me.data(item, value)); - }) - .filter(function(item) { - return me.filter(item, value); - }); - - if (this.sort !== false) { - this.suggestions = this.suggestions.sort(this.sort); - } - - this.suggestions = this.suggestions.slice(0, this.maxItems); - - this.suggestions.forEach(function(text) { - me.ul.appendChild(me.item(text, value)); - }); - - if (this.ul.children.length === 0) { - this.close({ reason: "nomatches" }); - } else { - this.open(); - } - } - else { - this.close({ reason: "nomatches" }); - } - } -}; - -// Static methods/properties - -_.all = []; - -_.FILTER_CONTAINS = function (text, input) { - return RegExp($.regExpEscape(input.trim()), "i").test(text); -}; - -_.FILTER_STARTSWITH = function (text, input) { - return RegExp("^" + $.regExpEscape(input.trim()), "i").test(text); -}; - -_.SORT_BYLENGTH = function (a, b) { - if (a.length !== b.length) { - return a.length - b.length; - } - - return a < b? -1 : 1; -}; - -_.ITEM = function (text, input) { - var html = input.trim() === "" ? text : text.replace(RegExp($.regExpEscape(input.trim()), "gi"), "$&"); - return $.create("li", { - innerHTML: html, - "aria-selected": "false" - }); -}; - -_.REPLACE = function (text) { - this.input.value = text.value; -}; - -_.DATA = function (item/*, input*/) { return item; }; - -// Private functions - -function Suggestion(data) { - var o = Array.isArray(data) - ? { label: data[0], value: data[1] } - : typeof data === "object" && "label" in data && "value" in data ? data : { label: data, value: data }; - - this.label = o.label || o.value; - this.value = o.value; -} -Object.defineProperty(Suggestion.prototype = Object.create(String.prototype), "length", { - get: function() { return this.label.length; } -}); -Suggestion.prototype.toString = Suggestion.prototype.valueOf = function () { - return "" + this.label; -}; - -function configure(instance, properties, o) { - for (var i in properties) { - var initial = properties[i], - attrValue = instance.input.getAttribute("data-" + i.toLowerCase()); - - if (typeof initial === "number") { - instance[i] = parseInt(attrValue); - } - else if (initial === false) { // Boolean options must be false by default anyway - instance[i] = attrValue !== null; - } - else if (initial instanceof Function) { - instance[i] = null; - } - else { - instance[i] = attrValue; - } - - if (!instance[i] && instance[i] !== 0) { - instance[i] = (i in o)? o[i] : initial; - } - } -} - -// Helpers - -var slice = Array.prototype.slice; - -function $(expr, con) { - return typeof expr === "string"? (con || document).querySelector(expr) : expr || null; -} - -function $$(expr, con) { - return slice.call((con || document).querySelectorAll(expr)); -} - -$.create = function(tag, o) { - var element = document.createElement(tag); - - for (var i in o) { - var val = o[i]; - - if (i === "inside") { - $(val).appendChild(element); - } - else if (i === "around") { - var ref = $(val); - ref.parentNode.insertBefore(element, ref); - element.appendChild(ref); - } - else if (i in element) { - element[i] = val; - } - else { - element.setAttribute(i, val); - } - } - - return element; -}; - -$.bind = function(element, o) { - if (element) { - for (var event in o) { - var callback = o[event]; - - event.split(/\s+/).forEach(function (event) { - element.addEventListener(event, callback); - }); - } - } -}; - -$.unbind = function(element, o) { - if (element) { - for (var event in o) { - var callback = o[event]; - - event.split(/\s+/).forEach(function(event) { - element.removeEventListener(event, callback); - }); - } - } -}; - -$.fire = function(target, type, properties) { - var evt = document.createEvent("HTMLEvents"); - - evt.initEvent(type, true, true ); - - for (var j in properties) { - evt[j] = properties[j]; - } - - return target.dispatchEvent(evt); -}; - -$.regExpEscape = function (s) { - return s.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&"); -}; - -$.siblingIndex = function (el) { - /* eslint-disable no-cond-assign */ - for (var i = 0; el = el.previousElementSibling; i++); - return i; -}; - -// Initialization - -function init() { - $$("input.awesomplete").forEach(function (input) { - new _(input); - }); -} - -// Are we in a browser? Check for Document constructor -if (typeof Document !== "undefined") { - // DOM already loaded? - if (document.readyState !== "loading") { - init(); - } - else { - // Wait for it - document.addEventListener("DOMContentLoaded", init); - } -} - -_.$ = $; -_.$$ = $$; - -// Make sure to export Awesomplete on self when in a browser -if (typeof self !== "undefined") { - self.Awesomplete = _; -} - -// Expose Awesomplete as a CJS module -if ('object' === "object" && module.exports) { - module.exports = _; -} - -return _; - -}()); -}); - class LinkControl extends base { make() { super.make(); @@ -42592,9 +43677,9 @@ class LinkControl extends base { } } -var link = LinkControl; +var link$1 = LinkControl; -class DynamicLinkControl extends link { +class DynamicLinkControl extends link$1 { getTarget() { return this.doc[this.references]; } @@ -42636,9 +43721,13 @@ class FileControl extends base { make() { super.make(); this.fileButton = frappejs.ui.create('button', { - className: 'btn btn-outline-primary btn-block', + className: 'btn btn-outline-secondary btn-block', inside: this.getInputParent(), - textContent: 'Choose a file...' + type: 'button', + textContent: 'Choose a file...', + onclick: () => { + this.input.click(); + } }); this.input.setAttribute('type', 'file'); @@ -42646,14 +43735,38 @@ class FileControl extends base { if (this.directory) { this.input.setAttribute('webkitdirectory', ''); } + + if (this.allowMultiple) { + this.input.setAttribute('multiple', ''); + } + } + + async handleChange() { + await super.handleChange(); + this.setDocValue(); } getInputValue() { return this.input.files; } + + setInputValue(files) { + + let label; + if (!files || files.length === 0) { + label = 'Choose a file...'; + } else if (files.length === 1) { + label = files[0].name; + } else { + label = `${files.length} files selected`; + } + + this.fileButton.textContent = label; + this.input.files = files; + } } -var file = FileControl; +var file$1 = FileControl; class IntControl extends float_1 { parse(value) { @@ -48307,61 +49420,6 @@ var modal = class Modal extends observable { } }; -var utils$3 = { - convertFieldsToDatatableColumns(fields, layout = 'fixed') { - return fields.map(field => { - if (!field.width) { - if (layout==='ratio') { - field.width = 1; - } else if (layout==='fixed') { - field.width = 120; - } - } - return { - id: field.fieldname || frappejs.slug(field.label), - field: field, - content: field.label, - editable: true, - sortable: false, - resizable: true, - dropdown: false, - width: field.width, - align: ['Int', 'Float', 'Currency'].includes(field.fieldtype) ? 'right' : 'left', - format: (value) => frappejs.format(value, field) - } - }); - - }, - - addLink(label, parent, action, unhide = true) { - const link = frappejs.ui.add('button', 'btn btn-sm btn-outline-secondary', parent, label); - link.addEventListener('click', action); - if (unhide) { - parent.classList.remove('hide'); - } - return link; - }, - - // https://css-tricks.com/snippets/javascript/loop-queryselectorall-matches/ - forEachNode(nodeList, callback, scope) { - if(!nodeList) return; - for (var i = 0; i < nodeList.length; i++) { - callback.call(scope, nodeList[i], i); - } - }, - - activate($parent, $child, commonClass, activeClass='active', index = -1) { - let $children = $parent.querySelectorAll(`.${commonClass}.${activeClass}`); - - this.forEachNode($children, (node, i) => { - if(index >= 0 && i <= index) return; - node.classList.remove(activeClass); - }); - - $child.classList.add(activeClass); - } -}; - var modelTable = class ModelTable { constructor({doctype, parent, layout, parentControl, getRowData, isDisabled, getTableData}) { @@ -48600,16 +49658,17 @@ class TextControl extends base { var text = TextControl; const controlClasses = { - Check: check, - Code: code, - Data: data, + Autocomplete: autocomplete, + Check: check$1, + Code: code$1, + Data: data$3, Date: date, DynamicLink: dynamicLink, Currency: currency, Float: float_1, - File: file, + File: file$1, Int: int_1, - Link: link, + Link: link$1, Password: password, Select: select, Table: table, @@ -48628,7 +49687,7 @@ var controls$1 = { }; var formLayout = class FormLayout extends observable { - constructor({fields, layout, events = []}) { + constructor({fields, doc, layout, events = []}) { super(); Object.assign(this, arguments[0]); this.controls = {}; @@ -48636,21 +49695,14 @@ var formLayout = class FormLayout extends observable { this.sections = []; this.links = []; - this.doc = { - get(fieldname) { - return this[fieldname] - }, - - set(fieldname, value) { - this[fieldname] = value; - } - }; - this.form = document.createElement('div'); this.form.classList.add('form-body'); this.makeLayout(); - this.bindEvents(this.doc); + + if (doc) { + this.bindEvents(doc); + } } makeLayout() { @@ -48664,17 +49716,25 @@ var formLayout = class FormLayout extends observable { } makeSection(section) { - const sectionElement = frappe.ui.add('div', 'form-section', this.form); + const sectionElement = frappejs.ui.add('div', 'form-section', this.form); + const sectionHead = frappejs.ui.add('div', 'form-section-head', sectionElement); + const sectionBody = frappejs.ui.add('div', 'form-section-body', sectionElement); + + if (section.title) { + const head = frappejs.ui.add('h6', 'uppercase', sectionHead); + head.textContent = section.title; + } + if (section.columns) { - sectionElement.classList.add('row'); + sectionBody.classList.add('row'); for (let column of section.columns) { - let columnElement = frappe.ui.add('div', 'col', sectionElement); + let columnElement = frappejs.ui.add('div', 'col', sectionBody); this.makeControls(this.getFieldsFromLayoutElement(column.fields), columnElement); } } else { - this.makeControls(this.getFieldsFromLayoutElement(section.fields), sectionElement); + this.makeControls(this.getFieldsFromLayoutElement(section.fields), sectionBody); } - this.sections.push(sectionElement); + this.sections.push(sectionBody); } getFieldsFromLayoutElement(fields) { @@ -48918,7 +49978,7 @@ var form = class BaseForm extends observable { this.container.clearLinks(); for(let link of links) { // make the link - utils$3.addLink(link.label, this.container.linksElement, () => { + utils$3.addButton(link.label, this.container.linksElement, () => { let options = link.action(this); if (options) { @@ -49047,6 +50107,9 @@ var view = { }, getListClass(doctype) { return (frappejs.views['List'] && frappejs.views['List'][doctype]) || list; + }, + getTreeClass(doctype) { + return (frappejs.views['Tree'] && frappejs.views['Tree'][doctype] || tree$2); } }; @@ -49133,6 +50196,40 @@ var listpage = class ListPage extends page { } }; +var treepage = class TreePage extends page { + constructor(name) { + const hasRoute = true; + + super({ + title: frappejs._("Tree"), + parent: hasRoute ? frappejs.desk.body : frappejs.desk.center, + hasRoute: hasRoute + }); + + this.fullPage = true; + + this.name = name; + + this.tree = new (view.getTreeClass(name))({ + doctype: name, + parent: this.body, + page: this + }); + + // frappe.docs.on('change', (params) => { + // if (params.doc.doctype === this.tree.meta.name) { + // this.tree.refreshRow(params.doc); + // } + // }); + } + + async show(params) { + super.show(); + this.setTitle(this.name===this.tree.meta.name ? (this.tree.meta.label || this.tree.meta.name) : this.name); + await this.tree.refresh(); + } +}; + var nunjucks = createCommonjsModule(function (module, exports) { /*! Browser bundle of nunjucks 3.1.0 */ (function webpackUniversalModuleDefinition(root, factory) { @@ -56876,15 +57973,6 @@ var printpage = class PrintPage extends page { this.addButton(frappejs._('Edit'), 'primary', () => { frappejs.router.setRoute('edit', this.doctype, this.name); }); - - this.addButton(frappejs._('PDF'), 'secondary', () => { - frappejs.call('download-pdf', { - doctype: doctype, - name: this.name - }) - .then(console.log); - // frappe.router.setRoute('edit', this.doctype, this.name) - }); } async show(params) { @@ -57075,6 +58163,7 @@ var menu = class DeskMenu { const views = {}; views.Form = formpage; views.List = listpage; +views.Tree = treepage; views.Print = printpage; views.FormModal = formmodal; views.Table = tablepage; @@ -57144,6 +58233,10 @@ var desk = class Desk { await this.showViewPage('List', params.doctype); }); + frappejs.router.add('tree/:doctype', async (params) => { + await this.showViewPage('Tree', params.doctype); + }); + frappejs.router.add('table/:doctype', async (params) => { await this.showViewPage('Table', params.doctype, params); }); @@ -57928,738 +59021,13 @@ var GeneralLedgerView_1 = class GeneralLedgerView extends reportpage { } }; -var config = [ - { - fields: [ - { - "fieldname": "fileLocation", - "label": "File", - "fieldtype": "File", - "required": 1, - "directory": 1 - } - ], - title: 'Select File location' - }, - { - fields: [ - { - "fieldname": "country", - "label": "Country", - "fieldtype": "Data", - "required": 1 - } - ], - title: 'Select Country' - }, - - { - fields: [ - { - "fieldname": "name", - "label": "Name", - "fieldtype": "Data", - "required": 1 - }, - { - "fieldname": "email", - "label": "Email", - "fieldtype": "Data", - "required": 1 - } - ], - title: 'Add a Profile' - }, - - { - fields: [ - { - "fieldname": "companyName", - "label": "Company Name", - "fieldtype": "Data", - "required": 1 - }, - { - "fieldname": "abbreviation", - "label": "Abbreviation", - "fieldtype": "Data", - "required": 1 - }, - { - "fieldname": "bankName", - "label": "Bank Name", - "fieldtype": "Data", - "required": 1 - } - ], - title: 'Add your Company' - } -]; - -var alert$1 = {"name":"alert","figma":{"id":"0:5","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["warning","triangle","exclamation","point"],"width":16,"height":16,"path":""}; -var beaker = {"name":"beaker","figma":{"id":"0:26","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["experiment","labs","experimental","feature","test","science","education","study","development","testing"],"width":16,"height":16,"path":""}; -var bell = {"name":"bell","figma":{"id":"0:34","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["notification"],"width":14,"height":16,"path":""}; -var bold = {"name":"bold","figma":{"id":"0:38","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["markdown","bold","text"],"width":10,"height":16,"path":""}; -var book = {"name":"book","figma":{"id":"0:43","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["book","journal","wiki","readme"],"width":16,"height":16,"path":""}; -var bookmark = {"name":"bookmark","figma":{"id":"0:54","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["tab","star"],"width":10,"height":16,"path":""}; -var briefcase = {"name":"briefcase","figma":{"id":"0:58","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["suitcase","business"],"width":14,"height":16,"path":""}; -var broadcast = {"name":"broadcast","figma":{"id":"0:63","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["rss","radio","signal"],"width":16,"height":16,"path":""}; -var browser = {"name":"browser","figma":{"id":"0:70","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["window","web"],"width":14,"height":16,"path":""}; -var bug = {"name":"bug","figma":{"id":"0:78","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["insect","issue"],"width":16,"height":16,"path":""}; -var calendar = {"name":"calendar","figma":{"id":"0:82","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["time","day","month","year","date","appointment"],"width":14,"height":16,"path":""}; -var check$2 = {"name":"check","figma":{"id":"0:104","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["mark","yes","confirm","accept","ok","success"],"width":12,"height":16,"path":""}; -var checklist = {"name":"checklist","figma":{"id":"0:108","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["todo","tasks"],"width":16,"height":16,"path":""}; -var clippy = {"name":"clippy","figma":{"id":"0:138","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["copy","paste","save","capture","clipboard"],"width":14,"height":16,"path":""}; -var clock = {"name":"clock","figma":{"id":"0:147","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["time","hour","minute","second","watch"],"width":14,"height":16,"path":""}; -var code$2 = {"name":"code","figma":{"id":"0:160","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["brackets"],"width":14,"height":16,"path":""}; -var comment = {"name":"comment","figma":{"id":"0:169","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["speak","bubble"],"width":16,"height":16,"path":""}; -var dash = {"name":"dash","figma":{"id":"0:178","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["hyphen","range"],"width":8,"height":16,"path":""}; -var dashboard = {"name":"dashboard","figma":{"id":"0:182","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["speed","dial"],"width":16,"height":16,"path":""}; -var database = {"name":"database","figma":{"id":"0:190","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["disks","data"],"width":12,"height":16,"path":""}; -var diff = {"name":"diff","figma":{"id":"0:242","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["difference","changes","compare"],"width":13,"height":16,"path":""}; -var ellipsis = {"name":"ellipsis","figma":{"id":"0:249","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["dot","read","more","hidden","expand"],"width":12,"height":16,"path":""}; -var eye = {"name":"eye","figma":{"id":"0:255","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["look","watch","see"],"width":16,"height":16,"path":""}; -var file$2 = {"name":"file","figma":{"id":"0:308","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["file","text","words"],"width":12,"height":16,"path":""}; -var flame = {"name":"flame","figma":{"id":"0:325","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["fire","hot","burn","trending"],"width":12,"height":16,"path":""}; -var fold = {"name":"fold","figma":{"id":"0:329","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["unfold","hide","collapse"],"width":14,"height":16,"path":""}; -var gear = {"name":"gear","figma":{"id":"0:334","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["settings"],"width":14,"height":16,"path":""}; -var gift = {"name":"gift","figma":{"id":"0:338","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["package","present","skill","craft","freebie"],"width":14,"height":16,"path":""}; -var gist = {"name":"gist","figma":{"id":"0:354","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["gist","github"],"width":12,"height":16,"path":""}; -var globe = {"name":"globe","figma":{"id":"0:389","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["world","earth","planet"],"width":14,"height":16,"path":""}; -var graph = {"name":"graph","figma":{"id":"0:396","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["trend","stats","statistics"],"width":16,"height":16,"path":""}; -var heart = {"name":"heart","figma":{"id":"0:400","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["love","beat"],"width":12,"height":16,"path":""}; -var history = {"name":"history","figma":{"id":"0:404","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["time","past","revert","back"],"width":14,"height":16,"path":""}; -var home = {"name":"home","figma":{"id":"0:408","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["welcome","index","house","building"],"width":16,"height":16,"path":""}; -var hubot = {"name":"hubot","figma":{"id":"0:419","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["robot","bot"],"width":14,"height":16,"path":""}; -var inbox = {"name":"inbox","figma":{"id":"0:426","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["mail","todo","new","messages"],"width":14,"height":16,"path":""}; -var info = {"name":"info","figma":{"id":"0:430","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["help"],"width":14,"height":16,"path":""}; -var italic = {"name":"italic","figma":{"id":"0:454","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["font","italic","style"],"width":6,"height":16,"path":""}; -var jersey = {"name":"jersey","figma":{"id":"0:458","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["team","game","basketball"],"width":14,"height":16,"path":""}; -var keyboard$3 = {"name":"keyboard","figma":{"id":"0:466","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["type","keys","write","shortcuts"],"width":16,"height":16,"path":""}; -var law = {"name":"law","figma":{"id":"0:490","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["legal","bill"],"width":14,"height":16,"path":""}; -var link$2 = {"name":"link","figma":{"id":"0:496","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["connect","hyperlink"],"width":16,"height":16,"path":""}; -var location = {"name":"location","figma":{"id":"0:516","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["here","marker"],"width":12,"height":16,"path":""}; -var lock = {"name":"lock","figma":{"id":"0:521","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["secure","safe","protected"],"width":12,"height":16,"path":""}; -var reply = {"name":"reply","figma":{"id":"0:554","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["reply all","back"],"width":14,"height":16,"path":""}; -var mail = {"name":"mail","figma":{"id":"0:558","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["email","unread"],"width":14,"height":16,"path":""}; -var markdown$1 = {"name":"markdown","figma":{"id":"0:567","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["markup","style"],"width":16,"height":16,"path":""}; -var megaphone = {"name":"megaphone","figma":{"id":"0:572","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["bullhorn","loud","shout","broadcast"],"width":16,"height":16,"path":""}; -var mention = {"name":"mention","figma":{"id":"0:579","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["at","ping"],"width":14,"height":16,"path":""}; -var milestone = {"name":"milestone","figma":{"id":"0:583","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["marker"],"width":14,"height":16,"path":""}; -var mirror = {"name":"mirror","figma":{"id":"0:589","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["reflect"],"width":16,"height":16,"path":""}; -var mute = {"name":"mute","figma":{"id":"0:599","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["quiet","sound","audio","turn","off"],"width":16,"height":16,"path":""}; -var octoface = {"name":"octoface","figma":{"id":"0:609","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["octocat","brand"],"width":16,"height":16,"path":""}; -var organization = {"name":"organization","figma":{"id":"0:613","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["people","group","team"],"width":16,"height":16,"path":""}; -var paintcan = {"name":"paintcan","figma":{"id":"0:624","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["style","theme","art","color"],"width":12,"height":16,"path":""}; -var pencil = {"name":"pencil","figma":{"id":"0:630","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["edit","change","update","write"],"width":14,"height":16,"path":""}; -var person = {"name":"person","figma":{"id":"0:633","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["people","man","woman","human"],"width":12,"height":16,"path":""}; -var pin = {"name":"pin","figma":{"id":"0:635","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["save","star","bookmark"],"width":16,"height":16,"path":""}; -var plug = {"name":"plug","figma":{"id":"0:637","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["hook","webhook"],"width":14,"height":16,"path":""}; -var plus = {"name":"plus","figma":{"id":"0:639","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["add","new","more"],"width":12,"height":16,"path":""}; -var pulse = {"name":"pulse","figma":{"id":"0:645","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["graph","trend","line","activity"],"width":14,"height":16,"path":""}; -var question = {"name":"question","figma":{"id":"0:649","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["help","explain"],"width":14,"height":16,"path":""}; -var quote = {"name":"quote","figma":{"id":"0:655","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["quotation"],"width":14,"height":16,"path":""}; -var repo = {"name":"repo","figma":{"id":"0:706","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["book","journal","repository"],"width":12,"height":16,"path":""}; -var rocket = {"name":"rocket","figma":{"id":"0:715","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["staff","stafftools","blast","off","space","launch","ship"],"width":16,"height":16,"path":""}; -var rss = {"name":"rss","figma":{"id":"0:719","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["broadcast","feed","atom"],"width":10,"height":16,"path":""}; -var ruby = {"name":"ruby","figma":{"id":"0:724","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["code","language"],"width":16,"height":16,"path":""}; -var search = {"name":"search","figma":{"id":"0:729","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["magnifying","glass"],"width":16,"height":16,"path":""}; -var server = {"name":"server","figma":{"id":"0:733","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["computers","racks","ops"],"width":12,"height":16,"path":""}; -var settings = {"name":"settings","figma":{"id":"0:751","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["sliders","filters","controls","levels"],"width":16,"height":16,"path":""}; -var shield = {"name":"shield","figma":{"id":"0:762","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["protect","shield","lock"],"width":14,"height":16,"path":""}; -var smiley = {"name":"smiley","figma":{"id":"0:772","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["emoji","smile","mood","emotion"],"width":16,"height":16,"path":""}; -var squirrel = {"name":"squirrel","figma":{"id":"0:779","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["ship","shipit","launch"],"width":16,"height":16,"path":""}; -var star = {"name":"star","figma":{"id":"0:781","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["save","remember","like"],"width":14,"height":16,"path":""}; -var stop = {"name":"stop","figma":{"id":"0:785","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["block","spam","report"],"width":14,"height":16,"path":""}; -var sync = {"name":"sync","figma":{"id":"0:791","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["cycle","refresh","loop"],"width":12,"height":16,"path":""}; -var tag = {"name":"tag","figma":{"id":"0:795","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["release"],"width":14,"height":16,"path":""}; -var tasklist = {"name":"tasklist","figma":{"id":"0:800","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["todo"],"width":16,"height":16,"path":""}; -var telescope = {"name":"telescope","figma":{"id":"0:806","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["science","space","look","view","explore"],"width":14,"height":16,"path":""}; -var terminal = {"name":"terminal","figma":{"id":"0:815","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["code","ops","shell"],"width":14,"height":16,"path":""}; -var thumbsdown = {"name":"thumbsdown","figma":{"id":"0:831","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["thumb","thumbsdown","rejected","dislike"],"width":16,"height":16,"path":""}; -var thumbsup = {"name":"thumbsup","figma":{"id":"0:835","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["thumb","thumbsup","prop","ship","like"],"width":16,"height":16,"path":""}; -var tools = {"name":"tools","figma":{"id":"0:839","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["screwdriver","wrench","settings"],"width":16,"height":16,"path":""}; -var trashcan = {"name":"trashcan","figma":{"id":"0:844","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["garbage","rubbish","recycle","delete"],"width":12,"height":16,"path":""}; -var unfold = {"name":"unfold","figma":{"id":"0:857","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["expand","open","reveal"],"width":14,"height":16,"path":""}; -var unmute = {"name":"unmute","figma":{"id":"0:862","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["loud","volume","audio","sound","play"],"width":16,"height":16,"path":""}; -var project = {"name":"project","figma":{"id":"0:868","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["board","kanban","columns","scrum"],"width":15,"height":16,"path":""}; -var report = {"name":"report","figma":{"id":"0:885","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["report","abuse","flag"],"width":16,"height":16,"path":""}; -var note = {"name":"note","figma":{"id":"0:891","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["card","paper","ticket"],"width":14,"height":16,"path":""}; -var unverified = {"name":"unverified","figma":{"id":"0:914","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["insecure","untrusted","signed"],"width":16,"height":16,"path":""}; -var verified = {"name":"verified","figma":{"id":"0:919","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["trusted","secure","trustworthy","signed"],"width":16,"height":16,"path":""}; -var versions = {"name":"versions","figma":{"id":"0:923","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["history","commits"],"width":14,"height":16,"path":""}; -var watch = {"name":"watch","figma":{"id":"0:929","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["wait","hourglass","time","date"],"width":12,"height":16,"path":""}; -var x = {"name":"x","figma":{"id":"0:932","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["remove","close","delete"],"width":12,"height":16,"path":""}; -var zap = {"name":"zap","figma":{"id":"0:934","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["electricity","lightning","props","like","star","save"],"width":10,"height":16,"path":""}; -var key = {"name":"key","figma":{"id":"0:938","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["key","lock","secure","safe"],"width":14,"height":16,"path":""}; -var grabber = {"name":"grabber","figma":{"id":"0:942","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["mover","drap","drop","sort"],"width":8,"height":16,"path":""}; -var data$2 = { - alert: alert$1, - beaker: beaker, - bell: bell, - bold: bold, - book: book, - bookmark: bookmark, - briefcase: briefcase, - broadcast: broadcast, - browser: browser, - bug: bug, - calendar: calendar, - check: check$2, - checklist: checklist, - clippy: clippy, - clock: clock, - code: code$2, - comment: comment, - dash: dash, - dashboard: dashboard, - database: database, - diff: diff, - ellipsis: ellipsis, - eye: eye, - file: file$2, - flame: flame, - fold: fold, - gear: gear, - gift: gift, - gist: gist, - globe: globe, - graph: graph, - heart: heart, - history: history, - home: home, - hubot: hubot, - inbox: inbox, - info: info, - italic: italic, - jersey: jersey, - keyboard: keyboard$3, - law: law, - link: link$2, - location: location, - lock: lock, - reply: reply, - mail: mail, - markdown: markdown$1, - megaphone: megaphone, - mention: mention, - milestone: milestone, - mirror: mirror, - mute: mute, - octoface: octoface, - organization: organization, - paintcan: paintcan, - pencil: pencil, - person: person, - pin: pin, - plug: plug, - plus: plus, - pulse: pulse, - question: question, - quote: quote, - repo: repo, - rocket: rocket, - rss: rss, - ruby: ruby, - search: search, - server: server, - settings: settings, - shield: shield, - smiley: smiley, - squirrel: squirrel, - star: star, - stop: stop, - sync: sync, - tag: tag, - tasklist: tasklist, - telescope: telescope, - terminal: terminal, - thumbsdown: thumbsdown, - thumbsup: thumbsup, - tools: tools, - trashcan: trashcan, - unfold: unfold, - unmute: unmute, - project: project, - report: report, - note: note, - unverified: unverified, - verified: verified, - versions: versions, - watch: watch, - x: x, - zap: zap, - key: key, - grabber: grabber, - "arrow-down": {"name":"arrow-down","figma":{"id":"0:8","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["point","direction"],"width":10,"height":16,"path":""}, - "arrow-left": {"name":"arrow-left","figma":{"id":"0:10","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["point","direction"],"width":10,"height":16,"path":""}, - "arrow-right": {"name":"arrow-right","figma":{"id":"0:12","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["point","direction"],"width":10,"height":16,"path":""}, - "arrow-up": {"name":"arrow-up","figma":{"id":"0:14","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["point","direction"],"width":10,"height":16,"path":""}, - "arrow-small-down": {"name":"arrow-small-down","figma":{"id":"0:16","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["point","direction","little","tiny"],"width":6,"height":16,"path":""}, - "arrow-small-left": {"name":"arrow-small-left","figma":{"id":"0:18","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["point","direction","little","tiny"],"width":6,"height":16,"path":""}, - "arrow-small-right": {"name":"arrow-small-right","figma":{"id":"0:20","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["point","direction","little","tiny"],"width":6,"height":16,"path":""}, - "arrow-small-up": {"name":"arrow-small-up","figma":{"id":"0:22","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["point","direction","little","tiny"],"width":6,"height":16,"path":""}, - "chevron-down": {"name":"chevron-down","figma":{"id":"0:117","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["triangle","arrow"],"width":10,"height":16,"path":""}, - "chevron-left": {"name":"chevron-left","figma":{"id":"0:119","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["triangle","arrow"],"width":8,"height":16,"path":""}, - "chevron-right": {"name":"chevron-right","figma":{"id":"0:121","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["triangle","arrow"],"width":8,"height":16,"path":""}, - "chevron-up": {"name":"chevron-up","figma":{"id":"0:123","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["triangle","arrow"],"width":10,"height":16,"path":""}, - "circle-slash": {"name":"circle-slash","figma":{"id":"0:127","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["no","deny","fail","failure","error","bad"],"width":14,"height":16,"path":""}, - "circuit-board": {"name":"circuit-board","figma":{"id":"0:132","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["developer","hardware","electricity"],"width":14,"height":16,"path":""}, - "cloud-download": {"name":"cloud-download","figma":{"id":"0:152","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["save","install","get"],"width":16,"height":16,"path":""}, - "cloud-upload": {"name":"cloud-upload","figma":{"id":"0:156","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["put","export"],"width":16,"height":16,"path":""}, - "comment-discussion": {"name":"comment-discussion","figma":{"id":"0:164","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["converse","talk"],"width":16,"height":16,"path":""}, - "credit-card": {"name":"credit-card","figma":{"id":"0:173","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["money","billing","payments","transactions"],"width":16,"height":16,"path":""}, - "desktop-download": {"name":"desktop-download","figma":{"id":"0:196","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["clone","download"],"width":16,"height":16,"path":""}, - "device-camera-video": {"name":"device-camera-video","figma":{"id":"0:198","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["watch","view","media","stream"],"width":16,"height":16,"path":""}, - "device-camera": {"name":"device-camera","figma":{"id":"0:202","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["photo","picture","image","snapshot"],"width":16,"height":16,"path":""}, - "device-desktop": {"name":"device-desktop","figma":{"id":"0:208","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["computer","monitor"],"width":16,"height":16,"path":""}, - "device-mobile": {"name":"device-mobile","figma":{"id":"0:212","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["phone","iphone","cellphone"],"width":10,"height":16,"path":""}, - "diff-added": {"name":"diff-added","figma":{"id":"0:217","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["new","addition","plus"],"width":14,"height":16,"path":""}, - "diff-ignored": {"name":"diff-ignored","figma":{"id":"0:222","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["slash"],"width":14,"height":16,"path":""}, - "diff-modified": {"name":"diff-modified","figma":{"id":"0:227","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["dot","changed","updated"],"width":14,"height":16,"path":""}, - "diff-removed": {"name":"diff-removed","figma":{"id":"0:232","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["deleted","subtracted","dash"],"width":14,"height":16,"path":""}, - "diff-renamed": {"name":"diff-renamed","figma":{"id":"0:237","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["moved","arrow"],"width":14,"height":16,"path":""}, - "file-binary": {"name":"file-binary","figma":{"id":"0:260","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["image","video","word","powerpoint","excel"],"width":12,"height":16,"path":""}, - "file-code": {"name":"file-code","figma":{"id":"0:270","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["text","javascript","html","css","php","ruby","coffeescript","sass","scss"],"width":12,"height":16,"path":""}, - "file-directory": {"name":"file-directory","figma":{"id":"0:276","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["folder"],"width":14,"height":16,"path":""}, - "file-media": {"name":"file-media","figma":{"id":"0:280","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["image","video","audio"],"width":12,"height":16,"path":""}, - "file-pdf": {"name":"file-pdf","figma":{"id":"0:285","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["adobe"],"width":12,"height":16,"path":""}, - "file-submodule": {"name":"file-submodule","figma":{"id":"0:292","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["folder"],"width":14,"height":16,"path":""}, - "file-symlink-directory": {"name":"file-symlink-directory","figma":{"id":"0:298","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["folder","subfolder","link","alias"],"width":14,"height":16,"path":""}, - "file-symlink-file": {"name":"file-symlink-file","figma":{"id":"0:303","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["link","alias"],"width":12,"height":16,"path":""}, - "file-zip": {"name":"file-zip","figma":{"id":"0:316","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["compress","archive"],"width":12,"height":16,"path":""}, - "gist-secret": {"name":"gist-secret","figma":{"id":"0:347","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["gist","secret","private"],"width":14,"height":16,"path":""}, - "git-branch": {"name":"git-branch","figma":{"id":"0:360","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["fork","branch","git","duplicate"],"width":10,"height":16,"path":""}, - "git-commit": {"name":"git-commit","figma":{"id":"0:366","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["save"],"width":14,"height":16,"path":""}, - "git-compare": {"name":"git-compare","figma":{"id":"0:370","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["difference","changes"],"width":14,"height":16,"path":""}, - "git-merge": {"name":"git-merge","figma":{"id":"0:376","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["join"],"width":12,"height":16,"path":""}, - "git-pull-request": {"name":"git-pull-request","figma":{"id":"0:382","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["review"],"width":12,"height":16,"path":""}, - "horizontal-rule": {"name":"horizontal-rule","figma":{"id":"0:412","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["hr"],"width":10,"height":16,"path":""}, - "issue-closed": {"name":"issue-closed","figma":{"id":"0:436","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["done","complete"],"width":16,"height":16,"path":""}, - "issue-opened": {"name":"issue-opened","figma":{"id":"0:442","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["new"],"width":14,"height":16,"path":""}, - "issue-reopened": {"name":"issue-reopened","figma":{"id":"0:448","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["regression"],"width":14,"height":16,"path":""}, - "list-ordered": {"name":"list-ordered","figma":{"id":"0:500","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["numbers","tasks","todo","items"],"width":12,"height":16,"path":""}, - "list-unordered": {"name":"list-unordered","figma":{"id":"0:508","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["bullet","point","tasks","todo","items"],"width":12,"height":16,"path":""}, - "logo-gist": {"name":"logo-gist","figma":{"id":"0:529","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["brand","github","logo"],"width":25,"height":16,"path":""}, - "logo-github": {"name":"logo-github","figma":{"id":"0:536","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["brand","github","logo"],"width":45,"height":16,"path":""}, - "mail-read": {"name":"mail-read","figma":{"id":"0:547","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["email","open"],"width":14,"height":16,"path":""}, - "mark-github": {"name":"mark-github","figma":{"id":"0:563","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["octocat","brand","github","logo"],"width":16,"height":16,"path":""}, - "mortar-board": {"name":"mortar-board","figma":{"id":"0:594","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["education","learn","teach"],"width":16,"height":16,"path":""}, - "no-newline": {"name":"no-newline","figma":{"id":"0:603","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["return"],"width":16,"height":16,"path":""}, - "package": {"name":"package","figma":{"id":"0:617","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["box","ship"],"width":16,"height":16,"path":""}, - "primitive-dot": {"name":"primitive-dot","figma":{"id":"0:641","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["circle"],"width":8,"height":16,"path":""}, - "primitive-square": {"name":"primitive-square","figma":{"id":"0:643","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["box"],"width":8,"height":16,"path":""}, - "radio-tower": {"name":"radio-tower","figma":{"id":"0:659","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["broadcast"],"width":16,"height":16,"path":""}, - "repo-clone": {"name":"repo-clone","figma":{"id":"0:669","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["book","journal","repository"],"width":16,"height":16,"path":""}, - "repo-force-push": {"name":"repo-force-push","figma":{"id":"0:681","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["book","journal","put"],"width":12,"height":16,"path":""}, - "repo-forked": {"name":"repo-forked","figma":{"id":"0:685","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["book","journal","copy"],"width":10,"height":16,"path":""}, - "repo-pull": {"name":"repo-pull","figma":{"id":"0:691","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["book","journal","get"],"width":16,"height":16,"path":""}, - "repo-push": {"name":"repo-push","figma":{"id":"0:700","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["book","journal","repository","put"],"width":12,"height":16,"path":""}, - "sign-in": {"name":"sign-in","figma":{"id":"0:764","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["door","arrow","direction","enter","log in"],"width":14,"height":16,"path":""}, - "sign-out": {"name":"sign-out","figma":{"id":"0:768","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["door","arrow","direction","leave","log out"],"width":16,"height":16,"path":""}, - "text-size": {"name":"text-size","figma":{"id":"0:821","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["font","size","text"],"width":18,"height":16,"path":""}, - "three-bars": {"name":"three-bars","figma":{"id":"0:826","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["hamburger","menu","dropdown"],"width":12,"height":16,"path":""}, - "triangle-down": {"name":"triangle-down","figma":{"id":"0:847","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["arrow","point","direction"],"width":12,"height":16,"path":""}, - "triangle-left": {"name":"triangle-left","figma":{"id":"0:849","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["arrow","point","direction"],"width":6,"height":16,"path":""}, - "triangle-right": {"name":"triangle-right","figma":{"id":"0:851","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["arrow","point","direction"],"width":6,"height":16,"path":""}, - "triangle-up": {"name":"triangle-up","figma":{"id":"0:853","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["arrow","point","direction"],"width":12,"height":16,"path":""}, - "kebab-horizontal": {"name":"kebab-horizontal","figma":{"id":"0:875","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["kebab","dot","menu","more"],"width":13,"height":16,"path":""}, - "kebab-vertical": {"name":"kebab-vertical","figma":{"id":"0:880","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["kebab","dot","menu","more"],"width":3,"height":16,"path":""}, - "screen-full": {"name":"screen-full","figma":{"id":"0:898","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["fullscreen","expand"],"width":14,"height":16,"path":""}, - "screen-normal": {"name":"screen-normal","figma":{"id":"0:906","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["fullscreen","expand","exit"],"width":14,"height":16,"path":""}, - "plus-small": {"name":"plus-small","figma":{"id":"0:947","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["add","new","more","small"],"width":7,"height":16,"path":""}, - "light-bulb": {"name":"light-bulb","figma":{"id":"0:951","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["idea"],"width":12,"height":16,"path":""}, - "link-external": {"name":"link-external","figma":{"id":"0:956","file":"FP7lqd1V00LUaT5zvdklkkZr"},"keywords":["out","see","more","go","to"],"width":12,"height":16,"path":""} -}; - -var data$3 = Object.freeze({ - alert: alert$1, - beaker: beaker, - bell: bell, - bold: bold, - book: book, - bookmark: bookmark, - briefcase: briefcase, - broadcast: broadcast, - browser: browser, - bug: bug, - calendar: calendar, - check: check$2, - checklist: checklist, - clippy: clippy, - clock: clock, - code: code$2, - comment: comment, - dash: dash, - dashboard: dashboard, - database: database, - diff: diff, - ellipsis: ellipsis, - eye: eye, - file: file$2, - flame: flame, - fold: fold, - gear: gear, - gift: gift, - gist: gist, - globe: globe, - graph: graph, - heart: heart, - history: history, - home: home, - hubot: hubot, - inbox: inbox, - info: info, - italic: italic, - jersey: jersey, - keyboard: keyboard$3, - law: law, - link: link$2, - location: location, - lock: lock, - reply: reply, - mail: mail, - markdown: markdown$1, - megaphone: megaphone, - mention: mention, - milestone: milestone, - mirror: mirror, - mute: mute, - octoface: octoface, - organization: organization, - paintcan: paintcan, - pencil: pencil, - person: person, - pin: pin, - plug: plug, - plus: plus, - pulse: pulse, - question: question, - quote: quote, - repo: repo, - rocket: rocket, - rss: rss, - ruby: ruby, - search: search, - server: server, - settings: settings, - shield: shield, - smiley: smiley, - squirrel: squirrel, - star: star, - stop: stop, - sync: sync, - tag: tag, - tasklist: tasklist, - telescope: telescope, - terminal: terminal, - thumbsdown: thumbsdown, - thumbsup: thumbsup, - tools: tools, - trashcan: trashcan, - unfold: unfold, - unmute: unmute, - project: project, - report: report, - note: note, - unverified: unverified, - verified: verified, - versions: versions, - watch: watch, - x: x, - zap: zap, - key: key, - grabber: grabber, - default: data$2 -}); - -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ - -/* eslint-disable no-unused-vars */ -var getOwnPropertySymbols = Object.getOwnPropertySymbols; -var hasOwnProperty = Object.prototype.hasOwnProperty; -var propIsEnumerable = Object.prototype.propertyIsEnumerable; - -function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } - - return Object(val); -} - -function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } - - // Detect buggy property enumeration order in older V8 versions. - - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } - - return true; - } catch (err) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } -} - -var objectAssign = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; - - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } - - return to; -}; - -var data$4 = ( data$3 && data$2 ) || data$3; - -Object.keys(data$4).forEach(function(key) { - - // Returns a string representation of html attributes - var htmlAttributes = function(icon, options) { - var attributes = []; - var attrObj = objectAssign({}, data$4[key].options, options); - - // If the user passed in options - if (options) { - - // If any of the width or height is passed in - if(options["width"] || options["height"]) { - attrObj["width"] = options["width"] ? options["width"] : (parseInt(options["height"]) * data$4[key].options["width"] / data$4[key].options["height"]); - attrObj["height"] = options["height"] ? options["height"] : (parseInt(options["width"]) * data$4[key].options["height"] / data$4[key].options["width"]); - } - - // If the user passed in class - if (options["class"]) { - attrObj["class"] = "octicon octicon-" + key + " " + options["class"]; - attrObj["class"].trim(); - } - - // If the user passed in aria-label - if (options["aria-label"]) { - attrObj["aria-label"] = options["aria-label"]; - attrObj["role"] = "img"; - - // Un-hide the icon - delete attrObj["aria-hidden"]; - } - } - - Object.keys(attrObj).forEach(function(option) { - attributes.push(option + "=\"" + attrObj[option] + "\""); - }); - - return attributes.join(" ").trim() - }; - - // Set the symbol for easy access - data$4[key].symbol = key; - - // Set all the default options - data$4[key].options = { - "version": "1.1", - "width": data$4[key].width, - "height": data$4[key].height, - "viewBox": "0 0 " + data$4[key].width + " " + data$4[key].height, - "class": "octicon octicon-" + key, - "aria-hidden": "true" - }; - - // Function to return an SVG object - data$4[key].toSVG = function(options) { - return "" + data$4[key].path + "" - }; -}); - -var setup = class SetupWizard { - constructor({postSetup = () => {}}) { - this.slideList = []; - this.indicatorList = []; - this.footerLinks = {}; - - this.currentIndex = 0; - this.data = {}; - - this.postSetup = postSetup; - this.make(); - - this.showSlide(this.currentIndex); - } - - make() { - let body = document.querySelector('body'); - this.container = frappejs.ui.add('form', 'setup-container container', body); - this.$indicators = frappejs.ui.add('div', 'indicators vertical-margin align-center', this.container); - - this.makeSlides(); - this.makeLinks(); - } - - makeSlides() { - config.forEach(config$$1 => { - this.formLayout = new formLayout(config$$1); - this.slideList.push(this.formLayout); - let form = this.formLayout.form; - this.container.appendChild(form); - - let title = frappejs.ui.create('h3', { - className: 'text-extra-muted', - innerHTML: config$$1.title - }); - form.insertBefore(title, form.firstChild); - - let indicator = frappejs.ui.create('span', { - inside: this.$indicators, - className: 'indicator gray' - }); - this.indicatorList.push(indicator); - }); - } - - makeLinks() { - this.linkArea = frappejs.ui.add('div', 'setup-link-area align-right', this.container); - - // this.formLayout.on('change', () => { - // const show = this.doc._dirty && !this.doc.submitted; - // this.saveButton.classList.toggle('hide', !show); - // }); - - this.getFooterLinks().map(link => { - let $link = utils$3.addLink(link.label, this.linkArea, () => { - this.buildData(); - link.action(this.data); - }); - this.footerLinks[link.name] = $link; - }); - } - - buildData() { - this.data = {}; - this.slideList.forEach(slide => { - Object.assign(this.data, slide.doc); - }); - } - - showSlide(index) { - utils$3.activate(this.container, this.slideList[index].form, 'form-body', 'active'); - this.slideList[index].controlList[0].input.blur(); - this.activateIndicator(index); - this.showFooterLinks(index); - this.currentIndex = index; - } - - prevSlide() { - this.showSlide(this.currentIndex - 1); - } - - nextSlide() { - this.showSlide(this.currentIndex + 1); - } - - activateIndicator(index) { - this.indicatorList.forEach(indicator => {indicator.classList.add('gray');}); - let indicator = this.indicatorList[index]; - utils$3.activate(this.$indicators, indicator, 'gray', 'blue', index); - - frappejs.ui.removeClass(indicator, 'gray'); - indicator.classList.remove('gray'); - } - - showFooterLinks(index) { - let mat = [1, 1, 0]; - if(index === 0) { - mat = [0, 1, 0]; - } else if (index === this.slideList.length - 1) { - mat = [1, 0, 1]; - } - this.showHideLinks(mat); - } - - showHideLinks(matrix = [1, 1, 0]) { - let linkNames = this.getFooterLinks().map(link => link.name); - matrix.forEach((value, i) => { - const fn = value ? 'remove' : 'add'; - this.footerLinks[linkNames[i]].classList[fn]('hide'); - }); - } - - getFooterLinks() { - return [ - { - label: 'Prev', name: 'prev', - action: this.prevSlide.bind(this) - }, - { - label: 'Next', name: 'next', - action: this.nextSlide.bind(this) - }, - { - label: 'Complete', name: 'complete', - action: this.postSetup.bind(this) - } - ]; - } -}; - var AccountDocument = class Account extends document$1 { async validate() { - if (!this.account_type) { - if (this.parent_account) { - this.account_type = await frappejs.db.getValue('Account', this.parent_account, 'account_type'); + if (!this.accountType) { + if (this.parentAccount) { + this.accountType = await frappejs.db.getValue('Account', this.parentAccount, 'accountType'); } else { - this.account_type = 'Asset'; + this.accountType = 'Asset'; } } } @@ -58673,7 +59041,8 @@ module.exports = { "isSingle": 0, "keywordFields": [ "name", - "account_type" + "rootType", + "accountType" ], "fields": [ { @@ -58683,7 +59052,7 @@ module.exports = { "required": 1 }, { - "fieldname": "parent_account", + "fieldname": "parentAccount", "label": "Parent Account", "fieldtype": "Link", "target": "Account", @@ -58695,8 +59064,8 @@ module.exports = { } }, { - "fieldname": "account_type", - "label": "Account Type", + "fieldname": "rootType", + "label": "Root Type", "fieldtype": "Select", "options": [ "Asset", @@ -58705,6 +59074,37 @@ module.exports = { "Income", "Expense" ] + }, + { + "fieldname": "accountType", + "label": "Account Type", + "fieldtype": "Select", + "options": [ + "Accumulated Depreciation", + "Bank", + "Cash", + "Chargeable", + "Cost of Goods Sold", + "Depreciation", + "Equity", + "Expense Account", + "Expenses Included In Valuation", + "Fixed Asset", + "Income Account", + "Payable", + "Receivable", + "Round Off", + "Stock", + "Stock Adjustment", + "Stock Received But Not Billed", + "Tax", + "Temporary" + ] + }, + { + "fieldname": "isGroup", + "label": "Is Group", + "fieldtype": "Check" } ], @@ -58716,17 +59116,677 @@ module.exports = { listSettings: { getFields(list) { - return ['name', 'account_type']; + return ['name', 'accountType', 'rootType']; }, getRowHTML(list, data) { - return `
${list.getNameHTML(data)} (${data.account_type})
`; + return `
${list.getNameHTML(data)} (${data.rootType})
`; } + }, + + treeSettings: { + parentField: 'parentAccount' } }; }); var Account_1 = Account.events; var Account_2 = Account.listSettings; +var Account_3 = Account.treeSettings; + +var Afghanistan = {"code":"af","currency":"AFN","currency_fraction":"Pul","currency_fraction_units":100,"currency_symbol":"؋","number_format":"#,###.##","timezones":["Asia/Kabul"]}; +var Albania = {"code":"al","currency":"ALL","currency_fraction":"Qindarkë","currency_fraction_units":100,"currency_name":"Lek","currency_symbol":"L","number_format":"#,###.##","timezones":["Europe/Tirane"]}; +var Algeria = {"code":"dz","currency":"DZD","currency_fraction":"Santeem","currency_fraction_units":100,"currency_name":"Algerian Dinar","currency_symbol":"د.ج","number_format":"#,###.##","timezones":["Africa/Algiers"]}; +var Andorra = {"code":"ad","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#,###.##","timezones":["Europe/Andorra"]}; +var Angola = {"code":"ao","currency":"KZ","currency_fraction":"Cêntimo","currency_fraction_units":100,"currency_symbol":"AOA","currency_name":"Kwanza","number_format":"#,###.##","timezones":["Africa/Luanda"]}; +var Anguilla = {"code":"ai","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","currency_name":"Eastern Carribean Dollar","currency":"XCD","number_format":"#,###.##","timezones":["America/Anguilla"]}; +var Antarctica = {"code":"aq","number_format":"#,###.##","timezones":["Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Vostok"]}; +var Argentina = {"code":"ar","currency":"ARS","currency_fraction":"Centavo","currency_fraction_units":100,"currency_name":"Argentine Peso","currency_symbol":"$","number_format":"#.###,##","timezones":["America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia"]}; +var Armenia = {"code":"am","currency":"AMD","currency_fraction":"Luma","currency_fraction_units":100,"currency_name":"Armenian Dram","currency_symbol":"֏","number_format":"#,###.##","timezones":["Asia/Yerevan"]}; +var Aruba = {"code":"aw","currency":"AWG","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Aruban Florin","currency_symbol":"Afl","number_format":"#,###.##","timezones":["America/Aruba"]}; +var Australia = {"code":"au","currency":"AUD","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Australian Dollar","currency_symbol":"$","number_format":"# ###.##","timezones":["Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney"]}; +var Austria = {"code":"at","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#,###.##","timezones":["Europe/Vienna"]}; +var Azerbaijan = {"code":"az","currency_fraction":"Qəpik","currency_fraction_units":100,"currency_symbol":"","number_format":"#,###.##","timezones":["Asia/Baku"]}; +var Bahamas = {"code":"bs","currency":"BSD","currency_name":"Bahamian Dollar","number_format":"#,###.##","timezones":["America/Nassau"]}; +var Bahrain = {"code":"bh","currency":"BHD","currency_fraction":"Fils","currency_fraction_units":1000,"currency_name":"Bahraini Dinar","currency_symbol":".د.ب","number_format":"#,###.###","timezones":["Asia/Bahrain"]}; +var Bangladesh = {"code":"bd","currency":"BDT","currency_fraction":"Paisa","currency_fraction_units":100,"currency_name":"Taka","currency_symbol":"৳","number_format":"#,###.##","timezones":["Asia/Dhaka"]}; +var Barbados = {"code":"bb","currency":"BBD","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Barbados Dollar","currency_symbol":"$","number_format":"#,###.##","timezones":["America/Barbados"]}; +var Belarus = {"code":"by","currency_fraction":"Kapyeyka","currency_fraction_units":100,"currency_symbol":"Br","number_format":"#,###.##","timezones":["Europe/Minsk"]}; +var Belgium = {"code":"be","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#,###.##","timezones":["Europe/Brussels"]}; +var Belize = {"code":"bz","currency":"BZD","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Belize Dollar","currency_symbol":"$","date_format":"mm-dd-yyyy","number_format":"#,###.##","timezones":["America/Belize"]}; +var Benin = {"code":"bj","currency":"XOF","currency_name":"West African CFA Franc","currency_symbol":"CFA","currency_fraction":"Centime","currency_fraction_units":100,"number_format":"#,###.##","timezones":["Africa/Porto-Novo"]}; +var Bermuda = {"code":"bm","currency":"BMD","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Bermudian Dollar","currency_symbol":"$","number_format":"#,###.##","timezones":["Atlantic/Bermuda"]}; +var Bhutan = {"code":"bt","currency":"BTN","currency_fraction":"Chetrum","currency_fraction_units":100,"currency_name":"Ngultrum","currency_symbol":"Nu.","number_format":"#,###.##","timezones":["Asia/Thimphu"]}; +var Botswana = {"code":"bw","currency":"BWP","currency_fraction":"Thebe","currency_fraction_units":100,"currency_name":"Pula","currency_symbol":"P","number_format":"#,###.##","timezones":["Africa/Gaborone"]}; +var Brazil = {"code":"br","currency":"BRL","currency_fraction":"Centavo","currency_fraction_units":100,"currency_symbol":"R$","date_format":"dd/mm/yyyy","number_format":"#.###,##","timezones":["America/Araguaina","America/Bahia","America/Belem","America/Boa_Vista","America/Campo_Grande","America/Cuiaba","America/Eirunepe","America/Fortaleza","America/Maceio","America/Manaus","America/Noronha","America/Porto_Velho","America/Recife","America/Rio_Branco","America/Santarem","America/Sao_Paulo"]}; +var Bulgaria = {"code":"bg","currency":"BGN","currency_name":"Bulgarian Lev","currency_fraction":"Stotinka","currency_fraction_units":100,"currency_symbol":"лв","number_format":"#,###.##","timezones":["Europe/Sofia"]}; +var Burundi = {"code":"bi","currency":"BIF","currency_fraction":"Centime","currency_fraction_units":100,"currency_name":"Burundi Franc","currency_symbol":"Fr","number_format":"#,###.##","timezones":["Africa/Bujumbura"]}; +var Cambodia = {"code":"kh","currency":"KHR","currency_fraction":"Sen","currency_fraction_units":100,"currency_name":"Riel","currency_symbol":"៛","number_format":"#,###.##","timezones":["Asia/Phnom_Penh"]}; +var Cameroon = {"code":"cm","currency":"XAF","currency_name":"Central African CFA Franc","currency_symbol":"FCFA","currency_fraction":"Centime","currency_fraction_units":100,"number_format":"#,###.##","timezones":["Africa/Douala"]}; +var Canada = {"code":"ca","currency":"CAD","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Canadian Dollar","currency_symbol":"$","date_format":"mm-dd-yyyy","number_format":"#,###.##","timezones":["America/Atikokan","America/Blanc-Sablon","America/Cambridge_Bay","America/Creston","America/Dawson","America/Dawson_Creek","America/Edmonton","America/Glace_Bay","America/Goose_Bay","America/Halifax","America/Inuvik","America/Iqaluit","America/Moncton","America/Montreal","America/Nipigon","America/Pangnirtung","America/Rainy_River","America/Rankin_Inlet","America/Regina","America/Resolute","America/St_Johns","America/Swift_Current","America/Thunder_Bay","America/Toronto","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yellowknife"]}; +var Chad = {"code":"td","currency":"XAF","currency_name":"Central African CFA Franc","currency_symbol":"FCFA","currency_fraction":"Centime","currency_fraction_units":100,"number_format":"#,###.##","timezones":["Africa/Ndjamena"]}; +var Chile = {"code":"cl","currency":"CLP","currency_fraction":"Centavo","currency_fraction_units":100,"currency_name":"Chilean Peso","currency_symbol":"$","number_format":"#.###","timezones":["America/Santiago","Pacific/Easter"]}; +var China = {"code":"cn","currency":"CNY","currency_name":"Yuan Renminbi","date_format":"yyyy-mm-dd","number_format":"#,###.##","timezones":["Asia/Chongqing","Asia/Harbin","Asia/Kashgar","Asia/Shanghai","Asia/Urumqi"]}; +var Colombia = {"code":"co","currency":"COP","currency_fraction":"Centavo","currency_fraction_units":100,"currency_name":"Colombian Peso","currency_symbol":"$","number_format":"#.###,##","timezones":["America/Bogota"]}; +var Comoros = {"code":"km","currency":"KMF","currency_fraction":"Centime","currency_fraction_units":100,"currency_name":"Comoro Franc","currency_symbol":"Fr","number_format":"#,###.##","timezones":["Indian/Comoro"]}; +var Congo = {"code":"cg","number_format":"#,###.##","currency":"XAF","currency_name":"Central African CFA Franc","currency_symbol":"FCFA","currency_fraction":"Centime","currency_fraction_units":100}; +var Croatia = {"code":"hr","currency":"HRK","currency_fraction":"Lipa","currency_fraction_units":100,"currency_name":"Croatian Kuna","currency_symbol":"kn","number_format":"#.###,##","timezones":["Europe/Zagreb"]}; +var Cuba = {"code":"cu","currency":"CUP","currency_fraction":"Centavo","currency_fraction_units":100,"currency_name":"Cuban Peso","currency_symbol":"$","number_format":"#,###.##","timezones":["America/Havana"]}; +var Cyprus = {"code":"cy","currency":"CYP","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Cyprus Pound","currency_symbol":"€","number_format":"#.###,##","timezones":["Asia/Nicosia"]}; +var Denmark = {"code":"dk","currency":"DKK","currency_fraction":"Øre","currency_fraction_units":100,"currency_name":"Danish Krone","currency_symbol":"kr","number_format":"#.###,##","timezones":["Europe/Copenhagen"]}; +var Djibouti = {"code":"dj","currency":"DJF","currency_fraction":"Centime","currency_fraction_units":100,"currency_name":"Djibouti Franc","currency_symbol":"Fr","number_format":"#,###.##","timezones":["Africa/Djibouti"]}; +var Dominica = {"code":"dm","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","currency_name":"Eastern Carribean Dollar","currency":"XCD","number_format":"#,###.##","timezones":["America/Dominica"]}; +var Ecuador = {"code":"ec","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","number_format":"#,###.##","timezones":["America/Guayaquil","Pacific/Galapagos"]}; +var Egypt = {"code":"eg","currency":"EGP","currency_fraction":"Piastre[F]","currency_fraction_units":100,"currency_name":"Egyptian Pound","currency_symbol":"£ or ج.م","number_format":"#,###.##","timezones":["Africa/Cairo"]}; +var Eritrea = {"code":"er","currency":"ERN","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Nakfa","currency_symbol":"Nfk","number_format":"#,###.##","timezones":["Africa/Asmara"]}; +var Estonia = {"code":"ee","currency":"EEK","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Kroon","currency_symbol":"€","number_format":"#,###.##","timezones":["Europe/Tallinn"]}; +var Ethiopia = {"code":"et","currency_fraction":"Santim","currency_fraction_units":100,"currency_name":"Ethiopian Birr","currency_symbol":"Br","number_format":"#,###.##","timezones":["Africa/Addis_Ababa"]}; +var Fiji = {"code":"fj","currency":"FJD","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Fiji Dollar","currency_symbol":"$","number_format":"#,###.##","timezones":["Pacific/Fiji"]}; +var Finland = {"code":"fi","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#,###.##","timezones":["Europe/Helsinki"]}; +var France = {"code":"fr","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"# ###,##","date_format":"dd/mm/yyyy","timezones":["Europe/Paris"]}; +var Gabon = {"code":"ga","currency":"XAF","currency_name":"Central African CFA Franc","currency_symbol":"FCFA","currency_fraction":"Centime","currency_fraction_units":100,"number_format":"#,###.##","timezones":["Africa/Libreville"]}; +var Gambia = {"code":"gm","currency":"GMD","currency_name":"Dalasi","number_format":"#,###.##","timezones":["Africa/Banjul"]}; +var Georgia = {"code":"ge","currency_fraction":"Tetri","currency_fraction_units":100,"currency_symbol":"ლ","number_format":"#,###.##","timezones":["Asia/Tbilisi"]}; +var Germany = {"code":"de","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#,###.##","timezones":["Europe/Berlin"]}; +var Ghana = {"code":"gh","currency":"GHS","currency_fraction":"Pesewa","currency_fraction_units":100,"currency_symbol":"₵","number_format":"#,###.##","timezones":["Africa/Accra"]}; +var Gibraltar = {"code":"gi","currency":"GIP","currency_fraction":"Penny","currency_fraction_units":100,"currency_name":"Gibraltar Pound","currency_symbol":"£","number_format":"#,###.##","timezones":["Europe/Gibraltar"]}; +var Greece = {"code":"gr","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#,###.##","timezones":["Europe/Athens"]}; +var Greenland = {"code":"gl","number_format":"#,###.##","timezones":["America/Danmarkshavn","America/Godthab","America/Scoresbysund","America/Thule"]}; +var Grenada = {"code":"gd","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","currency_name":"Eastern Carribean Dollar","currency":"XCD","number_format":"#,###.##","timezones":["America/Grenada"]}; +var Guadeloupe = {"code":"gp","number_format":"#,###.##","timezones":["America/Guadeloupe"]}; +var Guam = {"code":"gu","number_format":"#,###.##","timezones":["Pacific/Guam"]}; +var Guatemala = {"code":"gt","currency":"GTQ","currency_fraction":"Centavo","currency_fraction_units":100,"currency_name":"Quetzal","currency_symbol":"Q","number_format":"#,###.##","timezones":["America/Guatemala"]}; +var Guernsey = {"code":"gg","currency_fraction":"Penny","currency_fraction_units":100,"currency_symbol":"£","number_format":"#,###.##","timezones":["Europe/London"]}; +var Guinea = {"code":"gn","currency":"GNF","currency_fraction":"Centime","currency_fraction_units":100,"currency_name":"Guinea Franc","currency_symbol":"Fr","number_format":"#,###.##","timezones":["Africa/Conakry"]}; +var Guyana = {"code":"gy","currency":"GYD","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Guyana Dollar","currency_symbol":"$","number_format":"#,###.##","timezones":["America/Guyana"]}; +var Haiti = {"code":"ht","currency":"HTG","currency_fraction":"Centime","currency_fraction_units":100,"currency_name":"Gourde","currency_symbol":"G","number_format":"#,###.##","timezones":["America/Guatemala","America/Port-au-Prince"]}; +var Honduras = {"code":"hn","currency":"HNL","currency_fraction":"Centavo","currency_fraction_units":100,"currency_name":"Lempira","currency_symbol":"L","number_format":"#,###.##","timezones":["America/Tegucigalpa"]}; +var Hungary = {"code":"hu","currency":"HUF","currency_fraction":"Fillér","currency_fraction_units":100,"currency_name":"Forint","currency_symbol":"Ft","date_format":"yyyy-mm-dd","number_format":"#.###","timezones":["Europe/Budapest"]}; +var Iceland = {"code":"is","currency":"ISK","currency_fraction":"Eyrir","currency_fraction_units":100,"currency_name":"Iceland Krona","currency_symbol":"kr","number_format":"#.###","timezones":["Atlantic/Reykjavik"]}; +var India = {"code":"in","currency":"INR","currency_fraction":"Paisa","currency_fraction_units":100,"currency_name":"Indian Rupee","currency_symbol":"₹","number_format":"#,##,###.##","timezones":["Asia/Kolkata"]}; +var Indonesia = {"code":"id","currency":"IDR","currency_fraction":"Sen","currency_fraction_units":100,"currency_name":"Rupiah","currency_symbol":"Rp","number_format":"#.###,##","timezones":["Asia/Jakarta","Asia/Jayapura","Asia/Makassar","Asia/Pontianak"]}; +var Iran = {"code":"ir","currency":"IRR","currency_name":"Iranian Rial","currency_symbol":"﷼","number_format":"#,###.##","timezones":["Asia/Tehran"]}; +var Iraq = {"code":"iq","currency":"IQD","currency_fraction":"Fils","currency_fraction_units":1000,"currency_name":"Iraqi Dinar","currency_symbol":"ع.د","number_format":"#,###.###","timezones":["Asia/Baghdad"]}; +var Ireland = {"code":"ie","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#,###.##","timezones":["Europe/Dublin"]}; +var Israel = {"code":"il","currency":"ILS","currency_fraction":"Agora","currency_fraction_units":100,"currency_name":"New Israeli Sheqel","currency_symbol":"₪","number_format":"#,###.##","timezones":["Asia/Jerusalem"]}; +var Italy = {"code":"it","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#.###,##","date_format":"dd/mm/yyyy","timezones":["Europe/Rome"]}; +var Jamaica = {"code":"jm","currency":"JMD","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Jamaican Dollar","currency_symbol":"$","number_format":"#,###.##","timezones":["America/Jamaica"]}; +var Japan = {"code":"jp","currency":"JPY","currency_fraction":"Sen[G]","currency_fraction_units":100,"currency_name":"Yen","currency_symbol":"¥","number_format":"#,###","timezones":["Asia/Tokyo"]}; +var Jersey = {"code":"je","currency_fraction":"Penny","currency_fraction_units":100,"currency_symbol":"£","number_format":"#,###.##","timezones":["Europe/London"]}; +var Jordan = {"code":"jo","currency":"JOD","currency_fraction":"Piastre[H]","currency_fraction_units":100,"currency_name":"Jordanian Dinar","currency_symbol":"د.ا","number_format":"#,###.###","timezones":["Asia/Amman"]}; +var Kazakhstan = {"code":"kz","currency":"KZT","currency_fraction":"Tïın","currency_fraction_units":100,"currency_name":"Tenge","currency_symbol":"₸","number_format":"#,###.##","timezones":["Asia/Almaty","Asia/Aqtau","Asia/Aqtobe","Asia/Oral","Asia/Qyzylorda"]}; +var Kenya = {"code":"ke","currency":"KES","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Kenyan Shilling","currency_symbol":"Sh","number_format":"#,###.##","timezones":["Africa/Nairobi"]}; +var Kiribati = {"code":"ki","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","number_format":"#,###.##","timezones":["Pacific/Enderbury","Pacific/Kiritimati","Pacific/Tarawa"]}; +var Kuwait = {"code":"kw","currency":"KWD","currency_fraction":"Fils","currency_fraction_units":1000,"currency_name":"Kuwaiti Dinar","currency_symbol":"د.ك","number_format":"#,###.###","timezones":["Asia/Kuwait"]}; +var Kyrgyzstan = {"code":"kg","currency":"KGS","currency_fraction":"Tyiyn","currency_fraction_units":100,"currency_name":"Som","currency_symbol":"лв","number_format":"#,###.##","timezones":["Asia/Bishkek"]}; +var Latvia = {"code":"lv","currency":"LVL","currency_fraction":"Santīms","currency_fraction_units":100,"currency_name":"Latvian Lats","currency_symbol":"Ls","number_format":"#,###.##","timezones":["Europe/Riga"]}; +var Lebanon = {"code":"lb","currency":"LBP","currency_fraction":"Piastre","currency_fraction_units":100,"currency_name":"Lebanese Pound","currency_symbol":"ل.ل","number_format":"#,###.##","timezones":["Asia/Beirut"]}; +var Lesotho = {"code":"ls","currency":"LSL","currency_fraction":"Sente","currency_fraction_units":100,"currency_name":"Loti","currency_symbol":"L","number_format":"#,###.##","timezones":["Africa/Maseru"]}; +var Liberia = {"code":"lr","currency":"LRD","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Liberian Dollar","currency_symbol":"$","number_format":"#,###.##","timezones":["Africa/Monrovia"]}; +var Libya = {"code":"ly","currency":"LYD","currency_fraction":"Dirham","currency_fraction_units":1000,"currency_name":"Libyan Dinar","currency_symbol":"ل.د","number_format":"#,###.###","timezones":["Africa/Tripoli"]}; +var Liechtenstein = {"code":"li","currency_fraction":"Rappen","currency_fraction_units":100,"currency_symbol":"Fr","number_format":"#,###.##","timezones":["Europe/Vaduz"]}; +var Lithuania = {"code":"lt","currency":"LTL","currency_fraction":"Centas","currency_fraction_units":100,"currency_name":"Lithuanian Litas","currency_symbol":"Lt","date_format":"yyyy-mm-dd","number_format":"# ###,##","timezones":["Europe/Vilnius"]}; +var Luxembourg = {"code":"lu","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#,###.##","timezones":["Europe/Luxembourg"]}; +var Macao = {"code":"mo","currency":"MOP","currency_name":"Pataca","number_format":"#,###.##"}; +var Macedonia = {"code":"mk","currency":"MKD","currency_fraction":"Deni","currency_fraction_units":100,"currency_name":"Denar","currency_symbol":"ден","number_format":"#,###.##"}; +var Madagascar = {"code":"mg","currency_fraction":"Iraimbilanja","currency_fraction_units":5,"currency_symbol":"Ar","number_format":"#,###.##","timezones":["Indian/Antananarivo"]}; +var Malawi = {"code":"mw","currency":"MWK","currency_fraction":"Tambala","currency_fraction_units":100,"currency_name":"Kwacha","currency_symbol":"MK","number_format":"#,###.##","timezones":["Africa/Blantyre"]}; +var Malaysia = {"code":"my","currency":"MYR","currency_fraction":"Sen","currency_fraction_units":100,"currency_name":"Malaysian Ringgit","currency_symbol":"RM","number_format":"#,###.##","timezones":["Asia/Kuala_Lumpur","Asia/Kuching"]}; +var Maldives = {"code":"mv","currency":"MVR","currency_fraction":"Laari","currency_fraction_units":100,"currency_name":"Rufiyaa","currency_symbol":".ރ","number_format":"#,###.##","timezones":["Indian/Maldives"]}; +var Mali = {"code":"ml","currency":"XOF","currency_name":"West African CFA Franc","currency_symbol":"CFA","currency_fraction":"Centime","currency_fraction_units":100,"number_format":"#,###.##","timezones":["Africa/Bamako"]}; +var Malta = {"code":"mt","currency":"MTL","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Maltese Lira","currency_symbol":"€","number_format":"#,###.##","timezones":["Europe/Malta"]}; +var Martinique = {"code":"mq","number_format":"#,###.##","timezones":["America/Martinique"]}; +var Mauritania = {"code":"mr","currency":"MRO","currency_fraction":"Khoums","currency_fraction_units":5,"currency_name":"Ouguiya","currency_symbol":"UM","number_format":"#,###.##","timezones":["Africa/Nouakchott"]}; +var Mauritius = {"code":"mu","currency":"MUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Mauritius Rupee","currency_symbol":"₨","number_format":"#,###","timezones":["Indian/Mauritius"]}; +var Mayotte = {"code":"yt","number_format":"#,###.##","timezones":["Indian/Mayotte"]}; +var Mexico = {"code":"mx","currency":"MXN","currency_fraction":"Centavo","currency_fraction_units":100,"currency_name":"Mexican Peso","currency_symbol":"$","number_format":"#,###.##","timezones":["America/Bahia_Banderas","America/Cancun","America/Chihuahua","America/Hermosillo","America/Matamoros","America/Mazatlan","America/Merida","America/Mexico_City","America/Monterrey","America/Ojinaga","America/Santa_Isabel","America/Tijuana"]}; +var Monaco = {"code":"mc","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#,###.##","timezones":["Europe/Monaco"]}; +var Mongolia = {"code":"mn","currency":"MNT","currency_fraction":"Möngö","currency_fraction_units":100,"currency_name":"Tugrik","currency_symbol":"₮","date_format":"yyyy-mm-dd","number_format":"#,###.##","timezones":["Asia/Choibalsan","Asia/Hovd","Asia/Ulaanbaatar"]}; +var Montenegro = {"code":"me","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#,###.##","timezones":["Europe/Belgrade"]}; +var Montserrat = {"code":"ms","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","currency_name":"Eastern Carribean Dollar","currency":"XCD","number_format":"#,###.##","timezones":["America/Montserrat"]}; +var Morocco = {"code":"ma","currency":"MAD","currency_fraction":"Centime","currency_fraction_units":100,"currency_name":"Moroccan Dirham","currency_symbol":"د.م.","number_format":"#,###.##","timezones":["Africa/Casablanca"]}; +var Mozambique = {"code":"mz","currency_fraction":"Centavo","currency_fraction_units":100,"currency_symbol":"MT","number_format":"#,###.##","timezones":["Africa/Maputo"]}; +var Myanmar = {"code":"mm","currency":"MMK","currency_name":"Kyat","number_format":"#,###.##","timezones":["Asia/Rangoon"]}; +var Namibia = {"code":"na","currency":"NAD","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Namibia Dollar","currency_symbol":"$","number_format":"#,###.##","timezones":["Africa/Windhoek"]}; +var Nauru = {"code":"nr","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","number_format":"#,###.##","timezones":["Pacific/Nauru"]}; +var Nepal = {"code":"np","currency":"NPR","currency_fraction":"Paisa","currency_fraction_units":100,"currency_name":"Nepalese Rupee","currency_symbol":"₨","number_format":"#,###.##","timezones":["Asia/Kathmandu"]}; +var Netherlands = {"code":"nl","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#,###.##","timezones":["Europe/Amsterdam"]}; +var Nicaragua = {"code":"ni","currency":"NIO","currency_fraction":"Centavo","currency_fraction_units":100,"currency_name":"Cordoba Oro","currency_symbol":"C$","number_format":"#,###.##","timezones":["America/Managua"]}; +var Niger = {"code":"ne","currency":"XOF","currency_name":"West African CFA Franc","currency_symbol":"CFA","currency_fraction":"Centime","currency_fraction_units":100,"number_format":"#,###.##","timezones":["Africa/Niamey"]}; +var Nigeria = {"code":"ng","currency":"NGN","currency_fraction":"Kobo","currency_fraction_units":100,"currency_name":"Naira","currency_symbol":"₦","number_format":"#,###.##","timezones":["Africa/Lagos"]}; +var Niue = {"code":"nu","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","number_format":"#,###.##","timezones":["Pacific/Niue"]}; +var Norway = {"code":"no","currency":"NOK","currency_fraction":"Øre","currency_fraction_units":100,"currency_name":"Norwegian Krone","currency_symbol":"kr","number_format":"#.###,##","timezones":["Europe/Oslo"]}; +var Oman = {"code":"om","currency":"OMR","currency_fraction":"Baisa","currency_fraction_units":1000,"currency_name":"Rial Omani","currency_symbol":"ر.ع.","number_format":"#,###.###","timezones":["Asia/Muscat"]}; +var Pakistan = {"code":"pk","currency":"PKR","currency_fraction":"Paisa","currency_fraction_units":100,"currency_name":"Pakistan Rupee","currency_symbol":"₨","number_format":"#,###.##","timezones":["Asia/Karachi"]}; +var Palau = {"code":"pw","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","date_format":"mm-dd-yyyy","number_format":"#,###.##","timezones":["Pacific/Palau"]}; +var Panama = {"code":"pa","currency_fraction":"Centésimo","currency_fraction_units":100,"currency_symbol":"B/.","number_format":"#,###.##","timezones":["America/Panama"]}; +var Paraguay = {"code":"py","currency":"PYG","currency_fraction":"Céntimo","currency_fraction_units":100,"currency_name":"Guarani","currency_symbol":"₲","number_format":"#,###.##","timezones":["America/Asuncion"]}; +var Peru = {"code":"pe","currency":"PEN","currency_fraction":"Céntimo","currency_fraction_units":100,"currency_name":"Nuevo Sol","currency_symbol":"S/.","number_format":"#,###.##","timezones":["America/Lima"]}; +var Philippines = {"code":"ph","currency":"PHP","currency_fraction":"Centavo","currency_fraction_units":100,"currency_name":"Philippine Peso","currency_symbol":"₱","date_format":"mm-dd-yyyy","number_format":"#,###.##","timezones":["Asia/Manila"]}; +var Pitcairn = {"code":"pn","number_format":"#,###.##","timezones":["Pacific/Pitcairn"]}; +var Poland = {"code":"pl","currency":"PLN","currency_fraction":"Grosz","currency_fraction_units":100,"currency_symbol":"zł","number_format":"#.###,##","timezones":["Europe/Warsaw"]}; +var Portugal = {"code":"pt","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#,###.##","timezones":["Atlantic/Azores","Atlantic/Madeira","Europe/Lisbon"]}; +var Qatar = {"code":"qa","currency":"QAR","currency_fraction":"Dirham","currency_fraction_units":100,"currency_name":"Qatari Rial","currency_symbol":"ر.ق","number_format":"#,###.##","timezones":["Asia/Qatar"]}; +var Romania = {"code":"ro","currency":"RON","currency_fraction":"Bani","currency_fraction_units":100,"currency_name":"Romanian New Leu","currency_symbol":"lei","number_format":"#,###.##","timezones":["Europe/Bucharest"]}; +var Rwanda = {"code":"rw","currency":"RWF","currency_fraction":"Centime","currency_fraction_units":100,"currency_name":"Rwanda Franc","currency_symbol":"Fr","number_format":"#,###.##","timezones":["Africa/Kigali"]}; +var Samoa = {"code":"ws","currency":"WST","currency_fraction":"Sene","currency_fraction_units":100,"currency_name":"Tala","currency_symbol":"T","number_format":"#,###.##","timezones":["Pacific/Apia"]}; +var Senegal = {"code":"sn","currency":"XOF","currency_name":"West African CFA Franc","currency_symbol":"CFA","currency_fraction":"Centime","currency_fraction_units":100,"number_format":"#,###.##","timezones":["Africa/Dakar"]}; +var Serbia = {"code":"rs","currency":"RSD","currency_fraction":"Para","currency_fraction_units":100,"currency_name":"Serbian Dinar","currency_symbol":"дин.","number_format":"#,###.##","timezones":["Europe/Belgrade"]}; +var Seychelles = {"code":"sc","currency":"SCR","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Seychelles Rupee","currency_symbol":"₨","number_format":"#,###.##","timezones":["Indian/Mahe"]}; +var Singapore = {"code":"sg","currency":"SGD","currency_fraction":"Sen","currency_fraction_units":100,"currency_name":"Singapore Dollar","currency_symbol":"$","number_format":"#,###.##","timezones":["Asia/Singapore"]}; +var Slovakia = {"code":"sk","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#,###.##","timezones":["Europe/Bratislava"]}; +var Slovenia = {"code":"si","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#,###.##","timezones":["Europe/Belgrade"]}; +var Somalia = {"code":"so","currency":"SOS","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Somali Shilling","currency_symbol":"Sh","number_format":"#,###.##","timezones":["Africa/Mogadishu"]}; +var Spain = {"code":"es","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#,###.##","timezones":["Africa/Ceuta","Atlantic/Canary","Europe/Madrid"]}; +var Sudan = {"code":"sd","currency_fraction":"Piastre","currency_fraction_units":100,"currency_symbol":"£","number_format":"#,###.##","timezones":["Africa/Khartoum"]}; +var Suriname = {"code":"sr","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","number_format":"#,###.##","timezones":["America/Paramaribo"]}; +var Swaziland = {"code":"sz","currency":"SZL","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Lilangeni","currency_symbol":"L","number_format":"#, ###.##","timezones":["Africa/Mbabane"]}; +var Sweden = {"code":"se","currency":"SEK","currency_fraction":"Öre","currency_fraction_units":100,"currency_name":"Swedish Krona","currency_symbol":"kr","number_format":"#.###,##","timezones":["Europe/Stockholm"]}; +var Switzerland = {"code":"ch","currency":"CHF","currency_fraction":"Rappen[K]","currency_fraction_units":100,"smallest_currency_fraction_value":0.05,"currency_name":"Swiss Franc","currency_symbol":"Fr","number_format":"#'###.##","timezones":["Europe/Zurich"]}; +var Syria = {"code":"sy","currency":"SYP","currency_name":"Syrian Pound","number_format":"#,###.##"}; +var Taiwan = {"code":"tw","currency":"TWD","date_format":"yyyy-mm-dd","number_format":"#,###.##"}; +var Tajikistan = {"code":"tj","currency_fraction":"Diram","currency_fraction_units":100,"currency_symbol":"ЅМ","number_format":"#,###.##","timezones":["Asia/Dushanbe"]}; +var Tanzania = {"code":"tz","currency":"TZS","currency_name":"Tanzanian Shilling","number_format":"#,###.##"}; +var Thailand = {"code":"th","currency":"THB","currency_fraction":"Satang","currency_fraction_units":100,"currency_name":"Baht","currency_symbol":"฿","number_format":"#,###.##","timezones":["Asia/Bangkok"]}; +var Togo = {"code":"tg","currency":"XOF","currency_name":"West African CFA Franc","currency_symbol":"CFA","currency_fraction":"Centime","currency_fraction_units":100,"number_format":"#,###.##","timezones":["Africa/Lome"]}; +var Tokelau = {"code":"tk","number_format":"#,###.##","timezones":["Pacific/Fakaofo"]}; +var Tonga = {"code":"to","currency":"TOP","currency_fraction":"Seniti[L]","currency_fraction_units":100,"currency_name":"Pa'anga","currency_symbol":"T$","number_format":"#,###.##","timezones":["Pacific/Tongatapu"]}; +var Tunisia = {"code":"tn","currency":"TND","currency_fraction":"Millime","currency_fraction_units":1000,"currency_name":"Tunisian Dinar","currency_symbol":"د.ت","number_format":"#,###.###","timezones":["Africa/Tunis"]}; +var Turkey = {"code":"tr","currency":"TRY","currency_fraction":"Kuruş","currency_fraction_units":100,"currency_symbol":"₺","number_format":"#,###.##","timezones":["Europe/Istanbul"]}; +var Turkmenistan = {"code":"tm","currency":"TMM","currency_fraction":"Tennesi","currency_fraction_units":100,"currency_name":"Manat","currency_symbol":"m","number_format":"#,###.##","timezones":["Asia/Ashgabat"]}; +var Tuvalu = {"code":"tv","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","number_format":"#,###.##","timezones":["Pacific/Funafuti"]}; +var Uganda = {"code":"ug","currency":"UGX","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Uganda Shilling","currency_symbol":"Sh","number_format":"#,###.##","timezones":["Africa/Kampala"]}; +var Ukraine = {"code":"ua","currency":"UAH","currency_fraction":"Kopiyka","currency_fraction_units":100,"currency_name":"Ukrainian Hryvnia","currency_symbol":"₴","number_format":"#,###.##","timezones":["Europe/Kiev","Europe/Simferopol","Europe/Uzhgorod","Europe/Zaporozhye"]}; +var Uruguay = {"code":"uy","currency":"UYU","currency_fraction":"Centésimo","currency_fraction_units":100,"currency_name":"Peso Uruguayo","currency_symbol":"$","number_format":"#.###,##","timezones":["America/Montevideo"]}; +var Uzbekistan = {"code":"uz","currency":"UZS","currency_fraction":"Tiyin","currency_fraction_units":100,"currency_name":"Uzbekistan Sum","currency_symbol":"лв","number_format":"#,###.##","timezones":["Asia/Samarkand","Asia/Tashkent"]}; +var Vanuatu = {"code":"vu","currency":"VUV","currency_fraction":"None","currency_fraction_units":0,"currency_name":"Vatu","currency_symbol":"Vt","number_format":"#,###","timezones":["Pacific/Efate"]}; +var Vietnam = {"code":"vn","currency":"VND","currency_name":"Dong","number_format":"#.###"}; +var Yemen = {"code":"ye","currency_fraction":"Fils","currency_fraction_units":100,"currency_symbol":"﷼","number_format":"#,###.##","timezones":["Asia/Aden"]}; +var Zambia = {"code":"zm","currency":"ZMW","currency_fraction":"Ngwee","currency_fraction_units":100,"currency_name":"Zambian Kwacha","currency_symbol":"ZK","number_format":"#,###.##","timezones":["Africa/Lusaka"]}; +var Zimbabwe = {"code":"zw","currency":"ZWD","currency_fraction":"Thebe","currency_fraction_units":100,"currency_name":"Zimbabwe Dollar","currency_symbol":"P","number_format":"# ###.##","timezones":["Africa/Harare"]}; +var countryInfo = { + Afghanistan: Afghanistan, + Albania: Albania, + Algeria: Algeria, + Andorra: Andorra, + Angola: Angola, + Anguilla: Anguilla, + Antarctica: Antarctica, + Argentina: Argentina, + Armenia: Armenia, + Aruba: Aruba, + Australia: Australia, + Austria: Austria, + Azerbaijan: Azerbaijan, + Bahamas: Bahamas, + Bahrain: Bahrain, + Bangladesh: Bangladesh, + Barbados: Barbados, + Belarus: Belarus, + Belgium: Belgium, + Belize: Belize, + Benin: Benin, + Bermuda: Bermuda, + Bhutan: Bhutan, + Botswana: Botswana, + Brazil: Brazil, + Bulgaria: Bulgaria, + Burundi: Burundi, + Cambodia: Cambodia, + Cameroon: Cameroon, + Canada: Canada, + Chad: Chad, + Chile: Chile, + China: China, + Colombia: Colombia, + Comoros: Comoros, + Congo: Congo, + Croatia: Croatia, + Cuba: Cuba, + Cyprus: Cyprus, + Denmark: Denmark, + Djibouti: Djibouti, + Dominica: Dominica, + Ecuador: Ecuador, + Egypt: Egypt, + Eritrea: Eritrea, + Estonia: Estonia, + Ethiopia: Ethiopia, + Fiji: Fiji, + Finland: Finland, + France: France, + Gabon: Gabon, + Gambia: Gambia, + Georgia: Georgia, + Germany: Germany, + Ghana: Ghana, + Gibraltar: Gibraltar, + Greece: Greece, + Greenland: Greenland, + Grenada: Grenada, + Guadeloupe: Guadeloupe, + Guam: Guam, + Guatemala: Guatemala, + Guernsey: Guernsey, + Guinea: Guinea, + Guyana: Guyana, + Haiti: Haiti, + Honduras: Honduras, + Hungary: Hungary, + Iceland: Iceland, + India: India, + Indonesia: Indonesia, + Iran: Iran, + Iraq: Iraq, + Ireland: Ireland, + Israel: Israel, + Italy: Italy, + Jamaica: Jamaica, + Japan: Japan, + Jersey: Jersey, + Jordan: Jordan, + Kazakhstan: Kazakhstan, + Kenya: Kenya, + Kiribati: Kiribati, + Kuwait: Kuwait, + Kyrgyzstan: Kyrgyzstan, + Latvia: Latvia, + Lebanon: Lebanon, + Lesotho: Lesotho, + Liberia: Liberia, + Libya: Libya, + Liechtenstein: Liechtenstein, + Lithuania: Lithuania, + Luxembourg: Luxembourg, + Macao: Macao, + Macedonia: Macedonia, + Madagascar: Madagascar, + Malawi: Malawi, + Malaysia: Malaysia, + Maldives: Maldives, + Mali: Mali, + Malta: Malta, + Martinique: Martinique, + Mauritania: Mauritania, + Mauritius: Mauritius, + Mayotte: Mayotte, + Mexico: Mexico, + Monaco: Monaco, + Mongolia: Mongolia, + Montenegro: Montenegro, + Montserrat: Montserrat, + Morocco: Morocco, + Mozambique: Mozambique, + Myanmar: Myanmar, + Namibia: Namibia, + Nauru: Nauru, + Nepal: Nepal, + Netherlands: Netherlands, + Nicaragua: Nicaragua, + Niger: Niger, + Nigeria: Nigeria, + Niue: Niue, + Norway: Norway, + Oman: Oman, + Pakistan: Pakistan, + Palau: Palau, + Panama: Panama, + Paraguay: Paraguay, + Peru: Peru, + Philippines: Philippines, + Pitcairn: Pitcairn, + Poland: Poland, + Portugal: Portugal, + Qatar: Qatar, + Romania: Romania, + Rwanda: Rwanda, + Samoa: Samoa, + Senegal: Senegal, + Serbia: Serbia, + Seychelles: Seychelles, + Singapore: Singapore, + Slovakia: Slovakia, + Slovenia: Slovenia, + Somalia: Somalia, + Spain: Spain, + Sudan: Sudan, + Suriname: Suriname, + Swaziland: Swaziland, + Sweden: Sweden, + Switzerland: Switzerland, + Syria: Syria, + Taiwan: Taiwan, + Tajikistan: Tajikistan, + Tanzania: Tanzania, + Thailand: Thailand, + Togo: Togo, + Tokelau: Tokelau, + Tonga: Tonga, + Tunisia: Tunisia, + Turkey: Turkey, + Turkmenistan: Turkmenistan, + Tuvalu: Tuvalu, + Uganda: Uganda, + Ukraine: Ukraine, + Uruguay: Uruguay, + Uzbekistan: Uzbekistan, + Vanuatu: Vanuatu, + Vietnam: Vietnam, + Yemen: Yemen, + Zambia: Zambia, + Zimbabwe: Zimbabwe, + "American Samoa": {"code":"as","number_format":"#,###.##"}, + "Antigua and Barbuda": {"code":"ag","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","currency_name":"Eastern Carribean Dollar","currency":"XCD","number_format":"#,###.##","timezones":["America/Antigua"]}, + "Bolivia, Plurinational State of": {"code":"bo","currency":"BOB","currency_name":"Boliviano","number_format":"#,###.##"}, + "Bonaire, Sint Eustatius and Saba": {"code":"bq","number_format":"#,###.##"}, + "Bosnia and Herzegovina": {"code":"ba","currency":"BAM","currency_fraction":"Fening","currency_fraction_units":100,"currency_symbol":"KM","number_format":"#.###,##","timezones":["Europe/Sarajevo"]}, + "Bouvet Island": {"code":"bv","number_format":"#,###.##"}, + "British Indian Ocean Territory": {"code":"io","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","number_format":"#,###.##","timezones":["Indian/Chagos"]}, + "Brunei Darussalam": {"code":"bn","currency":"BND","currency_name":"Brunei Dollar","number_format":"#,###.##","timezones":["Asia/Brunei"]}, + "Burkina Faso": {"code":"bf","currency":"XOF","currency_name":"West African CFA Franc","currency_symbol":"CFA","currency_fraction":"Centime","currency_fraction_units":100,"number_format":"#,###.##","timezones":["Africa/Ouagadougou"]}, + "Cape Verde": {"code":"cv","currency":"CVE","currency_fraction":"Centavo","currency_fraction_units":100,"currency_name":"Cape Verde Escudo","currency_symbol":"Esc or $","number_format":"#,###.##","timezones":["Atlantic/Cape_Verde"]}, + "Cayman Islands": {"code":"ky","currency":"KYD","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Cayman Islands Dollar","currency_symbol":"$","number_format":"#,###.##","timezones":["America/Cayman"]}, + "Central African Republic": {"code":"cf","currency":"XAF","currency_fraction":"Centime","currency_fraction_units":100,"currency_name":"Central African CFA Franc","currency_symbol":"FCFA","number_format":"#,###.##","timezones":["Africa/Bangui"]}, + "Christmas Island": {"code":"cx","number_format":"#,###.##","timezones":["Indian/Christmas"]}, + "Cocos (Keeling) Islands": {"code":"cc","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","number_format":"#,###.##","timezones":["Indian/Cocos"]}, + "Congo, The Democratic Republic of the": {"code":"cd","number_format":"#,###.##"}, + "Cook Islands": {"code":"ck","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","number_format":"#,###.##","timezones":["Pacific/Rarotonga"]}, + "Costa Rica": {"code":"cr","currency":"CRC","currency_fraction":"Céntimo","currency_fraction_units":100,"currency_name":"Costa Rican Colon","currency_symbol":"₡","number_format":"#.###,##","timezones":["America/Costa_Rica"]}, + "Curaçao": {"code":"cw","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"ƒ","number_format":"#,###.##"}, + "Czech Republic": {"code":"cz","currency":"CZK","currency_fraction":"Haléř","currency_fraction_units":100,"currency_name":"Czech Koruna","currency_symbol":"Kč","number_format":"#.###,##","timezones":["Europe/Prague"]}, + "Dominican Republic": {"code":"do","currency":"DOP","currency_fraction":"Centavo","currency_fraction_units":100,"currency_name":"Dominican Peso","currency_symbol":"$","number_format":"#,###.##","timezones":["America/Santo_Domingo"]}, + "El Salvador": {"code":"sv","currency":"SVC","currency_fraction":"Centavo","currency_fraction_units":100,"currency_name":"El Salvador Colon","currency_symbol":"₡","number_format":"#,###.##","timezones":["America/El_Salvador"]}, + "Equatorial Guinea": {"code":"gq","currency":"XAF","currency_name":"Central African CFA Franc","currency_symbol":"FCFA","currency_fraction":"Centime","currency_fraction_units":100,"number_format":"#,###.##","timezones":["Africa/Malabo"]}, + "Falkland Islands (Malvinas)": {"code":"fk","currency":"FKP","currency_name":"Falkland Islands Pound","number_format":"#,###.##"}, + "Faroe Islands": {"code":"fo","currency_fraction":"Øre","currency_fraction_units":100,"currency_symbol":"kr","number_format":"#,###.##","timezones":["Atlantic/Faroe"]}, + "French Guiana": {"code":"gf","number_format":"#,###.##","timezones":["America/Cayenne"]}, + "French Polynesia": {"code":"pf","currency_fraction":"Centime","currency_fraction_units":100,"currency_symbol":"Fr","number_format":"#,###.##","timezones":["Pacific/Gambier","Pacific/Marquesas","Pacific/Tahiti"]}, + "French Southern Territories": {"code":"tf","number_format":"#,###.##"}, + "Guinea-Bissau": {"code":"gw","currency":"XOF","currency_name":"West African CFA Franc","currency_symbol":"CFA","currency_fraction":"Centime","currency_fraction_units":100,"number_format":"#,###.##","timezones":["Africa/Bissau"]}, + "Heard Island and McDonald Islands": {"code":"hm","number_format":"#,###.##"}, + "Holy See (Vatican City State)": {"code":"va","number_format":"#,###.##"}, + "Hong Kong": {"code":"hk","currency":"HKD","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Hong Kong Dollar","currency_symbol":"$","number_format":"#,###.##","timezones":["Asia/Hong_Kong"]}, + "Isle of Man": {"code":"im","currency_fraction":"Penny","currency_fraction_units":100,"currency_symbol":"£","number_format":"#,###.##","timezones":["Europe/London"]}, + "Ivory Coast": {"code":"ci","currency":"XOF","currency_name":"West African CFA Franc","currency_symbol":"CFA","currency_fraction":"Centime","currency_fraction_units":100,"number_format":"#,###.##","timeszones":["Africa/Abidjan"]}, + "Korea, Democratic Peoples Republic of": {"code":"kp","currency":"KPW","currency_name":"North Korean Won","number_format":"#,###.##"}, + "Korea, Republic of": {"code":"kr","currency":"KRW","currency_name":"Won","number_format":"#,###"}, + "Lao Peoples Democratic Republic": {"code":"la","currency":"LAK","currency_name":"Kip","number_format":"#,###.##"}, + "Marshall Islands": {"code":"mh","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","number_format":"#,###.##","timezones":["Pacific/Kwajalein","Pacific/Majuro"]}, + "Micronesia, Federated States of": {"code":"fm","number_format":"#,###.##"}, + "Moldova, Republic of": {"code":"md","currency":"MDL","currency_name":"Moldovan Leu","number_format":"#,###.##"}, + "New Caledonia": {"code":"nc","currency_fraction":"Centime","currency_fraction_units":100,"currency_symbol":"Fr","number_format":"#,###.##","timezones":["Pacific/Noumea"]}, + "New Zealand": {"code":"nz","currency":"NZD","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"New Zealand Dollar","currency_symbol":"$","number_format":"#,###.##","timezones":["Pacific/Auckland","Pacific/Chatham"]}, + "Norfolk Island": {"code":"nf","number_format":"#,###.##","timezones":["Pacific/Norfolk"]}, + "Northern Mariana Islands": {"code":"mp","number_format":"#,###.##","timezones":["Pacific/Saipan"]}, + "Palestinian Territory, Occupied": {"code":"ps","number_format":"#,###.##"}, + "Papua New Guinea": {"code":"pg","currency":"PGK","currency_fraction":"Toea","currency_fraction_units":100,"currency_name":"Kina","currency_symbol":"K","number_format":"#,###.##","timezones":["Pacific/Port_Moresby"]}, + "Puerto Rico": {"code":"pr","number_format":"#,###.##","timezones":["America/Puerto_Rico"]}, + "Russian Federation": {"code":"ru","currency":"RUB","currency_name":"Russian Ruble","number_format":"#.###,##"}, + "Réunion": {"code":"re","number_format":"#,###.##"}, + "Saint Barthélemy": {"code":"bl","number_format":"#,###.##"}, + "Saint Helena, Ascension and Tristan da Cunha": {"code":"sh","currency":"SHP","currency_name":"Saint Helena Pound","number_format":"#,###.##"}, + "Saint Kitts and Nevis": {"code":"kn","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","currency_name":"Eastern Carribean Dollar","currency":"XCD","number_format":"#,###.##","timezones":["America/St_Kitts"]}, + "Saint Lucia": {"code":"lc","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","currency_name":"Eastern Carribean Dollar","currency":"XCD","number_format":"#,###.##","timezones":["America/St_Lucia"]}, + "Saint Martin (French part)": {"code":"mf","number_format":"#,###.##"}, + "Saint Pierre and Miquelon": {"code":"pm","number_format":"#,###.##"}, + "Saint Vincent and the Grenadines": {"code":"vc","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","currency_name":"Eastern Carribean Dollar","currency":"XCD","number_format":"#,###.##","timezones":["America/St_Vincent"]}, + "San Marino": {"code":"sm","currency":"EUR","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"€","number_format":"#,###.##","timezones":["Europe/Rome"]}, + "Sao Tome and Principe": {"code":"st","currency":"STD","currency_name":"Dobra","number_format":"#,###.##"}, + "Saudi Arabia": {"code":"sa","currency":"SAR","currency_fraction":"Halala","currency_fraction_units":100,"currency_name":"Saudi Riyal","currency_symbol":"ر.س","number_format":"#,###.##","timezones":["Asia/Riyadh"]}, + "Sierra Leone": {"code":"sl","currency":"SLL","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Leone","currency_symbol":"Le","number_format":"#,###.##","timezones":["Africa/Freetown"]}, + "Sint Maarten (Dutch part)": {"code":"sx","number_format":"#,###.##"}, + "Solomon Islands": {"code":"sb","currency":"SBD","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Solomon Islands Dollar","currency_symbol":"$","number_format":"#,###.##","timezones":["Pacific/Guadalcanal"]}, + "South Africa": {"code":"za","currency":"ZAR","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Rand","currency_symbol":"R","date_format":"yyyy-mm-dd","number_format":"# ###.##","timezones":["Africa/Johannesburg"]}, + "South Georgia and the South Sandwich Islands": {"code":"gs","currency_fraction":"Penny","currency_fraction_units":100,"currency_symbol":"£","number_format":"#,###.##"}, + "South Sudan": {"code":"ss","currency_fraction":"Piastre","currency_fraction_units":100,"currency_symbol":"£","number_format":"#,###.##","timezones":["Africa/Juba"]}, + "Sri Lanka": {"code":"lk","currency":"LKR","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Sri Lanka Rupee","currency_symbol":"Rs","number_format":"#,###.##","timezones":["Asia/Colombo"]}, + "Svalbard and Jan Mayen": {"code":"sj","number_format":"#,###.##"}, + "Timor-Leste": {"code":"tl","number_format":"#,###.##"}, + "Trinidad and Tobago": {"code":"tt","currency":"TTD","currency_fraction":"Cent","currency_fraction_units":100,"currency_name":"Trinidad and Tobago Dollar","currency_symbol":"$","number_format":"#,###.##","timezones":["America/Port_of_Spain"]}, + "Turks and Caicos Islands": {"code":"tc","currency_fraction":"Cent","currency_fraction_units":100,"currency_symbol":"$","number_format":"#,###.##"}, + "United Arab Emirates": {"code":"ae","currency":"AED","currency_fraction":"Fils","currency_fraction_units":100,"currency_name":"UAE Dirham","currency_symbol":"د.إ","number_format":"#,###.##","timezones":["Asia/Dubai"]}, + "United Kingdom": {"code":"gb","currency":"GBP","currency_fraction":"Penny","currency_fraction_units":100,"currency_name":"Pound Sterling","currency_symbol":"£","number_format":"#,###.##","timezones":["Europe/London"]}, + "United States": {"code":"us","currency":"USD","currency_fraction":"Cent","currency_fraction_units":100,"smallest_currency_fraction_value":0.05,"currency_name":"US Dollar","currency_symbol":"$","date_format":"mm-dd-yyyy","number_format":"#,###.##","timezones":["America/Adak","America/Anchorage","America/Boise","America/Chicago","America/Denver","America/Detroit","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Los_Angeles","America/Menominee","America/Metlakatla","America/New_York","America/Nome","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Phoenix","America/Denver","America/Sitka","America/Yakutat","Pacific/Honolulu"]}, + "United States Minor Outlying Islands": {"code":"um","number_format":"#,###.##"}, + "Venezuela, Bolivarian Republic of": {"code":"ve","number_format":"#.###,##","currency":"VEF","currency_symbol":"Bs.","currency_fraction":"Centimos","currency_fraction_units":100}, + "Virgin Islands, British": {"code":"vg","number_format":"#,###.##"}, + "Virgin Islands, U.S.": {"code":"vi","number_format":"#,###.##"}, + "Wallis and Futuna": {"code":"wf","currency_fraction":"Centime","currency_fraction_units":100,"currency_symbol":"Fr","number_format":"#,###.##"}, + "Western Sahara": {"code":"eh","number_format":"#,###.##","timezones":["Africa/El_Aaiun"]}, + "Åland Islands": {"code":"ax","number_format":"#,###.##"} +}; + +var countryInfo$1 = Object.freeze({ + Afghanistan: Afghanistan, + Albania: Albania, + Algeria: Algeria, + Andorra: Andorra, + Angola: Angola, + Anguilla: Anguilla, + Antarctica: Antarctica, + Argentina: Argentina, + Armenia: Armenia, + Aruba: Aruba, + Australia: Australia, + Austria: Austria, + Azerbaijan: Azerbaijan, + Bahamas: Bahamas, + Bahrain: Bahrain, + Bangladesh: Bangladesh, + Barbados: Barbados, + Belarus: Belarus, + Belgium: Belgium, + Belize: Belize, + Benin: Benin, + Bermuda: Bermuda, + Bhutan: Bhutan, + Botswana: Botswana, + Brazil: Brazil, + Bulgaria: Bulgaria, + Burundi: Burundi, + Cambodia: Cambodia, + Cameroon: Cameroon, + Canada: Canada, + Chad: Chad, + Chile: Chile, + China: China, + Colombia: Colombia, + Comoros: Comoros, + Congo: Congo, + Croatia: Croatia, + Cuba: Cuba, + Cyprus: Cyprus, + Denmark: Denmark, + Djibouti: Djibouti, + Dominica: Dominica, + Ecuador: Ecuador, + Egypt: Egypt, + Eritrea: Eritrea, + Estonia: Estonia, + Ethiopia: Ethiopia, + Fiji: Fiji, + Finland: Finland, + France: France, + Gabon: Gabon, + Gambia: Gambia, + Georgia: Georgia, + Germany: Germany, + Ghana: Ghana, + Gibraltar: Gibraltar, + Greece: Greece, + Greenland: Greenland, + Grenada: Grenada, + Guadeloupe: Guadeloupe, + Guam: Guam, + Guatemala: Guatemala, + Guernsey: Guernsey, + Guinea: Guinea, + Guyana: Guyana, + Haiti: Haiti, + Honduras: Honduras, + Hungary: Hungary, + Iceland: Iceland, + India: India, + Indonesia: Indonesia, + Iran: Iran, + Iraq: Iraq, + Ireland: Ireland, + Israel: Israel, + Italy: Italy, + Jamaica: Jamaica, + Japan: Japan, + Jersey: Jersey, + Jordan: Jordan, + Kazakhstan: Kazakhstan, + Kenya: Kenya, + Kiribati: Kiribati, + Kuwait: Kuwait, + Kyrgyzstan: Kyrgyzstan, + Latvia: Latvia, + Lebanon: Lebanon, + Lesotho: Lesotho, + Liberia: Liberia, + Libya: Libya, + Liechtenstein: Liechtenstein, + Lithuania: Lithuania, + Luxembourg: Luxembourg, + Macao: Macao, + Macedonia: Macedonia, + Madagascar: Madagascar, + Malawi: Malawi, + Malaysia: Malaysia, + Maldives: Maldives, + Mali: Mali, + Malta: Malta, + Martinique: Martinique, + Mauritania: Mauritania, + Mauritius: Mauritius, + Mayotte: Mayotte, + Mexico: Mexico, + Monaco: Monaco, + Mongolia: Mongolia, + Montenegro: Montenegro, + Montserrat: Montserrat, + Morocco: Morocco, + Mozambique: Mozambique, + Myanmar: Myanmar, + Namibia: Namibia, + Nauru: Nauru, + Nepal: Nepal, + Netherlands: Netherlands, + Nicaragua: Nicaragua, + Niger: Niger, + Nigeria: Nigeria, + Niue: Niue, + Norway: Norway, + Oman: Oman, + Pakistan: Pakistan, + Palau: Palau, + Panama: Panama, + Paraguay: Paraguay, + Peru: Peru, + Philippines: Philippines, + Pitcairn: Pitcairn, + Poland: Poland, + Portugal: Portugal, + Qatar: Qatar, + Romania: Romania, + Rwanda: Rwanda, + Samoa: Samoa, + Senegal: Senegal, + Serbia: Serbia, + Seychelles: Seychelles, + Singapore: Singapore, + Slovakia: Slovakia, + Slovenia: Slovenia, + Somalia: Somalia, + Spain: Spain, + Sudan: Sudan, + Suriname: Suriname, + Swaziland: Swaziland, + Sweden: Sweden, + Switzerland: Switzerland, + Syria: Syria, + Taiwan: Taiwan, + Tajikistan: Tajikistan, + Tanzania: Tanzania, + Thailand: Thailand, + Togo: Togo, + Tokelau: Tokelau, + Tonga: Tonga, + Tunisia: Tunisia, + Turkey: Turkey, + Turkmenistan: Turkmenistan, + Tuvalu: Tuvalu, + Uganda: Uganda, + Ukraine: Ukraine, + Uruguay: Uruguay, + Uzbekistan: Uzbekistan, + Vanuatu: Vanuatu, + Vietnam: Vietnam, + Yemen: Yemen, + Zambia: Zambia, + Zimbabwe: Zimbabwe, + default: countryInfo +}); + +var require$$0$10 = ( countryInfo$1 && countryInfo ) || countryInfo$1; + +const countryList = Object.keys(require$$0$10).sort(); + +var AccountingSettings = { + name: "AccountingSettings", + label: "AccountingSettings", + naming: "name", // {random|autoincrement} + isSingle: 1, + isChild: 0, + isSubmittable: 0, + settings: null, + keywordFields: [], + fields: [ + { + label: "Company Name", + fieldname: "companyName", + fieldtype: "Data", + required: 1 + }, + + { + label: "Writeoff Account", + fieldname: "writeOffAccount", + fieldtype: "Account" + }, + + { + "fieldname": "country", + "label": "Country", + "fieldtype": "Autocomplete", + "required": 1, + getList: () => countryList + }, + + { + "fieldname": "fullname", + "label": "Name", + "fieldtype": "Data", + "required": 1 + }, + + { + "fieldname": "email", + "label": "Email", + "fieldtype": "Data", + "required": 1 + }, + + { + "fieldname": "bankName", + "label": "Bank Name", + "fieldtype": "Data", + "required": 1 + } + + ] +}; var AccountingLedgerEntry = { name: "AccountingLedgerEntry", @@ -59652,6 +60712,7 @@ var Contact = { var models$2 = { models: { Account: Account, + AccountingSettings: AccountingSettings, AccountingLedgerEntry: AccountingLedgerEntry, Party: Party, @@ -59720,6 +60781,7 @@ var client$2 = { }); frappejs.desk.menu.addItem('ToDo', '#list/ToDo'); + frappejs.desk.menu.addItem('Chart of Accounts', '#tree/Account'); frappejs.desk.menu.addItem('Accounts', '#list/Account'); frappejs.desk.menu.addItem('Items', '#list/Item'); frappejs.desk.menu.addItem('Customers', '#list/Customer'); @@ -59728,26 +60790,30 @@ var client$2 = { frappejs.desk.menu.addItem('Contact', "#list/Contact"); frappejs.desk.menu.addItem('Settings', () => frappejs.desk.showFormModal('SystemSettings')); - frappejs.router.default = '#list/ToDo'; + frappejs.router.default = '#tree/Account'; frappejs.router.show(window.location.hash); } }; +const countryList$1 = Object.keys(require$$0$10).sort(); + // start server client.start({ server: 'localhost:8000', makeDesk: 0 }).then(() => { - new setup({ - postSetup: async (data) => { - client.makeDesk(3); - client$2.start(); + // new SetupWizard({ + // postSetup: async (data) => { + // client.makeDesk(3); + // appClient.start(); - await frappe.router.setRoute('list', 'ToDo'); - } - }); + // await frappe.router.setRoute('list', 'ToDo'); + // } + // }); + client.makeDesk(3); + client$2.start(); }); var www = false;